summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-09 05:33:54 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-09 05:33:54 +0000
commit7ea3edc409dc6d383df9bc10d0034a6ecddb84dc (patch)
treecafccae4237491cdb82afeaa1e07dbe330907fab /tool
parent4be0c562a4b3e1bc6f185cf8fbd636b9e8ebb7f4 (diff)
* vm_core.h (rb_call_info_t): add new type `rb_call_inf_t'.
This data structure contains information including inline method cache. After that, `struct iseq_inline_cache_entry' does not need to contain inline cache for method invocation. Other information will be added to this data structure. * vm_core.h (rb_iseq_t): add `callinfo_entries' and `callinfo_size' members to `rb_iseq_t'. * insns.def, compile.c: Use CALL_INFO instead of IC. * tool/instruction.rb: support CALL_INFO as operand type. * vm_insnhelper.c, vm_insnhelper.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-xtool/instruction.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/tool/instruction.rb b/tool/instruction.rb
index 38318a435c..6934b33e80 100755
--- a/tool/instruction.rb
+++ b/tool/instruction.rb
@@ -706,10 +706,13 @@ class RubyVM
break
end
+ # skip make operands when body has no reference to this operand
+ # TODO: really needed?
re = /\b#{var}\b/n
- if re =~ insn.body or re =~ insn.sp_inc or insn.rets.any?{|t, v| re =~ v} or re =~ 'ic'
+ if re =~ insn.body or re =~ insn.sp_inc or insn.rets.any?{|t, v| re =~ v} or re =~ 'ic' or re =~ 'ci'
ops << " #{type} #{var} = (#{type})GET_OPERAND(#{i+1});"
end
+
n += 1
}
@opn = n
@@ -938,6 +941,8 @@ class RubyVM
"TS_GENTRY"
when /^IC/
"TS_IC"
+ when /^CALL_INFO/
+ "TS_CALLINFO"
when /^\.\.\./
"TS_VARIABLE"
when /^CDHASH/
@@ -958,7 +963,8 @@ class RubyVM
'TS_VALUE' => 'V',
'TS_ID' => 'I',
'TS_GENTRY' => 'G',
- 'TS_IC' => 'C',
+ 'TS_IC' => 'K',
+ 'TS_CALLINFO' => 'C',
'TS_CDHASH' => 'H',
'TS_ISEQ' => 'S',
'TS_VARIABLE' => '.',