From 3c4f49c814a2b5c6006f4e42ee5ed032e1454bc0 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Wed, 9 May 2018 13:09:01 +0000 Subject: _mjit_compile_pc_and_sp.erb: revert r63360 Revert "_mjit_compile_pc_and_sp.erb: make sure no uninitialized" This triggered some `NoMethodError`s which seem to be caused by the commit like: https://travis-ci.org/k0kubun/mjit-test/builds/376416934 I'll add tests and fix it later... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tool') diff --git a/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb b/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb index 26037e1191..084a3dd6c8 100644 --- a/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb +++ b/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb @@ -20,11 +20,12 @@ % # 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); } -- cgit v1.2.3