Index: sdk/lib/core/queue.dart |
diff --git a/sdk/lib/core/queue.dart b/sdk/lib/core/queue.dart |
index bf1e49c2113bbc97e3066b5a9e98891c697aee05..e6e997fb9bb110761b6d77222969c03c39c4af23 100644 |
--- a/sdk/lib/core/queue.dart |
+++ b/sdk/lib/core/queue.dart |
@@ -234,7 +234,7 @@ class DoubleLinkedQueue<E> implements Queue<E> { |
} |
bool get isEmpty { |
- return (_sentinel._next === _sentinel); |
+ return (identical(_sentinel._next, _sentinel)); |
} |
void clear() { |
@@ -244,7 +244,7 @@ class DoubleLinkedQueue<E> implements Queue<E> { |
void forEach(void f(E element)) { |
DoubleLinkedQueueEntry<E> entry = _sentinel._next; |
- while (entry !== _sentinel) { |
+ while (!identical(entry, _sentinel)) { |
DoubleLinkedQueueEntry<E> nextEntry = entry._next; |
f(entry._element); |
entry = nextEntry; |
@@ -253,7 +253,7 @@ class DoubleLinkedQueue<E> implements Queue<E> { |
void forEachEntry(void f(DoubleLinkedQueueEntry<E> element)) { |
DoubleLinkedQueueEntry<E> entry = _sentinel._next; |
- while (entry !== _sentinel) { |
+ while (!identical(entry, _sentinel)) { |
DoubleLinkedQueueEntry<E> nextEntry = entry._next; |
f(entry); |
entry = nextEntry; |
@@ -262,7 +262,7 @@ class DoubleLinkedQueue<E> implements Queue<E> { |
bool every(bool f(E element)) { |
DoubleLinkedQueueEntry<E> entry = _sentinel._next; |
- while (entry !== _sentinel) { |
+ while (!identical(entry, _sentinel)) { |
DoubleLinkedQueueEntry<E> nextEntry = entry._next; |
if (!f(entry._element)) return false; |
entry = nextEntry; |
@@ -272,7 +272,7 @@ class DoubleLinkedQueue<E> implements Queue<E> { |
bool some(bool f(E element)) { |
DoubleLinkedQueueEntry<E> entry = _sentinel._next; |
- while (entry !== _sentinel) { |
+ while (!identical(entry, _sentinel)) { |
DoubleLinkedQueueEntry<E> nextEntry = entry._next; |
if (f(entry._element)) return true; |
entry = nextEntry; |
@@ -283,7 +283,7 @@ class DoubleLinkedQueue<E> implements Queue<E> { |
Queue map(f(E element)) { |
Queue other = new Queue(); |
DoubleLinkedQueueEntry<E> entry = _sentinel._next; |
- while (entry !== _sentinel) { |
+ while (!identical(entry, _sentinel)) { |
DoubleLinkedQueueEntry<E> nextEntry = entry._next; |
other.addLast(f(entry._element)); |
entry = nextEntry; |
@@ -299,7 +299,7 @@ class DoubleLinkedQueue<E> implements Queue<E> { |
Queue<E> filter(bool f(E element)) { |
Queue<E> other = new Queue<E>(); |
DoubleLinkedQueueEntry<E> entry = _sentinel._next; |
- while (entry !== _sentinel) { |
+ while (!identical(entry, _sentinel)) { |
DoubleLinkedQueueEntry<E> nextEntry = entry._next; |
if (f(entry._element)) other.addLast(entry._element); |
entry = nextEntry; |
@@ -325,7 +325,7 @@ class _DoubleLinkedQueueIterator<E> implements Iterator<E> { |
} |
bool get hasNext { |
- return _currentEntry._next !== _sentinel; |
+ return !identical(_currentEntry._next, _sentinel); |
} |
E next() { |