diff options
author | Alan Wu <[email protected]> | 2021-12-05 11:02:55 -0500 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-12-05 11:06:05 -0500 |
commit | a785e6c356850ce097c8403df4c59c6a77df9bcc (patch) | |
tree | d8a76fd85cf2a1217723704882270a00959777ca /tool/ruby_vm/views | |
parent | 26e4887eed99e11710c9ed2f7c544c7b3d99341e (diff) |
Make `leaf` const in VM generator
Assigning to `leaf` in insns.def would give undesirable results.
Diffstat (limited to 'tool/ruby_vm/views')
-rw-r--r-- | tool/ruby_vm/views/_insn_entry.erb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/ruby_vm/views/_insn_entry.erb b/tool/ruby_vm/views/_insn_entry.erb index bdd0fa3c7c..f34afddb1f 100644 --- a/tool/ruby_vm/views/_insn_entry.erb +++ b/tool/ruby_vm/views/_insn_entry.erb @@ -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 |