Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(462)

Side by Side Diff: sdk/lib/core/set.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/core/queue.dart ('k') | sdk/lib/core/stopwatch.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * This class is the public interface of a set. A set is a collection 6 * This class is the public interface of a set. A set is a collection
7 * without duplicates. 7 * without duplicates.
8 */ 8 */
9 abstract class Set<E> extends Collection<E> { 9 abstract class Set<E> extends Collection<E> {
10 factory Set() => new _HashSetImpl<E>(); 10 factory Set() => new _HashSetImpl<E>();
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 return res; 227 return res;
228 } 228 }
229 229
230 void _advance() { 230 void _advance() {
231 int length = _entries.length; 231 int length = _entries.length;
232 var entry; 232 var entry;
233 final deletedKey = _HashMapImpl._DELETED_KEY; 233 final deletedKey = _HashMapImpl._DELETED_KEY;
234 do { 234 do {
235 if (++_nextValidIndex >= length) break; 235 if (++_nextValidIndex >= length) break;
236 entry = _entries[_nextValidIndex]; 236 entry = _entries[_nextValidIndex];
237 } while ((entry === null) || (entry === deletedKey)); 237 } while ((entry == null) || identical(entry, deletedKey));
238 } 238 }
239 239
240 // The entries in the set. May contain null or the sentinel value. 240 // The entries in the set. May contain null or the sentinel value.
241 List<E> _entries; 241 List<E> _entries;
242 242
243 // The next valid index in [_entries] or the length of [entries_]. 243 // The next valid index in [_entries] or the length of [entries_].
244 // If it is the length of [_entries], calling [hasNext] on the 244 // If it is the length of [_entries], calling [hasNext] on the
245 // iterator will return false. 245 // iterator will return false.
246 int _nextValidIndex; 246 int _nextValidIndex;
247 } 247 }
OLDNEW
« no previous file with comments | « sdk/lib/core/queue.dart ('k') | sdk/lib/core/stopwatch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698