Class Tracer
- java.lang.Object
-
- org.hotswap.agent.javassist.bytecode.stackmap.Tracer
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassPoolclassPoolprotected ConstPoolcpoolprotected TypeData[]localsTypesprotected StringreturnTypeprotected intstackTopprotected TypeData[]stackTypes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intdoOpcode(int pos, byte[] code)Does abstract interpretation on the given bytecode instruction.protected voidvisitBranch(int pos, byte[] code, int offset)protected voidvisitGoto(int pos, byte[] code, int offset)protected voidvisitJSR(int pos, byte[] code)Invoked when the visited instruction is jsr.protected voidvisitLookupSwitch(int pos, byte[] code, int n, int pairsPos, int defaultOffset)protected voidvisitRET(int pos, byte[] code)Invoked when the visited instruction is ret or wide ret.protected voidvisitReturn(int pos, byte[] code)protected voidvisitTableSwitch(int pos, byte[] code, int n, int offsetPos, int defaultOffset)protected voidvisitThrow(int pos, byte[] code)
-
-
-
Method Detail
-
doOpcode
protected int doOpcode(int pos, byte[] code) throws BadBytecodeDoes abstract interpretation on the given bytecode instruction. It records whether or not a local variable (i.e. register) is accessed. If the instruction requires that a local variable or a stack element has a more specific type, this method updates the type of it.- Parameters:
pos- the position of the instruction.- Returns:
- the size of the instruction at POS.
- Throws:
BadBytecode
-
visitBranch
protected void visitBranch(int pos, byte[] code, int offset) throws BadBytecode- Throws:
BadBytecode
-
visitGoto
protected void visitGoto(int pos, byte[] code, int offset) throws BadBytecode- Throws:
BadBytecode
-
visitReturn
protected void visitReturn(int pos, byte[] code) throws BadBytecode- Throws:
BadBytecode
-
visitThrow
protected void visitThrow(int pos, byte[] code) throws BadBytecode- Throws:
BadBytecode
-
visitTableSwitch
protected void visitTableSwitch(int pos, byte[] code, int n, int offsetPos, int defaultOffset) throws BadBytecode- Parameters:
pos- the position of TABLESWITCHcode- bytecoden- the number of case labelsoffsetPos- the position of the branch-target table.defaultOffset- the offset to the default branch target.- Throws:
BadBytecode
-
visitLookupSwitch
protected void visitLookupSwitch(int pos, byte[] code, int n, int pairsPos, int defaultOffset) throws BadBytecode- Parameters:
pos- the position of LOOKUPSWITCHcode- bytecoden- the number of case labelspairsPos- the position of the table of pairs of a value and a branch target.defaultOffset- the offset to the default branch target.- Throws:
BadBytecode
-
visitJSR
protected void visitJSR(int pos, byte[] code) throws BadBytecodeInvoked when the visited instruction is jsr. Java6 or later does not allow using RET.- Throws:
BadBytecode
-
visitRET
protected void visitRET(int pos, byte[] code) throws BadBytecodeInvoked when the visited instruction is ret or wide ret. Java6 or later does not allow using RET.- Throws:
BadBytecode
-
-