[code-reflection] RFR: BytecodeGenerator support of lambdas [v4]

Chen Liang liach at openjdk.org
Fri Apr 12 17:40:02 UTC 2024


On Fri, 12 Apr 2024 07:11:12 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/reflect/code/bytecode/BytecodeGenerator.java line 107:
>> 
>>> 105:         MethodHandles.Lookup hcl;
>>> 106:         try {
>>> 107:             hcl = l.in(l.defineClass(classBytes));
>> 
>> That's frustrating! but thankfully its easy to work around it
>
> Yes, unfortunately hidden classes have some frustrating restrictions.

What's the problem here? I recall LambdaMetafactory is designed with hidden class support in mind, that it generates compatible class names if possible.

Since hidden classes allow duplicate names (as it is defined with random suffix), does this break existing usages?

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

PR Review Comment: https://git.openjdk.org/babylon/pull/48#discussion_r1562929402


More information about the babylon-dev mailing list