Package com.oracle.truffle.api.utilities
Class PrimitiveValueProfile
java.lang.Object
com.oracle.truffle.api.utilities.ValueProfile
com.oracle.truffle.api.utilities.PrimitiveValueProfile
Represents a
ValueProfile that speculates on the primitive equality or object identity of
values.
Note that for {code float} and double values we compare primitive equality via
Float.floatToRawIntBits(float) and Double.doubleToRawLongBits(double), so that for example
-0.0 is not considered the same as 0.0, even though primitive equality would
normally say that it was.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanexactCompare(double a, double b) static booleanexactCompare(float a, float b) booleanbooleanbooleanprofile(boolean value) byteprofile(byte value) charprofile(char value) doubleprofile(double value) floatprofile(float value) intprofile(int value) longprofile(long value) shortprofile(short value) toString()Methods inherited from class com.oracle.truffle.api.utilities.ValueProfile
createClassProfile, createIdentityProfile, createPrimitiveProfile
-
Method Details
-
profile
- 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
-
toString
-
exactCompare
public static boolean exactCompare(float a, float b) -
exactCompare
public static boolean exactCompare(double a, double b)
-