[External] : Re: ObjectVector

Chen Liang chen.l.liang at oracle.com
Thu May 8 15:48:19 UTC 2025


I think the problem is that when valhalla arrives, we can no longer ensure the array of objects we pass to create such a vector has an all-reference layout; in addition, we don't want to expose the size and layout of reference pointers to Java code. Maybe a dedicated method in java.util.Arrays is better for this purpose.
________________________________
From: forax at univ-mlv.fr <forax at univ-mlv.fr>
Sent: Thursday, May 8, 2025 10:43 AM
To: Chen Liang <chen.l.liang at oracle.com>
Cc: panama-dev <panama-dev at openjdk.org>
Subject: [External] : Re: ObjectVector



________________________________
From: "Chen Liang" <chen.l.liang at oracle.com>
To: "Remi Forax" <forax at univ-mlv.fr>, "panama-dev" <panama-dev at openjdk.org>
Sent: Thursday, May 8, 2025 5:37:14 PM
Subject: Re: ObjectVector
Hi Remi, where do you plan to use such a vector? Reading from an array of references?

yes, read/write,
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.


Regards, Chen

regards,
Rémi

________________________________
From: panama-dev <panama-dev-retn at openjdk.org> on behalf of Remi Forax <forax at univ-mlv.fr>
Sent: Thursday, May 8, 2025 10:31 AM
To: panama-dev at openjdk.org <panama-dev at openjdk.org>
Subject: ObjectVector

Hello,
in java, unlike in C, references are opaque so a lot of operations on the value of the reference are not allowed,
but some still exist like checking if the value is null or not.

Is there a way to create an ObjectVector that would only implement those simple operations ?

Or is it a stupid idea given that both ZGC and shenandoah use read-barrier ?

regards,
Rémi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20250508/a6a9e1b4/attachment.htm>


More information about the panama-dev mailing list