<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: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I have one concern with byte conversion - now the arguments to StringUTF16.putChar is sign extended instead of zero extended. We need to ensure sign extension does not affect the intrinsics, maybe need static asserts to ensure all elements of the digit byte
 arrays are positive so we won't run into trouble with signed vs zero extension.</div>
<div class="elementToProof" style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Once we can address this UTF16 risk, I think we are fine with the latin1 usages, and storing the digits as a byte array is indeed more memory efficient and is a good cleanup.</div>
<div class="elementToProof" style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards,</div>
<div class="elementToProof" style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Chen Liang</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> Friday, May 23, 2025 10:47 PM<br>
<b>To:</b> core-libs-dev <core-libs-dev@openjdk.org><br>
<b>Subject:</b> Integer::digits should be defined as byte[]</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>Now Integer/Long uses Integer::digits to convert to byte, so we should define Integer::digits as byte[], which can avoid the conversion.</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>