Skip to content

Commit

Permalink
deps: update V8 to 10.2.154.2
Browse files Browse the repository at this point in the history
PR-URL: #42740
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
targos committed Apr 21, 2022
1 parent 0d58c0b commit 6bbc559
Show file tree
Hide file tree
Showing 882 changed files with 29,302 additions and 15,793 deletions.
8 changes: 5 additions & 3 deletions deps/v8/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Meteor Development Group <*@meteor.com>
Cloudflare, Inc. <*@cloudflare.com>
Julia Computing, Inc. <*@juliacomputing.com>
CodeWeavers, Inc. <*@codeweavers.com>
Alibaba, Inc. <*@alibaba-inc.com>

Aaron Bieber <[email protected]>
Aaron O'Mullan <[email protected]>
Expand Down Expand Up @@ -90,9 +91,11 @@ Daniel Bevenius <[email protected]>
Daniel Dromboski <[email protected]>
Daniel James <[email protected]>
Daniel Shelton <[email protected]>
Danylo Boiko <[email protected]>
Darshan Sen <[email protected]>
David Carlier <[email protected]>
David Manouchehri <[email protected]>
David Sanders <[email protected]>
Deepak Mohan <[email protected]>
Deon Dior <[email protected]>
Derek Tu <[email protected]>
Expand All @@ -115,6 +118,7 @@ Gus Caplan <[email protected]>
Gwang Yoon Hwang <[email protected]>
Haichuan Wang <[email protected]>
Hannu Trey <[email protected]>
Harshal Nandigramwar <[email protected]>
Harshil Jain <[email protected]>
Henrique Ferreiro <[email protected]>
Hirofumi Mako <[email protected]>
Expand All @@ -135,7 +139,6 @@ Javad Amiri <[email protected]>
Jay Freeman <[email protected]>
Jesper van den Ende <[email protected]>
Ji Qiu <[email protected]>
Jianghua Yang <[email protected]>
Jiawen Geng <[email protected]>
Jiaxun Yang <[email protected]>
Joel Stanley <[email protected]>
Expand Down Expand Up @@ -198,8 +201,6 @@ Peter Rybin <[email protected]>
Peter Varga <[email protected]>
Peter Wong <[email protected]>
PhistucK <[email protected]>
Qingyan Li <[email protected]>
Qiuyi Zhang <[email protected]>
Rafal Krypa <[email protected]>
Raul Tambre <[email protected]>
Ray Glover <[email protected]>
Expand Down Expand Up @@ -248,6 +249,7 @@ Vladimir Shutoff <[email protected]>
Wael Almattar <[email protected]>
Wei Wu <[email protected]>
Wenlu Wang <[email protected]>
Wenming Yang <[email protected]>
Wenyu Zhao <[email protected]>
Wiktor Garbacz <[email protected]>
Wouter Vermeiren <[email protected]>
Expand Down
74 changes: 70 additions & 4 deletions deps/v8/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression
# v8_enable_builtins_profiling
# v8_enable_builtins_profiling_verbose
# v8_builtins_profiling_log_file
# v8_enable_short_builtin_calls
# v8_enable_external_code_space
# v8_postmortem_support
# v8_use_siphash
Expand Down Expand Up @@ -231,6 +230,62 @@ selects.config_setting_group(
],
)

# We use a string flag to create a 3 value-logic.
# If no explicit value for v8_enable_short_builtin_calls, we set it to 'none'.
v8_string(
name = "v8_enable_short_builtin_calls",
default = "none",
)

# Default setting for v8_enable_pointer_compression.
config_setting(
name = "v8_enable_short_builtin_calls_is_none",
flag_values = {
":v8_enable_short_builtin_calls": "none",
},
)

# Explicity defined v8_enable_pointer_compression.
config_setting(
name = "v8_enable_short_builtin_calls_is_true",
flag_values = {
":v8_enable_short_builtin_calls": "True",
},
)

# Default setting for v8_enable_short_builtin_calls when target is x64.
# Disable short calls when pointer compression is not enabled.
selects.config_setting_group(
name = "v8_target_x64_default_short_builtin_calls",
match_all = [
":v8_enable_short_builtin_calls_is_none",
"@v8//bazel/config:v8_target_x64",
":is_v8_enable_pointer_compression",
],
)

# Default setting for v8_enable_short_builtin_calls when target is arm64, but not Android.
selects.config_setting_group(
name = "v8_target_arm64_default_short_builtin_calls",
match_all = [
":v8_enable_short_builtin_calls_is_none",
"@v8//bazel/config:v8_target_arm64",
"@v8//bazel/config:is_not_android",
],
)

# v8_enable_short_builtin_calls is valid whenever it is explicitly defined
# or we have the default settings for targets x64 and arm64.
# TODO(victorgomes): v8_enable_short_builtin_calls should not be enabled when CFI is enabled.
selects.config_setting_group(
name = "is_v8_enable_short_builtin_calls",
match_any = [
":v8_enable_short_builtin_calls_is_true",
":v8_target_x64_default_short_builtin_calls",
":v8_target_arm64_default_short_builtin_calls",
],
)

# Enable -rdynamic.
selects.config_setting_group(
name = "should_add_rdynamic",
Expand Down Expand Up @@ -339,6 +394,11 @@ v8_config(
"V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE",
],
"//conditions:default": [],
}) + select({
":is_v8_enable_short_builtin_calls": [
"V8_SHORT_BUILTIN_CALLS",
],
"//conditions:default": [],
}) + select({
":is_v8_enable_test_features": [
"V8_ENABLE_ALLOCATION_TIMEOUT",
Expand Down Expand Up @@ -606,7 +666,6 @@ filegroup(
"src/base/template-utils.h",
"src/base/timezone-cache.h",
"src/base/threaded-list.h",
"src/base/type-traits.h",
"src/base/utils/random-number-generator.cc",
"src/base/utils/random-number-generator.h",
"src/base/vector.h",
Expand Down Expand Up @@ -1305,7 +1364,6 @@ filegroup(
"src/heap/allocation-stats.h",
"src/heap/array-buffer-sweeper.cc",
"src/heap/array-buffer-sweeper.h",
"src/heap/barrier.h",
"src/heap/base-space.cc",
"src/heap/base-space.h",
"src/heap/basic-memory-chunk.cc",
Expand All @@ -1331,7 +1389,9 @@ filegroup(
"src/heap/cppgc-js/cpp-marking-state-inl.h",
"src/heap/cppgc-js/cpp-snapshot.cc",
"src/heap/cppgc-js/cpp-snapshot.h",
"src/heap/cppgc-js/unified-heap-marking-state.cc",
"src/heap/cppgc-js/unified-heap-marking-state.h",
"src/heap/cppgc-js/unified-heap-marking-state-inl.h",
"src/heap/cppgc-js/unified-heap-marking-verifier.cc",
"src/heap/cppgc-js/unified-heap-marking-verifier.h",
"src/heap/cppgc-js/unified-heap-marking-visitor.cc",
Expand All @@ -1353,6 +1413,7 @@ filegroup(
"src/heap/gc-idle-time-handler.cc",
"src/heap/gc-idle-time-handler.h",
"src/heap/gc-tracer.cc",
"src/heap/gc-tracer-inl.h",
"src/heap/gc-tracer.h",
"src/heap/heap-allocator-inl.h",
"src/heap/heap-allocator.cc",
Expand Down Expand Up @@ -1930,6 +1991,7 @@ filegroup(
"src/runtime/runtime-proxy.cc",
"src/runtime/runtime-regexp.cc",
"src/runtime/runtime-scopes.cc",
"src/runtime/runtime-shadow-realm.cc",
"src/runtime/runtime-strings.cc",
"src/runtime/runtime-symbol.cc",
"src/runtime/runtime-test.cc",
Expand Down Expand Up @@ -1964,6 +2026,7 @@ filegroup(
"src/snapshot/deserializer.cc",
"src/snapshot/deserializer.h",
"src/snapshot/embedded/embedded-data.cc",
"src/snapshot/embedded/embedded-data-inl.h",
"src/snapshot/embedded/embedded-data.h",
"src/snapshot/embedded/embedded-file-writer-interface.h",
"src/snapshot/object-deserializer.cc",
Expand Down Expand Up @@ -2374,6 +2437,8 @@ filegroup(
"src/wasm/baseline/liftoff-compiler.h",
"src/wasm/baseline/liftoff-register.h",
"src/wasm/branch-hint-map.h",
"src/wasm/canonical-types.cc",
"src/wasm/canonical-types.h",
"src/wasm/code-space-access.cc",
"src/wasm/code-space-access.h",
"src/wasm/compilation-environment.h",
Expand Down Expand Up @@ -2550,6 +2615,8 @@ filegroup(
"src/compiler/backend/unwinding-info-writer.h",
"src/compiler/basic-block-instrumentor.cc",
"src/compiler/basic-block-instrumentor.h",
"src/compiler/branch-condition-duplicator.cc",
"src/compiler/branch-condition-duplicator.h",
"src/compiler/branch-elimination.cc",
"src/compiler/branch-elimination.h",
"src/compiler/bytecode-analysis.cc",
Expand Down Expand Up @@ -2857,7 +2924,6 @@ filegroup(
"src/heap/cppgc/compactor.h",
"src/heap/cppgc/concurrent-marker.cc",
"src/heap/cppgc/concurrent-marker.h",
"src/heap/cppgc/default-platform.cc",
"src/heap/cppgc/explicit-management.cc",
"src/heap/cppgc/free-list.cc",
"src/heap/cppgc/free-list.h",
Expand Down
40 changes: 25 additions & 15 deletions deps/v8/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ declare_args() {

# Enable the experimental V8 sandbox.
# Sets -DV8_SANDBOX.
v8_enable_sandbox = false
v8_enable_sandbox = ""

# Enable external pointer sandboxing. Requires v8_enable_sandbox.
# Sets -DV8_SANDBOXED_EXTERNAL_POINRTERS.
Expand Down Expand Up @@ -421,13 +421,10 @@ if (v8_enable_short_builtin_calls == "") {
v8_current_cpu == "x64" || (!is_android && v8_current_cpu == "arm64")
}
if (v8_enable_external_code_space == "") {
# Can't use !is_android here, because Torque toolchain is affected by
# the value of this flag but actually runs on the host side.
v8_enable_external_code_space =
v8_enable_pointer_compression &&
(v8_current_cpu == "x64" ||
(target_os != "android" && target_os != "fuchsia" &&
v8_current_cpu == "arm64"))
(target_os != "fuchsia" && v8_current_cpu == "arm64"))
}
if (v8_enable_maglev == "") {
v8_enable_maglev = v8_current_cpu == "x64" && v8_enable_pointer_compression
Expand Down Expand Up @@ -474,7 +471,8 @@ if (v8_multi_arch_build &&
# Check if it is a Chromium build and activate PAC/BTI if needed.
# TODO(cavalcantii): have a single point of integration with PAC/BTI flags.
if (build_with_chromium && v8_current_cpu == "arm64" &&
arm_control_flow_integrity == "standard") {
(arm_control_flow_integrity == "standard" ||
arm_control_flow_integrity == "pac")) {
v8_control_flow_integrity = true
}

Expand All @@ -492,10 +490,12 @@ if (v8_enable_shared_ro_heap == "") {
v8_enable_pointer_compression_shared_cage
}

# Enable the v8 sandbox on 64-bit Chromium builds.
if (build_with_chromium && v8_enable_pointer_compression_shared_cage &&
v8_enable_external_code_space) {
v8_enable_sandbox = true
if (v8_enable_sandbox == "") {
# TODO(saelo, v8:11880) remove dependency on v8_enable_external_code_space
# once that is enabled everywhere by default.
v8_enable_sandbox =
build_with_chromium && v8_enable_pointer_compression_shared_cage &&
v8_enable_external_code_space
}

# Enable all available sandbox features if sandbox future is enabled.
Expand Down Expand Up @@ -1044,8 +1044,8 @@ config("toolchain") {
defines += [ "V8_TARGET_ARCH_ARM64" ]
if (current_cpu == "arm64") {
# This will enable PAC+BTI in code generation and static code.
if (v8_control_flow_integrity) {
# TODO(v8:10026): Enable this in src/build.
if (v8_control_flow_integrity &&
(!build_with_chromium || arm_control_flow_integrity == "standard")) {
cflags += [ "-mbranch-protection=standard" ]
asmflags = [ "-mmark-bti-property" ]
} else if (build_with_chromium && arm_control_flow_integrity == "pac") {
Expand Down Expand Up @@ -1179,6 +1179,9 @@ config("toolchain") {

#FIXME: Temporarily use MIPS macro for the building.
defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
if (target_is_simulator) {
defines += [ "CAN_USE_RVV_INSTRUCTIONS" ]
}
}

if (v8_current_cpu == "x86") {
Expand Down Expand Up @@ -2778,6 +2781,7 @@ v8_header_set("v8_internal_headers") {
"src/compiler/backend/spill-placer.h",
"src/compiler/backend/unwinding-info-writer.h",
"src/compiler/basic-block-instrumentor.h",
"src/compiler/branch-condition-duplicator.h",
"src/compiler/branch-elimination.h",
"src/compiler/bytecode-analysis.h",
"src/compiler/bytecode-graph-builder.h",
Expand Down Expand Up @@ -2963,7 +2967,6 @@ v8_header_set("v8_internal_headers") {
"src/heap/allocation-result.h",
"src/heap/allocation-stats.h",
"src/heap/array-buffer-sweeper.h",
"src/heap/barrier.h",
"src/heap/base-space.h",
"src/heap/basic-memory-chunk.h",
"src/heap/code-object-registry.h",
Expand All @@ -2978,6 +2981,7 @@ v8_header_set("v8_internal_headers") {
"src/heap/cppgc-js/cpp-marking-state-inl.h",
"src/heap/cppgc-js/cpp-marking-state.h",
"src/heap/cppgc-js/cpp-snapshot.h",
"src/heap/cppgc-js/unified-heap-marking-state-inl.h",
"src/heap/cppgc-js/unified-heap-marking-state.h",
"src/heap/cppgc-js/unified-heap-marking-verifier.h",
"src/heap/cppgc-js/unified-heap-marking-visitor.h",
Expand All @@ -2993,6 +2997,7 @@ v8_header_set("v8_internal_headers") {
"src/heap/free-list-inl.h",
"src/heap/free-list.h",
"src/heap/gc-idle-time-handler.h",
"src/heap/gc-tracer-inl.h",
"src/heap/gc-tracer.h",
"src/heap/heap-allocator-inl.h",
"src/heap/heap-allocator.h",
Expand Down Expand Up @@ -3390,6 +3395,7 @@ v8_header_set("v8_internal_headers") {
"src/snapshot/context-deserializer.h",
"src/snapshot/context-serializer.h",
"src/snapshot/deserializer.h",
"src/snapshot/embedded/embedded-data-inl.h",
"src/snapshot/embedded/embedded-data.h",
"src/snapshot/embedded/embedded-file-writer-interface.h",
"src/snapshot/object-deserializer.h",
Expand Down Expand Up @@ -3479,6 +3485,7 @@ v8_header_set("v8_internal_headers") {
"src/maglev/maglev-graph-labeller.h",
"src/maglev/maglev-graph-printer.h",
"src/maglev/maglev-graph-processor.h",
"src/maglev/maglev-graph-verifier.h",
"src/maglev/maglev-graph.h",
"src/maglev/maglev-interpreter-frame-state.h",
"src/maglev/maglev-ir.h",
Expand Down Expand Up @@ -3510,6 +3517,7 @@ v8_header_set("v8_internal_headers") {
"src/wasm/baseline/liftoff-assembler.h",
"src/wasm/baseline/liftoff-compiler.h",
"src/wasm/baseline/liftoff-register.h",
"src/wasm/canonical-types.h",
"src/wasm/code-space-access.h",
"src/wasm/compilation-environment.h",
"src/wasm/decoder.h",
Expand Down Expand Up @@ -3890,6 +3898,7 @@ v8_compiler_sources = [
"src/compiler/backend/register-allocator.cc",
"src/compiler/backend/spill-placer.cc",
"src/compiler/basic-block-instrumentor.cc",
"src/compiler/branch-condition-duplicator.cc",
"src/compiler/branch-elimination.cc",
"src/compiler/bytecode-analysis.cc",
"src/compiler/bytecode-graph-builder.cc",
Expand Down Expand Up @@ -4227,6 +4236,7 @@ v8_source_set("v8_base_without_compiler") {
"src/heap/concurrent-marking.cc",
"src/heap/cppgc-js/cpp-heap.cc",
"src/heap/cppgc-js/cpp-snapshot.cc",
"src/heap/cppgc-js/unified-heap-marking-state.cc",
"src/heap/cppgc-js/unified-heap-marking-verifier.cc",
"src/heap/cppgc-js/unified-heap-marking-visitor.cc",
"src/heap/embedder-tracing.cc",
Expand Down Expand Up @@ -4445,6 +4455,7 @@ v8_source_set("v8_base_without_compiler") {
"src/runtime/runtime-proxy.cc",
"src/runtime/runtime-regexp.cc",
"src/runtime/runtime-scopes.cc",
"src/runtime/runtime-shadow-realm.cc",
"src/runtime/runtime-strings.cc",
"src/runtime/runtime-symbol.cc",
"src/runtime/runtime-test.cc",
Expand Down Expand Up @@ -4535,6 +4546,7 @@ v8_source_set("v8_base_without_compiler") {
"src/trap-handler/handler-shared.cc",
"src/wasm/baseline/liftoff-assembler.cc",
"src/wasm/baseline/liftoff-compiler.cc",
"src/wasm/canonical-types.cc",
"src/wasm/code-space-access.cc",
"src/wasm/function-body-decoder.cc",
"src/wasm/function-compiler.cc",
Expand Down Expand Up @@ -5185,7 +5197,6 @@ v8_component("v8_libbase") {
"src/base/template-utils.h",
"src/base/threaded-list.h",
"src/base/timezone-cache.h",
"src/base/type-traits.h",
"src/base/utils/random-number-generator.cc",
"src/base/utils/random-number-generator.h",
"src/base/v8-fallthrough.h",
Expand Down Expand Up @@ -5603,7 +5614,6 @@ v8_source_set("cppgc_base") {
"src/heap/cppgc/compactor.h",
"src/heap/cppgc/concurrent-marker.cc",
"src/heap/cppgc/concurrent-marker.h",
"src/heap/cppgc/default-platform.cc",
"src/heap/cppgc/explicit-management.cc",
"src/heap/cppgc/free-list.cc",
"src/heap/cppgc/free-list.h",
Expand Down
Loading

0 comments on commit 6bbc559

Please sign in to comment.