diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-22 06:28:51 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-22 06:28:51 +0000 |
commit | d5697825ef949712143325045b46fc8fe9aba507 (patch) | |
tree | 8d2237e3da8ab44aa08fa8bfdb17bc4b72279c21 | |
parent | d28e07d57bc15a4baf08f8f4fb64d27cf927aac7 (diff) | |
download | ruby-d5697825ef949712143325045b46fc8fe9aba507.tar.gz |
* vm_insnhelper.c (vm_setup_method): fix last commit.
[ruby-dev:46065] [Bug #6901]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | vm_insnhelper.c | 9 |
2 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,8 @@ +Wed Aug 22 15:27:50 2012 Koichi Sasada <ko1@atdot.net> + + * vm_insnhelper.c (vm_setup_method): fix last commit. + [ruby-dev:46065] [Bug #6901] + Wed Aug 22 14:05:23 2012 Koichi Sasada <ko1@atdot.net> * vm_trace.c: support TracePoint. [ruby-trunk - Feature #6895] diff --git a/vm_insnhelper.c b/vm_insnhelper.c index c9c1b222a3..dc6c8f519d 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -510,8 +510,7 @@ vm_setup_method(rb_thread_t *th, rb_control_frame_t *cfp, sp = rsp + iseq->arg_size; - if (LIKELY(!(flag & VM_CALL_TAILCALL_BIT) || - VM_FRAME_TYPE_FINISH_P(th->cfp))) { + if (LIKELY(!(flag & VM_CALL_TAILCALL_BIT))) { if (0) printf("local_size: %d, arg_size: %d\n", iseq->local_size, iseq->arg_size); @@ -528,6 +527,8 @@ vm_setup_method(rb_thread_t *th, rb_control_frame_t *cfp, } else { VALUE *p_rsp; + int is_finish_frame = VM_FRAME_TYPE_FINISH_P(cfp); + th->cfp++; /* pop cf */ p_rsp = th->cfp->sp; @@ -543,8 +544,8 @@ vm_setup_method(rb_thread_t *th, rb_control_frame_t *cfp, *sp++ = Qnil; } - vm_push_frame(th, iseq, VM_FRAME_MAGIC_METHOD, recv, defined_class, - VM_ENVVAL_BLOCK_PTR(blockptr), + vm_push_frame(th, iseq, VM_FRAME_MAGIC_METHOD | (is_finish_frame ? VM_FRAME_FLAG_FINISH : 0), + recv, defined_class, VM_ENVVAL_BLOCK_PTR(blockptr), iseq->iseq_encoded + opt_pc, sp, 0, me); } } |