On Wed, 12 Aug 2026 03:11:28 GMT, Yasumasa Suenaga <[email protected]> wrote:

> Value Object has been introduced since JDK 28 (as a preview feature), however 
> it cannot be handled in SA.
> 
> 
> public value class Test{
> 
>   public static value record Rec(byte recA, byte recB){};
> 
>   byte a;
> 
>   byte b;
> 
>   Rec rec;
> 
>   byte c;
> }
> 
> 
> `rec` as `Test$Rec` can be inlined into the instance of `Test`, but it would 
> be shown as "Bad OOP" in "inspect" on SA. SA should show valid values in 
> `rec`.
> 
> Note that his change would expand flattened object in below in `inspect` 
> CLHSDB command:
> 
> 
> hsdb> inspect 0xc22419e8
> instance of Oop for LingeredAppWithValueObject$ValueObj @ 0x00000000c22419e8 
> (size = 16)
> _mark: 73201086130815105
> a: 1
> b: 2
> rec:
>   recA: 10
>   recB: 20
> c: 3
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: 53f88f93
Author:    Yasumasa Suenaga <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/53f88f932f25ce8ab4dde3c41abec9cd7e2d2fd8
Stats:     621 lines in 17 files changed: 610 ins; 4 del; 7 mod

8390106: SA: Inline object support is incomplete

Reviewed-by: cjplummer, sspitsyn

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

PR: https://git.openjdk.org/jdk/pull/32310

Reply via email to