mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-06 22:20:47 +00:00
8277310: ciReplay: @cpi MethodHandle references not resolved
Reviewed-by: chagedorn, thartmann
This commit is contained in:
parent
262d07001b
commit
8881f29bc8
@ -436,7 +436,7 @@ class CompileReplay : public StackObj {
|
||||
} else if (strcmp(dyno_ref, "<bsm>") == 0) {
|
||||
int pool_index = cp_cache_entry->constant_pool_index();
|
||||
BootstrapInfo bootstrap_specifier(cp, pool_index, index);
|
||||
obj = cp->resolve_possibly_cached_constant_at(bootstrap_specifier.bsm_index(), thread);
|
||||
obj = cp->resolve_possibly_cached_constant_at(bootstrap_specifier.bsm_index(), CHECK_NULL);
|
||||
} else {
|
||||
report_error("unrecognized token");
|
||||
return NULL;
|
||||
@ -465,58 +465,57 @@ class CompileReplay : public StackObj {
|
||||
report_error("no method handle found at cpi");
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
bool found_it;
|
||||
ik->link_class(CHECK_NULL);
|
||||
obj = cp->find_cached_constant_at(cpi, found_it, thread);
|
||||
}
|
||||
ik->link_class(CHECK_NULL);
|
||||
obj = cp->resolve_possibly_cached_constant_at(cpi, CHECK_NULL);
|
||||
}
|
||||
if (obj == NULL) {
|
||||
report_error("null cp object found");
|
||||
return NULL;
|
||||
}
|
||||
Klass* k = NULL;
|
||||
if (obj != NULL) {
|
||||
skip_ws();
|
||||
// loop: read fields
|
||||
char* field = NULL;
|
||||
do {
|
||||
field = parse_string();
|
||||
if (field == NULL) {
|
||||
report_error("no field found");
|
||||
return NULL;
|
||||
}
|
||||
if (strcmp(field, ";") == 0) {
|
||||
break;
|
||||
}
|
||||
// raw Method*
|
||||
if (strcmp(field, "<vmtarget>") == 0) {
|
||||
Method* vmtarget = java_lang_invoke_MemberName::vmtarget(obj);
|
||||
k = (vmtarget == NULL) ? NULL : vmtarget->method_holder();
|
||||
if (k == NULL) {
|
||||
report_error("null vmtarget found");
|
||||
return NULL;
|
||||
}
|
||||
if (!parse_terminator()) {
|
||||
report_error("missing terminator");
|
||||
return NULL;
|
||||
}
|
||||
return k;
|
||||
}
|
||||
obj = ciReplay::obj_field(obj, field);
|
||||
// array
|
||||
if (obj != NULL && obj->is_objArray()) {
|
||||
objArrayOop arr = (objArrayOop)obj;
|
||||
int index = parse_int("index");
|
||||
if (index >= arr->length()) {
|
||||
report_error("bad array index");
|
||||
return NULL;
|
||||
}
|
||||
obj = arr->obj_at(index);
|
||||
}
|
||||
} while (obj != NULL);
|
||||
if (obj == NULL) {
|
||||
report_error("null field found");
|
||||
skip_ws();
|
||||
// loop: read fields
|
||||
char* field = NULL;
|
||||
do {
|
||||
field = parse_string();
|
||||
if (field == NULL) {
|
||||
report_error("no field found");
|
||||
return NULL;
|
||||
}
|
||||
k = obj->klass();
|
||||
if (strcmp(field, ";") == 0) {
|
||||
break;
|
||||
}
|
||||
// raw Method*
|
||||
if (strcmp(field, "<vmtarget>") == 0) {
|
||||
Method* vmtarget = java_lang_invoke_MemberName::vmtarget(obj);
|
||||
k = (vmtarget == NULL) ? NULL : vmtarget->method_holder();
|
||||
if (k == NULL) {
|
||||
report_error("null vmtarget found");
|
||||
return NULL;
|
||||
}
|
||||
if (!parse_terminator()) {
|
||||
report_error("missing terminator");
|
||||
return NULL;
|
||||
}
|
||||
return k;
|
||||
}
|
||||
obj = ciReplay::obj_field(obj, field);
|
||||
// array
|
||||
if (obj != NULL && obj->is_objArray()) {
|
||||
objArrayOop arr = (objArrayOop)obj;
|
||||
int index = parse_int("index");
|
||||
if (index >= arr->length()) {
|
||||
report_error("bad array index");
|
||||
return NULL;
|
||||
}
|
||||
obj = arr->obj_at(index);
|
||||
}
|
||||
} while (obj != NULL);
|
||||
if (obj == NULL) {
|
||||
report_error("null field found");
|
||||
return NULL;
|
||||
}
|
||||
k = obj->klass();
|
||||
return k;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user