[前][次][番号順一覧][スレッド一覧]

ruby-changes:24723

From: ko1 <ko1@a...>
Date: Wed, 22 Aug 2012 15:29:03 +0900 (JST)
Subject: [ruby-changes:24723] ko1:r36774 (trunk): * vm_insnhelper.c (vm_setup_method): fix last commit.

ko1	2012-08-22 15:28:51 +0900 (Wed, 22 Aug 2012)

  New Revision: 36774

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36774

  Log:
    * vm_insnhelper.c (vm_setup_method): fix last commit.
      [ruby-dev:46065] [Bug #6901]

  Modified files:
    trunk/ChangeLog
    trunk/vm_insnhelper.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 36773)
+++ ChangeLog	(revision 36774)
@@ -1,3 +1,8 @@
+Wed Aug 22 15:27:50 2012  Koichi Sasada  <ko1@a...>
+
+	* vm_insnhelper.c (vm_setup_method): fix last commit.
+	  [ruby-dev:46065] [Bug #6901]
+
 Wed Aug 22 14:05:23 2012  Koichi Sasada  <ko1@a...>
 
 	* vm_trace.c: support TracePoint. [ruby-trunk - Feature #6895]
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 36773)
+++ vm_insnhelper.c	(revision 36774)
@@ -510,8 +510,7 @@
 
     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 @@
     }
     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 @@
 	    *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);
     }
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]