mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8263589: Introduce JavaValue::get_oop/set_oop
Reviewed-by: coleenp, sspitsyn
This commit is contained in:
parent
20297a1beb
commit
a1f6591f6c
26 changed files with 72 additions and 67 deletions
|
@ -121,7 +121,7 @@ void JVMCIEnv::copy_saved_properties() {
|
|||
if (HAS_PENDING_EXCEPTION) {
|
||||
JVMCIRuntime::fatal_exception(NULL, "Error calling jdk.vm.ci.services.Services.serializeSavedProperties");
|
||||
}
|
||||
oop res = (oop) result.get_jobject();
|
||||
oop res = result.get_oop();
|
||||
assert(res->is_typeArray(), "must be");
|
||||
assert(TypeArrayKlass::cast(res->klass())->element_type() == T_BYTE, "must be");
|
||||
typeArrayOop ba = typeArrayOop(res);
|
||||
|
@ -293,7 +293,7 @@ void JVMCIEnv::translate_hotspot_exception_to_jni_exception(JavaThread* THREAD,
|
|||
JVMCIRuntime::fatal_exception(this, "HotSpotJVMCIRuntime.encodeThrowable should not throw an exception");
|
||||
}
|
||||
|
||||
oop encoded_throwable_string = (oop) result.get_jobject();
|
||||
oop encoded_throwable_string = result.get_oop();
|
||||
|
||||
ResourceMark rm;
|
||||
const char* encoded_throwable_chars = java_lang_String::as_utf8_string(encoded_throwable_string);
|
||||
|
@ -677,7 +677,7 @@ JVMCIObject JVMCIEnv::call_HotSpotJVMCIRuntime_compileMethod (JVMCIObject runtim
|
|||
HotSpotJVMCI::HotSpotJVMCIRuntime::klass(),
|
||||
vmSymbols::compileMethod_name(),
|
||||
vmSymbols::compileMethod_signature(), &jargs, CHECK_(JVMCIObject()));
|
||||
return wrap((oop) result.get_jobject());
|
||||
return wrap(result.get_oop());
|
||||
} else {
|
||||
JNIAccessMark jni(this, THREAD);
|
||||
jobject result = jni()->CallNonvirtualObjectMethod(runtime.as_jobject(),
|
||||
|
@ -730,7 +730,7 @@ JVMCIObject JVMCIEnv::call_HotSpotJVMCIRuntime_runtime (JVMCIEnv* JVMCIENV) {
|
|||
JavaCallArguments jargs;
|
||||
JavaValue result(T_OBJECT);
|
||||
JavaCalls::call_static(&result, HotSpotJVMCI::HotSpotJVMCIRuntime::klass(), vmSymbols::runtime_name(), vmSymbols::runtime_signature(), &jargs, CHECK_(JVMCIObject()));
|
||||
return wrap((oop) result.get_jobject());
|
||||
return wrap(result.get_oop());
|
||||
} else {
|
||||
JNIAccessMark jni(this, THREAD);
|
||||
jobject result = jni()->CallStaticObjectMethod(JNIJVMCI::HotSpotJVMCIRuntime::clazz(), JNIJVMCI::HotSpotJVMCIRuntime::runtime_method());
|
||||
|
@ -747,7 +747,7 @@ JVMCIObject JVMCIEnv::call_JVMCI_getRuntime (JVMCIEnv* JVMCIENV) {
|
|||
JavaCallArguments jargs;
|
||||
JavaValue result(T_OBJECT);
|
||||
JavaCalls::call_static(&result, HotSpotJVMCI::JVMCI::klass(), vmSymbols::getRuntime_name(), vmSymbols::getRuntime_signature(), &jargs, CHECK_(JVMCIObject()));
|
||||
return wrap((oop) result.get_jobject());
|
||||
return wrap(result.get_oop());
|
||||
} else {
|
||||
JNIAccessMark jni(this, THREAD);
|
||||
jobject result = jni()->CallStaticObjectMethod(JNIJVMCI::JVMCI::clazz(), JNIJVMCI::JVMCI::getRuntime_method());
|
||||
|
@ -765,7 +765,7 @@ JVMCIObject JVMCIEnv::call_HotSpotJVMCIRuntime_getCompiler (JVMCIObject runtime,
|
|||
jargs.push_oop(Handle(THREAD, HotSpotJVMCI::resolve(runtime)));
|
||||
JavaValue result(T_OBJECT);
|
||||
JavaCalls::call_virtual(&result, HotSpotJVMCI::HotSpotJVMCIRuntime::klass(), vmSymbols::getCompiler_name(), vmSymbols::getCompiler_signature(), &jargs, CHECK_(JVMCIObject()));
|
||||
return wrap((oop) result.get_jobject());
|
||||
return wrap(result.get_oop());
|
||||
} else {
|
||||
JNIAccessMark jni(this, THREAD);
|
||||
jobject result = jni()->CallObjectMethod(runtime.as_jobject(), JNIJVMCI::HotSpotJVMCIRuntime::getCompiler_method());
|
||||
|
@ -787,7 +787,7 @@ JVMCIObject JVMCIEnv::call_HotSpotJVMCIRuntime_callToString(JVMCIObject object,
|
|||
HotSpotJVMCI::HotSpotJVMCIRuntime::klass(),
|
||||
vmSymbols::callToString_name(),
|
||||
vmSymbols::callToString_signature(), &jargs, CHECK_(JVMCIObject()));
|
||||
return wrap((oop) result.get_jobject());
|
||||
return wrap(result.get_oop());
|
||||
} else {
|
||||
JNIAccessMark jni(this, THREAD);
|
||||
jobject result = (jstring) jni()->CallStaticObjectMethod(JNIJVMCI::HotSpotJVMCIRuntime::clazz(),
|
||||
|
@ -812,7 +812,7 @@ JVMCIObject JVMCIEnv::call_PrimitiveConstant_forTypeChar(jchar kind, jlong value
|
|||
HotSpotJVMCI::PrimitiveConstant::klass(),
|
||||
vmSymbols::forTypeChar_name(),
|
||||
vmSymbols::forTypeChar_signature(), &jargs, CHECK_(JVMCIObject()));
|
||||
return wrap((oop) result.get_jobject());
|
||||
return wrap(result.get_oop());
|
||||
} else {
|
||||
JNIAccessMark jni(this, THREAD);
|
||||
jobject result = (jstring) jni()->CallStaticObjectMethod(JNIJVMCI::PrimitiveConstant::clazz(),
|
||||
|
@ -835,7 +835,7 @@ JVMCIObject JVMCIEnv::call_JavaConstant_forFloat(float value, JVMCI_TRAPS) {
|
|||
HotSpotJVMCI::JavaConstant::klass(),
|
||||
vmSymbols::forFloat_name(),
|
||||
vmSymbols::forFloat_signature(), &jargs, CHECK_(JVMCIObject()));
|
||||
return wrap((oop) result.get_jobject());
|
||||
return wrap(result.get_oop());
|
||||
} else {
|
||||
JNIAccessMark jni(this, THREAD);
|
||||
jobject result = (jstring) jni()->CallStaticObjectMethod(JNIJVMCI::JavaConstant::clazz(),
|
||||
|
@ -858,7 +858,7 @@ JVMCIObject JVMCIEnv::call_JavaConstant_forDouble(double value, JVMCI_TRAPS) {
|
|||
HotSpotJVMCI::JavaConstant::klass(),
|
||||
vmSymbols::forDouble_name(),
|
||||
vmSymbols::forDouble_signature(), &jargs, CHECK_(JVMCIObject()));
|
||||
return wrap((oop) result.get_jobject());
|
||||
return wrap(result.get_oop());
|
||||
} else {
|
||||
JNIAccessMark jni(this, THREAD);
|
||||
jobject result = (jstring) jni()->CallStaticObjectMethod(JNIJVMCI::JavaConstant::clazz(),
|
||||
|
@ -1046,7 +1046,7 @@ JVMCIObject JVMCIEnv::get_jvmci_method(const methodHandle& method, JVMCI_TRAPS)
|
|||
if (HAS_PENDING_EXCEPTION) {
|
||||
exception = true;
|
||||
} else {
|
||||
method_object = wrap((oop)result.get_jobject());
|
||||
method_object = wrap(result.get_oop());
|
||||
}
|
||||
} else {
|
||||
JNIAccessMark jni(this, THREAD);
|
||||
|
@ -1092,7 +1092,7 @@ JVMCIObject JVMCIEnv::get_jvmci_type(const JVMCIKlassHandle& klass, JVMCI_TRAPS)
|
|||
if (HAS_PENDING_EXCEPTION) {
|
||||
exception = true;
|
||||
} else {
|
||||
type = wrap((oop)result.get_jobject());
|
||||
type = wrap(result.get_oop());
|
||||
}
|
||||
} else {
|
||||
JNIAccessMark jni(this, THREAD);
|
||||
|
@ -1127,7 +1127,7 @@ JVMCIObject JVMCIEnv::get_jvmci_constant_pool(const constantPoolHandle& cp, JVMC
|
|||
if (HAS_PENDING_EXCEPTION) {
|
||||
exception = true;
|
||||
} else {
|
||||
cp_object = wrap((oop)result.get_jobject());
|
||||
cp_object = wrap(result.get_oop());
|
||||
}
|
||||
} else {
|
||||
JNIAccessMark jni(this, THREAD);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue