On Tue, 26 May 2026 12:12:58 GMT, Jorn Vernee <[email protected]> wrote:
>> src/java.base/share/classes/jdk/internal/lang/LazyConstantImpl.java line 96:
>>
>>> 94: final Object cf = computingFunctionOrExceptionType;
>>> 95: // Don't use pattern matching here in order to improve
>>> startup time.
>>> 96: if (cf instanceof Supplier<?> computingFunction) {
>>
>> But here you do use pattern matching for instanceof...
>
> Pattern matching `instanceof` is lowered directly into byte code by javac, it
> doesn't need bootstrapping like the `switch` variant does.
I understand that. But comment says just "pattern matching". Not "switch
pattern matching". That's confusing.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31275#discussion_r3303636544