Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v12.x] Backport update to V8 7.8 #30109

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
049edeb
deps: update V8 to 7.8.279.23
targos Dec 4, 2019
342fad2
build: reset embedder string to "-node.0"
targos Dec 4, 2019
a063d11
deps: V8: fix filename manipulation for Windows
refack Mar 31, 2019
5fb5578
deps: V8: un-cherry-pick bd019bd
refack Mar 27, 2019
1a5cbd3
deps: V8: silence irrelevant warning
targos Mar 27, 2019
05a5574
deps: V8: patch register-arm64.h
refack May 22, 2019
8630bfb
deps: V8: forward declaration of `Rtl*FunctionTable`
refack May 22, 2019
41d22e1
deps: V8: use ATOMIC_VAR_INIT instead of std::atomic_init
refack May 23, 2019
2719f09
deps: V8: add workaround for MSVC optimizer bug
refack May 17, 2019
88003f5
deps: V8: fix BUILDING_V8_SHARED issues
refack May 26, 2019
28a3845
deps: V8: fix linking issue for MSVS
refack May 30, 2019
9d22556
tools: update V8 gypfiles
targos Aug 19, 2019
584ea2c
assert: fix line number calculation after V8 upgrade
targos Aug 28, 2019
534875b
tools: patch V8 to run on older XCode versions
ryzokuken Sep 14, 2019
bc630ae
deps: V8: cherry-pick deac757
bcoe Sep 20, 2019
4e6791b
deps: V8: cherry-pick 35c6d4d
sam-github Sep 16, 2019
0648008
deps: V8: cherry-pick 716875d
MylesBorins Sep 25, 2019
aa215bf
deps: V8: cherry-pick ed40ab1
targos Oct 22, 2019
23d792a
deps: V8: cherry-pick e5dbc95
Oct 30, 2019
5d4d74e
deps: V8: cherry-pick 0a055086c377
targos Dec 6, 2019
15794c9
deps: V8: cherry-pick a7dffcd767be
cclauss Nov 3, 2019
003996d
deps: update V8's postmortem script
cjihrig Sep 27, 2019
6b04ae9
deps: patch V8 to be API/ABI compatible with 7.4 (from 7.5)
targos Jun 1, 2019
7305a2d
deps: patch V8 to be API/ABI compatible with 7.4 (from 7.6)
targos Aug 4, 2019
dbb2088
deps: patch V8 to be API/ABI compatible with 7.4 (from 7.7)
targos Aug 21, 2019
91567d3
deps,src: patch V8 to be API/ABI compatible with 7.4 (from 7.8)
addaleax Oct 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion common.gypi
Expand Up @@ -38,7 +38,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.16',
'v8_embedder_string': '-node.21',

##### V8 defaults for Node.js #####

Expand Down
2 changes: 2 additions & 0 deletions deps/v8/.gitignore
Expand Up @@ -52,6 +52,8 @@
/test/test262/data
/test/test262/harness
/test/wasm-js/data
/test/wasm-js/tests
/test/wasm-js/tests.tar.gz
/test/wasm-spec-tests/tests
/test/wasm-spec-tests/tests.tar.gz
/third_party/*
Expand Down
3 changes: 2 additions & 1 deletion deps/v8/.gn
Expand Up @@ -16,4 +16,5 @@ check_targets = []
# These are the list of GN files that run exec_script. This whitelist exists
# to force additional review for new uses of exec_script, which is strongly
# discouraged except for gypi_to_gn calls.
exec_script_whitelist = build_dotfile_settings.exec_script_whitelist + []
exec_script_whitelist = build_dotfile_settings.exec_script_whitelist +
[ "//build_overrides/build.gni" ]
3 changes: 3 additions & 0 deletions deps/v8/AUTHORS
Expand Up @@ -39,6 +39,7 @@ Vewd Software AS <*@vewd.com>
Groupon <*@groupon.com>
Meteor Development Group <*@meteor.com>
Cloudflare, Inc. <*@cloudflare.com>
Julia Computing, Inc. <*@juliacomputing.com>

Aaron Bieber <deftly@gmail.com>
Abdulla Kamar <abdulla.kamar@gmail.com>
Expand Down Expand Up @@ -74,6 +75,7 @@ Colin Ihrig <cjihrig@gmail.com>
Daniel Andersson <kodandersson@gmail.com>
Daniel Bevenius <daniel.bevenius@gmail.com>
Daniel James <dnljms@gmail.com>
David Carlier <devnexen@gmail.com>
Deepak Mohan <hop2deep@gmail.com>
Deon Dior <diaoyuanjie@gmail.com>
Dominic Farolini <domfarolino@gmail.com>
Expand Down Expand Up @@ -163,6 +165,7 @@ Rob Wu <rob@robwu.nl>
Robert Meijer <robert.s.meijer@gmail.com>
Robert Mustacchi <rm@fingolfin.org>
Robert Nagy <robert.nagy@gmail.com>
Rong Wang <wangrong089@gmail.com>
Ross Kirsling <rkirsling@gmail.com>
Ruben Bridgewater <ruben@bridgewater.de>
Ryan Dahl <ry@tinyclouds.org>
Expand Down
75 changes: 61 additions & 14 deletions deps/v8/BUILD.gn
Expand Up @@ -91,7 +91,7 @@ declare_args() {
# Enable embedded builtins.
v8_enable_embedded_builtins = true

# Enable the registration of unwinding info for Windows/x64.
# Enable the registration of unwinding info for Windows x64 and ARM64.
v8_win64_unwinding_info = true

# Enable code comments for builtins in the snapshot (impacts performance).
Expand Down Expand Up @@ -187,15 +187,21 @@ declare_args() {
# Enable sharing read-only space across isolates.
# Sets -DV8_SHARED_RO_HEAP.
v8_enable_shared_ro_heap = ""
}

# We reuse the snapshot toolchain for building torque and other generators to
# avoid building v8_libbase on the host more than once. On mips with big endian,
# the snapshot toolchain is the target toolchain and, hence, can't be used.
v8_generator_toolchain = v8_snapshot_toolchain
if (host_cpu == "x64" &&
(v8_current_cpu == "mips" || v8_current_cpu == "mips64")) {
v8_generator_toolchain = "//build/toolchain/linux:clang_x64"
# Enable lazy source positions by default.
v8_enable_lazy_source_positions = true

# Disable write barriers when GCs are non-incremental and
# heap has single generation.
v8_disable_write_barriers = false

# Redirect allocation in young generation so that there will be
# only one single generation.
v8_enable_single_generation = ""

# Use token threaded dispatch for the regular expression interpreter.
# Use switch-based dispatch if this is false
v8_enable_regexp_interpreter_threaded_dispatch = true
}

# Derived defaults.
Expand Down Expand Up @@ -231,6 +237,13 @@ if (v8_enable_fast_torque == "") {
v8_enable_fast_torque = v8_enable_fast_mksnapshot
}

if (v8_enable_single_generation == "") {
v8_enable_single_generation = v8_disable_write_barriers
}

assert(!v8_disable_write_barriers || v8_enable_single_generation,
"Disabling write barriers works only with single generation")

assert(v8_current_cpu != "x86" || !v8_untrusted_code_mitigations,
"Untrusted code mitigations are unsupported on ia32")

Expand Down Expand Up @@ -424,12 +437,21 @@ config("features") {
defines += [ "V8_SNAPSHOT_NATIVE_CODE_COUNTERS" ]
}
}
if (v8_enable_single_generation) {
defines += [ "V8_ENABLE_SINGLE_GENERATION" ]
}
if (v8_disable_write_barriers) {
defines += [ "V8_DISABLE_WRITE_BARRIERS" ]
}
if (v8_use_external_startup_data) {
defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
}
if (v8_enable_concurrent_marking) {
defines += [ "V8_CONCURRENT_MARKING" ]
}
if (v8_enable_lazy_source_positions) {
defines += [ "V8_ENABLE_LAZY_SOURCE_POSITIONS" ]
}
if (v8_check_microtasks_scopes_consistency) {
defines += [ "V8_CHECK_MICROTASKS_SCOPES_CONSISTENCY" ]
}
Expand All @@ -451,6 +473,9 @@ config("features") {
if (v8_win64_unwinding_info) {
defines += [ "V8_WIN64_UNWINDING_INFO" ]
}
if (v8_enable_regexp_interpreter_threaded_dispatch) {
defines += [ "V8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH" ]
}
}

config("toolchain") {
Expand Down Expand Up @@ -968,16 +993,21 @@ torque_files = [
"src/builtins/proxy-set-prototype-of.tq",
"src/builtins/proxy.tq",
"src/builtins/reflect.tq",
"src/builtins/regexp-match.tq",
"src/builtins/regexp-replace.tq",
"src/builtins/regexp-source.tq",
"src/builtins/regexp-test.tq",
"src/builtins/regexp.tq",
"src/builtins/string.tq",
"src/builtins/string-endswith.tq",
"src/builtins/string-html.tq",
"src/builtins/string-iterator.tq",
"src/builtins/string-pad.tq",
"src/builtins/string-repeat.tq",
"src/builtins/string-slice.tq",
"src/builtins/string-startswith.tq",
"src/builtins/string-substring.tq",
"src/builtins/torque-internal.tq",
"src/builtins/typed-array-createtypedarray.tq",
"src/builtins/typed-array-every.tq",
"src/builtins/typed-array-filter.tq",
Expand All @@ -1002,6 +1032,7 @@ if (!v8_enable_i18n_support) {
action("run_torque") {
visibility = [
":*",
"tools/debug_helper/:*",
"tools/gcmole/:*",
"test/cctest/:*",
]
Expand All @@ -1023,6 +1054,8 @@ action("run_torque") {
"$target_gen_dir/torque-generated/class-definitions-tq.cc",
"$target_gen_dir/torque-generated/class-definitions-tq-inl.h",
"$target_gen_dir/torque-generated/class-definitions-tq.h",
"$target_gen_dir/torque-generated/class-debug-readers-tq.cc",
"$target_gen_dir/torque-generated/class-debug-readers-tq.h",
"$target_gen_dir/torque-generated/exported-macros-assembler-tq.cc",
"$target_gen_dir/torque-generated/exported-macros-assembler-tq.h",
"$target_gen_dir/torque-generated/csa-types-tq.h",
Expand Down Expand Up @@ -1752,6 +1785,8 @@ v8_compiler_sources = [
"src/compiler/escape-analysis-reducer.h",
"src/compiler/escape-analysis.cc",
"src/compiler/escape-analysis.h",
"src/compiler/feedback-source.cc",
"src/compiler/feedback-source.h",
"src/compiler/frame-states.cc",
"src/compiler/frame-states.h",
"src/compiler/frame.cc",
Expand Down Expand Up @@ -1892,8 +1927,6 @@ v8_compiler_sources = [
"src/compiler/types.h",
"src/compiler/value-numbering-reducer.cc",
"src/compiler/value-numbering-reducer.h",
"src/compiler/vector-slot-pair.cc",
"src/compiler/vector-slot-pair.h",
"src/compiler/verifier.cc",
"src/compiler/verifier.h",
"src/compiler/wasm-compiler.cc",
Expand Down Expand Up @@ -2031,7 +2064,6 @@ v8_source_set("v8_base_without_compiler") {
"src/builtins/builtins-internal.cc",
"src/builtins/builtins-intl.cc",
"src/builtins/builtins-json.cc",
"src/builtins/builtins-math.cc",
"src/builtins/builtins-number.cc",
"src/builtins/builtins-object.cc",
"src/builtins/builtins-promise.cc",
Expand Down Expand Up @@ -2095,6 +2127,7 @@ v8_source_set("v8_base_without_compiler") {
"src/codegen/register-arch.h",
"src/codegen/register-configuration.cc",
"src/codegen/register-configuration.h",
"src/codegen/register.cc",
"src/codegen/register.h",
"src/codegen/reglist.h",
"src/codegen/reloc-info.cc",
Expand All @@ -2117,6 +2150,7 @@ v8_source_set("v8_base_without_compiler") {
"src/common/assert-scope.cc",
"src/common/assert-scope.h",
"src/common/checks.h",
"src/common/message-template.h",
"src/common/ptr-compr-inl.h",
"src/common/ptr-compr.h",
"src/compiler-dispatcher/compiler-dispatcher.cc",
Expand Down Expand Up @@ -2189,11 +2223,13 @@ v8_source_set("v8_base_without_compiler") {
"src/execution/isolate-utils.h",
"src/execution/isolate.cc",
"src/execution/isolate.h",
"src/execution/message-template.h",
"src/execution/messages.cc",
"src/execution/messages.h",
"src/execution/microtask-queue.cc",
"src/execution/microtask-queue.h",
"src/execution/protectors-inl.h",
"src/execution/protectors.cc",
"src/execution/protectors.h",
"src/execution/runtime-profiler.cc",
"src/execution/runtime-profiler.h",
"src/execution/simulator-base.cc",
Expand Down Expand Up @@ -2758,7 +2794,6 @@ v8_source_set("v8_base_without_compiler") {
"src/runtime/runtime-typedarray.cc",
"src/runtime/runtime-utils.h",
"src/runtime/runtime-wasm.cc",
"src/runtime/runtime-weak-refs.cc",
"src/runtime/runtime.cc",
"src/runtime/runtime.h",
"src/sanitizer/asan.h",
Expand Down Expand Up @@ -2922,6 +2957,8 @@ v8_source_set("v8_base_without_compiler") {
"src/wasm/wasm-memory.h",
"src/wasm/wasm-module-builder.cc",
"src/wasm/wasm-module-builder.h",
"src/wasm/wasm-module-sourcemap.cc",
"src/wasm/wasm-module-sourcemap.h",
"src/wasm/wasm-module.cc",
"src/wasm/wasm-module.h",
"src/wasm/wasm-objects-inl.h",
Expand Down Expand Up @@ -3109,13 +3146,20 @@ v8_source_set("v8_base_without_compiler") {
"src/diagnostics/arm64/eh-frame-arm64.cc",
"src/execution/arm64/frame-constants-arm64.cc",
"src/execution/arm64/frame-constants-arm64.h",
"src/execution/arm64/pointer-auth-arm64.cc",
"src/execution/arm64/simulator-arm64.cc",
"src/execution/arm64/simulator-arm64.h",
"src/execution/arm64/simulator-logic-arm64.cc",
"src/regexp/arm64/regexp-macro-assembler-arm64.cc",
"src/regexp/arm64/regexp-macro-assembler-arm64.h",
"src/wasm/baseline/arm64/liftoff-assembler-arm64.h",
]
if (is_win) {
sources += [
"src/diagnostics/unwinding-info-win64.cc",
"src/diagnostics/unwinding-info-win64.h",
]
}
jumbo_excluded_sources += [
# TODO(mostynb@vewd.com): fix this code so it doesn't need
# to be excluded, see the comments inside.
Expand Down Expand Up @@ -3325,6 +3369,7 @@ v8_source_set("torque_base") {
"src/torque/ast.h",
"src/torque/cfg.cc",
"src/torque/cfg.h",
"src/torque/class-debug-reader-generator.cc",
"src/torque/constants.h",
"src/torque/contextual.h",
"src/torque/csa-generator.cc",
Expand All @@ -3351,6 +3396,8 @@ v8_source_set("torque_base") {
"src/torque/torque-compiler.h",
"src/torque/torque-parser.cc",
"src/torque/torque-parser.h",
"src/torque/type-inference.cc",
"src/torque/type-inference.h",
"src/torque/type-oracle.cc",
"src/torque/type-oracle.h",
"src/torque/type-visitor.cc",
Expand Down