v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
setup-isolate.h
Go to the documentation of this file.
1
// Copyright 2017 the V8 project authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef V8_INIT_SETUP_ISOLATE_H_
6
#define V8_INIT_SETUP_ISOLATE_H_
7
8
#include "
src/base/macros.h
"
9
10
namespace
v8
{
11
namespace
internal
{
12
13
class
Builtins;
14
enum class
Builtin
:
int32_t
;
15
template
<
typename
T>
16
class
Tagged
;
17
class
Code
;
18
class
Heap;
19
class
Isolate;
20
21
// This class is an abstraction layer around initialization of components
22
// that are either deserialized from the snapshot or generated from scratch.
23
// Currently this includes builtins and interpreter bytecode handlers.
24
// There are two implementations to choose from at link time:
25
// - setup-isolate-deserialize.cc: always loads things from snapshot.
26
// - setup-isolate-full.cc: loads from snapshot or bootstraps from scratch,
27
// controlled by the |create_heap_objects| flag.
28
// For testing, the implementation in setup-isolate-for-tests.cc can be chosen
29
// to force the behavior of setup-isolate-full.cc at runtime.
30
//
31
// The actual implementations of generation of builtins and handlers is in
32
// setup-builtins-internal.cc and setup-interpreter-internal.cc, and is
33
// linked in by the latter two Delegate implementations.
34
class
V8_EXPORT_PRIVATE
SetupIsolateDelegate
{
35
public
:
36
SetupIsolateDelegate
() =
default
;
37
virtual
~SetupIsolateDelegate
() =
default
;
38
39
virtual
bool
SetupHeap(
Isolate
* isolate,
bool
create_heap_objects);
40
virtual
void
SetupBuiltins(
Isolate
* isolate,
bool
compile_builtins);
41
42
protected
:
43
static
void
SetupBuiltinsInternal(
Isolate
* isolate);
44
static
void
AddBuiltin(
Builtins
* builtins,
Builtin
builtin,
45
Tagged<Code>
code);
46
static
void
PopulateWithPlaceholders(
Isolate
* isolate);
47
static
void
ReplacePlaceholders(
Isolate
* isolate);
48
49
static
bool
SetupHeapInternal(
Isolate
* isolate);
50
};
51
52
}
// namespace internal
53
}
// namespace v8
54
55
#endif
// V8_INIT_SETUP_ISOLATE_H_
v8::internal::Builtins
Definition
builtins.h:85
v8::internal::Isolate
Definition
isolate.h:586
v8::internal::SetupIsolateDelegate
Definition
setup-isolate.h:34
v8::internal::SetupIsolateDelegate::SetupIsolateDelegate
SetupIsolateDelegate()=default
v8::internal::SetupIsolateDelegate::~SetupIsolateDelegate
virtual ~SetupIsolateDelegate()=default
v8::internal::Tagged
Definition
waiter-queue-node.h:21
unibrow::int32_t
int int32_t
Definition
unicode.cc:40
v8::internal::Code
Code
Definition
shared-function-info-inl.h:111
v8::internal::Tagged
Tagged(T object) -> Tagged< T >
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8::internal::Builtin
Builtin
Definition
builtins.h:48
v8
Definition
api-arguments-inl.h:19
macros.h
V8_EXPORT_PRIVATE
#define V8_EXPORT_PRIVATE
Definition
macros.h:460
src
init
setup-isolate.h
Generated on Sun Apr 6 2025 21:08:54 for v8 by
1.12.0