public class ContextSensitiveMultiTypeState extends MultiTypeState
| Modifier and Type | Class and Description |
|---|---|
static class |
ContextSensitiveMultiTypeState.Range
A [left, right) range (interval), i.e., left is inclusive, right is exclusive.
|
| Modifier and Type | Field and Description |
|---|---|
protected AnalysisObject[] |
objects
The objects of this type state.
|
protected int[] |
objectTypeIds
|
canBeNull, merged, typesBitSet, typesCount| Modifier | Constructor and Description |
|---|---|
|
ContextSensitiveMultiTypeState(PointsToAnalysis bb,
boolean canBeNull,
BitSet typesBitSet,
int typesCount,
AnalysisObject... objects)
Creates a new type state using the provided types bit set and objects.
|
protected |
ContextSensitiveMultiTypeState(PointsToAnalysis bb,
boolean canBeNull,
ContextSensitiveMultiTypeState other)
Create a type state with the same content and a reversed canBeNull value.
|
| Modifier and Type | Method and Description |
|---|---|
protected BitSet |
bitSet() |
boolean |
equals(Object o) |
ContextSensitiveMultiTypeState.Range |
findTypeRange(AnalysisType type) |
int |
firstTypeId()
Get the type of the first object group.
|
TypeState |
forCanBeNull(PointsToAnalysis bb,
boolean resultCanBeNull) |
int[] |
getObjectTypeIds()
Returns an array of all type ids from the
ContextSensitiveMultiTypeState.objects array. |
int |
hashCode() |
boolean |
isMerged() |
int |
lastTypeId()
Get the type of the last object group.
|
void |
noteMerge(PointsToAnalysis bb)
Note that the objects of this type state have been merged.
|
AnalysisObject[] |
objectsArray(AnalysisType type) |
AnalysisObject[] |
objectsArray(ContextSensitiveMultiTypeState.Range typeRange) |
int |
objectsCount()
Get the number of objects.
|
Iterator<AnalysisObject> |
objectsIterator(AnalysisType exactType)
Provides an iterator for the objects corresponding to the type.
|
protected Iterator<AnalysisObject> |
objectsIterator(BigBang bb) |
String |
toString() |
canBeNull, containsType, exactType, typesBitSet, typesCount, typesIteratorasConstant, forConstant, forEmpty, forExactType, forExactType, forIntersection, forNonNull, forNonNullObject, forNull, forSubtraction, forType, forType, forUnion, isAllocation, isEmpty, isNull, objects, objects, types, typesStream, verifyDeclaredTypeprotected final AnalysisObject[] objects
protected int[] objectTypeIds
public ContextSensitiveMultiTypeState(PointsToAnalysis bb, boolean canBeNull, BitSet typesBitSet, int typesCount, AnalysisObject... objects)
protected ContextSensitiveMultiTypeState(PointsToAnalysis bb, boolean canBeNull, ContextSensitiveMultiTypeState other)
protected BitSet bitSet()
public int[] getObjectTypeIds()
ContextSensitiveMultiTypeState.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 MultiTypeStateprotected Iterator<AnalysisObject> objectsIterator(BigBang bb)
objectsIterator in class MultiTypeStatepublic int firstTypeId()
public int lastTypeId()
public TypeState forCanBeNull(PointsToAnalysis bb, boolean resultCanBeNull)
forCanBeNull in class MultiTypeStatepublic ContextSensitiveMultiTypeState.Range findTypeRange(AnalysisType type)
public AnalysisObject[] objectsArray(AnalysisType type)
public AnalysisObject[] objectsArray(ContextSensitiveMultiTypeState.Range typeRange)
public Iterator<AnalysisObject> objectsIterator(AnalysisType exactType)
TypeStateobjectsIterator in class MultiTypeStatepublic void noteMerge(PointsToAnalysis bb)
noteMerge in class MultiTypeStatepublic boolean isMerged()
isMerged in class MultiTypeStatepublic int hashCode()
hashCode in class MultiTypeStatepublic boolean equals(Object o)
equals in class MultiTypeStatepublic String toString()
toString in class MultiTypeState