[foreign-preview] RFR: 8280721: Rewrite binding of foreign classes to use javaClasses.h/cpp
Jorn Vernee
jvernee at openjdk.java.net
Mon Jan 31 16:33:05 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
-------------
Commit messages:
- 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=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8280721
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