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

Unified Diff: src/snapshot/serialize.cc

Issue 1408163003: Move RootIndexMap out of serializer file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add files Created 5 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/snapshot/serialize.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/serialize.cc
diff --git a/src/snapshot/serialize.cc b/src/snapshot/serialize.cc
index 51892de3eb1a1a1f84c0f58e511c0b37440b7958..a6ca6e1946fe91b9de28253afea41dd8e03f9b0e 100644
--- a/src/snapshot/serialize.cc
+++ b/src/snapshot/serialize.cc
@@ -354,31 +354,6 @@ const char* ExternalReferenceEncoder::NameOfAddress(Isolate* isolate,
}
-RootIndexMap::RootIndexMap(Isolate* isolate) {
- map_ = isolate->root_index_map();
- if (map_ != NULL) return;
- map_ = new HashMap(HashMap::PointersMatch);
- for (uint32_t i = 0; i < Heap::kStrongRootListLength; i++) {
- Heap::RootListIndex root_index = static_cast<Heap::RootListIndex>(i);
- Object* root = isolate->heap()->root(root_index);
- // Omit root entries that can be written after initialization. They must
- // not be referenced through the root list in the snapshot.
- if (root->IsHeapObject() &&
- isolate->heap()->RootCanBeTreatedAsConstant(root_index)) {
- HeapObject* heap_object = HeapObject::cast(root);
- HashMap::Entry* entry = LookupEntry(map_, heap_object, false);
- if (entry != NULL) {
- // Some are initialized to a previous value in the root list.
- DCHECK_LT(GetValue(entry), i);
- } else {
- SetValue(LookupEntry(map_, heap_object, true), i);
- }
- }
- }
- isolate->set_root_index_map(map_);
-}
-
-
class CodeAddressMap: public CodeEventLogger {
public:
explicit CodeAddressMap(Isolate* isolate)
« no previous file with comments | « src/snapshot/serialize.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698