On Tue, 24 Mar 2026 15:30:13 GMT, Stefan Karlsson <[email protected]> wrote:

> In preparation for JEP-401 I propose that we remove the unused larval bit 
> from the markWord. The last API to use it was removed with 
> [JDK-8373375](https://bugs.openjdk.org/browse/JDK-8373375).
> 
> I received feedback that we should still keep the mark word bit reserved for 
> Project Valhalla, so that's reflected in the change.
> 
> There is still a lot of JIT compiler support for larval bits, but I've 
> limited this PR to only clean up the markWord usages.
> 
> It would be good to get some feedback about what to do with the callnode.cpp 
> change.
> 
> Tested locally with `test TEST=hotspot_valhalla`.

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.

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

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

Reply via email to