[foreign-abi] [Rev 01] RFR: 8237585: Dismantle ForeignUnsafe

Jorn Vernee jvernee at openjdk.java.net
Thu Mar 19 16:10:16 UTC 2020


> Hi,
> 
> This is a redo of the earlier patch to dismantle ForeignUnsafe. It replaces ForeignUnsafe with the Foreign interface,
> and the InternalForeign implementation of that interface.
> This PR removes the need to pass --add-exports to make ForeignUnsafe accessible, and replaces it with a runtime check
> on the `jdk.incubator.foreign.Foreign` system property, which is checked when calling `Foreign::getInstance`. The
> `Foreign` object returned from that method acts as an access token for accessing native interop functionality. The
> SystemABI::getInstance factory has also been moved to Foreign, along with the methods that were previously found in
> ForeignUnsafe. All have now been made non-static.  I've updated the tests and also removed the SysV ABI
> `jdk.internal.foreign.NativeInvoker.FASTPATH` which was no longer being used.  Jorn

Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:

  Review comments

-------------

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/56/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/56/files/f8d1c809..a0132dcf

Webrevs:
 - full: https://webrevs.openjdk.java.net/panama-foreign/56/webrev.01
 - incr: https://webrevs.openjdk.java.net/panama-foreign/56/webrev.00-01

  Stats: 3 lines in 2 files changed: 0 ins; 1 del; 2 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/56.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/56/head:pull/56

PR: https://git.openjdk.java.net/panama-foreign/pull/56


More information about the panama-dev mailing list