Mercurial > hg > graal-compiler
changeset 16228:df5ac85a4813
handle parameter nodes have been dead code eliminated in MonitorGraphTest
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 25 Jun 2014 16:52:29 +0200 |
parents | ec17c588abf9 |
children | d837c02aba58 |
files | graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/MonitorGraphTest.java |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/MonitorGraphTest.java Wed Jun 25 12:38:16 2014 +0200 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/MonitorGraphTest.java Wed Jun 25 16:52:29 2014 +0200 @@ -85,9 +85,11 @@ private StructuredGraph parseAndProcess(String snippet) { StructuredGraph graph = parse(snippet); ParameterNode param = graph.getNodes(ParameterNode.class).first(); - ConstantNode constant = ConstantNode.forInt(0, graph); - for (Node n : param.usages().filter(isNotA(FrameState.class)).snapshot()) { - n.replaceFirstInput(param, constant); + if (param != null) { + ConstantNode constant = ConstantNode.forInt(0, graph); + for (Node n : param.usages().filter(isNotA(FrameState.class)).snapshot()) { + n.replaceFirstInput(param, constant); + } } Map<Invoke, Double> hints = new HashMap<>(); for (Invoke invoke : graph.getInvokes()) {