summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-03 00:00:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-03 00:00:48 +0000
commit5c1926ac82b9a9c20b2ea7f7707622b4d8dc3ecc (patch)
treeebc886bfd59fd110056603ca64277fc80f0d6204 /tool
parent48206485212c2ba0d18b44a2afa34c483bed3c05 (diff)
* compile.c (iseq_set_sequence, iseq_insns_unification,
insn_data_to_s_detail): constified. * iseq.c (insn_operand_intern, ruby_iseq_disasm_insn): ditto. * template/{insns_info,opt_sc,optunifs}.inc.tmpl: ditto. * tool/instruction.rb (OptUnifsIncGenerator): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-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