public abstract class TypeState extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TypeState.TypesObjectsIterator
This is a special iterator for the type state.
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
properties
A bit array of properties for this type state.
|
| Constructor and Description |
|---|
TypeState(int properties) |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
canBeNull() |
boolean |
containsObject(AnalysisObject object)
Returns true if this type state contains the object, otherwise it returns false.
|
abstract boolean |
containsType(AnalysisType exactType)
Returns true if this type state contains the type, otherwise it returns false.
|
abstract boolean |
equals(Object o) |
abstract AnalysisType |
exactType()
If this type state has a single, exact type it returns that type, otherwise it returns null.
|
abstract TypeState |
exactTypeState(PointsToAnalysis bb,
AnalysisType exactType)
This method is needed for accessing the SingleTypeState associated with an specific type of a
MutiTypeState, e.g.
|
static TypeState |
forAllocation(PointsToAnalysis bb,
BytecodeLocation allocationLabel,
AnalysisType exactType)
Wraps the analysis object corresponding to an allocation site into a non-null type state.
|
static TypeState |
forAllocation(PointsToAnalysis bb,
BytecodeLocation allocationSite,
AnalysisType objectType,
AnalysisContext allocationContext)
Wraps the analysis object corresponding to an allocation site for a given context into a
non-null type state.
|
protected abstract TypeState |
forCanBeNull(PointsToAnalysis bb,
boolean stateCanBeNull) |
static TypeState |
forClone(PointsToAnalysis bb,
BytecodeLocation cloneSite,
AnalysisType type,
AnalysisContext allocationContext)
Wraps the analysis object corresponding to a clone site for a given context into a non-null
type state.
|
static TypeState |
forConstant(PointsToAnalysis bb,
jdk.vm.ci.meta.JavaConstant constant,
AnalysisType exactType)
Wraps the analysis object corresponding to a JavaConstant into a non-null type state.
|
static TypeState |
forContextInsensitiveTypeState(PointsToAnalysis bb,
TypeState state)
Simplifies a type state by replacing all context sensitive objects with context insensitive
objects.
|
static TypeState |
forEmpty() |
static TypeState |
forExactType(PointsToAnalysis bb,
AnalysisObject object,
boolean canBeNull) |
static TypeState |
forExactType(PointsToAnalysis bb,
AnalysisType exactType,
boolean canBeNull) |
static TypeState |
forExactTypes(PointsToAnalysis bb,
BitSet exactTypes,
boolean canBeNull) |
static TypeState |
forIntersection(PointsToAnalysis bb,
TypeState s1,
TypeState s2) |
TypeState |
forNonNull(PointsToAnalysis bb) |
static TypeState |
forNonNullObject(PointsToAnalysis bb,
AnalysisObject object)
Wraps an analysis object into a non-null type state.
|
static TypeState |
forNull() |
static TypeState |
forSubtraction(PointsToAnalysis bb,
TypeState s1,
TypeState s2) |
static TypeState |
forType(PointsToAnalysis bb,
AnalysisObject object,
boolean canBeNull) |
static TypeState |
forType(PointsToAnalysis bb,
AnalysisType type,
boolean canBeNull) |
static TypeState |
forUnion(PointsToAnalysis bb,
TypeState s1,
TypeState s2) |
int |
getId(PointsToAnalysis bb) |
int |
getProperties() |
TypeState.TypesObjectsIterator |
getTypesObjectsIterator()
Provides a special iterator for the type state.
|
abstract boolean |
hasExactTypes(BitSet typesBitSet)
Returns true if the type state contains exact the same types as the bit set.
|
int |
hashCode() |
boolean |
isAllocation() |
boolean |
isConstant() |
boolean |
isEmpty() |
boolean |
isMultiTypeState() |
boolean |
isNull() |
boolean |
isSingleTypeState() |
void |
noteMerge(PointsToAnalysis bb)
Note that the objects of this type state have been merged.
|
abstract AnalysisObject[] |
objects()
Returns the objects as an array.
|
Iterable<AnalysisObject> |
objects(AnalysisType type)
Provides an iterable for the objects corresponding to the type.
|
abstract AnalysisObject[] |
objectsArray(AnalysisType type)
Returns the objects corresponding to the type.
|
abstract int |
objectsCount()
Get the number of objects.
|
protected abstract Iterator<AnalysisObject> |
objectsIterator(AnalysisType type)
Provides an iterator for the objects corresponding to the type.
|
Stream<AnalysisObject> |
objectsStream()
Provides a stream for the objects.
|
void |
setId(PointsToAnalysis bb,
int id) |
Iterable<AnalysisType> |
types(BigBang bb)
Provides an iterable for the types for easy "for-each loop" iteration.
|
abstract int |
typesCount()
Get the number of types.
|
protected abstract Iterator<AnalysisType> |
typesIterator(BigBang bb)
Provides an iterator over the types.
|
Stream<AnalysisType> |
typesStream(BigBang bb)
Provides a stream for the types.
|
boolean |
verifyDeclaredType(BigBang bb,
AnalysisType declaredType) |
protected final int properties
public int getProperties()
public abstract boolean hasExactTypes(BitSet typesBitSet)
public abstract int typesCount()
public abstract AnalysisType exactType()
protected abstract Iterator<AnalysisType> typesIterator(BigBang bb)
public Iterable<AnalysisType> types(BigBang bb)
public Stream<AnalysisType> typesStream(BigBang bb)
public abstract boolean containsType(AnalysisType exactType)
public abstract int objectsCount()
public abstract AnalysisObject[] objects()
public abstract AnalysisObject[] objectsArray(AnalysisType type)
protected abstract Iterator<AnalysisObject> objectsIterator(AnalysisType type)
public Iterable<AnalysisObject> objects(AnalysisType type)
public Stream<AnalysisObject> objectsStream()
public boolean containsObject(AnalysisObject object)
public TypeState.TypesObjectsIterator getTypesObjectsIterator()
TypeState.TypesObjectsIterator for a
complete explanation.public boolean isAllocation()
public boolean isConstant()
public boolean isEmpty()
public boolean isSingleTypeState()
public boolean isMultiTypeState()
public boolean isNull()
public abstract boolean canBeNull()
public void noteMerge(PointsToAnalysis bb)
public abstract TypeState exactTypeState(PointsToAnalysis bb, AnalysisType exactType)
public boolean verifyDeclaredType(BigBang bb, AnalysisType declaredType)
public int getId(PointsToAnalysis bb)
public void setId(PointsToAnalysis bb, int id)
public static TypeState forEmpty()
public static TypeState forNull()
public static TypeState forNonNullObject(PointsToAnalysis bb, AnalysisObject object)
public static TypeState forConstant(PointsToAnalysis bb, jdk.vm.ci.meta.JavaConstant constant, AnalysisType exactType)
public static TypeState forAllocation(PointsToAnalysis bb, BytecodeLocation allocationLabel, AnalysisType exactType)
public static TypeState forAllocation(PointsToAnalysis bb, BytecodeLocation allocationSite, AnalysisType objectType, AnalysisContext allocationContext)
public static TypeState forClone(PointsToAnalysis bb, BytecodeLocation cloneSite, AnalysisType type, AnalysisContext allocationContext)
public static TypeState forExactType(PointsToAnalysis bb, AnalysisType exactType, boolean canBeNull)
public static TypeState forExactType(PointsToAnalysis bb, AnalysisObject object, boolean canBeNull)
public static TypeState forType(PointsToAnalysis bb, AnalysisType type, boolean canBeNull)
public static TypeState forType(PointsToAnalysis bb, AnalysisObject object, boolean canBeNull)
public static TypeState forExactTypes(PointsToAnalysis bb, BitSet exactTypes, boolean canBeNull)
public static TypeState forContextInsensitiveTypeState(PointsToAnalysis bb, TypeState state)
public final TypeState forNonNull(PointsToAnalysis bb)
protected abstract TypeState forCanBeNull(PointsToAnalysis bb, boolean stateCanBeNull)
public static TypeState forUnion(PointsToAnalysis bb, TypeState s1, TypeState s2)
public static TypeState forIntersection(PointsToAnalysis bb, TypeState s1, TypeState s2)
public static TypeState forSubtraction(PointsToAnalysis bb, TypeState s1, TypeState s2)