[foreign-memaccess] [Rev 01] RFR: Backport misc changes from foreign-abi

Jorn Vernee jvernee at openjdk.java.net
Tue Mar 31 17:07:16 UTC 2020


> Hi,
> 
> This patch backports several changes that went into the foreign-abi branch, but which are in retrospect useful to have
> on the memaccess branch, and as part of the memory access API as well.
> These changes include:
> - Replacing ForeignUnsafe with Foreign
> - Adding the `ofNativeUnchecked` method to create unchecked MemorySegments, MemoryAddress::ofLong to forge
>   MemoryAddresses from longs, as well as the Nothing segment and rebase support. Mainly to support going from a `long` to
>   `MemoryAddress`, and also to `MemorySegment` (MA -> long is already covered) The memory layout attributes exposed in
>   the public API (could be interesting to investigate attaching carrier types directly to layouts).
> 
> The MemoryAddress carrier support for VarHandles is left out for now, since the current thinking is that it will be
> dropped and replaced with VarHandle combinators to convert between long and MA instead.
> Thanks,
> Jorn

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

  Addressing review comments:
  - removed MemoryAddressImpl::ofLongUnchecked methods
  - removed MemoryAddress::NULL

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

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/77/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/77/files/c6e25088..02f2d49f

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

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

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


More information about the panama-dev mailing list