Class MethodAnalyzer
- java.lang.Object
-
- com.offbynull.coroutines.instrumenter.MethodAnalyzer
-
final class MethodAnalyzer extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
MethodAnalyzer.TypeTracker
-
Field Summary
Fields Modifier and Type Field Description private ClassInformationRepository
classInfoRepo
private static org.objectweb.asm.Type
CONTINUATION_CLASS_TYPE
private static java.lang.reflect.Method
CONTINUATION_SUSPEND_METHOD
-
Constructor Summary
Constructors Constructor Description MethodAnalyzer(ClassInformationRepository classInfoRepo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private CacheVariables
allocateCacheVariableSlots(VariableTable varTable, MethodAnalyzer.TypeTracker invocationReturnTypes, boolean invocationFoundWrappedInTryCatch)
private LockVariables
allocateLockVariableSlots(VariableTable varTable, boolean containsSyncPoints)
private StorageContainerVariables
allocateStorageContainerVariableSlots(VariableTable varTable)
private StorageVariables
allocateStorageVariableSlots(VariableTable varTable, MethodAnalyzer.TypeTracker storageTypes)
MethodAttributes
analyze(org.objectweb.asm.tree.ClassNode classNode, org.objectweb.asm.tree.MethodNode methodNode, InstrumentationSettings settings)
private int
getLocalVariableIndexOfContinuationParameter(org.objectweb.asm.tree.MethodNode methodNode)
private void
validateNoInvokeDynamic(java.util.List<org.objectweb.asm.tree.AbstractInsnNode> insnNodes)
-
-
-
Field Detail
-
CONTINUATION_CLASS_TYPE
private static final org.objectweb.asm.Type CONTINUATION_CLASS_TYPE
-
CONTINUATION_SUSPEND_METHOD
private static final java.lang.reflect.Method CONTINUATION_SUSPEND_METHOD
-
classInfoRepo
private final ClassInformationRepository classInfoRepo
-
-
Constructor Detail
-
MethodAnalyzer
MethodAnalyzer(ClassInformationRepository classInfoRepo)
-
-
Method Detail
-
analyze
public MethodAttributes analyze(org.objectweb.asm.tree.ClassNode classNode, org.objectweb.asm.tree.MethodNode methodNode, InstrumentationSettings settings)
-
getLocalVariableIndexOfContinuationParameter
private int getLocalVariableIndexOfContinuationParameter(org.objectweb.asm.tree.MethodNode methodNode)
-
allocateCacheVariableSlots
private CacheVariables allocateCacheVariableSlots(VariableTable varTable, MethodAnalyzer.TypeTracker invocationReturnTypes, boolean invocationFoundWrappedInTryCatch)
-
allocateStorageVariableSlots
private StorageVariables allocateStorageVariableSlots(VariableTable varTable, MethodAnalyzer.TypeTracker storageTypes)
-
allocateStorageContainerVariableSlots
private StorageContainerVariables allocateStorageContainerVariableSlots(VariableTable varTable)
-
allocateLockVariableSlots
private LockVariables allocateLockVariableSlots(VariableTable varTable, boolean containsSyncPoints)
-
validateNoInvokeDynamic
private void validateNoInvokeDynamic(java.util.List<org.objectweb.asm.tree.AbstractInsnNode> insnNodes)
-
-