Mercurial > hg > graal-compiler
changeset 13820:20e7727588e8
ControlFlowException can always have a null cause
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Wed, 29 Jan 2014 20:43:28 -0800 |
parents | 49db2c1e3bee |
children | b16ec83edc73 |
files | graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/ControlFlowException.java |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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); } /**