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

Side by Side Diff: src/snapshot/deserializer.h

Issue 2801073006: Decouple root visitors from object visitors. (Closed)
Patch Set: rebase Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « src/snapshot/code-serializer.cc ('k') | src/snapshot/deserializer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_SNAPSHOT_DESERIALIZER_H_ 5 #ifndef V8_SNAPSHOT_DESERIALIZER_H_
6 #define V8_SNAPSHOT_DESERIALIZER_H_ 6 #define V8_SNAPSHOT_DESERIALIZER_H_
7 7
8 #include "src/heap/heap.h" 8 #include "src/heap/heap.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 #include "src/snapshot/serializer-common.h" 10 #include "src/snapshot/serializer-common.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Deserialize an object graph. Fail gracefully. 56 // Deserialize an object graph. Fail gracefully.
57 MaybeHandle<HeapObject> DeserializeObject(Isolate* isolate); 57 MaybeHandle<HeapObject> DeserializeObject(Isolate* isolate);
58 58
59 // Add an object to back an attached reference. The order to add objects must 59 // Add an object to back an attached reference. The order to add objects must
60 // mirror the order they are added in the serializer. 60 // mirror the order they are added in the serializer.
61 void AddAttachedObject(Handle<HeapObject> attached_object) { 61 void AddAttachedObject(Handle<HeapObject> attached_object) {
62 attached_objects_.Add(attached_object); 62 attached_objects_.Add(attached_object);
63 } 63 }
64 64
65 private: 65 private:
66 void VisitPointers(Object** start, Object** end) override; 66 void VisitRootPointers(Root root, Object** start, Object** end) override;
67 67
68 void Synchronize(VisitorSynchronization::SyncTag tag) override; 68 void Synchronize(VisitorSynchronization::SyncTag tag) override;
69 69
70 void VisitRuntimeEntry(RelocInfo* rinfo) override { UNREACHABLE(); }
71
72 void Initialize(Isolate* isolate); 70 void Initialize(Isolate* isolate);
73 71
74 bool deserializing_user_code() { return deserializing_user_code_; } 72 bool deserializing_user_code() { return deserializing_user_code_; }
75 73
76 void DecodeReservation(Vector<const SerializedData::Reservation> res); 74 void DecodeReservation(Vector<const SerializedData::Reservation> res);
77 75
78 bool ReserveSpace(); 76 bool ReserveSpace();
79 77
80 void UnalignedCopy(Object** dest, Object** src) { 78 void UnalignedCopy(Object** dest, Object** src) {
81 memcpy(dest, src, sizeof(*src)); 79 memcpy(dest, src, sizeof(*src));
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 147
150 AllocationAlignment next_alignment_; 148 AllocationAlignment next_alignment_;
151 149
152 DISALLOW_COPY_AND_ASSIGN(Deserializer); 150 DISALLOW_COPY_AND_ASSIGN(Deserializer);
153 }; 151 };
154 152
155 } // namespace internal 153 } // namespace internal
156 } // namespace v8 154 } // namespace v8
157 155
158 #endif // V8_SNAPSHOT_DESERIALIZER_H_ 156 #endif // V8_SNAPSHOT_DESERIALIZER_H_
OLDNEW
« no previous file with comments | « src/snapshot/code-serializer.cc ('k') | src/snapshot/deserializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698