diff options
-rw-r--r-- | vm.c | 9 | ||||
-rw-r--r-- | vm_insnhelper.c | 5 |
2 files changed, 6 insertions, 8 deletions
@@ -581,7 +581,6 @@ invoke_block_from_c(rb_thread_t *th, const rb_block_t *block, else if (BUILTIN_TYPE(block->iseq) != T_NODE) { const rb_iseq_t *iseq = block->iseq; const rb_control_frame_t *cfp; - rb_control_frame_t *ncfp; int i, opt_pc, arg_size = iseq->arg_size; int type = block_proc_is_lambda(block->proc) ? VM_FRAME_MAGIC_LAMBDA : VM_FRAME_MAGIC_BLOCK; @@ -596,10 +595,10 @@ invoke_block_from_c(rb_thread_t *th, const rb_block_t *block, opt_pc = vm_yield_setup_args(th, iseq, argc, cfp->sp, blockptr, type == VM_FRAME_MAGIC_LAMBDA); - ncfp = vm_push_frame(th, iseq, type | VM_FRAME_FLAG_FINISH, - self, VM_ENVVAL_PREV_EP_PTR(block->ep), - iseq->iseq_encoded + opt_pc, cfp->sp + arg_size, iseq->local_size - arg_size, - th->passed_me); + vm_push_frame(th, iseq, type | VM_FRAME_FLAG_FINISH, + self, VM_ENVVAL_PREV_EP_PTR(block->ep), + iseq->iseq_encoded + opt_pc, cfp->sp + arg_size, iseq->local_size - arg_size, + th->passed_me); th->passed_me = 0; th->passed_block = blockptr; diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 22e903ad80..e4a45e669d 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -419,12 +419,11 @@ vm_call_cfunc(rb_thread_t *th, rb_control_frame_t *reg_cfp, { volatile VALUE val = 0; const rb_method_definition_t *def = me->def; - rb_control_frame_t *cfp; EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, recv, me->called_id, me->klass); - cfp = vm_push_frame(th, 0, VM_FRAME_MAGIC_CFUNC, recv, - VM_ENVVAL_BLOCK_PTR(blockptr), 0, th->cfp->sp, 1, me); + vm_push_frame(th, 0, VM_FRAME_MAGIC_CFUNC, recv, + VM_ENVVAL_BLOCK_PTR(blockptr), 0, th->cfp->sp, 1, me); reg_cfp->sp -= num + 1; |