New JEP: Javac intrinsics for LDC and INVOKEDYNAMIC

Brian Goetz brian.goetz at
Tue Apr 11 18:57:18 UTC 2017

> Nor any class initialization (thereby in some cases, at least in JDK allowing us the possibility circumvent bootstrap issues, that’s my hope...).

Indeed.  We hope this will take some pressure off of bootstrapping.

> Perhaps mention that it will not be possible to reflectively invoke (via MethodHandles or Method) the compiler intrinsic methods? and the sig-poly is not a runtime sig-poly (as in the internal @MethodHandle.PolymorphicSignature), just the compile time behaviour bit.

Yes.  Added to JEP.

> There is definitely some scope to improving the ease of use for those that want to refer explicit to say Class rather than ClassConstant. Might be worth a quick mention without getting the paint and brushes out. I suspect it in some cases a CE could be extended to that returned from a Intrinics.lcd call (if javac can track it within the compilation unit), although that probably has less value.

There's room to use target-typing on Class literals to allow them to 
both have a standalone type of Class but target-typing could allow them 
to represent a ClassConstant.  This has the potential to streamline the 
use a lot, but we haven't worked out all the details.

> I would be inclined to make a stronger statement about a new language syntax (as in your reply to Remi), if we ain’t gonna do it, let’s say so, and if someone else comes up with a brilliant idea we can pivot. Also i think it’s worth stating in the summary that the focus of this library is as you say for the advanced developer without being an attractive nuisance to the majority of Java developers.
Added to non-goals.

More information about the valhalla-dev mailing list