Re: RFR: 8326172: Dubious claim on long[]/double[] alignment in MemorySegment javadoc [v3]

2024-02-28 Thread Guoxiong Li
On Mon, 26 Feb 2024 15:10:55 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> re-widen test > > src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 328: > >> 326: *

Re: RFR: 8326172: Dubious claim on long[]/double[] alignment in MemorySegment javadoc [v2]

2024-02-26 Thread Maurizio Cimadamore
On Mon, 26 Feb 2024 19:19:56 GMT, Jorn Vernee wrote: >> Found the right one: >> https://github.com/openjdk/jdk/commit/44218b1c9e5daa33557aac9336251cf8398d81eb > > Switched back to using the old generator (and removed the newer one): >

Re: RFR: 8326172: Dubious claim on long[]/double[] alignment in MemorySegment javadoc [v3]

2024-02-26 Thread Maurizio Cimadamore
On Mon, 26 Feb 2024 19:17:56 GMT, Jorn Vernee wrote: >> This patch changes the alignment for `JAVA_LONG` and `JAVA_DOUBLE` to 8, >> regardless of the underlying platform. This means that atomic access modes >> work on memory segments wrapping `long[]` or `double[]`, as they already do >> when

Re: RFR: 8326172: Dubious claim on long[]/double[] alignment in MemorySegment javadoc [v2]

2024-02-26 Thread Jorn Vernee
On Mon, 26 Feb 2024 19:13:41 GMT, Jorn Vernee wrote: >> That doesn't seem to be the right PR link? > > Found the right one: > https://github.com/openjdk/jdk/commit/44218b1c9e5daa33557aac9336251cf8398d81eb Switched back to using the old generator (and removed the newer one):

Re: RFR: 8326172: Dubious claim on long[]/double[] alignment in MemorySegment javadoc [v2]

2024-02-26 Thread Jorn Vernee
On Mon, 26 Feb 2024 19:10:39 GMT, Jorn Vernee wrote: >> test/jdk/java/foreign/TestLayouts.java line 164: >> >>> 162: ); >>> 163: assertEquals(struct.byteSize(), 1 + 1 + 2 + 4 + 8); >>> 164: assertEquals(struct.byteAlignment(), 8); >> >> Looking at this PR: >>

Re: RFR: 8326172: Dubious claim on long[]/double[] alignment in MemorySegment javadoc [v3]

2024-02-26 Thread Jorn Vernee
> This patch changes the alignment for `JAVA_LONG` and `JAVA_DOUBLE` to 8, > regardless of the underlying platform. This means that atomic access modes > work on memory segments wrapping `long[]` or `double[]`, as they already do > when using `MethodHandless::arrayAccessVarHandle`. > > After

Re: RFR: 8326172: Dubious claim on long[]/double[] alignment in MemorySegment javadoc [v2]

2024-02-26 Thread Jorn Vernee
On Mon, 26 Feb 2024 16:21:38 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> review comments > > test/jdk/java/foreign/TestLayouts.java line 164: > >> 162: ); >> 163:

Re: RFR: 8326172: Dubious claim on long[]/double[] alignment in MemorySegment javadoc [v2]

2024-02-26 Thread Maurizio Cimadamore
On Mon, 26 Feb 2024 16:05:51 GMT, Jorn Vernee wrote: >> This patch changes the alignment for `JAVA_LONG` and `JAVA_DOUBLE` to 8, >> regardless of the underlying platform. This means that atomic access modes >> work on memory segments wrapping `long[]` or `double[]`, as they already do >> when

Re: RFR: 8326172: Dubious claim on long[]/double[] alignment in MemorySegment javadoc [v2]

2024-02-26 Thread Jorn Vernee
On Mon, 26 Feb 2024 15:10:55 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> review comments > > src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 328: > >> 326: *

Re: RFR: 8326172: Dubious claim on long[]/double[] alignment in MemorySegment javadoc [v2]

2024-02-26 Thread Jorn Vernee
> This patch changes the alignment for `JAVA_LONG` and `JAVA_DOUBLE` to 8, > regardless of the underlying platform. This means that atomic access modes > work on memory segments wrapping `long[]` or `double[]`, as they already do > when using `MethodHandless::arrayAccessVarHandle`. > > After

Re: RFR: 8326172: Dubious claim on long[]/double[] alignment in MemorySegment javadoc

2024-02-26 Thread Maurizio Cimadamore
On Mon, 26 Feb 2024 13:24:11 GMT, Jorn Vernee wrote: > This patch changes the alignment for `JAVA_LONG` and `JAVA_DOUBLE` to 8, > regardless of the underlying platform. This means that atomic access modes > work on memory segments wrapping `long[]` or `double[]`, as they already do > when

RFR: 8326172: Dubious claim on long[]/double[] alignment in MemorySegment javadoc

2024-02-26 Thread Jorn Vernee
This patch changes the alignment for `JAVA_LONG` and `JAVA_DOUBLE` to 8, regardless of the underlying platform. This means that atomic access modes work on memory segments wrapping `long[]` or `double[]`, as they already do when using `MethodHandless::arrayAccessVarHandle`. After discussion,