summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <alanwu@ruby-lang.org>2021-12-05 11:02:55 -0500
committerAlan Wu <alanwu@ruby-lang.org>2021-12-05 11:06:05 -0500
commita785e6c356850ce097c8403df4c59c6a77df9bcc (patch)
treed8a76fd85cf2a1217723704882270a00959777ca
parent26e4887eed99e11710c9ed2f7c544c7b3d99341e (diff)
Make `leaf` const in VM generator
Assigning to `leaf` in insns.def would give undesirable results.
-rw-r--r--tool/ruby_vm/views/_insn_entry.erb2
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