Skip to content
Permalink
Browse files
Minor tweak: remove arg-receive flag from load-frame-closure
* Strictly speaking, it is not an arg receive since the block
  doesn't come in as an arg, but is loaded from the stack.

* Doesn't affect any functionality or anything really, just me
  being particular.
  • Loading branch information
subbuss committed Jan 11, 2015
1 parent ad066eb commit a3ad247de8a97e7b8cff2f5b3c1da4f774e797e0
Showing 2 changed files with 5 additions and 4 deletions.
@@ -52,10 +52,10 @@ public enum Operation {
RECV_RUBY_EXC(OpFlags.f_is_arg_receive),
RECV_JRUBY_EXC(OpFlags.f_is_arg_receive),
LOAD_IMPLICIT_CLOSURE(OpFlags.f_is_arg_receive),
LOAD_FRAME_CLOSURE(OpFlags.f_is_arg_receive),

/** Instruction to reify an passed-in block to a Proc for def foo(&b) */
REIFY_CLOSURE(0),
LOAD_FRAME_CLOSURE(0),

/* By default, call instructions cannot be deleted even if their results
* aren't used by anyone unless we know more about what the call is,
@@ -255,9 +255,6 @@ private static void receiveArg(ThreadContext context, Instr i, Operation operati
case LOAD_IMPLICIT_CLOSURE:
setResult(temp, currDynScope, instr.getResult(), block);
return;
case LOAD_FRAME_CLOSURE:
setResult(temp, currDynScope, instr.getResult(), context.getFrameBlock());
return;
default:
result = ((ReceiveArgBase)instr).receiveArg(context, args, acceptsKeywordArgument);
setResult(temp, currDynScope, instr.getResult(), result);
@@ -485,6 +482,10 @@ private static void processOtherOp(ThreadContext context, Instr instr, Operation
break;
}

case LOAD_FRAME_CLOSURE:
setResult(temp, currDynScope, instr, context.getFrameBlock());
return;

// ---------- All the rest ---------
default:
result = instr.interpret(context, currScope, currDynScope, self, temp);

0 comments on commit a3ad247

Please sign in to comment.