Mercurial > hg > graal-compiler
changeset 16767:38d243eaad41
Truffle-DSL: fixed findbugs error.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 11 Aug 2014 17:44:52 +0200 |
parents | 90984ae0eaa8 |
children | b5c85eda901b |
files | graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeParser.java |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeParser.java Mon Aug 11 17:29:24 2014 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeParser.java Mon Aug 11 17:44:52 2014 +0200 @@ -607,14 +607,13 @@ SpecializationData next = i + 1 < specializations.size() ? specializations.get(i + 1) : null; if (!cur.isContainedBy(next)) { - // error should be able to contain next.addError("This specialiation is not a valid exceptional rewrite target for %s. To fix this make %s compatible to %s or remove the exceptional rewrite.", - cur.createReferenceName(), next.createReferenceName(), cur.createReferenceName()); + cur.createReferenceName(), next != null ? next.createReferenceName() : "-", cur.createReferenceName()); continue; } - if (!next.getContains().contains(cur)) { - next.getContains().add(cur); - // TODO resolve transitive contains + Set<SpecializationData> nextContains = next != null ? next.getContains() : Collections.<SpecializationData> emptySet(); + if (!nextContains.contains(cur)) { + nextContains.add(cur); } }