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:
parent
7e7d804e38
commit
4444025d16
2 changed files with 3 additions and 9 deletions
|
@ -26,9 +26,7 @@
|
||||||
}
|
}
|
||||||
%
|
%
|
||||||
% # JIT: Declare variables for operands, popped values and return values
|
% # 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|
|
% 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");
|
fprintf(f, " <%= decl %>;\n");
|
||||||
% end
|
% end
|
||||||
|
|
||||||
|
@ -63,12 +61,10 @@
|
||||||
<%= render 'mjit_compile_insn_body', locals: { insn: insn } -%>
|
<%= render 'mjit_compile_insn_body', locals: { insn: insn } -%>
|
||||||
%
|
%
|
||||||
% # JIT: Set return values
|
% # JIT: Set return values
|
||||||
% unless dispatched
|
|
||||||
% insn.rets.reverse_each.with_index do |ret, i|
|
% insn.rets.reverse_each.with_index do |ret, i|
|
||||||
% # TOPN(n) = ...
|
% # TOPN(n) = ...
|
||||||
fprintf(f, " stack[%d] = <%= ret.fetch(:name) %>;\n", b->stack_size + (int)<%= insn.call_attribute('sp_inc') %> - <%= i + 1 %>);
|
fprintf(f, " stack[%d] = <%= ret.fetch(:name) %>;\n", b->stack_size + (int)<%= insn.call_attribute('sp_inc') %> - <%= i + 1 %>);
|
||||||
% end
|
% end
|
||||||
% end
|
|
||||||
%
|
%
|
||||||
% # JIT: We should evaluate ISeq modified for TracePoint if it's enabled. Note: This is slow.
|
% # JIT: We should evaluate ISeq modified for TracePoint if it's enabled. Note: This is slow.
|
||||||
% if trace_enablable_insns.include?(insn.name)
|
% if trace_enablable_insns.include?(insn.name)
|
||||||
|
@ -82,9 +78,7 @@
|
||||||
% end
|
% end
|
||||||
%
|
%
|
||||||
% # compiler: Move JIT compiler's internal stack pointer
|
% # compiler: Move JIT compiler's internal stack pointer
|
||||||
% unless dispatched
|
|
||||||
b->stack_size += <%= insn.call_attribute('sp_inc') %>;
|
b->stack_size += <%= insn.call_attribute('sp_inc') %>;
|
||||||
% end
|
|
||||||
}
|
}
|
||||||
fprintf(f, "}\n");
|
fprintf(f, "}\n");
|
||||||
%
|
%
|
||||||
|
|
|
@ -61,7 +61,7 @@ switch (insn) {
|
||||||
% end
|
% end
|
||||||
%
|
%
|
||||||
% # Main insn implementation generated by insns.def
|
% # Main insn implementation generated by insns.def
|
||||||
<%= render 'mjit_compile_insn', locals: { insn: insn, dispatched: false } -%>
|
<%= render 'mjit_compile_insn', locals: { insn: insn } -%>
|
||||||
break;
|
break;
|
||||||
% end
|
% end
|
||||||
%
|
%
|
||||||
|
|
Loading…
Add table
Reference in a new issue