|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.ssa.SsaMethod
public final class SsaMethod
A method in SSA form.
| Method Summary | |
|---|---|
int |
blockIndexToRopLabel(int bi)
|
int |
borrowSpareRegister(int category)
Borrows a register to use as a temp. |
void |
computeReachability()
Computes reachability for all blocks in the method. |
void |
deleteInsns(Set<SsaInsn> deletedInsns)
Deletes all insns in the set from this method. |
void |
forEachBlockDepthFirst(boolean reverse,
SsaBasicBlock.Visitor v)
Walks the basic block tree in depth-first order, calling the visitor method once for every block. |
void |
forEachBlockDepthFirstDom(SsaBasicBlock.Visitor v)
Visits blocks in dom-tree order, starting at the current node. |
void |
forEachInsn(SsaInsn.Visitor visitor)
Visits all insns in this method. |
void |
forEachPhiInsn(PhiInsn.Visitor v)
Visits each phi insn in this method |
ArrayList<SsaBasicBlock> |
getBlocks()
|
int |
getCountReachableBlocks()
Returns the count of reachable blocks in this method: blocks that have predecessors (or are the start block) |
SsaInsn |
getDefinitionForRegister(int reg)
Returns the insn that defines the given register |
SsaBasicBlock |
getEntryBlock()
|
int |
getEntryBlockIndex()
|
SsaBasicBlock |
getExitBlock()
|
int |
getExitBlockIndex()
|
int |
getParamWidth()
|
int |
getRegCount()
|
ArrayList<SsaInsn>[] |
getUseListCopy()
Returns a modifiable copy of the register use list. |
List<SsaInsn> |
getUseListForRegister(int reg)
Returns the list of all source uses (not results) for a register. |
static IntList |
indexListFromLabelList(BasicBlockList ropBlocks,
IntList labelList)
Builds an IntList of block indices from a basic block list and a list of labels taken from Rop form. |
boolean |
isRegALocal(RegisterSpec spec)
Checks to see if the given SSA reg is ever associated with a local local variable. |
boolean |
isStatic()
Returns true if this is a static method. |
SsaBasicBlock |
makeNewGotoBlock()
Makes a new basic block for this method, which is empty besides a single GOTO. |
int |
makeNewSsaReg()
Makes a new SSA register. |
void |
mapRegisters(RegisterMapper mapper)
Remaps unversioned registers. |
static SsaMethod |
newFromRopMethod(RopMethod ropMethod,
int paramWidth,
boolean isStatic)
|
void |
onInsnsChanged()
Indicates that the instruction list has changed or the SSA register count has increased, so that internal datastructures that rely on it should be rebuild. |
void |
returnSpareRegisters()
Returns all borrowed registers. |
void |
setBackMode()
Sets "back-convert mode". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static SsaMethod newFromRopMethod(RopMethod ropMethod,
int paramWidth,
boolean isStatic)
ropMethod - rop-form method to convert fromparamWidth - the total width, in register-units, of the
method's parametersisStatic - true if this method has no this
pointer argument
public static IntList indexListFromLabelList(BasicBlockList ropBlocks,
IntList labelList)
ropBlocks - Rop blockslabelList - list of rop block labels
public SsaBasicBlock makeNewGotoBlock()
GOTO. Successors and predecessors are not yet
set.
public int getEntryBlockIndex()
public SsaBasicBlock getEntryBlock()
public int getExitBlockIndex()
-1 if there is nonepublic SsaBasicBlock getExitBlock()
null-ok; block of exit block or null if
there is nonepublic int blockIndexToRopLabel(int bi)
bi - block index or -1 for none
bi was -1public int getRegCount()
public int getParamWidth()
public boolean isStatic()
true if this is a static method.
true if this is a static methodpublic int borrowSpareRegister(int category)
category - width (1 or 2) of the register
public void returnSpareRegisters()
public ArrayList<SsaBasicBlock> getBlocks()
non-null; basic block list. Do not modify.public int getCountReachableBlocks()
>= 0; number of reachable basic blockspublic void computeReachability()
public void mapRegisters(RegisterMapper mapper)
mapper - maps old registers to new.public SsaInsn getDefinitionForRegister(int reg)
reg - register in question
public void onInsnsChanged()
public List<SsaInsn> getUseListForRegister(int reg)
reg - register in question
public ArrayList<SsaInsn>[] getUseListCopy()
public boolean isRegALocal(RegisterSpec spec)
spec - non-null; ssa reg
public int makeNewSsaReg()
>=0; new SSA register.public void forEachInsn(SsaInsn.Visitor visitor)
visitor - non-null; callback interfacepublic void forEachPhiInsn(PhiInsn.Visitor v)
v - non-null; callback.
public void forEachBlockDepthFirst(boolean reverse,
SsaBasicBlock.Visitor v)
reverse - true if this should walk backwards from the exit pointsv - non-null; callback interface. parent is set
unless this is the root nodepublic void forEachBlockDepthFirstDom(SsaBasicBlock.Visitor v)
parent parameter of the Visitor.visitBlock callback
is currently always set to null.
v - non-null; callback interfacepublic void deleteInsns(Set<SsaInsn> deletedInsns)
deletedInsns - non-null; insns to deletepublic void setBackMode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||