RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator)

Dean Long dlong at openjdk.org
Tue Nov 15 14:20:47 UTC 2022


On Wed, 2 Nov 2022 16:23:34 GMT, Andrew Haley <aph at openjdk.org> wrote:

> JEP 429 implementation.

src/hotspot/share/prims/jvm.cpp line 1410:

> 1408:       loc = 3;
> 1409:     } else if (method == resolver.thread_run_method) {
> 1410:       loc = 2;

This depends on how javac numbers locals, right?  It seems a bit fragile.  This is one of the reasons why doPrivileged uses the helper method executePrivileged, so the locals are arguments, giving them predictable offsets.

src/java.base/share/classes/jdk/internal/vm/ScopedValueContainer.java line 53:

> 51:     /**
> 52:      * Returns the "latest" ScopedValueContainer for the current Thread. This may be on
> 53:      * the current thread's scope task or ma require walking up the tree to find it.

Suggestion:

     * the current thread's scope task or may require walking up the tree to find it.

-------------

PR: https://git.openjdk.org/jdk/pull/10952


More information about the hotspot-dev mailing list