JEP 303 and ConstantDynamic

Hontvári Attila attila at hontvari.net
Sun Aug 6 14:01:25 UTC 2017


On 2017. 08. 04. 4:14, John Rose wrote:
> On Aug 3, 2017, at 5:57 AM, Hontvári Attila <attila at hontvari.net 
> <mailto:attila at hontvari.net>> wrote:
>
>> But as I understand this, the data of the instances of the intrinsic 
>> types don't have to be known at compile-time; they only have to 
>> be known and constant at run-time.
>
> That's not true.  We need to be able to fold true constant expressions 
> into
> bootstrap method arguments and similar class file structures.
I originally thought that almost anything that references any CP entry 
can refer to a CONSTANT_Dynamic, but according to JDK-8177279 only an 
ldc or a BootstrapMethods table can refer to a condy item.
Would it be possible to make the invokedynamic instruction to handle a 
CONSTANT_Dynamic (with type=BootstrapSpecifier) in place of a 
CONSTANT_InvokeDynamic? Or would it still not solve all the use cases of 
the JEP?
> (Remi uses bytecode transforms to approximate the real thing more 
> closely.)
>
> — John



More information about the valhalla-dev mailing list