Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions core/src/main/java/org/jruby/ir/interpreter/InterpreterEngine.java
Original file line number Diff line number Diff line change
@@ -366,27 +366,20 @@ protected static void processCall(ThreadContext context, Instr instr, Operation
protected static void processBookKeepingOp(ThreadContext context, Block block, Instr instr, Operation operation,
String name, IRubyObject[] args, IRubyObject self, Block blockArg, RubyModule implClass,
DynamicScope currDynScope, Object[] temp, StaticScope currScope) {
Block.Type blockType = block == null ? null : block.type;
Frame f;
Visibility viz;
switch(operation) {
case LABEL:
break;
case SAVE_BINDING_VIZ:
viz = block.getBinding().getVisibility();
setResult(temp, currDynScope, ((SaveBindingVisibilityInstr)instr).getResult(), viz);
setResult(temp, currDynScope, ((SaveBindingVisibilityInstr) instr).getResult(), block.getBinding().getVisibility());
break;
case RESTORE_BINDING_VIZ:
viz = (Visibility)retrieveOp(((RestoreBindingVisibilityInstr)instr).getVisibility(), context, self, currDynScope, currScope, temp);
block.getBinding().setVisibility(viz);
block.getBinding().setVisibility((Visibility) retrieveOp(((RestoreBindingVisibilityInstr) instr).getVisibility(), context, self, currDynScope, currScope, temp));
break;
case PUSH_BLOCK_FRAME:
f = context.preYieldNoScope(block.getBinding());
setResult(temp, currDynScope, ((PushBlockFrameInstr)instr).getResult(), f);
setResult(temp, currDynScope, ((PushBlockFrameInstr) instr).getResult(), context.preYieldNoScope(block.getBinding()));
break;
case POP_BLOCK_FRAME:
f = (Frame)retrieveOp(((PopBlockFrameInstr)instr).getFrame(), context, self, currDynScope, currScope, temp);
context.postYieldNoScope(f);
context.postYieldNoScope((Frame) retrieveOp(((PopBlockFrameInstr)instr).getFrame(), context, self, currDynScope, currScope, temp));
break;
case PUSH_METHOD_FRAME:
context.preMethodFrameOnly(implClass, name, self, blockArg);
@@ -406,7 +399,7 @@ protected static void processBookKeepingOp(ThreadContext context, Block block, I
context.callThreadPoll();
break;
case CHECK_ARITY:
((CheckArityInstr)instr).checkArity(context, args, blockType);
((CheckArityInstr) instr).checkArity(context, args, block == null ? null : block.type);
break;
case LINE_NUM:
context.setLine(((LineNumberInstr)instr).lineNumber);

0 comments on commit 7455d05

Please sign in to comment.