<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Chen Liang" <chen.l.liang@oracle.com><br><b>To: </b>"Remi Forax" <forax@univ-mlv.fr>, "panama-dev" <panama-dev@openjdk.org><br><b>Sent: </b>Thursday, May 8, 2025 5:37:14 PM<br><b>Subject: </b>Re: ObjectVector<br></blockquote></div><div><style style="display:none;"> P {margin-top:0;margin-bottom:0;} </style></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">


<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Remi, where do you plan to use such a vector? Reading from an array of references?</div></blockquote><div><br></div><div>yes, read/write,</div><div>as an example, if we have something like ObjectVector, ArrayList.contains(null) can be implemented by reading the array of elements into a vector register and then use eq(null) to get a VectorMask. <br></div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
<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, Chen</div></blockquote><div><br></div><div>regards,</div><div>Rémi</div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">

<hr style="display:inline-block;width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> panama-dev <panama-dev-retn@openjdk.org> on behalf of Remi Forax <forax@univ-mlv.fr><br><b>Sent:</b> Thursday, May 8, 2025 10:31 AM<br><b>To:</b> panama-dev@openjdk.org <panama-dev@openjdk.org><br><b>Subject:</b> ObjectVector</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;"><div class="PlainText">Hello,<br>
in java, unlike in C, references are opaque so a lot of operations on the value of the reference are not allowed,<br>
but some still exist like checking if the value is null or not.<br>
<br>
Is there a way to create an ObjectVector that would only implement those simple operations ?<br>
<br>
Or is it a stupid idea given that both ZGC and shenandoah use read-barrier ?<br>
<br>
regards,<br>
Rémi<br>
</div></span></font></div><br></blockquote></div></div></body></html>