Re: RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v15]
On Wed, 30 Mar 2022 20:59:34 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-424 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjdk.java.net/jeps/424 > > Maurizio Cimadamore has updated the pull request incrementally with one > additional commit since the last revision: > > Tweak FunctionDescriptor::argumentLayouts to return an immutable list src/java.base/share/classes/java/lang/foreign/FunctionDescriptor.java line 73: > 71: */ > 72: public List argumentLayouts() { > 73: return Collections.unmodifiableList(argLayouts); This change doesn’t seem to be necessary, as `FunctionDescriptor` is already created with `List.of(…)` (or `Stream.toList()` in the case of `FunctionDescriptor.VariadicFunction`), which produce immutable lists (although `Stream.toList()` permits `null`s, which `Stream.collect(Collectors.toImmutableList())` and `List.of(…)` doesn’t). - PR: https://git.openjdk.java.net/jdk/pull/7888
Re: RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v15]
> This PR contains the API and implementation changes for JEP-424 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.java.net/jeps/424 Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: Tweak FunctionDescriptor::argumentLayouts to return an immutable list - Changes: - all: https://git.openjdk.java.net/jdk/pull/7888/files - new: https://git.openjdk.java.net/jdk/pull/7888/files/0bcc8664..af41a76c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=7888=14 - incr: https://webrevs.openjdk.java.net/?repo=jdk=7888=13-14 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/7888.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7888/head:pull/7888 PR: https://git.openjdk.java.net/jdk/pull/7888