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

2022-11-28 Thread Paul Sandoz
On Wed, 23 Nov 2022 17:33:06 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.
>> 
>> [1] - https://openjdk.org/jeps/434
>
> Maurizio Cimadamore has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   * remove unused Scoped interface
>   * re-add trusting of final fields in layout class implementations
>   * Fix BulkOps benchmark, which had alignment issues

Marked as reviewed by psandoz (Reviewer).

src/java.base/share/classes/jdk/internal/foreign/FunctionDescriptorImpl.java 
line 57:

> 55:  * {@return the return layout (if any) associated with this function 
> descriptor}
> 56:  */
> 57: public final Optional returnLayout() {

No need for `final` since class is final.

Suggestion:

public Optional returnLayout() {

src/java.base/share/classes/jdk/internal/foreign/SlicingAllocator.java line 33:

> 31: public final class SlicingAllocator implements SegmentAllocator {
> 32: 
> 33: public static final long DEFAULT_BLOCK_SIZE = 4 * 1024;

Not used.

-

PR: https://git.openjdk.org/jdk/pull/10872


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

2022-11-28 Thread Per Minborg
On Wed, 23 Nov 2022 17:33:06 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.
>> 
>> [1] - https://openjdk.org/jeps/434
>
> Maurizio Cimadamore has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   * remove unused Scoped interface
>   * re-add trusting of final fields in layout class implementations
>   * Fix BulkOps benchmark, which had alignment issues

Looks good on API level.

-

Marked as reviewed by pminborg (no project role).

PR: https://git.openjdk.org/jdk/pull/10872


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

2022-11-28 Thread Jorn Vernee
On Wed, 23 Nov 2022 17:33:06 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.
>> 
>> [1] - https://openjdk.org/jeps/434
>
> Maurizio Cimadamore has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   * remove unused Scoped interface
>   * re-add trusting of final fields in layout class implementations
>   * Fix BulkOps benchmark, which had alignment issues

Latest version looks good to me as well

-

Marked as reviewed by jvernee (Reviewer).

PR: https://git.openjdk.org/jdk/pull/10872


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 the pull request incrementally with one 
additional commit since the last revision:

  * remove unused Scoped interface
  * re-add trusting of final fields in layout class implementations
  * Fix BulkOps benchmark, which had alignment issues

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/10872/files
  - new: https://git.openjdk.org/jdk/pull/10872/files/3c75e097..97168155

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk=10872=30
 - incr: https://webrevs.openjdk.org/?repo=jdk=10872=29-30

  Stats: 56 lines in 5 files changed: 8 ins; 39 del; 9 mod
  Patch: https://git.openjdk.org/jdk/pull/10872.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10872/head:pull/10872

PR: https://git.openjdk.org/jdk/pull/10872