summaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-13 09:30:23 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-13 09:30:23 +0000
commit321a2a0920a349bdccac0bb31e3f1ca0126acdd3 (patch)
tree4a46ed32d9918e8fdbf3d63cdda79a6526032b5b /vm_insnhelper.c
parent2b1ca5addb362954f5009995b37147e95d5a328f (diff)
downloadruby-321a2a0920a349bdccac0bb31e3f1ca0126acdd3.tar.gz
ruby-321a2a0920a349bdccac0bb31e3f1ca0126acdd3.tar.xz
ruby-321a2a0920a349bdccac0bb31e3f1ca0126acdd3.zip
* 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
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c10
1 files changed, 5 insertions, 5 deletions
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();
}
}