public class MultiTypeState extends TypeState
| Modifier and Type | Class and Description |
|---|---|
static class |
MultiTypeState.Range
A [left, right) range (interval), i.e., left is inclusive, right is exclusive.
|
TypeState.TypesObjectsIterator| Modifier and Type | Field and Description |
|---|---|
protected boolean |
canBeNull
Can this type state represent the null value?
|
protected boolean |
merged
Has this type state been merged with the all-instantiated type state?
|
protected AnalysisObject[] |
objects
The objects of this type state.
|
protected int[] |
objectTypeIds
|
properties| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeNull() |
boolean |
containsType(AnalysisType exactType)
Returns true if this type state contains the type, otherwise it returns false.
|
boolean |
equals(Object o) |
AnalysisType |
exactType()
If this type state has a single, exact type it returns that type, otherwise it returns null.
|
TypeState |
exactTypeState(PointsToAnalysis bb,
AnalysisType exactType)
This method is needed for accessing the SingleTypeState associated with an specific type of a
MutiTypeState, e.g.
|
TypeState |
forCanBeNull(PointsToAnalysis bb,
boolean resultCanBeNull) |
int[] |
getObjectTypeIds()
Returns an array of all type ids from the
MultiTypeState.objects array. |
boolean |
hasExactTypes(BitSet inputTypesBitSet)
Returns true if the type state contains exact the same types as the bit set.
|
int |
hashCode() |
void |
noteMerge(PointsToAnalysis bb)
Note that the objects of this type state have been merged.
|
AnalysisObject[] |
objects()
Returns the objects as an array.
|
AnalysisObject[] |
objectsArray(AnalysisType type)
Returns the objects corresponding to the type.
|
int |
objectsCount()
Get the number of objects.
|
Iterator<AnalysisObject> |
objectsIterator(AnalysisType exactType)
Provides an iterator for the objects corresponding to the type.
|
String |
toString() |
int |
typesCount()
Get the number of types.
|
Iterator<AnalysisType> |
typesIterator(BigBang bb)
It iterates over the types bit set and gets the types using
AnalysisUniverse.getType(int). |
containsObject, forAllocation, forAllocation, forClone, forConstant, forContextInsensitiveTypeState, forEmpty, forExactType, forExactType, forExactTypes, forIntersection, forNonNull, forNonNullObject, forNull, forSubtraction, forType, forType, forUnion, getId, getProperties, getTypesObjectsIterator, isAllocation, isConstant, isEmpty, isMultiTypeState, isNull, isSingleTypeState, objects, objectsStream, setId, types, typesStream, verifyDeclaredTypeprotected final AnalysisObject[] objects
protected int[] objectTypeIds
protected final boolean canBeNull
protected boolean merged
public int[] getObjectTypeIds()
MultiTypeState.objects array. This mitigates the CPU
cache misses when iterating over all AnalysisObject and dereferencing the type field over and
over again.public int objectsCount()
objectsCount in class TypeStatepublic final AnalysisObject[] objects()
public boolean hasExactTypes(BitSet inputTypesBitSet)
TypeStatehasExactTypes in class TypeStatepublic AnalysisType exactType()
TypeStatepublic int typesCount()
TypeStatetypesCount in class TypeStatepublic Iterator<AnalysisType> typesIterator(BigBang bb)
AnalysisUniverse.getType(int). The types are iterated in ascending order of their IDs
by way of bit set iteration.typesIterator in class TypeStatepublic boolean containsType(AnalysisType exactType)
TypeStatecontainsType in class TypeStatepublic TypeState exactTypeState(PointsToAnalysis bb, AnalysisType exactType)
TypeStateexactTypeState in class TypeStatepublic TypeState forCanBeNull(PointsToAnalysis bb, boolean resultCanBeNull)
forCanBeNull in class TypeStatepublic AnalysisObject[] objectsArray(AnalysisType type)
TypeStateobjectsArray in class TypeStatepublic Iterator<AnalysisObject> objectsIterator(AnalysisType exactType)
TypeStateobjectsIterator in class TypeStatepublic void noteMerge(PointsToAnalysis bb)