Package com.android.dx.ssa
Class NormalSsaInsn
java.lang.Object
com.android.dx.ssa.SsaInsn
com.android.dx.ssa.NormalSsaInsn
A "normal" (non-phi) instruction in SSA form. Always wraps a rop insn.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.android.dx.ssa.SsaInsn
SsaInsn.Visitor
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Accepts a visitor.boolean
canThrow()
final void
changeOneSource
(int index, RegisterSpec newSpec) Changes one of the insn's sources.clone()
Gets the spec of a local variable assignment that occurs at this instruction, or null if no local variable assignment occurs.Returns the Rop opcode for this insn, or null if this is a phi insn.Returns the original Rop insn for this insn, or null if this is a phi insn.Like rop.Insn.getSources().boolean
Returns true if this insn is considered to have a side effect beyond that of assigning to the result reg.boolean
boolean
boolean
final void
mapSourceRegisters
(RegisterMapper mapper) Maps only source registers.final void
setNewSources
(RegisterSpecList newSources) Changes the source list of the insn.toHuman()
Return the "human" string form of this instance.Transform back to ROP form.void
Upgrades this insn to a version that represents the constant source literally.Methods inherited from class com.android.dx.ssa.SsaInsn
changeResultReg, getBlock, getResult, isRegASource, isResultReg, makeFromRop, mapRegisters, setResult, setResultLocal
-
Method Details
-
mapSourceRegisters
Maps only source registers.- Specified by:
mapSourceRegisters
in classSsaInsn
- Parameters:
mapper
- new mapping
-
changeOneSource
Changes one of the insn's sources. New source should be of same type and category.- Parameters:
index
->=0;
index of source to changenewSpec
- spec for new source
-
setNewSources
Changes the source list of the insn. New source list should be the same size and consist of sources of identical types.- Parameters:
newSources
- non-null new sources list.
-
clone
-
getSources
Like rop.Insn.getSources().- Specified by:
getSources
in classSsaInsn
- Returns:
null-ok;
sources list
-
toHuman
Return the "human" string form of this instance. This is generally less "debuggy" thantoString()
. -
toRopInsn
Transform back to ROP form. TODO: Move this up into NormalSsaInsn. -
getOpcode
Description copied from class:SsaInsn
Returns the Rop opcode for this insn, or null if this is a phi insn. TODO: Move this up into NormalSsaInsn. -
getOriginalRopInsn
Returns the original Rop insn for this insn, or null if this is a phi insn. TODO: Move this up into NormalSsaInsn.- Specified by:
getOriginalRopInsn
in classSsaInsn
- Returns:
null-ok;
Rop insn if there is one.
-
getLocalAssignment
Gets the spec of a local variable assignment that occurs at this instruction, or null if no local variable assignment occurs. This may be the result register, or formark-local
insns it may be the source.- Overrides:
getLocalAssignment
in classSsaInsn
- Returns:
null-ok;
a local-associated register spec or null- See Also:
-
upgradeToLiteral
public void upgradeToLiteral()Upgrades this insn to a version that represents the constant source literally. If the upgrade is not possible, this does nothing.- See Also:
-
isNormalMoveInsn
public boolean isNormalMoveInsn()- Overrides:
isNormalMoveInsn
in classSsaInsn
- Returns:
- true if this is a move (but not a move-operand) instruction
-
isMoveException
public boolean isMoveException()- Overrides:
isMoveException
in classSsaInsn
- Returns:
- true if this is a move-exception instruction. These instructions must immediately follow a preceeding invoke*
-
canThrow
public boolean canThrow() -
accept
Accepts a visitor. -
isPhiOrMove
public boolean isPhiOrMove()- Specified by:
isPhiOrMove
in classSsaInsn
- Returns:
- true if this is a PhiInsn or a normal move insn
-
hasSideEffect
public boolean hasSideEffect()Returns true if this insn is considered to have a side effect beyond that of assigning to the result reg. TODO: Increase the scope of this.- Specified by:
hasSideEffect
in classSsaInsn
- Returns:
- true if this insn is considered to have a side effect beyond that of assigning to the result reg.
-