Hello,
I've stumbled upon a puzzler while writing a compiler from System F embedded in Java to methodhandles.
Given a DynamicConstantDesc how do I convert it to a MethodHandle that lazily loads the value alike ldc ?
It seems absurd spin an entire class for this.
I could create a MutableCallSite or perhaps a SwitchPoint for this but I don't really understand which would be better.
A regularly old object that does lazy initialisation with a flag would probably be fine but I feel like I should be able to do better.
I think I might be able to abuse the jit's handling of private finals in lambda objects to do this but I'm not quite certain that would work.
Thanks
Steven Stewart-Gallus