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

Unified Diff: runtime/bin/snapshot.h

Issue 2681193002: Factor out snapshot helpers from main.cc. (Closed)
Patch Set: . Created 3 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: runtime/bin/snapshot.h
diff --git a/runtime/bin/snapshot.h b/runtime/bin/snapshot.h
new file mode 100644
index 0000000000000000000000000000000000000000..4ad66810c2db218b8d784e2e7504c3ca8b381438
--- /dev/null
+++ b/runtime/bin/snapshot.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef RUNTIME_BIN_SNAPSHOT_H_
+#define RUNTIME_BIN_SNAPSHOT_H_
+
+#include "platform/globals.h"
+
+namespace dart {
+namespace bin {
+
+class Snapshot {
+ public:
+ static void GenerateScript(const char* snapshot_filename);
+ static void GenerateAppJIT(const char* snapshot_filename);
+ static void GenerateAppAOTAsBlobs(const char* snapshot_filename);
+ static void GenerateAppAOTAsAssembly(const char* snapshot_filename);
+
+ static bool ReadAppSnapshot(const char* script_name,
+ const uint8_t** vm_data_buffer,
+ const uint8_t** vm_instructions_buffer,
+ const uint8_t** isolate_data_buffer,
+ const uint8_t** isolate_instructions_buffer);
+};
zra 2017/02/09 16:15:38 DISALLOW_ALLOCATION() DISALLOW_IMPLICIT_CONSTRUCTO
rmacnak 2017/02/10 02:11:56 Done.
+
+} // namespace bin
+} // namespace dart
+
+#endif // RUNTIME_BIN_SNAPSHOT_H_

Powered by Google App Engine
This is Rietveld 408576698