mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
7086585: make Java field injection more flexible
Reviewed-by: jrose, twisti, kvn, coleenp
This commit is contained in:
parent
1ebca30d26
commit
e39ba1a5fe
39 changed files with 1073 additions and 991 deletions
|
@ -984,11 +984,8 @@ ConstantPoolCacheEntry *cp_entry))
|
|||
// 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 @@ IRT_ENTRY(void, InterpreterRuntime::post_field_modification(JavaThread *thread,
|
|||
|
||||
// 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';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue