# HG changeset patch # User Thomas Wuerthinger # Date 1426362129 -3600 # Node ID edd37b7d66793e75d1dea3b83cddeec4828ea41b # Parent 4178f9830a274ba8b324044a5aeb391d58a94cfb Turn a check for non-null stateAfter of an invoke into an assertion. diff -r 4178f9830a27 -r edd37b7d6679 graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java --- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java Sat Mar 14 19:15:51 2015 +0100 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java Sat Mar 14 20:42:09 2015 +0100 @@ -884,18 +884,22 @@ if (condition) { return true; } else { - throw new VerificationError(message, args).addContext(this); + throw fail(message, args); } } public boolean assertFalse(boolean condition, String message, Object... args) { if (condition) { - throw new VerificationError(message, args).addContext(this); + throw fail(message, args); } else { return true; } } + protected VerificationError fail(String message, Object... args) throws GraalGraphInternalError { + throw new VerificationError(message, args).addContext(this); + } + public Iterable cfgPredecessors() { if (predecessor == null) { return Collections.emptySet(); diff -r 4178f9830a27 -r edd37b7d6679 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java Sat Mar 14 19:15:51 2015 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java Sat Mar 14 20:42:09 2015 +0100 @@ -211,10 +211,7 @@ if (callTarget.targetMethod() == null) { return "target method is null"; } - if (invoke.stateAfter() == null) { - // TODO (chaeubl): why should an invoke not have a state after? - return "the invoke has no after state"; - } + assert invoke.stateAfter() != null; if (!invoke.useForInlining()) { return "the invoke is marked to be not used for inlining"; }