changeset 9800:2eaac2c3670b

VerifyUsageWithEquals/VerifyPhase: add documentation
author Bernhard Urban <bernhard.urban@jku.at>
date Thu, 23 May 2013 12:00:40 +0200
parents 41de6947dbc9
children d1682d1df0a3
files graal/com.oracle.graal.phases/src/com/oracle/graal/phases/VerifyPhase.java graal/com.oracle.graal.phases/src/com/oracle/graal/phases/verify/VerifyUsageWithEquals.java
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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;