8267614: Outline VarHandleGuards exact behavior checks

Reviewed-by: psandoz, mchung
This commit is contained in:
Claes Redestad 2021-05-24 23:02:40 +00:00
parent f6909596ca
commit c519ba2e43
3 changed files with 95 additions and 324 deletions

View file

@ -686,10 +686,7 @@ final class VarHandles {
// @LambdaForm.Compiled
// @Hidden
// static final <METHOD> throws Throwable {
// if (handle.hasInvokeExactBehavior() && handle.accessModeType(ad.type) != ad.symbolicMethodTypeExact) {
// throw new WrongMethodTypeException("expected " + handle.accessModeType(ad.type) + " but found "
// + ad.symbolicMethodTypeExact);
// }
// handle.checkExactAccessMode(ad);
// if (handle.isDirect() && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) {
// <RESULT_ERASED>MethodHandle.linkToStatic(<LINK_TO_STATIC_ARGS>);<RETURN_ERASED>
// } else {
@ -704,10 +701,7 @@ final class VarHandles {
// @LambdaForm.Compiled
// @Hidden
// static final <METHOD> throws Throwable {
// if (handle.hasInvokeExactBehavior() && handle.accessModeType(ad.type) != ad.symbolicMethodTypeExact) {
// throw new WrongMethodTypeException("expected " + handle.accessModeType(ad.type) + " but found "
// + ad.symbolicMethodTypeExact);
// }
// handle.checkExactAccessMode(ad);
// if (handle.isDirect() && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) {
// MethodHandle.linkToStatic(<LINK_TO_STATIC_ARGS>);
// } else if (handle.isDirect() && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) {