Package soot.dexpler.instructions
Class ConditionalJumpInstruction
- java.lang.Object
-
- soot.dexpler.instructions.DexlibAbstractInstruction
-
- soot.dexpler.instructions.JumpInstruction
-
- soot.dexpler.instructions.ConditionalJumpInstruction
-
- All Implemented Interfaces:
DeferableInstruction
- Direct Known Subclasses:
IfTestInstruction,IfTestzInstruction
public abstract class ConditionalJumpInstruction extends JumpInstruction implements DeferableInstruction
-
-
Field Summary
-
Fields inherited from class soot.dexpler.instructions.JumpInstruction
markerUnit, targetInstruction
-
Fields inherited from class soot.dexpler.instructions.DexlibAbstractInstruction
codeAddress, instruction, lineNumber, unit
-
-
Constructor Summary
Constructors Constructor Description ConditionalJumpInstruction(org.jf.dexlib2.iface.instruction.Instruction instruction, int codeAdress)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddeferredJimplify(DexBody body)Jimplify this instruction with the guarantee that every other (non-deferred) instruction has been jimplified.protected ConditionExprgetComparisonExpr(DexBody body, int reg)Get comparison expression depending on opcode against zero or null.protected ConditionExprgetComparisonExpr(Immediate one, Immediate other)Get comparison expression depending on opcode between two immediatesprotected abstract IfStmtifStatement(DexBody body)Return an if statement depending on the instruction.voidjimplify(DexBody body)Jimplify this instruction.-
Methods inherited from class soot.dexpler.instructions.JumpInstruction
getTargetInstruction
-
Methods inherited from class soot.dexpler.instructions.DexlibAbstractInstruction
addTags, getInstruction, getLineNumber, getUnit, getUsedRegistersNums, getUsedRegistersNums, introducedTypes, setLineNumber, setUnit
-
-
-
-
Method Detail
-
ifStatement
protected abstract IfStmt ifStatement(DexBody body)
Return an if statement depending on the instruction.
-
jimplify
public void jimplify(DexBody body)
Description copied from class:DexlibAbstractInstructionJimplify this instruction.- Specified by:
jimplifyin classDexlibAbstractInstruction- Parameters:
body- to jimplify into.
-
deferredJimplify
public void deferredJimplify(DexBody body)
Description copied from interface:DeferableInstructionJimplify this instruction with the guarantee that every other (non-deferred) instruction has been jimplified.- Specified by:
deferredJimplifyin interfaceDeferableInstruction- Parameters:
body- to jimplify into
-
getComparisonExpr
protected ConditionExpr getComparisonExpr(DexBody body, int reg)
Get comparison expression depending on opcode against zero or null. If the register is used as an object this will create a comparison with null, not zero.- Parameters:
body- the containing DexBodyreg- the register to compare against zero.
-
getComparisonExpr
protected ConditionExpr getComparisonExpr(Immediate one, Immediate other)
Get comparison expression depending on opcode between two immediates- Parameters:
one- first immediateother- second immediate- Throws:
RuntimeException- if this is not a IfTest or IfTestz instruction.
-
-