[foreign-preview] RFR: 8280721: Rewrite binding of foreign classes to use javaClasses.h/cpp [v3]
Jorn Vernee
jvernee at openjdk.java.net
Mon Feb 21 16:14:36 UTC 2022
> Hi,
>
> This patch is a refactoring of the binding between the VM and several Java classes using by the linker.
>
> The usual way of creating such mappings is by declaring a C++ companion class in javaClasses.(h/c)pp, but because the bound Javas classes were previously in an incubator module, that wasn't possible.
>
> Now that we have moved to java.base, we can create the missing C++ companion classes, and remove the code that did ad-hoc lookup of field offsets in the constructor of the ForeignGlobals class in the VM.
>
> Additionally, this patch also removes 2 proxy classes (VMStorageProxy and ABIDescriptorProxy) that are no longer needed. As well as move NativeEntryPoint from the jdk.internal.invoke package to the jdk.internal.foreign package, since it was the only class in that package.
>
> Thanks,
> Jorn
Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits:
- Drop incorrect imports
- Fix spurious semantics change
- Merge branch 'foreign-preview' into Move_Internal_Invoke
- Merge branch 'foreign-preview' into Move_Internal_Invoke
- Remove unimplemented NativeCallConv::print_on
- Add direct javaClasses bindings for panama foreign classes
- Remove jdk.internal.invoke package
-------------
Changes: https://git.openjdk.java.net/panama-foreign/pull/634/files
Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=634&range=02
Stats: 618 lines in 27 files changed: 314 ins; 245 del; 59 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/634.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/634/head:pull/634
PR: https://git.openjdk.java.net/panama-foreign/pull/634
More information about the panama-dev
mailing list