On Mon, 7 Jul 2025 16:13:08 GMT, Andrew Haley wrote:
> Neither `ScopedValue.orElse` nor `ScopedValue.orElseThrow` consult the cache
> when searching for a binding. Neither do they update the cache when a binding
> is found.
> While this issue does not affect spec compliance, it is surprising to
On Mon, 7 Jul 2025 16:13:08 GMT, Andrew Haley wrote:
> Neither `ScopedValue.orElse` nor `ScopedValue.orElseThrow` consult the cache
> when searching for a binding. Neither do they update the cache when a binding
> is found.
> While this issue does not affect spec compliance, it is surprising to
On Mon, 7 Jul 2025 16:13:08 GMT, Andrew Haley wrote:
> Neither `ScopedValue.orElse` nor `ScopedValue.orElseThrow` consult the cache
> when searching for a binding. Neither do they update the cache when a binding
> is found.
> While this issue does not affect spec compliance, it is surprising to
On Mon, 7 Jul 2025 16:33:22 GMT, Chen Liang wrote:
> Can `get` and `slowGet` be refactored to use this `findBinding` too?
Not really, no. Inlining is critical here, and `get()` is written in this way
for efficiency of generated code.
-
PR Comment: https://git.openjdk.org/jdk/pull
On Mon, 7 Jul 2025 16:13:08 GMT, Andrew Haley wrote:
> Neither `ScopedValue.orElse` nor `ScopedValue.orElseThrow` consult the cache
> when searching for a binding. Neither do they update the cache when a binding
> is found.
> While this issue does not affect spec compliance, it is surprising to
On Mon, 7 Jul 2025 16:13:08 GMT, Andrew Haley wrote:
> Neither `ScopedValue.orElse` nor `ScopedValue.orElseThrow` consult the cache
> when searching for a binding. Neither do they update the cache when a binding
> is found.
> While this issue does not affect spec compliance, it is surprising to
Neither `ScopedValue.orElse` nor `ScopedValue.orElseThrow` consult the cache
when searching for a binding. Neither do they update the cache when a binding
is found.
While this issue does not affect spec compliance, it is surprising to users
that `x.orElse(other)` should be slower than `x.isBound