Method Summary |
|
public void | addInstruction(Instruction inst, Block next) Adds an instruction that jumps to another basic block.
Parameters: inst - The instruction to add. Parameters: next - The basic block after the jump. |
public void | addInstruction(Instruction inst) Adds an instruction that does not change the control flow (a normal
instruction). |
public void | addInstruction(Instruction inst, Subroutine sub) Add an instruction such as ret or astore that may involve
a subroutine.
Parameters: inst - Instruction to add. Parameters: sub - Subroutine in which inst resides. |
public void | addLabel(Label label) Add a label to the statement list. |
public void | addStmt(Stmt stmt) Save the contents of the stack and add stmt to the statement list. |
public void | addStmtAfter(Stmt stmt, Stmt after) Inserts a statement into the statement list after another given
statement. |
public void | addStmtBefore(Stmt stmt, Stmt before) Inserts a statement into the statement list before a specified statement. |
public void | addStmtBeforeJump(Stmt stmt) Adds a statement to the statement list before the last jump statement. |
public Block | block() |
public void | cleanupOnly() Cleans up this node. |
public void | initLocals(Collection locals) Add a Collection of local variables to the block. |
public Stmt | lastStmt() Returns the last non-Label statement in the statement list. |
public LocalExpr | newLocal(int index, Type type) Returns a new LocalExpr that is not allocated on the stack. |
public LocalExpr | newLocal(Type type) Returns a local variable (LocalExpr) located in this method. |
public StackExpr | newStack(Type type) Returns a new StackExpr for the top of the operand stack. |
public LocalExpr | newStackLocal(int index, Type type) Returns a new LocalExpr that represents an element of the stack. |
public Node | parent() |
public void | prependStmt(Stmt stmt) Add an statement to the statement list before the first non-Label
statement. |
public void | removeLastStmt() Removes the last non-Label statement from the statement list. |
public void | removeStmt(Stmt stmt) Removes a statement from the statement list. |
public OperandStack | stack() Returns the operand stack. |
public List | stmts() |
public String | toString() Returns a String representation of this Tree. |
public void | visit(TreeVisitor visitor) |
public void | visitForceChildren(TreeVisitor visitor) Visit all the statements in the statement list. |
public void | visit_aaload(Instruction inst) |
public void | visit_aastore(Instruction inst) |
public void | visit_aload(Instruction inst) |
public void | visit_areturn(Instruction inst) |
public void | visit_arraylength(Instruction inst) Pushes an ArrayLengthExpr onto the operand stack. |
public void | visit_astore(Instruction inst) Visit an astore instruction. |
public void | visit_aswizzle(Instruction inst) |
public void | visit_aswrange(Instruction inst) Add a SRStmt to the statement list. |
public void | visit_athrow(Instruction inst) Adds a ThrowStmt to the statement list. |
public void | visit_aupdate(Instruction inst) |
public void | visit_baload(Instruction inst) |
public void | visit_bastore(Instruction inst) |
public void | visit_caload(Instruction inst) |
public void | visit_castore(Instruction inst) |
public void | visit_checkcast(Instruction inst) Pushes a CastExpr onto the operand stack. |
public void | visit_d2f(Instruction inst) |
public void | visit_d2i(Instruction inst) |
public void | visit_d2l(Instruction inst) |
public void | visit_dadd(Instruction inst) |
public void | visit_daload(Instruction inst) |
public void | visit_dastore(Instruction inst) |
public void | visit_dcmpg(Instruction inst) |
public void | visit_dcmpl(Instruction inst) |
public void | visit_ddiv(Instruction inst) |
public void | visit_dload(Instruction inst) |
public void | visit_dmul(Instruction inst) |
public void | visit_dneg(Instruction inst) |
public void | visit_drem(Instruction inst) |
public void | visit_dreturn(Instruction inst) |
public void | visit_dstore(Instruction inst) |
public void | visit_dsub(Instruction inst) |
public void | visit_dup(Instruction inst) When processing the dup instructions one of two situations can
occur. |
public void | visit_dup2(Instruction inst) |
public void | visit_dup2_x1(Instruction inst) |
public void | visit_dup2_x2(Instruction inst) |
public void | visit_dup_x1(Instruction inst) |
public void | visit_dup_x2(Instruction inst) |
public void | visit_f2d(Instruction inst) |
public void | visit_f2i(Instruction inst) |
public void | visit_f2l(Instruction inst) |
public void | visit_fadd(Instruction inst) |
public void | visit_faload(Instruction inst) |
public void | visit_fastore(Instruction inst) |
public void | visit_fcmpg(Instruction inst) |
public void | visit_fcmpl(Instruction inst) |
public void | visit_fdiv(Instruction inst) |
public void | visit_fload(Instruction inst) |
public void | visit_fmul(Instruction inst) |
public void | visit_fneg(Instruction inst) |
public void | visit_frem(Instruction inst) |
public void | visit_freturn(Instruction inst) |
public void | visit_fstore(Instruction inst) |
public void | visit_fsub(Instruction inst) |
public void | visit_getfield(Instruction inst) Pushes a FieldExpr onto the operand stack. |
public void | visit_getstatic(Instruction inst) Pushes a StaticFieldExpr onto the operand stack. |
public void | visit_goto(Instruction inst) Adds a GotoStmt to the statement list. |
public void | visit_i2b(Instruction inst) |
public void | visit_i2c(Instruction inst) |
public void | visit_i2d(Instruction inst) |
public void | visit_i2f(Instruction inst) |
public void | visit_i2l(Instruction inst) All cast visitors push a CastExpr onto the operand stack. |
public void | visit_i2s(Instruction inst) |
public void | visit_iadd(Instruction inst) All visit_xadd, visit_xsub,
visit_xmul, visit_xdiv, etc. |
public void | visit_iaload(Instruction inst) All visit_xaload push an ArrayRefExpr onto the
operand stack. |
public void | visit_iand(Instruction inst) All visit_x op push an ArithExpr onto the stack. |
public void | visit_iastore(Instruction inst) |
public void | visit_idiv(Instruction inst) |
public void | visit_if_acmpeq(Instruction inst) |
public void | visit_if_acmpne(Instruction inst) |
public void | visit_if_icmpeq(Instruction inst) All visit_if_xcmpy add a IfCmpStmt to the
statement list. |
public void | visit_if_icmpge(Instruction inst) |
public void | visit_if_icmpgt(Instruction inst) |
public void | visit_if_icmple(Instruction inst) |
public void | visit_if_icmplt(Instruction inst) |
public void | visit_if_icmpne(Instruction inst) |
public void | visit_ifeq(Instruction inst) All visit_xeg add an IfZeroStmt to the statement
list. |
public void | visit_ifge(Instruction inst) |
public void | visit_ifgt(Instruction inst) |
public void | visit_ifle(Instruction inst) |
public void | visit_iflt(Instruction inst) |
public void | visit_ifne(Instruction inst) |
public void | visit_ifnonnull(Instruction inst) |
public void | visit_ifnull(Instruction inst) Both visit_xnull add an IfZeroStmt to the statement
list. |
public void | visit_iinc(Instruction inst) Visiting an iinc involves creating a ConstantExpr, LocalExpr, ArithExpr
StoreExpr, and a ExprStmt. |
public void | visit_iload(Instruction inst) All visit_xload push a LocalExpr onto the operand
stack. |
public void | visit_imul(Instruction inst) |
public void | visit_ineg(Instruction inst) All visit_xneg push a NegExpr onto the stack. |
public void | visit_instanceof(Instruction inst) Pushes an InstanceOfExpr onto the operand stack. |
public void | visit_invokeinterface(Instruction inst) |
public void | visit_invokespecial(Instruction inst) |
public void | visit_invokestatic(Instruction inst) |
public void | visit_invokevirtual(Instruction inst) All visit_invokex deal with a CallMethodExpr or a
CallStaticExpr. |
public void | visit_ior(Instruction inst) |
public void | visit_irem(Instruction inst) |
public void | visit_ireturn(Instruction inst) All visit_xreturn add a ReturnExprStmt to the
statement list. |
public void | visit_ishl(Instruction inst) All visit_xshd push a ShiftExpr onto the
operand stack. |
public void | visit_ishr(Instruction inst) |
public void | visit_istore(Instruction inst) All visit_xstore add a LocalExpr statement to the
statement list. |
public void | visit_isub(Instruction inst) |
public void | visit_iushr(Instruction inst) |
public void | visit_ixor(Instruction inst) |
public void | visit_jsr(Instruction inst) Adds a JsrStmt to the statement list. |
public void | visit_l2d(Instruction inst) |
public void | visit_l2f(Instruction inst) |
public void | visit_l2i(Instruction inst) |
public void | visit_ladd(Instruction inst) |
public void | visit_laload(Instruction inst) |
public void | visit_land(Instruction inst) |
public void | visit_lastore(Instruction inst) |
public void | visit_lcmp(Instruction inst) All visit_xcmp push an ArithExpr onto the stack. |
public void | visit_ldc(Instruction inst) Pushes a ConstantExpr onto the operand stack. |
public void | visit_ldiv(Instruction inst) |
public void | visit_lload(Instruction inst) |
public void | visit_lmul(Instruction inst) |
public void | visit_lneg(Instruction inst) |
public void | visit_lor(Instruction inst) |
public void | visit_lrem(Instruction inst) |
public void | visit_lreturn(Instruction inst) |
public void | visit_lshl(Instruction inst) |
public void | visit_lshr(Instruction inst) |
public void | visit_lstore(Instruction inst) |
public void | visit_lsub(Instruction inst) |
public void | visit_lushr(Instruction inst) |
public void | visit_lxor(Instruction inst) |
public void | visit_monitorenter(Instruction inst) Both monitor visitors add a MonitorStmt to the statement list. |
public void | visit_monitorexit(Instruction inst) |
public void | visit_multianewarray(Instruction inst) Push a NewMultiArrayExpr onto the operand stack. |
public void | visit_new(Instruction inst) Pushes a NewExpr onto the operand stack. |
public void | visit_newarray(Instruction inst) Pushes a NewArrayExpr onto the operand stack. |
public void | visit_nop(Instruction inst) Adds no statements to the statement list. |
public void | visit_pop(Instruction inst) Pop the expression off the top of the stack and add it as an ExprStmt to
the statement list. |
public void | visit_pop2(Instruction inst) |
public void | visit_putfield(Instruction inst) |
public void | visit_putfield_nowb(Instruction inst) |
public void | visit_putstatic(Instruction inst) |
public void | visit_putstatic_nowb(Instruction inst) |
public void | visit_rc(Instruction inst) Replaces the expression on the top of the stack with an RCExpr. |
public void | visit_ret(Instruction inst) Adds a RetStmt to the statement list. |
public void | visit_return(Instruction inst) Adds a ReturnStmt to the statement list. |
public void | visit_saload(Instruction inst) |
public void | visit_sastore(Instruction inst) |
public void | visit_supdate(Instruction inst) Replace the expression at the stack depth specified in the instruction
with a UCExpr. |
public void | visit_swap(Instruction inst) |
public void | visit_switch(Instruction inst) Add a SwitchStmt to the statement list. |