JEP 303 and ConstantDynamic

John Rose john.r.rose at oracle.com
Fri Aug 4 02:14:18 UTC 2017


On Aug 3, 2017, at 5:57 AM, Hontvári Attila <attila at hontvari.net> wrote:
> 
> 1. The user should be able to mark an expression with some keyword like
>   __CONDY.

See the similar proposal by Remi Forax; he spells it "Mjolnir.get(L -> expr)"
instead of the more sugary "__CONDY expr":

https://github.com/forax/mjolnir
https://youtu.be/Rco7hcOM7Ig?list=PLX8CzqL3ArzXJ2EGftrmz4SzS6NRr6p2n


> 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.  The __CONDY
tactic (like Mjolnir) can make useful approximations, but is not the real thing.
(Remi uses bytecode transforms to approximate the real thing more closely.)

— John


More information about the valhalla-dev mailing list