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

Unified Diff: src/builtins/setup-builtins.h

Issue 2760233005: [snapshot] Move builtins generation into mksnapshot (Closed)
Patch Set: Created 3 years, 9 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/builtins/setup-builtins.h
diff --git a/src/builtins/setup-builtins.h b/src/builtins/setup-builtins.h
new file mode 100644
index 0000000000000000000000000000000000000000..885a5cf7e2196bddcf29cdd492d51b152e9cb940
--- /dev/null
+++ b/src/builtins/setup-builtins.h
@@ -0,0 +1,33 @@
+// Copyright 2017 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.
+
+namespace v8 {
+namespace internal {
+
+class Builtins;
+class Code;
+class Isolate;
+
+// This class is an abstraction layer around generation of compiled builtins.
+// There are three implementations to choose from (at link time):
+// - setup-builtins-deserialize.cc: always loads builtins from snapshot.
+// - setup-builtins-full.cc: always generates builtins.
+// - setup-builtins-for-tests.cc: does the one or the other, controlled by
+// the |create_heap_objects| flag.
+// The actual implementation of builtins generation is in
+// setup-builtins-internal.cc, and is linked in by the latter two.
+class SetupBuiltinsDelegate {
+ public:
+ SetupBuiltinsDelegate() {}
+ virtual ~SetupBuiltinsDelegate() {}
+
+ virtual void SetupBuiltins(Isolate* isolate, bool create_heap_objects);
+
+ protected:
+ static void SetupBuiltinsInternal(Isolate* isolate);
+ static void AddBuiltin(Builtins* builtins, int index, Code* code);
+};
+
+} // namespace internal
+} // namespace v8

Powered by Google App Engine
This is Rietveld 408576698