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

Make leaf const in VM generator

Assigning to `leaf` in insns.def would give undesirable results.
This commit is contained in:
Alan Wu 2021-12-05 11:02:55 -05:00
parent 26e4887eed
commit a785e6c356

View file

@ -24,7 +24,7 @@ INSN_ENTRY(<%= insn.name %>)
<%= ope[:decl] %> = (<%= ope[:type] %>)GET_OPERAND(<%= i + 1 %>);
% end
# define INSN_ATTR(x) <%= insn.call_attribute(' ## x ## ') %>
bool leaf = INSN_ATTR(leaf);
const bool leaf = INSN_ATTR(leaf);
% insn.pops.reverse_each.with_index.reverse_each do |pop, i|
<%= pop[:decl] %> = <%= insn.cast_from_VALUE pop, "TOPN(#{i})"%>;
% end