[foreign-preview] RFR: 8278414: Replace binding recipe customization using MH combinators with bytecode spinning [v2]
Jorn Vernee
jvernee at openjdk.java.net
Tue Feb 1 18:42:12 UTC 2022
On Tue, 1 Feb 2022 18:34:55 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Jorn Vernee has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Address review comments
>> - Change ValueLayout toString
>
> src/java.base/share/classes/jdk/internal/foreign/abi/BindingSpecializer.java line 662:
>
>> 660: }
>> 661:
>> 662: private void emitInvokeStatic(String ownerInternalName, String methodName, String descriptor) {
>
> Any reason as to why using a String for the owner instead of Class<?> - you want to avoid multiple computations, I guess? Having a class literal in the clients is much more readable IMHO than having a string constant.
>
> That said, maybe we can find a compromise :-)
>
> Why not naming the INTRN constants in a regular way, so that it's clear what they refer to?
> e.g.
>
> JAVA_LANG_INVOKE_MEMORYLAYOUT
>
> or, if we are ok dropping the package, just:
>
>
> MEMORY_LAYOUT
>
>
> E.g. drop the INTRN suffix - that should make things more readable.
Wasn't done yet :) (forgot to apply that part of the suggestion) These methods now take a class literal, and I've removed the unneeded INTRN constants
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/635
More information about the panama-dev
mailing list