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

ruby-changes:51177

From: k0kubun <ko1@a...>
Date: Thu, 10 May 2018 02:19:28 +0900 (JST)
Subject: [ruby-changes:51177] k0kubun:r63384 (trunk): _mjit_compile_pc_and_sp: re-commit r63360

k0kubun	2018-05-10 02:19:23 +0900 (Thu, 10 May 2018)

  New Revision: 63384

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

  Log:
    _mjit_compile_pc_and_sp: re-commit r63360
    
    reverting r63379 (revert of r63360).
    
    The cause of error seems to be r63350. See r63382.

  Modified files:
    trunk/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb
Index: tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb
===================================================================
--- tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb	(revision 63383)
+++ tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb	(revision 63384)
@@ -20,12 +20,11 @@ https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb#L20
 % # sp motion is optimized away for `handles_frame? #=> false` case.
 % # Thus sp should be set properly before `goto cancel`.
 % if insn.handles_frame?
-            fprintf(f, "    reg_cfp->sp = (VALUE *)reg_cfp->bp + stack_size + 1 - <%= insn.pops.size %>;\n"); /* POPN(INSN_ATTR(popn)); */
-%
 %           # JIT-only behavior (pushing JIT's local variables to VM's stack):
             {
                 rb_snum_t i, push_size;
                 push_size = -<%= insn.call_attribute('sp_inc') %> + <%= insn.rets.size %> - <%= insn.pops.size %>;
+                fprintf(f, "    reg_cfp->sp = (VALUE *)reg_cfp->bp + %ld + 1;\n", push_size); /* POPN(INSN_ATTR(popn)); */
                 for (i = 0; i < push_size; i++) { /* TODO: use memcpy? */
                     fprintf(f, "    *(reg_cfp->sp + %ld) = stack[%ld];\n", i - push_size, (rb_snum_t)b->stack_size - push_size + i);
                 }

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

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