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

ruby-changes:50514

From: nobu <ko1@a...>
Date: Sun, 4 Mar 2018 11:09:52 +0900 (JST)
Subject: [ruby-changes:50514] nobu:r62650 (trunk): vm.c: untangle goto loop

nobu	2018-03-04 11:09:47 +0900 (Sun, 04 Mar 2018)

  New Revision: 62650

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62650

  Log:
    vm.c: untangle goto loop
    
    * vm.c (vm_exec): moved code to get rid of cross-jumps across
      branches.

  Modified files:
    trunk/vm.c
Index: vm.c
===================================================================
--- vm.c	(revision 62649)
+++ vm.c	(revision 62650)
@@ -1807,15 +1807,7 @@ vm_exec(rb_execution_context_t *ec, int https://github.com/ruby/ruby/blob/trunk/vm.c#L1807
     if ((state = EC_EXEC_TAG()) == TAG_NONE) {
         if (mjit_enable_p)
             result = mjit_exec(ec);
-      vm_loop_start:
-        if (result == Qundef)
-            result = vm_exec_core(ec, initial);
-	VM_ASSERT(ec->tag == &_tag);
-	if ((state = _tag.state) != TAG_NONE) {
-	    err = (struct vm_throw_data *)result;
-	    _tag.state = TAG_NONE;
-	    goto exception_handler;
-	}
+	goto vm_loop_start;
     }
     else {
 	unsigned int i;
@@ -2037,6 +2029,15 @@ vm_exec(rb_execution_context_t *ec, int https://github.com/ruby/ruby/blob/trunk/vm.c#L2029
 		goto exception_handler;
 	    }
 	}
+      vm_loop_start:
+        if (result == Qundef)
+            result = vm_exec_core(ec, initial);
+	VM_ASSERT(ec->tag == &_tag);
+	if ((state = _tag.state) != TAG_NONE) {
+	    err = (struct vm_throw_data *)result;
+	    _tag.state = TAG_NONE;
+	    goto exception_handler;
+	}
     }
   finish_vme:
     EC_POP_TAG();

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

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