[code-reflection] RFR: Lambda model uniqueness [v4]
Mourad Abbay
mabbay at openjdk.org
Tue May 6 11:28:27 UTC 2025
On Tue, 6 May 2025 11:06:32 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> It seems to me this patch is doing several things at once. While sharing the model instance in a new static field, I'm less sure about the fact that the lazy initialization of the `Quoted` object is worth the extra code complexity (e.g. double checked locking) -- after all, computing the `Quoted` instance in the constructor of the generated class should not mess up with uniqueness (as there will still be a new instance of `Quoted` per new instance of the generated class?)
The end goal is to lazily invoke `opMethod`. This saves space as the model is in memory when needed. It also saves time. Quoted object depends on the result of opMethod, so Quoted object must be initialized lazily.
-------------
PR Comment: https://git.openjdk.org/babylon/pull/420#issuecomment-2854216310
More information about the babylon-dev
mailing list