[foreign-memaccess+abi] RFR: Add support for high-level functions to copy to and from Java arrays [v7]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Fri Jun 25 12:09:12 UTC 2021
On Fri, 25 Jun 2021 12:04:07 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> > Hi,
> > Wouldn't it make sense to change MemoryCopy test to use a read-only source segment, so we ensure that the access checks are correct? The first bug I found was that it tried to check for write access on the copy source.
>
> I think this has been addressed?
>
> > I left a comment where the check could be integrated into the test.
> > Otherwise, looks fine to me. I have no strong preference on the parameter order, but I would prefer System.arrayCopy style.
Note that I couldn't just add asReadOnly() to the source segment, as we're copying bits from segment to itself. What I did instead was to turn as read only the "source slice" which is used by the test.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/555
More information about the panama-dev
mailing list