Top Description Inners Fields Constructors Methods
java.lang.invoke

pack-priv Class InvokerBytecodeGenerator

extends Object
Class Inheritance
Imports
jdk.internal.org.objectweb.asm.ClassWriter, .FieldVisitor, .Label, .MethodVisitor, .Opcodes, .Type, sun.invoke.util.VerifyAccess, .VerifyType, .Wrapper, java.lang.reflect.Modifier, java.util.ArrayList, .Arrays, .HashMap, .List, .Set, java.util.stream.Stream

Code generation backend for LambdaForm.

Author
John Rose, JSR 292 EG

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final String
private final List<InvokerBytecodeGenerator.ClassData>
private final String
private static final String
private ClassWriter
cw

ASM bytecode generation.

pack-priv static final String
private static final HashMap<String, Integer>
DUMP_CLASS_FILES_COUNTERS

instance counters for dumped classes

pack-priv static final String
pack-priv static final String
private static final Class<?>
pack-priv static final String
pack-priv static final String
INVOKER_SUPER_NAME

Name of its super class

private final String
private final MethodType
private final LambdaForm
private Class<?>
lastClass

Single element internal class name lookup cache.

private String
private static final String
pack-priv static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private Class<?>[]
private int[]
localsMap

Info about local variables in compiled lambda form

private static final MethodHandles.Lookup
private static final String
private static final MemberName.Factory
private static final String
MH

Define class names for convenience.

private static final String
private static final String
private static final String
private MethodVisitor
private final String
name

Name of new class

private static final String
private static final String
private static final String
private static final Class<?>[]

Constructor Summary

AccessConstructor 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.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
private int
arrayInsnOpcode(byte tcode, int aaop)

private byte
arrayTypeCode(Wrapper elementType)

private boolean
assertStaticType(Class<?> cls, LambdaForm.Name n)

Update localClasses type map.

private void
bogusMethod(Object os)

Emit a bogus method that just loads some string constants.

private boolean
checkActualReceiver()

Generates code to check that actual receiver and LambdaForm matches

pack-priv static boolean
pack-priv String
private Object
classDataValues()

Returns the class data object that will be passed to `Lookup.defineHiddenClassWithClassData`.

private ClassWriter
classFilePrologue()

Set up class file generation.

pack-priv static String
pack-priv static void
private static String
private void
emitAloadInsn(int index)

pack-priv void
pack-priv void
pack-priv void
emitArrayOp(LambdaForm.Name name, int arrayOpcode)

pack-priv void
private void
emitAstoreInsn(int index)

private void
emitBoxing(Wrapper
primitive type class to box.
wrapper
)

Emit a boxing call.

private void
private LambdaForm.Name
emitGuardWithCatch(int pos)

Emit bytecode for the guardWithCatch idiom.

private void
private void
emitIconstInsn(final int cst)

private static void
private void
emitImplicitConversion(LambdaForm.BasicType
type of value present on stack
ptype
,
Class<?>
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
emitInvoke(LambdaForm.Name name)

Emit an invoke for the given name.

private void
private LambdaForm.Name
emitLoop(int pos)

Emit bytecode for the loop idiom.

private void
emitLoopHandleInvoke(LambdaForm.Name holder, int handles, int clause, LambdaForm.Name args, boolean pushLocalState, MethodType type, Class<?>[] loopLocalStateTypes, int clauseDataSlot, int firstLoopStateSlot)

private void
private void
emitPrimCast(Wrapper from, Wrapper to)

Emit a type conversion bytecode casting from "from" to "to".

private void
emitPushArgument(LambdaForm.Name name, int paramIndex)

private void
emitPushArgument(Class<?> ptype, Object arg)

private void
private void
emitPushClauseArray(int clauseDataSlot, int which)

private void
private void
emitReturn(LambdaForm.Name onStack)

Emits a return statement from a LF invoker.

private void
emitReturnInsn(LambdaForm.BasicType type)

Emits an actual return instruction conforming to the given return type.

private LambdaForm.Name
emitSelectAlternative(LambdaForm.Name selectAlternativeName, LambdaForm.Name invokeBasicName)

Emit bytecode for the selectAlternative idiom.

pack-priv void
pack-priv void
emitStaticInvoke(MemberName member, LambdaForm.Name name)

Emit an invoke for the given name, using the MemberName directly.

private void
private void
emitStoreResult(LambdaForm.Name name)

Store the name to its local, if necessary.

private LambdaForm.Name
emitTableSwitch(int pos, int numCases)

private LambdaForm.Name
emitTryFinally(int pos)

Emit bytecode for the tryFinally idiom.

private void
emitUnboxing(Wrapper
wrapper type class to unbox.
wrapper
)

Emit an unboxing call (plus preceding checkcast).

private void
private void
private int
extendLocalsMap(Class<?>[] types)

pack-priv static MemberName
generateCustomizedCode(LambdaForm form, MethodType invokerType)

Generate customized bytecode for a given LambdaForm.

private byte[]
generateCustomizedCodeBytes()

Generate an invoker method for the passed LambdaForm.

pack-priv static MemberName
generateLambdaFormInterpreterEntryPoint(MethodType mt)

Generate bytecode for a LambdaForm.vmentry which calls interpretWithArguments.

private byte[]
pack-priv static MemberName
generateNamedFunctionInvoker(MethodTypeForm typeForm)

Generate bytecode for a NamedFunction invoker.

private byte[]
private String
pack-priv static boolean
pack-priv static boolean
pack-priv static boolean
private static boolean
pack-priv static boolean
private int
private MemberName
loadMethod(byte[] classFile)

Extract the MemberName of a newly-defined method.

private static MethodHandles.Lookup
private static MemberName
private static String
private void
methodEpilogue()

Tear down class file generation.

private void
private static int
pack-priv int
refKindOpcode(byte refKind)

private static MemberName
resolveFrom(String name, MethodType type, Class<?> holder)

private static MemberName
resolveInvokerMember(Class<?> invokerClass, String name, MethodType type)

pack-priv void
private int
private byte[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CLASS_PREFIXback to summary
private static final String CLASS_PREFIX
classDataback to summary
private final List<InvokerBytecodeGenerator.ClassData> classData
classNameback to summary
private final String className
CLSback to summary
private static final String CLS
cwback to summary
private ClassWriter cw

ASM bytecode generation.

DONTINLINE_SIGback to summary
pack-priv static final String DONTINLINE_SIG
DUMP_CLASS_FILES_COUNTERSback to summary
private static final HashMap<String, Integer> DUMP_CLASS_FILES_COUNTERS

instance counters for dumped classes

FORCEINLINE_SIGback to summary
pack-priv static final String FORCEINLINE_SIG
HIDDEN_SIGback to summary
pack-priv static final String HIDDEN_SIG
HOST_CLASSback to summary
private static final Class<?> HOST_CLASS
INJECTEDPROFILE_SIGback to summary
pack-priv static final String INJECTEDPROFILE_SIG
INVOKER_SUPER_NAMEback to summary
pack-priv static final String INVOKER_SUPER_NAME

Name of its super class

invokerNameback to summary
private final String invokerName
invokerTypeback to summary
private final MethodType invokerType
lambdaFormback to summary
private final LambdaForm lambdaForm
lastClassback to summary
private Class<?> lastClass

Single element internal class name lookup cache.

lastInternalNameback to summary
private String lastInternalName
LFback to summary
private static final String LF
LF_COMPILED_SIGback to summary
pack-priv static final String LF_COMPILED_SIG
LF_SIGback to summary
private static final String LF_SIG
LFNback to summary
private static final String LFN
LFN_SIGback to summary
private static final String LFN_SIG
LL_SIGback to summary
private static final String LL_SIG
LLV_SIGback to summary
private static final String LLV_SIG
localClassesback to summary
private Class<?>[] localClasses
localsMapback to summary
private int[] localsMap

Info about local variables in compiled lambda form

LOOKUPback to summary
private static final MethodHandles.Lookup LOOKUP
LOOP_CLAUSESback to summary
private static final String LOOP_CLAUSES
MEMBERNAME_FACTORYback to summary
private static final MemberName.Factory MEMBERNAME_FACTORY
MHback to summary
private static final String MH

Define class names for convenience.

MH_SIGback to summary
private static final String MH_SIG
MHARY2back to summary
private static final String MHARY2
MHIback to summary
private static final String MHI
mvback to summary
private MethodVisitor mv
nameback to summary
private final String name

Name of new class

OBJback to summary
private static final String OBJ
OBJARYback to summary
private static final String OBJARY
SOURCE_PREFIXback to summary
private static final String SOURCE_PREFIX
STATICALLY_INVOCABLE_PACKAGESback to summary
private static final Class<?>[] STATICALLY_INVOCABLE_PACKAGES

Constructor Detail

InvokerBytecodeGeneratorback to summary
private InvokerBytecodeGenerator(LambdaForm lambdaForm, int localsMapSize, String name, String invokerName, MethodType invokerType)

Main constructor; other constructors delegate to this one.

InvokerBytecodeGeneratorback to summary
private InvokerBytecodeGenerator(String name, String invokerName, MethodType invokerType)

For generating LambdaForm interpreter entry points.

InvokerBytecodeGeneratorback to summary
private InvokerBytecodeGenerator(String name, LambdaForm form, MethodType invokerType)

For generating customized code for a single LambdaForm.

InvokerBytecodeGeneratorback to summary
pack-priv InvokerBytecodeGenerator(String name, String invokerName, LambdaForm form, MethodType invokerType)

For generating customized code for a single LambdaForm.

Method Detail

addMethodback to summary
pack-priv void addMethod()
arrayInsnOpcodeback to summary
private int arrayInsnOpcode(byte tcode, int aaop) throws InternalError
arrayTypeCodeback to summary
private byte arrayTypeCode(Wrapper elementType)
assertStaticTypeback to summary
private boolean assertStaticType(Class<?> cls, LambdaForm.Name n)

Update localClasses type map. Return true if the information is already present.

bogusMethodback to summary
private void bogusMethod(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.

checkActualReceiverback to summary
private boolean checkActualReceiver()

Generates code to check that actual receiver and LambdaForm matches

checkClassNameback to summary
pack-priv static boolean checkClassName(String cn)
classDataback to summary
pack-priv String classData(Object arg)
classDataValuesback to summary
private Object classDataValues()

Returns the class data object that will be passed to `Lookup.defineHiddenClassWithClassData`. The classData is loaded in the method of the generated class. If the class data contains only one single object, this method returns that single object. If the class data contains more than one objects, this method returns a List. This method returns null if no class data.

classFilePrologueback to summary
private ClassWriter classFilePrologue()

Set up class file generation.

classNameback to summary
pack-priv static String className(String cn)
clinitback to summary
pack-priv static void clinit(ClassWriter cw, String className, List<InvokerBytecodeGenerator.ClassData> classData)
debugStringback to summary
private static String debugString(Object arg)
emitAloadInsnback to summary
private void emitAloadInsn(int index)
emitArrayLengthback to summary
pack-priv void emitArrayLength(LambdaForm.Name name)
emitArrayLoadback to summary
pack-priv void emitArrayLoad(LambdaForm.Name name)
emitArrayOpback to summary
pack-priv void emitArrayOp(LambdaForm.Name name, int arrayOpcode)
emitArrayStoreback to summary
pack-priv void emitArrayStore(LambdaForm.Name name)
emitAstoreInsnback to summary
private void emitAstoreInsn(int index)
emitBoxingback to summary
private void emitBoxing(Wrapper wrapper)

Emit a boxing call.

Parameters
wrapper:Wrapper

primitive type class to box.

emitConstback to summary
private void emitConst(Object con)
emitGuardWithCatchback to summary
private LambdaForm.Name emitGuardWithCatch(int pos)

Emit bytecode for the guardWithCatch idiom. The pattern looks like (Cf. MethodHandleImpl.makeGuardWithCatch):

guardWithCatch=Lambda(a0:L,a1:L,a2:L,a3:L,a4:L,a5:L,a6:L,a7:L)=>{
   t8:L=MethodHandle.invokeBasic(a4:L,a6:L,a7:L);
   t9:L=MethodHandleImpl.guardWithCatch(a1:L,a2:L,a3:L,t8:L);
  t10:I=MethodHandle.invokeBasic(a5:L,t9:L);t10:I}
It is compiled into bytecode equivalent of the following code:
try {
     return a1.invokeBasic(a6, a7);
 } catch (Throwable e) {
     if (!a2.isInstance(e)) throw e;
     return a3.invokeBasic(ex, a6, a7);
 }
emitI2Xback to summary
private void emitI2X(Wrapper type)
emitIconstInsnback to summary
private void emitIconstInsn(final int cst)
emitIconstInsnback to summary
private static void emitIconstInsn(MethodVisitor mv, int cst)
emitImplicitConversionback to summary
private void emitImplicitConversion(LambdaForm.BasicType ptype, Class<?> pclass, Object arg)

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.

Parameters
ptype:LambdaForm.BasicType

type of value present on stack

pclass:Class<?>

type of value required on stack

arg:Object

compile-time representation of value on stack (Node, constant) or null if none

emitInvokeback to summary
pack-priv void emitInvoke(LambdaForm.Name name)

Emit an invoke for the given name.

emitLoadInsnback to summary
private void emitLoadInsn(LambdaForm.BasicType type, int index)
emitLoopback to summary
private LambdaForm.Name emitLoop(int pos)

Emit bytecode for the loop idiom.

The pattern looks like (Cf. MethodHandleImpl.loop):

// a0: BMH
// a1: LoopClauses (containing an array of arrays: inits, steps, preds, finis)
// a2: box, a3: unbox
// a4 (and following): arguments
loop=Lambda(a0:L,a1:L,a2:L,a3:L,a4:L)=>{
  t5:L=MethodHandle.invokeBasic(a2:L,a4:L);          // box the arguments into an Object[]
  t6:L=MethodHandleImpl.loop(bt:L,a1:L,t5:L);        // call the loop executor (with supplied types in bt)
  t7:L=MethodHandle.invokeBasic(a3:L,t6:L);t7:L}     // unbox the result; return the result

It is compiled into bytecode equivalent to the code seen in MethodHandleImpl#loop(BasicType[], MethodHandleImpl.LoopClauses, Object...), with the difference that no arrays will be used for local state storage. Instead, the local state will be mapped to actual stack slots.

Bytecode generation applies an unrolling scheme to enable better bytecode generation regarding local state type handling. The generated bytecode will have the following form (void types are ignored for convenience). Assume there are C clauses in the loop.

PREINIT: ALOAD_1
         CHECKCAST LoopClauses
         GETFIELD LoopClauses.clauses
         ASTORE clauseDataIndex          // place the clauses 2-dimensional array on the stack
INIT:    (INIT_SEQ for clause 1)
         ...
         (INIT_SEQ for clause C)
LOOP:    (LOOP_SEQ for clause 1)
         ...
         (LOOP_SEQ for clause C)
         GOTO LOOP
DONE:    ...

The INIT_SEQ_x sequence for clause x (with x ranging from 0 to C-1) has the following shape. Assume slot vx is used to hold the state for clause x.

INIT_SEQ_x:  ALOAD clauseDataIndex
             ICONST_0
             AALOAD      // load the inits array
             ICONST x
             AALOAD      // load the init handle for clause x
             load args
             INVOKEVIRTUAL MethodHandle.invokeBasic
             store vx

The LOOP_SEQ_x sequence for clause x (with x ranging from 0 to C-1) has the following shape. Again, assume slot vx is used to hold the state for clause x.

LOOP_SEQ_x:  ALOAD clauseDataIndex
             ICONST_1
             AALOAD              // load the steps array
             ICONST x
             AALOAD              // load the step handle for clause x
             load locals
             load args
             INVOKEVIRTUAL MethodHandle.invokeBasic
             store vx
             ALOAD clauseDataIndex
             ICONST_2
             AALOAD              // load the preds array
             ICONST x
             AALOAD              // load the pred handle for clause x
             load locals
             load args
             INVOKEVIRTUAL MethodHandle.invokeBasic
             IFNE LOOP_SEQ_x+1   // predicate returned false -> jump to next clause
             ALOAD clauseDataIndex
             ICONST_3
             AALOAD              // load the finis array
             ICONST x
             AALOAD              // load the fini handle for clause x
             load locals
             load args
             INVOKEVIRTUAL MethodHandle.invokeBasic
             GOTO DONE           // jump beyond end of clauses to return from loop
emitLoopHandleInvokeback to summary
private void emitLoopHandleInvoke(LambdaForm.Name holder, int handles, int clause, LambdaForm.Name args, boolean pushLocalState, MethodType type, Class<?>[] loopLocalStateTypes, int clauseDataSlot, int firstLoopStateSlot)
emitPopInsnback to summary
private void emitPopInsn(LambdaForm.BasicType type)
emitPrimCastback to summary
private void emitPrimCast(Wrapper from, Wrapper to)

Emit a type conversion bytecode casting from "from" to "to".

emitPushArgumentback to summary
private void emitPushArgument(LambdaForm.Name name, int paramIndex)
emitPushArgumentback to summary
private void emitPushArgument(Class<?> ptype, Object arg)
emitPushArgumentsback to summary
private void emitPushArguments(LambdaForm.Name args, int start)
emitPushClauseArrayback to summary
private void emitPushClauseArray(int clauseDataSlot, int which)
emitReferenceCastback to summary
private void emitReferenceCast(Class<?> cls, Object arg)
emitReturnback to summary
private void emitReturn(LambdaForm.Name onStack)

Emits a return statement from a LF invoker. If required, the result type is cast to the correct return type.

emitReturnInsnback to summary
private void emitReturnInsn(LambdaForm.BasicType type)

Emits an actual return instruction conforming to the given return type.

emitSelectAlternativeback to summary
private LambdaForm.Name emitSelectAlternative(LambdaForm.Name selectAlternativeName, LambdaForm.Name invokeBasicName)

Emit bytecode for the selectAlternative idiom. The pattern looks like (Cf. MethodHandleImpl.makeGuardWithTest):

Lambda(a0:L,a1:I)=>{
    t2:I=foo.test(a1:I);
    t3:L=MethodHandleImpl.selectAlternative(t2:I,(MethodHandle(int)int),(MethodHandle(int)int));
    t4:I=MethodHandle.invokeBasic(t3:L,a1:I);t4:I}
emitStaticInvokeback to summary
pack-priv void emitStaticInvoke(LambdaForm.Name name)
emitStaticInvokeback to summary
pack-priv void emitStaticInvoke(MemberName member, LambdaForm.Name name)

Emit an invoke for the given name, using the MemberName directly.

emitStoreInsnback to summary
private void emitStoreInsn(LambdaForm.BasicType type, int index)
emitStoreResultback to summary
private void emitStoreResult(LambdaForm.Name name)

Store the name to its local, if necessary.

emitTableSwitchback to summary
private LambdaForm.Name emitTableSwitch(int pos, int numCases)
emitTryFinallyback to summary
private LambdaForm.Name emitTryFinally(int pos)

Emit bytecode for the tryFinally idiom.

The pattern looks like (Cf. MethodHandleImpl.makeTryFinally):

// a0: BMH
// a1: target, a2: cleanup
// a3: box, a4: unbox
// a5 (and following): arguments
tryFinally=Lambda(a0:L,a1:L,a2:L,a3:L,a4:L,a5:L)=>{
  t6:L=MethodHandle.invokeBasic(a3:L,a5:L);         // box the arguments into an Object[]
  t7:L=MethodHandleImpl.tryFinally(a1:L,a2:L,t6:L); // call the tryFinally executor
  t8:L=MethodHandle.invokeBasic(a4:L,t7:L);t8:L}    // unbox the result; return the result

It is compiled into bytecode equivalent to the following code:

Throwable t;
Object r;
try {
    r = a1.invokeBasic(a5);
} catch (Throwable thrown) {
    t = thrown;
    throw t;
} finally {
    r = a2.invokeBasic(t, r, a5);
}
return r;

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 void):

TRY:                 (--)
                     load target                             (-- target)
                     load args                               (-- args... target)
                     INVOKEVIRTUAL MethodHandle.invokeBasic  (depends)
FINALLY_NORMAL:      (-- r_2nd* r)
                     store returned value                    (--)
                     load cleanup                            (-- cleanup)
                     ACONST_NULL                             (-- t cleanup)
                     load returned value                     (-- r_2nd* r t cleanup)
                     load args                               (-- args... r_2nd* r t cleanup)
                     INVOKEVIRTUAL MethodHandle.invokeBasic  (-- r_2nd* r)
                     GOTO DONE
CATCH:               (-- t)
                     DUP                                     (-- t t)
FINALLY_EXCEPTIONAL: (-- t t)
                     load cleanup                            (-- cleanup t t)
                     SWAP                                    (-- t cleanup t)
                     load default for r                      (-- r_2nd* r t cleanup t)
                     load args                               (-- args... r_2nd* r t cleanup t)
                     INVOKEVIRTUAL MethodHandle.invokeBasic  (-- r_2nd* r t)
                     POP/POP2*                               (-- t)
                     ATHROW
DONE:                (-- r)
* = depends on whether the return type takes up 2 stack slots.
emitUnboxingback to summary
private void emitUnboxing(Wrapper wrapper)

Emit an unboxing call (plus preceding checkcast).

Parameters
wrapper:Wrapper

wrapper type class to unbox.

emitX2Iback to summary
private void emitX2I(Wrapper type)
emitZeroback to summary
private void emitZero(LambdaForm.BasicType type)
extendLocalsMapback to summary
private int extendLocalsMap(Class<?>[] types)
generateCustomizedCodeback to summary
pack-priv static MemberName generateCustomizedCode(LambdaForm form, MethodType invokerType)

Generate customized bytecode for a given LambdaForm.

generateCustomizedCodeBytesback to summary
private byte[] generateCustomizedCodeBytes()

Generate an invoker method for the passed LambdaForm.

generateLambdaFormInterpreterEntryPointback to summary
pack-priv static MemberName generateLambdaFormInterpreterEntryPoint(MethodType mt)

Generate bytecode for a LambdaForm.vmentry which calls interpretWithArguments.

generateLambdaFormInterpreterEntryPointBytesback to summary
private byte[] generateLambdaFormInterpreterEntryPointBytes()
generateNamedFunctionInvokerback to summary
pack-priv static MemberName generateNamedFunctionInvoker(MethodTypeForm typeForm)

Generate bytecode for a NamedFunction invoker.

generateNamedFunctionInvokerImplback to summary
private byte[] generateNamedFunctionInvokerImpl(MethodTypeForm typeForm)
getInternalNameback to summary
private String getInternalName(Class<?> c)
isStaticallyInvocableback to summary
pack-priv static boolean isStaticallyInvocable(LambdaForm.NamedFunction... functions)
isStaticallyInvocableback to summary
pack-priv static boolean isStaticallyInvocable(LambdaForm.Name name)
isStaticallyInvocableback to summary
pack-priv static boolean isStaticallyInvocable(MemberName member)
isStaticallyInvocableTypeback to summary
private static boolean isStaticallyInvocableType(MethodType mtype)
isStaticallyNameableback to summary
pack-priv static boolean isStaticallyNameable(Class<?> cls)
loadInsnOpcodeback to summary
private int loadInsnOpcode(LambdaForm.BasicType type) throws InternalError
loadMethodback to summary
private MemberName loadMethod(byte[] classFile)

Extract the MemberName of a newly-defined method.

lookupback to summary
private static MethodHandles.Lookup lookup()
lookupPregeneratedback to summary
private static MemberName lookupPregenerated(LambdaForm form, MethodType invokerType)
makeDumpableClassNameback to summary
private static String makeDumpableClassName(String className)
methodEpilogueback to summary
private void methodEpilogue()

Tear down class file generation.

methodPrologueback to summary
private void methodPrologue()
popInsnOpcodeback to summary
private static int popInsnOpcode(LambdaForm.BasicType type)
refKindOpcodeback to summary
pack-priv int refKindOpcode(byte refKind)
resolveFromback to summary
private static MemberName resolveFrom(String name, MethodType type, Class<?> holder)
resolveInvokerMemberback to summary
private static MemberName resolveInvokerMember(Class<?> invokerClass, String name, MethodType type)
setClassWriterback to summary
pack-priv void setClassWriter(ClassWriter cw)
storeInsnOpcodeback to summary
private int storeInsnOpcode(LambdaForm.BasicType type) throws InternalError
toByteArrayback to summary
private byte[] toByteArray()
java.lang.invoke back to summary

pack-priv final Class InvokerBytecodeGenerator.BytecodeGenerationException

extends RuntimeException
Class Inheritance
Annotations
@SuppressWarnings:serial

The BytecodeGenerationException.

Constructor Summary

AccessConstructor and Description
pack-priv

Constructor Detail

BytecodeGenerationExceptionback to summary
pack-priv BytecodeGenerationException(Exception cause)
java.lang.invoke back to summary

pack-priv Class InvokerBytecodeGenerator.ClassData

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final String
pack-priv final Object

Constructor Summary

AccessConstructor and Description
pack-priv
ClassData(String name, String desc, Object value)

Method Summary

Modifier and TypeMethod and Description
public String
name()

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

descback to summary
pack-priv final String desc
nameback to summary
pack-priv final String name
valueback to summary
pack-priv final Object value

Constructor Detail

ClassDataback to summary
pack-priv ClassData(String name, String desc, Object value)

Method Detail

nameback to summary
public String name()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object