From 4738569f623cea3c41f4d75ef9ac5e9fc04966bd Mon Sep 17 00:00:00 2001 From: Tomas Zezula Date: Thu, 25 Jul 2024 12:30:20 +0200 Subject: [PATCH] Improved getJObjectValue ducumentation. --- .../classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java index af38908359bfa..3fd92f8dee5df 100644 --- a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java +++ b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java @@ -927,8 +927,10 @@ JavaType lookupTypeInternal(String name, HotSpotResolvedObjectType accessingType /** * Gets the {@code jobject} value wrapped by {@code peerObject}. The returned value is * a JNI local reference whose lifetime is scoped by the nearest Java caller (from - * HotSpot's perspective). The current thread's state must be {@code _thread_in_native}. - * A call from the JVMCI shared library (e.g. libgraal) is in such a state. + * HotSpot's perspective). You can use {@code PushLocalFrame} and {@code PopLocalFrame} to + * shorten the lifetime of the reference. The current thread's state must be + * {@code _thread_in_native}. A call from the JVMCI shared library (e.g. libgraal) is in such + * a state. * * @param peerObject a reference to an object in the HotSpot heap * @return the {@code jobject} value unpacked from {@code peerObject}