|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.cf.code.BasicBlocker
public final class BasicBlocker
Utility that identifies basic blocks in bytecode.
| Method Summary | |
|---|---|
int |
getPreviousOffset()
Get previous bytecode offset |
static ByteBlockList |
identifyBlocks(ConcreteMethod method)
Identifies and enumerates the basic blocks in the given method, returning a list of them. |
void |
setPreviousOffset(int offset)
Set previous bytecode offset |
void |
visitBranch(int opcode,
int offset,
int length,
int target)
Visits an instruction which has a branch target argument. |
void |
visitConstant(int opcode,
int offset,
int length,
Constant cst,
int value)
Visits an instruction which has a (possibly synthetic) constant argument, and possibly also an additional literal integer argument. |
void |
visitInvalid(int opcode,
int offset,
int length)
Visits an invalid instruction. |
void |
visitLocal(int opcode,
int offset,
int length,
int idx,
Type type,
int value)
Visits an instruction which has a local variable index argument. |
void |
visitNewarray(int offset,
int length,
CstType type,
ArrayList<Constant> intVals)
Visits a newarray instruction. |
void |
visitNoArgs(int opcode,
int offset,
int length,
Type type)
Visits an instruction which has no inline arguments (implicit or explicit). |
void |
visitSwitch(int opcode,
int offset,
int length,
SwitchList cases,
int padding)
Visits a switch instruction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ByteBlockList identifyBlocks(ConcreteMethod method)
method - non-null; method to convert
non-null; list of basic blocks
public void visitInvalid(int opcode,
int offset,
int length)
visitInvalid in interface BytecodeArray.Visitoropcode - the opcodeoffset - offset to the instructionlength - length of the instruction, in bytes
public void visitNoArgs(int opcode,
int offset,
int length,
Type type)
visitNoArgs in interface BytecodeArray.Visitoropcode - the opcodeoffset - offset to the instructionlength - length of the instruction, in bytestype - non-null; type the instruction operates on
public void visitLocal(int opcode,
int offset,
int length,
int idx,
Type type,
int value)
visitLocal in interface BytecodeArray.Visitoropcode - the opcodeoffset - offset to the instructionlength - length of the instruction, in bytesidx - the local variable indextype - non-null; the type of the accessed valuevalue - additional literal integer argument, if salient (i.e.,
for iinc)
public void visitConstant(int opcode,
int offset,
int length,
Constant cst,
int value)
multianewarray, the argument is the count of
dimensions. In the case of invokeinterface,
the argument is the parameter count or'ed with the
should-be-zero value left-shifted by 8. In the case of entries
of type int, the value field always
holds the raw value (for convenience of clients).
Note: In order to avoid giving it a barely-useful
visitor all its own, newarray also uses this
form, passing value as the array type code and
cst as a CstType instance
corresponding to the array type.
visitConstant in interface BytecodeArray.Visitoropcode - the opcodeoffset - offset to the instructionlength - length of the instruction, in bytescst - non-null; the constantvalue - additional literal integer argument, if salient
(ignore if not)
public void visitBranch(int opcode,
int offset,
int length,
int target)
visitBranch in interface BytecodeArray.Visitoropcode - the opcodeoffset - offset to the instructionlength - length of the instruction, in bytestarget - the absolute (not relative) branch target
public void visitSwitch(int opcode,
int offset,
int length,
SwitchList cases,
int padding)
visitSwitch in interface BytecodeArray.Visitoropcode - the opcodeoffset - offset to the instructionlength - length of the instruction, in bytescases - non-null; list of (value, target)
pairs, plus the default targetpadding - the bytes found in the padding area (if any),
packed
public void visitNewarray(int offset,
int length,
CstType type,
ArrayList<Constant> intVals)
visitNewarray in interface BytecodeArray.Visitoroffset - offset to the instructionlength - length of the instruction, in bytestype - non-null; the type of the arrayintVals - non-null; list of bytecode offsets
for init valuespublic void setPreviousOffset(int offset)
setPreviousOffset in interface BytecodeArray.Visitoroffset - offset of the previous fully parsed bytecodepublic int getPreviousOffset()
getPreviousOffset in interface BytecodeArray.Visitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||