[foreign-memaccess+abi] RFR: Modernize code [v3]
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Sep 25 10:44:28 UTC 2023
On Mon, 25 Sep 2023 10:14:38 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> We should probably add a test to detect regressions such as these
>
> Perhaps we can do that under a separate issue as it is a broader effort than just modernizing the code?
Please, ignore this comment. I looked again at the code, and the scale factor is used to scale the buffer's position. Of course, the position needs to be scaled depending on the buffer kind (e.g. an int buffer has a scaling factor of 4, a short buffer has a scaling factor of 2). The underlying array type doesn't matter when scaling the buffer position: the position is a logical index expressed in elements, so only the buffer type matters (which is what the code does).
-------------
PR Review Comment: https://git.openjdk.org/panama-foreign/pull/894#discussion_r1335711134
More information about the panama-dev
mailing list