# HG changeset patch # User Bernhard Urban # Date 1369303240 -7200 # Node ID 2eaac2c3670b92bbc51c0df4322946fbcdce3b8f # Parent 41de6947dbc98bb8b5e4af6f22177ce8ff05eb32 VerifyUsageWithEquals/VerifyPhase: add documentation diff -r 41de6947dbc9 -r 2eaac2c3670b graal/com.oracle.graal.phases/src/com/oracle/graal/phases/VerifyPhase.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/VerifyPhase.java Thu May 23 10:57:51 2013 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/VerifyPhase.java Thu May 23 12:00:40 2013 +0200 @@ -24,6 +24,12 @@ import com.oracle.graal.nodes.*; +/*** + * This phase serves as a verification, in order to check the graph for certain properties. The + * {@link #verify(StructuredGraph)} method will be used as an assertion, and implements the actual + * check. Instead of returning false, it is also valid to throw an {@link AssertionError} in the + * implemented {@link #verify(StructuredGraph)} method. + */ public abstract class VerifyPhase extends Phase { @Override diff -r 41de6947dbc9 -r 2eaac2c3670b graal/com.oracle.graal.phases/src/com/oracle/graal/phases/verify/VerifyUsageWithEquals.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/verify/VerifyUsageWithEquals.java Thu May 23 10:57:51 2013 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/verify/VerifyUsageWithEquals.java Thu May 23 12:00:40 2013 +0200 @@ -28,6 +28,11 @@ import com.oracle.graal.nodes.type.*; import com.oracle.graal.phases.*; +/** + * For certain types object identity should not be used for object equality check. This phase checks + * the correct usage of the given type. Equality checks with == or != (except null checks) results + * in an {@link AssertionError}. + */ public class VerifyUsageWithEquals extends VerifyPhase { private MetaAccessProvider runtime;