public void visit(Operand operand) { operand.visit(this); }
public void visit(Operand operand) { operand.visit(this); }
public void visit(Operand operand) { operand.visit(this); }
public void visit(Operand operand) { operand.visit(this); }
public void visit(Operand operand) { operand.visit(this); }
public void visit(Operand operand) { operand.visit(this); }
private void printAnsiOp(String c, Operand op) { if (color) print(c); op.visit(this); if (color) print(CLEAR_COLOR); }
private void printAnsiOp(String c, Operand op) { if (color) print(c); op.visit(this); if (color) print(CLEAR_COLOR); }
private void printAnsiOp(String c, String pre, Operand op) { if (color) print(c); print(pre); op.visit(this); if (color) print(CLEAR_COLOR); }
private void printAnsiOp(String c, String pre, Operand op) { if (color) print(c); print(pre); op.visit(this); if (color) print(CLEAR_COLOR); }
@Override public void visit(Operand operand) { // Handle variables separately if (operand instanceof LocalVariable) { printAnsiOp(VARIABLE_COLOR, "*", operand); } else if (operand instanceof TemporaryVariable) { printAnsiOp(VARIABLE_COLOR, operand); } else { // Other operand forms need type identification printAnsi(OPERAND_COLOR, operand.getOperandType().shortName() + "<"); operand.visit(this); printAnsi(OPERAND_COLOR, ">"); } }
@Override public void visit(Operand operand) { // Handle variables separately if (operand instanceof LocalVariable) { printAnsiOp(VARIABLE_COLOR, "*", operand); } else if (operand instanceof TemporaryVariable) { printAnsiOp(VARIABLE_COLOR, operand); } else { // Other operand forms need type identification printAnsi(OPERAND_COLOR, operand.getOperandType().shortName() + "<"); operand.visit(this); printAnsi(OPERAND_COLOR, ">"); } }
switch (location) { case 0: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueZeroDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; case 1: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueOneDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; case 2: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueTwoDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; case 3: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueThreeDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; default: storeValue.visit(this); m.adapter.pushInt(location); m.adapter.invokevirtual(p(DynamicScope.class), "setValueDepthZero", sig(IRubyObject.class, IRubyObject.class, int.class)); storeValue.visit(this); m.adapter.pushInt(location); m.adapter.invokevirtual(p(DynamicScope.class), "setValue", sig(IRubyObject.class, int.class, IRubyObject.class, int.class));
switch (location) { case 0: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueZeroDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; case 1: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueOneDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; case 2: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueTwoDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; case 3: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueThreeDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; default: storeValue.visit(this); m.adapter.pushInt(location); m.adapter.invokevirtual(p(DynamicScope.class), "setValueDepthZero", sig(IRubyObject.class, IRubyObject.class, int.class)); storeValue.visit(this); m.adapter.pushInt(depth); m.adapter.invokevirtual(p(DynamicScope.class), "setValue", sig(IRubyObject.class, int.class, IRubyObject.class, int.class));
switch (location) { case 0: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueZeroDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; case 1: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueOneDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; case 2: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueTwoDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; case 3: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueThreeDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; default: storeValue.visit(this); m.adapter.pushInt(location); m.adapter.invokevirtual(p(DynamicScope.class), "setValueDepthZero", sig(IRubyObject.class, IRubyObject.class, int.class)); storeValue.visit(this); m.adapter.pushInt(location); m.adapter.invokevirtual(p(DynamicScope.class), "setValue", sig(IRubyObject.class, int.class, IRubyObject.class, int.class));
switch (location) { case 0: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueZeroDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; case 1: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueOneDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; case 2: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueTwoDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; case 3: storeValue.visit(this); m.adapter.invokevirtual(p(DynamicScope.class), "setValueThreeDepthZero", sig(IRubyObject.class, IRubyObject.class)); m.adapter.pop(); return; default: storeValue.visit(this); m.adapter.pushInt(location); m.adapter.invokevirtual(p(DynamicScope.class), "setValueDepthZero", sig(IRubyObject.class, IRubyObject.class, int.class)); storeValue.visit(this); m.adapter.pushInt(depth); m.adapter.invokevirtual(p(DynamicScope.class), "setValue", sig(IRubyObject.class, int.class, IRubyObject.class, int.class));