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

Maurizio Cimadamore mcimadamore at openjdk.java.net
Tue Apr 27 13:41:08 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:

  Fix javadoc for implicit scope impl

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

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

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

  Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 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