@Override public String toString() { return toString(ValueProfile.class, cachedClass == null, cachedClass == Object.class, String.format("value.getClass() == %s.class", cachedClass != null ? cachedClass.getSimpleName() : "null")); }
/** * <p> * Returns a value profile that profiles the exact class of a value. It will check the class of * the profiled value and provide additional information to the compiler if only non-null values * of exactly one concrete Java class are passed as a parameter to the * {@link ValueProfile#profile} method. This can be beneficial if subsequent code can take * advantage of knowing the concrete class of the value. The profile will degrade to the generic * case if a null value or if at least two instances of two different Java classes are * registered. * </p> * * <p> * <b>Compilation notes:</b> Value profiles require a runtime check in their initialized state * to verify their profiled class. If two classes have been seen on a single profile instance * then this profile will transition to a generic state with no overhead. * </P> * * @see ValueProfile usage example * @since 0.10 */ public static ValueProfile createClassProfile() { if (Profile.isProfilingEnabled()) { return ExactClass.create(); } else { return Disabled.INSTANCE; } }
/** * <p> * Returns a value profile that profiles the exact class of a value. It will check the class of * the profiled value and provide additional information to the compiler if only non-null values * of exactly one concrete Java class are passed as a parameter to the * {@link ValueProfile#profile} method. This can be beneficial if subsequent code can take * advantage of knowing the concrete class of the value. The profile will degrade to the generic * case if a null value or if at least two instances of two different Java classes are * registered. * </p> * * <p> * <b>Compilation notes:</b> Value profiles require a runtime check in their initialized state * to verify their profiled class. If two classes have been seen on a single profile instance * then this profile will transition to a generic state with no overhead. * </P> * * @see ValueProfile usage example * @since 0.10 */ public static ValueProfile createClassProfile() { if (Profile.isProfilingEnabled()) { return ExactClass.create(); } else { return Disabled.INSTANCE; } }
public static ValueProfile create() { return new ExactClass(); }
public static ValueProfile create() { return new ExactClass(); }
@Override public String toString() { return toString(ValueProfile.class, cachedClass == null, cachedClass == Object.class, String.format("value.getClass() == %s.class", cachedClass != null ? cachedClass.getSimpleName() : "null")); }