[BUILD] GN flag to disable arguments adaptor frame

Change-Id: I0840a8fb34e8ef068580ad74e40e87c0bb56c1af
Bug: v8:10201
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2400278
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69768}
This commit is contained in:
Victor Gomes 2020-09-09 11:23:12 +02:00 committed by Commit Bot
parent b7b3abe83a
commit a49a9710db

View File

@ -109,6 +109,9 @@ declare_args() {
v8_enable_pointer_compression = ""
v8_enable_31bit_smis_on_64bit_arch = false
# Disable arguments adaptor frame (sets -dV8_NO_ARGUMENTS_ADAPTOR).
v8_disable_arguments_adaptor = false
# Reverse JS arguments order in the stack (sets -dV8_REVERSE_JSARGS).
v8_enable_reverse_jsargs =
v8_current_cpu != "mipsel" && v8_current_cpu != "mips64el"
@ -353,6 +356,10 @@ assert(
assert(!v8_enable_heap_sandbox || v8_enable_pointer_compression,
"V8 Heap Sandbox requires pointer compression")
assert(
!v8_disable_arguments_adaptor || v8_enable_reverse_jsargs,
"Disabling the arguments adaptor frame requires reversing the JS arguments stack")
assert(!v8_enable_unconditional_write_barriers || !v8_disable_write_barriers,
"Write barriers can't be both enabled and disabled")
@ -508,6 +515,9 @@ config("v8_header_features") {
if (v8_imminent_deprecation_warnings) {
defines += [ "V8_IMMINENT_DEPRECATION_WARNINGS" ]
}
if (v8_disable_arguments_adaptor) {
defines += [ "V8_NO_ARGUMENTS_ADAPTOR" ]
}
if (v8_enable_reverse_jsargs) {
defines += [ "V8_REVERSE_JSARGS" ]
}