Package com.ibm.wala.ssa
Class ShrikeIndirectionData
- java.lang.Object
-
- com.ibm.wala.ssa.ShrikeIndirectionData
-
- All Implemented Interfaces:
SSAIndirectionData<ShrikeIndirectionData.ShrikeLocalName>
public class ShrikeIndirectionData extends Object implements SSAIndirectionData<ShrikeIndirectionData.ShrikeLocalName>
An implementation ofSSAIndirectionDataspecialized for IRs originated from Shrike.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classShrikeIndirectionData.ShrikeLocalNameIn Shrike, the only "source" level entities which have names relevant to indirect pointer operations are bytecode locals.-
Nested classes/interfaces inherited from interface com.ibm.wala.ssa.SSAIndirectionData
SSAIndirectionData.Name
-
-
Constructor Summary
Constructors Constructor Description ShrikeIndirectionData(int instructionArrayLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDef(int instructionIndex, ShrikeIndirectionData.ShrikeLocalName name)For the instruction at the given index, and a source-level name, return the SSA value number which represents this instruction's def of that name.Collection<ShrikeIndirectionData.ShrikeLocalName>getNames()Returns the set of "source" level names (e.g.intgetUse(int instructionIndex, ShrikeIndirectionData.ShrikeLocalName name)For the instruction at the given index, and a source-level name, return the SSA value number which represents this instruction's use of that name.voidsetDef(int instructionIndex, ShrikeIndirectionData.ShrikeLocalName name, int newDef)Record the fact that a particular instruction defs a particular SSA value number (newDef), representing the value of a "source" entity "name".voidsetUse(int instructionIndex, ShrikeIndirectionData.ShrikeLocalName name, int newUse)StringtoString()
-
-
-
Method Detail
-
getDef
public int getDef(int instructionIndex, ShrikeIndirectionData.ShrikeLocalName name)Description copied from interface:SSAIndirectionDataFor the instruction at the given index, and a source-level name, return the SSA value number which represents this instruction's def of that name. For example, in Example B in header comment above, suppose v2 referred to a "source"-entity called "Local1". Since instruction (1) (call to bar) defs "Local1", we introduce in this table a new SSA value number, say v7, which represents the value of "Local1" immediately after this instruction.- Specified by:
getDefin interfaceSSAIndirectionData<ShrikeIndirectionData.ShrikeLocalName>
-
getUse
public int getUse(int instructionIndex, ShrikeIndirectionData.ShrikeLocalName name)Description copied from interface:SSAIndirectionDataFor the instruction at the given index, and a source-level name, return the SSA value number which represents this instruction's use of that name. For example, in Example A in header comment above, suppose v1 referred to a "source"-entity called "Local1". Since instruction (1) (LoadIndirect) uses "Local1", we record in this table the SSA value number that represents "Local1" immediately before instruction (1). So if v1 and v7 both refer to "Local1", then (1) uses v7. If v7 does NOT refer to "Local1", then (1) uses v1.- Specified by:
getUsein interfaceSSAIndirectionData<ShrikeIndirectionData.ShrikeLocalName>
-
setDef
public void setDef(int instructionIndex, ShrikeIndirectionData.ShrikeLocalName name, int newDef)Description copied from interface:SSAIndirectionDataRecord the fact that a particular instruction defs a particular SSA value number (newDef), representing the value of a "source" entity "name".- Specified by:
setDefin interfaceSSAIndirectionData<ShrikeIndirectionData.ShrikeLocalName>- See Also:
SSAIndirectionData.getDef(int, T)
-
setUse
public void setUse(int instructionIndex, ShrikeIndirectionData.ShrikeLocalName name, int newUse)- Specified by:
setUsein interfaceSSAIndirectionData<ShrikeIndirectionData.ShrikeLocalName>- See Also:
SSAIndirectionData.getUse(int, T)
-
getNames
public Collection<ShrikeIndirectionData.ShrikeLocalName> getNames()
Description copied from interface:SSAIndirectionDataReturns the set of "source" level names (e.g. local variables in bytecode or source code) for which this map holds information.- Specified by:
getNamesin interfaceSSAIndirectionData<ShrikeIndirectionData.ShrikeLocalName>
-
-