1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

vm.c: remove unused variables

* vm.c (invoke_block_from_c), vm_insnhelper.c (vm_call_cfunc): remove unused variables.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-07-18 08:40:17 +00:00
parent f9c014d008
commit 02f802f2ce
2 changed files with 6 additions and 8 deletions

9
vm.c
View file

@ -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;

View file

@ -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;