Mercurial > hg > truffle
diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java @ 11610:5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 12 Sep 2013 14:43:21 +0200 |
parents | 8f0fb0ade839 |
children | 4ab1f371adc8 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java Thu Sep 12 12:56:05 2013 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java Thu Sep 12 14:43:21 2013 +0200 @@ -71,7 +71,12 @@ */ public final void assignSourceSection(SourceSection section) { if (sourceSection != null) { - throw new IllegalStateException("Source section is already assigned."); + // Patch this test during the transition to constructor-based + // source attribution, which would otherwise trigger this + // exception. This method will eventually be deprecated. + if (getSourceSection() != section) { + throw new IllegalStateException("Source section is already assigned."); + } } this.sourceSection = section; }