diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-25 14:15:26 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-25 14:15:26 +0000 |
commit | 4444025d16ae1a586eee6a0ac9bdd09e33833f3c (patch) | |
tree | 06600ffaad4754a03cb5c67008332c9655d147f3 /tool/ruby_vm | |
parent | 7e7d804e38efaff4a9d77cff52e2a6f892205ea0 (diff) | |
download | ruby-4444025d16ae1a586eee6a0ac9bdd09e33833f3c.tar.gz |
mjit_compile.inc.erb: drop unnecessary variable
It never becomes `dispatched: true` with the current code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/ruby_vm')
-rw-r--r-- | tool/ruby_vm/views/_mjit_compile_insn.erb | 10 | ||||
-rw-r--r-- | tool/ruby_vm/views/mjit_compile.inc.erb | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/tool/ruby_vm/views/_mjit_compile_insn.erb b/tool/ruby_vm/views/_mjit_compile_insn.erb index b3c663441d..e0955687cc 100644 --- a/tool/ruby_vm/views/_mjit_compile_insn.erb +++ b/tool/ruby_vm/views/_mjit_compile_insn.erb @@ -26,9 +26,7 @@ } % % # JIT: Declare variables for operands, popped values and return values -% ret_decls = insn.rets.map { |r| "MAYBE_UNUSED(#{r.fetch(:type)}) #{r.fetch(:name)}"} # TODO: fix #declarations to return Hash... % insn.declarations.each do |decl| -% next if dispatched && ret_decls.include?(decl) # return value should be propagated to dispatcher. TODO: assert it's the same as dispatcher fprintf(f, " <%= decl %>;\n"); % end @@ -63,11 +61,9 @@ <%= render 'mjit_compile_insn_body', locals: { insn: insn } -%> % % # JIT: Set return values -% unless dispatched -% insn.rets.reverse_each.with_index do |ret, i| -% # TOPN(n) = ... +% insn.rets.reverse_each.with_index do |ret, i| +% # TOPN(n) = ... fprintf(f, " stack[%d] = <%= ret.fetch(:name) %>;\n", b->stack_size + (int)<%= insn.call_attribute('sp_inc') %> - <%= i + 1 %>); -% end % end % % # JIT: We should evaluate ISeq modified for TracePoint if it's enabled. Note: This is slow. @@ -82,9 +78,7 @@ % end % % # compiler: Move JIT compiler's internal stack pointer -% unless dispatched b->stack_size += <%= insn.call_attribute('sp_inc') %>; -% end } fprintf(f, "}\n"); % diff --git a/tool/ruby_vm/views/mjit_compile.inc.erb b/tool/ruby_vm/views/mjit_compile.inc.erb index 9b74cebee1..ee29693894 100644 --- a/tool/ruby_vm/views/mjit_compile.inc.erb +++ b/tool/ruby_vm/views/mjit_compile.inc.erb @@ -61,7 +61,7 @@ switch (insn) { % end % % # Main insn implementation generated by insns.def -<%= render 'mjit_compile_insn', locals: { insn: insn, dispatched: false } -%> +<%= render 'mjit_compile_insn', locals: { insn: insn } -%> break; % end % |