mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merges r32347 from trunk into ruby_1_9_2.
-- * vm_insnhelper.c (vm_getivar): check vm state version to invalidate inline chache (ivar index). fixes Bug #4926. * vm_insnhelper.c (vm_setivar): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@34429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
eb40744739
commit
83b5388b25
3 changed files with 15 additions and 3 deletions
|
|
@ -1,3 +1,11 @@
|
||||||
|
Fri Jul 1 08:21:28 2011 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* vm_insnhelper.c (vm_getivar): check vm state version
|
||||||
|
to invalidate inline chache (ivar index).
|
||||||
|
fixes Bug #4926.
|
||||||
|
|
||||||
|
* vm_insnhelper.c (vm_setivar): ditto.
|
||||||
|
|
||||||
Wed Feb 1 09:50:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Feb 1 09:50:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* doc/re.rdoc (Repetition): fix typo. reported by Ori Avtalion
|
* doc/re.rdoc (Repetition): fix typo. reported by Ori Avtalion
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#define RUBY_VERSION "1.9.2"
|
#define RUBY_VERSION "1.9.2"
|
||||||
#define RUBY_PATCHLEVEL 313
|
#define RUBY_PATCHLEVEL 314
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
#define RUBY_VERSION_MINOR 9
|
#define RUBY_VERSION_MINOR 9
|
||||||
#define RUBY_VERSION_TEENY 1
|
#define RUBY_VERSION_TEENY 1
|
||||||
|
|
|
||||||
|
|
@ -1255,7 +1255,8 @@ vm_getivar(VALUE obj, ID id, IC ic)
|
||||||
VALUE val = Qundef;
|
VALUE val = Qundef;
|
||||||
VALUE klass = RBASIC(obj)->klass;
|
VALUE klass = RBASIC(obj)->klass;
|
||||||
|
|
||||||
if (ic->ic_class == klass) {
|
if (LIKELY(ic->ic_class == klass &&
|
||||||
|
ic->ic_vmstat == GET_VM_STATE_VERSION())) {
|
||||||
long index = ic->ic_value.index;
|
long index = ic->ic_value.index;
|
||||||
long len = ROBJECT_NUMIV(obj);
|
long len = ROBJECT_NUMIV(obj);
|
||||||
VALUE *ptr = ROBJECT_IVPTR(obj);
|
VALUE *ptr = ROBJECT_IVPTR(obj);
|
||||||
|
|
@ -1277,6 +1278,7 @@ vm_getivar(VALUE obj, ID id, IC ic)
|
||||||
}
|
}
|
||||||
ic->ic_class = klass;
|
ic->ic_class = klass;
|
||||||
ic->ic_value.index = index;
|
ic->ic_value.index = index;
|
||||||
|
ic->ic_vmstat = GET_VM_STATE_VERSION();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1309,7 +1311,8 @@ vm_setivar(VALUE obj, ID id, VALUE val, IC ic)
|
||||||
VALUE klass = RBASIC(obj)->klass;
|
VALUE klass = RBASIC(obj)->klass;
|
||||||
st_data_t index;
|
st_data_t index;
|
||||||
|
|
||||||
if (ic->ic_class == klass) {
|
if (LIKELY(ic->ic_class == klass &&
|
||||||
|
ic->ic_vmstat == GET_VM_STATE_VERSION())) {
|
||||||
long index = ic->ic_value.index;
|
long index = ic->ic_value.index;
|
||||||
long len = ROBJECT_NUMIV(obj);
|
long len = ROBJECT_NUMIV(obj);
|
||||||
VALUE *ptr = ROBJECT_IVPTR(obj);
|
VALUE *ptr = ROBJECT_IVPTR(obj);
|
||||||
|
|
@ -1325,6 +1328,7 @@ vm_setivar(VALUE obj, ID id, VALUE val, IC ic)
|
||||||
if (iv_index_tbl && st_lookup(iv_index_tbl, (st_data_t)id, &index)) {
|
if (iv_index_tbl && st_lookup(iv_index_tbl, (st_data_t)id, &index)) {
|
||||||
ic->ic_class = klass;
|
ic->ic_class = klass;
|
||||||
ic->ic_value.index = index;
|
ic->ic_value.index = index;
|
||||||
|
ic->ic_vmstat = GET_VM_STATE_VERSION();
|
||||||
}
|
}
|
||||||
/* fall through */
|
/* fall through */
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue