Project

General

Profile

Feature #8693 » lambda-yield.patch

ktsj (Kazuki Tsujimoto), 08/05/2013 10:49 PM

View differences:

vm_insnhelper.c
if (BUILTIN_TYPE(iseq) != T_NODE) {
int opt_pc;
const int arg_size = iseq->arg_size;
int is_lambda = block_proc_is_lambda(block->proc);
VALUE * const rsp = GET_SP() - ci->argc;
SET_SP(rsp);
CHECK_VM_STACK_OVERFLOW(GET_CFP(), iseq->stack_max);
opt_pc = vm_yield_setup_args(th, iseq, ci->argc, rsp, 0, block_proc_is_lambda(block->proc));
opt_pc = vm_yield_setup_args(th, iseq, ci->argc, rsp, 0, is_lambda);
vm_push_frame(th, iseq, VM_FRAME_MAGIC_BLOCK, block->self,
vm_push_frame(th, iseq,
is_lambda ? VM_FRAME_MAGIC_LAMBDA : VM_FRAME_MAGIC_BLOCK,
block->self,
block->klass,
VM_ENVVAL_PREV_EP_PTR(block->ep),
iseq->iseq_encoded + opt_pc,
(1-1/2)