public abstract class AbstractPointerStamp extends Stamp
Modifier and Type | Field and Description |
---|---|
private boolean |
alwaysNull |
private boolean |
nonNull |
Modifier | Constructor and Description |
---|---|
protected |
AbstractPointerStamp(boolean nonNull,
boolean alwaysNull) |
Modifier and Type | Method and Description |
---|---|
boolean |
alwaysNull() |
Constant |
asConstant()
If this stamp represents a single value, the methods returns this single value.
|
protected abstract AbstractPointerStamp |
copyWith(boolean newNonNull,
boolean newAlwaysNull) |
boolean |
equals(Object obj) |
Kind |
getStackKind()
Gets a Java
Kind that can be used to store a value of this stamp on the Java bytecode
stack. |
int |
hashCode() |
Stamp |
improveWith(Stamp other)
Tries to improve this stamp with the stamp given as parameter.
|
Stamp |
join(Stamp stamp)
Returns the intersection of this stamp and the given stamp.
|
Stamp |
meet(Stamp stamp)
Returns the union of this stamp and the given stamp.
|
boolean |
nonNull() |
Stamp |
unrestricted()
Returns a stamp of the same kind, but allowing the full value range of the kind.
|
alwaysDistinct, constant, empty, getLIRKind, hasValues, isCompatible, isEmpty, javaType, neverDistinct, readConstant, tryImproveWith
private final boolean nonNull
private final boolean alwaysNull
protected AbstractPointerStamp(boolean nonNull, boolean alwaysNull)
public boolean nonNull()
public boolean alwaysNull()
protected abstract AbstractPointerStamp copyWith(boolean newNonNull, boolean newAlwaysNull)
public Stamp join(Stamp stamp)
Stamp
public Stamp improveWith(Stamp other)
Stamp
improveWith
in class Stamp
other
- the stamp that should be used to improve this stampthis
if an improvement was not
possiblepublic Stamp meet(Stamp stamp)
Stamp
public Stamp unrestricted()
Stamp
Stamp.unrestricted()
is the neutral element of the Stamp.join(Stamp)
operation.unrestricted
in class Stamp
public Constant asConstant()
Stamp
asConstant
in class Stamp
public Kind getStackKind()
Stamp
Kind
that can be used to store a value of this stamp on the Java bytecode
stack. Returns Kind.Illegal
if a value of this stamp can not be stored on the
bytecode stack.getStackKind
in class Stamp