summaryrefslogtreecommitdiff
path: root/deps/v8/src/init/setup-isolate.h
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2019-08-01 08:38:30 +0200
committerMichaël Zasso <targos@protonmail.com>2019-08-01 12:53:56 +0200
commit2dcc3665abf57c3607cebffdeeca062f5894885d (patch)
tree4f560748132edcfb4c22d6f967a7e80d23d7ea2c /deps/v8/src/init/setup-isolate.h
parent1ee47d550c6de132f06110aa13eceb7551d643b3 (diff)
downloadandroid-node-v8-2dcc3665abf57c3607cebffdeeca062f5894885d.tar.gz
android-node-v8-2dcc3665abf57c3607cebffdeeca062f5894885d.tar.bz2
android-node-v8-2dcc3665abf57c3607cebffdeeca062f5894885d.zip
deps: update V8 to 7.6.303.28
PR-URL: https://github.com/nodejs/node/pull/28016 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'deps/v8/src/init/setup-isolate.h')
-rw-r--r--deps/v8/src/init/setup-isolate.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/deps/v8/src/init/setup-isolate.h b/deps/v8/src/init/setup-isolate.h
new file mode 100644
index 0000000000..1ae9b8d236
--- /dev/null
+++ b/deps/v8/src/init/setup-isolate.h
@@ -0,0 +1,59 @@
+// 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.
+
+#ifndef V8_INIT_SETUP_ISOLATE_H_
+#define V8_INIT_SETUP_ISOLATE_H_
+
+#include "src/base/macros.h"
+
+namespace v8 {
+namespace internal {
+
+class Builtins;
+class Code;
+class Heap;
+class Isolate;
+
+namespace interpreter {
+class Interpreter;
+} // namespace interpreter
+
+// This class is an abstraction layer around initialization of components
+// that are either deserialized from the snapshot or generated from scratch.
+// Currently this includes builtins and interpreter bytecode handlers.
+// There are two implementations to choose from at link time:
+// - setup-isolate-deserialize.cc: always loads things from snapshot.
+// - setup-isolate-full.cc: loads from snapshot or bootstraps from scratch,
+// controlled by the |create_heap_objects| flag.
+// For testing, the implementation in setup-isolate-for-tests.cc can be chosen
+// to force the behavior of setup-isolate-full.cc at runtime.
+//
+// The actual implementations of generation of builtins and handlers is in
+// setup-builtins-internal.cc and setup-interpreter-internal.cc, and is
+// linked in by the latter two Delegate implementations.
+class V8_EXPORT_PRIVATE SetupIsolateDelegate {
+ public:
+ explicit SetupIsolateDelegate(bool create_heap_objects)
+ : create_heap_objects_(create_heap_objects) {}
+ virtual ~SetupIsolateDelegate() = default;
+
+ virtual void SetupBuiltins(Isolate* isolate);
+
+ virtual bool SetupHeap(Heap* heap);
+
+ protected:
+ static void SetupBuiltinsInternal(Isolate* isolate);
+ static void AddBuiltin(Builtins* builtins, int index, Code code);
+ static void PopulateWithPlaceholders(Isolate* isolate);
+ static void ReplacePlaceholders(Isolate* isolate);
+
+ static bool SetupHeapInternal(Heap* heap);
+
+ const bool create_heap_objects_;
+};
+
+} // namespace internal
+} // namespace v8
+
+#endif // V8_INIT_SETUP_ISOLATE_H_