public class FloatStamp extends PrimitiveStamp
| Modifier and Type | Field and Description |
|---|---|
private double |
lowerBound |
private boolean |
nonNaN |
private static ArithmeticOpTable |
OPS |
private double |
upperBound |
| Modifier | Constructor and Description |
|---|---|
protected |
FloatStamp(int bits) |
|
FloatStamp(int bits,
double lowerBound,
double upperBound,
boolean nonNaN) |
| Modifier and Type | Method and Description |
|---|---|
JavaConstant |
asConstant()
If this stamp represents a single value, the methods returns this single value.
|
Stamp |
constant(Constant c,
MetaAccessProvider meta)
If it is possible to represent single value stamps of this kind, this method returns the
stamp representing the single value c.
|
boolean |
contains(double value) |
SerializableConstant |
deserialize(ByteBuffer buffer) |
Stamp |
empty()
Returns a stamp of the same kind, but with no allowed values.
|
boolean |
equals(Object obj) |
LIRKind |
getLIRKind(LIRKindTool tool)
Gets a platform dependent
LIRKind that can be used to store a value of this stamp. |
Kind |
getStackKind()
Gets a Java
Kind that can be used to store a value of this stamp on the Java bytecode
stack. |
int |
hashCode() |
boolean |
hasValues()
Test whether this stamp has legal values.
|
boolean |
isCompatible(Stamp stamp)
Test whether two stamps have the same base type.
|
boolean |
isNaN() |
boolean |
isNonNaN() |
boolean |
isUnrestricted() |
ResolvedJavaType |
javaType(MetaAccessProvider metaAccess)
Returns the type of the stamp, guaranteed to be non-null.
|
Stamp |
join(Stamp otherStamp)
Returns the intersection of this stamp and the given stamp.
|
double |
lowerBound()
The (inclusive) lower bound on the value described by this stamp.
|
Stamp |
meet(Stamp otherStamp)
Returns the union of this stamp and the given stamp.
|
private static double |
meetBounds(double a,
double b,
DoubleBinaryOperator op) |
String |
toString() |
Stamp |
unrestricted()
Returns a stamp of the same kind, but allowing the full value range of the kind.
|
double |
upperBound()
The (inclusive) upper bound on the value described by this stamp.
|
getBits, getBits, readConstantgetOps, improveWithalwaysDistinct, isEmpty, neverDistinct, tryImproveWithprivate final double lowerBound
private final double upperBound
private final boolean nonNaN
private static final ArithmeticOpTable OPS
protected FloatStamp(int bits)
public FloatStamp(int bits, double lowerBound, double upperBound, boolean nonNaN)
public Stamp unrestricted()
StampStamp.unrestricted() is the neutral element of the Stamp.join(Stamp) operation.unrestricted in class Stamppublic Stamp empty()
StampStamp.empty() is the neutral element of the Stamp.meet(Stamp) operation.public Stamp constant(Constant c, MetaAccessProvider meta)
StampIf it is not possible to represent single value stamps, this method returns a stamp that includes c, and is otherwise as narrow as possible.
public SerializableConstant deserialize(ByteBuffer buffer)
deserialize in class ArithmeticStamppublic boolean hasValues()
Stamppublic Kind getStackKind()
StampKind 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 Stamppublic LIRKind getLIRKind(LIRKindTool tool)
StampLIRKind that can be used to store a value of this stamp.getLIRKind in class Stamppublic ResolvedJavaType javaType(MetaAccessProvider metaAccess)
StampMetaAccessProvider is mandatory.public double lowerBound()
public double upperBound()
public boolean isNonNaN()
public boolean isNaN()
public boolean isUnrestricted()
public boolean contains(double value)
private static double meetBounds(double a, double b, DoubleBinaryOperator op)
public Stamp meet(Stamp otherStamp)
Stamppublic Stamp join(Stamp otherStamp)
Stamppublic int hashCode()
hashCode in class PrimitiveStamppublic boolean isCompatible(Stamp stamp)
StampisCompatible in class Stamppublic boolean equals(Object obj)
equals in class PrimitiveStamppublic JavaConstant asConstant()
StampasConstant in class Stamp