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
ConstructorsModifierConstructorDescriptionprotected
MapMaker
(ClassPool classes, MethodInfo minfo, CodeAttribute ca) -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
copyTypeData
(int n, TypeData[] srcTypes, TypeData[] destTypes) private static int
private int[]
fillStackMap
(int num, int offset, int[] data, TypeData[] types) private void
findDeadCatchers
(byte[] code, TypedBlock[] blocks) private void
fixDeadcode
(byte[] code, TypedBlock block) private void
fixTypes
(byte[] code, TypedBlock[] blocks) private boolean
isTarget
(TypedBlock cur, TypedBlock prev) Returns true if cur is a branch target.private void
make
(byte[] code, TypedBlock tb) (package private) void
make
(TypedBlock[] blocks, byte[] code) Runs an analyzer (Phase 1 and 2).static StackMapTable
make
(ClassPool classes, MethodInfo minfo) Computes the stack map table of the given method and returns it.static StackMap
make2
(ClassPool classes, MethodInfo minfo) Computes the stack map table for J2ME.private TypeData
private void
mergeMap
(TypedBlock dest, boolean mergeStack) private void
recordStackMap
(TypedBlock target) private void
recordStackMap
(TypedBlock target, int exceptionType) private void
recordStackMap0
(TypedBlock target, int st, TypeData[] tStackTypes) protected static int
recordTypeData
(int n, TypeData[] srcTypes, TypeData[] destTypes) private static int
stackMapDiff
(int oldTdLen, TypeData[] oldTd, int newTdLen, TypeData[] newTd) private static boolean
stackMapEq
(TypeData[] oldTd, TypeData[] newTd, int len) private TypeData.ClassName
toExceptionType
(int exceptionType) toStackMap
(TypedBlock[] blocks) toStackMap2
(ConstPool cp, TypedBlock[] blocks) private void
toStackMapBody
(StackMapTable.Writer writer, TypedBlock bb, int diffL, int offsetDelta, TypedBlock prev) private void
traceException
(byte[] code, BasicBlock.Catch handler) private static TypeData
validateTypeData
(TypeData[] data, int length, int index) private void
writeStackFrame
(StackMap.Writer writer, ConstPool cp, int offset, TypedBlock tb) private void
writeVerifyTypeInfo
(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:
NotFoundException
BadBytecode
-
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
-