public class VerifyUsageWithEquals extends VerifyPhase<PhaseContext>
AssertionError
.
Note that only TrustedInterface
s can be verified.VerifyPhase.VerificationError
Modifier and Type | Field and Description |
---|---|
private Class<?> |
restrictedClass
The type of values that must not use identity for testing object equality.
|
BEFORE_PHASE_DUMP_LEVEL, PHASE_DUMP_LEVEL
Constructor and Description |
---|
VerifyUsageWithEquals(Class<?> restrictedClass) |
Modifier and Type | Method and Description |
---|---|
private boolean |
isAssignableToRestrictedType(ValueNode node,
jdk.internal.jvmci.meta.MetaAccessProvider metaAccess)
Determines whether the type of
node is assignable to the restrictedClass . |
private static boolean |
isEqualsMethod(jdk.internal.jvmci.meta.ResolvedJavaMethod method) |
private boolean |
isIllegalUsage(jdk.internal.jvmci.meta.ResolvedJavaMethod method,
ValueNode x,
ValueNode y,
jdk.internal.jvmci.meta.MetaAccessProvider metaAccess)
Checks whether the type of
x is assignable to the restricted type and that y
is not a null constant. |
private static boolean |
isNullConstant(ValueNode node) |
private static boolean |
isThisParameter(ValueNode node) |
protected boolean |
verify(StructuredGraph graph,
PhaseContext context)
Performs the actual verification.
|
run
apply, apply, createName, getName
private final Class<?> restrictedClass
public VerifyUsageWithEquals(Class<?> restrictedClass)
private boolean isAssignableToRestrictedType(ValueNode node, jdk.internal.jvmci.meta.MetaAccessProvider metaAccess)
node
is assignable to the restrictedClass
.private static boolean isNullConstant(ValueNode node)
private static boolean isEqualsMethod(jdk.internal.jvmci.meta.ResolvedJavaMethod method)
private static boolean isThisParameter(ValueNode node)
private boolean isIllegalUsage(jdk.internal.jvmci.meta.ResolvedJavaMethod method, ValueNode x, ValueNode y, jdk.internal.jvmci.meta.MetaAccessProvider metaAccess)
x
is assignable to the restricted type and that y
is not a null constant.protected boolean verify(StructuredGraph graph, PhaseContext context)
VerifyPhase
verify
in class VerifyPhase<PhaseContext>