Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-19 Thread Maurizio Cimadamore
On Wed, 17 May 2023 18:18:03 GMT, Maurizio Cimadamore wrote: >> This patch adds an instance method on `Linker`, namely >> `Linker::canonicalLayouts` which returns all the layouts known by the linker >> as implementing some ABI type. For instance, if I call this on my machine >> (Linux/x64) I

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-19 Thread Maurizio Cimadamore
On Wed, 17 May 2023 18:18:03 GMT, Maurizio Cimadamore wrote: >> This patch adds an instance method on `Linker`, namely >> `Linker::canonicalLayouts` which returns all the layouts known by the linker >> as implementing some ABI type. For instance, if I call this on my machine >> (Linux/x64) I

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-18 Thread Maurizio Cimadamore
On Wed, 17 May 2023 18:18:03 GMT, Maurizio Cimadamore wrote: >> This patch adds an instance method on `Linker`, namely >> `Linker::canonicalLayouts` which returns all the layouts known by the linker >> as implementing some ABI type. For instance, if I call this on my machine >> (Linux/x64) I

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-18 Thread Paul Sandoz
On Wed, 17 May 2023 18:18:03 GMT, Maurizio Cimadamore wrote: >> This patch adds an instance method on `Linker`, namely >> `Linker::canonicalLayouts` which returns all the layouts known by the linker >> as implementing some ABI type. For instance, if I call this on my machine >> (Linux/x64) I

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-18 Thread Maurizio Cimadamore
On Thu, 18 May 2023 16:52:15 GMT, Paul Sandoz wrote: > Here's the crux of what i am wondering about. Can we specify native linker > support for a subset of the System V Application Binary Interface (e.g., LP64 > and ILP32 programming models for all non-optional scalar types, sequences of, > an

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-18 Thread Paul Sandoz
On Wed, 17 May 2023 18:18:03 GMT, Maurizio Cimadamore wrote: >> This patch adds an instance method on `Linker`, namely >> `Linker::canonicalLayouts` which returns all the layouts known by the linker >> as implementing some ABI type. For instance, if I call this on my machine >> (Linux/x64) I

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-17 Thread Maurizio Cimadamore
On Wed, 17 May 2023 22:41:16 GMT, Paul Sandoz wrote: > So maybe this comes down to the linker supporting a subset ABI's data types, > and that subset might increase over time, but never decrease? In this respect > could we present a table for each supported linker ABI listing the ABI type > an

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-17 Thread Paul Sandoz
On Wed, 17 May 2023 22:34:32 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/Linker.java line 219: >> >>> 217: * >>> 218: * the alignment constraint of {@code G} is set to its >> href="MemoryLayout.html#layout-align">natural alignment; >>> 219: * the size of

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-17 Thread Paul Sandoz
On Wed, 17 May 2023 18:18:03 GMT, Maurizio Cimadamore wrote: >> This patch adds an instance method on `Linker`, namely >> `Linker::canonicalLayouts` which returns all the layouts known by the linker >> as implementing some ABI type. For instance, if I call this on my machine >> (Linux/x64) I

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-17 Thread Maurizio Cimadamore
On Wed, 17 May 2023 22:08:57 GMT, Paul Sandoz wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Tweak javadoc > > src/java.base/share/classes/java/lang/foreign/Linker.java line 219: > >> 217: * >> 218: * t

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-17 Thread Paul Sandoz
On Wed, 17 May 2023 18:18:03 GMT, Maurizio Cimadamore wrote: >> This patch adds an instance method on `Linker`, namely >> `Linker::canonicalLayouts` which returns all the layouts known by the linker >> as implementing some ABI type. For instance, if I call this on my machine >> (Linux/x64) I

Re: RFR: 8308293: A linker should expose the layouts it supports [v2]

2023-05-17 Thread Maurizio Cimadamore
> This patch adds an instance method on `Linker`, namely > `Linker::canonicalLayouts` which returns all the layouts known by the linker > as implementing some ABI type. For instance, if I call this on my machine > (Linux/x64) I get this: > > > jshell> import java.lang.foreign.*; > > jshell> L