|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.android.dx.dex.code.OutputFinisher
public final class OutputFinisher
Processor for instruction lists, which takes a "first cut" of
instruction selection as a basis and produces a "final cut" in the
form of a DalvInsnList
instance.
Constructor Summary | |
---|---|
OutputFinisher(DexOptions dexOptions,
int initialCapacity,
int regCount)
Constructs an instance. |
Method Summary | |
---|---|
void |
add(DalvInsn insn)
Adds an instruction to the output. |
void |
assignIndices(DalvCode.AssignIndicesCallback callback)
Assigns indices in all instructions that need them, using the given callback to perform lookups. |
DalvInsnList |
finishProcessingAndGetList()
Does final processing on this instance and gets the output as a DalvInsnList . |
HashSet<Constant> |
getAllConstants()
Returns the set of all constants referred to by instructions added to this instance. |
boolean |
hasAnyLocalInfo()
Returns whether this instance has any local variable information. |
boolean |
hasAnyPositionInfo()
Returns whether any of the instructions added to this instance come with position info. |
void |
insert(int at,
DalvInsn insn)
Inserts an instruction in the output at the given offset. |
void |
reverseBranch(int which,
CodeAddress newTarget)
Reverses a branch which is buried a given number of instructions backward in the output. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OutputFinisher(DexOptions dexOptions, int initialCapacity, int regCount)
dexOptions
- non-null;
options for dex outputregCount
- >= 0;
register count for the methodinitialCapacity
- >= 0;
initial capacity of the
instructions listMethod Detail |
---|
public boolean hasAnyPositionInfo()
public boolean hasAnyLocalInfo()
public HashSet<Constant> getAllConstants()
non-null;
the set of constantspublic void add(DalvInsn insn)
insn
- non-null;
the instruction to addpublic void insert(int at, DalvInsn insn)
at
- >= 0;
what index to insert atinsn
- non-null;
the instruction to insertpublic void reverseBranch(int which, CodeAddress newTarget)
which
- how many instructions back to find the branch;
0
is the most recently added instruction,
1
is the instruction before that, etc.newTarget
- non-null;
the new target for the
reversed branchpublic void assignIndices(DalvCode.AssignIndicesCallback callback)
finishProcessingAndGetList()
.
callback
- non-null;
callback objectpublic DalvInsnList finishProcessingAndGetList()
DalvInsnList
. Final processing consists of:
Note: This method may only be called once per instance of this class.
non-null;
the output list
UnsupportedOperationException
- if this method has
already been called
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |