[foreign-memaccess+abi] RFR: Simplify ResourceScope::acquire for implicit scopes
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Tue Apr 27 11:37:53 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
-------------
Commit messages:
- Initial push
Changes: https://git.openjdk.java.net/panama-foreign/pull/523/files
Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=523&range=00
Stats: 42 lines in 5 files changed: 6 ins; 18 del; 18 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