RFR: 8254354: Add a withInvokeExactBehavior() VarHandle combinator [v9]
Jorn Vernee
jvernee at openjdk.java.net
Fri Nov 6 17:01:34 UTC 2020
On Fri, 30 Oct 2020 15:23:28 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 12 additional commits since the last revision:
>>
>> - Update Javadoc, and rename asExact and asGeneric to withInvokeExactBehaviour and withInvokeBehaviour
>> - Merge branch 'master' into Exact_VarHandle
>> - Use AccessType ordinal in guard checks instead of the AccessMode ordinal
>> - Update accessModeType to use the AccessType ordinal directly.
>> - Add benchmarks
>> - - Update javadoc
>> - Make isExact() public
>> - Fixes failing tests, and enable verifier on Exact test
>> - Fix whitespace
>> - Comment out VarHandleGuards generator code
>> - Makes exactness a property of a VarHandle, not a VarForm, since the latter are shared. Use handle.accessModeType to get the exact type of the VarHandle.
>> - ... and 2 more: https://git.openjdk.java.net/jdk/compare/84ce7081...3c707bc7
>
> Looks good. There is just one difference between the spec and implementation. The spec states:
>> If this VarHandle already has invoke{-exact} behaviour this VarHandle is returned.
>
> I prefer this behaviour, but feel free to update the spec if you like e.g. If ... already has XXX then a new VH with exactly the same behaviour as this VH is returned.
>
> I just realized i used "behaviour", the english spelling. We should use the US spelling, "behavior", which is more commonly used throughout the JDK documentation.
@ChrisHegarty Thanks for the comments. I've implemented them.
-------------
PR: https://git.openjdk.java.net/jdk/pull/843
More information about the core-libs-dev
mailing list