On Fri, 8 May 2026 18:28:40 GMT, Dan Smith <[email protected]> wrote:

> On a behavioral level, I wonder how you are deciding which locals are this 
> variables; like what happens if somebody copies this into local slot 3?

Good question. There is no check for this corner case now.

> It may make more sense to say and implement:

Good suggestion with one correction. We do not want to snapshot any local value 
object but only `this` object which is under construction.

What about this? :

 When preview features are enabled, the frame's method is a value class
 constructor and the requested local is a "<code>this</code>" value object, the
 value_ptr is set to a snapshot of the "<code>this</code>" object.

-------------

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2412#discussion_r3210671533

Reply via email to