[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 17:42:23 UTC 2022
On Tue, 1 Feb 2022 13:26:04 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/Binding.java line 637:
>
>> 635: }
>> 636:
>> 637: /**
>
> This class seems to still have a `specialize method`
Good catch, forgot to remove those
> src/java.base/share/classes/jdk/internal/foreign/abi/Specializer.java line 64:
>
>> 62: import static jdk.internal.org.objectweb.asm.Opcodes.*;
>> 63:
>> 64: public class Specializer {
>
> Maybe a less generic name would be better? Like BindingSpecializer?
Done.
> src/java.base/share/classes/jdk/internal/foreign/abi/Specializer.java line 452:
>
>> 450: }
>> 451:
>> 452: private void emitLoadInteralAllocator() {
>
> Typo: loadInterNalAllocator
Good catch
> src/java.base/share/classes/jdk/internal/foreign/abi/Specializer.java line 600:
>
>> 598:
>> 599: // operand/srcSegment is on the stack
>> 600: // copy(MemorySegment srcSegment, long srcOffset, MemorySegment dstSegment, long dstOffset, long bytes)
>
> I found those comments confusing, as they almost look like commented out code :-)
I tried to make the comments a bit more clear. It's intended as a mental note of the signature of the method that is being invoked in the bytecode below.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/635
More information about the panama-dev
mailing list