public final class OutputFinisher
extends java.lang.Object
DalvInsnList instance.| Constructor and Description |
|---|
OutputFinisher(DexOptions dexOptions,
int initialCapacity,
int regCount,
int paramSize)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
DalvInsn |
get(int at) |
java.util.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.
|
int |
size() |
public OutputFinisher(DexOptions dexOptions, int initialCapacity, int regCount, int paramSize)
dexOptions - non-null; options for dex outputinitialCapacity - >= 0; initial capacity of the
instructions listregCount - >= 0; register count for the methodparamSize - size, in register units, of all the parameters for this methodpublic boolean hasAnyPositionInfo()
public boolean hasAnyLocalInfo()
public java.util.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 - at >= 0; what index to insert atinsn - non-null; the instruction to insertpublic DalvInsn get(int at)
public int size()
public 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 listjava.lang.UnsupportedOperationException - if this method has
already been calledCopyright © 2020. All Rights Reserved.