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

ruby-changes:28742

From: nobu <ko1@a...>
Date: Fri, 17 May 2013 12:39:50 +0900 (JST)
Subject: [ruby-changes:28742] nobu:r40794 (trunk): vm.c: narrow variable scope

nobu	2013-05-17 12:39:40 +0900 (Fri, 17 May 2013)

  New Revision: 40794

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

  Log:
    vm.c: narrow variable scope
    
    * vm.c (vm_exec): move escape_ep into exception block, since it is
      updated every time entering the block.

  Modified files:
    trunk/vm.c

Index: vm.c
===================================================================
--- vm.c	(revision 40793)
+++ vm.c	(revision 40794)
@@ -1190,7 +1190,6 @@ vm_exec(rb_thread_t *th) https://github.com/ruby/ruby/blob/trunk/vm.c#L1190
     int state;
     VALUE result, err;
     VALUE initial = 0;
-    VALUE *volatile escape_ep = NULL;
 
     TH_PUSH_TAG(th);
     _tag.retval = Qnil;
@@ -1210,6 +1209,7 @@ vm_exec(rb_thread_t *th) https://github.com/ruby/ruby/blob/trunk/vm.c#L1209
 	VALUE catch_iseqval;
 	rb_control_frame_t *cfp;
 	VALUE type;
+	VALUE *escape_ep;
 
 	err = th->errinfo;
 
@@ -1228,6 +1228,7 @@ vm_exec(rb_thread_t *th) https://github.com/ruby/ruby/blob/trunk/vm.c#L1228
 	cfp = th->cfp;
 	epc = cfp->pc - cfp->iseq->iseq_encoded;
 
+	escape_ep = NULL;
 	if (state == TAG_BREAK || state == TAG_RETURN) {
 	    escape_ep = GET_THROWOBJ_CATCH_POINT(err);
 

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

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