Add a global v8_enable_allocation_folding build-time flag
When this flag is enabled, allocation folding behaviour depends on the --turbo-allocation-folding runtime flag. When it's disabled, --turbo-allocation-folding is ignored. This flag will be used later to control the CodeStubAssembler::InlineAllocate behaviour. Change-Id: Iea7bbafd8454571dda7d56349b3dc63d3b54ba99 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2878754 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Wenyu Zhao <wenyu.zhao@anu.edu.au> Cr-Commit-Position: refs/heads/master@{#74858}
This commit is contained in:
parent
7261bf01d7
commit
687ba03193
7
BUILD.gn
7
BUILD.gn
@ -318,6 +318,10 @@ declare_args() {
|
||||
|
||||
# Allow for JS promise hooks (instead of just C++).
|
||||
v8_allow_javascript_in_promise_hooks = false
|
||||
|
||||
# Enable allocation folding globally (sets -dV8_ALLOCATION_FOLDING).
|
||||
# When it's disabled, the --turbo-allocation-folding runtime flag will be ignored.
|
||||
v8_enable_allocation_folding = true
|
||||
}
|
||||
|
||||
# Derived defaults.
|
||||
@ -868,6 +872,9 @@ config("features") {
|
||||
if (v8_allow_javascript_in_promise_hooks) {
|
||||
defines += [ "V8_ALLOW_JAVASCRIPT_IN_PROMISE_HOOKS" ]
|
||||
}
|
||||
if (v8_enable_allocation_folding) {
|
||||
defines += [ "V8_ALLOCATION_FOLDING" ]
|
||||
}
|
||||
}
|
||||
|
||||
config("toolchain") {
|
||||
|
@ -418,6 +418,16 @@ DEFINE_NEG_IMPLICATION(enable_third_party_heap, concurrent_marking)
|
||||
DEFINE_BOOL_READONLY(enable_third_party_heap, V8_ENABLE_THIRD_PARTY_HEAP_BOOL,
|
||||
"Use third-party heap")
|
||||
|
||||
#ifdef V8_ALLOCATION_FOLDING
|
||||
#define V8_ALLOCATION_FOLDING_BOOL true
|
||||
#else
|
||||
#define V8_ALLOCATION_FOLDING_BOOL false
|
||||
#endif
|
||||
|
||||
DEFINE_BOOL_READONLY(enable_allocation_folding, V8_ALLOCATION_FOLDING_BOOL,
|
||||
"Use allocation folding globally")
|
||||
DEFINE_NEG_NEG_IMPLICATION(enable_allocation_folding, turbo_allocation_folding)
|
||||
|
||||
#ifdef V8_DISABLE_WRITE_BARRIERS
|
||||
#define V8_DISABLE_WRITE_BARRIERS_BOOL true
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user