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 BigBang |
bigbang |
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 |
closeToAllInstantiated(BigBang bb)
The
MultiTypeState overrides this method and provides the proper test. |
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(BigBang bb,
AnalysisType exactType)
This method is needed for accessing the SingleTypeState associated with an specific type of a
MutiTypeState, e.g.
|
TypeState |
forCanBeNull(BigBang 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(BigBang 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()
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, forUnion, getId, getProperties, getTypesObjectsIterator, isAllocation, isConstant, isEmpty, isMultiTypeState, isNull, isSingleTypeState, objects, objectsStream, setId, types, typesStream, verifyDeclaredType
protected final BigBang bigbang
protected 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 TypeState
public final AnalysisObject[] objects()
public boolean hasExactTypes(BitSet inputTypesBitSet)
TypeState
hasExactTypes
in class TypeState
public AnalysisType exactType()
TypeState
public int typesCount()
TypeState
typesCount
in class TypeState
public Iterator<AnalysisType> typesIterator()
AnalysisUniverse.getType(int)
. The types are iterated in ascending order of their IDs
by way of bit set iteration.typesIterator
in class TypeState
public boolean containsType(AnalysisType exactType)
TypeState
containsType
in class TypeState
public TypeState exactTypeState(BigBang bb, AnalysisType exactType)
TypeState
exactTypeState
in class TypeState
public TypeState forCanBeNull(BigBang bb, boolean resultCanBeNull)
forCanBeNull
in class TypeState
public AnalysisObject[] objectsArray(AnalysisType type)
TypeState
objectsArray
in class TypeState
public Iterator<AnalysisObject> objectsIterator(AnalysisType exactType)
TypeState
objectsIterator
in class TypeState
public void noteMerge(BigBang bb)
public boolean closeToAllInstantiated(BigBang bb)
TypeState
MultiTypeState
overrides this method and provides the proper test. All the other
type states have only 0 or 1 types.closeToAllInstantiated
in class TypeState