# HG changeset patch # User Doug Simon # Date 1427803867 -7200 # Node ID 1505cfecbeed2b2dbd6650c7a998822d8124a17a # Parent de3b84bf239be8257421cb0d4ced0f918ffb4938 allow satisfied compile time assertions to survive until LIR lowering diff -r de3b84bf239b -r 1505cfecbeed graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/AssertionNode.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/AssertionNode.java Tue Mar 31 11:40:04 2015 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/AssertionNode.java Tue Mar 31 14:11:07 2015 +0200 @@ -79,8 +79,10 @@ public void generate(NodeLIRBuilderTool generator) { assert compileTimeAssertion; - if (value.isConstant() && value.asJavaConstant().asInt() == 0) { - throw new GraalInternalError("%s: failed compile-time assertion: %s", this, message); + if (value.isConstant()) { + if (value.asJavaConstant().asInt() == 0) { + throw new GraalInternalError("%s: failed compile-time assertion: %s", this, message); + } } else { throw new GraalInternalError("%s: failed compile-time assertion (value %s): %s", this, value, message); }