Skip to content

Commit 1299101

Browse files
committed
Fix assertions with missing message.
1 parent 75aeb90 commit 1299101

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/phases/schedule/SchedulePhase.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,8 @@ private static void sortIntoList(NodeStack stack, Node n, HIRBlock b, ArrayList<
605605
assert unprocessed.isMarked(n) : Assertions.errorMessage(n);
606606
assert nodeMap.get(n) == b : Assertions.errorMessage(n);
607607
assert stack.isEmpty() : "Node stack must be pre-allocated, but empty.";
608-
assert !(n instanceof PhiNode);
609-
assert !(n instanceof ProxyNode);
608+
assert !(n instanceof PhiNode) : "Phi nodes will never be sorted into the list.";
609+
assert !(n instanceof ProxyNode) : "Proxy nodes will never be sorted into the list.";
610610

611611
unprocessed.clear(n);
612612

@@ -633,8 +633,8 @@ private static int pushUnprocessedInputs(Node n, HIRBlock b, NodeMap<HIRBlock> n
633633
int pushCount = 0;
634634
for (Node input : n.inputs()) {
635635
if (nodeMap.get(input) == b && unprocessed.isMarked(input)) {
636-
assert !(input instanceof PhiNode);
637-
assert !(input instanceof ProxyNode);
636+
assert !(input instanceof PhiNode) : "Phi nodes will always be already unmarked in the bitmap.";
637+
assert !(input instanceof ProxyNode) : "Proxy nodes will always be already unmarked in the bitmap.";
638638
stack.push(input);
639639
pushCount++;
640640
}
@@ -843,18 +843,9 @@ public void add(Node node) {
843843
* Number of nodes in this micro block.
844844
*/
845845
public int getNodeCount() {
846-
assert getActualNodeCount() == nodeCount;
847846
return nodeCount;
848847
}
849848

850-
private int getActualNodeCount() {
851-
int count = 0;
852-
for (NodeEntry e = head; e != null; e = e.next) {
853-
count++;
854-
}
855-
return count;
856-
}
857-
858849
/**
859850
* The id of the micro block, with a block always associated with a lower id than its
860851
* successors.

0 commit comments

Comments
 (0)