Mercurial > hg > truffle
diff src/share/vm/interpreter/interpreterRuntime.cpp @ 3938:e6b1331a51d2
7086585: make Java field injection more flexible
Reviewed-by: jrose, twisti, kvn, coleenp
author | never |
---|---|
date | Sat, 10 Sep 2011 17:29:02 -0700 |
parents | 5596e125fe4f |
children | 12d38ffcba2a |
line wrap: on
line diff
--- a/src/share/vm/interpreter/interpreterRuntime.cpp Sat Sep 10 00:11:04 2011 -0700 +++ b/src/share/vm/interpreter/interpreterRuntime.cpp Sat Sep 10 17:29:02 2011 -0700 @@ -984,11 +984,8 @@ // check the access_flags for the field in the klass instanceKlass* ik = instanceKlass::cast(java_lang_Class::as_klassOop(cp_entry->f1())); - typeArrayOop fields = ik->fields(); int index = cp_entry->field_index(); - assert(index < fields->length(), "holders field index is out of range"); - // bail out if field accesses are not watched - if ((fields->ushort_at(index) & JVM_ACC_FIELD_ACCESS_WATCHED) == 0) return; + if ((ik->field_access_flags(index) & JVM_ACC_FIELD_ACCESS_WATCHED) == 0) return; switch(cp_entry->flag_state()) { case btos: // fall through @@ -1021,11 +1018,9 @@ // check the access_flags for the field in the klass instanceKlass* ik = instanceKlass::cast(k); - typeArrayOop fields = ik->fields(); int index = cp_entry->field_index(); - assert(index < fields->length(), "holders field index is out of range"); // bail out if field modifications are not watched - if ((fields->ushort_at(index) & JVM_ACC_FIELD_MODIFICATION_WATCHED) == 0) return; + if ((ik->field_access_flags(index) & JVM_ACC_FIELD_MODIFICATION_WATCHED) == 0) return; char sig_type = '\0';