Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeParser.java @ 16767:38d243eaad41
Truffle-DSL: fixed findbugs error.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 11 Aug 2014 17:44:52 +0200 |
parents | f9fff060dc41 |
children | 0370880ac9ce |
comparison
equal
deleted
inserted
replaced
16766:90984ae0eaa8 | 16767:38d243eaad41 |
---|---|
605 continue; | 605 continue; |
606 } | 606 } |
607 SpecializationData next = i + 1 < specializations.size() ? specializations.get(i + 1) : null; | 607 SpecializationData next = i + 1 < specializations.size() ? specializations.get(i + 1) : null; |
608 | 608 |
609 if (!cur.isContainedBy(next)) { | 609 if (!cur.isContainedBy(next)) { |
610 // error should be able to contain | |
611 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.", | 610 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.", |
612 cur.createReferenceName(), next.createReferenceName(), cur.createReferenceName()); | 611 cur.createReferenceName(), next != null ? next.createReferenceName() : "-", cur.createReferenceName()); |
613 continue; | 612 continue; |
614 } | 613 } |
615 if (!next.getContains().contains(cur)) { | 614 Set<SpecializationData> nextContains = next != null ? next.getContains() : Collections.<SpecializationData> emptySet(); |
616 next.getContains().add(cur); | 615 if (!nextContains.contains(cur)) { |
617 // TODO resolve transitive contains | 616 nextContains.add(cur); |
618 } | 617 } |
619 } | 618 } |
620 | 619 |
621 for (SpecializationData cur : specializations) { | 620 for (SpecializationData cur : specializations) { |
622 if (cur.getExceptions().isEmpty()) { | 621 if (cur.getExceptions().isEmpty()) { |