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 |
---|---|
jdk.internal.jvmci.meta.JavaConstant |
asConstant()
If this stamp represents a single value, the methods returns this single value.
|
Stamp |
constant(jdk.internal.jvmci.meta.Constant c,
jdk.internal.jvmci.meta.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) |
jdk.internal.jvmci.meta.SerializableConstant |
deserialize(ByteBuffer buffer) |
Stamp |
empty()
Returns a stamp of the same kind, but with no allowed values.
|
boolean |
equals(Object obj) |
jdk.internal.jvmci.meta.LIRKind |
getLIRKind(LIRKindTool tool)
Gets a platform dependent
LIRKind that can be used to store a value of this stamp. |
jdk.internal.jvmci.meta.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() |
jdk.internal.jvmci.meta.ResolvedJavaType |
javaType(jdk.internal.jvmci.meta.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, readConstant
getOps, improveWith
alwaysDistinct, isEmpty, neverDistinct, tryImproveWith
private 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()
Stamp
Stamp.unrestricted()
is the neutral element of the Stamp.join(Stamp)
operation.unrestricted
in class Stamp
public Stamp empty()
Stamp
Stamp.empty()
is the neutral element of the Stamp.meet(Stamp)
operation.public Stamp constant(jdk.internal.jvmci.meta.Constant c, jdk.internal.jvmci.meta.MetaAccessProvider meta)
Stamp
If 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 jdk.internal.jvmci.meta.SerializableConstant deserialize(ByteBuffer buffer)
deserialize
in class ArithmeticStamp
public boolean hasValues()
Stamp
public jdk.internal.jvmci.meta.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
public jdk.internal.jvmci.meta.LIRKind getLIRKind(LIRKindTool tool)
Stamp
LIRKind
that can be used to store a value of this stamp.getLIRKind
in class Stamp
public jdk.internal.jvmci.meta.ResolvedJavaType javaType(jdk.internal.jvmci.meta.MetaAccessProvider metaAccess)
Stamp
MetaAccessProvider
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)
Stamp
public Stamp join(Stamp otherStamp)
Stamp
public int hashCode()
hashCode
in class PrimitiveStamp
public boolean isCompatible(Stamp stamp)
Stamp
isCompatible
in class Stamp
public boolean equals(Object obj)
equals
in class PrimitiveStamp
public jdk.internal.jvmci.meta.JavaConstant asConstant()
Stamp
asConstant
in class Stamp