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

Unified Diff: sdk/lib/core/map.dart

Issue 11312122: Change List constructors. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload. Adapt code for List.fixedLength. Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/core/list.dart ('k') | sdk/lib/crypto/hash_utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/map.dart
diff --git a/sdk/lib/core/map.dart b/sdk/lib/core/map.dart
index 6dd0789bb0f6e3535b91bec37e4ad9f1b9923292..caad8373d9587ef44bd0588f166fbb2414fe61bf 100644
--- a/sdk/lib/core/map.dart
+++ b/sdk/lib/core/map.dart
@@ -166,7 +166,7 @@ class _HashMapImpl<K, V> implements HashMap<K, V> {
_numberOfEntries = 0;
_numberOfDeleted = 0;
_loadLimit = _computeLoadLimit(_INITIAL_CAPACITY);
- _keys = new List(_INITIAL_CAPACITY);
+ _keys = new List.fixedLength(_INITIAL_CAPACITY);
_values = new List<V>(_INITIAL_CAPACITY);
}
@@ -273,7 +273,7 @@ class _HashMapImpl<K, V> implements HashMap<K, V> {
_loadLimit = _computeLoadLimit(newCapacity);
List oldKeys = _keys;
List<V> oldValues = _values;
- _keys = new List(newCapacity);
+ _keys = new List.fixedLength(newCapacity);
_values = new List<V>(newCapacity);
for (int i = 0; i < capacity; i++) {
// [key] can be either of type [K] or [_DeletedKeySentinel].
« no previous file with comments | « sdk/lib/core/list.dart ('k') | sdk/lib/crypto/hash_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698