public abstract class ValueProfile
extends java.lang.Object
private final ValueProfile classProfile = ValueProfile.createClassProfile(); return classProfile.profile(value);All instances of
ValueProfile
(and subclasses) must be held in final
fields for
compiler optimizations to take effect.Constructor and Description |
---|
ValueProfile() |
Modifier and Type | Method and Description |
---|---|
static ValueProfile |
createClassProfile()
Returns a
ValueProfile that speculates on the exact class of a value. |
static ValueProfile |
createIdentityProfile()
Returns a
ValueProfile that speculates on the object identity of a value. |
static PrimitiveValueProfile |
createPrimitiveProfile()
Returns a
PrimitiveValueProfile that speculates on the primitive equality or object
identity of a value. |
abstract <T> T |
profile(T value) |
public abstract <T> T profile(T value)
public static PrimitiveValueProfile createPrimitiveProfile()
PrimitiveValueProfile
that speculates on the primitive equality or object
identity of a value.public static ValueProfile createClassProfile()
ValueProfile
that speculates on the exact class of a value.public static ValueProfile createIdentityProfile()
ValueProfile
that speculates on the object identity of a value.