summaryrefslogtreecommitdiff
path: root/tool/instruction.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/instruction.rb')
-rw-r--r--tool/instruction.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/instruction.rb b/tool/instruction.rb
index fd8c0f0..4612e7e 100644
--- a/tool/instruction.rb
+++ b/tool/instruction.rb
@@ -1139,7 +1139,7 @@ module RubyVM
uni_insn, uni_insns = *unif
uni_insns = uni_insns[1..-1]
- unif_insns_each << "static int UNIFIED_#{insn.name}_#{i}[] = {" +
+ unif_insns_each << "static const int UNIFIED_#{insn.name}_#{i}[] = {" +
" BIN(#{uni_insn.name}), #{uni_insns.size + 2}, \n " +
uni_insns.map{|e| "BIN(#{e.name})"}.join(", ") + "};\n"
}
@@ -1147,14 +1147,14 @@ module RubyVM
end
if size > 0
- unif_insns << "static int *UNIFIED_#{insn.name}[] = {(int *)#{size+1}, \n"
+ unif_insns << "static const int *const UNIFIED_#{insn.name}[] = {(int *)#{size+1}, \n"
unif_insns << (0...size).map{|e| " UNIFIED_#{insn.name}_#{e}"}.join(",\n") + "};\n"
unif_insns_data << " UNIFIED_#{insn.name}"
else
unif_insns_data << " 0"
end
}
- unif_insns_data = "static int **unified_insns_data[] = {\n" +
+ unif_insns_data = "static const int *const *const unified_insns_data[] = {\n" +
unif_insns_data.join(",\n") + "};\n"
ERB.new(vpath.read('template/optunifs.inc.tmpl')).result(binding)
end