Skip to content

Commit

Permalink
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -325,6 +325,7 @@ 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) {
Block.Type blockType = block == null ? null : block.type;
switch(operation) {
case LABEL:
break;
@@ -346,7 +347,7 @@ protected static void processBookKeepingOp(ThreadContext context, Block block, I
context.callThreadPoll();
break;
case CHECK_ARITY:
((CheckArityInstr)instr).checkArity(context, args, block.type);
((CheckArityInstr)instr).checkArity(context, args, blockType);
break;
case LINE_NUM:
context.setLine(((LineNumberInstr)instr).lineNumber);
@@ -398,6 +399,7 @@ protected static IRubyObject processReturnOp(ThreadContext context, Block block,
protected static void processOtherOp(ThreadContext context, Block block, Instr instr, Operation operation, DynamicScope currDynScope,
StaticScope currScope, Object[] temp, IRubyObject self,
double[] floats, long[] fixnums, boolean[] booleans) {
Block.Type blockType = block == null ? null : block.type;
Object result;
switch(operation) {
case RECV_SELF:
@@ -446,12 +448,12 @@ protected static void processOtherOp(ThreadContext context, Block block, Instr i
case RUNTIME_HELPER: {
RuntimeHelperCall rhc = (RuntimeHelperCall)instr;
setResult(temp, currDynScope, rhc.getResult(),
rhc.callHelper(context, currScope, currDynScope, self, temp, block.type));
rhc.callHelper(context, currScope, currDynScope, self, temp, blockType));
break;
}

case CHECK_FOR_LJE:
((CheckForLJEInstr) instr).check(context, currDynScope, block.type);
((CheckForLJEInstr) instr).check(context, currDynScope, blockType);
break;

case BOX_FLOAT: {
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ public IRubyObject interpret(ThreadContext context, Block block, IRubyObject sel

Operation operation = instr.getOperation();
if (debug) {
Interpreter.LOG.info("I: {" + ipc + "} ", instr + "; <#RPCs=" + rescuePCs.size() + ">");
Interpreter.LOG.info("I: {" + ipc + "} ", instr + "; <#RPCs=" + (rescuePCs == null ? 0 : rescuePCs.size()) + ">");
Interpreter.interpInstrsCount++;
} else if (profile) {
Profiler.instrTick(operation);
@@ -144,6 +144,7 @@ public IRubyObject interpret(ThreadContext context, Block block, IRubyObject sel

protected static void processOtherOp(ThreadContext context, Block block, Instr instr, Operation operation, DynamicScope currDynScope,
StaticScope currScope, Object[] temp, IRubyObject self) {
Block.Type blockType = block == null ? null : block.type;
switch(operation) {
case RECV_SELF:
break;
@@ -177,11 +178,11 @@ protected static void processOtherOp(ThreadContext context, Block block, Instr i
case RUNTIME_HELPER: {
RuntimeHelperCall rhc = (RuntimeHelperCall)instr;
setResult(temp, currDynScope, rhc.getResult(),
rhc.callHelper(context, currScope, currDynScope, self, temp, block.type));
rhc.callHelper(context, currScope, currDynScope, self, temp, blockType));
break;
}
case CHECK_FOR_LJE:
((CheckForLJEInstr) instr).check(context, currDynScope, block.type);
((CheckForLJEInstr) instr).check(context, currDynScope, blockType);
break;
case LOAD_FRAME_CLOSURE:
setResult(temp, currDynScope, instr, context.getFrameBlock());

0 comments on commit 7796079

Please sign in to comment.