Modifier and Type | Field and Description |
---|---|
protected ClassPool |
classPool |
protected ConstPool |
cpool |
protected TypeData[] |
localsTypes |
protected java.lang.String |
returnType |
protected int |
stackTop |
protected TypeData[] |
stackTypes |
Constructor and Description |
---|
Tracer(ClassPool classes,
ConstPool cp,
int maxStack,
int maxLocals,
java.lang.String retType) |
Tracer(Tracer t) |
Modifier and Type | Method and Description |
---|---|
private void |
checkParamTypes(java.lang.String desc,
int i) |
private void |
constructorCalled(TypeData target,
int offset) |
private int |
doALOAD(int localVar) |
private int |
doASTORE(int index) |
private void |
doDUP_XX(int delta,
int len) |
private int |
doGetField(int pos,
byte[] code,
boolean notStatic) |
private int |
doInvokeDynamic(int pos,
byte[] code) |
private int |
doInvokeIntfMethod(int pos,
byte[] code) |
private int |
doInvokeMethod(int pos,
byte[] code,
boolean notStatic) |
private void |
doLDC(int index) |
private int |
doMultiANewArray(int pos,
byte[] code) |
private int |
doNEWARRAY(int pos,
byte[] code) |
protected int |
doOpcode(int pos,
byte[] code)
Does abstract interpretation on the given bytecode instruction.
|
private int |
doOpcode0_53(int pos,
byte[] code,
int op) |
private int |
doOpcode148_201(int pos,
byte[] code,
int op) |
private int |
doOpcode54_95(int pos,
byte[] code,
int op) |
private int |
doOpcode96_147(int pos,
byte[] code,
int op) |
private int |
doPutField(int pos,
byte[] code,
boolean notStatic) |
private void |
doWIDE_STORE(int pos,
byte[] code,
TypeData type) |
private void |
doWIDE_XLOAD(int pos,
byte[] code,
TypeData type) |
private int |
doWIDE(int pos,
byte[] code) |
private int |
doXLOAD(int localVar,
TypeData type) |
private int |
doXLOAD(TypeData type,
byte[] code,
int pos) |
private int |
doXSTORE(int pos,
byte[] code,
TypeData type) |
private int |
doXSTORE(int index,
TypeData type) |
private static java.lang.String |
getFieldClassName(java.lang.String desc,
int index) |
private void |
pushMemberType(java.lang.String descriptor) |
private void |
setFieldTarget(boolean notStatic,
int index) |
protected void |
visitBranch(int pos,
byte[] code,
int offset) |
protected void |
visitGoto(int pos,
byte[] code,
int offset) |
protected void |
visitJSR(int pos,
byte[] code)
Invoked when the visited instruction is jsr.
|
protected void |
visitLookupSwitch(int pos,
byte[] code,
int n,
int pairsPos,
int defaultOffset) |
protected void |
visitRET(int pos,
byte[] code)
Invoked when the visited instruction is ret or wide ret.
|
protected void |
visitReturn(int pos,
byte[] code) |
protected void |
visitTableSwitch(int pos,
byte[] code,
int n,
int offsetPos,
int defaultOffset) |
protected void |
visitThrow(int pos,
byte[] code) |
protected ClassPool classPool
protected ConstPool cpool
protected java.lang.String returnType
protected int stackTop
protected TypeData[] stackTypes
protected TypeData[] localsTypes
public Tracer(ClassPool classes, ConstPool cp, int maxStack, int maxLocals, java.lang.String retType)
public Tracer(Tracer t)
protected int doOpcode(int pos, byte[] code) throws BadBytecode
pos
- the position of the instruction.BadBytecode
protected void visitBranch(int pos, byte[] code, int offset) throws BadBytecode
BadBytecode
protected void visitGoto(int pos, byte[] code, int offset) throws BadBytecode
BadBytecode
protected void visitReturn(int pos, byte[] code) throws BadBytecode
BadBytecode
protected void visitThrow(int pos, byte[] code) throws BadBytecode
BadBytecode
protected void visitTableSwitch(int pos, byte[] code, int n, int offsetPos, int defaultOffset) throws BadBytecode
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.BadBytecode
protected void visitLookupSwitch(int pos, byte[] code, int n, int pairsPos, int defaultOffset) throws BadBytecode
pos
- the position of LOOKUPSWITCHcode
- bytecoden
- the number of case labelsoffsetPos
- the position of the table of pairs of a value and a branch target.defaultOffset
- the offset to the default branch target.BadBytecode
protected void visitJSR(int pos, byte[] code) throws BadBytecode
BadBytecode
protected void visitRET(int pos, byte[] code) throws BadBytecode
BadBytecode
private int doOpcode0_53(int pos, byte[] code, int op) throws BadBytecode
BadBytecode
private void doLDC(int index)
private int doXLOAD(TypeData type, byte[] code, int pos)
private int doXLOAD(int localVar, TypeData type)
private int doALOAD(int localVar)
private int doOpcode54_95(int pos, byte[] code, int op) throws BadBytecode
BadBytecode
private int doXSTORE(int pos, byte[] code, TypeData type)
private int doXSTORE(int index, TypeData type)
private int doASTORE(int index)
private void doDUP_XX(int delta, int len)
private int doOpcode96_147(int pos, byte[] code, int op)
private int doOpcode148_201(int pos, byte[] code, int op) throws BadBytecode
BadBytecode
private int doWIDE(int pos, byte[] code) throws BadBytecode
BadBytecode
private void doWIDE_XLOAD(int pos, byte[] code, TypeData type)
private void doWIDE_STORE(int pos, byte[] code, TypeData type)
private int doPutField(int pos, byte[] code, boolean notStatic) throws BadBytecode
BadBytecode
private int doGetField(int pos, byte[] code, boolean notStatic) throws BadBytecode
BadBytecode
private void setFieldTarget(boolean notStatic, int index) throws BadBytecode
BadBytecode
private int doNEWARRAY(int pos, byte[] code)
private int doMultiANewArray(int pos, byte[] code)
private int doInvokeMethod(int pos, byte[] code, boolean notStatic) throws BadBytecode
BadBytecode
private void constructorCalled(TypeData target, int offset)
private int doInvokeIntfMethod(int pos, byte[] code) throws BadBytecode
BadBytecode
private int doInvokeDynamic(int pos, byte[] code) throws BadBytecode
BadBytecode
private void pushMemberType(java.lang.String descriptor)
private static java.lang.String getFieldClassName(java.lang.String desc, int index)
private void checkParamTypes(java.lang.String desc, int i) throws BadBytecode
BadBytecode