Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5e46bfc340ca
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 652664323c42
Choose a head ref
  • 3 commits
  • 114 files changed
  • 1 contributor

Commits on Jan 12, 2015

  1. Convert all instrs to store the operands and result to instr class.

    This work eliminates a lot of tmeporary array construction of getOperands[] by storing
    all operands in instr by default.  It adds a small amount of memory for this aspect (basically
    an extra primitive array ref for all non d*node instrs/call methods).  Unfortunately, I also
    pushed result down to instr and this ended up using more memory that I had hoped for.  A
    followup commit will address this.  Once result is fixed this will use ~500-750k more memory
    than before this commit for rails console.
    
    The secondary benefit to this work is it eliminates quite a few repeated methods in instrs.
    Methods like simplifyOperand end up being a single method on instr now.
    enebo committed Jan 12, 2015
    Copy the full SHA
    c34f31c View commit details
  2. Copy the full SHA
    c9faa41 View commit details
  3. Copy the full SHA
    6526643 View commit details
Showing with 740 additions and 2,497 deletions.
  1. +24 −26 core/src/main/java/org/jruby/ir/IRBuilder.java
  2. +4 −4 core/src/main/java/org/jruby/ir/IRScope.java
  3. +4 −6 core/src/main/java/org/jruby/ir/dataflow/analyses/UnboxableOpsAnalysisNode.java
  4. +3 −25 core/src/main/java/org/jruby/ir/instructions/AliasInstr.java
  5. +2 −25 core/src/main/java/org/jruby/ir/instructions/ArgScopeDepthInstr.java
  6. +3 −3 core/src/main/java/org/jruby/ir/instructions/AttrAssignInstr.java
  7. +2 −2 core/src/main/java/org/jruby/ir/instructions/BFalseInstr.java
  8. +1 −1 core/src/main/java/org/jruby/ir/instructions/BNilInstr.java
  9. +1 −1 core/src/main/java/org/jruby/ir/instructions/BTrueInstr.java
  10. +1 −1 core/src/main/java/org/jruby/ir/instructions/BUndefInstr.java
  11. +5 −60 core/src/main/java/org/jruby/ir/instructions/BacktickInstr.java
  12. +5 −31 core/src/main/java/org/jruby/ir/instructions/BlockGivenInstr.java
  13. +4 −6 core/src/main/java/org/jruby/ir/instructions/BranchInstr.java
  14. +6 −23 core/src/main/java/org/jruby/ir/instructions/BreakInstr.java
  15. +9 −35 core/src/main/java/org/jruby/ir/instructions/BuildCompoundArrayInstr.java
  16. +8 −60 core/src/main/java/org/jruby/ir/instructions/BuildCompoundStringInstr.java
  17. +11 −49 core/src/main/java/org/jruby/ir/instructions/BuildDynRegExpInstr.java
  18. +6 −41 core/src/main/java/org/jruby/ir/instructions/BuildLambdaInstr.java
  19. +9 −38 core/src/main/java/org/jruby/ir/instructions/BuildRangeInstr.java
  20. +6 −38 core/src/main/java/org/jruby/ir/instructions/BuildSplatInstr.java
  21. +88 −139 core/src/main/java/org/jruby/ir/instructions/CallBase.java
  22. +3 −3 core/src/main/java/org/jruby/ir/instructions/CallInstr.java
  23. +6 −21 core/src/main/java/org/jruby/ir/instructions/CheckArgsArrayArityInstr.java
  24. +1 −6 core/src/main/java/org/jruby/ir/instructions/CheckArityInstr.java
  25. +2 −2 core/src/main/java/org/jruby/ir/instructions/ClassSuperInstr.java
  26. +4 −21 core/src/main/java/org/jruby/ir/instructions/ConstMissingInstr.java
  27. +8 −38 core/src/main/java/org/jruby/ir/instructions/CopyInstr.java
  28. +12 −45 core/src/main/java/org/jruby/ir/instructions/DefineClassInstr.java
  29. +5 −19 core/src/main/java/org/jruby/ir/instructions/DefineClassMethodInstr.java
  30. +2 −7 core/src/main/java/org/jruby/ir/instructions/DefineInstanceMethodInstr.java
  31. +9 −35 core/src/main/java/org/jruby/ir/instructions/DefineMetaClassInstr.java
  32. +9 −34 core/src/main/java/org/jruby/ir/instructions/DefineModuleInstr.java
  33. +8 −46 core/src/main/java/org/jruby/ir/instructions/EQQInstr.java
  34. +1 −6 core/src/main/java/org/jruby/ir/instructions/ExceptionRegionEndMarkerInstr.java
  35. +4 −18 core/src/main/java/org/jruby/ir/instructions/ExceptionRegionStartMarkerInstr.java
  36. +6 −30 core/src/main/java/org/jruby/ir/instructions/GVarAliasInstr.java
  37. +10 −47 core/src/main/java/org/jruby/ir/instructions/GetClassVarContainerModuleInstr.java
  38. +2 −17 core/src/main/java/org/jruby/ir/instructions/GetEncodingInstr.java
  39. +1 −1 core/src/main/java/org/jruby/ir/instructions/GetFieldInstr.java
  40. +0 −5 core/src/main/java/org/jruby/ir/instructions/GetGlobalVariableInstr.java
  41. +5 −32 core/src/main/java/org/jruby/ir/instructions/GetInstr.java
  42. +17 −46 core/src/main/java/org/jruby/ir/instructions/InheritanceSearchConstInstr.java
  43. +2 −2 core/src/main/java/org/jruby/ir/instructions/InstanceSuperInstr.java
  44. +36 −6 core/src/main/java/org/jruby/ir/instructions/Instr.java
  45. +3 −16 core/src/main/java/org/jruby/ir/instructions/JumpInstr.java
  46. +5 −15 core/src/main/java/org/jruby/ir/instructions/LabelInstr.java
  47. +6 −33 core/src/main/java/org/jruby/ir/instructions/LexicalSearchConstInstr.java
  48. +4 −12 core/src/main/java/org/jruby/ir/instructions/LineNumberInstr.java
  49. +2 −22 core/src/main/java/org/jruby/ir/instructions/LoadFrameClosureInstr.java
  50. +2 −22 core/src/main/java/org/jruby/ir/instructions/LoadImplicitClosureInstr.java
  51. +14 −33 core/src/main/java/org/jruby/ir/instructions/LoadLocalVarInstr.java
  52. +9 −45 core/src/main/java/org/jruby/ir/instructions/Match2Instr.java
  53. +7 −41 core/src/main/java/org/jruby/ir/instructions/Match3Instr.java
  54. +5 −36 core/src/main/java/org/jruby/ir/instructions/MatchInstr.java
  55. +16 −37 core/src/main/java/org/jruby/ir/instructions/ModuleVersionGuardInstr.java
  56. +4 −31 core/src/main/java/org/jruby/ir/instructions/MultipleAsgnBase.java
  57. +3 −3 core/src/main/java/org/jruby/ir/instructions/NoResultCallInstr.java
  58. +5 −6 core/src/main/java/org/jruby/ir/instructions/NonlocalReturnInstr.java
  59. +1 −12 core/src/main/java/org/jruby/ir/instructions/NopInstr.java
  60. +3 −22 core/src/main/java/org/jruby/ir/instructions/OneOperandBranchInstr.java
  61. +3 −9 core/src/main/java/org/jruby/ir/instructions/OptArgMultipleAsgnInstr.java
  62. +1 −12 core/src/main/java/org/jruby/ir/instructions/PopBindingInstr.java
  63. +1 −7 core/src/main/java/org/jruby/ir/instructions/PopFrameInstr.java
  64. +9 −43 core/src/main/java/org/jruby/ir/instructions/ProcessModuleBodyInstr.java
  65. +1 −12 core/src/main/java/org/jruby/ir/instructions/PushBindingInstr.java
  66. +1 −7 core/src/main/java/org/jruby/ir/instructions/PushFrameInstr.java
  67. +0 −5 core/src/main/java/org/jruby/ir/instructions/PutGlobalVarInstr.java
  68. +4 −22 core/src/main/java/org/jruby/ir/instructions/PutInstr.java
  69. +1 −8 core/src/main/java/org/jruby/ir/instructions/RaiseArgumentErrorInstr.java
  70. +1 −7 core/src/main/java/org/jruby/ir/instructions/RaiseRequiredKeywordArgumentError.java
  71. +2 −21 core/src/main/java/org/jruby/ir/instructions/ReceiveArgBase.java
  72. +2 −27 core/src/main/java/org/jruby/ir/instructions/ReceiveExceptionBase.java
  73. +0 −5 core/src/main/java/org/jruby/ir/instructions/ReceiveKeywordArgInstr.java
  74. +0 −7 core/src/main/java/org/jruby/ir/instructions/ReceiveKeywordRestArgInstr.java
  75. +0 −7 core/src/main/java/org/jruby/ir/instructions/ReceiveOptArgInstr.java
  76. +0 −6 core/src/main/java/org/jruby/ir/instructions/ReceivePostReqdArgInstr.java
  77. +2 −27 core/src/main/java/org/jruby/ir/instructions/ReceiveSelfInstr.java
  78. +4 −16 core/src/main/java/org/jruby/ir/instructions/RecordEndBlockInstr.java
  79. +5 −38 core/src/main/java/org/jruby/ir/instructions/ReifyClosureInstr.java
  80. +4 −10 core/src/main/java/org/jruby/ir/instructions/ReqdArgMultipleAsgnInstr.java
  81. +7 −43 core/src/main/java/org/jruby/ir/instructions/RescueEQQInstr.java
  82. +3 −8 core/src/main/java/org/jruby/ir/instructions/RestArgMultipleAsgnInstr.java
  83. +28 −0 core/src/main/java/org/jruby/ir/instructions/ResultBaseInstr.java
  84. +3 −22 core/src/main/java/org/jruby/ir/instructions/ReturnBase.java
  85. +3 −8 core/src/main/java/org/jruby/ir/instructions/ReturnInstr.java
  86. +36 −76 core/src/main/java/org/jruby/ir/instructions/RuntimeHelperCall.java
  87. +11 −41 core/src/main/java/org/jruby/ir/instructions/SearchConstInstr.java
  88. +6 −33 core/src/main/java/org/jruby/ir/instructions/SetCapturedVarInstr.java
  89. +17 −32 core/src/main/java/org/jruby/ir/instructions/StoreLocalVarInstr.java
  90. +1 −8 core/src/main/java/org/jruby/ir/instructions/ThreadPollInstr.java
  91. +8 −28 core/src/main/java/org/jruby/ir/instructions/ThrowExceptionInstr.java
  92. +8 −39 core/src/main/java/org/jruby/ir/instructions/ToAryInstr.java
  93. +2 −8 core/src/main/java/org/jruby/ir/instructions/TraceInstr.java
  94. +3 −27 core/src/main/java/org/jruby/ir/instructions/TwoOperandBranchInstr.java
  95. +5 −36 core/src/main/java/org/jruby/ir/instructions/UndefMethodInstr.java
  96. +3 −2 core/src/main/java/org/jruby/ir/instructions/UnresolvedSuperInstr.java
  97. +16 −49 core/src/main/java/org/jruby/ir/instructions/YieldInstr.java
  98. +3 −2 core/src/main/java/org/jruby/ir/instructions/ZSuperInstr.java
  99. +7 −37 core/src/main/java/org/jruby/ir/instructions/boxing/AluInstr.java
  100. +4 −27 core/src/main/java/org/jruby/ir/instructions/boxing/BoxInstr.java
  101. +5 −35 core/src/main/java/org/jruby/ir/instructions/boxing/UnboxInstr.java
  102. +3 −23 core/src/main/java/org/jruby/ir/instructions/defined/GetErrorInfoInstr.java
  103. +4 −25 core/src/main/java/org/jruby/ir/instructions/defined/RestoreErrorInfoInstr.java
  104. +3 −9 core/src/main/java/org/jruby/ir/instructions/specialized/OneArgOperandAttrAssignInstr.java
  105. +4 −4 core/src/main/java/org/jruby/ir/instructions/specialized/OneFixnumArgNoBlockCallInstr.java
  106. +4 −4 core/src/main/java/org/jruby/ir/instructions/specialized/OneFloatArgNoBlockCallInstr.java
  107. +4 −13 core/src/main/java/org/jruby/ir/instructions/specialized/OneOperandArgBlockCallInstr.java
  108. +3 −12 core/src/main/java/org/jruby/ir/instructions/specialized/OneOperandArgNoBlockCallInstr.java
  109. +4 −13 core/src/main/java/org/jruby/ir/instructions/specialized/OneOperandArgNoBlockNoResultCallInstr.java
  110. +3 −8 core/src/main/java/org/jruby/ir/instructions/specialized/ZeroOperandArgNoBlockCallInstr.java
  111. +6 −6 core/src/main/java/org/jruby/ir/persistence/InstrEncoderMap.java
  112. +2 −2 core/src/main/java/org/jruby/ir/representations/CFG.java
  113. +22 −22 core/src/main/java/org/jruby/ir/representations/CFGLinearizer.java
  114. +14 −12 core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
50 changes: 24 additions & 26 deletions core/src/main/java/org/jruby/ir/IRBuilder.java
Original file line number Diff line number Diff line change
@@ -236,9 +236,7 @@ public void cloneIntoHostScope(IRBuilder b, IRScope s) {
// are not cloned.
ii.renameLabel(start);
for (Instr i: instrs) {
if (i instanceof LabelInstr) {
ii.renameLabel(((LabelInstr)i).label);
}
if (i instanceof LabelInstr) ii.renameLabel(((LabelInstr)i).getLabel());
}

// Clone instructions now
@@ -2056,36 +2054,39 @@ private Operand dynamicPiece(Node pieceNode, IRScope s) {
return piece == null ? manager.getNil() : piece;
}

public Operand buildDRegexp(DRegexpNode dregexpNode, IRScope s) {
List<Operand> strPieces = new ArrayList<>();
for (Node n : dregexpNode.childNodes()) {
strPieces.add(dynamicPiece(n, s));
public Operand buildDRegexp(DRegexpNode node, IRScope s) {
List<Node> nodePieces = node.childNodes();
Operand[] pieces = new Operand[nodePieces.size()];
for (int i = 0; i < pieces.length; i++) {
pieces[i] = dynamicPiece(nodePieces.get(i), s);
}

Variable res = s.createTemporaryVariable();
addInstr(s, new BuildDynRegExpInstr(res, strPieces, dregexpNode.getOptions()));
addInstr(s, new BuildDynRegExpInstr(res, pieces, node.getOptions()));
return res;
}

public Operand buildDStr(DStrNode dstrNode, IRScope s) {
List<Operand> strPieces = new ArrayList<>();
for (Node n : dstrNode.childNodes()) {
strPieces.add(dynamicPiece(n, s));
public Operand buildDStr(DStrNode node, IRScope s) {
List<Node> nodePieces = node.childNodes();
Operand[] pieces = new Operand[nodePieces.size()];
for (int i = 0; i < pieces.length; i++) {
pieces[i] = dynamicPiece(nodePieces.get(i), s);
}

Variable res = s.createTemporaryVariable();
addInstr(s, new BuildCompoundStringInstr(res, strPieces, dstrNode.getEncoding()));
addInstr(s, new BuildCompoundStringInstr(res, pieces, node.getEncoding()));
return copyAndReturnValue(s, res);
}

public Operand buildDSymbol(DSymbolNode node, IRScope s) {
List<Operand> strPieces = new ArrayList<>();
for (Node n : node.childNodes()) {
strPieces.add(dynamicPiece(n, s));
List<Node> nodePieces = node.childNodes();
Operand[] pieces = new Operand[nodePieces.size()];
for (int i = 0; i < pieces.length; i++) {
pieces[i] = dynamicPiece(nodePieces.get(i), s);
}

Variable res = s.createTemporaryVariable();
addInstr(s, new BuildCompoundStringInstr(res, strPieces, node.getEncoding()));
addInstr(s, new BuildCompoundStringInstr(res, pieces, node.getEncoding()));
return copyAndReturnValue(s, new DynamicSymbol(res));
}

@@ -2094,14 +2095,13 @@ public Operand buildDVar(DVarNode node, IRScope s) {
}

public Operand buildDXStr(final DXStrNode dstrNode, IRScope s) {
List<Operand> strPieces = new ArrayList<>();
for (Node nextNode : dstrNode.childNodes()) {
strPieces.add(dynamicPiece(nextNode, s));
List<Node> nodePieces = dstrNode.childNodes();
Operand[] pieces = new Operand[nodePieces.size()];
for (int i = 0; i < pieces.length; i++) {
pieces[i] = dynamicPiece(nodePieces.get(i), s);
}

Variable res = s.createTemporaryVariable();
addInstr(s, new BacktickInstr(res, strPieces));
return res;
return addResultInstr(s, new BacktickInstr(s.createTemporaryVariable(), pieces));
}

/* ****************************************************************
@@ -3414,9 +3414,7 @@ public Operand buildWhile(final WhileNode whileNode, IRScope s) {
}

public Operand buildXStr(XStrNode node, IRScope s) {
Variable res = s.createTemporaryVariable();
addInstr(s, new BacktickInstr(res, new StringLiteral(node.getValue())));
return res;
return addResultInstr(s, new BacktickInstr(s.createTemporaryVariable(), new Operand[] { new StringLiteral(node.getValue())}));
}

public Operand buildYield(YieldNode node, IRScope s) {
8 changes: 4 additions & 4 deletions core/src/main/java/org/jruby/ir/IRScope.java
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ public abstract class IRScope implements ParseResult {

/** What the interpreter depends on to interpret this IRScope */
protected InterpreterContext interpreterContext;
private List<BasicBlock> linearizedBBList;
private BasicBlock[] linearizedBBList;
protected int temporaryVariableIndex;
protected int floatVariableIndex;
protected int fixnumVariableIndex;
@@ -620,7 +620,7 @@ public synchronized List<BasicBlock> prepareForCompilation() {

runCompilerPasses(getManager().getJITPasses(this));

return buildLinearization();
return Arrays.asList(buildLinearization());
}

private void setupLinearization() {
@@ -1037,15 +1037,15 @@ public void resetLinearizationData() {
linearizedBBList = null;
}

public List<BasicBlock> buildLinearization() {
public BasicBlock[] buildLinearization() {
if (linearizedBBList != null) return linearizedBBList; // Already linearized

linearizedBBList = CFGLinearizer.linearize(cfg);

return linearizedBBList;
}

public List<BasicBlock> linearization() {
public BasicBlock[] linearization() {
depends(cfg());

assert linearizedBBList != null: "You have not run linearization";
Original file line number Diff line number Diff line change
@@ -244,9 +244,8 @@ public void applyTransferFunction(Instr i) {
CallBase c = (CallBase)i;
String m = c.getName();
Operand r = c.getReceiver();
Operand[] args = c.getCallArgs();
if (dst != null && args.length == 1 && resemblesALUOp(m)) {
Operand a = args[0];
if (dst != null && c.getArgsCount() == 1 && resemblesALUOp(m)) {
Operand a = c.getArg1();
Class receiverType = getOperandType(tmpState, r);
Class argType = getOperandType(tmpState, a);
// Optimistically assume that call is an ALU op
@@ -643,9 +642,8 @@ public void unbox(Map<Variable, TemporaryLocalVariable> unboxMap) {
CallBase c = (CallBase)i;
String m = c.getName();
Operand r = c.getReceiver();
Operand[] args = c.getCallArgs();
if (dst != null && args.length == 1 && resemblesALUOp(m)) {
Operand a = args[0];
if (dst != null && c.getArgsCount() == 1 && resemblesALUOp(m)) {
Operand a = c.getArg1();
Class receiverType = getOperandType(tmpState, r);
Class argType = getOperandType(tmpState, a);
// Optimistically assume that call is an ALU op
28 changes: 3 additions & 25 deletions core/src/main/java/org/jruby/ir/instructions/AliasInstr.java
Original file line number Diff line number Diff line change
@@ -15,25 +15,9 @@
import java.util.Map;

public class AliasInstr extends Instr implements FixedArityInstr {
private Operand newName;
private Operand oldName;

// SSS FIXME: Implicit self arg -- make explicit to not get screwed by inlining!
public AliasInstr(Operand newName, Operand oldName) {
super(Operation.ALIAS);

this.newName = newName;
this.oldName = oldName;
}

@Override
public Operand[] getOperands() {
return new Operand[] {getNewName(), getOldName()};
}

@Override
public String toString() {
return getOperation().toString() + "(" + getNewName() + ", " + getOldName() + ")";
super(Operation.ALIAS, new Operand[] {newName, oldName});
}

@Override
@@ -42,12 +26,6 @@ public boolean computeScopeFlags(IRScope scope) {
return true;
}

@Override
public void simplifyOperands(Map<Operand, Operand> valueMap, boolean force) {
oldName = getOldName().getSimplifiedOperand(valueMap, force);
newName = getNewName().getSimplifiedOperand(valueMap, force);
}

@Override
public Instr clone(CloneInfo ii) {
return new AliasInstr(getNewName().cloneForInlining(ii), getOldName().cloneForInlining(ii));
@@ -67,10 +45,10 @@ public void visit(IRVisitor visitor) {
}

public Operand getNewName() {
return newName;
return operands[0];
}

public Operand getOldName() {
return oldName;
return operands[1];
}
}
Original file line number Diff line number Diff line change
@@ -10,39 +10,16 @@
import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.builtin.IRubyObject;

public class ArgScopeDepthInstr extends Instr implements ResultInstr,FixedArityInstr {
private Variable result;

public class ArgScopeDepthInstr extends ResultBaseInstr implements FixedArityInstr {
public ArgScopeDepthInstr(Variable result) {
super(Operation.ARG_SCOPE_DEPTH);
this.result = result;
}

@Override
public Operand[] getOperands() {
return EMPTY_OPERANDS;
}

@Override
public Variable getResult() {
return result;
}

@Override
public void updateResult(Variable v) {
this.result = v;
super(Operation.ARG_SCOPE_DEPTH, result, EMPTY_OPERANDS);
}

@Override
public Instr clone(CloneInfo ii) {
return new ArgScopeDepthInstr(ii.getRenamedVariable(result));
}

@Override
public String toString() {
return result + " = " + super.toString();
}

@Override
public void visit(IRVisitor visitor) {
visitor.ArgScopeDepthInstr(this);
Original file line number Diff line number Diff line change
@@ -40,13 +40,13 @@ public boolean computeScopeFlags(IRScope scope) {

@Override
public Instr clone(CloneInfo ii) {
return new AttrAssignInstr(receiver.cloneForInlining(ii), getName(), cloneCallArgs(ii));
return new AttrAssignInstr(getReceiver().cloneForInlining(ii), getName(), cloneCallArgs(ii));
}

@Override
public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope dynamicScope, IRubyObject self, Object[] temp) {
IRubyObject object = (IRubyObject) receiver.retrieve(context, self, currScope, dynamicScope, temp);
IRubyObject[] values = prepareArguments(context, self, getCallArgs(), currScope, dynamicScope, temp);
IRubyObject object = (IRubyObject) getReceiver().retrieve(context, self, currScope, dynamicScope, temp);
IRubyObject[] values = prepareArguments(context, self, currScope, dynamicScope, temp);

CallType callType = self == object ? CallType.FUNCTIONAL : CallType.NORMAL;
Helpers.invoke(context, object, getName(), values, callType, Block.NULL_BLOCK);
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/ir/instructions/BFalseInstr.java
Original file line number Diff line number Diff line change
@@ -13,11 +13,11 @@
public class BFalseInstr extends OneOperandBranchInstr implements FixedArityInstr {
// Public only for persistence reloading
public BFalseInstr(Operation op, Operand v, Label jmpTarget) {
super(op, v, jmpTarget);
super(op, new Operand[] {jmpTarget, v});
}

public BFalseInstr(Operand v, Label jmpTarget) {
super(Operation.B_FALSE, v, jmpTarget);
super(Operation.B_FALSE, new Operand[] {jmpTarget, v});
}

@Override
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@

public class BNilInstr extends OneOperandBranchInstr implements FixedArityInstr {
public BNilInstr(Operand v, Label jmpTarget) {
super(Operation.B_NIL, v, jmpTarget);
super(Operation.B_NIL, new Operand[] {jmpTarget, v});
}

@Override
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@

public class BTrueInstr extends OneOperandBranchInstr implements FixedArityInstr {
public BTrueInstr(Operation op, Operand v, Label jmpTarget) {
super(op, v, jmpTarget);
super(op, new Operand[] {jmpTarget, v});
}

public BTrueInstr(Operand v, Label jmpTarget) {
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@

public class BUndefInstr extends OneOperandBranchInstr implements FixedArityInstr {
public BUndefInstr(Operand v, Label jmpTarget) {
super(Operation.B_UNDEF, v, jmpTarget);
super(Operation.B_UNDEF, new Operand[] {jmpTarget, v});
}

@Override
Loading