RFR: 8284579: Improve VarHandle checks for interpreter [v2]
ExE Boss
duke at openjdk.java.net
Mon Apr 11 10:07:39 UTC 2022
On Mon, 11 Apr 2022 09:53:31 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/invoke/VarHandle.java line 2075:
>>
>>> 2073:
>>> 2074: @DontInline
>>> 2075: final void throwWrongMethodTypeException(VarHandle.AccessDescriptor ad) {
>>
>> This can actually be `private` ~~and `static`~~:
>> Suggestion:
>>
>> private final void throwWrongMethodTypeException(VarHandle.AccessDescriptor ad) {
>
> `private` yes. `static` would require to pass the `MethodType` and since this is an exceptional slow-path it doesn't make sense to keep the complexity contained inside the `throw...` method.
Right, I missed the `accessModeType(…)` call.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8160
More information about the core-libs-dev
mailing list