1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
k0kubun 2018-06-25 14:15:26 +00:00
parent 7e7d804e38
commit 4444025d16
2 changed files with 3 additions and 9 deletions

View file

@ -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,12 +61,10 @@
<%= 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) = ...
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.
% if trace_enablable_insns.include?(insn.name)
@ -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");
%

View file

@ -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
%