diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/controlflow/SLContinueException.java @ 13836:64c77f0577bb

More documentation and improvements of Simple Language
author Christian Wimmer <christian.wimmer@oracle.com>
date Thu, 30 Jan 2014 17:53:27 -0800
parents b16ec83edc73
children
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/controlflow/SLContinueException.java	Thu Jan 30 17:52:24 2014 -0800
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/controlflow/SLContinueException.java	Thu Jan 30 17:53:27 2014 -0800
@@ -24,12 +24,18 @@
 
 import com.oracle.truffle.api.nodes.*;
 
+/**
+ * Exception thrown by the {@link SLContinueNode continue statement} and caught by the
+ * {@link SLWhileNode loop statement}. Since the exception is stateless, i.e., has no instance
+ * fields, we can use a {@link #SINGLETON} to avoid memory allocation during interpretation.
+ */
 public final class SLContinueException extends ControlFlowException {
 
     public static final SLContinueException SINGLETON = new SLContinueException();
 
     private static final long serialVersionUID = 5329687983726237188L;
 
+    /* Prevent instantiation from outside. */
     private SLContinueException() {
     }
 }