8263589: Introduce JavaValue::get_oop/set_oop

Reviewed-by: coleenp, sspitsyn
This commit is contained in:
Stefan Karlsson 2021-03-16 08:29:11 +00:00
parent 20297a1beb
commit a1f6591f6c
26 changed files with 72 additions and 67 deletions

View file

@ -1045,7 +1045,7 @@ C2V_VMENTRY_NULL(jobject, executeHotSpotNmethod, (JNIEnv* env, jobject, jobject
if (jap.return_type() == T_VOID) {
return NULL;
} else if (is_reference_type(jap.return_type())) {
return JNIHandles::make_local(THREAD, (oop) result.get_jobject());
return JNIHandles::make_local(THREAD, result.get_oop());
} else {
jvalue *value = (jvalue *) result.get_value_addr();
// Narrow the value down if required (Important on big endian machines)
@ -1329,8 +1329,8 @@ C2V_VMENTRY_NULL(jobject, iterateFrames, (JNIEnv* env, jobject compilerToVM, job
JavaCallArguments args(visitor);
args.push_oop(frame_reference);
call_interface(&result, HotSpotJVMCI::InspectedFrameVisitor::klass(), vmSymbols::visitFrame_name(), vmSymbols::visitFrame_signature(), &args, CHECK_NULL);
if (result.get_jobject() != NULL) {
return JNIHandles::make_local(thread, (oop) result.get_jobject());
if (result.get_oop() != NULL) {
return JNIHandles::make_local(thread, result.get_oop());
}
assert(initialSkip == 0, "There should be no match before initialSkip == 0");
if (HotSpotJVMCI::HotSpotStackFrameReference::objectsMaterialized(JVMCIENV, frame_reference()) == JNI_TRUE) {
@ -1832,7 +1832,7 @@ C2V_VMENTRY_NULL(jobject, boxPrimitive, (JNIEnv* env, jobject, jobject object))
box_klass,
vmSymbols::valueOf_name(),
box_signature, &jargs, CHECK_NULL);
oop hotspot_box = (oop) box_result.get_jobject();
oop hotspot_box = box_result.get_oop();
JVMCIObject result = JVMCIENV->get_object_constant(hotspot_box, false);
return JVMCIENV->get_jobject(result);
C2V_END