# HG changeset patch # User Thomas Wuerthinger # Date 1425131440 -3600 # Node ID d2e3d8202ed36eac50dca35ee118b5e4a96da9f0 # Parent 71a9b760d3bb4def8a759e71017b1c4484959bd1 Improve error message for partialEvaluationConstant assert to include the values of phis. diff -r 71a9b760d3bb -r d2e3d8202ed3 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/TruffleGraphBuilderPlugins.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/TruffleGraphBuilderPlugins.java Sat Feb 28 13:15:09 2015 +0100 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/TruffleGraphBuilderPlugins.java Sat Feb 28 14:50:40 2015 +0100 @@ -30,6 +30,7 @@ import com.oracle.graal.compiler.common.*; import com.oracle.graal.compiler.common.calc.*; import com.oracle.graal.compiler.common.type.*; +import com.oracle.graal.graph.*; import com.oracle.graal.java.*; import com.oracle.graal.java.GraphBuilderPlugin.InvocationPlugin; import com.oracle.graal.java.InvocationPlugins.Registration; @@ -198,7 +199,18 @@ if (curValue.isConstant()) { return true; } else { - throw builder.bailout("Partial evaluation did not reduce value to a constant, is a regular compiler node: " + curValue); + StringBuilder sb = new StringBuilder(); + sb.append(curValue); + if (curValue instanceof ValuePhiNode) { + ValuePhiNode valuePhi = (ValuePhiNode) curValue; + sb.append(" ("); + for (Node n : valuePhi.inputs()) { + sb.append(n); + sb.append("; "); + } + sb.append(")"); + } + throw builder.bailout("Partial evaluation did not reduce value to a constant, is a regular compiler node: " + sb.toString()); } } });