Mercurial > hg > truffle
comparison graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FloatingReadPhase.java @ 9646:183d33c76419
Removed ValueNode.dependencies
Introduced GuardedNode and GuardingNode interfaces
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 10 May 2013 18:28:30 +0200 |
parents | 76c40c3f6bb7 |
children | 06dc2d2324d6 |
comparison
equal
deleted
inserted
replaced
9645:37e996855762 | 9646:183d33c76419 |
---|---|
163 if (locationIdentity != LocationNode.ANY_LOCATION) { | 163 if (locationIdentity != LocationNode.ANY_LOCATION) { |
164 ValueNode lastLocationAccess = state.getLastLocationAccess(locationIdentity); | 164 ValueNode lastLocationAccess = state.getLastLocationAccess(locationIdentity); |
165 FloatingAccessNode floatingNode = accessNode.asFloatingNode(lastLocationAccess); | 165 FloatingAccessNode floatingNode = accessNode.asFloatingNode(lastLocationAccess); |
166 floatingNode.setNullCheck(accessNode.getNullCheck()); | 166 floatingNode.setNullCheck(accessNode.getNullCheck()); |
167 ValueAnchorNode anchor = null; | 167 ValueAnchorNode anchor = null; |
168 for (GuardNode guard : accessNode.dependencies().filter(GuardNode.class)) { | 168 GuardingNode guard = accessNode.getGuard(); |
169 if (anchor == null) { | 169 if (guard != null) { |
170 anchor = graph.add(new ValueAnchorNode()); | 170 anchor = graph.add(new ValueAnchorNode(guard.asNode())); |
171 graph.addAfterFixed(accessNode, anchor); | 171 graph.addAfterFixed(accessNode, anchor); |
172 } | |
173 anchor.addAnchoredNode(guard); | |
174 } | 172 } |
175 graph.replaceFixedWithFloating(accessNode, floatingNode); | 173 graph.replaceFixedWithFloating(accessNode, floatingNode); |
176 } | 174 } |
177 } | 175 } |
178 | 176 |