Re: [jdk20] RFR: 8299090: Specify coordinate order for additional CaptureCallState parameters on class as well [v2]

2023-01-11 Thread Maurizio Cimadamore
On Wed, 11 Jan 2023 13:17:53 GMT, Jorn Vernee wrote: >> A small doc clarification that also specifies where the additional >> MemorySegment parameter of a downcall method handle linked with the >> captureCallState option appears in the parameter list, on the >> CaptureCallState class. > > Jorn

Re: [jdk20] RFR: 8299090: Specify coordinate order for additional CaptureCallState parameters on class as well

2023-01-11 Thread Maurizio Cimadamore
On Wed, 11 Jan 2023 02:19:26 GMT, Jorn Vernee wrote: > A small doc clarification that also specifies where the additional > MemorySegment parameter of a downcall method handle linked with the > captureCallState option appears in the parameter list, on the > CaptureCallState class. src/java.ba

[jdk20] Integrated: 8299862: OfAddress setter should disallow heap segments

2023-01-11 Thread Maurizio Cimadamore
On Tue, 10 Jan 2023 14:04:38 GMT, Maurizio Cimadamore wrote: > When unifying memory address with memory segments, we missed the case where a > heap memory segment is passed as a value to a var handle address setters. > > The solution is to reuse the same check we use when valida

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v5]

2023-01-10 Thread Maurizio Cimadamore
On Tue, 10 Jan 2023 19:20:35 GMT, Archie L. Cobbs wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java >> line 1098: >> >>> 1096: private void visitLooped(T tree, Consumer >>> visitor) { >>> 1097: this.visitScoped(tree, false, t -> { >>> 1098:

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v5]

2023-01-10 Thread Maurizio Cimadamore
On Tue, 10 Jan 2023 19:18:04 GMT, Archie L. Cobbs wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java >> line 85: >> >>> 83: * >>> 84: * >>> 85: * When tracking references, we distinguish between direct references >>> and indirect references, >> >> I'

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v5]

2023-01-10 Thread Maurizio Cimadamore
On Tue, 10 Jan 2023 19:42:06 GMT, Archie L. Cobbs wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 2345: >> >>> 2343: if (!innerType.hasTag(CLASS) || !outerType.hasTag(CLASS)) >>> 2344: return false; >>> 2345: innerType = erasure(inner

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v5]

2023-01-10 Thread Maurizio Cimadamore
On Sat, 7 Jan 2023 21:08:07 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is gener

[jdk20] RFR: 8299862: OfAddress setter should disallow heap segments

2023-01-10 Thread Maurizio Cimadamore
When unifying memory address with memory segments, we missed the case where a heap memory segment is passed as a value to a var handle address setters. The solution is to reuse the same check we use when validating segment downcall parameters also for segment memory writes. - Commi

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Maurizio Cimadamore
On Mon, 9 Jan 2023 11:07:51 GMT, Uwe Schindler wrote: >> src/java.base/share/classes/java/io/Bits.java line 77: >> >>> 75: // Using Double.longBitsToDouble collapses NaN values to a >>> single >>> 76: // "canonical" NaN value >>> 77: return Double.longBitsToDouble((long)

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Maurizio Cimadamore
On Mon, 9 Jan 2023 09:22:25 GMT, Per Minborg wrote: >> Currently, `java.io.Bits` is using explicit logic to read/write various >> primitive types to/from byte arrays. Switching to the use of `VarHandle` >> access would provide better performance and less code. >> >> Also, using a standard API

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor

2023-01-06 Thread Maurizio Cimadamore
On Fri, 6 Jan 2023 15:38:31 GMT, Alan Bateman wrote: >>> The associated JBS issue has been dormant for 6+ years and this is a very >>> intrusive change affecting many, many files. Has the resurrection of this >>> project previously been discussed somewhere? >> >> Hi @dholmes-ora, >> >> The wo

[jdk20] Integrated: 8299740: CaptureCallState is missing @Preview annotation

2023-01-06 Thread Maurizio Cimadamore
On Fri, 6 Jan 2023 14:10:52 GMT, Maurizio Cimadamore wrote: > This patch adds `@Preview` to the CaptureCallState interface. This pull request has now been integrated. Changeset: 5eee2a07 Author: Maurizio Cimadamore URL: https://git.openjdk.org/jdk20/com

[jdk20] RFR: 8299740: CaptureCallState is missing @Preview annotation

2023-01-06 Thread Maurizio Cimadamore
This patch adds `@Preview` to the CaptureCallState interface. - Commit messages: - Add @Preview annotation to CaptureCallState Changes: https://git.openjdk.org/jdk20/pull/86/files Webrev: https://webrevs.openjdk.org/?repo=jdk20&pr=86&range=00 Issue: https://bugs.openjdk.org/brows

[jdk20] Integrated: 8299561: VaList.empty() doesn't return a list associated with the global scope

2023-01-05 Thread Maurizio Cimadamore
On Wed, 4 Jan 2023 10:49:09 GMT, Maurizio Cimadamore wrote: > This patch fixes a long-standing conformance issue: `VaList.empty` is > specified to return a `VaList` associated with the global scope, but in some > platforms (Aarch64/Linux and x64/Linux) the empty list is associate

Re: [jdk20] RFR: 8299561: VaList.empty() doesn't return a list associated with the global scope

2023-01-04 Thread Maurizio Cimadamore
On Wed, 4 Jan 2023 10:49:09 GMT, Maurizio Cimadamore wrote: > This patch fixes a long-standing conformance issue: `VaList.empty` is > specified to return a `VaList` associated with the global scope, but in some > platforms (Aarch64/Linux and x64/Linux) the empty list is associate

[jdk20] RFR: 8299561: VaList.empty() doesn't return a list associated with the global scope

2023-01-04 Thread Maurizio Cimadamore
This patch fixes a long-standing conformance issue: `VaList.empty` is specified to return a `VaList` associated with the global scope, but in some platforms (Aarch64/Linux and x64/Linux) the empty list is associated with an implicit scope instead. This doesn't make a lot of difference, given th

[jdk20] Integrated: 8298797: Specification of some restricted methods is incorrect

2022-12-16 Thread Maurizio Cimadamore
On Thu, 15 Dec 2022 10:43:35 GMT, Maurizio Cimadamore wrote: > This patch fixes some inconsistencies in the javadoc for restricted methods: > > * ModuleLayer.Controller::addEnableNativeAccess has a shorted text in its > `@throws` clause. This shorted text is now used everywh

[jdk20] RFR: 8298797: Specification of some restricted methods is incorrect

2022-12-15 Thread Maurizio Cimadamore
This patch fixes some inconsistencies in the javadoc for restricted methods: * ModuleLayer.Controller::addEnableNativeAccess has a shorted text in its `@throws` clause. This shorted text is now used everywhere. * One overload of `MemorySegment::ofAddress` is missing the restricted method narrati

Re: [jdk20] RFR: JDK-8298277: Replace "session" with "scope" for FFM access

2022-12-14 Thread Maurizio Cimadamore
On Wed, 14 Dec 2022 09:30:21 GMT, Per Minborg wrote: > This PR proposes changing variable names from `session` to `scope`. The > proposed changes are only for the FFM API and not other parts like the Vector > API and test classes. Looks good! - Marked as reviewed by mcimadamore (

Re: RFR: JDK-8298277: Replace "session" with "scope" for FFM access [v2]

2022-12-08 Thread Maurizio Cimadamore
On Thu, 8 Dec 2022 15:57:23 GMT, Per Minborg wrote: >> This PR proposes changing variable names and text from "session" to "scope". >> The proposed changes are only for the FFM API and not other parts like the >> Vector API and test classes. > > Per Minborg has updated the pull request incremen

Re: RFR: JDK-8298277: Replace "session" with "scope" for FFM access

2022-12-08 Thread Maurizio Cimadamore
On Thu, 8 Dec 2022 14:33:01 GMT, Maurizio Cimadamore wrote: >> This PR proposes changing variable names and text from "session" to "scope". >> The proposed changes are only for the FFM API and not other parts like the >> Vector API and test classe

Re: RFR: JDK-8298277: Replace "session" with "scope" for FFM access

2022-12-08 Thread Maurizio Cimadamore
On Thu, 8 Dec 2022 14:11:29 GMT, Per Minborg wrote: > This PR proposes changing variable names and text from "session" to "scope". > The proposed changes are only for the FFM API and not other parts like the > Vector API and test classes. src/java.base/share/classes/jdk/internal/foreign/Abstra

Re: RFR: 8298277: Replace "session" with "scope" for FFM access

2022-12-07 Thread Maurizio Cimadamore
On Wed, 7 Dec 2022 21:55:43 GMT, Per Minborg wrote: > This PR suggests renaming various names from "session" to "scope" in > accordance with https://openjdk.org/jeps/434 > > The PRs contains changes for several sub-components. I think we should split this PR into multiple parts: * there are so

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

2022-12-06 Thread Maurizio Cimadamore
On Mon, 5 Dec 2022 12:31:15 GMT, Andrew Haley wrote: >> JEP 429 implementation. > > Andrew Haley has updated the pull request incrementally with one additional > commit since the last revision: > > Add comment Marked as reviewed by mcimadamore (Reviewer). - PR: https://git.open

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

2022-12-05 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. > &

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

2022-12-05 Thread Maurizio Cimadamore
On Mon, 5 Dec 2022 10:31:52 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) [v39]

2022-12-05 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: 8291359: Specification of method j.l.foreign.VaList::skip still deserves clarification [v6]

2022-12-02 Thread Maurizio Cimadamore
On Fri, 2 Dec 2022 20:34:30 GMT, Jorn Vernee wrote: >> A small clarification of the VaList spec to say that attempts to access >> elements through an incorrect memory layout result in undefined behavior. > > Jorn Vernee has updated the pull request incrementally with one additional > commit sin

Re: RFR: 8291359: Specification of method j.l.foreign.VaList::skip still deserves clarification [v4]

2022-12-02 Thread Maurizio Cimadamore
On Fri, 2 Dec 2022 16:59:25 GMT, Jorn Vernee wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> rewrite doc > > src/java.base/share/classes/java/lang/foreign/VaList.java line 55: > >> 53: * and any other type that fi

Re: RFR: 8291359: Specification of method j.l.foreign.VaList::skip still deserves clarification [v2]

2022-12-01 Thread Maurizio Cimadamore
On Thu, 1 Dec 2022 17:53:02 GMT, Maurizio Cimadamore wrote: >> Yes, I mean the layout of the underlying value that is being accessed. i.e. >> can't access a boolean as an int. >> >> The behavior is undefined either way. Even when a VaList is created from

Re: RFR: 8291359: Specification of method j.l.foreign.VaList::skip still deserves clarification [v2]

2022-12-01 Thread Maurizio Cimadamore
On Thu, 1 Dec 2022 17:22:49 GMT, Jorn Vernee wrote: >> src/java.base/share/classes/java/lang/foreign/VaList.java line 56: >> >>> 54: * Safety considerations >>> 55: * The behavior of any attempts to access a value in the va list, >>> whether through one of the {@code nextVarg} overloads >>> 5

Re: RFR: 8291359: Specification of method j.l.foreign.VaList::skip still deserves clarification [v2]

2022-12-01 Thread Maurizio Cimadamore
On Wed, 30 Nov 2022 18:54:49 GMT, Jorn Vernee wrote: >> A small clarification of the VaList spec to say that attempts to access >> elements through an incorrect memory layout result in undefined behavior. > > Jorn Vernee has refreshed the contents of this pull request, and previous > commits ha

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

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) [v37]

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) [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: Ma

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 > (`-Djdk.internal.foreign.D

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 > fact

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 by

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 by

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 by

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 by

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 by

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 non-sess

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

2022-11-21 Thread Maurizio Cimadamore
On Mon, 21 Nov 2022 12:50:43 GMT, Per Minborg wrote: >> Would it be possible to re-examine acquireSession returning Runnable and >> acquireSessionAsAutoCloseable returning AutoCloseable. The naming is bit >> awkward at most of the use sites and maybe we can do better. > > I think it would be co

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 = >>> NIO_ACCESS.acquireSessionAsAutoCloseable(buff

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 evalu

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 the

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. If 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 n

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 evalu

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 sim

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 de

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 >> >> Suggest

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 orEls

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 src/jdk.incubator.concurrent/share/classes/jdk/incubator/con

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) >>> a

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

<    5   6   7   8   9   10   11   >