Mercurial > hg > truffle
changeset 21026:931b0acc8d2e
Fixed incorrect definition of AbstractBeginNode#anchored and AbstractBeginNode#proxies utility methods.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 20 Apr 2015 14:19:17 +0200 |
parents | 2e0a55d381ea |
children | 53b3a10e2515 |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/AbstractBeginNode.java |
diffstat | 1 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/AbstractBeginNode.java Mon Apr 20 14:17:06 2015 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/AbstractBeginNode.java Mon Apr 20 14:19:17 2015 +0200 @@ -126,11 +126,24 @@ } public NodeIterable<Node> anchored() { - return usages().filter(isNotA(ProxyNode.class)); + return usages().filter(n -> { + if (n instanceof ProxyNode) { + ProxyNode proxyNode = (ProxyNode) n; + return proxyNode.proxyPoint() != this; + } + return true; + }); } + @SuppressWarnings({"unchecked", "rawtypes"}) public NodeIterable<ProxyNode> proxies() { - return usages().filter(ProxyNode.class); + return (NodeIterable) usages().filter(n -> { + if (n instanceof ProxyNode) { + ProxyNode proxyNode = (ProxyNode) n; + return proxyNode.proxyPoint() == this; + } + return false; + }); } public NodeIterable<FixedNode> getBlockNodes() {