diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-24 17:06:15 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-24 17:06:15 +0000 |
commit | d3f73f45d8342e37a814eeb8c98e1d04f451a3b4 (patch) | |
tree | d871b6a106c9320604d208b3c3d49616496dffbb /iseq.c | |
parent | ee43611393834f0e10aa982831698a11c3c9ced4 (diff) |
* insns.def: Change the operand type of setinlinecache
(OFFSET to IC). This IC must be same as corresponding
getinlinecache instruction's IC operand.
This change is for a little performance improvement
(getting IC directly) and is for the AOT compilation development.
* compile.c, iseq.c, insns.def: Change the approach to handling inline
cahce (IC) type operand to enable the above change.
This change also affects ISeq#to_a method. The inline cache operand
will be dumped by fixnum, the index of inline cache, in other words,
inline cache identity.
* template/insns_info.inc.tmpl, tool/instruction.rb: No need to count
inline cache size (insn_iclen()).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -797,7 +797,7 @@ insn_operand_intern(rb_iseq_t *iseq, break; case TS_IC: - ret = rb_str_new2("<ic>"); + ret = rb_sprintf("<ic:%d>", (struct iseq_inline_cache_entry *)op - iseq->ic_entries); break; case TS_CDHASH: @@ -1228,8 +1228,10 @@ iseq_data_to_ary(rb_iseq_t *iseq) rb_ary_push(ary, ID2SYM(entry->id)); } break; - case TS_IC: - rb_ary_push(ary, Qnil); + case TS_IC: { + struct iseq_inline_cache_entry *ic = (struct iseq_inline_cache_entry *)*seq; + rb_ary_push(ary, INT2FIX(ic - iseq->ic_entries)); + } break; case TS_ID: rb_ary_push(ary, ID2SYM(*seq)); |