public class VerifyUsageWithEquals extends VerifyPhase<PhaseContext>
AssertionError.
Note that only TrustedInterfaces 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,
MetaAccessProvider metaAccess)
Determines whether the type of
node is assignable to the restrictedClass. |
private static boolean |
isEqualsMethod(ResolvedJavaMethod method) |
private boolean |
isIllegalUsage(ResolvedJavaMethod method,
ValueNode x,
ValueNode y,
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.
|
runapply, apply, createName, getNameprivate final Class<?> restrictedClass
public VerifyUsageWithEquals(Class<?> restrictedClass)
private boolean isAssignableToRestrictedType(ValueNode node, MetaAccessProvider metaAccess)
node is assignable to the restrictedClass.private static boolean isNullConstant(ValueNode node)
private static boolean isEqualsMethod(ResolvedJavaMethod method)
private static boolean isThisParameter(ValueNode node)
private boolean isIllegalUsage(ResolvedJavaMethod method, ValueNode x, ValueNode y, MetaAccessProvider metaAccess)
x is assignable to the restricted type and that y
is not a null constant.protected boolean verify(StructuredGraph graph, PhaseContext context)
VerifyPhaseverify in class VerifyPhase<PhaseContext>