diff --git a/make/ToolsJdk.gmk b/make/ToolsJdk.gmk index a7a2289f78a..629cadbf83a 100644 --- a/make/ToolsJdk.gmk +++ b/make/ToolsJdk.gmk @@ -130,6 +130,9 @@ TOOL_PUBLICSUFFIXLIST = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_clas TOOL_FIXUPPANDOC = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \ build.tools.fixuppandoc.Main +TOOL_VARHANDLEGUARDMETHODGENERATOR = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \ + build.tools.methodhandle.VarHandleGuardMethodGenerator + ################################################################################ # Executable javascript filter for man page generation using pandoc. diff --git a/make/jdk/src/classes/build/tools/methodhandle/VarHandleGuardMethodGenerator.java b/make/jdk/src/classes/build/tools/methodhandle/VarHandleGuardMethodGenerator.java new file mode 100644 index 00000000000..4cb833dffe2 --- /dev/null +++ b/make/jdk/src/classes/build/tools/methodhandle/VarHandleGuardMethodGenerator.java @@ -0,0 +1,325 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package build.tools.methodhandle; + +import java.io.PrintWriter; +import java.lang.classfile.TypeKind; +import java.lang.invoke.MethodType; +import java.lang.invoke.VarHandle; +import java.lang.reflect.Method; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * A helper program to generate the VarHandleGuards class with a set of + * static guard methods each of which corresponds to a particular shape and + * performs a type check of the symbolic type descriptor with the VarHandle + * type descriptor before linking/invoking to the underlying operation as + * characterized by the operation member name on the VarForm of the + * VarHandle. + *

+ * The generated class essentially encapsulates pre-compiled LambdaForms, + * one for each method, for the most common set of method signatures. + * This reduces static initialization costs, footprint costs, and circular + * dependencies that may arise if a class is generated per LambdaForm. + *

+ * A maximum of L*T*S methods will be generated where L is the number of + * access modes kinds (or unique operation signatures) and T is the number + * of variable types and S is the number of shapes (such as instance field, + * static field, or array access). + * If there are 4 unique operation signatures, 5 basic types (Object, int, + * long, float, double), and 3 shapes then a maximum of 60 methods will be + * generated. However, the number is likely to be less since there may + * be duplicate signatures. + *

+ * Each method is annotated with @LambdaForm.Compiled to inform the runtime + * that such methods should be treated as if a method of a class that is the + * result of compiling a LambdaForm. Annotation of such methods is + * important for correct evaluation of certain assertions and method return + * type profiling in HotSpot. + * + * @see java.lang.invoke.GenerateJLIClassesHelper + */ +public final class VarHandleGuardMethodGenerator { + + static final String CLASS_HEADER = """ + /* + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + package java.lang.invoke; + + import jdk.internal.vm.annotation.AOTSafeClassInitializer; + import jdk.internal.vm.annotation.ForceInline; + import jdk.internal.vm.annotation.Hidden; + + // This file is generated by build.tools.methodhandle.VarHandleGuardMethodGenerator. + // Do not edit! + @AOTSafeClassInitializer + final class VarHandleGuards { + """; + + static final String GUARD_METHOD_SIG_TEMPLATE = " _()"; + + static final String GUARD_METHOD_TEMPLATE = + """ + @ForceInline + @LambdaForm.Compiled + @Hidden + static final throws Throwable { + boolean direct = handle.checkAccessModeThenIsDirect(ad); + if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { + MethodHandle.linkToStatic(); + } else { + MethodHandle mh = handle.getMethodHandle(ad.mode); + mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(); + } + }"""; + + static final String GUARD_METHOD_TEMPLATE_V = + """ + @ForceInline + @LambdaForm.Compiled + @Hidden + static final throws Throwable { + boolean direct = handle.checkAccessModeThenIsDirect(ad); + if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { + MethodHandle.linkToStatic(); + } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { + MethodHandle.linkToStatic(); + } else { + MethodHandle mh = handle.getMethodHandle(ad.mode); + mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(); + } + }"""; + + // A template for deriving the operations + // could be supported by annotating VarHandle directly with the + // operation kind and shape + interface VarHandleTemplate { + Object get(); + + void set(Object value); + + boolean compareAndSet(Object actualValue, Object expectedValue); + + Object compareAndExchange(Object actualValue, Object expectedValue); + + Object getAndUpdate(Object value); + } + + record HandleType(Class receiver, Class... intermediates) { + } + + public static void main(String... args) throws Throwable { + if (args.length != 1) { + System.err.println("Usage: java VarHandleGuardMethodGenerator VarHandleGuards.java"); + System.exit(1); + } + + Path outputFile = Path.of(args[0]); + + try (PrintWriter pw = new PrintWriter(Files.newBufferedWriter( + outputFile, + StandardCharsets.UTF_8, + StandardOpenOption.CREATE, + StandardOpenOption.TRUNCATE_EXISTING))) { + print(pw); + } + } + + public static void print(PrintWriter pw) { + pw.println(CLASS_HEADER); + + // Declare the stream of shapes + List hts = List.of( + // Object->T + new HandleType(Object.class), + + // ->T + new HandleType(null), + + // Array[index]->T + new HandleType(Object.class, int.class), + + // MS[base]->T + new HandleType(Object.class, long.class), + + // MS[base][offset]->T + new HandleType(Object.class, long.class, long.class) + ); + + // The 5 JVM calling convention types + List> basicTypes = List.of(Object.class, int.class, long.class, float.class, double.class); + + Stream.of(VarHandleTemplate.class.getMethods()). + mapMulti((m, sink) -> { + for (var ht : hts) { + for (var bt : basicTypes) { + sink.accept(generateMethodType(m, ht.receiver, bt, ht.intermediates)); + } + } + }). + distinct(). + map(VarHandleGuardMethodGenerator::generateMethod). + forEach(pw::println); + + pw.println("}"); + } + + static MethodType generateMethodType(Method m, Class receiver, Class value, Class... intermediates) { + Class returnType = m.getReturnType() == Object.class + ? value : m.getReturnType(); + + List> params = new ArrayList<>(); + if (receiver != null) + params.add(receiver); + Collections.addAll(params, intermediates); + for (var p : m.getParameters()) { + params.add(value); + } + return MethodType.methodType(returnType, params); + } + + static String generateMethod(MethodType mt) { + Class returnType = mt.returnType(); + + var params = new LinkedHashMap(); + params.put("handle", className(VarHandle.class)); + for (int i = 0; i < mt.parameterCount(); i++) { + params.put("arg" + i, className(mt.parameterType(i))); + } + params.put("ad", "VarHandle.AccessDescriptor"); + + // Generate method signature line + String RETURN = className(returnType); + String NAME = "guard"; + String SIGNATURE = getSignature(mt); + String PARAMS = params.entrySet().stream(). + map(e -> e.getValue() + " " + e.getKey()). + collect(Collectors.joining(", ")); + String METHOD = GUARD_METHOD_SIG_TEMPLATE. + replace("", RETURN). + replace("", NAME). + replace("", SIGNATURE). + replace("", PARAMS); + + // Generate method + params.remove("ad"); + + List LINK_TO_STATIC_ARGS = new ArrayList<>(params.keySet()); + LINK_TO_STATIC_ARGS.add("handle.vform.getMemberName(ad.mode)"); + + List LINK_TO_INVOKER_ARGS = new ArrayList<>(params.keySet()); + LINK_TO_INVOKER_ARGS.set(0, LINK_TO_INVOKER_ARGS.get(0) + ".asDirect()"); + + RETURN = returnType == void.class + ? "" + : returnType == Object.class + ? "return " + : "return (" + returnType.getName() + ") "; + + String RESULT_ERASED = returnType == void.class + ? "" + : returnType != Object.class + ? "return (" + returnType.getName() + ") " + : "Object r = "; + + String RETURN_ERASED = returnType != Object.class + ? "" + : "\n return ad.returnType.cast(r);"; + + String template = returnType == void.class + ? GUARD_METHOD_TEMPLATE_V + : GUARD_METHOD_TEMPLATE; + return template. + replace("", METHOD). + replace("", NAME). + replaceAll("", RETURN). + replace("", RESULT_ERASED). + replace("", RETURN_ERASED). + replaceAll("", String.join(", ", LINK_TO_STATIC_ARGS)). + replace("", String.join(", ", LINK_TO_INVOKER_ARGS)) + .indent(4); + } + + static String className(Class c) { + String n = c.getCanonicalName(); + if (n == null) + throw new IllegalArgumentException("Not representable in source code: " + c); + if (!c.isPrimitive() && c.getPackageName().equals("java.lang")) { + n = n.substring("java.lang.".length()); + } else if (c.getPackageName().equals("java.lang.invoke")) { + n = n.substring("java.lang.invoke.".length()); + } + return n; + } + + static String getSignature(MethodType m) { + StringBuilder sb = new StringBuilder(m.parameterCount() + 1); + + for (int i = 0; i < m.parameterCount(); i++) { + Class pt = m.parameterType(i); + sb.append(getCharType(pt)); + } + + sb.append('_').append(getCharType(m.returnType())); + + return sb.toString(); + } + + static char getCharType(Class pt) { + return TypeKind.from(pt).upperBound().descriptorString().charAt(0); + } +} diff --git a/make/modules/java.base/gensrc/GensrcVarHandles.gmk b/make/modules/java.base/gensrc/GensrcVarHandles.gmk index 899f827462c..ec1aec5c764 100644 --- a/make/modules/java.base/gensrc/GensrcVarHandles.gmk +++ b/make/modules/java.base/gensrc/GensrcVarHandles.gmk @@ -302,5 +302,17 @@ TARGETS += $(GENSRC_VARHANDLES) ################################################################################ +GENSRC_VARHANDLEGUARDS := $(VARHANDLES_GENSRC_DIR)/VarHandleGuards.java + +$(GENSRC_VARHANDLEGUARDS): $(BUILD_TOOLS_JDK) + $(call LogInfo, Generating $@) + $(call MakeTargetDir) + $(TOOL_VARHANDLEGUARDMETHODGENERATOR) \ + $(GENSRC_VARHANDLEGUARDS) + +TARGETS += $(GENSRC_VARHANDLEGUARDS) + +################################################################################ + endif # include guard include MakeIncludeEnd.gmk diff --git a/src/java.base/share/classes/java/lang/invoke/VarHandleGuards.java b/src/java.base/share/classes/java/lang/invoke/VarHandleGuards.java deleted file mode 100644 index 49408a22cef..00000000000 --- a/src/java.base/share/classes/java/lang/invoke/VarHandleGuards.java +++ /dev/null @@ -1,1619 +0,0 @@ -/* - * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package java.lang.invoke; - -import jdk.internal.vm.annotation.AOTSafeClassInitializer; -import jdk.internal.vm.annotation.ForceInline; -import jdk.internal.vm.annotation.Hidden; - -// This class is auto-generated by java.lang.invoke.VarHandles$GuardMethodGenerator. Do not edit. -@AOTSafeClassInitializer -final class VarHandleGuards { - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final Object guard_L_L(VarHandle handle, Object arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - Object r = MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - return ad.returnType.cast(r); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final int guard_L_I(VarHandle handle, Object arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (int) MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (int) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final long guard_L_J(VarHandle handle, Object arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (long) MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (long) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_L_F(VarHandle handle, Object arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_L_D(VarHandle handle, Object arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final Object guard__L(VarHandle handle, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - Object r = MethodHandle.linkToStatic(handle, handle.vform.getMemberName(ad.mode)); - return ad.returnType.cast(r); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect()); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final int guard__I(VarHandle handle, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (int) MethodHandle.linkToStatic(handle, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (int) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect()); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final long guard__J(VarHandle handle, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (long) MethodHandle.linkToStatic(handle, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (long) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect()); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard__F(VarHandle handle, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect()); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard__D(VarHandle handle, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect()); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final Object guard_LI_L(VarHandle handle, Object arg0, int arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - Object r = MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - return ad.returnType.cast(r); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final int guard_LI_I(VarHandle handle, Object arg0, int arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (int) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (int) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final long guard_LI_J(VarHandle handle, Object arg0, int arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (long) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (long) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_LI_F(VarHandle handle, Object arg0, int arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_LI_D(VarHandle handle, Object arg0, int arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final Object guard_LJ_L(VarHandle handle, Object arg0, long arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - Object r = MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - return ad.returnType.cast(r); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final int guard_LJ_I(VarHandle handle, Object arg0, long arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (int) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (int) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final long guard_LJ_J(VarHandle handle, Object arg0, long arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (long) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (long) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_LJ_F(VarHandle handle, Object arg0, long arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_LJ_D(VarHandle handle, Object arg0, long arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final Object guard_LJJ_L(VarHandle handle, Object arg0, long arg1, long arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - Object r = MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - return ad.returnType.cast(r); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final int guard_LJJ_I(VarHandle handle, Object arg0, long arg1, long arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (int) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (int) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final long guard_LJJ_J(VarHandle handle, Object arg0, long arg1, long arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (long) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (long) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_LJJ_F(VarHandle handle, Object arg0, long arg1, long arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_LJJ_D(VarHandle handle, Object arg0, long arg1, long arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LL_V(VarHandle handle, Object arg0, Object arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LI_V(VarHandle handle, Object arg0, int arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LJ_V(VarHandle handle, Object arg0, long arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LF_V(VarHandle handle, Object arg0, float arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LD_V(VarHandle handle, Object arg0, double arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_L_V(VarHandle handle, Object arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_I_V(VarHandle handle, int arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_J_V(VarHandle handle, long arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_F_V(VarHandle handle, float arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_D_V(VarHandle handle, double arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LIL_V(VarHandle handle, Object arg0, int arg1, Object arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LII_V(VarHandle handle, Object arg0, int arg1, int arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LIJ_V(VarHandle handle, Object arg0, int arg1, long arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LIF_V(VarHandle handle, Object arg0, int arg1, float arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LID_V(VarHandle handle, Object arg0, int arg1, double arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LJL_V(VarHandle handle, Object arg0, long arg1, Object arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LJI_V(VarHandle handle, Object arg0, long arg1, int arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LJJ_V(VarHandle handle, Object arg0, long arg1, long arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LJF_V(VarHandle handle, Object arg0, long arg1, float arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LJD_V(VarHandle handle, Object arg0, long arg1, double arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LJJL_V(VarHandle handle, Object arg0, long arg1, long arg2, Object arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LJJI_V(VarHandle handle, Object arg0, long arg1, long arg2, int arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LJJJ_V(VarHandle handle, Object arg0, long arg1, long arg2, long arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LJJF_V(VarHandle handle, Object arg0, long arg1, long arg2, float arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final void guard_LJJD_V(VarHandle handle, Object arg0, long arg1, long arg2, double arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { - MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LLL_Z(VarHandle handle, Object arg0, Object arg1, Object arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LII_Z(VarHandle handle, Object arg0, int arg1, int arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LJJ_Z(VarHandle handle, Object arg0, long arg1, long arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LFF_Z(VarHandle handle, Object arg0, float arg1, float arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LDD_Z(VarHandle handle, Object arg0, double arg1, double arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LL_Z(VarHandle handle, Object arg0, Object arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_II_Z(VarHandle handle, int arg0, int arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_JJ_Z(VarHandle handle, long arg0, long arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_FF_Z(VarHandle handle, float arg0, float arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_DD_Z(VarHandle handle, double arg0, double arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LILL_Z(VarHandle handle, Object arg0, int arg1, Object arg2, Object arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LIII_Z(VarHandle handle, Object arg0, int arg1, int arg2, int arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LIJJ_Z(VarHandle handle, Object arg0, int arg1, long arg2, long arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LIFF_Z(VarHandle handle, Object arg0, int arg1, float arg2, float arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LIDD_Z(VarHandle handle, Object arg0, int arg1, double arg2, double arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LJLL_Z(VarHandle handle, Object arg0, long arg1, Object arg2, Object arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LJII_Z(VarHandle handle, Object arg0, long arg1, int arg2, int arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LJJJ_Z(VarHandle handle, Object arg0, long arg1, long arg2, long arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LJFF_Z(VarHandle handle, Object arg0, long arg1, float arg2, float arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LJDD_Z(VarHandle handle, Object arg0, long arg1, double arg2, double arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LJJLL_Z(VarHandle handle, Object arg0, long arg1, long arg2, Object arg3, Object arg4, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, arg4, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3, arg4); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LJJII_Z(VarHandle handle, Object arg0, long arg1, long arg2, int arg3, int arg4, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, arg4, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3, arg4); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LJJJJ_Z(VarHandle handle, Object arg0, long arg1, long arg2, long arg3, long arg4, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, arg4, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3, arg4); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LJJFF_Z(VarHandle handle, Object arg0, long arg1, long arg2, float arg3, float arg4, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, arg4, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3, arg4); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final boolean guard_LJJDD_Z(VarHandle handle, Object arg0, long arg1, long arg2, double arg3, double arg4, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (boolean) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, arg4, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (boolean) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3, arg4); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final Object guard_LLL_L(VarHandle handle, Object arg0, Object arg1, Object arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - Object r = MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - return ad.returnType.cast(r); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final int guard_LII_I(VarHandle handle, Object arg0, int arg1, int arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (int) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (int) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_LFF_F(VarHandle handle, Object arg0, float arg1, float arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_LDD_D(VarHandle handle, Object arg0, double arg1, double arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final Object guard_LL_L(VarHandle handle, Object arg0, Object arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - Object r = MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - return ad.returnType.cast(r); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final int guard_II_I(VarHandle handle, int arg0, int arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (int) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (int) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final long guard_JJ_J(VarHandle handle, long arg0, long arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (long) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (long) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_FF_F(VarHandle handle, float arg0, float arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_DD_D(VarHandle handle, double arg0, double arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final Object guard_LILL_L(VarHandle handle, Object arg0, int arg1, Object arg2, Object arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - Object r = MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - return ad.returnType.cast(r); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final int guard_LIII_I(VarHandle handle, Object arg0, int arg1, int arg2, int arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (int) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (int) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final long guard_LIJJ_J(VarHandle handle, Object arg0, int arg1, long arg2, long arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (long) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (long) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_LIFF_F(VarHandle handle, Object arg0, int arg1, float arg2, float arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_LIDD_D(VarHandle handle, Object arg0, int arg1, double arg2, double arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final Object guard_LJLL_L(VarHandle handle, Object arg0, long arg1, Object arg2, Object arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - Object r = MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - return ad.returnType.cast(r); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final int guard_LJII_I(VarHandle handle, Object arg0, long arg1, int arg2, int arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (int) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (int) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final long guard_LJJJ_J(VarHandle handle, Object arg0, long arg1, long arg2, long arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (long) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (long) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_LJFF_F(VarHandle handle, Object arg0, long arg1, float arg2, float arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_LJDD_D(VarHandle handle, Object arg0, long arg1, double arg2, double arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final Object guard_LJJLL_L(VarHandle handle, Object arg0, long arg1, long arg2, Object arg3, Object arg4, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - Object r = MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, arg4, handle.vform.getMemberName(ad.mode)); - return ad.returnType.cast(r); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3, arg4); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final int guard_LJJII_I(VarHandle handle, Object arg0, long arg1, long arg2, int arg3, int arg4, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (int) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, arg4, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (int) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3, arg4); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final long guard_LJJJJ_J(VarHandle handle, Object arg0, long arg1, long arg2, long arg3, long arg4, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (long) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, arg4, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (long) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3, arg4); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_LJJFF_F(VarHandle handle, Object arg0, long arg1, long arg2, float arg3, float arg4, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, arg4, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3, arg4); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_LJJDD_D(VarHandle handle, Object arg0, long arg1, long arg2, double arg3, double arg4, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, arg4, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3, arg4); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_LF_F(VarHandle handle, Object arg0, float arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_LD_D(VarHandle handle, Object arg0, double arg1, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, arg1, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final int guard_I_I(VarHandle handle, int arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (int) MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (int) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final long guard_J_J(VarHandle handle, long arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (long) MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (long) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_F_F(VarHandle handle, float arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_D_D(VarHandle handle, double arg0, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final Object guard_LIL_L(VarHandle handle, Object arg0, int arg1, Object arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - Object r = MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - return ad.returnType.cast(r); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final long guard_LIJ_J(VarHandle handle, Object arg0, int arg1, long arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (long) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (long) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_LIF_F(VarHandle handle, Object arg0, int arg1, float arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_LID_D(VarHandle handle, Object arg0, int arg1, double arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final Object guard_LJL_L(VarHandle handle, Object arg0, long arg1, Object arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - Object r = MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - return ad.returnType.cast(r); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final int guard_LJI_I(VarHandle handle, Object arg0, long arg1, int arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (int) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (int) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_LJF_F(VarHandle handle, Object arg0, long arg1, float arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_LJD_D(VarHandle handle, Object arg0, long arg1, double arg2, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final Object guard_LJJL_L(VarHandle handle, Object arg0, long arg1, long arg2, Object arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - Object r = MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - return ad.returnType.cast(r); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final int guard_LJJI_I(VarHandle handle, Object arg0, long arg1, long arg2, int arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (int) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (int) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final float guard_LJJF_F(VarHandle handle, Object arg0, long arg1, long arg2, float arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (float) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (float) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - - @ForceInline - @LambdaForm.Compiled - @Hidden - static final double guard_LJJD_D(VarHandle handle, Object arg0, long arg1, long arg2, double arg3, VarHandle.AccessDescriptor ad) throws Throwable { - boolean direct = handle.checkAccessModeThenIsDirect(ad); - if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { - return (double) MethodHandle.linkToStatic(handle, arg0, arg1, arg2, arg3, handle.vform.getMemberName(ad.mode)); - } else { - MethodHandle mh = handle.getMethodHandle(ad.mode); - return (double) mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(handle.asDirect(), arg0, arg1, arg2, arg3); - } - } - -} diff --git a/src/java.base/share/classes/java/lang/invoke/VarHandles.java b/src/java.base/share/classes/java/lang/invoke/VarHandles.java index 571587ab42f..c97d44ba5d3 100644 --- a/src/java.base/share/classes/java/lang/invoke/VarHandles.java +++ b/src/java.base/share/classes/java/lang/invoke/VarHandles.java @@ -657,242 +657,4 @@ final class VarHandles { !RuntimeException.class.isAssignableFrom(clazz) && !Error.class.isAssignableFrom(clazz); } - -// /** -// * A helper program to generate the VarHandleGuards class with a set of -// * static guard methods each of which corresponds to a particular shape and -// * performs a type check of the symbolic type descriptor with the VarHandle -// * type descriptor before linking/invoking to the underlying operation as -// * characterized by the operation member name on the VarForm of the -// * VarHandle. -// *

-// * The generated class essentially encapsulates pre-compiled LambdaForms, -// * one for each method, for the most set of common method signatures. -// * This reduces static initialization costs, footprint costs, and circular -// * dependencies that may arise if a class is generated per LambdaForm. -// *

-// * A maximum of L*T*S methods will be generated where L is the number of -// * access modes kinds (or unique operation signatures) and T is the number -// * of variable types and S is the number of shapes (such as instance field, -// * static field, or array access). -// * If there are 4 unique operation signatures, 5 basic types (Object, int, -// * long, float, double), and 3 shapes then a maximum of 60 methods will be -// * generated. However, the number is likely to be less since there -// * be duplicate signatures. -// *

-// * Each method is annotated with @LambdaForm.Compiled to inform the runtime -// * that such methods should be treated as if a method of a class that is the -// * result of compiling a LambdaForm. Annotation of such methods is -// * important for correct evaluation of certain assertions and method return -// * type profiling in HotSpot. -// */ -// public static class GuardMethodGenerator { -// -// static final String GUARD_METHOD_SIG_TEMPLATE = " _()"; -// -// static final String GUARD_METHOD_TEMPLATE = -// """ -// @ForceInline -// @LambdaForm.Compiled -// @Hidden -// static final throws Throwable { -// boolean direct = handle.checkAccessModeThenIsDirect(ad); -// if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { -// MethodHandle.linkToStatic(); -// } else { -// MethodHandle mh = handle.getMethodHandle(ad.mode); -// mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(); -// } -// }"""; -// -// static final String GUARD_METHOD_TEMPLATE_V = -// """ -// @ForceInline -// @LambdaForm.Compiled -// @Hidden -// static final throws Throwable { -// boolean direct = handle.checkAccessModeThenIsDirect(ad); -// if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) { -// MethodHandle.linkToStatic(); -// } else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) { -// MethodHandle.linkToStatic(); -// } else { -// MethodHandle mh = handle.getMethodHandle(ad.mode); -// mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(); -// } -// }"""; -// -// // A template for deriving the operations -// // could be supported by annotating VarHandle directly with the -// // operation kind and shape -// interface VarHandleTemplate { -// Object get(); -// -// void set(Object value); -// -// boolean compareAndSet(Object actualValue, Object expectedValue); -// -// Object compareAndExchange(Object actualValue, Object expectedValue); -// -// Object getAndUpdate(Object value); -// } -// -// record HandleType(Class receiver, Class... intermediates) { -// } -// -// /** -// * @param args parameters -// */ -// public static void main(String[] args) { -// System.out.println("package java.lang.invoke;"); -// System.out.println(); -// System.out.println("import jdk.internal.vm.annotation.AOTSafeClassInitializer;"); -// System.out.println("import jdk.internal.vm.annotation.ForceInline;"); -// System.out.println("import jdk.internal.vm.annotation.Hidden;"); -// System.out.println(); -// System.out.println("// This class is auto-generated by " + -// GuardMethodGenerator.class.getName() + -// ". Do not edit."); -// System.out.println("@AOTSafeClassInitializer"); -// System.out.println("final class VarHandleGuards {"); -// -// System.out.println(); -// -// // Declare the stream of shapes -// List hts = List.of( -// // Object->T -// new HandleType(Object.class), -// -// // ->T -// new HandleType(null), -// -// // Array[index]->T -// new HandleType(Object.class, int.class), -// -// // MS[base]->T -// new HandleType(Object.class, long.class), -// -// // MS[base][offset]->T -// new HandleType(Object.class, long.class, long.class) -// ); -// -// Stream.of(VarHandleTemplate.class.getMethods()). -// mapMulti((m, sink) -> { -// for (var ht : hts) { -// for (var bt : LambdaForm.BasicType.ARG_TYPES) { -// sink.accept(generateMethodType(m, ht.receiver, bt.btClass, ht.intermediates)); -// } -// } -// }). -// distinct(). -// map(GuardMethodGenerator::generateMethod). -// forEach(System.out::println); -// -// System.out.println("}"); -// } -// -// static MethodType generateMethodType(Method m, Class receiver, Class value, Class... intermediates) { -// Class returnType = m.getReturnType() == Object.class -// ? value : m.getReturnType(); -// -// List> params = new ArrayList<>(); -// if (receiver != null) -// params.add(receiver); -// java.util.Collections.addAll(params, intermediates); -// for (var p : m.getParameters()) { -// params.add(value); -// } -// return MethodType.methodType(returnType, params); -// } -// -// static String generateMethod(MethodType mt) { -// Class returnType = mt.returnType(); -// -// var params = new java.util.LinkedHashMap>(); -// params.put("handle", VarHandle.class); -// for (int i = 0; i < mt.parameterCount(); i++) { -// params.put("arg" + i, mt.parameterType(i)); -// } -// params.put("ad", VarHandle.AccessDescriptor.class); -// -// // Generate method signature line -// String RETURN = className(returnType); -// String NAME = "guard"; -// String SIGNATURE = getSignature(mt); -// String PARAMS = params.entrySet().stream(). -// map(e -> className(e.getValue()) + " " + e.getKey()). -// collect(java.util.stream.Collectors.joining(", ")); -// String METHOD = GUARD_METHOD_SIG_TEMPLATE. -// replace("", RETURN). -// replace("", NAME). -// replace("", SIGNATURE). -// replace("", PARAMS); -// -// // Generate method -// params.remove("ad"); -// -// List LINK_TO_STATIC_ARGS = new ArrayList<>(params.keySet()); -// LINK_TO_STATIC_ARGS.add("handle.vform.getMemberName(ad.mode)"); -// -// List LINK_TO_INVOKER_ARGS = new ArrayList<>(params.keySet()); -// LINK_TO_INVOKER_ARGS.set(0, LINK_TO_INVOKER_ARGS.get(0) + ".asDirect()"); -// -// RETURN = returnType == void.class -// ? "" -// : returnType == Object.class -// ? "return " -// : "return (" + returnType.getName() + ") "; -// -// String RESULT_ERASED = returnType == void.class -// ? "" -// : returnType != Object.class -// ? "return (" + returnType.getName() + ") " -// : "Object r = "; -// -// String RETURN_ERASED = returnType != Object.class -// ? "" -// : "\n return ad.returnType.cast(r);"; -// -// String template = returnType == void.class -// ? GUARD_METHOD_TEMPLATE_V -// : GUARD_METHOD_TEMPLATE; -// return template. -// replace("", METHOD). -// replace("", NAME). -// replaceAll("", RETURN). -// replace("", RESULT_ERASED). -// replace("", RETURN_ERASED). -// replaceAll("", String.join(", ", LINK_TO_STATIC_ARGS)). -// replace("", String.join(", ", LINK_TO_INVOKER_ARGS)) -// .indent(4); -// } -// -// static String className(Class c) { -// String n = c.getName(); -// if (n.startsWith("java.lang.")) { -// n = n.replace("java.lang.", ""); -// if (n.startsWith("invoke.")) { -// n = n.replace("invoke.", ""); -// } -// } -// return n.replace('$', '.'); -// } -// -// static String getSignature(MethodType m) { -// StringBuilder sb = new StringBuilder(m.parameterCount() + 1); -// -// for (int i = 0; i < m.parameterCount(); i++) { -// Class pt = m.parameterType(i); -// sb.append(getCharType(pt)); -// } -// -// sb.append('_').append(getCharType(m.returnType())); -// -// return sb.toString(); -// } -// -// static char getCharType(Class pt) { -// return Wrapper.forBasicType(pt).basicTypeChar(); -// } -// } }