On Tue, 24 Mar 2026 16:16:10 GMT, Frederic Parain <[email protected]> wrote:

>> Stefan Karlsson has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Review fparain
>
> src/hotspot/share/prims/unsafe.cpp line 258:
> 
>> 256:   void put(T x) {
>> 257:     GuardUnsafeAccess guard(_thread);
>> 258:     assert(_obj == nullptr || !_obj->is_inline_type(), "must be an 
>> object instance");
> 
> The message of the assert seems to date from the ancient times when value 
> types were not subclasses of j.l.Object. A more accurate message today would 
> be "must be an object with identity". This applies to the assert at line 312 
> too.

OK. I've updated the comments to what you suggested. I'm still a little bit 
hesitant a about that formulation, it now sounds like there's an important 
property that the object has an identity, but I don't think that's why the 
assert is there. Isn't it more that we shouldn't be calling this function with 
value objects?

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2258#discussion_r2982822639

Reply via email to