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

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

Issue 2090563002: [serializer] encode recent long-encoded root list items as hot objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: address comments Created 4 years, 5 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/partial-serializer.cc ('k') | src/snapshot/serializer.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_SERIALIZER_H_ 5 #ifndef V8_SNAPSHOT_SERIALIZER_H_
6 #define V8_SNAPSHOT_SERIALIZER_H_ 6 #define V8_SNAPSHOT_SERIALIZER_H_
7 7
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "src/log.h" 9 #include "src/log.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 void PutSmi(Smi* smi); 164 void PutSmi(Smi* smi);
165 165
166 void PutBackReference(HeapObject* object, SerializerReference reference); 166 void PutBackReference(HeapObject* object, SerializerReference reference);
167 167
168 void PutAttachedReference(SerializerReference reference, 168 void PutAttachedReference(SerializerReference reference,
169 HowToCode how_to_code, WhereToPoint where_to_point); 169 HowToCode how_to_code, WhereToPoint where_to_point);
170 170
171 // Emit alignment prefix if necessary, return required padding space in bytes. 171 // Emit alignment prefix if necessary, return required padding space in bytes.
172 int PutAlignmentPrefix(HeapObject* object); 172 int PutAlignmentPrefix(HeapObject* object);
173 173
174 // Returns true if the object was successfully serialized. 174 // Returns true if the object was successfully serialized as hot object.
175 bool SerializeKnownObject(HeapObject* obj, HowToCode how_to_code, 175 bool SerializeHotObject(HeapObject* obj, HowToCode how_to_code,
176 WhereToPoint where_to_point, int skip); 176 WhereToPoint where_to_point, int skip);
177
178 // Returns true if the object was successfully serialized as back reference.
179 bool SerializeBackReference(HeapObject* obj, HowToCode how_to_code,
180 WhereToPoint where_to_point, int skip);
177 181
178 inline void FlushSkip(int skip) { 182 inline void FlushSkip(int skip) {
179 if (skip != 0) { 183 if (skip != 0) {
180 sink_.Put(kSkip, "SkipFromSerializeObject"); 184 sink_.Put(kSkip, "SkipFromSerializeObject");
181 sink_.PutInt(skip, "SkipDistanceFromSerializeObject"); 185 sink_.PutInt(skip, "SkipDistanceFromSerializeObject");
182 } 186 }
183 } 187 }
184 188
185 bool BackReferenceIsAlreadyAllocated(SerializerReference back_reference); 189 bool BackReferenceIsAlreadyAllocated(SerializerReference back_reference);
186 190
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 SnapshotByteSink* sink_; 320 SnapshotByteSink* sink_;
317 int reference_representation_; 321 int reference_representation_;
318 int bytes_processed_so_far_; 322 int bytes_processed_so_far_;
319 bool code_has_been_output_; 323 bool code_has_been_output_;
320 }; 324 };
321 325
322 } // namespace internal 326 } // namespace internal
323 } // namespace v8 327 } // namespace v8
324 328
325 #endif // V8_SNAPSHOT_SERIALIZER_H_ 329 #endif // V8_SNAPSHOT_SERIALIZER_H_
OLDNEW
« no previous file with comments | « src/snapshot/partial-serializer.cc ('k') | src/snapshot/serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698