diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-25 16:05:17 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-25 16:05:17 +0000 |
commit | ed4e57690c9cc782ab8675c4bf48153ce0a36896 (patch) | |
tree | 5cdf90849da2ef0e17458f17b2d8358929c7a7d2 /insns.def | |
parent | 588e79f7688c9b7f085cb8d46b9289e4769f4135 (diff) | |
download | ruby-ed4e57690c9cc782ab8675c4bf48153ce0a36896.tar.gz |
* insnhelper.ci, vm.c: complete block parameter support.
post arguments, optional arguments, block argument.
* compile.c, parse.y: fix {|a|} parameter.
* insnshelper.ci, insns.def: revert caller_setup_args() option
(need_block_check) parameter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -1155,7 +1155,7 @@ send NODE *mn; VALUE recv, klass; rb_block_t *blockptr = 0; - rb_num_t num = caller_setup_args(th, GET_CFP(), op_flag, op_argc, blockiseq, &blockptr, 1); + rb_num_t num = caller_setup_args(th, GET_CFP(), op_flag, op_argc, blockiseq, &blockptr); rb_num_t flag = op_flag; ID id = op_id; @@ -1216,7 +1216,7 @@ invokesuper { rb_block_t *blockptr = 0; VALUE flag = op_flag; - int num = caller_setup_args(th, GET_CFP(), flag, op_argc, blockiseq, &blockptr, 1); + int num = caller_setup_args(th, GET_CFP(), flag, op_argc, blockiseq, &blockptr); rb_iseq_t *iseq = GET_ISEQ(); rb_iseq_t *ip = iseq; VALUE recv, klass; @@ -1292,18 +1292,21 @@ invokeblock iseq = block->iseq; if (BUILTIN_TYPE(iseq) != T_NODE) { - argc = caller_setup_args(th, GET_CFP(), flag, argc, 0, 0, 0); + int opt_pc; + + argc = caller_setup_args(th, GET_CFP(), flag, argc, 0, 0); CHECK_STACK_OVERFLOW(GET_CFP(), iseq->stack_max); DEC_SP(argc); - argc = vm_yield_setup_args(th, iseq, argc, GET_SP(), - block_proc_is_lambda(block->proc)); + opt_pc = vm_yield_setup_args(th, iseq, argc, GET_SP(), + block_proc_is_lambda(block->proc)); + argc = iseq->arg_size; INC_SP(argc); vm_push_frame(th, iseq, FRAME_MAGIC_BLOCK, block->self, (VALUE) block->dfp, - iseq->iseq_encoded, GET_SP(), block->lfp, + iseq->iseq_encoded + opt_pc, GET_SP(), block->lfp, iseq->local_size - argc); reg_cfp->sp -= argc; |