Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v4]

2024-04-16 Thread Per Minborg
ut (e.g. following a `MemorySegment::reinterpret` > operation). Per Minborg has updated the pull request incrementally with three additional commits since the last revision: - Update src/java.base/share/classes/java/lang/foreign/MemorySegment.java Co-authored-by: Maurizio Cimadamor

RFR: 8330272: Fix javadocs for ValueLayout.(JAVA_LONG|JAVA_DOUBLE)

2024-04-16 Thread Per Minborg
This PR proposes to update the javadocs for `ValueLayout.JAVA_LONG` and `ValueLayout.JAVA_DOUBLE` to reflect the changes made in https://bugs.openjdk.org/browse/JDK-8326172 (we forgot to update the docs when that issue was fixed) - Commit messages: - Update copyright year - Fix

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v3]

2024-04-15 Thread Per Minborg
ut (e.g. following a `MemorySegment::reinterpret` > operation). Per Minborg 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 ten additional commits sin

Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v4]

2024-04-15 Thread Per Minborg
; This PR proposes to add a convenience method `SymbolLookup::findOrThrow` that > will do a lookup and, if no symbol can be found, throws an > `IllegalArgumentException` with a relevant exception message. Per Minborg has updated the pull request incrementally with one additional commit

Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v3]

2024-04-15 Thread Per Minborg
; This PR proposes to add a convenience method `SymbolLookup::findOrThrow` that > will do a lookup and, if no symbol can be found, throws an > `IllegalArgumentException` with a relevant exception message. Per Minborg has updated the pull request incrementally with one additional commit

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v2]

2024-04-15 Thread Per Minborg
On Mon, 15 Apr 2024 10:16:30 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Update >> src/java.base/share/classes/jdk/internal/foreign/HeapMemorySe

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v2]

2024-04-15 Thread Per Minborg
On Mon, 15 Apr 2024 10:07:31 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Update >> src/java.base/share/classes/jdk/internal/foreign/HeapMemorySe

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v2]

2024-04-15 Thread Per Minborg
On Mon, 15 Apr 2024 10:05:44 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Update >> src/java.base/share/classes/jdk/internal/foreign/HeapMemorySe

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v2]

2024-04-15 Thread Per Minborg
ut (e.g. following a `MemorySegment::reinterpret` > operation). Per Minborg has updated the pull request incrementally with three additional commits since the last revision: - Update src/java.base/share/classes/jdk/internal/foreign/HeapMemorySegmentImpl.java Co-authored-by: Jorn Vernee -

Integrated: 8330176: Typo in Linker javadoc

2024-04-15 Thread Per Minborg
On Mon, 15 Apr 2024 08:21:41 GMT, Per Minborg wrote: > This PR fixes a typo in the `Linker` documentation. This pull request has now been integrated. Changeset: 60d88b7a Author: Per Minborg URL: https://git.openjdk.org/jdk/commit/60d88b7ae2945724ab4db44207e3390bcff172c0 Stats:

Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v2]

2024-04-15 Thread Per Minborg
; This PR proposes to add a convenience method `SymbolLookup::findOrThrow` that > will do a lookup and, if no symbol can be found, throws an > `IllegalArgumentException` with a relevant exception message. Per Minborg has updated the pull request incrementally with two additional commits

RFR: 8330176: Typo in Linker javadoc

2024-04-15 Thread Per Minborg
This PR fixes a typo in the `Linker` documentation. - Commit messages: - Fix typo in Linker javadoc Changes: https://git.openjdk.org/jdk/pull/18781/files Webrev: https://webrevs.openjdk.org/?repo=jdk=18781=00 Issue: https://bugs.openjdk.org/browse/JDK-8330176 Stats: 2 lines

RFR: 8329997: Add provisions for checking memory segment alignment constraints

2024-04-15 Thread Per Minborg
This PR proposes to add a new method `MemorySegment::maxByteAlignment` that returns the maximum byte alignment of a segment (both heap and native segments). Clients can then use this method to determine if a segment is properly aligned for any given layout (e.g. following a

RFR: 8314592: Add shortcut to SymbolLookup::find

2024-04-11 Thread Per Minborg
While `SymbolLookup` correctly uses an `Optional` return to denote whether a symbol has been found by the lookup or not (which enables composition of symbol lookups), many clients end up just calling `Optional::get`, or `Optional::orElseThrow()` on the result. This PR proposes to add a

Withdrawn: 8329997: Add MemorySegment::reinterpretate overloads for alignment constraints

2024-04-11 Thread Per Minborg
On Wed, 10 Apr 2024 12:49:11 GMT, Per Minborg wrote: > This PR proposes to add two overloads `MemorySegment::reinterpretate` to > allow aligned reinterpretation. This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/18717

RFR: 8329997: Add MemorySegment::reinterpretate overloads for alignment constraints

2024-04-10 Thread Per Minborg
This PR proposes to add two overloads `MemorySegment::reinterpretate` to allow aligned reinterpretation. - Commit messages: - Update copyright year - Add MemorySegment::reinterpretate overloads for alignment constraints Changes: https://git.openjdk.org/jdk/pull/18717/files

Integrated: JDK-8329089: Empty immutable list throws the wrong exception type for remove(first | last) operations

2024-04-05 Thread Per Minborg
On Tue, 2 Apr 2024 10:37:02 GMT, Per Minborg wrote: > This PR proposes to make empty immutable lists always throw UOE on > `removeFirst` and `removeLast`. This pull request has now been integrated. Changeset: b71acc70 Author: Per Minborg URL: https://git.openjdk.org/jdk/

Re: RFR: JDK-8329089: Empty immutable list throws the wrong exception type for remove(first | last) operations

2024-04-04 Thread Per Minborg
On Wed, 3 Apr 2024 15:09:15 GMT, Roger Riggs wrote: >> This PR proposes to make empty immutable lists always throw UOE on >> `removeFirst` and `removeLast`. > > test/jdk/java/util/Collection/MOAT.java line 573: > >> 571: c::removeLast); >> 572: } >> 573: > > Would this

RFR: JDK-8329089: Empty immutable list throws the wrong exception type for remove(first | last) operations

2024-04-02 Thread Per Minborg
This PR proposes to make empty immutable lists always throw UOE on `removeFirst` and `removeLast`. - Commit messages: - Make empty immutable lists always throw UOE on remove(F|L) Changes: https://git.openjdk.org/jdk/pull/18581/files Webrev:

Re: RFR: 8323552: AbstractMemorySegmentImpl#mismatch returns -1 when comparing distinct areas of the same instance of MemorySegment [v3]

2024-03-25 Thread Per Minborg
On Thu, 11 Jan 2024 16:21:38 GMT, Peter Levart wrote: >> I belive there is a bug in `AbstractMemorySegmentImpl#mismatch` method. It >> returns `-1` (meaning that regions are equal) when passing the same instance >> of MemorySegment as both `srcSegment` and `dstSegment` parameters regardless

Integrated: 8323552: AbstractMemorySegmentImpl#mismatch returns -1 when comparing distinct areas of the same instance of MemorySegment

2024-03-25 Thread Per Minborg
On Thu, 21 Mar 2024 09:23:45 GMT, Per Minborg wrote: > This PR proposes to remove an old optimization check that was incorrect > making `AbstractMemorySegmentImpl::mismatch` always return `-1` if the source > and destination segment are the same (disregarding offsets). This pull re

RFR: 8323552: AbstractMemorySegmentImpl#mismatch returns -1 when comparing distinct areas of the same instance of MemorySegment

2024-03-21 Thread Per Minborg
This PR proposes to remove an old optimization check that was incorrect making `AbstractMemorySegmentImpl::mismatch` always return `-1` if the source and destination segment are the same (disregarding offsets). - Commit messages: - Remove comment out markings - Remove erroneous

Re: RFR: 8326941: Remove StringUTF16::isBigEndian

2024-03-19 Thread Per Minborg
On Mon, 18 Mar 2024 22:51:55 GMT, Claes Redestad wrote: >> This PR proposes to remove the native method `StringUTF16::isBigEndian` and >> its corresponding C implementation and instead rely on the >> `jdk.internal.misc.Unsafe::isBigEndian` method. >> >> This PR passes tier1-3 tests. > >>

Integrated: 8326941: Remove StringUTF16::isBigEndian

2024-03-19 Thread Per Minborg
On Mon, 18 Mar 2024 14:09:09 GMT, Per Minborg wrote: > This PR proposes to remove the native method `StringUTF16::isBigEndian` and > its corresponding C implementation and instead rely on the > `jdk.internal.misc.Unsafe::isBigEndian` method. > > This PR passes tier1-3 te

Re: RFR: 8326941: Remove StringUTF16::isBigEndian

2024-03-18 Thread Per Minborg
On Mon, 18 Mar 2024 14:35:06 GMT, Claes Redestad wrote: > Does this change how early `Unsafe` is initialized, and does it in turn have > dependencies on `StringUTF16`? `StringUTF16` is loaded very early, especially > if `-XX:-CompactStrings` is supplied and I would assume the only reason this

RFR: 8326941: Remove StringUTF16::isBigEndian

2024-03-18 Thread Per Minborg
This PR proposes to remove the native method `StringUTF16::isBigEndian` and its corresponding C implementation and instead rely on the `jdk.internal.misc.Unsafe::isBigEndian` method. - Commit messages: - Update copyright years - Remove native method Changes:

Re: RFR: 8310837: Use ByteArrayLittleEndian in java.util.zip [v7]

2024-02-28 Thread Per Minborg
On Tue, 16 Jan 2024 16:38:34 GMT, Glavo wrote: >> Using `ByteArrayLittleEndian` is simpler and faster. >> >> `make test TEST="micro:java.util.zip.ZipFileOpen"`: >> >> >> Benchmark (size) Mode Cnt Score Error >> Units >> - ZipFileOpen.openCloseZipFile

Integrated: 8326112: Javadoc snippet for Linker.Option.captureCallState is wrong

2024-02-19 Thread Per Minborg
On Mon, 19 Feb 2024 08:19:58 GMT, Per Minborg wrote: > This PR proposes to add an offset parameter for a `VarHandle` invocation in > the Javadoc snippet for `Linker.Option.captureCallState()`. The offset > parameter was added in 22 but it was forgotten to add it in said Javadoc.

RFR: 8326112: Javadoc snippet for Linker.Option.captureCallState is wrong

2024-02-19 Thread Per Minborg
This PR proposes to add an offset parameter for a `VarHandle` invocation in the Javadoc snippet for `Linker.Option.captureCallState()`. The offset parameter was added in 22 but it was forgotten to add it in said Javadoc. - Commit messages: - Add offset parameter to VarHandle

[jdk22] Integrated: 8325001: Typo in the javadocs for the Arena::ofShared method

2024-02-08 Thread Per Minborg
On Thu, 1 Feb 2024 12:07:52 GMT, Per Minborg wrote: > 8325001: Typo in the javadocs for the Arena::ofShared method This pull request has now been integrated. Changeset: 6d9a50ea Author: Per Minborg URL: https://git.openjdk.org/jdk22/commit/6d9a50ea148c1c37b9a1d0475d4aae78ea8f8

Integrated: 8323746: Add PathElement hashCode and equals

2024-02-08 Thread Per Minborg
On Wed, 31 Jan 2024 13:04:07 GMT, Per Minborg wrote: > This PR proposes to implement `hashCode()` and `equals()` methods for > implementations of `PathElement`. > > In doing so, the previous `PathElementImpl` was removed and replaced in favor > of distinct `record` implem

Re: RFR: 8323746: Add PathElement hashCode and equals [v2]

2024-02-08 Thread Per Minborg
On Sat, 3 Feb 2024 11:28:51 GMT, ExE Boss wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Make all PathElements records > > src/java.base/share/classes/jdk/internal/foreign/Layou

Re: RFR: 8323746: Add PathElement hashCode and equals [v3]

2024-02-08 Thread Per Minborg
could use pattern > matching (for example) internally but not in client code. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Rework hashCode implementations and add a test for hash codes - Changes: - all: https://git.openjdk

Re: RFR: 8316493: Remove the caching fields in AbstractMap [v11]

2024-02-04 Thread Per Minborg
On Fri, 10 Nov 2023 08:17:22 GMT, Per Minborg wrote: >> This PR outlines a solution for making immutable maps `@ValueBased` by >> removing cacheing of certain values in `AbstractMap`. >> >> By removing these caching fields in `AbstractMap`, we can make the immutab

Re: RFR: 8323746: Add PathElement hashCode and equals [v2]

2024-02-01 Thread Per Minborg
could use pattern > matching (for example) internally but not in client code. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Make all PathElements records - Changes: - all: https://git.openjdk.org/jdk/pull/17651/files -

Re: RFR: JDK-8325148: Enable restricted javac warning in java.base [v2]

2024-02-01 Thread Per Minborg
On Thu, 1 Feb 2024 22:19:26 GMT, Joe Darcy wrote: >> The restricted javac warning is disabled for java.base, but could be enabled >> by suppressing the warning in a handful of files. > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision:

Re: RFR: 8323746: Add PathElement hashCode and equals

2024-02-01 Thread Per Minborg
On Wed, 31 Jan 2024 18:21:09 GMT, Maurizio Cimadamore wrote: >> This PR proposes to implement `hashCode()` and `equals()` methods for >> implementations of `PathElement`. >> >> In doing so, the previous `PathElementImpl` was removed and replaced in >> favor of distinct `record`

[jdk22] RFR: 8325001: Typo in the javadocs for the Arena::ofShared method

2024-02-01 Thread Per Minborg
8325001: Typo in the javadocs for the Arena::ofShared method - Commit messages: - Backport 6b84f9bb3ee4362bf9daa4fb3905b168f9035336 Changes: https://git.openjdk.org/jdk22/pull/100/files Webrev: https://webrevs.openjdk.org/?repo=jdk22=100=00 Issue:

Integrated: 8325001: Typo in the javadocs for the Arena::ofShared method

2024-02-01 Thread Per Minborg
On Wed, 31 Jan 2024 13:12:10 GMT, Per Minborg wrote: > This PR fixes a typo in the documentation for the `Arena::ofShared`. This pull request has now been integrated. Changeset: 6b84f9bb Author: Per Minborg URL: https://git.openjdk.org/jdk/com

Integrated: 8323621: JDK build should exclude snippet class in java.lang.foreign

2024-01-31 Thread Per Minborg
On Fri, 12 Jan 2024 15:17:42 GMT, Per Minborg wrote: > This PR proposes to remove the snippet files in > `java/lang/foreign/snippet-files` from the build. This pull request has now been integrated. Changeset: f2920533 Author: Per Minborg URL: https://git.openjdk.org/jdk/

RFR: 8325001: Typo in the javadocs for the Arena::ofShared method

2024-01-31 Thread Per Minborg
This PR fixes a typo in the documentation for the `Arena::ofShared`. - Commit messages: - Fix typo Changes: https://git.openjdk.org/jdk/pull/17653/files Webrev: https://webrevs.openjdk.org/?repo=jdk=17653=00 Issue: https://bugs.openjdk.org/browse/JDK-8325001 Stats: 1 line in 1

RFR: 8323746: Add PathElement hashCode and equals

2024-01-31 Thread Per Minborg
This PR proposes to implement `hashCode()` and `equals()` methods for implementations of `PathElement`. In doing so, the previous `PathElementImpl` was removed and replaced in favor of distinct `record` implementations, each reflecting its own path element selection type. This also allowed the

Integrated: 8323601: Improve LayoutPath.PathElement::toString

2024-01-31 Thread Per Minborg
On Mon, 15 Jan 2024 07:56:13 GMT, Per Minborg wrote: > This PR proposes to add an improved Improve > `LayoutPath.PathElement::toString` method simplifying debugging. > > Opinions and suggestions for `static PathElement sequenceElement(long start, > long step)` are welcome. Th

Re: RFR: 8323601: Improve LayoutPath.PathElement::toString [v4]

2024-01-30 Thread Per Minborg
> This PR proposes to add an improved Improve > `LayoutPath.PathElement::toString` method simplifying debugging. > > Opinions and suggestions for `static PathElement sequenceElement(long start, > long step)` are welcome. Per Minborg has updated the pull request increme

Re: RFR: 8323601: Improve LayoutPath.PathElement::toString [v3]

2024-01-29 Thread Per Minborg
> This PR proposes to add an improved Improve > `LayoutPath.PathElement::toString` method simplifying debugging. > > Opinions and suggestions for `static PathElement sequenceElement(long start, > long step)` are welcome. Per Minborg has updated the pull request with a new

Re: RFR: 8323601: Improve LayoutPath.PathElement::toString [v2]

2024-01-29 Thread Per Minborg
On Tue, 16 Jan 2024 09:10:04 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/lang/foreign/MemoryLayout.java line 958: >> >>> 956: return new >>> LayoutPath.PathElementImpl(PathKind.DEREF_ELEMENT, >>> 957:

Re: RFR: 8323621: JDK build should exclude snippet class in java.lang.foreign [v2]

2024-01-29 Thread Per Minborg
> This PR proposes to remove the snippet files in > `java/lang/foreign/snippet-files` from the build. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Correct path to excluded directory - Changes: - all:

Re: RFR: 8323621: JDK build should exclude snippet class in java.lang.foreign [v2]

2024-01-29 Thread Per Minborg
On Mon, 15 Jan 2024 13:27:25 GMT, Magnus Ihse Bursie wrote: >> If possible, we should simply exclude all files in directories that have `-` >> (minus sign) in their name; this is the intentional design to prevent javac >> from compiling those classes as package names cannot include `-`. > > I

Re: RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate [v5]

2024-01-29 Thread Per Minborg
On Sun, 28 Jan 2024 00:57:24 GMT, ExE Boss wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Update copyright year >> - Add test for zero-out > > test/jdk/java/foreig

[jdk22] Integrated: 8323159: Consider adding some text re. memory zeroing in Arena::allocate

2024-01-17 Thread Per Minborg
On Mon, 15 Jan 2024 16:14:15 GMT, Per Minborg wrote: > 8323159: Consider adding some text re. memory zeroing in Arena::allocate This pull request has now been integrated. Changeset: 887a93b7 Author: Per Minborg URL: https://git.openjdk.org/jdk22/com

Re: RFR: 8323601: Improve LayoutPath.PathElement::toString [v2]

2024-01-16 Thread Per Minborg
On Mon, 15 Jan 2024 17:10:47 GMT, Jorn Vernee wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rework PathElement:toString > > src/java.base/share/classes/java/lang/foreign/MemoryL

Re: [jdk22] RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate [v2]

2024-01-16 Thread Per Minborg
On Mon, 15 Jan 2024 16:23:34 GMT, Alan Bateman wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add missing comma in TestScope.java > > test/jdk/java/foreign/TestScope.java line 2: >

Re: [jdk22] RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate [v2]

2024-01-16 Thread Per Minborg
> 8323159: Consider adding some text re. memory zeroing in Arena::allocate Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Add missing comma in TestScope.java - Changes: - all: https://git.openjdk.org/jdk22/pull

Integrated: 8323745: Missing comma in copyright header in TestScope

2024-01-15 Thread Per Minborg
On Mon, 15 Jan 2024 16:25:41 GMT, Per Minborg wrote: > This PR proposed to fix a missing comma in the header of TestScope This pull request has now been integrated. Changeset: edc0ebb7 Author: Per Minborg URL: https://git.openjdk.org/jdk/com

Integrated: 8323745: Missing comma in copyright header in TestScope

2024-01-15 Thread Per Minborg
This PR proposed to fix a missing comma in the header of TestScope - Commit messages: - Add missing comma in copyright header Changes: https://git.openjdk.org/jdk/pull/17431/files Webrev: https://webrevs.openjdk.org/?repo=jdk=17431=00 Issue:

[jdk22] RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate

2024-01-15 Thread Per Minborg
8323159: Consider adding some text re. memory zeroing in Arena::allocate - Commit messages: - Backport f5b757ced6b672010ea10575d644d3f9d1728923 Changes: https://git.openjdk.org/jdk22/pull/77/files Webrev: https://webrevs.openjdk.org/?repo=jdk22=77=00 Issue:

Integrated: 8323159: Consider adding some text re. memory zeroing in Arena::allocate

2024-01-15 Thread Per Minborg
On Mon, 8 Jan 2024 16:16:50 GMT, Per Minborg wrote: > This PR proposes to add a clarification that an `Arena` always returns > zeroed-out segments for `Arena::allocate` methods. > > Note that other overloaded methods refer to the abstract `Arena::allocate` > method via imple

Re: RFR: 8323601: Improve LayoutPath.PathElement::toString [v2]

2024-01-15 Thread Per Minborg
> This PR proposes to add an improved Improve > `LayoutPath.PathElement::toString` method simplifying debugging. > > Opinions and suggestions for `static PathElement sequenceElement(long start, > long step)` are welcome. Per Minborg has updated the pull request increme

Re: RFR: 8323601: Improve LayoutPath.PathElement::toString

2024-01-15 Thread Per Minborg
On Mon, 15 Jan 2024 07:56:13 GMT, Per Minborg wrote: > This PR proposes to add an improved Improve > `LayoutPath.PathElement::toString` method simplifying debugging. > > Opinions and suggestions for `static PathElement sequenceElement(long start, > long step)` are welcome.

RFR: 8323601: Improve LayoutPath.PathElement::toString

2024-01-15 Thread Per Minborg
This PR proposes to add an improved Improve `LayoutPath.PathElement::toString` method simplifying debugging. Opinions and suggestions for `static PathElement sequenceElement(long start, long step)` are welcome. - Commit messages: - Add toString to PathElement Changes:

RFR: 8323621: JDK build should exclude snippet class in java.lang.foreign

2024-01-12 Thread Per Minborg
This PR proposes to remove the snippet files in `java/lang/foreign/snippet-files` from the build. - Commit messages: - Exclude snipet files Changes: https://git.openjdk.org/jdk/pull/17403/files Webrev: https://webrevs.openjdk.org/?repo=jdk=17403=00 Issue:

[jdk22] Integrated: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario

2024-01-12 Thread Per Minborg
On Tue, 9 Jan 2024 08:10:16 GMT, Per Minborg wrote: > 8321786: SegmentAllocator:allocateFrom(ValueLayout, > MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario This pull request has now been integrated. Changeset: 3909d74a Author: Per Minborg URL:

Re: [jdk22] RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario

2024-01-12 Thread Per Minborg
On Wed, 10 Jan 2024 15:23:01 GMT, Maurizio Cimadamore wrote: >> test/jdk/java/foreign/TestSegmentAllocators.java line 234: >> >>> 232: // WrongThreadException if this method is called from a >>> thread {@code T}, >>> 233: // such that {@code source.isAccessibleBy(T) ==

Re: RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate [v5]

2024-01-12 Thread Per Minborg
> This PR proposes to add a clarification that an `Arena` always returns > zeroed-out segments for `Arena::allocate` methods. > > Note that other overloaded methods refer to the abstract `Arena::allocate` > method via implementation notes. Per Minborg has updated the pull reques

Re: RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate [v4]

2024-01-12 Thread Per Minborg
> This PR proposes to add a clarification that an `Arena` always returns > zeroed-out segments for `Arena::allocate` methods. > > Note that other overloaded methods refer to the abstract `Arena::allocate` > method via implementation notes. Per Minborg has updated the pull reques

Re: RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate [v3]

2024-01-12 Thread Per Minborg
> This PR proposes to add a clarification that an `Arena` always returns > zeroed-out segments for `Arena::allocate` methods. > > Note that other overloaded methods refer to the abstract `Arena::allocate` > method via implementation notes. Per Minborg has updated the pull reques

Re: RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate [v2]

2024-01-11 Thread Per Minborg
> This PR proposes to add a clarification that an `Arena` always returns > zeroed-out segments for `Arena::allocate` methods. > > Note that other overloaded methods refer to the abstract `Arena::allocate` > method via implementation notes. Per Minborg has updated the pull reques

Re: [jdk22] RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario

2024-01-10 Thread Per Minborg
On Tue, 9 Jan 2024 17:11:42 GMT, Maurizio Cimadamore wrote: >> 8321786: SegmentAllocator:allocateFrom(ValueLayout, >> MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario > > src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 1944: > >> 1942: *

[jdk22] RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario

2024-01-09 Thread Per Minborg
8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario - Commit messages: - Backport 7edd10e5fa71dafbbad2343b7f5ff0a75ac9 Changes: https://git.openjdk.org/jdk22/pull/42/files Webrev:

RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate

2024-01-08 Thread Per Minborg
This PR proposes to add a clarification that an `Arena` always returns zeroed-out segments for `Arena::allocate` methods. Note that other overloaded methods refer to the abstract `Arena::allocate` method via implementation notes. - Commit messages: - Add in @implSpec that

Integrated: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario

2024-01-08 Thread Per Minborg
On Tue, 12 Dec 2023 10:02:00 GMT, Per Minborg wrote: > This PR proposes to change the specification for some methods that take > `long` offsets so that they will throw an `IllegalArgumentException` rather > than an `IndexOutOfBoundsException` for negative values. > > The P

Re: RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario [v10]

2024-01-05 Thread Per Minborg
would overflow > and the specified exception was not thrown. Per Minborg 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 10 additional commits since

Re: RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario [v9]

2024-01-05 Thread Per Minborg
would overflow > and the specified exception was not thrown. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Fix docs for read-only exceptions - Changes: - all: https://git.openjdk.org/jdk/pull/17079/files - new: https

Re: RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario [v8]

2024-01-05 Thread Per Minborg
would overflow > and the specified exception was not thrown. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Fix formatting in test - Changes: - all: https://git.openjdk.org/jdk/pull/17079/files - new: https://git.op

Re: RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario [v7]

2023-12-12 Thread Per Minborg
would overflow > and the specified exception was not thrown. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Move @throws tag - Changes: - all: https://git.openjdk.org/jdk/pull/17079/files - new: https://git.openjdk.

Re: RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario [v6]

2023-12-12 Thread Per Minborg
would overflow > and the specified exception was not thrown. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Correct exception type in JavaDocs for SA:allocateFrom - Changes: - all: https://git.openjdk.org/jdk/pull/1

Re: RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario [v5]

2023-12-12 Thread Per Minborg
would overflow > and the specified exception was not thrown. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Update after comments - Changes: - all: https://git.openjdk.org/jdk/pull/17079/files - new: https://git.op

Re: RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario [v4]

2023-12-12 Thread Per Minborg
would overflow > and the specified exception was not thrown. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Revert change in allocateNoInit - Changes: - all: https://git.openjdk.org/jdk/pull/17079/files - new: https

Re: RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario [v3]

2023-12-12 Thread Per Minborg
would overflow > and the specified exception was not thrown. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Remove Math.multiply exact and change exception type - Changes: - all: https://git.openjdk.org/jdk/pull/17079/fi

Re: RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario [v2]

2023-12-12 Thread Per Minborg
would overflow > and the specified exception was not thrown. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Update after comments and discussion - Changes: - all: https://git.openjdk.org/jdk/pull/17079/fi

Re: RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario

2023-12-12 Thread Per Minborg
On Tue, 12 Dec 2023 11:45:22 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/lang/foreign/SegmentAllocator.java line 737: >> >>> 735: private MemorySegment allocateNoInit(MemoryLayout layout, long >>> size) { >>> 736: long byteSize

Re: RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario

2023-12-12 Thread Per Minborg
On Tue, 12 Dec 2023 11:05:44 GMT, Maurizio Cimadamore wrote: >> This PR proposes to change the specification for some methods that take >> `long` offsets so that they will throw an `IllegalArgumentException` rather >> than an `IndexOutOfBoundsException` for negative values. >> >> The PR also

RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario

2023-12-12 Thread Per Minborg
This PR proposes to change the specification for some methods that take `long` offsets so that they will throw an `IllegalArgumentException` rather than an `IndexOutOfBoundsException` for negative values. The PR also proposes to fix a bug where the allocation size would overflow and the

[jdk22] Integrated: 8321387: SegmentAllocator:allocateFrom(AddressLayout, MemorySegment) does not throw stated UnsupportedOperationException

2023-12-11 Thread Per Minborg
On Mon, 11 Dec 2023 16:26:52 GMT, Per Minborg wrote: > This PR is a backport of https://github.com/openjdk/jdk/pull/16993 This pull request has now been integrated. Changeset: e88a0220 Author: Per Minborg URL: https://git.openjdk.org/jdk22/com

[jdk22] RFR: 8321387: SegmentAllocator:allocateFrom(AddressLayout, MemorySegment) does not throw stated UnsupportedOperationException

2023-12-11 Thread Per Minborg
This PR is a backport of https://github.com/openjdk/jdk/pull/16993 - Commit messages: - Backport d13302f8b06f65319426a25a9368abaf72f3c247 Changes: https://git.openjdk.org/jdk22/pull/7/files Webrev: https://webrevs.openjdk.org/?repo=jdk22=7=00 Issue:

Integrated: 8321387: SegmentAllocator:allocateFrom(AddressLayout, MemorySegment) does not throw stated UnsupportedOperationException

2023-12-10 Thread Per Minborg
On Wed, 6 Dec 2023 13:52:37 GMT, Per Minborg wrote: > This PR proposes to change the exception type for exceptions thrown for > certain methods with a parameter of type `MemorySegment` when it is > `MemorySegment::isReadOnly`. Previously an `UnsupportedOperationException` > w

Re: RFR: 8321620: Optimize JImage decompressors

2023-12-08 Thread Per Minborg
On Wed, 8 Nov 2023 11:55:22 GMT, Glavo wrote: > This PR significantly speeds up decompressing resources in Jimage while > significantly reducing temporary memory allocations in the process. > > This will improve startup speed for runtime images generated using `jlink > --compress 1` and

Re: RFR: 8321387: SegmentAllocator:allocateFrom(AddressLayout, MemorySegment) does not throw stated UnsupportedOperationException [v5]

2023-12-07 Thread Per Minborg
; It should be noted that this PR retains the previous behavior for MS > VarHandle access (even though the MS is a parameter to the accessor methods, > the first parameter can be said to represent `this`). Per Minborg has updated the pull request incrementally with one additional co

Re: RFR: 8321387: SegmentAllocator:allocateFrom(AddressLayout, MemorySegment) does not throw stated UnsupportedOperationException [v3]

2023-12-07 Thread Per Minborg
On Wed, 6 Dec 2023 15:36:57 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update throws docs fror SegmentAllocator > > src/java.base/share/classes/java/lang

Re: RFR: 8321387: SegmentAllocator:allocateFrom(AddressLayout, MemorySegment) does not throw stated UnsupportedOperationException [v4]

2023-12-07 Thread Per Minborg
; It should be noted that this PR retains the previous behavior for MS > VarHandle access (even though the MS is a parameter to the accessor methods, > the first parameter can be said to represent `this`). Per Minborg has updated the pull request incrementally with one additional commit si

Re: RFR: 8321467: MemorySegment.setString(long, String, Charset) throws IAE(Misaligned access) [v2]

2023-12-06 Thread Per Minborg
On Wed, 6 Dec 2023 17:03:08 GMT, Maurizio Cimadamore wrote: >> This PR fixes a couple of aligned accesses when reading/writing strings. >> Such aligned accesses crept in when we optimized string read/write >> operations to work in bulk. As a result, depending on the maximum alignment >>

Re: RFR: 8321387: SegmentAllocator:allocateFrom(AddressLayout, MemorySegment) does not throw stated UnsupportedOperationException [v3]

2023-12-06 Thread Per Minborg
; It should be noted that this PR retains the previous behavior for MS > VarHandle access (even though the MS is a parameter to the accessor methods, > the first parameter can be said to represent `this`). Per Minborg has updated the pull request incrementally with one additional commit si

Re: RFR: 8321387: SegmentAllocator:allocateFrom(AddressLayout, MemorySegment) does not throw stated UnsupportedOperationException [v2]

2023-12-06 Thread Per Minborg
; It should be noted that this PR retains the previous behavior for MS > VarHandle access (even though the MS is a parameter to the accessor methods, > the first parameter can be said to represent `this`). Per Minborg has updated the pull request incrementally with one additional commit s

RFR: 8321387: SegmentAllocator:allocateFrom(AddressLayout, MemorySegment) does not throw stated UnsupportedOperationException

2023-12-06 Thread Per Minborg
This PR proposes to change the exception type for exceptions thrown for certain methods with a parameter of type `MemorySegment` when it is `MemorySegment::isReadOnly`. Previously an `UnsupportedOperationException` was specified but in some cases, in reality, an `IllegalArgumentException` was

Integrated: 8321159: SymbolLookup.libraryLookup(Path, Arena) Assumes default Filesystem

2023-12-06 Thread Per Minborg
On Mon, 4 Dec 2023 07:29:37 GMT, Per Minborg wrote: > This PR proposes to reject paths provided to the > `SymbolLookup.libraryLookup(Path path, Arena arena)` method if a path is not > in the default file system. This pull request has now been integrated. Changeset: a0920aa4 Autho

Re: RFR: 8321159: SymbolLookup.libraryLookup(Path, Arena) Assumes default Filesystem [v5]

2023-12-05 Thread Per Minborg
> This PR proposes to reject paths provided to the > `SymbolLookup.libraryLookup(Path path, Arena arena)` method if a path is not > in the default file system. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Fix double

Re: RFR: 8321159: SymbolLookup.libraryLookup(Path, Arena) Assumes default Filesystem [v4]

2023-12-04 Thread Per Minborg
> This PR proposes to reject paths provided to the > `SymbolLookup.libraryLookup(Path path, Arena arena)` method if a path is not > in the default file system. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Chang

Re: RFR: 8321159: SymbolLookup.libraryLookup(Path, Arena) Assumes default Filesystem [v3]

2023-12-04 Thread Per Minborg
> This PR proposes to reject paths provided to the > `SymbolLookup.libraryLookup(Path path, Arena arena)` method if a path is not > in the default file system. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Add fail

Re: RFR: 8321159: SymbolLookup.libraryLookup(Path, Arena) Assumes default Filesystem [v2]

2023-12-04 Thread Per Minborg
> This PR proposes to reject paths provided to the > `SymbolLookup.libraryLookup(Path path, Arena arena)` method if a path is not > in the default file system. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Improve after

RFR: 8321159: SymbolLookup.libraryLookup(Path, Arena) Assumes default Filesystem

2023-12-03 Thread Per Minborg
This PR proposes to reject paths provided to the `SymbolLookup.libraryLookup(Path path, Arena arena)` method if a path is not in the default file system. - Commit messages: - Fix logic - Reject paths not in the default file system Changes:

<    1   2   3   4   5   6   7   >