From 7ea3edc409dc6d383df9bc10d0034a6ecddb84dc Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 9 Oct 2012 05:33:54 +0000 Subject: * 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 --- tool/instruction.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tool') 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' => '.', -- cgit v1.2.3