On Thu, 13 Jun 2024 09:27:44 GMT, Claes Redestad <[email protected]> wrote:
>> src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java line 616:
>>
>>> 614: final ClassDesc classDesc = ClassDesc.of(className0);
>>> 615: final ClassDesc superClassDesc =
>>> classDesc(speciesData.deriveSuperClass());
>>> 616: return ClassFile.of().build(classDesc, clb -> {
>>
>> We need a confirmation here that these BMH species are only initialized
>> after LMF is ready. @cl4es Is a dependency on LMF from BMH safe?
>
> LMF will BMH and `ClassSpecializer`, but does not call into this code
> normally as the simple bound method handle needed by LMF is statically
> defined (`BoundMethodHandle.Species_L`). To be perfectly safe - and to keep
> lambda/indy/condy bootstrap overheads to a minumum - I'll continue
> recommending the desugaring of lambdas in java.lang.invoke
It results in not very nice code, but makes sense.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17108#discussion_r1642653369