Mercurial > hg > graal-compiler
diff graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/TruffleGraphBuilderPlugins.java @ 19383:669f746ad3b1
Truffle graph builder plugin isValid should only record assumption is true.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 15 Feb 2015 16:54:22 +0100 |
parents | 1a9d5e9ab0f4 |
children | 7f4201b633e7 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/TruffleGraphBuilderPlugins.java Sun Feb 15 16:44:52 2015 +0100 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/TruffleGraphBuilderPlugins.java Sun Feb 15 16:54:22 2015 +0100 @@ -60,7 +60,9 @@ Constant constant = arg.asConstant(); OptimizedAssumption assumption = builder.getSnippetReflection().asObject(OptimizedAssumption.class, (JavaConstant) constant); builder.push(Kind.Boolean.getStackKind(), builder.append(ConstantNode.forBoolean(assumption.isValid()))); - builder.getAssumptions().record(new AssumptionValidAssumption(assumption)); + if (assumption.isValid()) { + builder.getAssumptions().record(new AssumptionValidAssumption(assumption)); + } } else { throw new BailoutException("assumption could not be reduced to a constant"); }