Skip to content

Commit

Permalink
Revert "Use block's frame name if called inside a block"
Browse files Browse the repository at this point in the history
This reverts commit f7dbc18.

These need to be examined in more detail because they do not match and I
don't know why.
  • Loading branch information
headius committed May 8, 2024
1 parent b1693bf commit 8ca1579
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public ExitableReturn interpret(ThreadContext context, Block block, IRubyObject
break;
case CALL_OP:
if (profile) Profiler.updateCallSite(instr, interpreterContext.getScope(), scopeVersion);
processCall(context, instr, operation, currDynScope, currScope, temp, self, name, block);
processCall(context, instr, operation, currDynScope, currScope, temp, self, name);
break;
case RET_OP:
processReturnOp(context, block, instr, operation, currDynScope, temp, self, currScope);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public IRubyObject interpret(ThreadContext context, Block block, IRubyObject sel
break;
case CALL_OP:
if (profile) Profiler.updateCallSite(instr, interpreterContext.getScope(), scopeVersion);
processCall(context, instr, operation, currDynScope, currScope, temp, self, name, block);
processCall(context, instr, operation, currDynScope, currScope, temp, self, name);
break;
case RET_OP:
return processReturnOp(context, block, instr, operation, currDynScope, temp, self, currScope);
Expand Down Expand Up @@ -287,7 +287,7 @@ protected static void receiveArg(ThreadContext context, Instr i, Operation opera
}
}

protected static void processCall(ThreadContext context, Instr instr, Operation operation, DynamicScope currDynScope, StaticScope currScope, Object[] temp, IRubyObject self, String frameName, Block selfBlock) {
protected static void processCall(ThreadContext context, Instr instr, Operation operation, DynamicScope currDynScope, StaticScope currScope, Object[] temp, IRubyObject self, String name) {
Object result;

switch(operation) {
Expand Down Expand Up @@ -360,9 +360,7 @@ protected static void processCall(ThreadContext context, Instr instr, Operation
instr.interpret(context, currScope, currDynScope, self, temp);
break;
case FRAME_NAME_CALL:
setResult(temp, currDynScope, instr,
((FrameNameCallInstr) instr).getFrameName(
context, self, selfBlock == null ? frameName : IRRuntimeHelpers.getFrameNameFromBlock(selfBlock)));
setResult(temp, currDynScope, instr, ((FrameNameCallInstr) instr).getFrameName(context, self, name));
break;
case CALL:
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public IRubyObject interpret(ThreadContext context, Block block, IRubyObject sel
break;
case CALL_OP:
if (profile) Profiler.updateCallSite(instr, interpreterContext.getScope(), scopeVersion);
processCall(context, instr, operation, currDynScope, currScope, temp, self, name, block);
processCall(context, instr, operation, currDynScope, currScope, temp, self, name);
break;
case RET_OP:
return processReturnOp(context, block, instr, operation, currDynScope, temp, self, currScope);
Expand Down

0 comments on commit 8ca1579

Please sign in to comment.