ruby-changes:50517
From: nobu <ko1@a...>
Date: Sun, 4 Mar 2018 15:24:42 +0900 (JST)
Subject: [ruby-changes:50517] nobu:r62653 (trunk): vm.c: trivial optimization
nobu 2018-03-04 15:24:38 +0900 (Sun, 04 Mar 2018) New Revision: 62653 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62653 Log: vm.c: trivial optimization Modified files: trunk/vm.c Index: vm.c =================================================================== --- vm.c (revision 62652) +++ vm.c (revision 62653) @@ -1808,8 +1808,8 @@ vm_exec(rb_execution_context_t *ec, int https://github.com/ruby/ruby/blob/trunk/vm.c#L1808 _tag.retval = Qnil; if ((state = EC_EXEC_TAG()) == TAG_NONE) { - if (mjit_enable_p) - result = mjit_exec(ec); + if (!mjit_enable_p || (result = mjit_exec(ec)) == Qundef) + result = vm_exec_core(ec, initial); goto vm_loop_start; /* fallback to the VM */ } else { @@ -1817,9 +1817,8 @@ vm_exec(rb_execution_context_t *ec, int https://github.com/ruby/ruby/blob/trunk/vm.c#L1817 rb_ec_raised_reset(ec, RAISED_STACKOVERFLOW); while ((result = handle_exception(ec, state, result, &initial)) == Qundef) { /* caught a jump, exec the handler */ + result = vm_exec_core(ec, initial); vm_loop_start: - if (result == Qundef) - result = vm_exec_core(ec, initial); VM_ASSERT(ec->tag == &_tag); /* when caught `throw`, `tag.state` is set. */ if ((state = _tag.state) == TAG_NONE) break; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/