# HG changeset patch # User Gilles Duboscq # Date 1329396527 -3600 # Node ID 53168434d0df8b48bdbc0b7e8feae9f65ad839de # Parent 9418a31c3757d30ce1c6b98557891cdca7825604 Transform some CiBailout into GraalInternalError diff -r 9418a31c3757 -r 53168434d0df graal/com.oracle.max.graal.alloc/src/com/oracle/max/graal/alloc/simple/LinearScanAllocator.java --- a/graal/com.oracle.max.graal.alloc/src/com/oracle/max/graal/alloc/simple/LinearScanAllocator.java Thu Feb 16 13:48:00 2012 +0100 +++ b/graal/com.oracle.max.graal.alloc/src/com/oracle/max/graal/alloc/simple/LinearScanAllocator.java Thu Feb 16 13:48:47 2012 +0100 @@ -446,7 +446,7 @@ // This should not happen as long as all LIR instructions have fulfillable register constraints. But be safe in product mode and bail out. assert false; - throw new CiBailout("No register available"); + throw new GraalInternalError("No register available"); } spill(bestSpillCandidate); diff -r 9418a31c3757 -r 53168434d0df graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/Interval.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/Interval.java Thu Feb 16 13:48:00 2012 +0100 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/Interval.java Thu Feb 16 13:48:47 2012 +0100 @@ -30,6 +30,7 @@ import com.oracle.max.criutils.*; import com.oracle.max.graal.compiler.*; import com.oracle.max.graal.compiler.util.*; +import com.oracle.max.graal.graph.*; import com.oracle.max.graal.lir.*; /** @@ -790,7 +791,7 @@ Interval lastChild = splitChildren.get(splitChildren.size() - 1); msg.append(" (first = ").append(firstChild).append(", last = ").append(lastChild).append(")"); } - throw new CiBailout("Linear Scan Error: " + msg); + throw new GraalInternalError("Linear Scan Error: %s", msg); } if (!splitChildren.isEmpty()) { diff -r 9418a31c3757 -r 53168434d0df graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/LinearScan.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/LinearScan.java Thu Feb 16 13:48:00 2012 +0100 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/LinearScan.java Thu Feb 16 13:48:47 2012 +0100 @@ -1951,38 +1951,38 @@ if (i1.operandNumber != i) { TTY.println("Interval %d is on position %d in list", i1.operandNumber, i); TTY.println(i1.logString(this)); - throw new CiBailout(""); + throw new GraalInternalError(""); } if (isVariable(i1.operand) && i1.kind() == CiKind.Illegal) { TTY.println("Interval %d has no type assigned", i1.operandNumber); TTY.println(i1.logString(this)); - throw new CiBailout(""); + throw new GraalInternalError(""); } if (i1.location() == null) { TTY.println("Interval %d has no register assigned", i1.operandNumber); TTY.println(i1.logString(this)); - throw new CiBailout(""); + throw new GraalInternalError(""); } if (!isProcessed(i1.location())) { TTY.println("Can not have an Interval for an ignored register " + i1.location()); TTY.println(i1.logString(this)); - throw new CiBailout(""); + throw new GraalInternalError(""); } if (i1.first() == Range.EndMarker) { TTY.println("Interval %d has no Range", i1.operandNumber); TTY.println(i1.logString(this)); - throw new CiBailout(""); + throw new GraalInternalError(""); } for (Range r = i1.first(); r != Range.EndMarker; r = r.next) { if (r.from >= r.to) { TTY.println("Interval %d has zero length range", i1.operandNumber); TTY.println(i1.logString(this)); - throw new CiBailout(""); + throw new GraalInternalError(""); } } diff -r 9418a31c3757 -r 53168434d0df graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/RegisterVerifier.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/RegisterVerifier.java Thu Feb 16 13:48:00 2012 +0100 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/RegisterVerifier.java Thu Feb 16 13:48:47 2012 +0100 @@ -30,6 +30,7 @@ import com.oracle.max.criutils.*; import com.oracle.max.graal.compiler.*; import com.oracle.max.graal.compiler.util.*; +import com.oracle.max.graal.graph.*; import com.oracle.max.graal.lir.*; import com.oracle.max.graal.lir.LIRInstruction.*; import com.oracle.max.graal.lir.cfg.*; @@ -197,7 +198,7 @@ static boolean checkState(Interval[] inputState, CiValue reg, Interval interval) { if (reg != null && isRegister(reg)) { if (inputState[asRegister(reg).number] != interval) { - throw new CiBailout("!! Error in register allocation: register " + reg + " does not contain interval " + interval.operand + " but interval " + inputState[asRegister(reg).number]); + throw new GraalInternalError("!! Error in register allocation: register %s does not contain interval %s but interval %s", reg, interval.operand, inputState[asRegister(reg).number]); } } return true; diff -r 9418a31c3757 -r 53168434d0df graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/schedule/SchedulePhase.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/schedule/SchedulePhase.java Thu Feb 16 13:48:00 2012 +0100 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/schedule/SchedulePhase.java Thu Feb 16 13:48:47 2012 +0100 @@ -275,7 +275,7 @@ // scheduler is used for debug printing in early compiler phases. This was annoying during debugging // when an excpetion breakpoint is set for assertion errors, so I changed it to a bailout. if (b.getEndNode() instanceof ControlSplitNode) { - throw new CiBailout(""); + throw new GraalInternalError("Schedule is not possible : needs to move a node after the last node of the block whcih can not be move"); } //assert !(b.lastNode() instanceof ControlSplitNode); diff -r 9418a31c3757 -r 53168434d0df graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/GraphBuilderPhase.java --- a/graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/GraphBuilderPhase.java Thu Feb 16 13:48:00 2012 +0100 +++ b/graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/GraphBuilderPhase.java Thu Feb 16 13:48:47 2012 +0100 @@ -534,7 +534,7 @@ case FREM: case DREM: v = new FloatRemNode(result, x, y, isStrictFP); break; default: - throw new CiBailout("should not reach"); + throw new GraalInternalError("should not reach"); } ValueNode result1 = append(currentGraph.unique(v)); if (canTrap) { @@ -559,7 +559,7 @@ case IUSHR: case LUSHR: v = new UnsignedRightShiftNode(kind, x, s); break; default: - throw new CiBailout("should not reach"); + throw new GraalInternalError("should not reach"); } frameState.push(kind, append(currentGraph.unique(v))); } @@ -576,7 +576,7 @@ case IXOR: case LXOR: v = new XorNode(kind, x, y); break; default: - throw new CiBailout("should not reach"); + throw new GraalInternalError("should not reach"); } frameState.push(kind, append(currentGraph.unique(v))); }