Package javassist.bytecode.stackmap
Class MapMaker
java.lang.Object
javassist.bytecode.stackmap.Tracer
javassist.bytecode.stackmap.MapMaker
- All Implemented Interfaces:
TypeTag
Stack map maker.
-
Field Summary
Fields inherited from class javassist.bytecode.stackmap.Tracer
classPool, cpool, localsTypes, returnType, stackTop, stackTypes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMapMaker(ClassPool classes, MethodInfo minfo, CodeAttribute ca) -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcopyTypeData(int n, TypeData[] srcTypes, TypeData[] destTypes) private static intprivate int[]fillStackMap(int num, int offset, int[] data, TypeData[] types) private voidfindDeadCatchers(byte[] code, TypedBlock[] blocks) private voidfixDeadcode(byte[] code, TypedBlock block) private voidfixTypes(byte[] code, TypedBlock[] blocks) private booleanisTarget(TypedBlock cur, TypedBlock prev) Returns true if cur is a branch target.private voidmake(byte[] code, TypedBlock tb) (package private) voidmake(TypedBlock[] blocks, byte[] code) Runs an analyzer (Phase 1 and 2).static StackMapTablemake(ClassPool classes, MethodInfo minfo) Computes the stack map table of the given method and returns it.static StackMapmake2(ClassPool classes, MethodInfo minfo) Computes the stack map table for J2ME.private TypeDataprivate voidmergeMap(TypedBlock dest, boolean mergeStack) private voidrecordStackMap(TypedBlock target) private voidrecordStackMap(TypedBlock target, int exceptionType) private voidrecordStackMap0(TypedBlock target, int st, TypeData[] tStackTypes) protected static intrecordTypeData(int n, TypeData[] srcTypes, TypeData[] destTypes) private static intstackMapDiff(int oldTdLen, TypeData[] oldTd, int newTdLen, TypeData[] newTd) private static booleanstackMapEq(TypeData[] oldTd, TypeData[] newTd, int len) private TypeData.ClassNametoExceptionType(int exceptionType) toStackMap(TypedBlock[] blocks) toStackMap2(ConstPool cp, TypedBlock[] blocks) private voidtoStackMapBody(StackMapTable.Writer writer, TypedBlock bb, int diffL, int offsetDelta, TypedBlock prev) private voidtraceException(byte[] code, BasicBlock.Catch handler) private static TypeDatavalidateTypeData(TypeData[] data, int length, int index) private voidwriteStackFrame(StackMap.Writer writer, ConstPool cp, int offset, TypedBlock tb) private voidwriteVerifyTypeInfo(StackMap.Writer writer, ConstPool cp, TypeData[] types, int num) Methods inherited from class javassist.bytecode.stackmap.Tracer
doOpcode, visitBranch, visitGoto, visitJSR, visitLookupSwitch, visitRET, visitReturn, visitTableSwitch, visitThrow
-
Constructor Details
-
MapMaker
-
MapMaker
-
-
Method Details
-
make
Computes the stack map table of the given method and returns it. It returns null if the given method does not have to have a stack map table or it includes JSR.- Throws:
BadBytecode
-
make2
Computes the stack map table for J2ME. It returns null if the given method does not have to have a stack map table or it includes JSR.- Throws:
BadBytecode
-
make
Runs an analyzer (Phase 1 and 2).- Throws:
BadBytecode
-
make
- Throws:
BadBytecode
-
traceException
- Throws:
BadBytecode
-
mergeMap
- Throws:
BadBytecode
-
merge
- Throws:
BadBytecode
-
recordStackMap
- Throws:
BadBytecode
-
recordStackMap
- Throws:
BadBytecode
-
toExceptionType
-
recordStackMap0
- Throws:
BadBytecode
-
recordTypeData
-
copyTypeData
-
validateTypeData
-
findDeadCatchers
- Throws:
BadBytecode
-
fixDeadcode
- Throws:
BadBytecode
-
fixTypes
- Throws:
NotFoundExceptionBadBytecode
-
toStackMap
-
isTarget
Returns true if cur is a branch target. -
toStackMapBody
private void toStackMapBody(StackMapTable.Writer writer, TypedBlock bb, int diffL, int offsetDelta, TypedBlock prev) -
fillStackMap
-
stackMapDiff
-
stackMapEq
-
diffSize
-
toStackMap2
-
writeStackFrame
-
writeVerifyTypeInfo
-