Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v29]

2023-04-26 Thread Per Minborg
> API changes for the FFM API (third preview) > > ### Specdiff > https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html > > ### Javadoc > https://cr.openjdk.org/~pminborg/panama/21/v2/javadoc/api/java.base/java/lang/foreign/package-summary.html > > ### Tests > > Testing ex

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-04-26 Thread Fei Yang
On Tue, 21 Mar 2023 13:35:25 GMT, Per Minborg wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add example for Option::captureStateLayout > > A review of all the copyright years shall be made in this PR. @minborg :

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v28]

2023-04-26 Thread Per Minborg
> API changes for the FFM API (third preview) > > ### Specdiff > https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html > > ### Javadoc > https://cr.openjdk.org/~pminborg/panama/21/v2/javadoc/api/java.base/java/lang/foreign/package-summary.html > > ### Tests > > Testing ex

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v27]

2023-04-26 Thread Per Minborg
> API changes for the FFM API (third preview) > > ### Specdiff > https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html > > ### Javadoc > https://cr.openjdk.org/~pminborg/panama/21/v2/javadoc/api/java.base/java/lang/foreign/package-summary.html > > ### Tests > > Testing ex

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v26]

2023-04-26 Thread Per Minborg
> API changes for the FFM API (third preview) > > ### Specdiff > https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html > > ### Javadoc > https://cr.openjdk.org/~pminborg/panama/21/v2/javadoc/api/java.base/java/lang/foreign/package-summary.html > > ### Tests > > Testing ex

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v24]

2023-04-26 Thread Paul Sandoz
On Wed, 19 Apr 2023 13:37:15 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> ### Specdiff >> https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html >> >> ### Javadoc >> https://cr.openjdk.org/~pminborg/panama/21/v2/javadoc/api/java.base/java/la

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v25]

2023-04-26 Thread Per Minborg
> API changes for the FFM API (third preview) > > ### Specdiff > https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html > > ### Javadoc > https://cr.openjdk.org/~pminborg/panama/21/v2/javadoc/api/java.base/java/lang/foreign/package-summary.html > > ### Tests > > Testing ex

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v24]

2023-04-25 Thread Paul Sandoz
On Wed, 19 Apr 2023 13:37:15 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> ### Specdiff >> https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html >> >> ### Javadoc >> https://cr.openjdk.org/~pminborg/panama/21/v2/javadoc/api/java.base/java/la

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v24]

2023-04-25 Thread Paul Sandoz
On Wed, 19 Apr 2023 13:37:15 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> ### Specdiff >> https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html >> >> ### Javadoc >> https://cr.openjdk.org/~pminborg/panama/21/v2/javadoc/api/java.base/java/la

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v24]

2023-04-25 Thread Paul Sandoz
On Wed, 19 Apr 2023 13:37:15 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> ### Specdiff >> https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html >> >> ### Javadoc >> https://cr.openjdk.org/~pminborg/panama/21/v2/javadoc/api/java.base/java/la

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v24]

2023-04-19 Thread Per Minborg
> API changes for the FFM API (third preview) > > ### Specdiff > https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html > > ### Javadoc > https://cr.openjdk.org/~pminborg/panama/21/v2/javadoc/api/java.base/java/lang/foreign/package-summary.html > > ### Tests > > - [X] Tier

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v23]

2023-04-19 Thread Andrey Turbanov
On Thu, 13 Apr 2023 06:36:51 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> ### Specdiff >> https://cr.openjdk.org/~pminborg/panama/21/v2/specdiff/overview-summary.html >> >> ### Javadoc >> https://cr.openjdk.org/~pminborg/panama/21/v2/javadoc/api/java.base/java/la

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v23]

2023-04-12 Thread Per Minborg
> API changes for the FFM API (third preview) > > ### Specdiff > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > ### Javadoc > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html > > ### Tests > > - [X] Tier1 > - [X] Tier2 > - [ ]

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v20]

2023-04-12 Thread Jorn Vernee
On Tue, 11 Apr 2023 17:59:32 GMT, Vladimir Ivanov wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - 8305369: Issues in zero-length memory segment javadoc section >> - 8305087: MemoryLayout API checks should be more

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v20]

2023-04-12 Thread Per Minborg
On Tue, 11 Apr 2023 17:48:37 GMT, Jorn Vernee wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - 8305369: Issues in zero-length memory segment javadoc section >> - 8305087: MemoryLayout API checks should be more eag

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v22]

2023-04-12 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v21]

2023-04-12 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request with a new target

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v20]

2023-04-11 Thread Vladimir Ivanov
On Thu, 6 Apr 2023 10:54:18 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.htm

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v20]

2023-04-11 Thread Jorn Vernee
On Thu, 6 Apr 2023 10:54:18 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.htm

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-04-07 Thread ExE Boss
On Fri, 7 Apr 2023 07:32:02 GMT, ExE Boss wrote: >> Thanks for this enhancement proposal. I hope you do not mind me asking if >> you could file a separate issue about this where you describe the above? We >> can then merge that proposal independent of this PR. > > I don’t (yet) have a **JBS** a

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-04-07 Thread ExE Boss
On Tue, 28 Mar 2023 10:00:28 GMT, Per Minborg wrote: >> src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java line >> 297: >> >>> 295: MethodType mtype = mh.type(); >>> 296: int[] perms = new int[mtype.parameterCount()]; >>> 297: MethodType swappedType =

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-04-06 Thread Fei Yang
On Tue, 21 Mar 2023 13:35:25 GMT, Per Minborg wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add example for Option::captureStateLayout > > A review of all the copyright years shall be made in this PR. > Hi @minbo

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v20]

2023-04-06 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v19]

2023-04-05 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request with a new target

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v18]

2023-04-05 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v17]

2023-04-05 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v16]

2023-04-03 Thread ExE Boss
On Thu, 30 Mar 2023 11:28:25 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v16]

2023-03-31 Thread Maurizio Cimadamore
On Thu, 30 Mar 2023 11:28:25 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v16]

2023-03-30 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v15]

2023-03-29 Thread Maurizio Cimadamore
On Wed, 29 Mar 2023 08:55:08 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v15]

2023-03-29 Thread Maurizio Cimadamore
On Wed, 29 Mar 2023 22:32:20 GMT, Paul Sandoz wrote: >> I've updated the specs as per how I interpret the comments above. Let me >> know your thoughts on this. > > This is much clearer. Are the names of the struct members guaranteed to be > symbols that can be found up via the linker's default

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v15]

2023-03-29 Thread Maurizio Cimadamore
On Wed, 29 Mar 2023 08:55:08 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v15]

2023-03-29 Thread Paul Sandoz
On Wed, 22 Mar 2023 14:07:14 GMT, Per Minborg wrote: >> Back to @PaulSandoz question - "how does the caller know what the structure >> contains?". The caller typically doesn't care too much about what the >> returned struct is. But it might care about which "values" can be captured. >> That s

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v15]

2023-03-29 Thread Jorn Vernee
On Wed, 29 Mar 2023 08:55:08 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v15]

2023-03-29 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v14]

2023-03-29 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v13]

2023-03-29 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v10]

2023-03-28 Thread Maurizio Cimadamore
On Tue, 28 Mar 2023 13:09:45 GMT, Per Minborg wrote: >> > src="https://user-images.githubusercontent.com/7457876/228246205-ff2730cb-610f-4673-aa30-d110845a34fc.png";> >> >> It belongs to the opening brace for `{@return`. Hard to see with other curls >> in between. > > I would have written: > >

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v12]

2023-03-28 Thread Jorn Vernee
On Tue, 28 Mar 2023 13:14:09 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-28 Thread Jorn Vernee
On Tue, 28 Mar 2023 10:07:12 GMT, Per Minborg wrote: >> src/java.base/share/classes/jdk/internal/foreign/abi/fallback/LibFallback.java >> line 61: >> >>> 59: static final MemorySegment VOID_TYPE = >>> MemorySegment.ofAddress(ffi_type_void()); >>> 60: static final short STRUCT_TAG = ffi

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v10]

2023-03-28 Thread Per Minborg
On Tue, 28 Mar 2023 12:36:28 GMT, Jorn Vernee wrote: >> src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 2310: >> >>> 2308: /** >>> 2309: * {@return {@code true}, if the provided object is also a >>> scope, which models the same lifetime as that >>> 2310:

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v10]

2023-03-28 Thread Per Minborg
On Tue, 28 Mar 2023 13:08:22 GMT, Per Minborg wrote: >> It's to close the text span for the `{@return` > > src="https://user-images.githubusercontent.com/7457876/228246205-ff2730cb-610f-4673-aa30-d110845a34fc.png";> > > It belongs to the opening brace for `{@return`. Hard to see with other curl

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v12]

2023-03-28 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v11]

2023-03-28 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v10]

2023-03-28 Thread Jorn Vernee
On Tue, 28 Mar 2023 11:00:00 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 22 commits: >> >> - Merge with master >> - Make fallbacklinker.c consistent with downcallLinker.cpp >>

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v10]

2023-03-28 Thread Maurizio Cimadamore
On Tue, 28 Mar 2023 10:56:07 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v10]

2023-03-28 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request with a new target

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v9]

2023-03-28 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-28 Thread Per Minborg
On Fri, 24 Mar 2023 08:42:37 GMT, ExE Boss wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve javadocs for Linker::captureStateLayout > > src/java.base/share/classes/jdk/internal/foreign/abi/fallback/LibFallbac

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-28 Thread Per Minborg
On Fri, 24 Mar 2023 08:35:06 GMT, ExE Boss wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve javadocs for Linker::captureStateLayout > > src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java li

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-24 Thread ExE Boss
On Wed, 22 Mar 2023 14:09:07 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-23 Thread Jorn Vernee
On Thu, 23 Mar 2023 10:31:27 GMT, Maurizio Cimadamore wrote: >> Just did a test with jshell: >> >> >> jshell> Linker linker = Linker.nativeLinker(); >> >> jshell> MethodHandle handleValue = >> linker.downcallHandle(FunctionDescriptor.ofVoid(MemoryLayout.structLayout(ValueLayout.JAVA_INT)));

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-23 Thread Maurizio Cimadamore
On Thu, 23 Mar 2023 10:28:23 GMT, Maurizio Cimadamore wrote: >> Yes - although there is a distinction between passed by value and by ref. I >> wouldn't be surprised if we just threw NPE for by-value. > > Just did a test with jshell: > > > jshell> Linker linker = Linker.nativeLinker(); > > js

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-23 Thread Maurizio Cimadamore
On Wed, 22 Mar 2023 20:07:01 GMT, Maurizio Cimadamore wrote: >> Ah. True. This is true about all the MS parameters as well. > > Yes - although there is a distinction between passed by value and by ref. I > wouldn't be surprised if we just threw NPE for by-value. Just did a test with jshell:

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Maurizio Cimadamore
On Wed, 22 Mar 2023 19:25:05 GMT, Jorn Vernee wrote: >> Note: this text was just copied/adapted from toplevel javadoc and moved >> here. I think we have to say something about `null` as the text refers to >> `null` being passed as parameter to the returned MH, which is NOT covered by >> the pa

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Jorn Vernee
On Wed, 22 Mar 2023 19:02:52 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/Linker.java line 492: >> >>> 490: * Finally, the returned method handle will throw an {@link >>> IllegalArgumentException} if the {@link MemorySegment} >>> 491: * parameter p

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Maurizio Cimadamore
On Wed, 22 Mar 2023 18:04:15 GMT, Jorn Vernee wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve javadocs for Linker::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/MemorySegment.java line

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Maurizio Cimadamore
On Wed, 22 Mar 2023 17:34:36 GMT, Jorn Vernee wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve javadocs for Linker::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/Linker.java line 492: >

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Jorn Vernee
On Wed, 22 Mar 2023 14:09:07 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-22 Thread Jorn Vernee
On Tue, 21 Mar 2023 09:02:29 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Maurizio Cimadamore
On Wed, 22 Mar 2023 15:57:16 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/lang/foreign/MemoryLayout.java line 697: >> >>> 695: */ >>> 696: static PaddingLayout paddingLayout(long bitSize) { >>> 697: if (bitSize <= 0) { >> >> While this does the right thing, I won

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Per Minborg
On Wed, 22 Mar 2023 14:35:42 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve javadocs for Linker::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/MemoryLayout.j

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Maurizio Cimadamore
On Wed, 22 Mar 2023 14:09:07 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Per Minborg
On Tue, 21 Mar 2023 12:12:15 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/Linker.java line 621: >> >>> 619: * to a downcall handle linked with {@link >>> #captureCallState(String...)}} >>> 620: * >>> 621: * @see #captureCa

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-22 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v7]

2023-03-22 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v6]

2023-03-22 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-22 Thread Per Minborg
On Wed, 22 Mar 2023 11:55:09 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add example for Option::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/MemoryLayout.java l

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-22 Thread Maurizio Cimadamore
On Tue, 21 Mar 2023 09:02:29 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-22 Thread Andrey Turbanov
On Tue, 21 Mar 2023 09:02:29 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-22 Thread Feilong Jiang
On Tue, 21 Mar 2023 13:35:25 GMT, Per Minborg wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add example for Option::captureStateLayout > > A review of all the copyright years shall be made in this PR. Hi @minborg

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Per Minborg
On Tue, 21 Mar 2023 09:02:29 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Maurizio Cimadamore
On Tue, 21 Mar 2023 00:54:10 GMT, Paul Sandoz wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add example for Option::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/Linker.java line 621: > >>

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Maurizio Cimadamore
On Tue, 21 Mar 2023 11:58:28 GMT, Per Minborg wrote: >> I'm not sure about this. Honestly, the example probably doesn't help much if >> somebody didn't get the idea of what the layout might be. I think it might >> be better to say something like, `on Windows/x64 the returned layout might >> be

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Per Minborg
On Tue, 21 Mar 2023 09:54:16 GMT, Maurizio Cimadamore wrote: >> I've added an example of how to print the platform-dependent structure. >> Should we document anyhow? > > I'm not sure about this. Honestly, the example probably doesn't help much if > somebody didn't get the idea of what the layo

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Maurizio Cimadamore
On Tue, 21 Mar 2023 09:02:29 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Maurizio Cimadamore
On Tue, 21 Mar 2023 08:57:42 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/lang/foreign/Linker.java line 621: >> >>> 619: * to a downcall handle linked with {@link >>> #captureCallState(String...)}} >>> 620: * >>> 621: * @see #captureCallState(S

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Maurizio Cimadamore
On Tue, 21 Mar 2023 00:35:40 GMT, Paul Sandoz wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add example for Option::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/Linker.java line 479: > >>

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Per Minborg
On Tue, 21 Mar 2023 00:54:10 GMT, Paul Sandoz wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add example for Option::captureStateLayout > > src/java.base/share/classes/java/lang/foreign/Linker.java line 621: > >>

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

2023-03-21 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v4]

2023-03-21 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v4]

2023-03-21 Thread Per Minborg
On Tue, 21 Mar 2023 00:52:01 GMT, Paul Sandoz wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve Linker javadocs > > src/java.base/share/classes/java/lang/foreign/Linker.java line 609: > >> 607: * @se

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v3]

2023-03-21 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v2]

2023-03-21 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview)

2023-03-20 Thread Paul Sandoz
On Fri, 17 Mar 2023 15:42:56 GMT, Per Minborg wrote: > API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html src

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview)

2023-03-20 Thread Paul Sandoz
On Fri, 17 Mar 2023 15:42:56 GMT, Per Minborg wrote: > API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html src

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview)

2023-03-20 Thread Paul Sandoz
On Fri, 17 Mar 2023 15:42:56 GMT, Per Minborg wrote: > API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html src

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview)

2023-03-20 Thread Paul Sandoz
On Fri, 17 Mar 2023 15:42:56 GMT, Per Minborg wrote: > API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html src

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview)

2023-03-20 Thread Erik Joelsson
On Fri, 17 Mar 2023 15:42:56 GMT, Per Minborg wrote: > API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Bui

RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview)

2023-03-20 Thread Per Minborg
API changes for the FFM API (third preview) Specdiff: https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html Javadoc: https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html - Commit messages: - Update after first round of comments

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview)

2023-03-20 Thread Maurizio Cimadamore
On Fri, 17 Mar 2023 15:42:56 GMT, Per Minborg wrote: > API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Her

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview)

2023-03-20 Thread ExE Boss
On Fri, 17 Mar 2023 15:42:56 GMT, Per Minborg wrote: > API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html src