-
Enhancement
-
Resolution: Fixed
-
P3
-
16
-
None
-
b24
Currently, VarHandle invocations are always generic, which means that if the type of the VarHandle accessor does not match the invocation type exactly, we get an asType adaptation, which sometimes prevents the VarHandle from being optimized away.
To catch these cases more easily, we can add an asExact() method to VarHandle, which will return a new VarHandle that checks the invocation type against the VarHandel's type, and throws an exception if the types do not match, instead of trying to do a type adaptation.
To catch these cases more easily, we can add an asExact() method to VarHandle, which will return a new VarHandle that checks the invocation type against the VarHandel's type, and throws an exception if the types do not match, instead of trying to do a type adaptation.
- csr for
-
JDK-8255375 Add a withInvokeExactBehavior() VarHandle combinator
-
- Closed
-