Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/SpecializationGroup.java @ 11507:d6a5ab791b0d
Truffle-DSL: fixed a bug in grouping of abstract guards.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 02 Sep 2013 15:22:25 +0200 |
parents | a317acdd5f2c |
children | 85dcc7f59c34 |
comparison
equal
deleted
inserted
replaced
11506:e6645c18d154 | 11507:d6a5ab791b0d |
---|---|
117 List<GuardData> elseConnectedGuards = previous.getElseConnectableGuards(); | 117 List<GuardData> elseConnectedGuards = previous.getElseConnectableGuards(); |
118 | 118 |
119 if (previous == null || previous.getGuards().size() != elseConnectedGuards.size() + 1) { | 119 if (previous == null || previous.getGuards().size() != elseConnectedGuards.size() + 1) { |
120 return null; | 120 return null; |
121 } | 121 } |
122 | |
123 if (elseConnectedGuards.contains(guard)) { | |
124 return guard; | |
125 } | |
126 | |
122 GuardData previousGuard = previous.getGuards().get(elseConnectedGuards.size()); | 127 GuardData previousGuard = previous.getGuards().get(elseConnectedGuards.size()); |
123 if (guard.getMethod().equals(previousGuard.getMethod()) && guard.isNegated() != previousGuard.isNegated()) { | 128 if (guard.getMethod().equals(previousGuard.getMethod()) && guard.isNegated() != previousGuard.isNegated()) { |
124 return guard; | 129 return guard; |
125 } | 130 } |
126 return null; | 131 return null; |
210 GuardData guardMatch = iterator.next(); | 215 GuardData guardMatch = iterator.next(); |
211 | 216 |
212 int signatureIndex = 0; | 217 int signatureIndex = 0; |
213 for (ActualParameter parameter : guardMatch.getParameters()) { | 218 for (ActualParameter parameter : guardMatch.getParameters()) { |
214 signatureIndex++; | 219 signatureIndex++; |
215 if (parameter.getSpecification().isSignature()) { | 220 if (!parameter.getSpecification().isSignature()) { |
216 continue; | 221 continue; |
217 } | 222 } |
218 | 223 |
219 TypeMirror guardType = parameter.getType(); | 224 TypeMirror guardType = parameter.getType(); |
220 | 225 |