[builtins] Add v8_enable_embedded_builtins gn flag
This flag will be used to toggle things for isolate-independent builtins during development. Bug: v8:6666 Change-Id: I8a97f08b3d677a01a2a55a4c6445e71e74471f51 Reviewed-on: https://chromium-review.googlesource.com/924067 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#51325}
This commit is contained in:
parent
8255eeb936
commit
b88db2588e
6
BUILD.gn
6
BUILD.gn
@ -64,6 +64,9 @@ declare_args() {
|
||||
# Enable fast mksnapshot runs.
|
||||
v8_enable_fast_mksnapshot = false
|
||||
|
||||
# Enable embedded builtins.
|
||||
v8_enable_embedded_builtins = false
|
||||
|
||||
# Enable code-generation-time checking of types in the CodeStubAssembler.
|
||||
v8_enable_verify_csa = false
|
||||
|
||||
@ -319,6 +322,9 @@ config("features") {
|
||||
if (v8_check_microtasks_scopes_consistency) {
|
||||
defines += [ "V8_CHECK_MICROTASKS_SCOPES_CONSISTENCY" ]
|
||||
}
|
||||
if (v8_enable_embedded_builtins) {
|
||||
defines += [ "V8_EMBEDDED_BUILTINS" ]
|
||||
}
|
||||
}
|
||||
|
||||
config("toolchain") {
|
||||
|
@ -1024,8 +1024,13 @@ DEFINE_INT(fuzzer_random_seed, 0,
|
||||
DEFINE_BOOL(trace_rail, false, "trace RAIL mode")
|
||||
DEFINE_BOOL(print_all_exceptions, false,
|
||||
"print exception object and stack trace on each thrown exception")
|
||||
#ifdef V8_EMBEDDED_BUILTINS
|
||||
DEFINE_BOOL(stress_off_heap_code, false,
|
||||
"Move code objects off-heap for testing.")
|
||||
#else
|
||||
FLAG_READONLY(BOOL, bool, stress_off_heap_code, false,
|
||||
"Move code objects off-heap for testing.")
|
||||
#endif
|
||||
|
||||
// runtime.cc
|
||||
DEFINE_BOOL(runtime_call_stats, false, "report runtime call counts and times")
|
||||
|
@ -2826,6 +2826,7 @@ void PrintBuiltinSizes(Isolate* isolate) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef V8_EMBEDDED_BUILTINS
|
||||
#ifdef DEBUG
|
||||
bool BuiltinAliasesOffHeapTrampolineRegister(Isolate* isolate,
|
||||
int builtin_index) {
|
||||
@ -2931,6 +2932,7 @@ void MoveBuiltinsOffHeap(Isolate* isolate) {
|
||||
isolate->PushOffHeapCode(stream);
|
||||
}
|
||||
}
|
||||
#endif // V8_EMBEDDED_BUILTINS
|
||||
} // namespace
|
||||
|
||||
bool Isolate::Init(StartupDeserializer* des) {
|
||||
@ -3079,12 +3081,14 @@ bool Isolate::Init(StartupDeserializer* des) {
|
||||
|
||||
if (FLAG_print_builtin_size) PrintBuiltinSizes(this);
|
||||
|
||||
#ifdef V8_EMBEDDED_BUILTINS
|
||||
if (FLAG_stress_off_heap_code && !serializer_enabled()) {
|
||||
// Artificially move code off-heap to help find & verify related code
|
||||
// paths. Lazy deserialization should be off to avoid confusion around
|
||||
// replacing just the kDeserializeLazy code object.
|
||||
MoveBuiltinsOffHeap(this);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Finish initialization of ThreadLocal after deserialization is done.
|
||||
clear_pending_exception();
|
||||
|
Loading…
Reference in New Issue
Block a user