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

Unified Diff: runtime/vm/object.h

Issue 1151013005: Serialize maps without hashes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: _getIndexSize and name constant Created 5 years, 7 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 | « runtime/lib/compact_hash.dart ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 39a57ba80d8ff26963d8dbc03075a943054417e9..1accd627c857483bc05cd8b3cf631d4b970ea748 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -7236,6 +7236,10 @@ class LinkedHashMap : public Instance {
private:
FINAL_HEAP_OBJECT_IMPLEMENTATION(LinkedHashMap, Instance);
+ // Keep this in sync with Dart implementation (lib/compact_hash.dart).
+ static const intptr_t kInitialIndexBits = 3;
+ static const intptr_t kInitialIndexSize = 1 << (kInitialIndexBits + 1);
+
// Allocate a map, but leave all fields set to null.
// Used during deserialization (since map might contain itself as key/value).
static RawLinkedHashMap* NewUninitialized(Heap::Space space = Heap::kNew);
« no previous file with comments | « runtime/lib/compact_hash.dart ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698