Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v36]

2022-11-30 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v35]

2022-11-30 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v34]

2022-11-30 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v33]

2022-11-30 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

Re: RFR: 8297736: test/jdk/java/foreign/TestMatrix.java is broken

2022-11-29 Thread Maurizio Cimadamore
On Mon, 28 Nov 2022 21:03:33 GMT, Jorn Vernee wrote: > - Fix tests that try to run `TestDowncall` which was split into > TestDowncallScope and TestDowncallStack > - Fix use of obsolete system properties to control specilization > - Add test to run TestVarArgs in un-sampled mode. > > Testing:

Re: RFR: 8297733: Refactor Cast binding to enum

2022-11-29 Thread Maurizio Cimadamore
On Mon, 28 Nov 2022 20:13:35 GMT, Jorn Vernee wrote: > Refactor the cast binding to an enum, which clearly enumerates all supported > conversions. > > This also fixes a bug where `java/foreign/normalize/TestNormalize` was > failing when running in interpreted mode >

Re: RFR: 8290231: java/foreign/malloc/TestMixedMallocFree.java crashed in JDK19 ATR run

2022-11-29 Thread Maurizio Cimadamore
On Tue, 29 Nov 2022 15:40:53 GMT, Jorn Vernee wrote: > This test allocates on the native side with `malloc`, and then tries to free > that memory on the Java side. The library that we look up on the Java side is > either ucrtbase.dll, or msvcrt.dll as a fallback if we don't find it. The >

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v17]

2022-11-29 Thread Maurizio Cimadamore
On Tue, 29 Nov 2022 09:40:58 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed

Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v32]

2022-11-28 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v16]

2022-11-28 Thread Maurizio Cimadamore
On Mon, 21 Nov 2022 12:05:31 GMT, Alan Bateman wrote: >> The reason for the comment is to make it clear why `DirectBuffer::address` >> can be used directly without guarding. This will also reduce the probability >> of unnecessary guarding being added in the future. However, if the consensus

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v13]

2022-11-24 Thread Maurizio Cimadamore
On Thu, 24 Nov 2022 11:42:52 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v13]

2022-11-24 Thread Maurizio Cimadamore
On Thu, 24 Nov 2022 11:57:33 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/sun/nio/ch/IOUtil.java line 519: >> >>> 517: } >>> 518: >>> 519: record LinkedRunnable(Runnable node, Runnable next) >> >> Some (optional)

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v13]

2022-11-24 Thread Maurizio Cimadamore
On Thu, 24 Nov 2022 11:54:43 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove redundant method > > src/java.base/share/classes/sun/nio/ch/I

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v13]

2022-11-24 Thread Maurizio Cimadamore
On Thu, 24 Nov 2022 11:42:52 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed

Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v31]

2022-11-23 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v12]

2022-11-23 Thread Maurizio Cimadamore
On Wed, 23 Nov 2022 12:39:40 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed

Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v30]

2022-11-23 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-22 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v9]

2022-11-22 Thread Maurizio Cimadamore
On Tue, 22 Nov 2022 09:32:32 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rework Acquisition > > src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChanne

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v9]

2022-11-22 Thread Maurizio Cimadamore
On Tue, 22 Nov 2022 09:11:44 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed

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

2022-11-21 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-21 Thread Maurizio Cimadamore
On Mon, 21 Nov 2022 16:34:46 GMT, Alan Bateman wrote: > > Although this looks much simpler and concise, it means "a new object is > > created for each invocation" > > My comment was actually to see if DirectBuffer could extend AutoCloseable so > that the acquire returns "this" for the

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v2]

2022-11-21 Thread Maurizio Cimadamore
On Mon, 21 Nov 2022 12:03:35 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/util/zip/Adler32.java line 102: >> >>> 100: return; >>> 101: if (buffer.isDirect()) { >>> 102: try (var sessionAcquisition = >>>

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v23]

2022-11-16 Thread Maurizio Cimadamore
On Wed, 16 Nov 2022 20:33:50 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v6]

2022-11-16 Thread Maurizio Cimadamore
On Wed, 16 Nov 2022 15:58:49 GMT, Andrew Haley wrote: >> src/jdk.incubator.concurrent/share/classes/jdk/incubator/concurrent/ScopedValue.java >> line 460: >> >>> 458: * } >>> 459: * >>> 460: * @param key the ScopedValue key >> >> should use `@code` or `@link` > > Sorry, I don't

Re: RFR: 8296477: Foreign linker implementation update following JEP 434 [v6]

2022-11-16 Thread Maurizio Cimadamore
On Wed, 16 Nov 2022 17:04:03 GMT, Jorn Vernee wrote: >> Pull in linker implementation changes, that include non-trivial changes to >> VM code, from the panama-foreign repo into the main JDK. >> >> This is split off from the main JEP integration to make reviewing easier. >> >> This includes

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

2022-11-16 Thread Maurizio Cimadamore
On Wed, 16 Nov 2022 16:41:45 GMT, Maurizio Cimadamore wrote: >> Most of the AutoCloseable in the platform are Closeables where close is >> specified to have no effect when already closed. With a confined Arena it >> would be benign for the owner to invoke close again. I

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

2022-11-16 Thread Maurizio Cimadamore
On Wed, 16 Nov 2022 16:38:10 GMT, Alan Bateman wrote: >> In our experience with using the API, having exceptions when something is >> funny about close is very valuable info (as also stated in the javadoc). >> Almost always there's a subtle temporal bug going on which the ISE catches. >> I'm

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

2022-11-16 Thread Maurizio Cimadamore
On Wed, 16 Nov 2022 16:01:52 GMT, Alan Bateman wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix typo in SegmentScope javadoc > > src/java.base/share/classes/java/la

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v21]

2022-11-16 Thread Maurizio Cimadamore
On Wed, 16 Nov 2022 15:41:06 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > src/java.base/share/classes/java/lang/template/StringTem

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v21]

2022-11-16 Thread Maurizio Cimadamore
On Mon, 14 Nov 2022 17:51:24 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v6]

2022-11-16 Thread Maurizio Cimadamore
On Wed, 16 Nov 2022 12:01:58 GMT, Alan Bateman wrote: >> IMHO there are ways to have the cake and eat it too. That is, we could have >> a couple of overloads: >> >> >> T get() { ... } // throws NSME if not found >> Optional find() // returns empty optional if not found >> >> >> Then, for

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v6]

2022-11-16 Thread Maurizio Cimadamore
On Wed, 16 Nov 2022 11:03:07 GMT, Andrew Haley wrote: >> Yes, my comment was really on `get` - that said, I note that saying >> get().get() would look odd (but maybe finding some other name for >> `ScopedValue::get`, such as `find` might work) > > It certainly would look odd. This API is, by

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v6]

2022-11-16 Thread Maurizio Cimadamore
On Wed, 16 Nov 2022 10:57:49 GMT, Andrew Haley wrote: >> src/jdk.incubator.concurrent/share/classes/jdk/incubator/concurrent/ScopedValue.java >> line 185: >> >>> 183: * would have to be regenerated after a blocking operation. >>> 184: * >>> 185: * @param the type of the value >> >>

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v6]

2022-11-15 Thread Maurizio Cimadamore
On Tue, 15 Nov 2022 20:26:37 GMT, Alan Bateman wrote: >> src/jdk.incubator.concurrent/share/classes/jdk/incubator/concurrent/ScopedValue.java >> line 613: >> >>> 611: * @return the value of the scoped value if bound, otherwise >>> {@code other} >>> 612: */ >>> 613: public T

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v6]

2022-11-15 Thread Maurizio Cimadamore
On Tue, 15 Nov 2022 17:36:16 GMT, Andrew Haley wrote: >> JEP 429 implementation. > > Andrew Haley has updated the pull request incrementally with one additional > commit since the last revision: > > Fix failing serviceability tests

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

2022-11-15 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-15 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-15 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-15 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-15 Thread Maurizio Cimadamore
On Tue, 15 Nov 2022 15:22:07 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/Arena.java line 89: >> >>> 87: >>> 88: /** >>> 89: * Returns a native memory segment with the given size (in bytes)

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

2022-11-15 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-15 Thread Maurizio Cimadamore
On Tue, 15 Nov 2022 15:31:58 GMT, Per Minborg wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add `since` tag in Module/ModuleLayer preview methods > > src/java.base/s

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

2022-11-15 Thread Maurizio Cimadamore
On Tue, 15 Nov 2022 15:09:02 GMT, Per Minborg wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add `since` tag in Module/ModuleLayer preview methods > > src/java.base/s

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

2022-11-15 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-15 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-15 Thread Maurizio Cimadamore
On Tue, 15 Nov 2022 10:12:12 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-434 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment.

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

2022-11-15 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-15 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-15 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

Re: RFR: 8296477: Foreign linker implementation update following JEP 434 [v2]

2022-11-10 Thread Maurizio Cimadamore
On Wed, 9 Nov 2022 18:16:59 GMT, Jorn Vernee wrote: >> Pull in linker implementation changes, that include non-trivial changes to >> VM code, from the panama-foreign repo into the main JDK. >> >> This is split off from the main JEP integration to make reviewing easier. >> >> This includes the

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

2022-11-09 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-09 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-09 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-09 Thread Maurizio Cimadamore
On Wed, 9 Nov 2022 09:16:49 GMT, Alan Bateman wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix typo > > src/java.base/share/classes/java/lang/foreign/Arena.java line 131: &

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

2022-11-08 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-08 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-08 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-08 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-08 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-08 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-08 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-08 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-07 Thread Maurizio Cimadamore
On Mon, 7 Nov 2022 14:17:40 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-434 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment.

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

2022-11-07 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-07 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-07 Thread Maurizio Cimadamore
On Mon, 7 Nov 2022 13:43:17 GMT, Jorn Vernee wrote: >> Actually, this patch is missing most of the stuff in PR 728. I was under the >> impression that, in order to fully support that, some VM changes were needed >> (e.g. to have better granularity in call shuffling - as per >>

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

2022-11-07 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-07 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

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

2022-11-07 Thread Maurizio Cimadamore
On Sat, 5 Nov 2022 18:40:56 GMT, Jorn Vernee wrote: >> Maurizio Cimadamore has updated the pull request with a new target base due >> to a merge or a rebase. The incremental webrev excludes the unrelated >> changes brought in by the merge/rebase. The pull request contains

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

2022-11-07 Thread Maurizio Cimadamore
On Sat, 5 Nov 2022 18:04:38 GMT, Jorn Vernee wrote: >> Maurizio Cimadamore has updated the pull request with a new target base due >> to a merge or a rebase. The incremental webrev excludes the unrelated >> changes brought in by the merge/rebase. The pull request contains

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

2022-11-07 Thread Maurizio Cimadamore
On Sat, 5 Nov 2022 18:02:33 GMT, Jorn Vernee wrote: >> Maurizio Cimadamore has updated the pull request with a new target base due >> to a merge or a rebase. The incremental webrev excludes the unrelated >> changes brought in by the merge/rebase. The pull request contains

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

2022-11-04 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org/jeps/434 Maurizio Cimadamore has updated t

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-11-01 Thread Maurizio Cimadamore
On Mon, 31 Oct 2022 20:11:34 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-11-01 Thread Maurizio Cimadamore
On Mon, 31 Oct 2022 20:11:34 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-11-01 Thread Maurizio Cimadamore
On Mon, 31 Oct 2022 20:11:34 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-11-01 Thread Maurizio Cimadamore
On Fri, 28 Oct 2022 17:57:30 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v2]

2022-11-01 Thread Maurizio Cimadamore
On Fri, 28 Oct 2022 19:18:23 GMT, Jim Laskey wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 4974: >> >>> 4972: if (processor != null) { >>> 4973: resultType = attribTree(processor, env, new >>> ResultInfo(KindSelector.VAL, Type.noType));

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v2]

2022-10-28 Thread Maurizio Cimadamore
On Fri, 28 Oct 2022 16:09:16 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move StringConcatItem to FormatConcatItem > > src/jdk.compiler/share/classes/com/s

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-28 Thread Maurizio Cimadamore
On Fri, 28 Oct 2022 17:57:30 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v2]

2022-10-28 Thread Maurizio Cimadamore
On Fri, 28 Oct 2022 14:55:28 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview)

2022-10-27 Thread Maurizio Cimadamore
On Wed, 26 Oct 2022 13:11:50 GMT, Maurizio Cimadamore wrote: > This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > &

RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview)

2022-10-27 Thread Maurizio Cimadamore
This PR contains the API and implementation changes for JEP-434 [1]. A more detailed description of such changes, to avoid repetitions during the review process, is included as a separate comment. [1] - https://openjdk.org/jeps/434 - Commit messages: - Merge branch 'master' into

[jdk19] Integrated: 8291006: java/foreign/TestUnsupportedPlatform fails after JDK-8290455

2022-07-27 Thread Maurizio Cimadamore
On Tue, 26 Jul 2022 09:44:53 GMT, Maurizio Cimadamore wrote: > This patch removes java/foreign/TestUnsupportedPlatform, which has been > superseded by TestUnsupportedLinker, and is no longer required. > This old test relies on unspecified behavior and should be removed. This pull re

[jdk19] RFR: 8291006: java/foreign/TestUnsupportedPlatform fails after JDK-8290455

2022-07-26 Thread Maurizio Cimadamore
This patch removes java/foreign/TestUnsupportedPlatform, which has been superseded by TestUnsupportedLinker, and is no longer required. This old test relies on unspecified behavior and should be removed. - Commit messages: - Drop TestUnsupportedPlatform test Changes:

Re: RFR: 8278863: Add method ClassDesc::ofInternalName [v3]

2022-07-26 Thread Maurizio Cimadamore
On Mon, 20 Jun 2022 07:45:46 GMT, Adam Sotona wrote: >> The symbolic constants API (`java.lang.constant`) was designed, in part, to >> provide bytecode parsing and generation APIs with a validated, common, >> symbolic form for constants in Java class files. >> >> There is an easy way to

[jdk19] Integrated: 8290455: jck test api/java_lang/foreign/VaList/Empty.html fails on some platforms

2022-07-25 Thread Maurizio Cimadamore
On Thu, 21 Jul 2022 12:06:37 GMT, Maurizio Cimadamore wrote: > The javadoc for `Linker` states that some operations throw > `UnsupportedOperationException` when called on an unsupported platform. These > operations are: > > * `Linker::nativeLinker` > * `VaList::empty`

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-22 Thread Maurizio Cimadamore
On Fri, 22 Jul 2022 16:41:24 GMT, Jorn Vernee wrote: >> This patch removes the use of std::thread from the `java.lang.foreign` >> tests, and switches to the OS specific thread APIs, in order to change >> things such as the stack size on some platforms where this is required in >> the future

Re: RFR: 8290059: Do not use std::thread in panama tests

2022-07-22 Thread Maurizio Cimadamore
On Thu, 21 Jul 2022 18:48:14 GMT, Jorn Vernee wrote: > This patch removes the use of std::thread from the `java.lang.foreign` tests, > and switches to the OS specific thread APIs, in order to change things such > as the stack size on some platforms where this is required in the future (see >

[jdk19] RFR: 8290455: jck test api/java_lang/foreign/VaList/Empty.html fails on some platforms

2022-07-21 Thread Maurizio Cimadamore
The javadoc for `Linker` states that some operations throw `UnsupportedOperationException` when called on an unsupported platform. These operations are: * `Linker::nativeLinker` * `VaList::empty` * `VaList::make` * `VaList::ofAddress` While the code throws an UOE as required, since the

[jdk19] Integrated: 8290524: Typo in javadoc of MemorySegment/MemoryAddress

2022-07-19 Thread Maurizio Cimadamore
On Tue, 19 Jul 2022 11:07:27 GMT, Maurizio Cimadamore wrote: > This patch fixes several `toRowLongValue` instead of `toRawLongValue` > scattered in the javadoc for accessor methods in `MemorySegment` and > `MemoryAddress`. This pull request has now been integrated. Changeset:

[jdk19] RFR: 8290524: Typo in javadoc of MemorySegment/MemoryAddress

2022-07-19 Thread Maurizio Cimadamore
This patch fixes several `toRowLongValue` instead of `toRawLongValue` scattered in the javadoc for accessor methods in `MemorySegment` and `MemoryAddress`. - Commit messages: - Fix MemoryAddress typos - Initial push Changes: https://git.openjdk.org/jdk19/pull/148/files Webrev:

[jdk19] Withdrawn: 8288697: Clarify lifecycle of buffer segments and loader lookup

2022-07-11 Thread Maurizio Cimadamore
On Fri, 17 Jun 2022 21:39:16 GMT, Maurizio Cimadamore wrote: > This is a dependent PR containing a cleanup of the so called *heap sessions*. > Heap sessions are used in two cases: > > * when a buffer segment is created, to keep the original buffer instance > reachable &g

[jdk19] RFR: 8288850: SegmentAllocator:allocate() can return null some cases

2022-07-11 Thread Maurizio Cimadamore
This patch fixes an issue where the arena allocator does not detect an overflow when attempting to allocate a new slice. - Commit messages: - Initial push Changes: https://git.openjdk.org/jdk19/pull/133/files Webrev: https://webrevs.openjdk.org/?repo=jdk19=133=00 Issue:

[jdk19] RFR: 8289365: SegmentAllocator:allocateArray(MemoryLayout, count) does not throw IAEx when count is -1

2022-07-11 Thread Maurizio Cimadamore
The default implementation for `SegmentAllocator:allocateArray(MemoryLayout, count)` is missing a check for negative array size. In the past this used to be caught in the `SequenceLayout` factory, but not anymore, as now `SequenceLayout` accepts `-1` as special size where the sequence element

Re: [jdk19] RFR: 8288697: Clarify lifecycle of buffer segments and loader lookup [v2]

2022-07-11 Thread Maurizio Cimadamore
ct, the javadoc for > MemorySegment::ofBuffer claims, (wrongly!) that the session of the resulting > segment is the global session - but that's not the case. Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:

[jdk19] Integrated: 8287809: Revisit implementation of memory session

2022-07-11 Thread Maurizio Cimadamore
On Wed, 15 Jun 2022 18:06:44 GMT, Maurizio Cimadamore wrote: > This is a JDK 19 clone of: https://github.com/openjdk/jdk/pull/9017 This pull request has now been integrated. Changeset: fed3af8a Author: Maurizio Cimadamore URL: https://git.openjdk.org/jdk19/com

Re: JMH results for IndexedLinkedList

2022-07-11 Thread Maurizio Cimadamore
efficient than LinkedList as it doesn't use nodes). ConcurrentLinkedDeque would be useful in the face of multiple threads (it uses nodes though, so won't be as fast as ArrayDeque). --John On 11/07/2022 11:58, Maurizio Cimadamore wrote: The implementation of the Foreign Function & Memory

Re: JMH results for IndexedLinkedList

2022-07-11 Thread Maurizio Cimadamore
The implementation of the Foreign Function & Memory API uses an internal custom linked list to add native resources to a "memory session" abstraction (things that need to be cleaned up at a later point). Linked list is quite critical in our use case because we need something that has a very

[jdk19] RFR: 8290071: Javadoc for MemorySegment/MemoryAddress getter/setters contains some typos

2022-07-11 Thread Maurizio Cimadamore
Some of the accessors in `MemorySegment` and `MemoryAddress` (esp. setters) have typos - e.g. they use `from` instead of `into`. I've tried to simplify the text and made it more regular. - Commit messages: - Initial push Changes: https://git.openjdk.org/jdk19/pull/131/files

<    4   5   6   7   8   9   10   >