# HG changeset patch # User Christian Wimmer # Date 1391057008 28800 # Node ID 20e7727588e8698f85ec962cf66a0da7d8312331 # Parent 49db2c1e3beeb9705c7f7dd9db21b3dc51d91fbc ControlFlowException can always have a null cause diff -r 49db2c1e3bee -r 20e7727588e8 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/ControlFlowException.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/ControlFlowException.java Thu Jan 30 00:52:33 2014 +0100 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/ControlFlowException.java Wed Jan 29 20:43:28 2014 -0800 @@ -36,6 +36,12 @@ * Creates an exception thrown to model control flow. */ public ControlFlowException() { + /* + * We use the super constructor that initializes the cause to null. Without that, the cause + * would be this exception itself. This helps escape analysis: it avoids the circle of an + * object pointing to itself. + */ + super((Throwable) null); } /**