[lworld] RFR: 8352647: [lworld] Remove larval InlineTypeNode in Unsafe intrinsics [v2]

Quan Anh Mai qamai at openjdk.org
Sun Mar 30 07:37:43 UTC 2025


On Wed, 26 Mar 2025 14:14:12 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Hi,
>> 
>> As a step of #1405, I would like to remove the usage of larval value objects in `Unsafe` intrinsics. This patch also tries to make sure that `Unsafe::makePrivateBuffer` and `Unsafe::finishPrivateBuffer` are always inlined, so that larval objects do not cross call boundaries except for invoking object constructors.
>> 
>> Please take a look and review this PR, thanks a lot.
>
> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
> 
>   comments, set and unset larval bit

> Exactly, MEET b/w two reference type results in a type which is LCA of both, and in the worst case it could be j.l.o

No, it is wrong, from the verification type system, the highest reference type in the type hierarchy is `reference`, which comprises `java.lang.Object` and larval objects (`uninitialized`). Larval objects have their types being subtypes of `uninitialized` and non-larval objects have their types being subtypes of `java.lang.Object`. These 2 are separate under the bytecode verifier.

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

PR Comment: https://git.openjdk.org/valhalla/pull/1406#issuecomment-2764430255


More information about the valhalla-dev mailing list