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

Side by Side Diff: sdk/lib/_internal/js_runtime/lib/linked_hash_map.dart

Issue 2974433002: Remaining private libs (Closed)
Patch Set: It's html_common Created 3 years, 5 months 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // Efficient JavaScript based implementation of a linked hash map used as a 5 // Efficient JavaScript based implementation of a linked hash map used as a
6 // backing map for constant maps and the [LinkedHashMap] patch 6 // backing map for constant maps and the [LinkedHashMap] patch
7 7
8 part of "js_helper.dart"; 8 part of "dart:_js_helper";
9 9
10 const _USE_ES6_MAPS = const bool.fromEnvironment("dart2js.use.es6.maps"); 10 const _USE_ES6_MAPS = const bool.fromEnvironment("dart2js.use.es6.maps");
11 11
12 class JsLinkedHashMap<K, V> implements LinkedHashMap<K, V>, InternalMap { 12 class JsLinkedHashMap<K, V> implements LinkedHashMap<K, V>, InternalMap {
13 int _length = 0; 13 int _length = 0;
14 14
15 // The hash map contents are divided into three parts: one part for 15 // The hash map contents are divided into three parts: one part for
16 // string keys, one for numeric keys, and one for the rest. String 16 // string keys, one for numeric keys, and one for the rest. String
17 // and numeric keys map directly to their linked cells, but the rest 17 // and numeric keys map directly to their linked cells, but the rest
18 // of the entries are stored in bucket lists of the form: 18 // of the entries are stored in bucket lists of the form:
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 } else if (_cell == null) { 426 } else if (_cell == null) {
427 _current = null; 427 _current = null;
428 return false; 428 return false;
429 } else { 429 } else {
430 _current = _cell.hashMapCellKey; 430 _current = _cell.hashMapCellKey;
431 _cell = _cell._next; 431 _cell = _cell._next;
432 return true; 432 return true;
433 } 433 }
434 } 434 }
435 } 435 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/js_string.dart ('k') | sdk/lib/_internal/js_runtime/lib/native_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698