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

Unified Diff: src/snapshot/startup-serializer.h

Issue 1751863002: [serializer] split up src/snapshot/serialize.* (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 10 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
Index: src/snapshot/startup-serializer.h
diff --git a/src/snapshot/startup-serializer.h b/src/snapshot/startup-serializer.h
new file mode 100644
index 0000000000000000000000000000000000000000..1328b633afe9fd34044d838f6cf5a2db799f6b73
--- /dev/null
+++ b/src/snapshot/startup-serializer.h
@@ -0,0 +1,41 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_SNAPSHOT_STARTUP_SERIALIZER_H_
+#define V8_SNAPSHOT_STARTUP_SERIALIZER_H_
+
+#include "src/snapshot/serializer.h"
+
+namespace v8 {
+namespace internal {
+
+class StartupSerializer : public Serializer {
+ public:
+ StartupSerializer(Isolate* isolate, SnapshotByteSink* sink);
+ ~StartupSerializer() override;
+
+ // Serialize the current state of the heap. The order is:
+ // 1) Strong references.
+ // 2) Partial snapshot cache.
+ // 3) Weak references (e.g. the string table).
+ void SerializeStrongReferences();
+ void SerializeWeakReferencesAndDeferred();
+
+ private:
+ // The StartupSerializer has to serialize the root array, which is slightly
+ // different.
+ void VisitPointers(Object** start, Object** end) override;
+ void SerializeObject(HeapObject* o, HowToCode how_to_code,
+ WhereToPoint where_to_point, int skip) override;
+ void Synchronize(VisitorSynchronization::SyncTag tag) override;
+
+ intptr_t root_index_wave_front_;
+ bool serializing_builtins_;
+ DISALLOW_COPY_AND_ASSIGN(StartupSerializer);
+};
+
+} // namespace internal
+} // namespace v8
+
+#endif // V8_SNAPSHOT_STARTUP_SERIALIZER_H_

Powered by Google App Engine
This is Rietveld 408576698