comparison graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/AssertionNode.java @ 20100:1505cfecbeed

allow satisfied compile time assertions to survive until LIR lowering
author Doug Simon <doug.simon@oracle.com>
date Tue, 31 Mar 2015 14:11:07 +0200
parents 14e703edb2ab
children 93c50cefb9e8
comparison
equal deleted inserted replaced
20099:de3b84bf239b 20100:1505cfecbeed
77 } 77 }
78 } 78 }
79 79
80 public void generate(NodeLIRBuilderTool generator) { 80 public void generate(NodeLIRBuilderTool generator) {
81 assert compileTimeAssertion; 81 assert compileTimeAssertion;
82 if (value.isConstant() && value.asJavaConstant().asInt() == 0) { 82 if (value.isConstant()) {
83 throw new GraalInternalError("%s: failed compile-time assertion: %s", this, message); 83 if (value.asJavaConstant().asInt() == 0) {
84 throw new GraalInternalError("%s: failed compile-time assertion: %s", this, message);
85 }
84 } else { 86 } else {
85 throw new GraalInternalError("%s: failed compile-time assertion (value %s): %s", this, value, message); 87 throw new GraalInternalError("%s: failed compile-time assertion (value %s): %s", this, value, message);
86 } 88 }
87 } 89 }
88 90