diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-31 05:00:41 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-31 05:00:41 +0000 |
commit | 971f965da9a9f8f7cea9bead6c883e79dfc5b715 (patch) | |
tree | 21af7e1ce229cd9327d4a2d40ee9399f42051c61 /tool/ruby_vm | |
parent | 72e318f118d5cfde0e66a41acd3a2070fcaf4348 (diff) |
_insn_len_info.erb: add ASSERT_VM_INSTRUCTION_SIZE
Also previous rb_vm_insn_len_info is now a function static variable.
It seems nobody else is using it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/ruby_vm')
-rw-r--r-- | tool/ruby_vm/views/_insn_len_info.erb | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/tool/ruby_vm/views/_insn_len_info.erb b/tool/ruby_vm/views/_insn_len_info.erb index cc5889646d..b292f42fb5 100644 --- a/tool/ruby_vm/views/_insn_len_info.erb +++ b/tool/ruby_vm/views/_insn_len_info.erb @@ -6,18 +6,16 @@ %# conditions mentioned in the file COPYING are met. Consult the file for %# details. CONSTFUNC(MAYBE_UNUSED(static int insn_len(VALUE insn))); -extern const char rb_vm_insn_len_info[]; - -#ifdef RUBY_VM_INSNS_INFO -const char rb_vm_insn_len_info[] = { -% RubyVM::Instructions.each_slice 25 do |a| - <%= a.map(&:width).join(', ') -%>, -% end -}; -#endif int insn_len(VALUE i) { - return rb_vm_insn_len_info[i]; + static const char t[] = { +% RubyVM::Instructions.each_slice 23 do |a| + <%= a.map(&:width).join(', ') -%>, +% end + }; + + ASSERT_VM_INSTRUCTION_SIZE(t); + return t[i]; } |