| Modifier and Type | Class and Description |
|---|---|
| private static class | SsaToRop.
Helper for |
| Modifier and Type | Field and Description |
|---|---|
| private static final boolean | DEBUG
local debug flag |
| private final InterferenceGraph | interference
|
| private final boolean | minimizeRegisters
|
| private final SsaMethod | ssaMeth
|
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private RopMethod | |
| private BasicBlock | Returns: non-null; ROP blockSSA block to process block)Converts a single basic block to rop form. |
| private BasicBlockList | |
| private InsnList | Returns: non-null; immutable instruction listnon-null; old instructionsConverts an insn list to rop form. |
| public static RopMethod | Returns: non-null; rop-form outputnon-null; method to processtrue if the converter should
attempt to minimize the rop-form register countConverts a method in SSA form to ROP form. |
| public int[] | Returns: a list of registers ordered by most-frequently-used to least-frequently-used. Each register is listed once and only once.Note This method is not presently used. |
| private void | moveParametersToHighRegisters()
Moves the parameter registers, which allocateRegisters() places at the bottom of the frame, up to the top of the frame to match Dalvik calling convention. |
| private void | |
| private void | |
| private void | verifyValidExitPredecessor(SsaBasicBlock
non-null; block to validateValidates that a basic block is a valid end predecessor. |
| DEBUG | back to summary |
|---|---|
| private static final boolean DEBUG local debug flag | |
| interference | back to summary |
|---|---|
| private final InterferenceGraph interference
| |
| minimizeRegisters | back to summary |
|---|---|
| private final boolean minimizeRegisters
| |
| ssaMeth | back to summary |
|---|---|
| private final SsaMethod ssaMeth
| |
| SsaToRop | back to summary |
|---|---|
| private SsaToRop(SsaMethod ssaMethod, boolean minimizeRegisters) Constructs an instance.
| |
| convert | back to summary |
|---|---|
| private RopMethod convert() Performs the conversion.
| |
| convertBasicBlock | back to summary |
|---|---|
| private BasicBlock convertBasicBlock(SsaBasicBlock block) Converts a single basic block to rop form.
| |
| convertBasicBlocks | back to summary |
|---|---|
private BasicBlockList convertBasicBlocks()
| |
| convertInsns | back to summary |
|---|---|
| private InsnList convertInsns(ArrayList<SsaInsn> ssaInsns) Converts an insn list to rop form. | |
| convertToRopMethod | back to summary |
|---|---|
| public static RopMethod convertToRopMethod(SsaMethod ssaMeth, boolean minimizeRegisters) Converts a method in SSA form to ROP form. | |
| getRegistersByFrequency | back to summary |
|---|---|
| public int[] getRegistersByFrequency() Note This method is not presently used.
| |
| moveParametersToHighRegisters | back to summary |
|---|---|
| private void moveParametersToHighRegisters() Moves the parameter registers, which allocateRegisters() places at the bottom of the frame, up to the top of the frame to match Dalvik calling convention. | |
| removeEmptyGotos | back to summary |
|---|---|
| private void removeEmptyGotos() Removes all blocks containing only GOTOs from the control flow. Although much of this work will be done later when converting from rop to dex, not all simplification cases can be handled there. Furthermore, any no-op block between the exit block and blocks containing the real return or throw statements must be removed. | |
| removePhiFunctions | back to summary |
|---|---|
| private void removePhiFunctions() See Appel 19.6. To remove the phi instructions in an edge-split SSA representation we know we can always insert a move in a predecessor block. | |
| verifyValidExitPredecessor | back to summary |
|---|---|
| private void verifyValidExitPredecessor(SsaBasicBlock b) Validates that a basic block is a valid end predecessor. It must end in a RETURN or a THROW. Throws a runtime exception on error.
| |
removePhiFunctions: PhiSuccessorUpdater for
adding move instructions to predecessors based on phi insns.
| Modifier and Type | Field and Description |
|---|---|
| private final ArrayList |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| blocks | back to summary |
|---|---|
| private final ArrayList<SsaBasicBlock> blocks | |
| PhiVisitor | back to summary |
|---|---|
| public PhiVisitor(ArrayList<SsaBasicBlock> blocks) | |
| visitPhiInsn | back to summary |
|---|---|
| public void visitPhiInsn(PhiInsn insn) Implements org. | |