Draft JEP Announcement: "Computed Constants"

Brian Goetz brian.goetz at oracle.com
Mon Jul 31 12:49:08 UTC 2023



On 7/28/2023 4:18 PM, Dan Heidinga wrote:
>
> I'm with you on that goal.
>
>     Such “things” might be condensers (as Brian also mentions), 
>
>
> As much as I want condensers (please, let's get condensers asap!), I'm 
> concerned that features which depend on condensers to get good 
> performance will live in an unstable state unless we can make running 
> condensers so cheap and routine and natural that doing so fits in 
> developers workflows

Agreed.  And we intend to make this cheap and routine.

As one example of the pain that the JDK is in, we often have 
bootstrapping problems where we can't use lambdas in code that runs 
early.  So some code in java.base gets refactored to use inner classes 
(e.g., classfile API), and eventually invariably another lambda sneaks 
in and causes a bootstrap regression.  We can address this by condensing 
lambdas to explicit classes during the JDK build for a specific set of 
classes in java.base.  For this to work, it has to be easy, cheap, and 
straightforward to integrate as a build step.  The actual condensation 
work is pretty trivial (the most expensive part is a scan of all the 
classfiles for the offending bytecode), so this is mostly a matter of 
ensuring that the tooling is easy to integrate in build workflows.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/leyden-dev/attachments/20230731/cb23ba12/attachment.htm>


More information about the leyden-dev mailing list