| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | InvokerBytecodeGenerator.
The BytecodeGenerationException. |
| pack-priv static record |
| Modifier and Type | Field and Description |
|---|---|
| private static final ClassDesc | CD_CasesHolder
Define class names for convenience. |
| private static final ClassDesc | |
| private static final ClassDesc | |
| private static final ClassDesc | |
| private static final ClassDesc | |
| private static final ClassDesc | |
| private static final ClassDesc | |
| private static final ClassDesc | |
| private static final ClassDesc | |
| private static final ClassDesc | |
| private static final String | |
| private final List | |
| private final ClassEntry | |
| private final String | |
| pack-priv static final Annotation | |
| private static final HashMap | DUMP_CLASS_FILES_COUNTERS
instance counters for dumped classes |
| pack-priv static final Annotation | |
| pack-priv static final Annotation | |
| private static final Class | |
| pack-priv static final Annotation | |
| pack-priv static final ClassDesc | INVOKER_SUPER_DESC
Name of its super class |
| private final String | |
| private final MethodType | |
| private final LambdaForm | |
| pack-priv static final Annotation | |
| public static final RuntimeVisibleAnnotationsAttribute | |
| public static final RuntimeVisibleAnnotationsAttribute | |
| public static final RuntimeVisibleAnnotationsAttribute | |
| public static final RuntimeVisibleAnnotationsAttribute | |
| private Class | |
| private int[] | localsMap
Info about local variables in compiled lambda form |
| private static final MethodHandles. | |
| private static final MemberName. | |
| private static final MethodTypeDesc | |
| private static final MethodTypeDesc | |
| private static final MethodTypeDesc | |
| private static final MethodTypeDesc | |
| private final String | name
Name of new class |
| private final ConstantPoolBuilder | |
| private static final String | |
| private static final Class |
| Access | Constructor and Description |
|---|---|
| private | InvokerBytecodeGenerator(LambdaForm lambdaForm, int localsMapSize, String name, String invokerName, MethodType invokerType)
Main constructor; other constructors delegate to this one. |
| private | InvokerBytecodeGenerator(String name, String invokerName, MethodType invokerType)
For generating LambdaForm interpreter entry points. |
| private | InvokerBytecodeGenerator(String name, LambdaForm form, MethodType invokerType)
For generating customized code for a single LambdaForm. |
| pack-priv | InvokerBytecodeGenerator(String name, String invokerName, LambdaForm form, MethodType invokerType)
For generating customized code for a single LambdaForm. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| private boolean | |
| private void | |
| private boolean | checkActualReceiver(CodeBuilder cob)
Generates code to check that actual receiver and LambdaForm matches |
| pack-priv FieldRefEntry | |
| private Object | classDataValues()
Returns the class data object that will be passed to `Lookup.defineHiddenClassWithClassData`. |
| pack-priv static ClassDesc | |
| private byte[] | |
| pack-priv static void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| private void | |
| private LambdaForm. | |
| private void | emitImplicitConversion(CodeBuilder cob, LambdaForm.
type of value present on stack ptype,type of value required on stack pclass, Object compile-time representation of value on stack (Node, constant) or null if none arg)Emit an implicit conversion for an argument which must be of the given pclass. |
| pack-priv void | |
| private void | |
| private LambdaForm. | |
| private void | emitLoopHandleInvoke(CodeBuilder cob, LambdaForm.
|
| private void | |
| private void | emitPrimCast(CodeBuilder cob, TypeKind from, TypeKind to)
Emit a type conversion bytecode casting from "from" to "to". |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private LambdaForm. | emitSelectAlternative(CodeBuilder cob, LambdaForm.
Emit bytecode for the selectAlternative idiom. |
| pack-priv void | |
| pack-priv void | emitStaticInvoke(CodeBuilder cob, MemberName member, LambdaForm.
Emit an invoke for the given name, using the MemberName directly. |
| private void | |
| private void | |
| private LambdaForm. | |
| private LambdaForm. | |
| private void | |
| private void | |
| private int | |
| pack-priv static MemberName | generateCustomizedCode(LambdaForm form, MethodType invokerType)
Generate customized bytecode for a given LambdaForm. |
| private byte[] | |
| pack-priv static MemberName | generateLambdaFormInterpreterEntryPoint(MethodType mt)
Generate bytecode for a LambdaForm.vmentry which calls interpretWithArguments. |
| private byte[] | |
| pack-priv static MemberName | |
| private byte[] | |
| pack-priv static boolean | |
| pack-priv static boolean | |
| pack-priv static boolean | |
| private static boolean | |
| pack-priv static boolean | |
| private MemberName | |
| private static MethodHandles. | |
| private static MemberName | lookupPregenerated(LambdaForm form, MethodType invokerType)
Look up a method that may have been generated by |
| private static String | |
| pack-priv static MethodTypeDesc | |
| private void | |
| pack-priv Opcode | |
| private static MemberName | |
| private static MemberName |
| CD_CasesHolder | back to summary |
|---|---|
| private static final ClassDesc CD_CasesHolder Define class names for convenience. | |
| CD_DirectMethodHandle | back to summary |
|---|---|
| private static final ClassDesc CD_DirectMethodHandle | |
| CD_LambdaForm | back to summary |
|---|---|
| private static final ClassDesc CD_LambdaForm | |
| CD_LambdaForm_Name | back to summary |
|---|---|
| private static final ClassDesc CD_LambdaForm_Name | |
| CD_LoopClauses | back to summary |
|---|---|
| private static final ClassDesc CD_LoopClauses | |
| CD_MemberName | back to summary |
|---|---|
| private static final ClassDesc CD_MemberName | |
| CD_MethodHandle_array | back to summary |
|---|---|
| private static final ClassDesc CD_MethodHandle_array | |
| CD_MethodHandle_array2 | back to summary |
|---|---|
| private static final ClassDesc CD_MethodHandle_array2 | |
| CD_MethodHandleImpl | back to summary |
|---|---|
| private static final ClassDesc CD_MethodHandleImpl | |
| CD_Object_array | back to summary |
|---|---|
| private static final ClassDesc CD_Object_array | |
| CLASS_PREFIX | back to summary |
|---|---|
| private static final String CLASS_PREFIX | |
| classData | back to summary |
|---|---|
| private final List<InvokerBytecodeGenerator. | |
| classEntry | back to summary |
|---|---|
| private final ClassEntry classEntry | |
| className | back to summary |
|---|---|
| private final String className | |
| DONTINLINE | back to summary |
|---|---|
| pack-priv static final Annotation DONTINLINE | |
| DUMP_CLASS_FILES_COUNTERS | back to summary |
|---|---|
| private static final HashMap<String, Integer> DUMP_CLASS_FILES_COUNTERS instance counters for dumped classes | |
| FORCEINLINE | back to summary |
|---|---|
| pack-priv static final Annotation FORCEINLINE | |
| HIDDEN | back to summary |
|---|---|
| pack-priv static final Annotation HIDDEN | |
| HOST_CLASS | back to summary |
|---|---|
| private static final Class<?> HOST_CLASS | |
| INJECTEDPROFILE | back to summary |
|---|---|
| pack-priv static final Annotation INJECTEDPROFILE | |
| INVOKER_SUPER_DESC | back to summary |
|---|---|
| pack-priv static final ClassDesc INVOKER_SUPER_DESC Name of its super class | |
| invokerName | back to summary |
|---|---|
| private final String invokerName | |
| invokerType | back to summary |
|---|---|
| private final MethodType invokerType | |
| lambdaForm | back to summary |
|---|---|
| private final LambdaForm lambdaForm | |
| LF_COMPILED | back to summary |
|---|---|
| pack-priv static final Annotation LF_COMPILED | |
| LF_DONTINLINE_ANNOTATIONS | back to summary |
|---|---|
| public static final RuntimeVisibleAnnotationsAttribute LF_DONTINLINE_ANNOTATIONS | |
| LF_DONTINLINE_PROFILE_ANNOTATIONS | back to summary |
|---|---|
| public static final RuntimeVisibleAnnotationsAttribute LF_DONTINLINE_PROFILE_ANNOTATIONS | |
| LF_FORCEINLINE_ANNOTATIONS | back to summary |
|---|---|
| public static final RuntimeVisibleAnnotationsAttribute LF_FORCEINLINE_ANNOTATIONS | |
| LF_FORCEINLINE_PROFILE_ANNOTATIONS | back to summary |
|---|---|
| public static final RuntimeVisibleAnnotationsAttribute LF_FORCEINLINE_PROFILE_ANNOTATIONS | |
| localClasses | back to summary |
|---|---|
| private Class<?>[] localClasses | |
| localsMap | back to summary |
|---|---|
| private int[] localsMap Info about local variables in compiled lambda form | |
| LOOKUP | back to summary |
|---|---|
| private static final MethodHandles. | |
| MEMBERNAME_FACTORY | back to summary |
|---|---|
| private static final MemberName. | |
| MTD_boolean_Object | back to summary |
|---|---|
| private static final MethodTypeDesc MTD_boolean_Object | |
| MTD_Object_Class | back to summary |
|---|---|
| private static final MethodTypeDesc MTD_Object_Class | |
| MTD_Object_int | back to summary |
|---|---|
| private static final MethodTypeDesc MTD_Object_int | |
| MTD_Object_Object | back to summary |
|---|---|
| private static final MethodTypeDesc MTD_Object_Object | |
| name | back to summary |
|---|---|
| private final String name Name of new class | |
| pool | back to summary |
|---|---|
| private final ConstantPoolBuilder pool | |
| SOURCE_PREFIX | back to summary |
|---|---|
| private static final String SOURCE_PREFIX | |
| STATICALLY_INVOCABLE_PACKAGES | back to summary |
|---|---|
| private static final Class<?>[] STATICALLY_INVOCABLE_PACKAGES | |
| InvokerBytecodeGenerator | back to summary |
|---|---|
| private InvokerBytecodeGenerator(LambdaForm lambdaForm, int localsMapSize, String name, String invokerName, MethodType invokerType) Main constructor; other constructors delegate to this one. | |
| InvokerBytecodeGenerator | back to summary |
|---|---|
| private InvokerBytecodeGenerator(String name, String invokerName, MethodType invokerType) For generating LambdaForm interpreter entry points. | |
| InvokerBytecodeGenerator | back to summary |
|---|---|
| private InvokerBytecodeGenerator(String name, LambdaForm form, MethodType invokerType) For generating customized code for a single LambdaForm. | |
| InvokerBytecodeGenerator | back to summary |
|---|---|
| pack-priv InvokerBytecodeGenerator(String name, String invokerName, LambdaForm form, MethodType invokerType) For generating customized code for a single LambdaForm. | |
| addMethod | back to summary |
|---|---|
| pack-priv void addMethod(ClassBuilder clb, boolean alive) | |
| assertStaticType | back to summary |
|---|---|
| private boolean assertStaticType(Class<?> cls, LambdaForm. Update localClasses type map. Return true if the information is already present. | |
| bogusMethod | back to summary |
|---|---|
| private void bogusMethod(ClassBuilder clb, Object os) Emit a bogus method that just loads some string constants. This is to get the constants into the constant pool for debugging purposes. | |
| checkActualReceiver | back to summary |
|---|---|
| private boolean checkActualReceiver(CodeBuilder cob) Generates code to check that actual receiver and LambdaForm matches | |
| classData | back to summary |
|---|---|
| pack-priv FieldRefEntry classData(ClassFileBuilder<?, ?> cfb, Object arg, ClassDesc desc) | |
| classDataValues | back to summary |
|---|---|
| private Object classDataValues() Returns the class data object that will be passed to `Lookup.defineHiddenClassWithClassData`.
The classData is loaded in the | |
| classDesc | back to summary |
|---|---|
| pack-priv static ClassDesc classDesc(Class<?> cls) | |
| classFileSetup | back to summary |
|---|---|
| private byte[] classFileSetup(Consumer<? super ClassBuilder> config) Set up class file generation. | |
| clinit | back to summary |
|---|---|
| pack-priv static void clinit(ClassBuilder clb, ClassEntry classEntry, List<InvokerBytecodeGenerator. | |
| emitArrayLength | back to summary |
|---|---|
| pack-priv void emitArrayLength(CodeBuilder cob, LambdaForm. | |
| emitArrayLoad | back to summary |
|---|---|
| pack-priv void emitArrayLoad(CodeBuilder cob, LambdaForm. | |
| emitArrayStore | back to summary |
|---|---|
| pack-priv void emitArrayStore(CodeBuilder cob, LambdaForm. | |
| emitBoxing | back to summary |
|---|---|
| private void emitBoxing(CodeBuilder cob, TypeKind tk) Emit a boxing call. | |
| emitGuardWithCatch | back to summary |
|---|---|
| private LambdaForm. Emit bytecode for the guardWithCatch idiom. The pattern looks like (Cf. MethodHandleImpl.makeGuardWithCatch): It is compiled into bytecode equivalent of the following code:
| |
| emitImplicitConversion | back to summary |
|---|---|
| private void emitImplicitConversion(CodeBuilder cob, LambdaForm. Emit an implicit conversion for an argument which must be of the given pclass. This is usually a no-op, except when pclass is a subword type or a reference other than Object or an interface.
| |
| emitInvoke | back to summary |
|---|---|
| pack-priv void emitInvoke(CodeBuilder cob, LambdaForm. Emit an invoke for the given name. | |
| emitLoadInsn | back to summary |
|---|---|
| private void emitLoadInsn(CodeBuilder cob, TypeKind type, int index) | |
| emitLoop | back to summary |
|---|---|
| private LambdaForm. Emit bytecode for the loop idiom. The pattern looks like (Cf. MethodHandleImpl.loop):
It is compiled into bytecode equivalent to the code seen in
Bytecode generation applies an unrolling scheme to enable better bytecode generation regarding local state type
handling. The generated bytecode will have the following form (
The
The
| |
| emitLoopHandleInvoke | back to summary |
|---|---|
| private void emitLoopHandleInvoke(CodeBuilder cob, LambdaForm. | |
| emitPopInsn | back to summary |
|---|---|
| private void emitPopInsn(CodeBuilder cob, LambdaForm. | |
| emitPrimCast | back to summary |
|---|---|
| private void emitPrimCast(CodeBuilder cob, TypeKind from, TypeKind to) Emit a type conversion bytecode casting from "from" to "to". | |
| emitPushArgument | back to summary |
|---|---|
| private void emitPushArgument(CodeBuilder cob, LambdaForm. | |
| emitPushArgument | back to summary |
|---|---|
| private void emitPushArgument(CodeBuilder cob, Class<?> ptype, Object arg) | |
| emitPushArguments | back to summary |
|---|---|
| private void emitPushArguments(CodeBuilder cob, LambdaForm. | |
| emitPushClauseArray | back to summary |
|---|---|
| private void emitPushClauseArray(CodeBuilder cob, int clauseDataSlot, int which) | |
| emitReferenceCast | back to summary |
|---|---|
| private void emitReferenceCast(CodeBuilder cob, Class<?> cls, Object arg) | |
| emitReturn | back to summary |
|---|---|
| private void emitReturn(CodeBuilder cob, LambdaForm. Emits a return statement from a LF invoker. If required, the result type is cast to the correct return type. | |
| emitSelectAlternative | back to summary |
|---|---|
| private LambdaForm. Emit bytecode for the selectAlternative idiom. The pattern looks like (Cf. MethodHandleImpl.makeGuardWithTest):
| |
| emitStaticInvoke | back to summary |
|---|---|
| pack-priv void emitStaticInvoke(CodeBuilder cob, LambdaForm. | |
| emitStaticInvoke | back to summary |
|---|---|
| pack-priv void emitStaticInvoke(CodeBuilder cob, MemberName member, LambdaForm. Emit an invoke for the given name, using the MemberName directly. | |
| emitStoreInsn | back to summary |
|---|---|
| private void emitStoreInsn(CodeBuilder cob, TypeKind type, int index) | |
| emitStoreResult | back to summary |
|---|---|
| private void emitStoreResult(CodeBuilder cob, LambdaForm. Store the name to its local, if necessary. | |
| emitTableSwitch | back to summary |
|---|---|
| private LambdaForm. | |
| emitTryFinally | back to summary |
|---|---|
| private LambdaForm. Emit bytecode for the tryFinally idiom. The pattern looks like (Cf. MethodHandleImpl.makeTryFinally):
It is compiled into bytecode equivalent to the following code:
Specifically, the bytecode will have the following form (the stack effects are given for the beginnings of
blocks, and for the situations after executing the given instruction - the code will have a slightly different
shape if the return type is * = depends on whether the return type takes up 2 stack slots. | |
| emitUnboxing | back to summary |
|---|---|
| private void emitUnboxing(CodeBuilder cob, TypeKind target) Emit an unboxing call (plus preceding checkcast). | |
| emitZero | back to summary |
|---|---|
| private void emitZero(CodeBuilder cob, LambdaForm. | |
| extendLocalsMap | back to summary |
|---|---|
| private int extendLocalsMap(Class<?>[] types) | |
| generateCustomizedCode | back to summary |
|---|---|
| pack-priv static MemberName generateCustomizedCode(LambdaForm form, MethodType invokerType) Generate customized bytecode for a given LambdaForm. | |
| generateCustomizedCodeBytes | back to summary |
|---|---|
| private byte[] generateCustomizedCodeBytes() Generate an invoker method for the passed | |
| generateLambdaFormInterpreterEntryPoint | back to summary |
|---|---|
| pack-priv static MemberName generateLambdaFormInterpreterEntryPoint(MethodType mt) Generate bytecode for a LambdaForm.vmentry which calls interpretWithArguments. | |
| generateLambdaFormInterpreterEntryPointBytes | back to summary |
|---|---|
| private byte[] generateLambdaFormInterpreterEntryPointBytes() | |
| generateNamedFunctionInvoker | back to summary |
|---|---|
| pack-priv static MemberName generateNamedFunctionInvoker(MethodTypeForm typeForm) Generate bytecode for a NamedFunction invoker. | |
| generateNamedFunctionInvokerImpl | back to summary |
|---|---|
| private byte[] generateNamedFunctionInvokerImpl(MethodTypeForm typeForm) | |
| isStaticallyInvocable | back to summary |
|---|---|
| pack-priv static boolean isStaticallyInvocable(LambdaForm. | |
| isStaticallyInvocable | back to summary |
|---|---|
| pack-priv static boolean isStaticallyInvocable(LambdaForm. | |
| isStaticallyInvocable | back to summary |
|---|---|
| pack-priv static boolean isStaticallyInvocable(MemberName member) | |
| isStaticallyInvocableType | back to summary |
|---|---|
| private static boolean isStaticallyInvocableType(MethodType mtype) | |
| isStaticallyNameable | back to summary |
|---|---|
| pack-priv static boolean isStaticallyNameable(Class<?> cls) | |
| loadMethod | back to summary |
|---|---|
| private MemberName loadMethod(byte[] classFile) Extract the MemberName of a newly-defined method. | |
| lookup | back to summary |
|---|---|
| private static MethodHandles. | |
| lookupPregenerated | back to summary |
|---|---|
| private static MemberName lookupPregenerated(LambdaForm form, MethodType invokerType) Look up a method that may have been generated by | |
| makeDumpableClassName | back to summary |
|---|---|
| private static String makeDumpableClassName(String className) | |
| methodDesc | back to summary |
|---|---|
| pack-priv static MethodTypeDesc methodDesc(MethodType mt) | |
| methodSetup | back to summary |
|---|---|
| private void methodSetup(ClassBuilder clb, Consumer<? super MethodBuilder> config) | |
| refKindOpcode | back to summary |
|---|---|
| pack-priv Opcode refKindOpcode(byte refKind) | |
| resolveFrom | back to summary |
|---|---|
| private static MemberName resolveFrom(String name, MethodType type, Class<?> holder) | |
| resolveInvokerMember | back to summary |
|---|---|
| private static MemberName resolveInvokerMember(Class<?> invokerClass, String name, MethodType type) | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| BytecodeGenerationException | back to summary |
|---|---|
| pack-priv BytecodeGenerationException(Exception cause) | |
| Modifier and Type | Field and Description |
|---|---|
| private final FieldRefEntry | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public FieldRefEntry | |
| public final int | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| public Object |
| field | back to summary |
|---|---|
| private final FieldRefEntry field Record Component accessed by field(). | |
| value | back to summary |
|---|---|
| private final Object value Record Component accessed by value(). | |
| ClassData | back to summary |
|---|---|
| pack-priv ClassData(FieldRefEntry field, Object value) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| field | back to summary |
|---|---|
| public FieldRefEntry field() Record Component getter of field. | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |
| value | back to summary |
|---|---|
| public Object value() Record Component getter of value. | |