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

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

Issue 2619203002: [serializer] pass internal fields deserializer callback as argument. (Closed)
Patch Set: Created 3 years, 11 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/isolate.h ('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 30 matching lines...) Expand all
41 next_alignment_(kWordAligned) { 41 next_alignment_(kWordAligned) {
42 DecodeReservation(data->Reservations()); 42 DecodeReservation(data->Reservations());
43 } 43 }
44 44
45 ~Deserializer() override; 45 ~Deserializer() override;
46 46
47 // Deserialize the snapshot into an empty heap. 47 // Deserialize the snapshot into an empty heap.
48 void Deserialize(Isolate* isolate); 48 void Deserialize(Isolate* isolate);
49 49
50 // Deserialize a single object and the objects reachable from it. 50 // Deserialize a single object and the objects reachable from it.
51 MaybeHandle<Object> DeserializePartial(Isolate* isolate, 51 MaybeHandle<Object> DeserializePartial(
52 Handle<JSGlobalProxy> global_proxy); 52 Isolate* isolate, Handle<JSGlobalProxy> global_proxy,
53 v8::DeserializeInternalFieldsCallback internal_fields_deserializer);
53 54
54 // Deserialize an object graph. Fail gracefully. 55 // Deserialize an object graph. Fail gracefully.
55 MaybeHandle<HeapObject> DeserializeObject(Isolate* isolate); 56 MaybeHandle<HeapObject> DeserializeObject(Isolate* isolate);
56 57
57 // Add an object to back an attached reference. The order to add objects must 58 // Add an object to back an attached reference. The order to add objects must
58 // mirror the order they are added in the serializer. 59 // mirror the order they are added in the serializer.
59 void AddAttachedObject(Handle<HeapObject> attached_object) { 60 void AddAttachedObject(Handle<HeapObject> attached_object) {
60 attached_objects_.Add(attached_object); 61 attached_objects_.Add(attached_object);
61 } 62 }
62 63
(...skipping 18 matching lines...) Expand all
81 82
82 void SetAlignment(byte data) { 83 void SetAlignment(byte data) {
83 DCHECK_EQ(kWordAligned, next_alignment_); 84 DCHECK_EQ(kWordAligned, next_alignment_);
84 int alignment = data - (kAlignmentPrefix - 1); 85 int alignment = data - (kAlignmentPrefix - 1);
85 DCHECK_LE(kWordAligned, alignment); 86 DCHECK_LE(kWordAligned, alignment);
86 DCHECK_LE(alignment, kSimd128Unaligned); 87 DCHECK_LE(alignment, kSimd128Unaligned);
87 next_alignment_ = static_cast<AllocationAlignment>(alignment); 88 next_alignment_ = static_cast<AllocationAlignment>(alignment);
88 } 89 }
89 90
90 void DeserializeDeferredObjects(); 91 void DeserializeDeferredObjects();
91 void DeserializeInternalFields(); 92 void DeserializeInternalFields(
93 v8::DeserializeInternalFieldsCallback internal_fields_deserializer);
92 94
93 void FlushICacheForNewIsolate(); 95 void FlushICacheForNewIsolate();
94 void FlushICacheForNewCodeObjectsAndRecordEmbeddedObjects(); 96 void FlushICacheForNewCodeObjectsAndRecordEmbeddedObjects();
95 97
96 void CommitPostProcessedObjects(Isolate* isolate); 98 void CommitPostProcessedObjects(Isolate* isolate);
97 99
98 // Fills in some heap data in an area from start to end (non-inclusive). The 100 // Fills in some heap data in an area from start to end (non-inclusive). The
99 // space id is used for the write barrier. The object_address is the address 101 // space id is used for the write barrier. The object_address is the address
100 // of the object we are writing into, or NULL if we are not writing into an 102 // of the object we are writing into, or NULL if we are not writing into an
101 // object, i.e. if we are writing a series of tagged values that are not on 103 // object, i.e. if we are writing a series of tagged values that are not on
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 148
147 AllocationAlignment next_alignment_; 149 AllocationAlignment next_alignment_;
148 150
149 DISALLOW_COPY_AND_ASSIGN(Deserializer); 151 DISALLOW_COPY_AND_ASSIGN(Deserializer);
150 }; 152 };
151 153
152 } // namespace internal 154 } // namespace internal
153 } // namespace v8 155 } // namespace v8
154 156
155 #endif // V8_SNAPSHOT_DESERIALIZER_H_ 157 #endif // V8_SNAPSHOT_DESERIALIZER_H_
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/snapshot/deserializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698