| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 * Classes and utilities that supplement the collection support in dart:core. | 6 * Classes and utilities that supplement the collection support in dart:core. |
| 7 */ | 7 */ |
| 8 library dart.collection; | 8 library dart.collection; |
| 9 | 9 |
| 10 import 'dart:_internal'; | 10 import 'dart:_internal'; |
| 11 import 'dart:math' show Random; // Used by ListMixin.shuffle. | 11 import 'dart:math' show Random; |
| 12 import 'dart:_foreign_helper' show JS; |
| 13 import 'dart:_js_helper' show |
| 14 fillLiteralMap, InternalMap, NoInline, NoThrows, patch; // Used by ListMixi
n.shuffle. |
| 12 | 15 |
| 13 part 'collections.dart'; | 16 part 'collections.dart'; |
| 14 part 'hash_map.dart'; | 17 part 'hash_map.dart'; |
| 15 part 'hash_set.dart'; | 18 part 'hash_set.dart'; |
| 16 part 'iterable.dart'; | 19 part 'iterable.dart'; |
| 17 part 'iterator.dart'; | 20 part 'iterator.dart'; |
| 18 part 'linked_hash_map.dart'; | 21 part 'linked_hash_map.dart'; |
| 19 part 'linked_hash_set.dart'; | 22 part 'linked_hash_set.dart'; |
| 20 part 'linked_list.dart'; | 23 part 'linked_list.dart'; |
| 21 part 'list.dart'; | 24 part 'list.dart'; |
| 22 part 'maps.dart'; | 25 part 'maps.dart'; |
| 23 part 'queue.dart'; | 26 part 'queue.dart'; |
| 24 part 'set.dart'; | 27 part 'set.dart'; |
| 25 part 'splay_tree.dart'; | 28 part 'splay_tree.dart'; |
| 26 import 'dart:_foreign_helper' show JS; | |
| 27 import 'dart:_js_helper' show | |
| 28 fillLiteralMap, InternalMap, NoInline, NoThrows, patch; | |
| 29 | 29 |
| 30 class _HashMap<K, V> implements HashMap<K, V> { | 30 class _HashMap<K, V> implements HashMap<K, V> { |
| 31 int _length = 0; | 31 int _length = 0; |
| 32 | 32 |
| 33 // The hash map contents are divided into three parts: one part for | 33 // The hash map contents are divided into three parts: one part for |
| 34 // string keys, one for numeric keys, and one for the rest. String | 34 // string keys, one for numeric keys, and one for the rest. String |
| 35 // and numeric keys map directly to their values, but the rest of | 35 // and numeric keys map directly to their values, but the rest of |
| 36 // the entries are stored in bucket lists of the form: | 36 // the entries are stored in bucket lists of the form: |
| 37 // | 37 // |
| 38 // [key-0, value-0, key-1, value-1, ...] | 38 // [key-0, value-0, key-1, value-1, ...] |
| (...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 } else if (_cell == null) { | 1672 } else if (_cell == null) { |
| 1673 _current = null; | 1673 _current = null; |
| 1674 return false; | 1674 return false; |
| 1675 } else { | 1675 } else { |
| 1676 _current = _cell._element; | 1676 _current = _cell._element; |
| 1677 _cell = _cell._next; | 1677 _cell = _cell._next; |
| 1678 return true; | 1678 return true; |
| 1679 } | 1679 } |
| 1680 } | 1680 } |
| 1681 } | 1681 } |
| OLD | NEW |