public abstract class DexlibAbstractInstruction extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
codeAddress |
protected Instruction |
instruction |
protected int |
lineNumber |
protected Type[] |
op1BinType |
protected Type[] |
op2BinType |
protected Type[] |
opUnType |
protected Type[] |
resBinType |
protected Type[] |
resUnType |
protected Unit |
unit |
Constructor and Description |
---|
DexlibAbstractInstruction(Instruction instruction,
int codeAddress) |
Modifier and Type | Method and Description |
---|---|
protected void |
addTags(Host host)
Tag the passed host with: - this instructions line number (if one is set)
- the original bytecode offset
|
Instruction |
getInstruction() |
int |
getLineNumber() |
Unit |
getUnit() |
protected List<Integer> |
getUsedRegistersNums(FiveRegisterInstruction instruction)
Return the indices used in the given instruction.
|
protected List<Integer> |
getUsedRegistersNums(RegisterRangeInstruction instruction)
Return the indices used in the given instruction.
|
Set<Type> |
introducedTypes()
Return the types that are be introduced by this instruction.
|
abstract void |
jimplify(DexBody body)
Jimplify this instruction.
|
void |
setLineNumber(int lineNumber) |
protected void |
setUnit(Unit u)
Set the Jimple Unit, that comprises this instruction.
|
protected int lineNumber
protected Instruction instruction
protected int codeAddress
protected Unit unit
protected Type[] opUnType
protected Type[] resUnType
protected Type[] resBinType
protected Type[] op1BinType
protected Type[] op2BinType
public DexlibAbstractInstruction(Instruction instruction, int codeAddress)
instruction
- the underlying dexlib instructioncodeAddress
- the bytecode address of this instructionpublic Instruction getInstruction()
public abstract void jimplify(DexBody body)
body
- to jimplify into.public Set<Type> introducedTypes()
public int getLineNumber()
public void setLineNumber(int lineNumber)
protected void addTags(Host host)
host
- the host to tagpublic Unit getUnit()
protected void setUnit(Unit u)
protected List<Integer> getUsedRegistersNums(RegisterRangeInstruction instruction)
instruction
- a range invocation instruction