[lworld] RFR: 8352647: [lworld] Remove larval InlineTypeNode in Unsafe intrinsics [v2]
Quan Anh Mai
qamai at openjdk.org
Sun Mar 30 15:11:41 UTC 2025
On Sun, 30 Mar 2025 13:49:31 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> comments, set and unset larval bit
>
> Not asking to address in this patch, but what if we return a larval value to caller ? i.e. value returned by makePrivateBuffer is returned from a method since the return type will still be a concrete value type; hence, the caller will expect to receive the arguments in scalarized form.
> https://github.com/openjdk/valhalla/blob/lworld/src/hotspot/share/opto/graphKit.cpp#L2009
@jatin-bhateja FYI the default value of a value class is created in a previous round of experiment when we have to construct a value object with `aconst_init` and `withfield`. With the introduction of larval objects the notion of default value is no longer necessary and is in progress of removal (#1389). Additionally, all objects value or not are created at the bytecode `new` with their default value and they are still `uninitialized`.
> Not asking to address in this patch, but what if we return a larval value to caller?
`uninitialized` is not a valid operand for `areturn` so a normal larval object cannot be returned from a method. As a result, returning an object created by `Unsafe::makePrivateBuffer` should also not allowed to be returned without invoking `Unsafe::finishPrivateBuffer` first.
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/1406#issuecomment-2764604633
More information about the valhalla-dev
mailing list