summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-22 02:25:16 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-22 02:25:16 +0000
commitbf797ed9b094289d79b485fd3794cb40acb368b0 (patch)
treec28c6a4418907fc542d7e66f6f89a5273b2c4e71 /vm_insnhelper.c
parent7a69af746135a2ecfc21cf717c4a4b217283ca15 (diff)
* vm_insnhelper.c (vm_setup_method): should not enable tail call
optimization for frames with VM_FRAME_FLAG_FINISH. [ruby-dev:46065] [Bug #6901] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index b774f1206f..c9c1b222a3 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -510,7 +510,8 @@ vm_setup_method(rb_thread_t *th, rb_control_frame_t *cfp,
sp = rsp + iseq->arg_size;
- if (LIKELY(!(flag & VM_CALL_TAILCALL_BIT))) {
+ if (LIKELY(!(flag & VM_CALL_TAILCALL_BIT) ||
+ VM_FRAME_TYPE_FINISH_P(th->cfp))) {
if (0) printf("local_size: %d, arg_size: %d\n",
iseq->local_size, iseq->arg_size);