Package com.oracle.truffle.api.utilities
Class PrimitiveValueProfile
- java.lang.Object
-
- com.oracle.truffle.api.utilities.ValueProfile
-
- com.oracle.truffle.api.utilities.PrimitiveValueProfile
-
public class PrimitiveValueProfile extends ValueProfile
Represents aValueProfilethat speculates on the primitive equality or object identity of values.Note that for {code float} and
doublevalues we compare primitive equality viaFloat.floatToRawIntBits(float)andDouble.doubleToRawLongBits(double), so that for example-0.0is not considered the same as0.0, even though primitive equality would normally say that it was.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanexactCompare(double a, double b)static booleanexactCompare(float a, float b)java.lang.ObjectgetCachedValue()booleanisGeneric()booleanisUninitialized()booleanprofile(boolean value)byteprofile(byte value)charprofile(char value)doubleprofile(double value)floatprofile(float value)intprofile(int value)longprofile(long value)shortprofile(short value)java.lang.Objectprofile(java.lang.Object value)java.lang.StringtoString()-
Methods inherited from class com.oracle.truffle.api.utilities.ValueProfile
createClassProfile, createIdentityProfile, createPrimitiveProfile
-
-
-
-
Method Detail
-
profile
public java.lang.Object profile(java.lang.Object value)
- Specified by:
profilein classValueProfile
-
profile
public byte profile(byte value)
-
profile
public short profile(short value)
-
profile
public int profile(int value)
-
profile
public long profile(long value)
-
profile
public float profile(float value)
-
profile
public double profile(double value)
-
profile
public boolean profile(boolean value)
-
profile
public char profile(char value)
-
isGeneric
public boolean isGeneric()
-
isUninitialized
public boolean isUninitialized()
-
getCachedValue
public java.lang.Object getCachedValue()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
exactCompare
public static boolean exactCompare(float a, float b)
-
exactCompare
public static boolean exactCompare(double a, double b)
-
-