<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello Shaojin,</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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.</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards,</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Chen</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> core-libs-dev <core-libs-dev-retn@openjdk.org> on behalf of wenshao <shaojin.wensj@alibaba-inc.com><br>
<b>Sent:</b> Saturday, May 24, 2025 12:55 PM<br>
<b>To:</b> core-libs-dev <core-libs-dev@openjdk.org><br>
<b>Subject:</b> Add @Stable to java.lang.CharacterDataLatin1 and other CharacterData classes</font>
<div> </div>
</div>
<div>
<div class="x___aliyun_email_body_block">
<div style="color:0070c0; font-size:14px; font-family:Tahoma,Arial,STHeitiSC-Light,SimSun">
<div style="clear:both"><span>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.</span></div>
<div style="clear:both"><span><br>
</span></div>
<div style="clear:both"><span>such as</span></div>
<div style="clear:both"><span><br>
</span></div>
<div style="clear:both"><span>```java</span></div>
<div style="clear:both"><span><span>class CharacterData00 {</span></span></div>
<div style="clear:both"><span><span><span> </span>@Stable static final char[] X =</span></span>
<div style="clear:both"><span> </span>@Stable static final char[] Y =</div>
<div style="clear:both"><span> </span>@Stable static final int[] A =</div>
<div><span><span> </span>@Stable static final char[] B =</span></div>
<div><span>}</span></div>
</div>
<div style="clear:both"><span>```</span></div>
<div style="clear:both"><span><br>
</span></div>
<div style="clear:both"><span>-</span></div>
<div style="clear:both"><span>Shaojin Wen</span></div>
</div>
</div>
</div>
</body>
</html>