[foreign-memaccess+abi] RFR: Simplify ResourceScope::acquire for implicit scopes [v3]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Tue Apr 27 13:49:16 UTC 2021


> As suggested in [1], we can make the API for acquiring implicit scopes simpler if we tweak the implementation so that implicit scopes also implement the `HandleImpl` interface. If we do that, we could implement `acquire` by simply returning the implicit scope instance.
> 
> The simplification is that now, from a client perspective, acquiring a scope always gives back an handle that is associated with the original scope - we no longer *cheat* using the implicit scope handle singleton.
> 
> The acquire performance are not affected by this change (I've ran `BulkMismatchAcquire` before and after).
> 
> [1] - https://mail.openjdk.java.net/pipermail/panama-dev/2021-April/013516.html

Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:

  Remove redundant reachability fence in implementations for HandleImpl::release

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

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/523/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/523/files/bc296905..8d30b389

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=523&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=523&range=01-02

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

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


More information about the panama-dev mailing list