Package com.ibm.wala.cast.ir.translator
Class AstTranslator.AstLexicalInformation
- java.lang.Object
-
- com.ibm.wala.cast.ir.translator.AstTranslator.AstLexicalInformation
-
- All Implemented Interfaces:
AstMethod.LexicalInformation
- Enclosing class:
- AstTranslator
public static class AstTranslator.AstLexicalInformation extends Object implements AstMethod.LexicalInformation
lexical access information for some entity scope. used during call graph construction to handle lexical accesses.
-
-
Constructor Summary
Constructors Constructor Description AstLexicalInformation(AstTranslator.AstLexicalInformation original)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IntSet
getAllExposedUses()
return all value numbers appearing as entries in eitherAstMethod.LexicalInformation.getExposedUses(int)
orAstMethod.LexicalInformation.getExitExposedUses()
int[]
getExitExposedUses()
maps each exposed name (via its index inAstMethod.LexicalInformation.getExposedNames()
) to its value number at method exit.Pair<String,String>[]
getExposedNames()
names possibly accessed in a nested lexical scope, represented as pairs (name,nameOfDefiningEntity)int[]
getExposedUses(int instructionOffset)
get a map from exposed name (via its index inAstMethod.LexicalInformation.getExposedNames()
) to its value number at the instruction at offset instructionOffset.String
getScopingName()
get the name of this entity, as it appears in the definer portion of a lexical nameString[]
getScopingParents()
return the names of the enclosing methods declaring names that are lexically accessed by the entitystatic boolean
hasExposedUses(CGNode caller, CallSiteReference site)
boolean
isReadOnly(String name)
returns true if name may be read in nested lexical scopes but cannot be written
-
-
-
Constructor Detail
-
AstLexicalInformation
public AstLexicalInformation(AstTranslator.AstLexicalInformation original)
-
-
Method Detail
-
getExitExposedUses
public int[] getExitExposedUses()
Description copied from interface:AstMethod.LexicalInformation
maps each exposed name (via its index inAstMethod.LexicalInformation.getExposedNames()
) to its value number at method exit.- Specified by:
getExitExposedUses
in interfaceAstMethod.LexicalInformation
-
getExposedUses
public int[] getExposedUses(int instructionOffset)
Description copied from interface:AstMethod.LexicalInformation
get a map from exposed name (via its index inAstMethod.LexicalInformation.getExposedNames()
) to its value number at the instruction at offset instructionOffset.- Specified by:
getExposedUses
in interfaceAstMethod.LexicalInformation
-
getAllExposedUses
public IntSet getAllExposedUses()
Description copied from interface:AstMethod.LexicalInformation
return all value numbers appearing as entries in eitherAstMethod.LexicalInformation.getExposedUses(int)
orAstMethod.LexicalInformation.getExitExposedUses()
- Specified by:
getAllExposedUses
in interfaceAstMethod.LexicalInformation
-
getExposedNames
public Pair<String,String>[] getExposedNames()
Description copied from interface:AstMethod.LexicalInformation
names possibly accessed in a nested lexical scope, represented as pairs (name,nameOfDefiningEntity)- Specified by:
getExposedNames
in interfaceAstMethod.LexicalInformation
-
getScopingParents
public String[] getScopingParents()
Description copied from interface:AstMethod.LexicalInformation
return the names of the enclosing methods declaring names that are lexically accessed by the entity- Specified by:
getScopingParents
in interfaceAstMethod.LexicalInformation
-
isReadOnly
public boolean isReadOnly(String name)
Description copied from interface:AstMethod.LexicalInformation
returns true if name may be read in nested lexical scopes but cannot be written- Specified by:
isReadOnly
in interfaceAstMethod.LexicalInformation
-
getScopingName
public String getScopingName()
Description copied from interface:AstMethod.LexicalInformation
get the name of this entity, as it appears in the definer portion of a lexical name- Specified by:
getScopingName
in interfaceAstMethod.LexicalInformation
-
hasExposedUses
public static boolean hasExposedUses(CGNode caller, CallSiteReference site)
-
-