[foreign-memaccess+abi] Integrated: 8310048: Drop sequence layout factory with inferred count
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Jun 14 18:25:14 UTC 2023
On Wed, 14 Jun 2023 17:50:32 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> The sequence layout factory that accepts only the element layout makes it too easy for developers to reach for the wrong thing (and creating an insanely huge layout).
>
> We should keep in sync with the WYSIWYG spirit of the various layout factories and make sequence layout count always explicit.
> Developers should not need to create a sequence layout whose size is `Long.MAX_VALUE`, except in the specific case when they would like to create an address layout whose target layout has a size that is statically unknown (and they's like the FFM API to automatically resize the resulting segment to the biggest available size).
>
> We have other patches in the work which will help developers deal with cases where they have to deal with access to elements of an array whose size is not known statically.
This pull request has now been integrated.
Changeset: b008428d
Author: Maurizio Cimadamore <mcimadamore at openjdk.org>
URL: https://git.openjdk.org/panama-foreign/commit/b008428dd1fe92c0c955c396cc2f55207d1a3fd2
Stats: 51 lines in 13 files changed: 2 ins; 26 del; 23 mod
8310048: Drop sequence layout factory with inferred count
Reviewed-by: jvernee
-------------
PR: https://git.openjdk.org/panama-foreign/pull/838
More information about the panama-dev
mailing list