public class AnalyzedInstruction extends java.lang.Object implements java.lang.Comparable<AnalyzedInstruction>
| Modifier and Type | Field and Description |
|---|---|
protected Instruction |
instruction
The actual instruction
|
protected int |
instructionIndex
The index of the instruction, where the first instruction in the method is at index 0, and so on
|
protected Instruction |
originalInstruction
When deodexing, we might need to deodex this instruction multiple times, when we merge in new register
information.
|
protected RegisterType[] |
postRegisterMap
This contains the register types *after* the instruction has executed
|
protected java.util.TreeSet<AnalyzedInstruction> |
predecessors
Instructions that can pass on execution to this one during normal execution
|
protected RegisterType[] |
preRegisterMap
This contains the register types *before* the instruction has executed
|
protected java.util.LinkedList<AnalyzedInstruction> |
successors
Instructions that can execution could pass on to next during normal execution
|
| Constructor and Description |
|---|
AnalyzedInstruction(Instruction instruction,
int instructionIndex,
int registerCount) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addPredecessor(AnalyzedInstruction predecessor) |
protected void |
addSuccessor(AnalyzedInstruction successor) |
int |
compareTo(AnalyzedInstruction analyzedInstruction) |
int |
getDestinationRegister() |
Instruction |
getInstruction() |
int |
getInstructionIndex() |
Instruction |
getOriginalInstruction() |
RegisterType |
getPostInstructionRegisterType(int registerNumber) |
int |
getPredecessorCount() |
java.util.SortedSet<AnalyzedInstruction> |
getPredecessors() |
RegisterType |
getPreInstructionRegisterType(int registerNumber) |
int |
getRegisterCount() |
java.util.List<AnalyzedInstruction> |
getSuccesors() |
int |
getSuccessorCount() |
boolean |
isBeginningInstruction()
Is this instruction a "beginning instruction".
|
protected boolean |
isInvokeInit() |
protected RegisterType |
mergePreRegisterTypeFromPredecessors(int registerNumber)
Iterates over the predecessors of this instruction, and merges all the post-instruction register types for the
given register.
|
protected boolean |
mergeRegister(int registerNumber,
RegisterType registerType,
java.util.BitSet verifiedInstructions) |
protected void |
restoreOdexedInstruction() |
protected void |
setDeodexedInstruction(Instruction instruction) |
protected boolean |
setPostRegisterType(int registerNumber,
RegisterType registerType) |
boolean |
setsRegister() |
boolean |
setsRegister(int registerNumber) |
boolean |
setsWideRegister() |
protected Instruction instruction
protected final int instructionIndex
protected final java.util.TreeSet<AnalyzedInstruction> predecessors
protected final java.util.LinkedList<AnalyzedInstruction> successors
protected final RegisterType[] preRegisterMap
protected final RegisterType[] postRegisterMap
protected final Instruction originalInstruction
public AnalyzedInstruction(Instruction instruction, int instructionIndex, int registerCount)
public int getInstructionIndex()
public int getPredecessorCount()
public java.util.SortedSet<AnalyzedInstruction> getPredecessors()
protected boolean addPredecessor(AnalyzedInstruction predecessor)
protected void addSuccessor(AnalyzedInstruction successor)
protected void setDeodexedInstruction(Instruction instruction)
protected void restoreOdexedInstruction()
public int getSuccessorCount()
public java.util.List<AnalyzedInstruction> getSuccesors()
public Instruction getInstruction()
public Instruction getOriginalInstruction()
public boolean isBeginningInstruction()
protected boolean mergeRegister(int registerNumber,
RegisterType registerType,
java.util.BitSet verifiedInstructions)
protected RegisterType mergePreRegisterTypeFromPredecessors(int registerNumber)
registerNumber - the register numberprotected boolean setPostRegisterType(int registerNumber,
RegisterType registerType)
protected boolean isInvokeInit()
public boolean setsRegister()
public boolean setsWideRegister()
public boolean setsRegister(int registerNumber)
public int getDestinationRegister()
public int getRegisterCount()
@Nonnull public RegisterType getPostInstructionRegisterType(int registerNumber)
@Nonnull public RegisterType getPreInstructionRegisterType(int registerNumber)
public int compareTo(AnalyzedInstruction analyzedInstruction)
compareTo in interface java.lang.Comparable<AnalyzedInstruction>