Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeUtil.java @ 9487:0285fbb8b05d
NodeUtil.findFirstNodeInstance bug fix
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Wed, 01 May 2013 23:42:23 +0200 |
parents | 6678695afc3b |
children | e2965e5cd474 |
comparison
equal
deleted
inserted
replaced
9486:6678695afc3b | 9487:0285fbb8b05d |
---|---|
391 | 391 |
392 for (Object childNode : childNodes) { | 392 for (Object childNode : childNodes) { |
393 if (clazz.isInstance(childNode)) { | 393 if (clazz.isInstance(childNode)) { |
394 return (T) childNode; | 394 return (T) childNode; |
395 } else { | 395 } else { |
396 return findFirstNodeInstance(childNode, clazz); | 396 T node = findFirstNodeInstance(childNode, clazz); |
397 if (node != null) { | |
398 return node; | |
399 } | |
397 } | 400 } |
398 } | 401 } |
399 return null; | 402 return null; |
400 } | 403 } |
401 | 404 |