Hi Lars
At the moment, both the invokedynamic call and the bootstrap code generation is part of lambda code generation, and has no API as such, since it's specific to LambdaMetafactory. For instance, the bootstrap methods are emitted inside org.eclipse.jdt.internal.compiler.ClassFile.generateBootstrapMethods(List). It's not that pretty.
In general, JDT's top priority is remaining compatible to JLS, so I wouldn't expect us making a language extension to call indy. However, at the (internal) API level, we could probably clean up the code generation a bit, and make the bootstrap and indy calls cleaner (especially now that we have the ConstantDynamic in Java 11, which could lead the way to a number of improvements in the generated code down the road.
Hope that it explains the current situation.
-Jesper
--
Hello developers,
I was already posting to the Object Teams development mailing list [1], but got no reaction after reasonable time, so because of the similar topic I also post here. Thanks, for your understanding.
I am working with the JDT core version as of Photon branch R4_8_maintenance. I have a runtime which implements a bootstrap method (static CallSite bootstrap(…)) to be used in conjunction with invokedynamic. ObjectTeams is an extension that is deeply coupled and intermingled with the EJC and also has specific changes to the JDT core plugin. I worked already all my changes into the compiler. However, it currently just calls the bootstrap method as static method. I want it to be treated as invokedynamic callsite. Looking into the JDT how such a callsite is created (i.e., in CodeStream class etc) I just find references w.r.t. lambdas.
Is there any facility in the JDT already in place to create invokedynamic callsites? Maybe you can point me to the right JDT API to generate an invokedynamic from the MessageSend?
Best regards, Lars Schütze
- - M.Sc. Lars Schütze Research Assistant
Technische Universität Dresden Chair for Compiler Construction
_______________________________________________ jdt-core-dev mailing list jdt-core-dev@xxxxxxxxxxxTo change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jdt-core-dev
|