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)) { |