[foreign-memaccess+abi] RFR: Simplify ResourceScope::acquire for implicit scopes [v3]
Paul Sandoz
psandoz at openjdk.java.net
Tue Apr 27 15:26:48 UTC 2021
On Tue, 27 Apr 2021 13:49:16 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> 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
That's better IMHO, simpler to understand.
-------------
Marked as reviewed by psandoz (Committer).
PR: https://git.openjdk.java.net/panama-foreign/pull/523
More information about the panama-dev
mailing list