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

Unified Diff: src/snapshot/serializer.cc

Issue 2458603002: [serializer] clean up root list items. (Closed)
Patch Set: Created 4 years, 2 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 | « src/heap/heap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/serializer.cc
diff --git a/src/snapshot/serializer.cc b/src/snapshot/serializer.cc
index f622a5b8d24a795d8411f1899085915f03ccb898..24041e3d93455136caabb91d1cf0258814c6d6c3 100644
--- a/src/snapshot/serializer.cc
+++ b/src/snapshot/serializer.cc
@@ -212,6 +212,11 @@ void Serializer::PutRoot(int root_index, HeapObject* object,
PrintF("\n");
}
+ // Assert that the first 32 root array items are a conscious choice. They are
+ // chosen so that the most common ones can be encoded more efficiently.
+ STATIC_ASSERT(Heap::kEmptyDescriptorArrayRootIndex ==
+ kNumberOfRootArrayConstants - 1);
+
if (how_to_code == kPlain && where_to_point == kStartOfObject &&
root_index < kNumberOfRootArrayConstants &&
!isolate()->heap()->InNewSpace(object)) {
« no previous file with comments | « src/heap/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698