|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soot.shimple.internal.SPhiExpr
public class SPhiExpr
Internal implementation of Phi nodes.
PhiExpr
,
Serialized FormField Summary | |
---|---|
protected List |
argPairs
|
protected Map |
predToPair
|
protected Type |
type
|
Constructor Summary | |
---|---|
SPhiExpr(List<Value> args,
List<Unit> preds)
Create a Phi expression from the given list of Values and Blocks. |
|
SPhiExpr(Local leftLocal,
List preds)
Create a trivial Phi expression for leftLocal. |
Method Summary | |
---|---|
boolean |
addArg(Value arg,
Block pred)
Add the given argument associated with the given CFG predecessor. |
boolean |
addArg(Value arg,
Unit predTailUnit)
Add the given argument associated with the given CFG predecessor. |
void |
apply(Switch sw)
Called when this object is visited. |
void |
clearUnitBoxes()
|
Object |
clone()
Returns a clone of this Value. |
int |
equivHashCode()
Returns a (not necessarily fixed) hash code for this object. |
boolean |
equivTo(Object o)
Returns true if this object is equivalent to o. |
ValueUnitPair |
getArgBox(Block pred)
Returns the argument pair corresponding to the given CFG predecessor. |
ValueUnitPair |
getArgBox(int index)
Returns the argument pair for the given index. |
ValueUnitPair |
getArgBox(Unit predTailUnit)
Returns the argument pair corresponding to the given CFG predecessor. |
int |
getArgCount()
Returns the number of arguments in this PhiExpr. |
int |
getArgIndex(Block pred)
Returns the index of the argument associated with the given control flow predecessor. |
int |
getArgIndex(Unit predTailUnit)
Returns the index of the argument associated with the given control flow predecessor Unit. |
List |
getArgs()
Returns an unmodifiable, backed view of the arguments to this PhiExpr. |
int |
getBlockId()
Returns the id number of the block from which the Phi node originated from. |
Unit |
getPred(int index)
Returns the control flow predecessor Unit for the given index into the PhiExpr. |
List<Unit> |
getPreds()
Returns a list of the control flow predecessor Units being tracked by this PhiExpr |
Type |
getType()
The type of the PhiExpr is usually the same as the type of its arguments. |
List |
getUnitBoxes()
|
List |
getUseBoxes()
Returns a List of boxes corresponding to Values which are used by (ie contained within) this Value. |
Value |
getValue(Block pred)
Get the PhiExpr argument corresponding to the given control flow predecessor, returns null if not available. |
Value |
getValue(int index)
Returns the value for the given index into the PhiExpr. |
Value |
getValue(Unit predTailUnit)
Get the PhiExpr argument corresponding to the given control flow predecessor, returns null if not available. |
List<Value> |
getValues()
Returns a list of the values used by this PhiExpr. |
boolean |
removeArg(Block pred)
Remove the argument corresponding to the given CFG predecessor. |
boolean |
removeArg(int index)
Remove the argument at the given index. |
boolean |
removeArg(Unit predTailUnit)
Remove the argument corresponding to the given CFG predecessor. |
boolean |
removeArg(ValueUnitPair arg)
Remove the given argument. |
boolean |
setArg(int index,
Value arg,
Block pred)
Modify the PhiExpr argument at the given index with the given information. |
boolean |
setArg(int index,
Value arg,
Unit predTailUnit)
Modify the PhiExpr argument at the given index with the given information. |
void |
setBlockId(int blockId)
Set the block number of the Phi node. |
boolean |
setPred(int index,
Block pred)
Update the CFG predecessor associated with the PhiExpr argument at the given index. |
boolean |
setPred(int index,
Unit predTailUnit)
Update the CFG predecessor associated with the PhiExpr argument at the given index. |
boolean |
setValue(Block pred,
Value arg)
Locate the argument assocatiated with the given CFG predecessor and set the value. |
boolean |
setValue(int index,
Value arg)
Set the value at the given index into the PhiExpr. |
boolean |
setValue(Unit predTailUnit,
Value arg)
Locate the argument assocatiated with the given CFG predecessor unit and set the value. |
String |
toString()
|
void |
toString(UnitPrinter up)
|
protected void |
updateCache()
Update predToPair cache map which could be out-of-sync due to external setUnit or clone operations on the UnitBoxes. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected List argPairs
protected Map predToPair
protected Type type
Constructor Detail |
---|
public SPhiExpr(Local leftLocal, List preds)
public SPhiExpr(List<Value> args, List<Unit> preds)
Method Detail |
---|
public List getArgs()
PhiExpr
getArgs
in interface PhiExpr
ValueUnitPair
public List<Value> getValues()
PhiExpr
getValues
in interface PhiExpr
public List<Unit> getPreds()
PhiExpr
getPreds
in interface PhiExpr
public int getArgCount()
PhiExpr
getArgCount
in interface PhiExpr
public ValueUnitPair getArgBox(int index)
PhiExpr
getArgBox
in interface PhiExpr
public Value getValue(int index)
PhiExpr
getValue
in interface PhiExpr
public Unit getPred(int index)
PhiExpr
getPred
in interface PhiExpr
public int getArgIndex(Unit predTailUnit)
PhiExpr
getArgIndex
in interface PhiExpr
public ValueUnitPair getArgBox(Unit predTailUnit)
PhiExpr
getArgBox
in interface PhiExpr
public Value getValue(Unit predTailUnit)
PhiExpr
getValue
in interface PhiExpr
public int getArgIndex(Block pred)
PhiExpr
getArgIndex
in interface PhiExpr
public ValueUnitPair getArgBox(Block pred)
PhiExpr
getArgBox
in interface PhiExpr
public Value getValue(Block pred)
PhiExpr
getValue
in interface PhiExpr
public boolean setArg(int index, Value arg, Unit predTailUnit)
PhiExpr
setArg
in interface PhiExpr
public boolean setArg(int index, Value arg, Block pred)
PhiExpr
setArg
in interface PhiExpr
public boolean setValue(int index, Value arg)
PhiExpr
setValue
in interface PhiExpr
public boolean setValue(Unit predTailUnit, Value arg)
PhiExpr
setValue
in interface PhiExpr
public boolean setValue(Block pred, Value arg)
PhiExpr
setValue
in interface PhiExpr
public boolean setPred(int index, Unit predTailUnit)
PhiExpr
setPred
in interface PhiExpr
public boolean setPred(int index, Block pred)
PhiExpr
setPred
in interface PhiExpr
public boolean removeArg(int index)
PhiExpr
removeArg
in interface PhiExpr
public boolean removeArg(Unit predTailUnit)
PhiExpr
removeArg
in interface PhiExpr
public boolean removeArg(Block pred)
PhiExpr
removeArg
in interface PhiExpr
public boolean removeArg(ValueUnitPair arg)
PhiExpr
removeArg
in interface PhiExpr
public boolean addArg(Value arg, Block pred)
PhiExpr
addArg
in interface PhiExpr
public boolean addArg(Value arg, Unit predTailUnit)
PhiExpr
addArg
in interface PhiExpr
public void setBlockId(int blockId)
PhiExpr
setBlockId
in interface PhiExpr
public int getBlockId()
PhiExpr
getBlockId
in interface PhiExpr
protected void updateCache()
public boolean equivTo(Object o)
EquivTo
equivTo
in interface EquivTo
public int equivHashCode()
EquivTo
equivHashCode
in interface EquivTo
public List getUnitBoxes()
getUnitBoxes
in interface UnitBoxOwner
public void clearUnitBoxes()
clearUnitBoxes
in interface UnitBoxOwner
public List getUseBoxes()
Value
getUseBoxes
in interface Value
public Type getType()
PhiExpr
getType
in interface PhiExpr
getType
in interface Value
public String toString()
toString
in class Object
public void toString(UnitPrinter up)
toString
in interface Value
public void apply(Switch sw)
Switchable
apply
in interface PhiExpr
apply
in interface Switchable
public Object clone()
Value
clone
in interface Value
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |