diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index f05ba729c58624..e095f812659d7a 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -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 Aaron O'Mullan @@ -90,9 +91,11 @@ Daniel Bevenius Daniel Dromboski Daniel James Daniel Shelton +Danylo Boiko Darshan Sen David Carlier David Manouchehri +David Sanders Deepak Mohan Deon Dior Derek Tu @@ -115,6 +118,7 @@ Gus Caplan Gwang Yoon Hwang Haichuan Wang Hannu Trey +Harshal Nandigramwar Harshil Jain Henrique Ferreiro Hirofumi Mako @@ -135,7 +139,6 @@ Javad Amiri Jay Freeman Jesper van den Ende Ji Qiu -Jianghua Yang Jiawen Geng Jiaxun Yang Joel Stanley @@ -198,8 +201,6 @@ Peter Rybin Peter Varga Peter Wong PhistucK -Qingyan Li -Qiuyi Zhang Rafal Krypa Raul Tambre Ray Glover @@ -248,6 +249,7 @@ Vladimir Shutoff Wael Almattar Wei Wu Wenlu Wang +Wenming Yang Wenyu Zhao Wiktor Garbacz Wouter Vermeiren diff --git a/deps/v8/BUILD.bazel b/deps/v8/BUILD.bazel index bc18ab8c27b987..279e3e55a0dca8 100644 --- a/deps/v8/BUILD.bazel +++ b/deps/v8/BUILD.bazel @@ -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 @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 9e801d2455b314..988c907d964a25 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -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. @@ -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 @@ -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 } @@ -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. @@ -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") { @@ -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") { @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 61577d45ab6c23..54ac85a4bdbb8a 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -40,10 +40,10 @@ vars = { 'reclient_version': 're_client_version:0.40.0.40ff5a5', # GN CIPD package version. - 'gn_version': 'git_revision:bd99dbf98cbdefe18a4128189665c5761263bcfb', + 'gn_version': 'git_revision:ae110f8b525009255ba1f9ae96982176d3bfad3d', # luci-go CIPD package version. - 'luci_go': 'git_revision:cb424e70e75136736a86359ef070aa96425fe7a3', + 'luci_go': 'git_revision:6da0608e4fa8a3c6d1fa4f855485c0038b05bf72', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_build-tools_version @@ -83,9 +83,9 @@ deps = { 'base/trace_event/common': Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + 'd115b033c4e53666b535cbd1985ffe60badad082', 'build': - Var('chromium_url') + '/chromium/src/build.git' + '@' + '3d9590754d5d23e62d15472c5baf6777ca59df20', + Var('chromium_url') + '/chromium/src/build.git' + '@' + 'b37c340767cf9e7777d4ca5a588c34c5744df9b2', 'buildtools': - Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '113dd1badbcbffea108a8c95ac7c89c22bfd25f3', + Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + 'c2e4795660817c2776dbabd778b92ed58c074032', 'buildtools/clang_format/script': Var('chromium_url') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + 'e435ad79c17b1888b34df88d6a30a094936e3836', 'buildtools/linux64': { @@ -111,9 +111,9 @@ deps = { 'buildtools/third_party/libc++/trunk': Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '79a2e924d96e2fc1e4b937c42efd08898fa472d7', 'buildtools/third_party/libc++abi/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + 'a897d0f3f8e8c28ac2abf848f3b695b724409298', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + 'e025ba5dc85202540099d7cd8e72eae2d4ee9e33', 'buildtools/third_party/libunwind/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'd1c7f92b8b0bff8d9f710ca40e44563a63db376e', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'c39fea88739be63a2d5590a938ce19d762b915fc', 'buildtools/win': { 'packages': [ { @@ -139,7 +139,7 @@ deps = { 'test/mozilla/data': Var('chromium_url') + '/v8/deps/third_party/mozilla-tests.git' + '@' + 'f6c578a10ea707b1a8ab0b88943fe5115ce2b9be', 'test/test262/data': - Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + 'f7fb969cc4934bbc5aa29a378d59325eaa84f475', + Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + 'd7c0a2076c2b0c1531aef7069d4abe70eec44ee3', 'third_party/aemu-linux-x64': { 'packages': [ { @@ -161,11 +161,11 @@ deps = { 'dep_type': 'cipd', }, 'third_party/android_ndk': { - 'url': Var('chromium_url') + '/android_ndk.git' + '@' + '9644104c8cf85bf1bdce5b1c0691e9778572c3f8', + 'url': Var('chromium_url') + '/android_ndk.git' + '@' + '8388a2be5421311dc75c5f937aae13d821a27f3d', 'condition': 'checkout_android', }, 'third_party/android_platform': { - 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + '87b4b48de3c8204224d63612c287eb5a447a562d', + 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + '2760db43ffc8b074cb7960c90b5254f74a5c299a', 'condition': 'checkout_android', }, 'third_party/android_sdk/public': { @@ -207,7 +207,7 @@ deps = { 'dep_type': 'cipd', }, 'third_party/catapult': { - 'url': Var('chromium_url') + '/catapult.git' + '@' + 'b3fe2c177912640bc676b332a2f41dc812ea5843', + 'url': Var('chromium_url') + '/catapult.git' + '@' + '3a1ae18f882d024686144edbec3050aae055f146', 'condition': 'checkout_android', }, 'third_party/colorama/src': { @@ -215,18 +215,18 @@ deps = { 'condition': 'checkout_android', }, 'third_party/depot_tools': - Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + 'b199f549263a02900faef8c8c3d581c580e837c3', + Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '3b97fa826eee4bd1978c4c049038b1e4f201e8f2', 'third_party/fuchsia-sdk': { 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-sdk.git' + '@' + '7c9c220d13ab367d49420144a257886ebfbce278', 'condition': 'checkout_fuchsia', }, 'third_party/google_benchmark/src': { - 'url': Var('chromium_url') + '/external/github.com/google/benchmark.git' + '@' + '5704cd4c8cea889d68f9ae29ca5aaee97ef91816', + 'url': Var('chromium_url') + '/external/github.com/google/benchmark.git' + '@' + 'dc901ff9090e2b931433790cc44afc3af3b09ab2', }, 'third_party/googletest/src': - Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + 'ae5e06dd35c6137d335331b0815cf1f60fd7e3c5', + Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + 'af29db7ec28d6df1c7f0f745186884091e602e07', 'third_party/icu': - Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '8a5b728e4f43b0eabdb9ea450f956d67cfb22719', + Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '1fd0dbea04448c3f73fe5cb7599f9472f0f107f1', 'third_party/instrumented_libraries': Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + 'e09c4b66b6e87116eb190651421f1a6e2f3b9c52', 'third_party/ittapi': { @@ -272,19 +272,9 @@ deps = { 'condition': 'checkout_android', }, 'third_party/zlib': - Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + 'b0676a1f52484bf53a1a49d0e48ff8abc430fafe', + Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + 'a6d209ab932df0f1c9d5b7dc67cfa74e8a3272c0', 'tools/clang': - Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + 'b60d34c100e5a8f4b01d838527f000faab673da3', - 'tools/clang/dsymutil': { - 'packages': [ - { - 'package': 'chromium/llvm-build-tools/dsymutil', - 'version': 'M56jPzDv1620Rnm__jTMYS62Zi8rxHVq7yw0qeBFEgkC', - } - ], - 'condition': 'checkout_mac', - 'dep_type': 'cipd', - }, + Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + 'b5e2f7c16bbf3aefc9354e8fbad3de0a543f2193', 'tools/luci-go': { 'packages': [ { @@ -355,45 +345,87 @@ hooks = [ 'name': 'bazel', 'pattern': '.', 'condition': 'download_prebuilt_bazel', - 'action': [ 'download_from_google_storage', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', '--bucket', 'chromium-v8-prebuilt-bazel/linux', '--no_resume', '-s', 'tools/bazel/bazel.sha1', '--platform=linux*', ], }, + # Pull dsymutil binaries using checked-in hashes. + { + 'name': 'dsymutil_mac_arm64', + 'pattern': '.', + 'condition': 'host_os == "mac" and host_cpu == "arm64"', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', + '--no_resume', + '--no_auth', + '--bucket', 'chromium-browser-clang', + '-s', 'tools/clang/dsymutil/bin/dsymutil.arm64.sha1', + '-o', 'tools/clang/dsymutil/bin/dsymutil', + ], + }, + { + 'name': 'dsymutil_mac_x64', + 'pattern': '.', + 'condition': 'host_os == "mac" and host_cpu == "x64"', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', + '--no_resume', + '--no_auth', + '--bucket', 'chromium-browser-clang', + '-s', 'tools/clang/dsymutil/bin/dsymutil.x64.sha1', + '-o', 'tools/clang/dsymutil/bin/dsymutil', + ], + }, # Pull clang-format binaries using checked-in hashes. { 'name': 'clang_format_win', 'pattern': '.', 'condition': 'host_os == "win"', - 'action': [ 'download_from_google_storage', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', '--no_resume', - '--platform=win32', '--no_auth', '--bucket', 'chromium-clang-format', '-s', 'buildtools/win/clang-format.exe.sha1', ], }, { - 'name': 'clang_format_mac', + 'name': 'clang_format_mac_x64', 'pattern': '.', - 'condition': 'host_os == "mac"', - 'action': [ 'download_from_google_storage', + 'condition': 'host_os == "mac" and host_cpu == "x64"', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', + '--no_resume', + '--no_auth', + '--bucket', 'chromium-clang-format', + '-s', 'buildtools/mac/clang-format.x64.sha1', + '-o', 'buildtools/mac/clang-format', + ], + }, + { + 'name': 'clang_format_mac_arm64', + 'pattern': '.', + 'condition': 'host_os == "mac" and host_cpu == "arm64"', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', '--no_resume', - '--platform=darwin', '--no_auth', '--bucket', 'chromium-clang-format', - '-s', 'buildtools/mac/clang-format.sha1', + '-s', 'buildtools/mac/clang-format.arm64.sha1', + '-o', 'buildtools/mac/clang-format', ], }, { 'name': 'clang_format_linux', 'pattern': '.', 'condition': 'host_os == "linux"', - 'action': [ 'download_from_google_storage', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', '--no_resume', - '--platform=linux*', '--no_auth', '--bucket', 'chromium-clang-format', '-s', 'buildtools/linux64/clang-format.sha1', @@ -403,7 +435,8 @@ hooks = [ 'name': 'gcmole', 'pattern': '.', 'condition': 'download_gcmole', - 'action': [ 'download_from_google_storage', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', '--bucket', 'chrome-v8-gcmole', '-u', '--no_resume', '-s', 'tools/gcmole/gcmole-tools.tar.gz.sha1', @@ -414,7 +447,8 @@ hooks = [ 'name': 'jsfunfuzz', 'pattern': '.', 'condition': 'download_jsfunfuzz', - 'action': [ 'download_from_google_storage', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', '--bucket', 'chrome-v8-jsfunfuzz', '-u', '--no_resume', '-s', 'tools/jsfunfuzz/jsfunfuzz.tar.gz.sha1', @@ -424,7 +458,8 @@ hooks = [ { 'name': 'wasm_spec_tests', 'pattern': '.', - 'action': [ 'download_from_google_storage', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--no_auth', '-u', @@ -435,7 +470,8 @@ hooks = [ { 'name': 'wasm_js', 'pattern': '.', - 'action': [ 'download_from_google_storage', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--no_auth', '-u', @@ -475,7 +511,8 @@ hooks = [ 'name': 'msan_chained_origins', 'pattern': '.', 'condition': 'checkout_instrumented_libraries', - 'action': [ 'download_from_google_storage', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--no_auth', '--bucket', 'chromium-instrumented-libraries', @@ -486,7 +523,8 @@ hooks = [ 'name': 'msan_no_origins', 'pattern': '.', 'condition': 'checkout_instrumented_libraries', - 'action': [ 'download_from_google_storage', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--no_auth', '--bucket', 'chromium-instrumented-libraries', @@ -498,7 +536,8 @@ hooks = [ 'name': 'ciopfs_linux', 'pattern': '.', 'condition': 'checkout_win and host_os == "linux"', - 'action': [ 'download_from_google_storage', + 'action': [ 'python3', + 'third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--no_auth', '--bucket', 'chromium-browser-clang/ciopfs', diff --git a/deps/v8/bazel/config/BUILD.bazel b/deps/v8/bazel/config/BUILD.bazel index ac79c428089db0..ffa9ef040722b4 100644 --- a/deps/v8/bazel/config/BUILD.bazel +++ b/deps/v8/bazel/config/BUILD.bazel @@ -177,6 +177,15 @@ selects.config_setting_group( ], ) +selects.config_setting_group( + name = "is_not_android", + match_any = [ + ":is_windows", + ":is_linux", + ":is_macos", + ] +) + selects.config_setting_group( name = "is_non_android_posix", match_any = [ diff --git a/deps/v8/gni/OWNERS b/deps/v8/gni/OWNERS index e87e9c95a1cfc8..fa1262b503174e 100644 --- a/deps/v8/gni/OWNERS +++ b/deps/v8/gni/OWNERS @@ -2,4 +2,4 @@ file:../INFRA_OWNERS per-file v8.cmx=victorgomes@chromium.org per-file release_branch_toggle.gni=v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com -per-file release_branch_toggle.gni=lutz@chromium.org \ No newline at end of file +per-file release_branch_toggle.gni=vahl@chromium.org \ No newline at end of file diff --git a/deps/v8/gni/release_branch_toggle.gni b/deps/v8/gni/release_branch_toggle.gni index c502c8c62e5836..43e3b6ae567631 100644 --- a/deps/v8/gni/release_branch_toggle.gni +++ b/deps/v8/gni/release_branch_toggle.gni @@ -4,4 +4,4 @@ declare_args() { is_on_release_branch = true -} \ No newline at end of file +} diff --git a/deps/v8/include/cppgc/default-platform.h b/deps/v8/include/cppgc/default-platform.h index f9af756c39a0a5..a27871cc37ee47 100644 --- a/deps/v8/include/cppgc/default-platform.h +++ b/deps/v8/include/cppgc/default-platform.h @@ -19,15 +19,6 @@ namespace cppgc { */ class V8_EXPORT DefaultPlatform : public Platform { public: - /** - * Use this method instead of 'cppgc::InitializeProcess' when using - * 'cppgc::DefaultPlatform'. 'cppgc::DefaultPlatform::InitializeProcess' - * will initialize cppgc and v8 if needed (for non-standalone builds). - * - * \param platform DefaultPlatform instance used to initialize cppgc/v8. - */ - static void InitializeProcess(DefaultPlatform* platform); - using IdleTaskSupport = v8::platform::IdleTaskSupport; explicit DefaultPlatform( int thread_pool_size = 0, diff --git a/deps/v8/include/cppgc/internal/api-constants.h b/deps/v8/include/cppgc/internal/api-constants.h index 791039f1ee1326..a50d4d046c953c 100644 --- a/deps/v8/include/cppgc/internal/api-constants.h +++ b/deps/v8/include/cppgc/internal/api-constants.h @@ -44,6 +44,9 @@ static constexpr size_t kDefaultAlignment = sizeof(void*); // Maximum support alignment for a type as in `alignof(T)`. static constexpr size_t kMaxSupportedAlignment = 2 * kDefaultAlignment; +// Granularity of heap allocations. +constexpr size_t kAllocationGranularity = sizeof(void*); + } // namespace api_constants } // namespace internal diff --git a/deps/v8/include/cppgc/internal/caged-heap-local-data.h b/deps/v8/include/cppgc/internal/caged-heap-local-data.h index 5b30d6702920c2..a27649c17fce5b 100644 --- a/deps/v8/include/cppgc/internal/caged-heap-local-data.h +++ b/deps/v8/include/cppgc/internal/caged-heap-local-data.h @@ -6,6 +6,8 @@ #define INCLUDE_CPPGC_INTERNAL_CAGED_HEAP_LOCAL_DATA_H_ #include +#include +#include #include "cppgc/internal/api-constants.h" #include "cppgc/internal/logging.h" @@ -19,32 +21,41 @@ class HeapBase; #if defined(CPPGC_YOUNG_GENERATION) -// AgeTable contains entries that correspond to 4KB memory regions. Each entry -// can be in one of three states: kOld, kYoung or kUnknown. +// AgeTable is the bytemap needed for the fast generation check in the write +// barrier. AgeTable contains entries that correspond to 512 bytes memory +// regions (cards). Each entry in the table represents generation of the objects +// that reside on the corresponding card (young, old or mixed). class AgeTable final { - static constexpr size_t kGranularityBits = 12; // 4KiB per byte. + static constexpr size_t kRequiredSize = 1 * api_constants::kMB; + static constexpr size_t kAllocationGranularity = + api_constants::kAllocationGranularity; public: - enum class Age : uint8_t { kOld, kYoung, kUnknown }; + enum class Age : uint8_t { kOld, kYoung, kMixed }; - static constexpr size_t kEntrySizeInBytes = 1 << kGranularityBits; + static constexpr size_t kCardSizeInBytes = + (api_constants::kCagedHeapReservationSize / kAllocationGranularity) / + kRequiredSize; - Age& operator[](uintptr_t offset) { return table_[entry(offset)]; } - Age operator[](uintptr_t offset) const { return table_[entry(offset)]; } + void SetAge(uintptr_t cage_offset, Age age) { + table_[card(cage_offset)] = age; + } + V8_INLINE Age GetAge(uintptr_t cage_offset) const { + return table_[card(cage_offset)]; + } void Reset(PageAllocator* allocator); private: - static constexpr size_t kAgeTableSize = - api_constants::kCagedHeapReservationSize >> kGranularityBits; - - size_t entry(uintptr_t offset) const { + V8_INLINE size_t card(uintptr_t offset) const { + constexpr size_t kGranularityBits = + __builtin_ctz(static_cast(kCardSizeInBytes)); const size_t entry = offset >> kGranularityBits; CPPGC_DCHECK(table_.size() > entry); return entry; } - std::array table_; + std::array table_; }; static_assert(sizeof(AgeTable) == 1 * api_constants::kMB, diff --git a/deps/v8/include/cppgc/internal/finalizer-trait.h b/deps/v8/include/cppgc/internal/finalizer-trait.h index 7bd6f83bf60b46..ab49af870e0ba3 100644 --- a/deps/v8/include/cppgc/internal/finalizer-trait.h +++ b/deps/v8/include/cppgc/internal/finalizer-trait.h @@ -19,7 +19,8 @@ struct HasFinalizeGarbageCollectedObject : std::false_type {}; template struct HasFinalizeGarbageCollectedObject< - T, void_t().FinalizeGarbageCollectedObject())>> + T, + std::void_t().FinalizeGarbageCollectedObject())>> : std::true_type {}; // The FinalizerTraitImpl specifies how to finalize objects. diff --git a/deps/v8/include/cppgc/internal/write-barrier.h b/deps/v8/include/cppgc/internal/write-barrier.h index cdb7ec6f9e7067..bfabc31e13a969 100644 --- a/deps/v8/include/cppgc/internal/write-barrier.h +++ b/deps/v8/include/cppgc/internal/write-barrier.h @@ -405,7 +405,8 @@ void WriteBarrier::GenerationalBarrier(const Params& params, const void* slot) { const AgeTable& age_table = local_data.age_table; // Bail out if the slot is in young generation. - if (V8_LIKELY(age_table[params.slot_offset] == AgeTable::Age::kYoung)) return; + if (V8_LIKELY(age_table.GetAge(params.slot_offset) == AgeTable::Age::kYoung)) + return; GenerationalBarrierSlow(local_data, age_table, slot, params.value_offset); } @@ -420,7 +421,8 @@ void WriteBarrier::GenerationalBarrierForSourceObject( // Assume that if the first element is in young generation, the whole range is // in young generation. - if (V8_LIKELY(age_table[params.slot_offset] == AgeTable::Age::kYoung)) return; + if (V8_LIKELY(age_table.GetAge(params.slot_offset) == AgeTable::Age::kYoung)) + return; GenerationalBarrierForSourceObjectSlow(local_data, inner_pointer); } diff --git a/deps/v8/include/cppgc/type-traits.h b/deps/v8/include/cppgc/type-traits.h index 56cd55d61e2a5a..970ffd4841abf4 100644 --- a/deps/v8/include/cppgc/type-traits.h +++ b/deps/v8/include/cppgc/type-traits.h @@ -24,14 +24,6 @@ class StrongMemberTag; class UntracedMemberTag; class WeakMemberTag; -// Pre-C++17 custom implementation of std::void_t. -template -struct make_void { - typedef void type; -}; -template -using void_t = typename make_void::type; - // Not supposed to be specialized by the user. template struct IsWeak : std::false_type {}; @@ -42,7 +34,7 @@ template struct IsTraceMethodConst : std::false_type {}; template -struct IsTraceMethodConst().Trace( +struct IsTraceMethodConst().Trace( std::declval()))>> : std::true_type { }; @@ -53,7 +45,7 @@ struct IsTraceable : std::false_type { template struct IsTraceable< - T, void_t().Trace(std::declval()))>> + T, std::void_t().Trace(std::declval()))>> : std::true_type { // All Trace methods should be marked as const. If an object of type // 'T' is traceable then any object of type 'const T' should also @@ -72,8 +64,8 @@ struct HasGarbageCollectedMixinTypeMarker : std::false_type { template struct HasGarbageCollectedMixinTypeMarker< - T, - void_t::IsGarbageCollectedMixinTypeMarker>> + T, std::void_t< + typename std::remove_const_t::IsGarbageCollectedMixinTypeMarker>> : std::true_type { static_assert(sizeof(T), "T must be fully defined"); }; @@ -85,7 +77,8 @@ struct HasGarbageCollectedTypeMarker : std::false_type { template struct HasGarbageCollectedTypeMarker< - T, void_t::IsGarbageCollectedTypeMarker>> + T, + std::void_t::IsGarbageCollectedTypeMarker>> : std::true_type { static_assert(sizeof(T), "T must be fully defined"); }; diff --git a/deps/v8/include/js_protocol.pdl b/deps/v8/include/js_protocol.pdl index 09c420e3a63610..53a5f4c11dcc02 100644 --- a/deps/v8/include/js_protocol.pdl +++ b/deps/v8/include/js_protocol.pdl @@ -952,6 +952,37 @@ domain Runtime # Unique script identifier. type ScriptId extends string + # Represents the value serialiazed by the WebDriver BiDi specification + # https://w3c.github.io/webdriver-bidi. + type WebDriverValue extends object + properties + enum type + undefined + null + string + number + boolean + bigint + regexp + date + symbol + array + object + function + map + set + weakmap + weakset + error + proxy + promise + typedarray + arraybuffer + node + window + optional any value + optional string objectId + # Unique object identifier. type RemoteObjectId extends string @@ -1004,6 +1035,8 @@ domain Runtime optional UnserializableValue unserializableValue # String representation of the object. optional string description + # WebDriver BiDi representation of the value. + experimental optional WebDriverValue webDriverValue # Unique object identifier (for non-primitive values). optional RemoteObjectId objectId # Preview containing abbreviated property values. Specified for `object` type values only. @@ -1309,6 +1342,8 @@ domain Runtime optional string objectGroup # Whether to throw an exception if side effect cannot be ruled out during evaluation. experimental optional boolean throwOnSideEffect + # Whether the result should be serialized according to https://w3c.github.io/webdriver-bidi. + experimental optional boolean generateWebDriverValue returns # Call result. RemoteObject result @@ -1394,6 +1429,8 @@ domain Runtime # boundaries). # This is mutually exclusive with `contextId`. experimental optional string uniqueContextId + # Whether the result should be serialized according to https://w3c.github.io/webdriver-bidi. + experimental optional boolean generateWebDriverValue returns # Evaluation result. RemoteObject result diff --git a/deps/v8/include/v8-cppgc.h b/deps/v8/include/v8-cppgc.h index 7761d87fd0a325..412154930f7d92 100644 --- a/deps/v8/include/v8-cppgc.h +++ b/deps/v8/include/v8-cppgc.h @@ -77,9 +77,6 @@ struct WrapperDescriptor final { }; struct V8_EXPORT CppHeapCreateParams { - CppHeapCreateParams(const CppHeapCreateParams&) = delete; - CppHeapCreateParams& operator=(const CppHeapCreateParams&) = delete; - std::vector> custom_spaces; WrapperDescriptor wrapper_descriptor; }; @@ -164,6 +161,7 @@ class V8_EXPORT CppHeap { class JSVisitor : public cppgc::Visitor { public: explicit JSVisitor(cppgc::Visitor::Key key) : cppgc::Visitor(key) {} + ~JSVisitor() override = default; void Trace(const TracedReferenceBase& ref) { if (ref.IsEmptyThreadSafe()) return; diff --git a/deps/v8/include/v8-inspector.h b/deps/v8/include/v8-inspector.h index edd968c766d82d..ce5430bd039870 100644 --- a/deps/v8/include/v8-inspector.h +++ b/deps/v8/include/v8-inspector.h @@ -205,6 +205,15 @@ class V8_EXPORT V8InspectorSession { virtual void triggerPreciseCoverageDeltaUpdate(StringView occasion) = 0; }; +class V8_EXPORT WebDriverValue { + public: + explicit WebDriverValue(StringView type, v8::MaybeLocal value = {}) + : type(type), value(value) {} + + StringView type; + v8::MaybeLocal value; +}; + class V8_EXPORT V8InspectorClient { public: virtual ~V8InspectorClient() = default; @@ -219,6 +228,10 @@ class V8_EXPORT V8InspectorClient { virtual void beginUserGesture() {} virtual void endUserGesture() {} + virtual std::unique_ptr serializeToWebDriverValue( + v8::Local v8_value, int max_depth) { + return nullptr; + } virtual std::unique_ptr valueSubtype(v8::Local) { return nullptr; } @@ -270,6 +283,9 @@ class V8_EXPORT V8InspectorClient { // The caller would defer to generating a random 64 bit integer if // this method returns 0. virtual int64_t generateUniqueId() { return 0; } + + virtual void dispatchError(v8::Local, v8::Local, + v8::Local) {} }; // These stack trace ids are intended to be passed between debuggers and be diff --git a/deps/v8/include/v8-internal.h b/deps/v8/include/v8-internal.h index e6e9cc5f9f5bbc..37c5b336dad935 100644 --- a/deps/v8/include/v8-internal.h +++ b/deps/v8/include/v8-internal.h @@ -365,8 +365,8 @@ class Internals { static const uint32_t kNumIsolateDataSlots = 4; static const int kStackGuardSize = 7 * kApiSystemPointerSize; - static const int kBuiltinTier0EntryTableSize = 10 * kApiSystemPointerSize; - static const int kBuiltinTier0TableSize = 10 * kApiSystemPointerSize; + static const int kBuiltinTier0EntryTableSize = 9 * kApiSystemPointerSize; + static const int kBuiltinTier0TableSize = 9 * kApiSystemPointerSize; // IsolateData layout guarantees. static const int kIsolateCageBaseOffset = 0; diff --git a/deps/v8/include/v8-metrics.h b/deps/v8/include/v8-metrics.h index 01bc538e22c769..d8e8bd865bfc03 100644 --- a/deps/v8/include/v8-metrics.h +++ b/deps/v8/include/v8-metrics.h @@ -61,26 +61,38 @@ struct GarbageCollectionFullMainThreadIncrementalMark { int64_t cpp_wall_clock_duration_in_us = -1; }; -struct GarbageCollectionFullMainThreadBatchedIncrementalMark { - std::vector events; -}; - struct GarbageCollectionFullMainThreadIncrementalSweep { int64_t wall_clock_duration_in_us = -1; int64_t cpp_wall_clock_duration_in_us = -1; }; -struct GarbageCollectionFullMainThreadBatchedIncrementalSweep { - std::vector events; +template +struct GarbageCollectionBatchedEvents { + std::vector events; }; +using GarbageCollectionFullMainThreadBatchedIncrementalMark = + GarbageCollectionBatchedEvents< + GarbageCollectionFullMainThreadIncrementalMark>; +using GarbageCollectionFullMainThreadBatchedIncrementalSweep = + GarbageCollectionBatchedEvents< + GarbageCollectionFullMainThreadIncrementalSweep>; + struct GarbageCollectionYoungCycle { int reason = -1; int64_t total_wall_clock_duration_in_us = -1; int64_t main_thread_wall_clock_duration_in_us = -1; - double collection_rate_in_percent; - double efficiency_in_bytes_per_us; - double main_thread_efficiency_in_bytes_per_us; + double collection_rate_in_percent = -1.0; + double efficiency_in_bytes_per_us = -1.0; + double main_thread_efficiency_in_bytes_per_us = -1.0; +#if defined(CPPGC_YOUNG_GENERATION) + GarbageCollectionPhases total_cpp; + GarbageCollectionSizes objects_cpp; + GarbageCollectionSizes memory_cpp; + double collection_rate_cpp_in_percent = -1.0; + double efficiency_cpp_in_bytes_per_us = -1.0; + double main_thread_efficiency_cpp_in_bytes_per_us = -1.0; +#endif // defined(CPPGC_YOUNG_GENERATION) }; struct WasmModuleDecoded { diff --git a/deps/v8/include/v8-script.h b/deps/v8/include/v8-script.h index 5644a3bb70c6b1..88252ac1897318 100644 --- a/deps/v8/include/v8-script.h +++ b/deps/v8/include/v8-script.h @@ -650,6 +650,7 @@ class V8_EXPORT ScriptCompiler { * It is possible to specify multiple context extensions (obj in the above * example). */ + V8_DEPRECATED("Use CompileFunction") static V8_WARN_UNUSED_RESULT MaybeLocal CompileFunctionInContext( Local context, Source* source, size_t arguments_count, Local arguments[], size_t context_extension_count, diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 4312c9ff8b01a3..709fdc57900f09 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -9,9 +9,9 @@ // NOTE these macros are used by some of the tool scripts and the build // system so their names cannot be changed without changing the scripts. #define V8_MAJOR_VERSION 10 -#define V8_MINOR_VERSION 1 -#define V8_BUILD_NUMBER 124 -#define V8_PATCH_LEVEL 8 +#define V8_MINOR_VERSION 2 +#define V8_BUILD_NUMBER 154 +#define V8_PATCH_LEVEL 2 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/infra/mb/mb_config.pyl b/deps/v8/infra/mb/mb_config.pyl index e20cd6e7bd7183..769582188a11d5 100644 --- a/deps/v8/infra/mb/mb_config.pyl +++ b/deps/v8/infra/mb/mb_config.pyl @@ -116,7 +116,6 @@ 'V8 Linux64 - pointer compression - builder': 'release_x64_pointer_compression', 'V8 Linux64 - pointer compression without dchecks': 'release_x64_pointer_compression_without_dchecks', - 'V8 Linux64 - python3 - builder': 'release_x64', 'V8 Linux64 - arm64 - sim - pointer compression - builder': 'release_simulate_arm64_pointer_compression', 'V8 Linux64 gcc - debug builder': 'debug_x64_gcc', @@ -238,7 +237,6 @@ 'v8_linux64_nodcheck_rel_ng': 'release_x64', 'v8_linux64_perfetto_dbg_ng': 'debug_x64_perfetto', 'v8_linux64_pointer_compression_rel_ng': 'release_x64_pointer_compression', - 'v8_linux64_python3_rel_ng': 'release_x64', 'v8_linux64_rel_ng': 'release_x64_test_features_trybot', 'v8_linux64_shared_compile_rel': 'release_x64_shared_verify_heap', 'v8_linux64_single_generation_dbg_ng': 'debug_x64_single_generation', diff --git a/deps/v8/infra/testing/builders.pyl b/deps/v8/infra/testing/builders.pyl index 519adbdb076c34..11db9b11f714a3 100644 --- a/deps/v8/infra/testing/builders.pyl +++ b/deps/v8/infra/testing/builders.pyl @@ -280,11 +280,11 @@ 'os': 'Ubuntu-18.04', }, 'tests': [ - {'name': 'mjsunit_sp_frame_access'}, - {'name': 'mozilla'}, + {'name': 'mjsunit_sp_frame_access', 'shards': 3}, + {'name': 'mozilla', 'shards': 3}, {'name': 'test262', 'variant': 'default', 'shards': 2}, - {'name': 'v8testing', 'shards': 7}, - {'name': 'v8testing', 'variant': 'extra', 'shards': 7}, + {'name': 'v8testing', 'shards': 10}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 10}, ], }, 'v8_linux_arm_lite_rel_ng_triggered': { @@ -347,15 +347,15 @@ 'os': 'Ubuntu-18.04', }, 'tests': [ - {'name': 'benchmarks'}, + {'name': 'benchmarks', 'shards': 2}, {'name': 'benchmarks', 'variant': 'extra'}, - {'name': 'mjsunit_sp_frame_access'}, + {'name': 'mjsunit_sp_frame_access', 'shards': 2}, {'name': 'mozilla'}, {'name': 'mozilla', 'variant': 'extra'}, - {'name': 'test262', 'variant': 'default'}, - {'name': 'test262', 'variant': 'extra', 'shards': 5}, - {'name': 'v8testing', 'shards': 3}, - {'name': 'v8testing', 'variant': 'extra', 'shards': 3}, + {'name': 'test262', 'variant': 'default', 'shards': 2}, + {'name': 'test262', 'variant': 'extra', 'shards': 9}, + {'name': 'v8testing', 'shards': 5}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 5}, {'name': 'v8testing', 'variant': 'minor_mc'}, {'name': 'v8testing', 'variant': 'no_lfa'}, {'name': 'v8testing', 'variant': 'stress_instruction_scheduling'}, @@ -491,15 +491,6 @@ {'name': 'v8testing', 'shards': 3}, ], }, - 'v8_linux64_python3_rel_ng_triggered': { - 'swarming_dimensions' : { - 'os': 'Ubuntu-18.04', - }, - 'tests': [ - {'name': 'v8testing', 'shards': 2}, - {'name': 'gcmole'}, - ], - }, 'v8_linux64_single_generation_dbg_ng_triggered': { 'swarming_dimensions' : { 'os': 'Ubuntu-18.04', @@ -592,7 +583,7 @@ 'os': 'Ubuntu-18.04', }, 'tests': [ - {'name': 'mjsunit_sp_frame_access'}, + {'name': 'mjsunit_sp_frame_access', 'shards': 2}, {'name': 'mozilla', 'shards': 4}, {'name': 'test262', 'variant': 'default', 'shards': 4}, {'name': 'v8testing', 'shards': 14}, @@ -1369,15 +1360,6 @@ {'name': 'v8testing', 'shards': 2}, ], }, - 'V8 Linux64 - python3': { - 'swarming_dimensions' : { - 'os': 'Ubuntu-18.04', - }, - 'tests': [ - {'name': 'v8testing', 'shards': 2}, - {'name': 'gcmole'}, - ], - }, 'V8 Linux64 - shared': { 'swarming_dimensions' : { 'os': 'Ubuntu-18.04', @@ -1813,8 +1795,8 @@ 'os': 'Ubuntu-18.04', }, 'tests': [ - {'name': 'mjsunit_sp_frame_access', 'shards': 6}, - {'name': 'mozilla', 'shards': 6}, + {'name': 'mjsunit_sp_frame_access', 'shards': 3}, + {'name': 'mozilla', 'shards': 3}, {'name': 'test262', 'variant': 'default', 'shards': 2}, {'name': 'v8testing', 'shards': 10}, {'name': 'v8testing', 'variant': 'extra', 'shards': 10}, diff --git a/deps/v8/samples/cppgc/hello-world.cc b/deps/v8/samples/cppgc/hello-world.cc index fe0d002ab44760..65b7aa9db26d4d 100644 --- a/deps/v8/samples/cppgc/hello-world.cc +++ b/deps/v8/samples/cppgc/hello-world.cc @@ -57,7 +57,7 @@ int main(int argc, char* argv[]) { #endif // !CPPGC_IS_STANDALONE // Initialize the process. This must happen before any cppgc::Heap::Create() // calls. - cppgc::DefaultPlatform::InitializeProcess(cppgc_platform.get()); + cppgc::InitializeProcess(cppgc_platform->GetPageAllocator()); { // Create a managed heap. std::unique_ptr heap = cppgc::Heap::Create(cppgc_platform); diff --git a/deps/v8/src/api/api-arguments-inl.h b/deps/v8/src/api/api-arguments-inl.h index 786f849be6c148..5d437370bc0a08 100644 --- a/deps/v8/src/api/api-arguments-inl.h +++ b/deps/v8/src/api/api-arguments-inl.h @@ -87,24 +87,22 @@ inline JSReceiver FunctionCallbackArguments::holder() { ExternalCallbackScope call_scope(ISOLATE, FUNCTION_ADDR(F)); \ PropertyCallbackInfo callback_info(values_); -#define CREATE_NAMED_CALLBACK(FUNCTION, TYPE, RETURN_TYPE, API_RETURN_TYPE, \ - INFO_FOR_SIDE_EFFECT) \ - Handle PropertyCallbackArguments::CallNamed##FUNCTION( \ - Handle interceptor, Handle name) { \ - DCHECK_NAME_COMPATIBLE(interceptor, name); \ - Isolate* isolate = this->isolate(); \ - RCS_SCOPE(isolate, RuntimeCallCounterId::kNamed##FUNCTION##Callback); \ - Handle receiver_check_unsupported; \ - GenericNamedProperty##FUNCTION##Callback f = \ - ToCData( \ - interceptor->TYPE()); \ - PREPARE_CALLBACK_INFO(isolate, f, Handle, API_RETURN_TYPE, \ - INFO_FOR_SIDE_EFFECT, receiver_check_unsupported, \ - NotAccessor); \ - LOG(isolate, \ - ApiNamedPropertyAccess("interceptor-named-" #TYPE, holder(), *name)); \ - f(v8::Utils::ToLocal(name), callback_info); \ - return GetReturnValue(isolate); \ +#define CREATE_NAMED_CALLBACK(FUNCTION, TYPE, RETURN_TYPE, API_RETURN_TYPE, \ + INFO_FOR_SIDE_EFFECT) \ + Handle PropertyCallbackArguments::CallNamed##FUNCTION( \ + Handle interceptor, Handle name) { \ + DCHECK_NAME_COMPATIBLE(interceptor, name); \ + Isolate* isolate = this->isolate(); \ + RCS_SCOPE(isolate, RuntimeCallCounterId::kNamed##FUNCTION##Callback); \ + Handle receiver_check_unsupported; \ + GenericNamedProperty##FUNCTION##Callback f = \ + ToCData( \ + interceptor->TYPE()); \ + PREPARE_CALLBACK_INFO(isolate, f, Handle, API_RETURN_TYPE, \ + INFO_FOR_SIDE_EFFECT, receiver_check_unsupported, \ + NotAccessor); \ + f(v8::Utils::ToLocal(name), callback_info); \ + return GetReturnValue(isolate); \ } FOR_EACH_CALLBACK(CREATE_NAMED_CALLBACK) @@ -123,8 +121,6 @@ FOR_EACH_CALLBACK(CREATE_NAMED_CALLBACK) PREPARE_CALLBACK_INFO(isolate, f, Handle, API_RETURN_TYPE, \ INFO_FOR_SIDE_EFFECT, receiver_check_unsupported, \ NotAccessor); \ - LOG(isolate, ApiIndexedPropertyAccess("interceptor-indexed-" #TYPE, \ - holder(), index)); \ f(index, callback_info); \ return GetReturnValue(isolate); \ } @@ -136,7 +132,6 @@ FOR_EACH_CALLBACK(CREATE_INDEXED_CALLBACK) Handle FunctionCallbackArguments::Call(CallHandlerInfo handler) { Isolate* isolate = this->isolate(); - LOG(isolate, ApiObjectAccess("call", holder())); RCS_SCOPE(isolate, RuntimeCallCounterId::kFunctionCallback); v8::FunctionCallback f = v8::ToCData(handler.callback()); @@ -156,7 +151,6 @@ Handle FunctionCallbackArguments::Call(CallHandlerInfo handler) { Handle PropertyCallbackArguments::CallNamedEnumerator( Handle interceptor) { DCHECK(interceptor->is_named()); - LOG(isolate(), ApiObjectAccess("interceptor-named-enumerator", holder())); RCS_SCOPE(isolate(), RuntimeCallCounterId::kNamedEnumeratorCallback); return CallPropertyEnumerator(interceptor); } @@ -164,7 +158,6 @@ Handle PropertyCallbackArguments::CallNamedEnumerator( Handle PropertyCallbackArguments::CallIndexedEnumerator( Handle interceptor) { DCHECK(!interceptor->is_named()); - LOG(isolate(), ApiObjectAccess("interceptor-indexed-enumerator", holder())); RCS_SCOPE(isolate(), RuntimeCallCounterId::kIndexedEnumeratorCallback); return CallPropertyEnumerator(interceptor); } @@ -172,10 +165,7 @@ Handle PropertyCallbackArguments::CallIndexedEnumerator( Handle PropertyCallbackArguments::CallNamedGetter( Handle interceptor, Handle name) { DCHECK_NAME_COMPATIBLE(interceptor, name); - Isolate* isolate = this->isolate(); - RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedGetterCallback); - LOG(isolate, - ApiNamedPropertyAccess("interceptor-named-getter", holder(), *name)); + RCS_SCOPE(isolate(), RuntimeCallCounterId::kNamedGetterCallback); GenericNamedPropertyGetterCallback f = ToCData(interceptor->getter()); return BasicCallNamedGetterCallback(f, name, interceptor); @@ -184,10 +174,7 @@ Handle PropertyCallbackArguments::CallNamedGetter( Handle PropertyCallbackArguments::CallNamedDescriptor( Handle interceptor, Handle name) { DCHECK_NAME_COMPATIBLE(interceptor, name); - Isolate* isolate = this->isolate(); - RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedDescriptorCallback); - LOG(isolate, - ApiNamedPropertyAccess("interceptor-named-descriptor", holder(), *name)); + RCS_SCOPE(isolate(), RuntimeCallCounterId::kNamedDescriptorCallback); GenericNamedPropertyDescriptorCallback f = ToCData( interceptor->descriptor()); @@ -215,8 +202,6 @@ Handle PropertyCallbackArguments::CallNamedSetter( RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedSetterCallback); PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK(isolate, f, Handle, v8::Value); - LOG(isolate, - ApiNamedPropertyAccess("interceptor-named-set", holder(), *name)); f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), callback_info); return GetReturnValue(isolate); } @@ -231,8 +216,6 @@ Handle PropertyCallbackArguments::CallNamedDefiner( ToCData(interceptor->definer()); PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK(isolate, f, Handle, v8::Value); - LOG(isolate, - ApiNamedPropertyAccess("interceptor-named-define", holder(), *name)); f(v8::Utils::ToLocal(name), desc, callback_info); return GetReturnValue(isolate); } @@ -246,8 +229,6 @@ Handle PropertyCallbackArguments::CallIndexedSetter( ToCData(interceptor->setter()); PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK(isolate, f, Handle, v8::Value); - LOG(isolate, - ApiIndexedPropertyAccess("interceptor-indexed-set", holder(), index)); f(index, v8::Utils::ToLocal(value), callback_info); return GetReturnValue(isolate); } @@ -262,8 +243,6 @@ Handle PropertyCallbackArguments::CallIndexedDefiner( ToCData(interceptor->definer()); PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK(isolate, f, Handle, v8::Value); - LOG(isolate, - ApiIndexedPropertyAccess("interceptor-indexed-define", holder(), index)); f(index, desc, callback_info); return GetReturnValue(isolate); } @@ -271,10 +250,7 @@ Handle PropertyCallbackArguments::CallIndexedDefiner( Handle PropertyCallbackArguments::CallIndexedGetter( Handle interceptor, uint32_t index) { DCHECK(!interceptor->is_named()); - Isolate* isolate = this->isolate(); - RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedGetterCallback); - LOG(isolate, - ApiIndexedPropertyAccess("interceptor-indexed-getter", holder(), index)); + RCS_SCOPE(isolate(), RuntimeCallCounterId::kNamedGetterCallback); IndexedPropertyGetterCallback f = ToCData(interceptor->getter()); return BasicCallIndexedGetterCallback(f, index, interceptor); @@ -283,10 +259,7 @@ Handle PropertyCallbackArguments::CallIndexedGetter( Handle PropertyCallbackArguments::CallIndexedDescriptor( Handle interceptor, uint32_t index) { DCHECK(!interceptor->is_named()); - Isolate* isolate = this->isolate(); - RCS_SCOPE(isolate, RuntimeCallCounterId::kIndexedDescriptorCallback); - LOG(isolate, ApiIndexedPropertyAccess("interceptor-indexed-descriptor", - holder(), index)); + RCS_SCOPE(isolate(), RuntimeCallCounterId::kIndexedDescriptorCallback); IndexedPropertyDescriptorCallback f = ToCData(interceptor->descriptor()); return BasicCallIndexedGetterCallback(f, index, interceptor); @@ -323,7 +296,6 @@ Handle PropertyCallbackArguments::CallAccessorGetter( Handle info, Handle name) { Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kAccessorGetterCallback); - LOG(isolate, ApiNamedPropertyAccess("accessor-getter", holder(), *name)); AccessorNameGetterCallback f = ToCData(info->getter()); return BasicCallNamedGetterCallback(f, name, info, @@ -339,7 +311,6 @@ Handle PropertyCallbackArguments::CallAccessorSetter( ToCData(accessor_info->setter()); PREPARE_CALLBACK_INFO(isolate, f, Handle, void, accessor_info, handle(receiver(), isolate), Setter); - LOG(isolate, ApiNamedPropertyAccess("accessor-setter", holder(), *name)); f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), callback_info); return GetReturnValue(isolate); } diff --git a/deps/v8/src/api/api-macros.h b/deps/v8/src/api/api-macros.h index 07b2e2d0f20acb..9fbe9a973903ae 100644 --- a/deps/v8/src/api/api-macros.h +++ b/deps/v8/src/api/api-macros.h @@ -35,10 +35,9 @@ * TODO(verwaest): Remove calls form API methods to DO_NOT_USE macros. */ -#define LOG_API(isolate, class_name, function_name) \ - RCS_SCOPE(isolate, \ - i::RuntimeCallCounterId::kAPI_##class_name##_##function_name); \ - LOG(isolate, ApiEntryCall("v8::" #class_name "::" #function_name)) +#define API_RCS_SCOPE(isolate, class_name, function_name) \ + RCS_SCOPE(isolate, \ + i::RuntimeCallCounterId::kAPI_##class_name##_##function_name); #define ENTER_V8_DO_NOT_USE(isolate) i::VMState __state__((isolate)) @@ -50,7 +49,7 @@ } \ HandleScopeClass handle_scope(isolate); \ CallDepthScope call_depth_scope(isolate, context); \ - LOG_API(isolate, class_name, function_name); \ + API_RCS_SCOPE(isolate, class_name, function_name); \ i::VMState __state__((isolate)); \ bool has_pending_exception = false diff --git a/deps/v8/src/api/api-natives.cc b/deps/v8/src/api/api-natives.cc index 75109e35b7ece4..29b94d8dea1d71 100644 --- a/deps/v8/src/api/api-natives.cc +++ b/deps/v8/src/api/api-natives.cc @@ -386,7 +386,7 @@ bool IsSimpleInstantiation(Isolate* isolate, ObjectTemplateInfo info, if (fun.shared().function_data(kAcquireLoad) != info.constructor()) return false; if (info.immutable_proto()) return false; - return fun.context().native_context() == isolate->raw_native_context(); + return fun.native_context() == isolate->raw_native_context(); } MaybeHandle InstantiateObject(Isolate* isolate, diff --git a/deps/v8/src/api/api.cc b/deps/v8/src/api/api.cc index 29d4bea237acc4..a0ab21d71a378a 100644 --- a/deps/v8/src/api/api.cc +++ b/deps/v8/src/api/api.cc @@ -50,7 +50,6 @@ #endif // V8_ENABLE_WEBASSEMBLY #include "src/debug/liveedit.h" #include "src/deoptimizer/deoptimizer.h" -#include "src/diagnostics/gdb-jit.h" #include "src/execution/embedder-state.h" #include "src/execution/execution.h" #include "src/execution/frames-inl.h" @@ -157,9 +156,6 @@ #include "src/base/platform/wrappers.h" #include "src/diagnostics/unwinding-info-win64.h" #endif // V8_OS_WIN64 -#if defined(V8_ENABLE_SYSTEM_INSTRUMENTATION) -#include "src/diagnostics/system-jit-win.h" -#endif #endif // V8_OS_WIN // Has to be the last include (doesn't have include guards): @@ -814,7 +810,7 @@ namespace internal { i::Address* GlobalizeTracedReference(i::Isolate* isolate, i::Address* obj, internal::Address* slot, GlobalHandleStoreMode store_mode) { - LOG_API(isolate, TracedGlobal, New); + API_RCS_SCOPE(isolate, TracedGlobal, New); #ifdef DEBUG Utils::ApiCheck((slot != nullptr), "v8::GlobalizeTracedReference", "the address slot must be not null"); @@ -847,7 +843,7 @@ void DisposeTracedReference(internal::Address* location) { namespace api_internal { i::Address* GlobalizeReference(i::Isolate* isolate, i::Address* obj) { - LOG_API(isolate, Persistent, New); + API_RCS_SCOPE(isolate, Persistent, New); i::Handle result = isolate->global_handles()->Create(*obj); #ifdef VERIFY_HEAP if (i::FLAG_verify_heap) { @@ -1338,7 +1334,7 @@ Local FunctionTemplate::New( i::Isolate* i_isolate = reinterpret_cast(isolate); // Changes to the environment cannot be captured in the snapshot. Expect no // function templates when the isolate is created for serialization. - LOG_API(i_isolate, FunctionTemplate, New); + API_RCS_SCOPE(i_isolate, FunctionTemplate, New); if (!Utils::ApiCheck( !c_function || behavior == ConstructorBehavior::kThrow, @@ -1363,7 +1359,7 @@ Local FunctionTemplate::NewWithCFunctionOverloads( SideEffectType side_effect_type, const MemorySpan& c_function_overloads) { i::Isolate* i_isolate = reinterpret_cast(isolate); - LOG_API(i_isolate, FunctionTemplate, New); + API_RCS_SCOPE(i_isolate, FunctionTemplate, New); if (!Utils::ApiCheck( c_function_overloads.size() == 0 || @@ -1384,7 +1380,7 @@ Local FunctionTemplate::NewWithCache( Local data, Local signature, int length, SideEffectType side_effect_type) { i::Isolate* i_isolate = reinterpret_cast(isolate); - LOG_API(i_isolate, FunctionTemplate, NewWithCache); + API_RCS_SCOPE(i_isolate, FunctionTemplate, NewWithCache); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); return FunctionTemplateNew(i_isolate, callback, data, signature, length, ConstructorBehavior::kAllow, false, cache_property, @@ -1567,7 +1563,7 @@ Local ObjectTemplate::New( static Local ObjectTemplateNew( i::Isolate* isolate, v8::Local constructor, bool do_not_cache) { - LOG_API(isolate, ObjectTemplate, New); + API_RCS_SCOPE(isolate, ObjectTemplate, New); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); i::Handle struct_obj = isolate->factory()->NewStruct( i::OBJECT_TEMPLATE_INFO_TYPE, i::AllocationType::kOld); @@ -2031,8 +2027,7 @@ Local