Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/SpecializationGroup.java @ 11481:a317acdd5f2c
Truffle-DSL: fixed a bug in else connections of generic generated methods.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Fri, 30 Aug 2013 15:55:52 +0200 |
parents | 5d72a3f5a31d |
children | d6a5ab791b0d |
comparison
equal
deleted
inserted
replaced
11480:f33beed55ddc | 11481:a317acdd5f2c |
---|---|
108 | 108 |
109 return elseConnectableGuards; | 109 return elseConnectableGuards; |
110 } | 110 } |
111 | 111 |
112 private GuardData findNegatedGuardInPrevious(GuardData guard) { | 112 private GuardData findNegatedGuardInPrevious(GuardData guard) { |
113 SpecializationGroup previous = this; | 113 SpecializationGroup previous = this.getPreviousGroup(); |
114 while ((previous = previous.getPreviousGroup()) != null) { | 114 if (previous == null) { |
115 List<GuardData> elseConnectedGuards = previous.getElseConnectableGuards(); | 115 return null; |
116 | 116 } |
117 if (previous == null || previous.getGuards().size() != elseConnectedGuards.size() + 1) { | 117 List<GuardData> elseConnectedGuards = previous.getElseConnectableGuards(); |
118 return null; | 118 |
119 } | 119 if (previous == null || previous.getGuards().size() != elseConnectedGuards.size() + 1) { |
120 GuardData previousGuard = previous.getGuards().get(elseConnectedGuards.size()); | 120 return null; |
121 if (guard.getMethod().equals(previousGuard.getMethod()) && guard.isNegated() != previousGuard.isNegated()) { | 121 } |
122 return guard; | 122 GuardData previousGuard = previous.getGuards().get(elseConnectedGuards.size()); |
123 } | 123 if (guard.getMethod().equals(previousGuard.getMethod()) && guard.isNegated() != previousGuard.isNegated()) { |
124 return guard; | |
124 } | 125 } |
125 return null; | 126 return null; |
126 } | 127 } |
127 | 128 |
128 private void updateChildren(List<SpecializationGroup> childs) { | 129 private void updateChildren(List<SpecializationGroup> childs) { |