From 321a2a0920a349bdccac0bb31e3f1ca0126acdd3 Mon Sep 17 00:00:00 2001 From: ko1 Date: Mon, 13 Jul 2009 09:30:23 +0000 Subject: * vm_core.h, compile.c: declare struct iseq_inline_cache_entry. Inline cache (IC) entries are no longer GC managed object. IC entries are freed when ISeq is freed. * iseq.c: fix mark, free, memsize functions for above change. * insns.def: remove rb_gc_write_barrier(). * vm_insnhelper.c (vm_method_search): ditto. * tool/instruction.rb, template/insns_info.inc.tmpl (insn_iclen): added. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_insnhelper.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index de53d533b..ac2405442 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1180,7 +1180,7 @@ vm_getivar(VALUE obj, ID id, IC ic) VALUE klass = RBASIC(obj)->klass; if (ic->ic_class == klass) { - long index = ic->ic_vmstat; + long index = ic->ic_index; long len = ROBJECT_NUMIV(obj); VALUE *ptr = ROBJECT_IVPTR(obj); @@ -1199,8 +1199,8 @@ vm_getivar(VALUE obj, ID id, IC ic) if (index < len) { val = ptr[index]; } - ic->ic_class = CLASS_OF(obj); - ic->ic_vmstat = index; + ic->ic_class = RBASIC(obj)->klass; + ic->ic_index = index; } } } @@ -1231,8 +1231,8 @@ vm_method_search(VALUE id, VALUE klass, IC ic) } else { mn = rb_method_node(klass, id); - ic->ic_class = rb_gc_write_barrier(klass); - ic->ic_method = (NODE *)rb_gc_write_barrier((VALUE)mn); + ic->ic_class = klass; + ic->ic_method = mn; ic->ic_vmstat = GET_VM_STATE_VERSION(); } } -- cgit