[Rev 01] RFR: 8238226: Revisit FunctionDescriptor
Jorn Vernee
jvernee at openjdk.java.net
Tue Feb 11 19:42:31 UTC 2020
On Tue, 11 Feb 2020 18:25:53 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> The pull request has been updated with 1 additional commit.
>
> test/jdk/java/foreign/StdLibTest.java line 352:
>
>> 351: }
>> 352: FunctionDescriptor printfSpec = StdLibHelper.printfBase.appendArgumentLayouts(
>> 353: args.stream().map(a -> a.layout).toArray(MemoryLayout[]::new));
>
> I would have dealt with expanding the function descriptor in the same loop where we expand the method type - but what you have is also fine.
Yeah, I like that better as well. I'll change it.
I guess I got a little tunnel visioned since the comment pointed at the line with `FunctionDescriptor.of(C_INT, argLayouts.toArray(new MemoryLayout[0])))` on GitHub, and doesn't show the for loop where the MethodType is expanded in the first place (neither does the email it looks like). From what I understand, multi-line review comments are in the works, so in the future it should be possible to attach a comment to a larger block of code.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/15
More information about the panama-dev
mailing list