From db1e99cdad846fd2bab426ae0cc39c7321fae427 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 16 Oct 2012 17:07:23 +0000 Subject: * vm_insnhelper.c (vm_getivar, vm_setivar): support index inline cache with rb_call_info_t to speedup `attr' getter and setter. Cached index is stored in rb_call_info_t::aux::index. `index' == 0 means not cached. `index' > 0 means cached and cached index is `index - 1'. * insns.def ((get|set)instancevariable): use new wrapper functions vm_(get|set)instancevariable() defined in vm_insnhelper.c. * vm_core.h (rb_call_info_t::aux): introduce new union data because opt_pc can share with index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- insns.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'insns.def') diff --git a/insns.def b/insns.def index 19218d66c8..2f5d5d5508 100644 --- a/insns.def +++ b/insns.def @@ -126,7 +126,7 @@ getinstancevariable () (VALUE val) { - val = vm_getivar(GET_SELF(), id, ic); + val = vm_getinstancevariable(GET_SELF(), id, ic); } /** @@ -141,7 +141,7 @@ setinstancevariable (VALUE val) () { - vm_setivar(GET_SELF(), id, val, ic); + vm_setinstancevariable(GET_SELF(), id, val, ic); } /** -- cgit v1.2.3