public class TypeCheckHints extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TypeCheckHints.Hint
A receiver type profiled in a type check instruction.
|
Modifier and Type | Field and Description |
---|---|
ResolvedJavaType |
exact
If non-null, then this is the only type that could pass the type check because the target of
the type check is a final class or has been speculated to be a final class and this value is
the only concrete subclass of the target type.
|
double |
hintHitProbability
The total probability that the type check will hit one of the types in
hints . |
TypeCheckHints.Hint[] |
hints
The most likely types that the type check instruction will see.
|
private static TypeCheckHints.Hint[] |
NO_HINTS |
JavaTypeProfile |
profile
The profile from which this information was derived.
|
Constructor and Description |
---|
TypeCheckHints(ResolvedJavaType targetType,
JavaTypeProfile profile,
Assumptions assumptions,
double minHintHitProbability,
int maxHints)
Derives hint information for use when generating the code for a type check instruction.
|
Modifier and Type | Method and Description |
---|---|
private static TypeCheckHints.Hint[] |
makeHints(ResolvedJavaType targetType,
JavaTypeProfile profile,
double minHintHitProbability,
int maxHints,
Double[] hitProbability) |
private static final TypeCheckHints.Hint[] NO_HINTS
public final ResolvedJavaType exact
public final TypeCheckHints.Hint[] hints
public final JavaTypeProfile profile
public final double hintHitProbability
hints
.public TypeCheckHints(ResolvedJavaType targetType, JavaTypeProfile profile, Assumptions assumptions, double minHintHitProbability, int maxHints)
targetType
- the target type of the type checkprofile
- the profiling information available for the instruction (if any)assumptions
- the object in which speculations are recorded. This is null if
speculations are not supported.minHintHitProbability
- if the probability that the type check will hit one of the
profiled types (up to maxHints
) is below this value, then hints
will be nullmaxHints
- the maximum length of hints
private static TypeCheckHints.Hint[] makeHints(ResolvedJavaType targetType, JavaTypeProfile profile, double minHintHitProbability, int maxHints, Double[] hitProbability)