On Tue, 28 Apr 2026 23:16:24 GMT, Serguei Spitsyn <[email protected]> wrote:

>> Update: I've added a call to the `OrderAccess::storestore();`.
>
>> Also, does BufferedValuePayload do deep cloning, and if yes, is that 
>> necessary? 
> 
> I don't think it is necessary. I'm not sure there is a reason for that. We 
> create a value object snapshot during initialization. It is needed because 
> the value object can mutate during its construction, and so, the 
> `ObjectReference` we create can cause some trouble. It is not clear if it is 
> allowed for value objects to have mutable references to other objects in 
> their fields. But if it is, then it has to be okay and right thing to do to 
> avoid their snashotting.

Regarding initialization, does allocate_instance() return a fully initialized 
object (all nulls and 0's). I assume it does.

Regarding BufferedValuePayload doing deep cloning, it is likely best if it does 
not, so I just wanted to confirm that this it does not. Also, does it honor GC 
memory barriers?

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2363#discussion_r3157964568

Reply via email to