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

Unified Diff: runtime/lib/compact_hash.dart

Issue 2278273003: VM: New, faster default Map construction. (Closed)
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/lib/linked_hash_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/compact_hash.dart
diff --git a/runtime/lib/compact_hash.dart b/runtime/lib/compact_hash.dart
index 1c2de88081c8f4ef72b8a69952119ad719d6a519..9912d07f2afb02bdc35f7642c785e34832e7ceaa 100644
--- a/runtime/lib/compact_hash.dart
+++ b/runtime/lib/compact_hash.dart
@@ -123,7 +123,13 @@ class _InternalLinkedHashMap<K, V> extends _HashVMBase
with MapMixin<K, V>, _LinkedHashMapMixin<K, V>, _HashBase,
_OperatorEqualsAndHashCode
implements LinkedHashMap<K, V> {
- factory _InternalLinkedHashMap() native "LinkedHashMap_allocate";
+ _InternalLinkedHashMap() {
sra1 2016/08/26 00:36:36 How about using initializers so that it is obvious
Florian Schneider 2016/08/26 00:40:32 Initializers only work with real fields, not with
+ _index = new Uint32List(_HashBase._INITIAL_INDEX_SIZE);
+ _hashMask = _HashBase._indexSizeToHashMask(_HashBase._INITIAL_INDEX_SIZE);
+ _data = new List(_HashBase._INITIAL_INDEX_SIZE);
+ _usedData = 0;
+ _deletedKeys = 0;
+ }
}
class _LinkedHashMapMixin<K, V> {
« no previous file with comments | « no previous file | runtime/lib/linked_hash_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698