Fix nullness information builder

This commit is contained in:
Alexey Andreev 2019-09-30 18:23:38 +03:00
parent a2a9dbcbe3
commit 3b170df2ca

View File

@ -292,12 +292,13 @@ class NullnessInformationBuilder {
Nullness status = deque.removeFirst() == 1 ? Nullness.NOT_NULL : Nullness.NULL; Nullness status = deque.removeFirst() == 1 ? Nullness.NOT_NULL : Nullness.NULL;
statuses[node] = status; statuses[node] = status;
int[] pairs = variablePairs[node]; if (status == Nullness.NULL) {
if (pairs != null) { int[] pairs = variablePairs[node];
int pairStatus = status == Nullness.NULL ? 1 : 0; if (pairs != null) {
for (int pair : pairs) { for (int pair : pairs) {
deque.addLast(pair); deque.addLast(pair);
deque.addLast(pairStatus); deque.addLast(1);
}
} }
} }
@ -451,7 +452,7 @@ class NullnessInformationBuilder {
IntSet newlyNonNull = new IntHashSet(); IntSet newlyNonNull = new IntHashSet();
} }
class NullnessInitVisitor extends AbstractInstructionVisitor { static class NullnessInitVisitor extends AbstractInstructionVisitor {
private IntDeque queue; private IntDeque queue;
NullnessInitVisitor(IntDeque queue) { NullnessInitVisitor(IntDeque queue) {