[code-reflection] RFR: Lambda model uniqueness [v4]
Maurizio Cimadamore
mcimadamore at openjdk.org
Tue May 6 10:52:35 UTC 2025
On Sun, 4 May 2025 13:49:46 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:
>> Lambdas that share the same proxy class, have the same implementation and therefore have the same code model generated by the compiler. In this PR, we share the code model across instances of the same proxy class.
>> This also means we reduce execution time as we only need to invoke `opMethod` once for given proxy class.
>> With these changes we can compare lambda code model based on identity.
>
> Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision:
>
> Create Quoted object lazily
src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java line 402:
> 400: public void accept(CodeBuilder cob) {
> 401: if (factoryType.parameterCount() == 0 && disableEagerInitialization) {
> 402: ClassDesc lambdaTypeDescriptor = classDesc(factoryType.returnType());
This bit of code seems to be the same as the one in `generateClassInitializer` -- which is now no longer used?
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/420#discussion_r2075209858
More information about the babylon-dev
mailing list