Hello Shaojin,
I think your proposal is reasonable. These arrays are never mutated. Meanwhile 
I see some declarations like int A[] in CharacterData00, would be nice if you 
can convert those declarations to like int[] A too.

Regards,
Chen
________________________________
From: core-libs-dev <[email protected]> on behalf of wenshao 
<[email protected]>
Sent: Saturday, May 24, 2025 12:55 PM
To: core-libs-dev <[email protected]>
Subject: Add @Stable to java.lang.CharacterDataLatin1 and other CharacterData 
classes

Classes such as java.lang.CharacterDataXXX have multiple static final arrays, 
which will not be modified. We should add @Stable to provide information to the 
optimizer.

such as

```java
class CharacterData00 {
    @Stable static final char[] X =
    @Stable static final char[] Y =
    @Stable static final int[] A =
    @Stable static final char[] B =
}
```

-
Shaojin Wen

Reply via email to