diff --git a/benchmark/worker/atomics-wait.js b/benchmark/worker/atomics-wait.js index 2e6e01f881c66a..53d71ff9224a11 100644 --- a/benchmark/worker/atomics-wait.js +++ b/benchmark/worker/atomics-wait.js @@ -4,10 +4,6 @@ if (typeof SharedArrayBuffer === 'undefined') { throw new Error('SharedArrayBuffers must be enabled to run this benchmark'); } -if (typeof Atomics === 'undefined') { - throw new Error('Atomics must be enabled to run this benchmark'); -} - const common = require('../common.js'); const bench = common.createBenchmark(main, { n: [1e7], diff --git a/common.gypi b/common.gypi index bbf9522a2f8e00..071a27afc2fd59 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,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.19', + 'v8_embedder_string': '-node.12', ##### V8 defaults for Node.js ##### diff --git a/configure.py b/configure.py index 62f041ce52bf85..8be9e9ca5c4af8 100755 --- a/configure.py +++ b/configure.py @@ -1498,6 +1498,7 @@ def configure_v8(o): o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0 o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0 o['variables']['v8_enable_shared_ro_heap'] = 0 if options.enable_pointer_compression or options.disable_shared_ro_heap else 1 + o['variables']['v8_enable_extensible_ro_snapshot'] = 0 o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0 o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform) o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8) diff --git a/deps/v8/.clang-format b/deps/v8/.clang-format index 55479a2f760845..bd7d80dfb7b964 100644 --- a/deps/v8/.clang-format +++ b/deps/v8/.clang-format @@ -3,3 +3,4 @@ BasedOnStyle: Google DerivePointerAlignment: false MaxEmptyLinesToKeep: 1 +IfMacros: ['IF', 'IF_NOT', 'ELSE', 'ELSE_IF'] diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index ed10b522706058..820bac62f897a5 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -63,6 +63,8 @@ /test/wasm-spec-tests/tests.tar.gz /third_party/* !/third_party/antlr4 +!/third_party/cpu_features +/third_party/cpu_features/src !/third_party/inspector_protocol !/third_party/jsoncpp /third_party/jsoncpp/source @@ -94,6 +96,7 @@ /tools/turbolizer/build /tools/turbolizer/.rpt2_cache /tools/turbolizer/deploy +/tools/v8heapconst.py /tools/visual_studio/Debug /tools/visual_studio/Release /v8.log.ll diff --git a/deps/v8/.gn b/deps/v8/.gn index 8edbdf34c51807..1ca4a2e4684b45 100644 --- a/deps/v8/.gn +++ b/deps/v8/.gn @@ -19,8 +19,8 @@ no_check_targets = [ "//:cppgc_base", "//:v8_internal_headers", "//src/inspector:inspector", - "//test/cctest:cctest_sources", # 15 errors - "//test/unittests:inspector_unittests_sources", # 2 errors + "//test/cctest:cctest_sources", # 15 errors + "//test/unittests:inspector_unittests_sources", # 2 errors "//third_party/icu:*", ] @@ -28,6 +28,9 @@ default_args = { # Overwrite default args declared in the Fuchsia sdk # Please maintain this in sync with Chromium version in src/.gn fuchsia_target_api_level = 9 + + # Disable rust dependencies. + enable_rust = false } # These are the list of GN files that run exec_script. This whitelist exists diff --git a/deps/v8/.vpython3 b/deps/v8/.vpython3 index 1187542f5e19a1..c4adffad12ea28 100644 --- a/deps/v8/.vpython3 +++ b/deps/v8/.vpython3 @@ -75,7 +75,24 @@ wheel: < version: "version:3.19.3" > +# requests and its dependencies. wheel: < - name: "infra/python/wheels/requests-py2_py3" - version: "version:2.13.0" + name: "infra/python/wheels/requests-py3" + version: "version:2.31.0" +> +wheel: < + name: "infra/python/wheels/urllib3-py2_py3" + version: "version:1.26.6" +> +wheel: < + name: "infra/python/wheels/idna-py2_py3" + version: "version:2.8" +> +wheel: < + name: "infra/python/wheels/certifi-py2_py3" + version: "version:2020.11.8" +> +wheel: < + name: "infra/python/wheels/charset_normalizer-py3" + version: "version:2.0.4" > diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index d84c722b8dcb7b..b9b702c5d22400 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -69,6 +69,8 @@ Anton Bershanskiy <8knots@protonmail.com> Anton Bikineev Ao Wang Archil Sharashenidze +Arthur Islamov +Aurèle Barrière Bala Avulapati Bangfu Tao Ben Coe @@ -110,6 +112,7 @@ Dominic Farolini Douglas Crosher Dusan Milosavljevic Eden Wang +Elisha Hollander Eric Rannaud Erich Ocean Evan Lucas @@ -133,6 +136,7 @@ Harshil Jain Henrique Ferreiro Hirofumi Mako Hisham Muhammad +Ho Cheung Honggyu Kim Huáng Jùnliàng HyeockJin Kim @@ -149,6 +153,7 @@ Jan de Mooij Janusz Majnert Javad Amiri Jay Freeman +Jérôme Vouillon Jesper van den Ende Ji Qiu Jiawen Geng @@ -167,6 +172,7 @@ Kang-Hao (Kenny) Lu Karl Skomski Keith Smiley Kevin Gibbons +Keyhan Vakil Kris Selden Kyounga Ra Loo Rong Jie @@ -178,6 +184,7 @@ Maciej Małecki Marcel Laverdet Marcin Cieślak Marcin Wiącek +Marisa Kirisame Martin Bidlingmaier Mateusz Czeladka Matheus Marchini @@ -187,6 +194,7 @@ Matt Hanselman Matthew Sporleder Maxim Mazurok Maxim Mossienko +Meir Shpilraien Michael Lutz Michael Mclaughlin Michael Smith @@ -239,16 +247,19 @@ Sakthipriyan Vairamani (thefourtheye) Sander Mathijs van Veen Sandro Santilli Sanjoy Das +Sam James Seo Sanghyeon Shawn Anastasio Shawn Presser Stefan Penner +Stefan Stojanovic Stephan Hartmann Stephen Belanger Sylvestre Ledru Takeshi Yoneda Taketoshi Aono Tao Liqiang +Tao Wang Teddy Katz Thomas Young Tiancheng "Timothy" Gu @@ -265,6 +276,7 @@ Vlad Burlik Vladimir Krivosheev Vladimir Shutoff Wael Almattar +Wang Chen WANG Xuerui Wei Wu Wenlu Wang diff --git a/deps/v8/BUILD.bazel b/deps/v8/BUILD.bazel index 81a9286d2670de..3308433ce78dfe 100644 --- a/deps/v8/BUILD.bazel +++ b/deps/v8/BUILD.bazel @@ -16,8 +16,7 @@ load( "v8_library", "v8_mksnapshot", "v8_string", - "v8_torque_definitions", - "v8_torque_initializers", + "v8_torque_files", ) load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression") @@ -30,7 +29,6 @@ load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression # v8_embed_script # v8_embedder_string # v8_promise_internal_field_count -# v8_enable_vtunejit # v8_enable_vtunetracemark # v8_enable_fast_torque # v8_win64_unwinding_info @@ -40,8 +38,10 @@ load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression # v8_enable_trace_baseline_exec # v8_enable_trace_feedback_updates # v8_enable_atomic_object_field_writes -# v8_enable_conservative_stack_scanning # v8_enable_concurrent_marking +# v8_enable_conservative_stack_scanning +# v8_enable_direct_handle +# v8_enable_direct_local # v8_enable_ignition_dispatch_counting # v8_enable_builtins_optimization # v8_enable_builtins_profiling @@ -56,7 +56,6 @@ load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression # v8_use_mips_abi_hardfloat # v8_enable_gdbjit # v8_check_header_includes -# v8_enable_shared_ro_heap # v8_enable_lazy_source_positions # v8_enable_third_party_heap # v8_third_party_heap_files @@ -227,6 +226,18 @@ v8_flag( default = True, ) +# Shared RO heap. Flag has to be set to false when +# v8_enable_pointer_compression_shared_cage is set to false. +v8_flag( + name = "v8_enable_shared_ro_heap", + default = True, +) + +v8_flag( + name = "v8_enable_extensible_ro_snapshot", + default = True, +) + # Enable shared cage if v8_enable_pointer_compression # and v8_enable_pointer_compression_shared_cage. selects.config_setting_group( @@ -270,6 +281,12 @@ config_setting( }, ) +# Enable VTune jit profiling +v8_flag( + name = "v8_enable_vtunejit", + default = False, +) + # 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( @@ -340,6 +357,7 @@ v8_config( "v8_enable_verify_predictable": "VERIFY_PREDICTABLE", "v8_enable_webassembly": "V8_ENABLE_WEBASSEMBLY", "v8_jitless": "V8_JITLESS", + "v8_enable_vtunejit": "ENABLE_VTUNE_JIT_INTERFACE", }, defines = [ "GOOGLE3", @@ -412,6 +430,14 @@ v8_config( "V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE", ], "//conditions:default": [], + }) + select({ + ":is_v8_enable_shared_ro_heap": [ + "V8_SHARED_RO_HEAP", + ], + }) + select({ + ":is_v8_enable_extensible_ro_snapshot": [ + "V8_ENABLE_EXTENSIBLE_RO_SNAPSHOT", + ], }) + select({ ":is_v8_enable_short_builtin_calls": [ "V8_SHORT_BUILTIN_CALLS", @@ -449,6 +475,7 @@ filegroup( name = "v8_config_headers_files", srcs = [ "include/v8-platform.h", + "include/v8-source-location.h", "include/v8config.h", ], ) @@ -481,8 +508,8 @@ filegroup( "include/cppgc/internal/api-constants.h", "include/cppgc/internal/atomic-entry-flag.h", "include/cppgc/internal/base-page-handle.h", - "include/cppgc/internal/caged-heap-local-data.h", "include/cppgc/internal/caged-heap.h", + "include/cppgc/internal/caged-heap-local-data.h", "include/cppgc/internal/compiler-specific.h", "include/cppgc/internal/finalizer-trait.h", "include/cppgc/internal/gc-info.h", @@ -530,6 +557,7 @@ filegroup( "include/v8-forward.h", "include/v8-function.h", "include/v8-function-callback.h", + "include/v8-handle-base.h", "include/v8-initialization.h", "include/v8-internal.h", "include/v8-isolate.h", @@ -594,18 +622,14 @@ filegroup( filegroup( name = "v8_libbase_files", srcs = [ - ":v8_flags", - ":v8_config_headers_files", - ":v8_headers_files", - "src/base/vlq.h", "src/base/address-region.h", "src/base/atomic-utils.h", "src/base/atomicops.h", "src/base/base-export.h", "src/base/bit-field.h", - "src/base/bits-iterator.h", "src/base/bits.cc", "src/base/bits.h", + "src/base/bits-iterator.h", "src/base/bounded-page-allocator.cc", "src/base/bounded-page-allocator.h", "src/base/bounds.h", @@ -617,6 +641,7 @@ filegroup( "src/base/cpu.h", "src/base/debug/stack_trace.cc", "src/base/debug/stack_trace.h", + "src/base/discriminated-union.h", "src/base/division-by-constant.cc", "src/base/division-by-constant.h", "src/base/emulated-virtual-address-subspace.cc", @@ -628,21 +653,22 @@ filegroup( "src/base/flags.h", "src/base/free_deleter.h", "src/base/functional.h", - "src/base/hashmap-entry.h", "src/base/hashmap.h", + "src/base/hashmap-entry.h", "src/base/ieee754.cc", "src/base/ieee754.h", "src/base/immediate-crash.h", + "src/base/intrusive-set.h", "src/base/iterator.h", "src/base/lazy-instance.h", "src/base/logging.cc", "src/base/logging.h", "src/base/macros.h", "src/base/memory.h", - "src/base/numbers/bignum-dtoa.cc", - "src/base/numbers/bignum-dtoa.h", "src/base/numbers/bignum.cc", "src/base/numbers/bignum.h", + "src/base/numbers/bignum-dtoa.cc", + "src/base/numbers/bignum-dtoa.h", "src/base/numbers/cached-powers.cc", "src/base/numbers/cached-powers.h", "src/base/numbers/diy-fp.cc", @@ -670,20 +696,22 @@ filegroup( "src/base/platform/memory-protection-key.h", "src/base/platform/mutex.cc", "src/base/platform/mutex.h", - "src/base/platform/platform.h", "src/base/platform/platform.cc", + "src/base/platform/platform.h", "src/base/platform/semaphore.cc", "src/base/platform/semaphore.h", "src/base/platform/time.cc", "src/base/platform/time.h", - "src/base/pointer-with-payload.h", "src/base/platform/wrappers.h", + "src/base/platform/yield-processor.h", + "src/base/pointer-with-payload.h", "src/base/region-allocator.cc", "src/base/region-allocator.h", "src/base/ring-buffer.h", "src/base/safe_conversions.h", "src/base/safe_conversions_arm_impl.h", "src/base/safe_conversions_impl.h", + "src/base/small-map.h", "src/base/small-vector.h", "src/base/string-format.h", "src/base/strings.cc", @@ -691,19 +719,22 @@ filegroup( "src/base/sys-info.cc", "src/base/sys-info.h", "src/base/template-utils.h", - "src/base/timezone-cache.h", "src/base/threaded-list.h", + "src/base/timezone-cache.h", "src/base/utils/random-number-generator.cc", "src/base/utils/random-number-generator.h", + "src/base/v8-fallthrough.h", "src/base/vector.h", - "src/base/virtual-address-space-page-allocator.cc", - "src/base/virtual-address-space-page-allocator.h", "src/base/virtual-address-space.cc", "src/base/virtual-address-space.h", - "src/base/v8-fallthrough.h", + "src/base/virtual-address-space-page-allocator.cc", + "src/base/virtual-address-space-page-allocator.h", + "src/base/vlq.h", "src/base/vlq-base64.cc", "src/base/vlq-base64.h", - "src/base/platform/yield-processor.h", + ":v8_config_headers_files", + ":v8_flags", + ":v8_headers_files", ] + select({ "@v8//bazel/config:is_posix": [ "src/base/platform/platform-posix.cc", @@ -721,15 +752,16 @@ filegroup( "@v8//bazel/config:is_android": [ "src/base/debug/stack_trace_android.cc", "src/base/platform/platform-linux.cc", + "src/base/platform/platform-linux.h", ], "@v8//bazel/config:is_macos": [ "src/base/debug/stack_trace_posix.cc", "src/base/platform/platform-darwin.cc", ], "@v8//bazel/config:is_windows": [ - "src/base/win32-headers.h", "src/base/debug/stack_trace_win.cc", "src/base/platform/platform-win32.cc", + "src/base/win32-headers.h", ], }), visibility = ["//visibility:public"], @@ -747,6 +779,8 @@ filegroup( "src/libplatform/default-job.h", "src/libplatform/default-platform.cc", "src/libplatform/default-platform.h", + "src/libplatform/default-thread-isolated-allocator.cc", + "src/libplatform/default-thread-isolated-allocator.h", "src/libplatform/default-worker-threads-task-runner.cc", "src/libplatform/default-worker-threads-task-runner.h", "src/libplatform/delayed-task-queue.cc", @@ -783,6 +817,7 @@ filegroup( name = "noicu/torque_files", srcs = [ "src/builtins/aggregate-error.tq", + "src/builtins/array.tq", "src/builtins/array-at.tq", "src/builtins/array-concat.tq", "src/builtins/array-copywithin.tq", @@ -799,8 +834,8 @@ filegroup( "src/builtins/array-lastindexof.tq", "src/builtins/array-map.tq", "src/builtins/array-of.tq", - "src/builtins/array-reduce-right.tq", "src/builtins/array-reduce.tq", + "src/builtins/array-reduce-right.tq", "src/builtins/array-reverse.tq", "src/builtins/array-shift.tq", "src/builtins/array-slice.tq", @@ -811,7 +846,6 @@ filegroup( "src/builtins/array-to-spliced.tq", "src/builtins/array-unshift.tq", "src/builtins/array-with.tq", - "src/builtins/array.tq", "src/builtins/arraybuffer.tq", "src/builtins/base.tq", "src/builtins/boolean.tq", @@ -819,39 +853,43 @@ filegroup( "src/builtins/builtins-string.tq", "src/builtins/cast.tq", "src/builtins/collections.tq", + "src/builtins/console.tq", "src/builtins/constructor.tq", "src/builtins/conversion.tq", "src/builtins/convert.tq", - "src/builtins/console.tq", "src/builtins/data-view.tq", "src/builtins/finalization-registry.tq", - "src/builtins/frames.tq", "src/builtins/frame-arguments.tq", + "src/builtins/frames.tq", "src/builtins/function.tq", "src/builtins/growable-fixed-array.tq", - "src/builtins/ic-callable.tq", "src/builtins/ic.tq", - "src/builtins/internal-coverage.tq", + "src/builtins/ic-callable.tq", "src/builtins/internal.tq", + "src/builtins/internal-coverage.tq", "src/builtins/iterator.tq", "src/builtins/iterator-from.tq", "src/builtins/iterator-helpers.tq", + "src/builtins/map-groupby.tq", "src/builtins/math.tq", "src/builtins/number.tq", - "src/builtins/object-fromentries.tq", "src/builtins/object.tq", + "src/builtins/object-fromentries.tq", + "src/builtins/object-groupby.tq", "src/builtins/promise-abstract-operations.tq", "src/builtins/promise-all.tq", "src/builtins/promise-all-element-closure.tq", "src/builtins/promise-any.tq", "src/builtins/promise-constructor.tq", "src/builtins/promise-finally.tq", + "src/builtins/promise-jobs.tq", "src/builtins/promise-misc.tq", "src/builtins/promise-race.tq", "src/builtins/promise-reaction-job.tq", "src/builtins/promise-resolve.tq", "src/builtins/promise-then.tq", - "src/builtins/promise-jobs.tq", + "src/builtins/promise-withresolvers.tq", + "src/builtins/proxy.tq", "src/builtins/proxy-constructor.tq", "src/builtins/proxy-delete-property.tq", "src/builtins/proxy-get-property.tq", @@ -863,17 +901,23 @@ filegroup( "src/builtins/proxy-revoke.tq", "src/builtins/proxy-set-property.tq", "src/builtins/proxy-set-prototype-of.tq", - "src/builtins/proxy.tq", "src/builtins/reflect.tq", + "src/builtins/regexp.tq", "src/builtins/regexp-exec.tq", - "src/builtins/regexp-match-all.tq", "src/builtins/regexp-match.tq", + "src/builtins/regexp-match-all.tq", "src/builtins/regexp-replace.tq", "src/builtins/regexp-search.tq", "src/builtins/regexp-source.tq", "src/builtins/regexp-split.tq", "src/builtins/regexp-test.tq", - "src/builtins/regexp.tq", + "src/builtins/set-difference.tq", + "src/builtins/set-intersection.tq", + "src/builtins/set-is-disjoint-from.tq", + "src/builtins/set-is-subset-of.tq", + "src/builtins/set-is-superset-of.tq", + "src/builtins/set-symmetric-difference.tq", + "src/builtins/set-union.tq", "src/builtins/string-at.tq", "src/builtins/string-endswith.tq", "src/builtins/string-html.tq", @@ -893,10 +937,11 @@ filegroup( "src/builtins/string-trim.tq", "src/builtins/symbol.tq", "src/builtins/torque-internal.tq", + "src/builtins/typed-array.tq", "src/builtins/typed-array-at.tq", "src/builtins/typed-array-createtypedarray.tq", - "src/builtins/typed-array-every.tq", "src/builtins/typed-array-entries.tq", + "src/builtins/typed-array-every.tq", "src/builtins/typed-array-filter.tq", "src/builtins/typed-array-find.tq", "src/builtins/typed-array-findindex.tq", @@ -917,16 +962,15 @@ filegroup( "src/builtins/typed-array-to-sorted.tq", "src/builtins/typed-array-values.tq", "src/builtins/typed-array-with.tq", - "src/builtins/typed-array.tq", "src/builtins/weak-ref.tq", "src/ic/handler-configuration.tq", "src/objects/allocation-site.tq", "src/objects/api-callbacks.tq", "src/objects/arguments.tq", "src/objects/bigint.tq", + "src/objects/bytecode-array.tq", "src/objects/call-site-info.tq", "src/objects/cell.tq", - "src/objects/code.tq", "src/objects/contexts.tq", "src/objects/data-handler.tq", "src/objects/debug-objects.tq", @@ -939,11 +983,11 @@ filegroup( "src/objects/free-space.tq", "src/objects/heap-number.tq", "src/objects/heap-object.tq", - "src/objects/js-array-buffer.tq", "src/objects/js-array.tq", + "src/objects/js-array-buffer.tq", "src/objects/js-atomics-synchronization.tq", - "src/objects/js-collection-iterator.tq", "src/objects/js-collection.tq", + "src/objects/js-collection-iterator.tq", "src/objects/js-function.tq", "src/objects/js-generator.tq", "src/objects/js-iterator-helpers.tq", @@ -951,8 +995,8 @@ filegroup( "src/objects/js-promise.tq", "src/objects/js-proxy.tq", "src/objects/js-raw-json.tq", - "src/objects/js-regexp-string-iterator.tq", "src/objects/js-regexp.tq", + "src/objects/js-regexp-string-iterator.tq", "src/objects/js-shadow-realm.tq", "src/objects/js-shared-array.tq", "src/objects/js-struct.tq", @@ -965,6 +1009,7 @@ filegroup( "src/objects/module.tq", "src/objects/name.tq", "src/objects/oddball.tq", + "src/objects/hole.tq", "src/objects/ordered-hash-table.tq", "src/objects/primitive-heap-object.tq", "src/objects/promise.tq", @@ -991,7 +1036,10 @@ filegroup( "third_party/v8/builtins/array-sort.tq", ] + select({ ":is_v8_enable_webassembly": [ + "src/builtins/js-to-wasm.tq", "src/builtins/wasm.tq", + "src/builtins/wasm-strings.tq", + "src/builtins/wasm-to-js.tq", "src/debug/debug-wasm-objects.tq", "src/wasm/wasm-objects.tq", ], @@ -1023,8 +1071,8 @@ filegroup( filegroup( name = "torque_base_files", srcs = [ - "src/numbers/integer-literal-inl.h", "src/numbers/integer-literal.h", + "src/numbers/integer-literal-inl.h", "src/torque/ast.h", "src/torque/cc-generator.cc", "src/torque/cc-generator.h", @@ -1089,34 +1137,31 @@ selects.config_setting_group( filegroup( name = "v8_base_without_compiler_files", srcs = [ - ":cppgc_base_files", - ":v8_heap_base_files", - ":v8_bigint", - ":generated_bytecode_builtins_list", "include/cppgc/common.h", - "include/v8-inspector-protocol.h", "include/v8-inspector.h", + "include/v8-inspector-protocol.h", "include/v8-metrics.h", "include/v8-unwinder-state.h", "include/v8-wasm-trap-handler-posix.h", - "src/api/api-arguments-inl.h", + "src/api/api.cc", + "src/api/api.h", "src/api/api-arguments.cc", "src/api/api-arguments.h", + "src/api/api-arguments-inl.h", "src/api/api-inl.h", "src/api/api-macros.h", "src/api/api-macros-undef.h", "src/api/api-natives.cc", "src/api/api-natives.h", - "src/api/api.cc", - "src/api/api.h", + "src/asmjs/asm-js.h", + "src/ast/ast.cc", + "src/ast/ast.h", "src/ast/ast-function-literal-id-reindexer.cc", "src/ast/ast-function-literal-id-reindexer.h", "src/ast/ast-source-ranges.h", "src/ast/ast-traversal-visitor.h", "src/ast/ast-value-factory.cc", "src/ast/ast-value-factory.h", - "src/ast/ast.cc", - "src/ast/ast.h", "src/ast/modules.cc", "src/ast/modules.h", "src/ast/prettyprinter.cc", @@ -1127,18 +1172,27 @@ filegroup( "src/ast/source-range-ast-visitor.h", "src/ast/variables.cc", "src/ast/variables.h", - "src/baseline/baseline-assembler-inl.h", - "src/baseline/baseline-assembler.h", - "src/baseline/baseline-compiler.cc", - "src/baseline/baseline-compiler.h", + "src/base/sanitizer/asan.h", + "src/base/sanitizer/lsan-page-allocator.cc", + "src/base/sanitizer/lsan-page-allocator.h", + "src/base/sanitizer/lsan-virtual-address-space.cc", + "src/base/sanitizer/lsan-virtual-address-space.h", + "src/base/sanitizer/msan.h", + "src/base/sanitizer/tsan.h", "src/baseline/baseline.cc", "src/baseline/baseline.h", - "src/baseline/baseline-batch-compiler.h", + "src/baseline/baseline-assembler.h", + "src/baseline/baseline-assembler-inl.h", "src/baseline/baseline-batch-compiler.cc", - "src/baseline/bytecode-offset-iterator.h", + "src/baseline/baseline-batch-compiler.h", + "src/baseline/baseline-compiler.cc", + "src/baseline/baseline-compiler.h", "src/baseline/bytecode-offset-iterator.cc", + "src/baseline/bytecode-offset-iterator.h", "src/builtins/accessors.cc", "src/builtins/accessors.h", + "src/builtins/builtins.cc", + "src/builtins/builtins.h", "src/builtins/builtins-api.cc", "src/builtins/builtins-array.cc", "src/builtins/builtins-arraybuffer.cc", @@ -1164,28 +1218,26 @@ filegroup( "src/builtins/builtins-reflect.cc", "src/builtins/builtins-regexp.cc", "src/builtins/builtins-shadow-realm.cc", - "src/builtins/builtins-sharedarraybuffer.cc", "src/builtins/builtins-shared-array.cc", + "src/builtins/builtins-sharedarraybuffer.cc", "src/builtins/builtins-string.cc", "src/builtins/builtins-struct.cc", "src/builtins/builtins-symbol.cc", "src/builtins/builtins-temporal.cc", "src/builtins/builtins-trace.cc", "src/builtins/builtins-typed-array.cc", - "src/builtins/builtins-utils-inl.h", "src/builtins/builtins-utils.h", + "src/builtins/builtins-utils-inl.h", "src/builtins/builtins-weak-refs.cc", - "src/builtins/builtins.cc", - "src/builtins/builtins.h", "src/builtins/constants-table-builder.cc", "src/builtins/constants-table-builder.h", "src/builtins/profile-data-reader.h", - "src/codegen/aligned-slot-allocator.h", "src/codegen/aligned-slot-allocator.cc", - "src/codegen/assembler-arch.h", - "src/codegen/assembler-inl.h", + "src/codegen/aligned-slot-allocator.h", "src/codegen/assembler.cc", "src/codegen/assembler.h", + "src/codegen/assembler-arch.h", + "src/codegen/assembler-inl.h", "src/codegen/atomic-memory-order.h", "src/codegen/background-merge-task.h", "src/codegen/bailout-reason.cc", @@ -1207,68 +1259,70 @@ filegroup( "src/codegen/constant-pool.h", "src/codegen/constants-arch.h", "src/codegen/cpu-features.h", + "src/codegen/external-reference.cc", + "src/codegen/external-reference.h", "src/codegen/external-reference-encoder.cc", "src/codegen/external-reference-encoder.h", "src/codegen/external-reference-table.cc", "src/codegen/external-reference-table.h", - "src/codegen/external-reference.cc", - "src/codegen/external-reference.h", "src/codegen/flush-instruction-cache.cc", "src/codegen/flush-instruction-cache.h", "src/codegen/handler-table.cc", "src/codegen/handler-table.h", "src/codegen/interface-descriptors.cc", - "src/codegen/interface-descriptors-inl.h", "src/codegen/interface-descriptors.h", + "src/codegen/interface-descriptors-inl.h", "src/codegen/label.h", + "src/codegen/linkage-location.h", "src/codegen/machine-type.cc", "src/codegen/machine-type.h", - "src/codegen/macro-assembler-inl.h", "src/codegen/macro-assembler.h", + "src/codegen/macro-assembler-base.cc", + "src/codegen/macro-assembler-base.h", + "src/codegen/macro-assembler-inl.h", "src/codegen/maglev-safepoint-table.cc", "src/codegen/maglev-safepoint-table.h", "src/codegen/optimized-compilation-info.cc", "src/codegen/optimized-compilation-info.h", "src/codegen/pending-optimization-table.cc", "src/codegen/pending-optimization-table.h", + "src/codegen/register.h", "src/codegen/register-arch.h", "src/codegen/register-base.h", "src/codegen/register-configuration.cc", "src/codegen/register-configuration.h", - "src/codegen/register.h", - "src/codegen/reglist-base.h", "src/codegen/reglist.h", + "src/codegen/reglist-base.h", "src/codegen/reloc-info.cc", "src/codegen/reloc-info.h", - "src/codegen/safepoint-table-base.h", + "src/codegen/reloc-info-inl.h", "src/codegen/safepoint-table.cc", "src/codegen/safepoint-table.h", + "src/codegen/safepoint-table-base.h", "src/codegen/script-details.h", "src/codegen/signature.h", - "src/codegen/source-position-table.cc", - "src/codegen/source-position-table.h", "src/codegen/source-position.cc", "src/codegen/source-position.h", + "src/codegen/source-position-table.cc", + "src/codegen/source-position-table.h", "src/codegen/tick-counter.cc", "src/codegen/tick-counter.h", "src/codegen/tnode.cc", "src/codegen/tnode.h", - "src/codegen/macro-assembler-base.cc", - "src/codegen/macro-assembler-base.h", "src/codegen/unoptimized-compilation-info.cc", "src/codegen/unoptimized-compilation-info.h", "src/common/assert-scope.cc", "src/common/assert-scope.h", "src/common/checks.h", - "src/common/code-memory-access-inl.h", "src/common/code-memory-access.cc", "src/common/code-memory-access.h", + "src/common/code-memory-access-inl.h", "src/common/high-allocation-throughput-scope.h", "src/common/message-template.h", "src/common/operation.h", - "src/common/ptr-compr-inl.h", "src/common/ptr-compr.cc", "src/common/ptr-compr.h", + "src/common/ptr-compr-inl.h", "src/compiler-dispatcher/lazy-compile-dispatcher.cc", "src/compiler-dispatcher/lazy-compile-dispatcher.h", "src/compiler-dispatcher/optimizing-compile-dispatcher.cc", @@ -1276,9 +1330,11 @@ filegroup( "src/compiler/turbofan.h", "src/date/date.cc", "src/date/date.h", - "src/date/dateparser-inl.h", "src/date/dateparser.cc", "src/date/dateparser.h", + "src/date/dateparser-inl.h", + "src/debug/debug.cc", + "src/debug/debug.h", "src/debug/debug-coverage.cc", "src/debug/debug-coverage.h", "src/debug/debug-evaluate.cc", @@ -1295,13 +1351,11 @@ filegroup( "src/debug/debug-scopes.h", "src/debug/debug-stack-trace-iterator.cc", "src/debug/debug-stack-trace-iterator.h", - "src/debug/debug.cc", - "src/debug/debug.h", "src/debug/interface-types.h", - "src/debug/liveedit-diff.cc", - "src/debug/liveedit-diff.h", "src/debug/liveedit.cc", "src/debug/liveedit.h", + "src/debug/liveedit-diff.cc", + "src/debug/liveedit-diff.h", "src/deoptimizer/deoptimize-reason.cc", "src/deoptimizer/deoptimize-reason.h", "src/deoptimizer/deoptimized-frame-info.cc", @@ -1309,12 +1363,12 @@ filegroup( "src/deoptimizer/deoptimizer.cc", "src/deoptimizer/deoptimizer.h", "src/deoptimizer/frame-description.h", + "src/deoptimizer/frame-translation-builder.cc", + "src/deoptimizer/frame-translation-builder.h", "src/deoptimizer/materialized-object-store.cc", "src/deoptimizer/materialized-object-store.h", "src/deoptimizer/translated-state.cc", "src/deoptimizer/translated-state.h", - "src/deoptimizer/translation-array.cc", - "src/deoptimizer/translation-array.h", "src/deoptimizer/translation-opcode.h", "src/diagnostics/basic-block-profiler.cc", "src/diagnostics/basic-block-profiler.h", @@ -1334,48 +1388,47 @@ filegroup( "src/diagnostics/perf-jit.h", "src/diagnostics/unwinder.cc", "src/diagnostics/unwinder.h", - "src/execution/arguments-inl.h", "src/execution/arguments.cc", "src/execution/arguments.h", + "src/execution/arguments-inl.h", "src/execution/clobber-registers.cc", "src/execution/clobber-registers.h", + "src/execution/embedder-state.cc", + "src/execution/embedder-state.h", "src/execution/encoded-c-signature.cc", "src/execution/encoded-c-signature.h", - "src/execution/embedder-state.h", - "src/execution/embedder-state.cc", "src/execution/execution.cc", "src/execution/execution.h", "src/execution/frame-constants.h", - "src/execution/frames-inl.h", "src/execution/frames.cc", "src/execution/frames.h", + "src/execution/frames-inl.h", "src/execution/futex-emulation.cc", "src/execution/futex-emulation.h", "src/execution/interrupts-scope.cc", "src/execution/interrupts-scope.h", + "src/execution/isolate.cc", + "src/execution/isolate.h", "src/execution/isolate-data.h", "src/execution/isolate-inl.h", "src/execution/isolate-utils.h", "src/execution/isolate-utils-inl.h", - "src/snapshot/embedded/platform-embedded-file-writer-base.h", - "src/snapshot/embedded/embedded-file-writer.h", - "src/execution/isolate.cc", - "src/execution/isolate.h", - "src/execution/local-isolate-inl.h", "src/execution/local-isolate.cc", "src/execution/local-isolate.h", + "src/execution/local-isolate-inl.h", "src/execution/messages.cc", "src/execution/messages.h", "src/execution/microtask-queue.cc", "src/execution/microtask-queue.h", "src/execution/pointer-authentication.h", - "src/execution/protectors-inl.h", + "src/execution/pointer-authentication-dummy.h", "src/execution/protectors.cc", "src/execution/protectors.h", + "src/execution/protectors-inl.h", "src/execution/shared-mutex-guard-if-off-thread.h", + "src/execution/simulator.h", "src/execution/simulator-base.cc", "src/execution/simulator-base.h", - "src/execution/simulator.h", "src/execution/stack-guard.cc", "src/execution/stack-guard.h", "src/execution/thread-id.cc", @@ -1386,8 +1439,8 @@ filegroup( "src/execution/tiering-manager.h", "src/execution/v8threads.cc", "src/execution/v8threads.h", - "src/execution/vm-state-inl.h", "src/execution/vm-state.h", + "src/execution/vm-state-inl.h", "src/extensions/cputracemark-extension.cc", "src/extensions/cputracemark-extension.h", "src/extensions/externalize-string-extension.cc", @@ -1403,48 +1456,45 @@ filegroup( "src/flags/flag-definitions.h", "src/flags/flags.cc", "src/flags/flags.h", - "src/handles/global-handles-inl.h", "src/handles/global-handles.cc", "src/handles/global-handles.h", - "src/handles/traced-handles.cc", - "src/handles/traced-handles.h", - "src/handles/handles-inl.h", + "src/handles/global-handles-inl.h", "src/handles/handles.cc", "src/handles/handles.h", - "src/handles/local-handles-inl.h", + "src/handles/handles-inl.h", "src/handles/local-handles.cc", "src/handles/local-handles.h", - "src/handles/maybe-handles-inl.h", + "src/handles/local-handles-inl.h", "src/handles/maybe-handles.h", + "src/handles/maybe-handles-inl.h", "src/handles/persistent-handles.cc", "src/handles/persistent-handles.h", "src/handles/shared-object-conveyor-handles.cc", "src/handles/shared-object-conveyor-handles.h", - "src/heap/base/active-system-pages.cc", - "src/heap/base/active-system-pages.h", + "src/handles/traced-handles.cc", + "src/handles/traced-handles.h", "src/heap/allocation-observer.cc", "src/heap/allocation-observer.h", "src/heap/allocation-result.h", "src/heap/allocation-stats.h", "src/heap/array-buffer-sweeper.cc", "src/heap/array-buffer-sweeper.h", - "src/heap/base-space.cc", "src/heap/base-space.h", + "src/heap/base/active-system-pages.cc", + "src/heap/base/active-system-pages.h", "src/heap/basic-memory-chunk.cc", "src/heap/basic-memory-chunk.h", - "src/heap/code-object-registry.cc", - "src/heap/code-object-registry.h", - "src/heap/code-range.h", "src/heap/code-range.cc", + "src/heap/code-range.h", "src/heap/code-stats.cc", "src/heap/code-stats.h", "src/heap/collection-barrier.cc", "src/heap/collection-barrier.h", "src/heap/combined-heap.cc", "src/heap/combined-heap.h", - "src/heap/concurrent-allocator-inl.h", "src/heap/concurrent-allocator.cc", "src/heap/concurrent-allocator.h", + "src/heap/concurrent-allocator-inl.h", "src/heap/concurrent-marking.cc", "src/heap/concurrent-marking.h", "src/heap/cppgc-js/cpp-heap.cc", @@ -1464,29 +1514,35 @@ filegroup( "src/heap/cppgc-js/unified-heap-marking-visitor.h", "src/heap/cppgc-js/wrappable-info.h", "src/heap/cppgc-js/wrappable-info-inl.h", + "src/heap/ephemeron-remembered-set.h", + "src/heap/ephemeron-remembered-set.cc", + "src/heap/evacuation-allocator.h", + "src/heap/evacuation-allocator-inl.h", "src/heap/evacuation-verifier.cc", "src/heap/evacuation-verifier.h", "src/heap/evacuation-verifier-inl.h", + "src/heap/factory.cc", + "src/heap/factory.h", "src/heap/factory-base.cc", "src/heap/factory-base.h", "src/heap/factory-base-inl.h", "src/heap/factory-inl.h", - "src/heap/factory.cc", - "src/heap/factory.h", "src/heap/finalization-registry-cleanup-task.cc", "src/heap/finalization-registry-cleanup-task.h", - "src/heap/free-list-inl.h", "src/heap/free-list.cc", "src/heap/free-list.h", + "src/heap/free-list-inl.h", "src/heap/gc-callbacks.h", "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/gc-tracer-inl.h", + "src/heap/heap.cc", + "src/heap/heap.h", "src/heap/heap-allocator.cc", "src/heap/heap-allocator.h", + "src/heap/heap-allocator-inl.h", "src/heap/heap-controller.cc", "src/heap/heap-controller.h", "src/heap/heap-inl.h", @@ -1494,115 +1550,130 @@ filegroup( "src/heap/heap-layout-tracer.h", "src/heap/heap-verifier.cc", "src/heap/heap-verifier.h", - "src/heap/heap-write-barrier-inl.h", "src/heap/heap-write-barrier.cc", "src/heap/heap-write-barrier.h", - "src/heap/heap.cc", - "src/heap/heap.h", + "src/heap/heap-write-barrier-inl.h", + "src/heap/incremental-marking.cc", + "src/heap/incremental-marking.h", "src/heap/incremental-marking-inl.h", "src/heap/incremental-marking-job.cc", "src/heap/incremental-marking-job.h", - "src/heap/incremental-marking.cc", - "src/heap/incremental-marking.h", "src/heap/index-generator.cc", "src/heap/index-generator.h", - "src/heap/invalidated-slots-inl.h", - "src/heap/invalidated-slots.cc", - "src/heap/invalidated-slots.h", + "src/heap/large-page.cc", + "src/heap/large-page.h", "src/heap/large-spaces.cc", "src/heap/large-spaces.h", "src/heap/linear-allocation-area.h", "src/heap/list.h", - "src/heap/evacuation-allocator-inl.h", - "src/heap/evacuation-allocator.h", "src/heap/local-factory.cc", "src/heap/local-factory.h", "src/heap/local-factory-inl.h", - "src/heap/local-heap-inl.h", "src/heap/local-heap.cc", "src/heap/local-heap.h", - "src/heap/mark-compact-inl.h", + "src/heap/local-heap-inl.h", "src/heap/mark-compact.cc", "src/heap/mark-compact.h", + "src/heap/mark-compact-inl.h", + "src/heap/mark-sweep-utilities.cc", + "src/heap/mark-sweep-utilities.h", + "src/heap/minor-mark-sweep.cc", + "src/heap/minor-mark-sweep.h", + "src/heap/minor-mark-sweep-inl.h", + "src/heap/marking.cc", + "src/heap/marking.h", + "src/heap/marking-inl.h", "src/heap/marking-barrier.cc", "src/heap/marking-barrier.h", "src/heap/marking-barrier-inl.h", "src/heap/marking-state.h", "src/heap/marking-state-inl.h", - "src/heap/marking-visitor-inl.h", "src/heap/marking-visitor.h", - "src/heap/marking-worklist-inl.h", + "src/heap/marking-visitor-inl.h", "src/heap/marking-worklist.cc", "src/heap/marking-worklist.h", - "src/heap/marking.cc", - "src/heap/marking.h", + "src/heap/marking-worklist-inl.h", "src/heap/memory-allocator.cc", "src/heap/memory-allocator.h", + "src/heap/memory-balancer.cc", + "src/heap/memory-balancer.h", + "src/heap/memory-chunk.cc", + "src/heap/memory-chunk.h", "src/heap/memory-chunk-inl.h", "src/heap/memory-chunk-layout.cc", "src/heap/memory-chunk-layout.h", - "src/heap/memory-chunk.cc", - "src/heap/memory-chunk.h", - "src/heap/memory-measurement-inl.h", "src/heap/memory-measurement.cc", "src/heap/memory-measurement.h", + "src/heap/memory-measurement-inl.h", "src/heap/memory-reducer.cc", "src/heap/memory-reducer.h", - "src/heap/new-spaces-inl.h", + "src/heap/minor-gc-job.cc", + "src/heap/minor-gc-job.h", "src/heap/new-spaces.cc", "src/heap/new-spaces.h", + "src/heap/new-spaces-inl.h", "src/heap/object-lock.h", "src/heap/object-stats.cc", "src/heap/object-stats.h", - "src/heap/objects-visiting-inl.h", "src/heap/objects-visiting.cc", "src/heap/objects-visiting.h", - "src/heap/paged-spaces-inl.h", + "src/heap/objects-visiting-inl.h", + "src/heap/page.cc", + "src/heap/page.h", + "src/heap/page-inl.h", "src/heap/paged-spaces.cc", "src/heap/paged-spaces.h", + "src/heap/paged-spaces-inl.h", "src/heap/parallel-work-item.h", + "src/heap/parked-scope-inl.h", "src/heap/parked-scope.h", - "src/heap/pretenuring-handler-inl.h", "src/heap/pretenuring-handler.cc", "src/heap/pretenuring-handler.h", + "src/heap/pretenuring-handler-inl.h", "src/heap/progress-bar.h", - "src/heap/read-only-heap-inl.h", "src/heap/read-only-heap.cc", "src/heap/read-only-heap.h", + "src/heap/read-only-heap-inl.h", + "src/heap/read-only-promotion.cc", + "src/heap/read-only-promotion.h", "src/heap/read-only-spaces.cc", "src/heap/read-only-spaces.h", - "src/heap/remembered-set-inl.h", "src/heap/remembered-set.h", + "src/heap/remembered-set-inl.h", "src/heap/safepoint.cc", "src/heap/safepoint.h", - "src/heap/minor-gc-job.cc", - "src/heap/minor-gc-job.h", - "src/heap/scavenger-inl.h", "src/heap/scavenger.cc", "src/heap/scavenger.h", + "src/heap/scavenger-inl.h", "src/heap/slot-set.cc", "src/heap/slot-set.h", - "src/heap/spaces-inl.h", "src/heap/spaces.cc", "src/heap/spaces.h", + "src/heap/spaces-inl.h", "src/heap/stress-scavenge-observer.cc", "src/heap/stress-scavenge-observer.h", "src/heap/sweeper.cc", "src/heap/sweeper.h", + "src/heap/third-party/heap-api.h", + "src/heap/third-party/heap-api-stub.cc", "src/heap/traced-handles-marking-visitor.cc", "src/heap/traced-handles-marking-visitor.h", "src/heap/weak-object-worklists.cc", "src/heap/weak-object-worklists.h", + "src/heap/young-generation-marking-visitor.h", + "src/heap/young-generation-marking-visitor-inl.h", + "src/heap/zapping.cc", + "src/heap/zapping.h", "src/ic/call-optimization.cc", "src/ic/call-optimization.h", - "src/ic/handler-configuration-inl.h", "src/ic/handler-configuration.cc", "src/ic/handler-configuration.h", + "src/ic/handler-configuration-inl.h", + "src/ic/ic.cc", + "src/ic/ic.h", "src/ic/ic-inl.h", "src/ic/ic-stats.cc", "src/ic/ic-stats.h", - "src/ic/ic.cc", - "src/ic/ic.h", "src/ic/stub-cache.cc", "src/ic/stub-cache.h", "src/init/bootstrapper.cc", @@ -1639,11 +1710,11 @@ filegroup( "src/interpreter/bytecode-node.h", "src/interpreter/bytecode-operands.cc", "src/interpreter/bytecode-operands.h", + "src/interpreter/bytecode-register.cc", + "src/interpreter/bytecode-register.h", "src/interpreter/bytecode-register-allocator.h", "src/interpreter/bytecode-register-optimizer.cc", "src/interpreter/bytecode-register-optimizer.h", - "src/interpreter/bytecode-register.cc", - "src/interpreter/bytecode-register.h", "src/interpreter/bytecode-source-info.cc", "src/interpreter/bytecode-source-info.h", "src/interpreter/bytecode-traits.h", @@ -1655,152 +1726,169 @@ filegroup( "src/interpreter/control-flow-builders.h", "src/interpreter/handler-table-builder.cc", "src/interpreter/handler-table-builder.h", + "src/interpreter/interpreter.cc", + "src/interpreter/interpreter.h", "src/interpreter/interpreter-generator.h", "src/interpreter/interpreter-intrinsics.cc", "src/interpreter/interpreter-intrinsics.h", - "src/interpreter/interpreter.cc", - "src/interpreter/interpreter.h", "src/json/json-parser.cc", "src/json/json-parser.h", "src/json/json-stringifier.cc", "src/json/json-stringifier.h", "src/logging/code-events.h", - "src/logging/counters-definitions.h", "src/logging/counters.cc", "src/logging/counters.h", + "src/logging/counters-definitions.h", "src/logging/counters-scopes.h", "src/logging/local-logger.cc", "src/logging/local-logger.h", - "src/logging/log-inl.h", - "src/logging/log-file.cc", - "src/logging/log-file.h", "src/logging/log.cc", "src/logging/log.h", + "src/logging/log-file.cc", + "src/logging/log-file.h", + "src/logging/log-inl.h", "src/logging/metrics.cc", "src/logging/metrics.h", - "src/logging/tracing-flags.cc", - "src/logging/tracing-flags.h", "src/logging/runtime-call-stats.h", "src/logging/runtime-call-stats-scope.h", - "src/numbers/conversions-inl.h", + "src/logging/tracing-flags.cc", + "src/logging/tracing-flags.h", "src/numbers/conversions.cc", "src/numbers/conversions.h", + "src/numbers/conversions-inl.h", "src/numbers/hash-seed-inl.h", - "src/numbers/integer-literal-inl.h", "src/numbers/integer-literal.h", + "src/numbers/integer-literal-inl.h", "src/numbers/math-random.cc", "src/numbers/math-random.h", + "src/objects/abstract-code.cc", + "src/objects/abstract-code.h", + "src/objects/abstract-code-inl.h", "src/objects/all-objects-inl.h", + "src/objects/allocation-site.h", "src/objects/allocation-site-inl.h", - "src/objects/allocation-site-scopes-inl.h", "src/objects/allocation-site-scopes.h", - "src/objects/allocation-site.h", - "src/objects/api-callbacks-inl.h", + "src/objects/allocation-site-scopes-inl.h", "src/objects/api-callbacks.h", - "src/objects/arguments-inl.h", + "src/objects/api-callbacks-inl.h", "src/objects/arguments.h", + "src/objects/arguments-inl.h", "src/objects/backing-store.cc", "src/objects/backing-store.h", - "src/objects/bigint-inl.h", "src/objects/bigint.cc", "src/objects/bigint.h", - "src/objects/call-site-info-inl.h", + "src/objects/bigint-inl.h", + "src/objects/bytecode-array.cc", + "src/objects/bytecode-array.h", + "src/objects/bytecode-array-inl.h", "src/objects/call-site-info.cc", "src/objects/call-site-info.h", - "src/objects/cell-inl.h", + "src/objects/call-site-info-inl.h", "src/objects/cell.h", + "src/objects/cell-inl.h", + "src/objects/code.cc", + "src/objects/code.h", "src/objects/code-inl.h", "src/objects/code-kind.cc", "src/objects/code-kind.h", - "src/objects/code.cc", - "src/objects/code.h", - "src/objects/compilation-cache-table-inl.h", "src/objects/compilation-cache-table.cc", "src/objects/compilation-cache-table.h", - "src/objects/compressed-slots-inl.h", + "src/objects/compilation-cache-table-inl.h", "src/objects/compressed-slots.h", - "src/objects/contexts-inl.h", + "src/objects/compressed-slots-inl.h", "src/objects/contexts.cc", "src/objects/contexts.h", - "src/objects/data-handler-inl.h", + "src/objects/contexts-inl.h", "src/objects/data-handler.h", - "src/objects/debug-objects-inl.h", + "src/objects/data-handler-inl.h", "src/objects/debug-objects.cc", "src/objects/debug-objects.h", - "src/objects/descriptor-array-inl.h", + "src/objects/debug-objects-inl.h", + "src/objects/deoptimization-data.cc", + "src/objects/deoptimization-data.h", + "src/objects/deoptimization-data-inl.h", + "src/objects/dependent-code.cc", + "src/objects/dependent-code.h", + "src/objects/dependent-code-inl.h", "src/objects/descriptor-array.h", - "src/objects/dictionary-inl.h", + "src/objects/descriptor-array-inl.h", "src/objects/dictionary.h", + "src/objects/dictionary-inl.h", + "src/objects/elements.cc", + "src/objects/elements.h", "src/objects/elements-inl.h", "src/objects/elements-kind.cc", "src/objects/elements-kind.h", - "src/objects/elements.cc", - "src/objects/elements.h", - "src/objects/embedder-data-array-inl.h", "src/objects/embedder-data-array.cc", "src/objects/embedder-data-array.h", - "src/objects/embedder-data-slot-inl.h", + "src/objects/embedder-data-array-inl.h", "src/objects/embedder-data-slot.h", - "src/objects/feedback-cell-inl.h", + "src/objects/embedder-data-slot-inl.h", "src/objects/feedback-cell.h", - "src/objects/feedback-vector-inl.h", + "src/objects/feedback-cell-inl.h", "src/objects/feedback-vector.cc", "src/objects/feedback-vector.h", - "src/objects/field-index-inl.h", + "src/objects/feedback-vector-inl.h", "src/objects/field-index.h", + "src/objects/field-index-inl.h", "src/objects/field-type.cc", "src/objects/field-type.h", - "src/objects/fixed-array-inl.h", + "src/objects/fixed-array.cc", "src/objects/fixed-array.h", - "src/objects/foreign-inl.h", + "src/objects/fixed-array-inl.h", "src/objects/foreign.h", - "src/objects/free-space-inl.h", + "src/objects/foreign-inl.h", "src/objects/free-space.h", + "src/objects/free-space-inl.h", "src/objects/function-kind.h", "src/objects/function-syntax-kind.h", - "src/objects/hash-table-inl.h", "src/objects/hash-table.h", - "src/objects/heap-number-inl.h", + "src/objects/hash-table-inl.h", "src/objects/heap-number.h", - "src/objects/heap-object-inl.h", + "src/objects/heap-number-inl.h", "src/objects/heap-object.h", - "src/objects/instance-type-inl.h", + "src/objects/heap-object-inl.h", "src/objects/instance-type.h", + "src/objects/instance-type-checker.h", + "src/objects/instance-type-inl.h", "src/objects/internal-index.h", - "src/objects/js-array-buffer-inl.h", + "src/objects/instruction-stream.cc", + "src/objects/instruction-stream.h", + "src/objects/instruction-stream-inl.h", + "src/objects/js-array.h", "src/objects/js-array-buffer.cc", "src/objects/js-array-buffer.h", + "src/objects/js-array-buffer-inl.h", "src/objects/js-array-inl.h", - "src/objects/js-array.h", - "src/objects/js-atomics-synchronization-inl.h", - "src/objects/js-atomics-synchronization.h", "src/objects/js-atomics-synchronization.cc", + "src/objects/js-atomics-synchronization.h", + "src/objects/js-atomics-synchronization-inl.h", + "src/objects/js-collection.h", "src/objects/js-collection-inl.h", "src/objects/js-collection-iterator.h", "src/objects/js-collection-iterator-inl.h", - "src/objects/js-collection.h", - "src/objects/js-function-inl.h", "src/objects/js-function.cc", "src/objects/js-function.h", - "src/objects/js-generator-inl.h", + "src/objects/js-function-inl.h", "src/objects/js-generator.h", - "src/objects/js-iterator-helpers-inl.h", + "src/objects/js-generator-inl.h", "src/objects/js-iterator-helpers.h", - "src/objects/js-objects-inl.h", + "src/objects/js-iterator-helpers-inl.h", "src/objects/js-objects.cc", "src/objects/js-objects.h", - "src/objects/js-promise-inl.h", + "src/objects/js-objects-inl.h", "src/objects/js-promise.h", - "src/objects/js-proxy-inl.h", + "src/objects/js-promise-inl.h", "src/objects/js-proxy.h", - "src/objects/js-raw-json-inl.h", - "src/objects/js-raw-json.h", + "src/objects/js-proxy-inl.h", "src/objects/js-raw-json.cc", - "src/objects/js-regexp-inl.h", - "src/objects/js-regexp-string-iterator-inl.h", - "src/objects/js-regexp-string-iterator.h", + "src/objects/js-raw-json.h", + "src/objects/js-raw-json-inl.h", "src/objects/js-regexp.cc", "src/objects/js-regexp.h", + "src/objects/js-regexp-inl.h", + "src/objects/js-regexp-string-iterator.h", + "src/objects/js-regexp-string-iterator-inl.h", "src/objects/js-shadow-realm.h", "src/objects/js-shadow-realm-inl.h", "src/objects/js-shared-array.h", @@ -1808,151 +1896,154 @@ filegroup( "src/objects/js-struct.cc", "src/objects/js-struct.h", "src/objects/js-struct-inl.h", + "src/objects/js-temporal-objects.cc", "src/objects/js-temporal-objects.h", "src/objects/js-temporal-objects-inl.h", - "src/objects/js-temporal-objects.cc", "src/objects/js-weak-refs.h", "src/objects/js-weak-refs-inl.h", "src/objects/keys.cc", "src/objects/keys.h", - "src/objects/literal-objects-inl.h", "src/objects/literal-objects.cc", "src/objects/literal-objects.h", - "src/objects/lookup-cache-inl.h", + "src/objects/literal-objects-inl.h", + "src/objects/lookup.cc", + "src/objects/lookup.h", "src/objects/lookup-cache.cc", "src/objects/lookup-cache.h", + "src/objects/lookup-cache-inl.h", "src/objects/lookup-inl.h", - "src/objects/lookup.cc", - "src/objects/lookup.h", - "src/objects/managed-inl.h", "src/objects/managed.cc", "src/objects/managed.h", + "src/objects/managed-inl.h", + "src/objects/map.cc", + "src/objects/map.h", "src/objects/map-inl.h", "src/objects/map-updater.cc", "src/objects/map-updater.h", - "src/objects/map.cc", - "src/objects/map.h", - "src/objects/maybe-object-inl.h", "src/objects/maybe-object.h", - "src/objects/megadom-handler-inl.h", + "src/objects/maybe-object-inl.h", "src/objects/megadom-handler.h", - "src/objects/microtask-inl.h", + "src/objects/megadom-handler-inl.h", "src/objects/microtask.h", - "src/objects/module-inl.h", + "src/objects/microtask-inl.h", "src/objects/module.cc", "src/objects/module.h", - "src/objects/name-inl.h", + "src/objects/module-inl.h", "src/objects/name.h", + "src/objects/name-inl.h", "src/objects/object-list-macros.h", - "src/objects/object-macros-undef.h", "src/objects/object-macros.h", + "src/objects/object-macros-undef.h", "src/objects/object-type.cc", "src/objects/object-type.h", - "src/objects/objects-body-descriptors-inl.h", - "src/objects/objects-body-descriptors.h", - "src/objects/objects-inl.h", "src/objects/objects.cc", "src/objects/objects.h", + "src/objects/objects-body-descriptors.h", + "src/objects/objects-body-descriptors-inl.h", "src/objects/objects-definitions.h", - "src/objects/oddball-inl.h", + "src/objects/objects-inl.h", "src/objects/oddball.h", - "src/objects/option-utils.h", + "src/objects/oddball-inl.h", + "src/objects/hole.h", + "src/objects/hole-inl.h", "src/objects/option-utils.cc", - "src/objects/ordered-hash-table-inl.h", + "src/objects/option-utils.h", "src/objects/ordered-hash-table.cc", "src/objects/ordered-hash-table.h", - "src/objects/primitive-heap-object-inl.h", + "src/objects/ordered-hash-table-inl.h", "src/objects/primitive-heap-object.h", - "src/objects/promise-inl.h", + "src/objects/primitive-heap-object-inl.h", "src/objects/promise.h", - "src/objects/property-array-inl.h", + "src/objects/promise-inl.h", + "src/objects/property.cc", + "src/objects/property.h", "src/objects/property-array.h", - "src/objects/property-cell-inl.h", + "src/objects/property-array-inl.h", "src/objects/property-cell.h", - "src/objects/property-descriptor-object-inl.h", - "src/objects/property-descriptor-object.h", + "src/objects/property-cell-inl.h", "src/objects/property-descriptor.cc", "src/objects/property-descriptor.h", + "src/objects/property-descriptor-object.h", + "src/objects/property-descriptor-object-inl.h", "src/objects/property-details.h", - "src/objects/property.cc", - "src/objects/property.h", - "src/objects/prototype-info-inl.h", - "src/objects/prototype-info.h", "src/objects/prototype.h", + "src/objects/prototype-info.h", + "src/objects/prototype-info-inl.h", "src/objects/prototype-inl.h", - "src/objects/regexp-match-info-inl.h", "src/objects/regexp-match-info.h", - "src/objects/scope-info-inl.h", + "src/objects/regexp-match-info-inl.h", "src/objects/scope-info.cc", "src/objects/scope-info.h", - "src/objects/script-inl.h", + "src/objects/scope-info-inl.h", "src/objects/script.h", - "src/objects/shared-function-info-inl.h", + "src/objects/script-inl.h", "src/objects/shared-function-info.cc", "src/objects/shared-function-info.h", + "src/objects/shared-function-info-inl.h", "src/objects/simd.cc", "src/objects/simd.h", + "src/objects/slots.h", "src/objects/slots-atomic-inl.h", "src/objects/slots-inl.h", - "src/objects/slots.h", - "src/objects/smi-inl.h", "src/objects/smi.h", + "src/objects/smi-inl.h", "src/objects/source-text-module.cc", "src/objects/source-text-module.h", "src/objects/source-text-module-inl.h", + "src/objects/string.cc", + "src/objects/string.h", "src/objects/string-comparator.cc", "src/objects/string-comparator.h", - "src/objects/string-inl.h", - "src/objects/string-set-inl.h", - "src/objects/string-set.h", - "src/objects/string-forwarding-table-inl.h", "src/objects/string-forwarding-table.cc", "src/objects/string-forwarding-table.h", - "src/objects/string-table-inl.h", + "src/objects/string-forwarding-table-inl.h", + "src/objects/string-inl.h", + "src/objects/string-set.h", + "src/objects/string-set-inl.h", "src/objects/string-table.cc", - "src/objects/symbol-table.cc", "src/objects/string-table.h", - "src/objects/string.cc", - "src/objects/string.h", - "src/objects/struct-inl.h", + "src/objects/string-table-inl.h", "src/objects/struct.h", + "src/objects/struct-inl.h", "src/objects/swiss-hash-table-helpers.h", - "src/objects/swiss-name-dictionary-inl.h", "src/objects/swiss-name-dictionary.cc", "src/objects/swiss-name-dictionary.h", - "src/objects/synthetic-module-inl.h", + "src/objects/swiss-name-dictionary-inl.h", + "src/objects/symbol-table.cc", "src/objects/synthetic-module.cc", "src/objects/synthetic-module.h", - "src/objects/tagged-field-inl.h", + "src/objects/synthetic-module-inl.h", + "src/objects/tagged.h", "src/objects/tagged-field.h", - "src/objects/tagged-impl-inl.h", + "src/objects/tagged-field-inl.h", "src/objects/tagged-impl.cc", "src/objects/tagged-impl.h", + "src/objects/tagged-impl-inl.h", "src/objects/tagged-index.h", - "src/objects/tagged-value-inl.h", "src/objects/tagged-value.h", - "src/objects/template-objects-inl.h", + "src/objects/tagged-value-inl.h", "src/objects/template-objects.cc", "src/objects/template-objects.h", - "src/objects/templates-inl.h", + "src/objects/template-objects-inl.h", "src/objects/templates.cc", "src/objects/templates.h", - "src/objects/torque-defined-classes-inl.h", + "src/objects/templates-inl.h", "src/objects/torque-defined-classes.h", - "src/objects/transitions-inl.h", + "src/objects/torque-defined-classes-inl.h", "src/objects/transitions.cc", "src/objects/transitions.h", - "src/objects/turbofan-types-inl.h", + "src/objects/transitions-inl.h", "src/objects/turbofan-types.h", - "src/objects/turboshaft-types-inl.h", + "src/objects/turbofan-types-inl.h", "src/objects/turboshaft-types.h", + "src/objects/turboshaft-types-inl.h", "src/objects/type-hints.cc", "src/objects/type-hints.h", "src/objects/value-serializer.cc", "src/objects/value-serializer.h", "src/objects/visitors.cc", - "src/objects/visitors-inl.h", "src/objects/visitors.h", + "src/objects/visitors-inl.h", "src/parsing/expression-scope.h", "src/parsing/func-name-inferrer.cc", "src/parsing/func-name-inferrer.h", @@ -1963,44 +2054,44 @@ filegroup( "src/parsing/literal-buffer.h", "src/parsing/parse-info.cc", "src/parsing/parse-info.h", - "src/parsing/parser-base.h", "src/parsing/parser.cc", "src/parsing/parser.h", + "src/parsing/parser-base.h", "src/parsing/parsing.cc", "src/parsing/parsing.h", "src/parsing/pending-compilation-error-handler.cc", "src/parsing/pending-compilation-error-handler.h", - "src/parsing/preparse-data-impl.h", "src/parsing/preparse-data.cc", "src/parsing/preparse-data.h", - "src/parsing/preparser-logger.h", + "src/parsing/preparse-data-impl.h", "src/parsing/preparser.cc", "src/parsing/preparser.h", + "src/parsing/preparser-logger.h", "src/parsing/rewriter.cc", "src/parsing/rewriter.h", - "src/parsing/scanner-character-streams.cc", - "src/parsing/scanner-character-streams.h", "src/parsing/scanner.cc", "src/parsing/scanner.h", + "src/parsing/scanner-character-streams.cc", + "src/parsing/scanner-character-streams.h", "src/parsing/scanner-inl.h", "src/parsing/token.cc", "src/parsing/token.h", "src/profiler/allocation-tracker.cc", "src/profiler/allocation-tracker.h", - "src/profiler/circular-queue-inl.h", "src/profiler/circular-queue.h", - "src/profiler/cpu-profiler-inl.h", + "src/profiler/circular-queue-inl.h", "src/profiler/cpu-profiler.cc", "src/profiler/cpu-profiler.h", + "src/profiler/cpu-profiler-inl.h", "src/profiler/heap-profiler.cc", "src/profiler/heap-profiler.h", - "src/profiler/heap-snapshot-generator-inl.h", "src/profiler/heap-snapshot-generator.cc", "src/profiler/heap-snapshot-generator.h", + "src/profiler/heap-snapshot-generator-inl.h", "src/profiler/output-stream-writer.h", - "src/profiler/profile-generator-inl.h", "src/profiler/profile-generator.cc", "src/profiler/profile-generator.h", + "src/profiler/profile-generator-inl.h", "src/profiler/profiler-listener.cc", "src/profiler/profiler-listener.h", "src/profiler/profiler-stats.cc", @@ -2015,28 +2106,30 @@ filegroup( "src/profiler/tick-sample.h", "src/profiler/tracing-cpu-profiler.cc", "src/profiler/tracing-cpu-profiler.h", - "src/profiler/weak-code-registry.h", "src/profiler/weak-code-registry.cc", + "src/profiler/weak-code-registry.h", + "src/regexp/experimental/experimental.cc", + "src/regexp/experimental/experimental.h", "src/regexp/experimental/experimental-bytecode.cc", "src/regexp/experimental/experimental-bytecode.h", "src/regexp/experimental/experimental-compiler.cc", "src/regexp/experimental/experimental-compiler.h", "src/regexp/experimental/experimental-interpreter.cc", "src/regexp/experimental/experimental-interpreter.h", - "src/regexp/experimental/experimental.cc", - "src/regexp/experimental/experimental.h", + "src/regexp/regexp.cc", + "src/regexp/regexp.h", "src/regexp/regexp-ast.cc", "src/regexp/regexp-ast.h", - "src/regexp/regexp-bytecode-generator-inl.h", "src/regexp/regexp-bytecode-generator.cc", "src/regexp/regexp-bytecode-generator.h", + "src/regexp/regexp-bytecode-generator-inl.h", "src/regexp/regexp-bytecode-peephole.cc", "src/regexp/regexp-bytecode-peephole.h", "src/regexp/regexp-bytecodes.cc", "src/regexp/regexp-bytecodes.h", - "src/regexp/regexp-compiler-tonode.cc", "src/regexp/regexp-compiler.cc", "src/regexp/regexp-compiler.h", + "src/regexp/regexp-compiler-tonode.cc", "src/regexp/regexp-dotprinter.cc", "src/regexp/regexp-dotprinter.h", "src/regexp/regexp-error.cc", @@ -2044,11 +2137,11 @@ filegroup( "src/regexp/regexp-flags.h", "src/regexp/regexp-interpreter.cc", "src/regexp/regexp-interpreter.h", + "src/regexp/regexp-macro-assembler.cc", + "src/regexp/regexp-macro-assembler.h", "src/regexp/regexp-macro-assembler-arch.h", "src/regexp/regexp-macro-assembler-tracer.cc", "src/regexp/regexp-macro-assembler-tracer.h", - "src/regexp/regexp-macro-assembler.cc", - "src/regexp/regexp-macro-assembler.h", "src/regexp/regexp-nodes.h", "src/regexp/regexp-parser.cc", "src/regexp/regexp-parser.h", @@ -2056,13 +2149,13 @@ filegroup( "src/regexp/regexp-stack.h", "src/regexp/regexp-utils.cc", "src/regexp/regexp-utils.h", - "src/regexp/regexp.cc", - "src/regexp/regexp.h", "src/regexp/special-case.h", - "src/roots/roots-inl.h", "src/roots/roots.cc", "src/roots/roots.h", + "src/roots/roots-inl.h", "src/roots/static-roots.h", + "src/runtime/runtime.cc", + "src/runtime/runtime.h", "src/runtime/runtime-array.cc", "src/runtime/runtime-atomics.cc", "src/runtime/runtime-bigint.cc", @@ -2094,28 +2187,28 @@ filegroup( "src/runtime/runtime-typedarray.cc", "src/runtime/runtime-utils.h", "src/runtime/runtime-weak-refs.cc", - "src/runtime/runtime.cc", - "src/runtime/runtime.h", - "src/sandbox/external-pointer-inl.h", + "src/sandbox/bounded-size.h", + "src/sandbox/bounded-size-inl.h", "src/sandbox/external-pointer.h", + "src/sandbox/external-pointer-inl.h", "src/sandbox/external-pointer-table.cc", - "src/sandbox/external-pointer-table-inl.h", "src/sandbox/external-pointer-table.h", - "src/sandbox/testing.cc", - "src/sandbox/testing.h", + "src/sandbox/external-pointer-table-inl.h", + "src/sandbox/code-pointer-table.cc", + "src/sandbox/code-pointer-table.h", + "src/sandbox/code-pointer-table-inl.h", + "src/sandbox/code-pointer.h", + "src/sandbox/code-pointer-inl.h", + "src/sandbox/indirect-pointer.h", + "src/sandbox/indirect-pointer-inl.h", + "src/sandbox/external-entity-table.h", + "src/sandbox/external-entity-table-inl.h", "src/sandbox/sandbox.cc", "src/sandbox/sandbox.h", - "src/sandbox/sandboxed-pointer-inl.h", "src/sandbox/sandboxed-pointer.h", - "src/sandbox/bounded-size-inl.h", - "src/sandbox/bounded-size.h", - "src/base/sanitizer/asan.h", - "src/base/sanitizer/lsan-page-allocator.cc", - "src/base/sanitizer/lsan-page-allocator.h", - "src/base/sanitizer/lsan-virtual-address-space.cc", - "src/base/sanitizer/lsan-virtual-address-space.h", - "src/base/sanitizer/msan.h", - "src/base/sanitizer/tsan.h", + "src/sandbox/sandboxed-pointer-inl.h", + "src/sandbox/testing.cc", + "src/sandbox/testing.h", "src/snapshot/code-serializer.cc", "src/snapshot/code-serializer.h", "src/snapshot/context-deserializer.cc", @@ -2125,55 +2218,60 @@ 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-data-inl.h", + "src/snapshot/embedded/embedded-file-writer.h", "src/snapshot/embedded/embedded-file-writer-interface.h", + "src/snapshot/embedded/platform-embedded-file-writer-base.h", "src/snapshot/object-deserializer.cc", "src/snapshot/object-deserializer.h", "src/snapshot/read-only-deserializer.cc", "src/snapshot/read-only-deserializer.h", "src/snapshot/read-only-serializer.cc", "src/snapshot/read-only-serializer.h", + "src/snapshot/read-only-serializer-deserializer.h", "src/snapshot/references.h", "src/snapshot/roots-serializer.cc", "src/snapshot/roots-serializer.h", + "src/snapshot/serializer.cc", + "src/snapshot/serializer.h", "src/snapshot/serializer-deserializer.cc", "src/snapshot/serializer-deserializer.h", - "src/snapshot/serializer.cc", "src/snapshot/serializer-inl.h", - "src/snapshot/serializer.h", - "src/snapshot/shared-heap-deserializer.h", "src/snapshot/shared-heap-deserializer.cc", - "src/snapshot/shared-heap-serializer.h", + "src/snapshot/shared-heap-deserializer.h", "src/snapshot/shared-heap-serializer.cc", + "src/snapshot/shared-heap-serializer.h", + "src/snapshot/snapshot.cc", + "src/snapshot/snapshot.h", "src/snapshot/snapshot-data.cc", "src/snapshot/snapshot-data.h", "src/snapshot/snapshot-source-sink.cc", "src/snapshot/snapshot-source-sink.h", "src/snapshot/snapshot-utils.cc", "src/snapshot/snapshot-utils.h", - "src/snapshot/snapshot.cc", - "src/snapshot/snapshot.h", + "src/snapshot/sort-builtins.cc", + "src/snapshot/sort-builtins.h", "src/snapshot/startup-deserializer.cc", "src/snapshot/startup-deserializer.h", "src/snapshot/startup-serializer.cc", "src/snapshot/startup-serializer.h", - "src/strings/char-predicates-inl.h", "src/strings/char-predicates.h", - "src/strings/string-builder-inl.h", + "src/strings/char-predicates-inl.h", "src/strings/string-builder.cc", + "src/strings/string-builder-inl.h", "src/strings/string-case.cc", "src/strings/string-case.h", - "src/strings/string-hasher-inl.h", "src/strings/string-hasher.h", + "src/strings/string-hasher-inl.h", "src/strings/string-search.h", "src/strings/string-stream.cc", "src/strings/string-stream.h", + "src/strings/unicode.cc", + "src/strings/unicode.h", "src/strings/unicode-decoder.cc", "src/strings/unicode-decoder.h", "src/strings/unicode-inl.h", - "src/strings/unicode.cc", - "src/strings/unicode.h", "src/strings/uri.cc", "src/strings/uri.h", "src/tasks/cancelable-task.cc", @@ -2184,10 +2282,10 @@ filegroup( "src/tasks/task-utils.h", "src/temporal/temporal-parser.cc", "src/temporal/temporal-parser.h", - "src/torque/runtime-macro-shims.h", "src/third_party/siphash/halfsiphash.cc", "src/third_party/siphash/halfsiphash.h", "src/third_party/utf8-decoder/utf8-decoder.h", + "src/torque/runtime-macro-shims.h", "src/tracing/trace-event.cc", "src/tracing/trace-event.h", "src/tracing/traced-value.cc", @@ -2207,8 +2305,8 @@ filegroup( "src/utils/hex-format.h", "src/utils/identity-map.cc", "src/utils/identity-map.h", - "src/utils/locked-queue-inl.h", "src/utils/locked-queue.h", + "src/utils/locked-queue-inl.h", "src/utils/memcopy.cc", "src/utils/memcopy.h", "src/utils/ostreams.cc", @@ -2217,9 +2315,9 @@ filegroup( "src/utils/sha-256.cc", "src/utils/sha-256.h", "src/utils/sparse-bit-vector.h", - "src/utils/utils-inl.h", "src/utils/utils.cc", "src/utils/utils.h", + "src/utils/utils-inl.h", "src/utils/version.cc", "src/utils/version.h", "src/zone/accounting-allocator.cc", @@ -2227,42 +2325,42 @@ filegroup( "src/zone/compressed-zone-ptr.h", "src/zone/type-stats.cc", "src/zone/type-stats.h", + "src/zone/zone.cc", + "src/zone/zone.h", "src/zone/zone-allocator.h", "src/zone/zone-chunk-list.h", + "src/zone/zone-compact-set.h", "src/zone/zone-compression.h", "src/zone/zone-containers.h", - "src/zone/zone-handle-set.h", "src/zone/zone-hashmap.h", - "src/zone/zone-list-inl.h", "src/zone/zone-list.h", + "src/zone/zone-list-inl.h", "src/zone/zone-segment.cc", "src/zone/zone-segment.h", "src/zone/zone-type-traits.h", "src/zone/zone-utils.h", - "src/zone/zone.cc", - "src/zone/zone.h", - "src/asmjs/asm-js.h", - "src/execution/pointer-authentication-dummy.h", - "src/heap/third-party/heap-api.h", - "src/heap/third-party/heap-api-stub.cc", + ":cppgc_base_files", + ":generated_bytecode_builtins_list", + ":v8_bigint", + ":v8_heap_base_files", ] + select({ "@v8//bazel/config:v8_target_ia32": [ "src/baseline/ia32/baseline-assembler-ia32-inl.h", "src/baseline/ia32/baseline-compiler-ia32-inl.h", - "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h", - "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc", - "src/codegen/ia32/cpu-ia32.cc", - "src/codegen/ia32/assembler-ia32-inl.h", "src/codegen/ia32/assembler-ia32.cc", "src/codegen/ia32/assembler-ia32.h", + "src/codegen/ia32/assembler-ia32-inl.h", "src/codegen/ia32/constants-ia32.h", + "src/codegen/ia32/cpu-ia32.cc", "src/codegen/ia32/fma-instr.h", "src/codegen/ia32/interface-descriptors-ia32-inl.h", - "src/codegen/ia32/sse-instr.h", "src/codegen/ia32/macro-assembler-ia32.cc", "src/codegen/ia32/macro-assembler-ia32.h", "src/codegen/ia32/register-ia32.h", "src/codegen/ia32/reglist-ia32.h", + "src/codegen/ia32/sse-instr.h", + "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc", + "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h", "src/deoptimizer/ia32/deoptimizer-ia32.cc", "src/diagnostics/ia32/disasm-ia32.cc", "src/diagnostics/ia32/unwinder-ia32.cc", @@ -2275,20 +2373,20 @@ filegroup( "@v8//bazel/config:v8_target_x64": [ "src/baseline/x64/baseline-assembler-x64-inl.h", "src/baseline/x64/baseline-compiler-x64-inl.h", - "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h", "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc", - "src/codegen/x64/cpu-x64.cc", - "src/codegen/x64/assembler-x64-inl.h", + "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h", "src/codegen/x64/assembler-x64.cc", "src/codegen/x64/assembler-x64.h", + "src/codegen/x64/assembler-x64-inl.h", "src/codegen/x64/constants-x64.h", + "src/codegen/x64/cpu-x64.cc", "src/codegen/x64/fma-instr.h", "src/codegen/x64/interface-descriptors-x64-inl.h", - "src/codegen/x64/sse-instr.h", "src/codegen/x64/macro-assembler-x64.cc", "src/codegen/x64/macro-assembler-x64.h", "src/codegen/x64/register-x64.h", "src/codegen/x64/reglist-x64.h", + "src/codegen/x64/sse-instr.h", "src/deoptimizer/x64/deoptimizer-x64.cc", "src/diagnostics/x64/disasm-x64.cc", "src/diagnostics/x64/eh-frame-x64.cc", @@ -2302,9 +2400,9 @@ filegroup( "@v8//bazel/config:v8_target_arm": [ "src/baseline/arm/baseline-assembler-arm-inl.h", "src/baseline/arm/baseline-compiler-arm-inl.h", - "src/codegen/arm/assembler-arm-inl.h", "src/codegen/arm/assembler-arm.cc", "src/codegen/arm/assembler-arm.h", + "src/codegen/arm/assembler-arm-inl.h", "src/codegen/arm/constants-arm.cc", "src/codegen/arm/constants-arm.h", "src/codegen/arm/cpu-arm.cc", @@ -2328,21 +2426,21 @@ filegroup( "@v8//bazel/config:v8_target_arm64": [ "src/baseline/arm64/baseline-assembler-arm64-inl.h", "src/baseline/arm64/baseline-compiler-arm64-inl.h", - "src/codegen/arm64/assembler-arm64-inl.h", "src/codegen/arm64/assembler-arm64.cc", "src/codegen/arm64/assembler-arm64.h", + "src/codegen/arm64/assembler-arm64-inl.h", "src/codegen/arm64/constants-arm64.h", "src/codegen/arm64/cpu-arm64.cc", - "src/codegen/arm64/decoder-arm64-inl.h", "src/codegen/arm64/decoder-arm64.cc", "src/codegen/arm64/decoder-arm64.h", - "src/codegen/arm64/interface-descriptors-arm64-inl.h", - "src/codegen/arm64/instructions-arm64-constants.cc", + "src/codegen/arm64/decoder-arm64-inl.h", "src/codegen/arm64/instructions-arm64.cc", "src/codegen/arm64/instructions-arm64.h", - "src/codegen/arm64/macro-assembler-arm64-inl.h", + "src/codegen/arm64/instructions-arm64-constants.cc", + "src/codegen/arm64/interface-descriptors-arm64-inl.h", "src/codegen/arm64/macro-assembler-arm64.cc", "src/codegen/arm64/macro-assembler-arm64.h", + "src/codegen/arm64/macro-assembler-arm64-inl.h", "src/codegen/arm64/register-arm64.cc", "src/codegen/arm64/register-arm64.h", "src/codegen/arm64/reglist-arm64.h", @@ -2453,8 +2551,8 @@ filegroup( "//conditions:default": [], }) + select({ "@v8//bazel/config:v8_arm64_simulator": [ - "src/trap-handler/trap-handler-simulator.h", "src/trap-handler/handler-outside-simulator.cc", + "src/trap-handler/trap-handler-simulator.h", ], "//conditions:default": [], }) + select({ @@ -2486,17 +2584,15 @@ filegroup( "src/runtime/runtime-test-wasm.cc", "src/runtime/runtime-wasm.cc", "src/third_party/utf8-decoder/generalized-utf8-decoder.h", - "src/trap-handler/handler-inside-posix.h", "src/trap-handler/handler-inside.cc", + "src/trap-handler/handler-inside-posix.h", "src/trap-handler/handler-outside.cc", "src/trap-handler/handler-shared.cc", - "src/trap-handler/trap-handler-internal.h", "src/trap-handler/trap-handler.h", - "src/wasm/assembler-buffer-cache.cc", - "src/wasm/assembler-buffer-cache.h", + "src/trap-handler/trap-handler-internal.h", "src/wasm/baseline/liftoff-assembler.cc", - "src/wasm/baseline/liftoff-assembler-defs.h", "src/wasm/baseline/liftoff-assembler.h", + "src/wasm/baseline/liftoff-assembler-defs.h", "src/wasm/baseline/liftoff-compiler.cc", "src/wasm/baseline/liftoff-compiler.h", "src/wasm/baseline/liftoff-register.h", @@ -2537,16 +2633,20 @@ filegroup( "src/wasm/object-access.h", "src/wasm/pgo.cc", "src/wasm/pgo.h", + "src/wasm/serialized-signature-inl.h", "src/wasm/simd-shuffle.cc", "src/wasm/simd-shuffle.h", "src/wasm/stacks.cc", "src/wasm/stacks.h", + "src/wasm/std-object-sizes.h", "src/wasm/streaming-decoder.cc", "src/wasm/streaming-decoder.h", "src/wasm/string-builder.h", "src/wasm/string-builder-multiline.h", "src/wasm/struct-types.h", "src/wasm/sync-streaming-decoder.cc", + "src/wasm/turboshaft-graph-interface.cc", + "src/wasm/turboshaft-graph-interface.h", "src/wasm/value-type.cc", "src/wasm/value-type.h", "src/wasm/wasm-arguments.h", @@ -2565,15 +2665,14 @@ filegroup( "src/wasm/wasm-features.h", "src/wasm/wasm-import-wrapper-cache.cc", "src/wasm/wasm-import-wrapper-cache.h", - "src/wasm/wasm-init-expr.cc", "src/wasm/wasm-init-expr.h", "src/wasm/wasm-js.cc", "src/wasm/wasm-js.h", "src/wasm/wasm-linkage.h", - "src/wasm/wasm-module-builder.cc", - "src/wasm/wasm-module-builder.h", "src/wasm/wasm-module.cc", "src/wasm/wasm-module.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-objects.cc", @@ -2677,6 +2776,7 @@ filegroup( "src/compiler/backend/instruction-scheduler.h", "src/compiler/backend/instruction-selector.cc", "src/compiler/backend/instruction-selector.h", + "src/compiler/backend/instruction-selector-adapter.h", "src/compiler/backend/instruction-selector-impl.h", "src/compiler/backend/jump-threading.cc", "src/compiler/backend/jump-threading.h", @@ -2774,6 +2874,7 @@ filegroup( "src/compiler/js-graph.h", "src/compiler/js-heap-broker.cc", "src/compiler/js-heap-broker.h", + "src/compiler/js-heap-broker-inl.h", "src/compiler/js-inlining.cc", "src/compiler/js-inlining.h", "src/compiler/js-inlining-heuristic.cc", @@ -2840,6 +2941,8 @@ filegroup( "src/compiler/operator-properties.h", "src/compiler/osr.cc", "src/compiler/osr.h", + "src/compiler/pair-load-store-reducer.cc", + "src/compiler/pair-load-store-reducer.h", "src/compiler/per-isolate-compiler-cache.h", "src/compiler/persistent-map.h", "src/compiler/phase.h", @@ -2875,11 +2978,11 @@ filegroup( "src/compiler/state-values-utils.cc", "src/compiler/state-values-utils.h", "src/compiler/store-store-elimination.cc", + "src/compiler/store-store-elimination.h", "src/compiler/string-builder-optimizer.cc", "src/compiler/string-builder-optimizer.h", - "src/compiler/store-store-elimination.h", - "src/compiler/turbofan-enabled.cc", "src/compiler/turbofan.h", + "src/compiler/turbofan-enabled.cc", "src/compiler/turboshaft/assembler.cc", "src/compiler/turboshaft/assembler.h", "src/compiler/turboshaft/assert-types-reducer.h", @@ -2890,24 +2993,32 @@ filegroup( "src/compiler/turboshaft/dead-code-elimination-phase.cc", "src/compiler/turboshaft/dead-code-elimination-phase.h", "src/compiler/turboshaft/dead-code-elimination-reducer.h", + "src/compiler/turboshaft/debug-feature-lowering-phase.cc", + "src/compiler/turboshaft/debug-feature-lowering-phase.h", + "src/compiler/turboshaft/debug-feature-lowering-reducer.h", "src/compiler/turboshaft/decompression-optimization.cc", "src/compiler/turboshaft/decompression-optimization.h", "src/compiler/turboshaft/decompression-optimization-phase.cc", "src/compiler/turboshaft/decompression-optimization-phase.h", "src/compiler/turboshaft/define-assembler-macros.inc", "src/compiler/turboshaft/deopt-data.h", + "src/compiler/turboshaft/doubly-threaded-list.h", + "src/compiler/turboshaft/explicit-truncation-reducer.h", + "src/compiler/turboshaft/fast-api-call-reducer.h", "src/compiler/turboshaft/fast-hash.h", - "src/compiler/turboshaft/graph-builder.cc", - "src/compiler/turboshaft/graph-builder.h", "src/compiler/turboshaft/graph.cc", "src/compiler/turboshaft/graph.h", - "src/compiler/turboshaft/index.h", + "src/compiler/turboshaft/graph-builder.cc", + "src/compiler/turboshaft/graph-builder.h", "src/compiler/turboshaft/graph-visualizer.cc", "src/compiler/turboshaft/graph-visualizer.h", - "src/compiler/turboshaft/late-escape-analysis-reducer.h", + "src/compiler/turboshaft/index.h", + "src/compiler/turboshaft/instruction-selection-phase.cc", + "src/compiler/turboshaft/instruction-selection-phase.h", "src/compiler/turboshaft/late-escape-analysis-reducer.cc", - "src/compiler/turboshaft/late-optimization-phase.cc", - "src/compiler/turboshaft/late-optimization-phase.h", + "src/compiler/turboshaft/late-escape-analysis-reducer.h", + "src/compiler/turboshaft/late-load-elimination-reducer.cc", + "src/compiler/turboshaft/late-load-elimination-reducer.h", "src/compiler/turboshaft/layered-hash-map.h", "src/compiler/turboshaft/machine-lowering-phase.cc", "src/compiler/turboshaft/machine-lowering-phase.h", @@ -2915,51 +3026,59 @@ filegroup( "src/compiler/turboshaft/machine-optimization-reducer.h", "src/compiler/turboshaft/memory-optimization-reducer.cc", "src/compiler/turboshaft/memory-optimization-reducer.h", + "src/compiler/turboshaft/operation-matcher.h", "src/compiler/turboshaft/operations.cc", "src/compiler/turboshaft/operations.h", - "src/compiler/turboshaft/operation-matching.h", "src/compiler/turboshaft/optimization-phase.cc", "src/compiler/turboshaft/optimization-phase.h", "src/compiler/turboshaft/optimize-phase.cc", "src/compiler/turboshaft/optimize-phase.h", "src/compiler/turboshaft/phase.cc", "src/compiler/turboshaft/phase.h", + "src/compiler/turboshaft/pretenuring-propagation-reducer.cc", + "src/compiler/turboshaft/pretenuring-propagation-reducer.h", "src/compiler/turboshaft/recreate-schedule.cc", "src/compiler/turboshaft/recreate-schedule.h", "src/compiler/turboshaft/recreate-schedule-phase.cc", "src/compiler/turboshaft/recreate-schedule-phase.h", + "src/compiler/turboshaft/reduce-args-helper.h", "src/compiler/turboshaft/reducer-traits.h", "src/compiler/turboshaft/representations.cc", "src/compiler/turboshaft/representations.h", + "src/compiler/turboshaft/required-optimization-reducer.h", "src/compiler/turboshaft/runtime-call-descriptors.h", "src/compiler/turboshaft/select-lowering-reducer.h", "src/compiler/turboshaft/sidetable.h", "src/compiler/turboshaft/simplify-tf-loops.cc", "src/compiler/turboshaft/simplify-tf-loops.h", "src/compiler/turboshaft/snapshot-table.h", - "src/compiler/turboshaft/tag-untag-lowering-phase.cc", - "src/compiler/turboshaft/tag-untag-lowering-phase.h", - "src/compiler/turboshaft/tag-untag-lowering-reducer.h", + "src/compiler/turboshaft/store-store-elimination-phase.cc", + "src/compiler/turboshaft/store-store-elimination-phase.h", + "src/compiler/turboshaft/store-store-elimination-reducer.h", + "src/compiler/turboshaft/structural-optimization-reducer.h", "src/compiler/turboshaft/tracing.h", - "src/compiler/turboshaft/type-inference-analysis.h", - "src/compiler/turboshaft/type-inference-reducer.h", - "src/compiler/turboshaft/typer.cc", - "src/compiler/turboshaft/typer.h", "src/compiler/turboshaft/type-assertions-phase.cc", "src/compiler/turboshaft/type-assertions-phase.h", + "src/compiler/turboshaft/type-inference-analysis.h", + "src/compiler/turboshaft/type-inference-reducer.h", "src/compiler/turboshaft/type-parser.cc", "src/compiler/turboshaft/type-parser.h", "src/compiler/turboshaft/typed-optimizations-phase.cc", "src/compiler/turboshaft/typed-optimizations-phase.h", "src/compiler/turboshaft/typed-optimizations-reducer.h", + "src/compiler/turboshaft/typer.cc", + "src/compiler/turboshaft/typer.h", "src/compiler/turboshaft/types.cc", "src/compiler/turboshaft/types.h", "src/compiler/turboshaft/undef-assembler-macros.inc", "src/compiler/turboshaft/uniform-reducer-adapter.h", + "src/compiler/turboshaft/use-map.cc", + "src/compiler/turboshaft/use-map.h", "src/compiler/turboshaft/utils.cc", "src/compiler/turboshaft/utils.h", "src/compiler/turboshaft/value-numbering-reducer.h", "src/compiler/turboshaft/variable-reducer.h", + "src/compiler/turboshaft/wasm-js-lowering-reducer.h", "src/compiler/type-cache.cc", "src/compiler/type-cache.h", "src/compiler/type-narrowing-reducer.cc", @@ -3035,17 +3154,24 @@ filegroup( ":is_v8_enable_webassembly": [ "src/compiler/int64-lowering.cc", "src/compiler/int64-lowering.h", + "src/compiler/turboshaft/int64-lowering-phase.cc", + "src/compiler/turboshaft/int64-lowering-phase.h", + "src/compiler/turboshaft/int64-lowering-reducer.h", + "src/compiler/turboshaft/wasm-lowering-reducer.h", + "src/compiler/turboshaft/wasm-optimize-phase.cc", + "src/compiler/turboshaft/wasm-optimize-phase.h", + "src/compiler/turboshaft/wasm-turboshaft-compiler.cc", + "src/compiler/turboshaft/wasm-turboshaft-compiler.h", + "src/compiler/wasm-address-reassociation.cc", + "src/compiler/wasm-address-reassociation.h", "src/compiler/wasm-call-descriptors.cc", "src/compiler/wasm-call-descriptors.h", - "src/compiler/wasm-compiler-definitions.h", "src/compiler/wasm-compiler.cc", "src/compiler/wasm-compiler.h", + "src/compiler/wasm-compiler-definitions.cc", + "src/compiler/wasm-compiler-definitions.h", "src/compiler/wasm-escape-analysis.cc", "src/compiler/wasm-escape-analysis.h", - "src/compiler/wasm-load-elimination.cc", - "src/compiler/wasm-load-elimination.h", - "src/compiler/wasm-loop-peeling.cc", - "src/compiler/wasm-loop-peeling.h", "src/compiler/wasm-gc-lowering.cc", "src/compiler/wasm-gc-lowering.h", "src/compiler/wasm-gc-operator-reducer.cc", @@ -3056,6 +3182,12 @@ filegroup( "src/compiler/wasm-inlining.h", "src/compiler/wasm-inlining-into-js.cc", "src/compiler/wasm-inlining-into-js.h", + "src/compiler/wasm-load-elimination.cc", + "src/compiler/wasm-load-elimination.h", + "src/compiler/wasm-loop-peeling.cc", + "src/compiler/wasm-loop-peeling.h", + "src/compiler/wasm-js-lowering.cc", + "src/compiler/wasm-js-lowering.h", "src/compiler/wasm-typer.cc", "src/compiler/wasm-typer.h", ], @@ -3079,9 +3211,9 @@ filegroup( "src/builtins/builtins-call-gen.h", "src/builtins/builtins-collections-gen.cc", "src/builtins/builtins-collections-gen.h", + "src/builtins/builtins-constructor.h", "src/builtins/builtins-constructor-gen.cc", "src/builtins/builtins-constructor-gen.h", - "src/builtins/builtins-constructor.h", "src/builtins/builtins-conversion-gen.cc", "src/builtins/builtins-data-view-gen.h", "src/builtins/builtins-date-gen.cc", @@ -3136,8 +3268,8 @@ filegroup( "src/interpreter/interpreter-generator.h", "src/interpreter/interpreter-intrinsics-generator.cc", "src/interpreter/interpreter-intrinsics-generator.h", - "src/numbers/integer-literal-inl.h", "src/numbers/integer-literal.h", + "src/numbers/integer-literal-inl.h", ] + select({ "@v8//bazel/config:v8_target_ia32": ["src/builtins/ia32/builtins-ia32.cc"], "@v8//bazel/config:v8_target_x64": ["src/builtins/x64/builtins-x64.cc"], @@ -3188,6 +3320,7 @@ filegroup( "src/heap/cppgc/heap.h", "src/heap/cppgc/heap-base.cc", "src/heap/cppgc/heap-base.h", + "src/heap/cppgc/heap-config.h", "src/heap/cppgc/heap-consistency.cc", "src/heap/cppgc/heap-growing.cc", "src/heap/cppgc/heap-growing.h", @@ -3201,8 +3334,6 @@ filegroup( "src/heap/cppgc/heap-statistics-collector.cc", "src/heap/cppgc/heap-statistics-collector.h", "src/heap/cppgc/heap-visitor.h", - "src/heap/cppgc/incremental-marking-schedule.cc", - "src/heap/cppgc/incremental-marking-schedule.h", "src/heap/cppgc/liveness-broker.cc", "src/heap/cppgc/liveness-broker.h", "src/heap/cppgc/logging.cc", @@ -3244,12 +3375,10 @@ filegroup( "src/heap/cppgc/raw-heap.h", "src/heap/cppgc/remembered-set.cc", "src/heap/cppgc/remembered-set.h", - "src/heap/cppgc/source-location.cc", "src/heap/cppgc/stats-collector.cc", "src/heap/cppgc/stats-collector.h", "src/heap/cppgc/sweeper.cc", "src/heap/cppgc/sweeper.h", - "src/heap/cppgc/heap-config.h", "src/heap/cppgc/task-handle.h", "src/heap/cppgc/trace-event.h", "src/heap/cppgc/trace-trait.cc", @@ -3269,6 +3398,9 @@ filegroup( "src/heap/base/active-system-pages.cc", "src/heap/base/active-system-pages.h", "src/heap/base/basic-slot-set.h", + "src/heap/base/bytes.h", + "src/heap/base/incremental-marking-schedule.cc", + "src/heap/base/incremental-marking-schedule.h", "src/heap/base/stack.cc", "src/heap/base/stack.h", "src/heap/base/worklist.cc", @@ -3332,10 +3464,10 @@ filegroup( "src/snapshot/embedded/platform-embedded-file-writer-mac.h", "src/snapshot/embedded/platform-embedded-file-writer-win.cc", "src/snapshot/embedded/platform-embedded-file-writer-win.h", - "src/snapshot/static-roots-gen.cc", - "src/snapshot/static-roots-gen.h", "src/snapshot/mksnapshot.cc", "src/snapshot/snapshot-empty.cc", + "src/snapshot/static-roots-gen.cc", + "src/snapshot/static-roots-gen.h", ], ) @@ -3376,12 +3508,16 @@ filegroup( "src/inspector/v8-debugger-id.h", "src/inspector/v8-debugger-script.cc", "src/inspector/v8-debugger-script.h", + "src/inspector/v8-deep-serializer.cc", + "src/inspector/v8-deep-serializer.h", "src/inspector/v8-heap-profiler-agent-impl.cc", "src/inspector/v8-heap-profiler-agent-impl.h", "src/inspector/v8-inspector-impl.cc", "src/inspector/v8-inspector-impl.h", "src/inspector/v8-inspector-session-impl.cc", "src/inspector/v8-inspector-session-impl.h", + "src/inspector/v8-serialization-duplicate-tracker.cc", + "src/inspector/v8-serialization-duplicate-tracker.h", "src/inspector/v8-profiler-agent-impl.cc", "src/inspector/v8-profiler-agent-impl.h", "src/inspector/v8-regex.cc", @@ -3396,8 +3532,6 @@ filegroup( "src/inspector/v8-string-conversions.h", "src/inspector/v8-value-utils.cc", "src/inspector/v8-value-utils.h", - "src/inspector/v8-webdriver-serializer.cc", - "src/inspector/v8-webdriver-serializer.h", "src/inspector/value-mirror.cc", "src/inspector/value-mirror.h", ":crdtp_platform_files", @@ -3495,10 +3629,36 @@ filegroup( # Generated files # ================================================= +# Define file groups for torque definitions and initializers. Both are +# generated together, but we can use output_group to split them. +filegroup( + name = "icu/generated_torque_definitions", + srcs = [":icu/generated_torque_files"], + output_group = "definitions", +) + +filegroup( + name = "noicu/generated_torque_definitions", + srcs = [":noicu/generated_torque_files"], + output_group = "definitions", +) + +filegroup( + name = "icu/generated_torque_initializers", + srcs = [":icu/generated_torque_files"], + output_group = "initializers", +) + +filegroup( + name = "noicu/generated_torque_initializers", + srcs = [":noicu/generated_torque_files"], + output_group = "initializers", +) + # TODO(victorgomes): Add support to tools/debug_helper, # which needs class-debug-readers and debug-macros. -v8_torque_definitions( - name = "generated_torque_definitions", +v8_torque_files( + name = "generated_torque_files", args = select({ ":is_v8_annotate_torque_ir": ["-annotate-ir"], "//conditions:default": [], @@ -3506,7 +3666,13 @@ v8_torque_definitions( "@v8//bazel/config:v8_target_is_32_bits": ["-m32"], "//conditions:default": [], }), - extras = [ + initializer_extras = [ + "csa-types.h", + "enum-verifiers.cc", + "exported-macros-assembler.cc", + "exported-macros-assembler.h", + ], + definition_extras = [ "bit-fields.h", "builtin-definitions.h", # "class-debug-readers.cc", @@ -3523,25 +3689,7 @@ v8_torque_definitions( "objects-body-descriptors-inl.inc", "objects-printer.cc", "visitor-lists.h", - ], - icu_srcs = [":icu/torque_files"], - noicu_srcs = [":noicu/torque_files"], -) -v8_torque_initializers( - name = "generated_torque_initializers", - args = select({ - ":is_v8_annotate_torque_ir": ["-annotate-ir"], - "//conditions:default": [], - }) + select({ - "@v8//bazel/config:v8_target_is_32_bits": ["-m32"], - "//conditions:default": [], - }), - extras = [ - "csa-types.h", - "enum-verifiers.cc", - "exported-macros-assembler.cc", - "exported-macros-assembler.h", ], icu_srcs = [":icu/torque_files"], noicu_srcs = [":noicu/torque_files"], @@ -3549,7 +3697,6 @@ v8_torque_initializers( py_binary( name = "code_generator", - python_version = "PY3", srcs = [ "third_party/inspector_protocol/code_generator.py", "third_party/inspector_protocol/pdl.py", @@ -3568,6 +3715,8 @@ py_binary( "third_party/inspector_protocol/templates/TypeBuilder_cpp.template", "third_party/inspector_protocol/templates/TypeBuilder_h.template", ], + imports = ["third_party/inspector_protocol/"], + python_version = "PY3", deps = [ requirement("jinja2"), ], @@ -3599,12 +3748,12 @@ genrule( "src/inspector/protocol/Schema.cpp", "src/inspector/protocol/Schema.h", ], - local = 1, cmd = "$(location :code_generator) --jinja_dir . \ --inspector_protocol_dir third_party/inspector_protocol \ --config $(location :src/inspector/inspector_protocol_config.json) \ --config_value protocol.path=$(location :include/js_protocol.pdl) \ --output_base $(@D)/src/inspector", + local = 1, message = "Generating inspector files", tools = [ ":code_generator", @@ -3730,6 +3879,7 @@ cc_library( deps = [ ":torque_base_headers", ":v8_libbase", + "//external:absl_optional", ], ) @@ -3794,7 +3944,12 @@ v8_library( copts = ["-Wno-implicit-fallthrough"], strip_include_prefix = "third_party", visibility = ["//visibility:public"], - deps = [":noicu/v8"], + deps = [":noicu/v8"] + select({ + ":is_v8_enable_vtunejit": [ + ":v8_vtune", + ], + "//conditions:default": [], + }), ) alias( @@ -3807,6 +3962,20 @@ alias( actual = "icu/v8", ) +v8_library( + name = "v8_vtune", + srcs = glob([ + "src/third_party/vtune/v8-vtune.h", + "src/third_party/vtune/vtune-jit.cc", + "src/third_party/vtune/vtune-jit.h", + ]), + copts = ["-I"], + deps = [ + ":core_lib_noicu", + "@intel_ittapi//:lib_ittapi", + ], +) + # ================================================= # Binary rules # ================================================= @@ -3842,6 +4011,7 @@ v8_binary( "UNISTR_FROM_CHAR_EXPLICIT=", ], deps = [ + "//external:absl_optional", "//external:icu", ], ) @@ -3856,8 +4026,8 @@ v8_binary( "@v8//bazel/config:is_posix": ["-fexceptions"], "//conditions:default": [], }), - icu_defines = [ "V8_INTL_SUPPORT" ], features = ["-use_header_modules"], + icu_defines = ["V8_INTL_SUPPORT"], linkopts = select({ "@v8//bazel/config:is_android": ["-llog"], "//conditions:default": [], @@ -3878,14 +4048,14 @@ v8_binary( }), copts = ["-Wno-implicit-fallthrough"], icu_deps = [":icu/v8_libshared"], - linkopts = select({ - "@v8//bazel/config:is_android": ["-llog"], - "//conditions:default": [], - }), icu_srcs = [ ":icu/generated_torque_initializers", ":icu/v8_initializers_files", ], + linkopts = select({ + "@v8//bazel/config:is_android": ["-llog"], + "//conditions:default": [], + }), noicu_deps = [":v8_libshared_noicu"], noicu_srcs = [ ":noicu/generated_torque_initializers", @@ -3943,10 +4113,10 @@ py_test( "mjsunit", ], data = [ - "//testing/pybase", - ":noicu/v8_build_config", - ":noicu/d8", "test", + ":noicu/d8", + ":noicu/v8_build_config", + "//testing/pybase", ] + glob(["test/**"]) + glob(["tools/**/*.js"]) + glob(["tools/**/*.mjs"]), main = "tools/run-tests.py", python_version = "PY3", @@ -3973,10 +4143,10 @@ py_test( "mjsunit", ], data = [ - "//testing/pybase", - ":icu/v8_build_config", - ":icu/d8", "test", + ":icu/d8", + ":icu/v8_build_config", + "//testing/pybase", ] + glob(["test/**"]) + glob(["tools/**/*.js"]) + glob(["tools/**/*.mjs"]), main = "tools/run-tests.py", python_version = "PY3", diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 68d92c3477bc2c..dd97c4f922c81a 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -134,7 +134,7 @@ declare_args() { # Mode used by gen-static-roots.py to have a heap layout which is identical # to when v8_enable_static_roots is enabled. - v8_enable_static_root_generation = false + v8_enable_static_roots_generation = false # Enable code-generation-time checking of types in the CodeStubAssembler. v8_enable_verify_csa = false @@ -189,6 +189,15 @@ declare_args() { # used builtins. v8_enable_builtins_profiling_verbose = false + # This build flag is used to input a builtin pgo file containing raw + # execution counts (as opposed to branch hints), which are embedded into + # the `--trace-turbo` .json file from `mksnapshot`. + v8_log_builtins_block_count_input = "" + + # This build flag is used to control whether reorder builtins acoording to + # the call graph with C3 algorithm based builtin PGO profiling. + v8_enable_builtins_reordering = false + # Provides the given V8 log file as an input to mksnapshot, where it can be # used for profile-guided optimization of builtins. # @@ -284,6 +293,9 @@ declare_args() { # Use switch-based dispatch if this is false v8_enable_regexp_interpreter_threaded_dispatch = true + # Enforce equality of builtins hashes from compatible architectures. + v8_verify_builtins_compatibility = false + # Check mksnapshot determinism by running it multiple times. v8_verify_deterministic_mksnapshot = false @@ -309,7 +321,7 @@ declare_args() { # Enable heap reservation of size 4GB. Only possible for 64bit archs. cppgc_enable_caged_heap = v8_current_cpu == "x64" || v8_current_cpu == "arm64" || - v8_current_cpu == "loong64" + v8_current_cpu == "loong64" || v8_current_cpu == "riscv64" # Enables additional heap verification phases and checks. cppgc_enable_verify_heap = "" @@ -325,6 +337,10 @@ declare_args() { # Sets -DV8_ENABLE_SANDBOX. v8_enable_sandbox = "" + # Enable experimental code pointer sandboxing for the V8 sandbox. + # Sets -DV8_CODE_POINTER_SANDBOXING + v8_code_pointer_sandboxing = "" + # Expose the memory corruption API to JavaScript. Useful for testing the sandbox. # WARNING This will expose builtins that (by design) cause memory corruption. # Sets -DV8_EXPOSE_MEMORY_CORRUPTION_API @@ -370,17 +386,6 @@ declare_args() { # This is only used by nodejs. v8_scriptormodule_legacy_lifetime = false - # Change code emission and runtime features to be CET shadow-stack compliant - # (incomplete and experimental). - v8_enable_cet_shadow_stack = false - - # Get VMEX priviledge at startup. - # It allows to run V8 without "deprecated-ambient-replace-as-executable". - # Sets -DV8_USE_VMEX_RESOURCE. - # TODO(victorgomes): Remove this flag once Chormium no longer needs - # the deprecated feature. - v8_fuchsia_use_vmex_resource = is_fuchsia && !build_with_chromium - # Enables pointer compression for 8GB heaps. # Sets -DV8_COMPRESS_POINTERS_8GB. v8_enable_pointer_compression_8gb = "" @@ -399,6 +404,23 @@ declare_args() { # iOS (non-simulator) does not have executable pages for 3rd party # applications yet so disable jit. v8_jitless = v8_enable_lite_mode || target_is_ios_device + + # Enable Maglev's graph printer. + # Sets -DV8_ENABLE_MAGLEV_GRAPH_PRINTER. + v8_enable_maglev_graph_printer = !build_with_chromium + + # Enable slow tracing, e.g., tracing on every instruction or Turbofan node. + # Sets -DV8_ENABLE_SLOW_TRACING. + v8_enable_slow_tracing = is_debug + + # Enable jump table switch for built-in. + v8_enable_builtin_jump_table_switch = v8_current_cpu == "x64" + + v8_shortcut_strings_in_minor_ms = false + + # Whether custom embedder snapshots may extend (= allocate new objects in) + # ReadOnlySpace. + v8_enable_extensible_ro_snapshot = true } # Derived defaults. @@ -478,13 +500,12 @@ if (v8_enable_short_builtin_calls == "") { if (v8_enable_external_code_space == "") { v8_enable_external_code_space = v8_enable_pointer_compression && - (v8_current_cpu == "x64" || - (target_os != "fuchsia" && v8_current_cpu == "arm64")) + (v8_current_cpu == "x64" || v8_current_cpu == "arm64") } if (v8_enable_maglev == "") { v8_enable_maglev = v8_enable_turbofan && - (v8_current_cpu == "x64" || v8_current_cpu == "arm64") && - v8_enable_pointer_compression + (v8_current_cpu == "arm" || v8_current_cpu == "x64" || + v8_current_cpu == "arm64") } assert(v8_enable_turbofan || !v8_enable_maglev, "Maglev is not available when Turbofan is disabled.") @@ -546,6 +567,11 @@ if (v8_enable_sandbox == "") { v8_enable_external_code_space && target_os != "fuchsia" } +if (v8_code_pointer_sandboxing == "") { + # By default, enable code pointer sandboxing if the sandbox is enabled. + v8_code_pointer_sandboxing = v8_enable_sandbox +} + if (v8_enable_static_roots == "") { # Static roots are only valid for builds with pointer compression and a # shared read-only heap. @@ -569,7 +595,7 @@ assert(!v8_enable_static_roots || "Trying to enable static roots in a configuration that is not supported") assert( - !(v8_enable_static_roots && v8_enable_static_root_generation), + !(v8_enable_static_roots && v8_enable_static_roots_generation), "Static root values must be generated in a build that does not rely on static roots itself") if (v8_builtins_profiling_log_file == "default") { @@ -584,20 +610,30 @@ if (v8_builtins_profiling_log_file == "default") { # are accessed, # * v8_enable_webassembly because it changes the set of opcodes which affects # graphs hashes, - # * !is_clang because it might affect argument evaluation order, which - # makes node IDs not predictable for subgraphs like Op1(Op2(), Op3()) and - # as a result different graph hash. if (v8_enable_builtins_optimization && !v8_enable_builtins_profiling && - is_clang && !is_debug && !dcheck_always_on && v8_enable_webassembly) { + !is_debug && !dcheck_always_on && v8_enable_webassembly) { + # This is about function arguments evaluation order, which makes node IDs + # not predictable for subgraphs like Op1(Op2(), Op3()) and as a result + # different graph hashes. + # Clang uses left-to-right order everywhere except Windows, otherwise the + # order is right-to-left. + # TODO(crbug.com/v8/13647): Remove once this issue is fixed in CSA. + if (!is_clang || is_win) { + pgo_profile_suffix = "-rl" + } else { + pgo_profile_suffix = "" + } if ((v8_current_cpu == "x64" || v8_current_cpu == "arm64") && v8_enable_pointer_compression && v8_enable_external_code_space && v8_enable_sandbox) { # Note, currently x64 profile can be applied to arm64 but not the other # way round. - v8_builtins_profiling_log_file = "tools/builtins-pgo/profiles/x64.profile" + v8_builtins_profiling_log_file = + "tools/builtins-pgo/profiles/x64" + pgo_profile_suffix + ".profile" } else if (v8_current_cpu == "x86" || v8_current_cpu == "arm") { # Note, x86 profile can be applied to arm but not the other way round. - v8_builtins_profiling_log_file = "tools/builtins-pgo/profiles/x86.profile" + v8_builtins_profiling_log_file = + "tools/builtins-pgo/profiles/x86" + pgo_profile_suffix + ".profile" } } } @@ -637,6 +673,9 @@ assert(!v8_enable_sandbox || v8_enable_pointer_compression_shared_cage, assert(!v8_enable_sandbox || v8_enable_external_code_space, "The sandbox requires the external code space") +assert(!v8_code_pointer_sandboxing || v8_enable_sandbox, + "Code pointer sandboxing requires the sandbox") + assert(!v8_expose_memory_corruption_api || v8_enable_sandbox, "The Memory Corruption API requires the sandbox") @@ -647,14 +686,16 @@ assert( assert( !v8_enable_pointer_compression_shared_cage || v8_current_cpu == "x64" || v8_current_cpu == "arm64" || v8_current_cpu == "riscv64" || - v8_current_cpu == "ppc64", - "Sharing a pointer compression cage is only supported on x64,arm64, ppc64 and riscv64") + v8_current_cpu == "ppc64" || v8_current_cpu == "s390x" || + v8_current_cpu == "loong64", + "Sharing a pointer compression cage is only supported on x64, arm64, ppc64, s390x, riscv64 and loong64") assert(!v8_enable_unconditional_write_barriers || !v8_disable_write_barriers, "Write barriers can't be both enabled and disabled") assert(!cppgc_enable_caged_heap || v8_current_cpu == "x64" || - v8_current_cpu == "arm64" || v8_current_cpu == "loong64", + v8_current_cpu == "arm64" || v8_current_cpu == "loong64" || + v8_current_cpu == "riscv64", "CppGC caged heap requires 64bit platforms") assert(!cppgc_enable_young_generation || cppgc_enable_caged_heap, @@ -669,10 +710,6 @@ if (v8_enable_single_generation == true) { "Requires unconditional write barriers or none (which disables incremental marking)") } -if (v8_fuchsia_use_vmex_resource) { - assert(target_os == "fuchsia", "VMEX resource only available on Fuchsia") -} - assert(!v8_enable_snapshot_compression || v8_use_zlib, "Snapshot compression requires zlib") @@ -715,7 +752,9 @@ config("internal_config") { } if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { - libs = [ "atomic" ] + if (!is_clang) { + libs = [ "atomic" ] + } } } @@ -787,7 +826,9 @@ config("external_config") { } if (current_cpu == "riscv64" || current_cpu == "riscv32") { - libs = [ "atomic" ] + if (!is_clang) { + libs = [ "atomic" ] + } } } @@ -816,6 +857,7 @@ external_v8_defines = [ "V8_MAP_PACKING", "V8_IS_TSAN", "V8_ENABLE_CONSERVATIVE_STACK_SCANNING", + "V8_ENABLE_DIRECT_LOCAL", ] enabled_external_v8_defines = [] @@ -858,7 +900,12 @@ if (is_tsan) { if (v8_enable_conservative_stack_scanning) { enabled_external_v8_defines += [ "V8_ENABLE_CONSERVATIVE_STACK_SCANNING" ] } - +if (v8_enable_direct_local) { + enabled_external_v8_defines += [ "V8_ENABLE_DIRECT_LOCAL" ] +} +if (v8_shortcut_strings_in_minor_ms) { + enabled_external_v8_defines += [ "V8_MINORMS_STRING_SHORTCUTTING" ] +} disabled_external_v8_defines = external_v8_defines - enabled_external_v8_defines # Put defines that are used in public headers here; public headers are @@ -881,6 +928,7 @@ external_cppgc_defines = [ "CPPGC_SLIM_WRITE_BARRIER", "CPPGC_YOUNG_GENERATION", "CPPGC_POINTER_COMPRESSION", + "CPPGC_ENABLE_LARGER_CAGE", ] enabled_external_cppgc_defines = [] @@ -908,6 +956,9 @@ if (cppgc_enable_pointer_compression) { if (cppgc_enable_2gb_cage) { enabled_external_cppgc_defines += [ "CPPGC_2GB_CAGE" ] } +if (cppgc_enable_larger_cage) { + enabled_external_cppgc_defines += [ "CPPGC_ENABLE_LARGER_CAGE" ] +} if (cppgc_enable_slim_write_barrier) { enabled_external_cppgc_defines += [ "CPPGC_SLIM_WRITE_BARRIER" ] } @@ -954,9 +1005,12 @@ config("features") { if (v8_embedder_string != "") { defines += [ "V8_EMBEDDER_STRING=\"$v8_embedder_string\"" ] } - if (v8_enable_disassembler) { + if (v8_enable_disassembler || v8_log_builtins_block_count_input != "") { defines += [ "ENABLE_DISASSEMBLER" ] } + if (v8_log_builtins_block_count_input != "") { + defines += [ "LOG_BUILTIN_BLOCK_COUNT" ] + } if (v8_promise_internal_field_count != 0) { defines += [ "V8_PROMISE_INTERNAL_FIELD_COUNT=${v8_promise_internal_field_count}" ] @@ -1125,9 +1179,6 @@ config("features") { if (v8_advanced_bigint_algorithms) { defines += [ "V8_ADVANCED_BIGINT_ALGORITHMS" ] } - if (v8_fuchsia_use_vmex_resource) { - defines += [ "V8_USE_VMEX_RESOURCE" ] - } if (v8_expose_memory_corruption_api) { defines += [ "V8_EXPOSE_MEMORY_CORRUPTION_API" ] } @@ -1137,8 +1188,8 @@ config("features") { if (v8_enable_static_roots) { defines += [ "V8_STATIC_ROOTS" ] } - if (v8_enable_static_root_generation) { - defines += [ "V8_STATIC_ROOT_GENERATION" ] + if (v8_enable_static_roots_generation) { + defines += [ "V8_STATIC_ROOTS_GENERATION" ] } if (v8_use_zlib) { defines += [ "V8_USE_ZLIB" ] @@ -1152,6 +1203,24 @@ config("features") { if (v8_enable_wasm_simd256_revec) { defines += [ "V8_ENABLE_WASM_SIMD256_REVEC" ] } + if (v8_code_pointer_sandboxing) { + defines += [ "V8_CODE_POINTER_SANDBOXING" ] + } + if (v8_enable_maglev_graph_printer) { + defines += [ "V8_ENABLE_MAGLEV_GRAPH_PRINTER" ] + } + if (v8_enable_slow_tracing) { + defines += [ "V8_ENABLE_SLOW_TRACING" ] + } + if (v8_enable_builtin_jump_table_switch) { + defines += [ "V8_ENABLE_BUILTIN_JUMP_TABLE_SWITCH" ] + } + if (v8_enable_direct_handle) { + defines += [ "V8_ENABLE_DIRECT_HANDLE" ] + } + if (v8_enable_extensible_ro_snapshot) { + defines += [ "V8_ENABLE_EXTENSIBLE_RO_SNAPSHOT" ] + } } config("toolchain") { @@ -1296,6 +1365,11 @@ config("toolchain") { defines += [ "V8_TARGET_ARCH_RISCV32" ] defines += [ "__riscv_xlen=32" ] defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] + + if (riscv_use_rvv || target_is_simulator) { + defines += [ "CAN_USE_RVV_INSTRUCTIONS" ] + defines += [ "RVV_VLEN=${riscv_rvv_vlen}" ] + } } if (v8_current_cpu == "x86") { @@ -1384,21 +1458,35 @@ config("toolchain") { "-Wmissing-field-initializers", "-Wunreachable-code", - # Google3 enables this warning, so we should also enable it to find issue - # earlier. See https://reviews.llvm.org/D56731 for details about this - # warning. - "-Wctad-maybe-unsupported", - # TODO(v8:12245): Fix shadowing instances and remove. "-Wno-shadow", ] + # TODO(fuchsia:127411): Re-enable once FIDL bindings are compatible. + if (!is_fuchsia) { + # Google3 enables this warning, so we should also enable it to find issue + # earlier. See https://reviews.llvm.org/D56731 for details about this + # warning. + cflags += [ "-Wctad-maybe-unsupported" ] + } + if (v8_current_cpu == "x64" || v8_current_cpu == "arm64" || v8_current_cpu == "mips64el" || v8_current_cpu == "riscv64") { cflags += [ "-Wshorten-64-to-32" ] } } + if (is_clang || !is_win) { + cflags += [ + # On clang and gcc, disable warnings about offsetof being used on + # non-standard-layout types. offsetof is only specified for + # standard-layout types, but its behaviour on non-standard-layout types is + # implementation defined (rather than UB), and our supported compilers + # have the expected reasonable behaviour. + "-Wno-invalid-offsetof", + ] + } + if (is_win) { cflags += [ "/wd4245", # Conversion with signed/unsigned mismatch. @@ -1560,10 +1648,6 @@ config("toolchain") { "/wd4715", # 'function' : not all control paths return a value' # MSVC does not analyze switch (enum) for completeness. ] - - # TODO(https://crbug.com/1377771): Keep MSVC on C++17 until source code is - # made compatible with C++20. - cflags_cc = [ "/std:c++17" ] } if (!is_clang && !is_win) { @@ -1653,10 +1737,20 @@ if (v8_postmortem_support) { "src/objects/allocation-site-inl.h", "src/objects/cell.h", "src/objects/cell-inl.h", + "src/objects/dependent-code.h", + "src/objects/dependent-code-inl.h", + "src/objects/bytecode-array.h", + "src/objects/bytecode-array-inl.h", + "src/objects/abstract-code.h", + "src/objects/abstract-code-inl.h", + "src/objects/instruction-stream.h", + "src/objects/instruction-stream-inl.h", "src/objects/code.h", "src/objects/code-inl.h", "src/objects/data-handler.h", "src/objects/data-handler-inl.h", + "src/objects/deoptimization-data.h", + "src/objects/deoptimization-data-inl.h", "src/objects/descriptor-array.h", "src/objects/descriptor-array-inl.h", "src/objects/feedback-cell.h", @@ -1668,6 +1762,8 @@ if (v8_postmortem_support) { "src/objects/heap-object.h", "src/objects/heap-object-inl.h", "src/objects/instance-type.h", + "src/objects/instance-type-checker.h", + "src/objects/instance-type-inl.h", "src/objects/js-array-buffer.h", "src/objects/js-array-buffer-inl.h", "src/objects/js-array.h", @@ -1715,6 +1811,7 @@ if (v8_postmortem_support) { "src/objects/string-inl.h", "src/objects/struct.h", "src/objects/struct-inl.h", + "src/objects/tagged.h", ] outputs = [ "$target_gen_dir/debug-support.cc" ] @@ -1781,9 +1878,11 @@ torque_files = [ "src/builtins/iterator.tq", "src/builtins/iterator-from.tq", "src/builtins/iterator-helpers.tq", + "src/builtins/map-groupby.tq", "src/builtins/math.tq", "src/builtins/number.tq", "src/builtins/object-fromentries.tq", + "src/builtins/object-groupby.tq", "src/builtins/object.tq", "src/builtins/promise-abstract-operations.tq", "src/builtins/promise-all.tq", @@ -1791,12 +1890,13 @@ torque_files = [ "src/builtins/promise-any.tq", "src/builtins/promise-constructor.tq", "src/builtins/promise-finally.tq", + "src/builtins/promise-jobs.tq", "src/builtins/promise-misc.tq", "src/builtins/promise-race.tq", "src/builtins/promise-reaction-job.tq", "src/builtins/promise-resolve.tq", "src/builtins/promise-then.tq", - "src/builtins/promise-jobs.tq", + "src/builtins/promise-withresolvers.tq", "src/builtins/proxy-constructor.tq", "src/builtins/proxy-delete-property.tq", "src/builtins/proxy-get-property.tq", @@ -1819,6 +1919,13 @@ torque_files = [ "src/builtins/regexp-split.tq", "src/builtins/regexp-test.tq", "src/builtins/regexp.tq", + "src/builtins/set-difference.tq", + "src/builtins/set-intersection.tq", + "src/builtins/set-is-disjoint-from.tq", + "src/builtins/set-is-subset-of.tq", + "src/builtins/set-is-superset-of.tq", + "src/builtins/set-symmetric-difference.tq", + "src/builtins/set-union.tq", "src/builtins/string-at.tq", "src/builtins/string-endswith.tq", "src/builtins/string-html.tq", @@ -1871,7 +1978,7 @@ torque_files = [ "src/objects/bigint.tq", "src/objects/call-site-info.tq", "src/objects/cell.tq", - "src/objects/code.tq", + "src/objects/bytecode-array.tq", "src/objects/contexts.tq", "src/objects/data-handler.tq", "src/objects/debug-objects.tq", @@ -1910,6 +2017,7 @@ torque_files = [ "src/objects/module.tq", "src/objects/name.tq", "src/objects/oddball.tq", + "src/objects/hole.tq", "src/objects/ordered-hash-table.tq", "src/objects/primitive-heap-object.tq", "src/objects/promise.tq", @@ -1957,7 +2065,10 @@ if (v8_enable_i18n_support) { if (v8_enable_webassembly) { torque_files += [ + "src/builtins/js-to-wasm.tq", "src/builtins/wasm.tq", + "src/builtins/wasm-strings.tq", + "src/builtins/wasm-to-js.tq", "src/debug/debug-wasm-objects.tq", "src/wasm/wasm-objects.tq", ] @@ -2081,6 +2192,15 @@ group("v8_maybe_icu") { } } +group("v8_abseil") { + public_deps = [ "//third_party/abseil-cpp:absl" ] + + public_configs = [ + "//third_party/abseil-cpp:absl_define_config", + "//third_party/abseil-cpp:absl_include_config", + ] +} + v8_header_set("torque_runtime_support") { visibility = [ ":*" ] @@ -2101,6 +2221,7 @@ v8_source_set("torque_generated_initializers") { public_deps = [ ":torque_runtime_support", + ":v8_abseil", ":v8_maybe_icu", ] @@ -2119,6 +2240,18 @@ v8_source_set("torque_generated_initializers") { } configs = [ ":internal_config" ] + + if (v8_symbol_level > 1) { + # Symbols cause huge compile time on some bigger torque files, see + # https://crbug.com/1472715. Thus remove any symbol configs added in v8.gni + # and instead add the "minimal_symbols" config. + v8_add_configs -= + filter_include(v8_add_configs, [ "//build/config/compiler:*symbols" ]) + if (v8_symbol_level == symbol_level) { + v8_remove_configs += [ "//build/config/compiler:default_symbols" ] + } + configs += [ "//build/config/compiler:minimal_symbols" ] + } } v8_source_set("torque_generated_definitions") { @@ -2132,7 +2265,10 @@ v8_source_set("torque_generated_definitions") { ":v8_tracing", ] - public_deps = [ ":v8_maybe_icu" ] + public_deps = [ + ":v8_abseil", + ":v8_maybe_icu", + ] sources = [ "$target_gen_dir/torque-generated/class-forward-declarations.h", @@ -2213,6 +2349,15 @@ template("run_mksnapshot") { rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir), ] + if (v8_log_builtins_block_count_input != "") { + args += [ + "--trace-turbo", + + "--turbo-log-builtins-count-input", + v8_log_builtins_block_count_input, + ] + } + if (v8_enable_builtins_profiling) { args += [ "--turbo-profiling" ] } @@ -2224,13 +2369,15 @@ template("run_mksnapshot") { args += [ "--turbo-profiling-input", rebase_path(v8_builtins_profiling_log_file, root_build_dir), + + # Replace this with --warn-about-builtin-profile-data to see the full + # list of builtins with incompatible profiles. + "--abort-on-bad-builtin-profile-data", ] - # Replace this with --warn-about-builtin-profile-data to see the full - # list of builtins with incompatible profiles. - # TODO(crbug.com/v8/13647): Do not fail for invalid profiles - # args += [ "--abort-on-bad-builtin-profile-data" ] - args += [ "--warn-about-builtin-profile-data" ] + if (!v8_enable_builtins_profiling && v8_enable_builtins_reordering) { + args += [ "--reorder-builtins" ] + } } # This is needed to distinguish between generating code for the simulator @@ -2360,69 +2507,158 @@ if (v8_verify_deterministic_mksnapshot) { } } +if (v8_verify_builtins_compatibility) { + # This specifies a separate mksnapshot target for each of: + # x86, x64, arm, arm64. + hashes = "builtins_hashes_$v8_current_cpu" + run_mksnapshot("dump_$v8_current_cpu") { + args = [ + "--dump-builtins-hashes-to-file", + hashes, + ] + embedded_variant = "Default" + } + + # This template defines a comparison action for the architecture the pgo + # profile is made for (e.g. x64) and the architecture the profile is used + # for (e.g. arm64 with toolchain x64_v8_arm64). + template("verify_builtins_hashes") { + forward_variables_from(invoker, + [ + "profile_arch", + "target_arch", + ]) + profile_toolchain = "//build/toolchain/linux:clang_${profile_arch}" + target_toolchain = + "//build/toolchain/linux:clang_${profile_arch}_v8_${target_arch}" + action("compare_builtins_$target_name") { + deps = [ + ":run_mksnapshot_dump_${profile_arch}($profile_toolchain)", + ":run_mksnapshot_dump_${target_arch}($target_toolchain)", + ] + report_file = "$root_build_dir/builtins_comparison_$target_name" + script = "tools/builtins-pgo/assert_builtins_hashes.py" + args = [ + "builtins_hashes_${profile_arch}", + "builtins_hashes_${target_arch}", + rebase_path(report_file, root_build_dir), + ] + outputs = [ report_file ] + } + } + + verify_builtins_hashes("x86_arm") { + profile_arch = "x86" + target_arch = "arm" + } + + verify_builtins_hashes("x64_arm64") { + profile_arch = "x64" + target_arch = "arm64" + } + + group("verify_all_builtins_hashes") { + deps = [ + ":compare_builtins_x64_arm64", + ":compare_builtins_x86_arm", + ] + } +} + action("v8_dump_build_config") { script = "tools/testrunner/utils/dump_build_config.py" outputs = [ "$root_out_dir/v8_build_config.json" ] is_DEBUG_defined = v8_enable_debugging_features || dcheck_always_on is_full_debug = v8_enable_debugging_features && !v8_optimized_debug + + arch = v8_target_cpu + if (v8_target_cpu == "x86") { + arch = "ia32" + } + + mips_arch_variant_var = "" + mips_use_msa_var = false + if (arch == "mips64" || arch == "mips64el") { + mips_arch_variant_var = mips_arch_variant + mips_use_msa_var = mips_use_msa + } + + js_shared_memory = + v8_enable_shared_ro_heap && (!v8_enable_pointer_compression || + v8_enable_pointer_compression_shared_cage) && + !v8_disable_write_barriers + simd_mips = mips_arch_variant_var == "r6" && mips_use_msa + simulator_run = target_cpu != v8_target_cpu + use_sanitizer = is_asan || is_cfi || is_msan || is_tsan || is_ubsan + + # This lists all build-time switches consumed by the test framework. All + # switches can be used automatically in the status files as is - no + # further files need to be modified. + # + # Naming conventions: Keep switch names short and remove unnecessary + # qualifiers. Drop v8_enable_, v8_, is_ where possible. + # Keep only qualifiers that disambiguate the switches from other things. + # Examples: has_turbofan disambiguates from the turbofan runtime variant, + # is_android disambiguates from the android keyword in status files, + # v8_cfi disambiguates from the global cfi flag. args = [ rebase_path("$root_out_dir/v8_build_config.json", root_build_dir), + "arch=\"$arch\"", + "asan=$is_asan", + "atomic_object_field_writes=$v8_enable_atomic_object_field_writes", + "cet_shadow_stack=$v8_enable_cet_shadow_stack", + "cfi=$is_cfi", + "clang=$is_clang", + "clang_coverage=$use_clang_coverage", + "code_comments=$v8_code_comments", + "component_build=$is_component_build", + "concurrent_marking=$v8_enable_concurrent_marking", + "conservative_stack_scanning=$v8_enable_conservative_stack_scanning", "current_cpu=\"$current_cpu\"", "dcheck_always_on=$dcheck_always_on", + "debug_code=$v8_enable_debug_code", + "DEBUG_defined=$is_DEBUG_defined", + "debugging_features=$v8_enable_debugging_features", + "dict_property_const_tracking=$v8_dict_property_const_tracking", + "direct_handle=$v8_enable_direct_handle", + "direct_local=$v8_enable_direct_local", + "disassembler=$v8_enable_disassembler", + "full_debug=$is_full_debug", + "gdbjit=$v8_enable_gdbjit", + "has_jitless=$v8_jitless", + "has_maglev=$v8_enable_maglev", + "has_turbofan=$v8_enable_turbofan", + "has_webassembly=$v8_enable_webassembly", + "i18n=$v8_enable_i18n_support", "is_android=$is_android", - "is_asan=$is_asan", - "is_cfi=$is_cfi", - "is_clang=$is_clang", - "is_clang_coverage=$use_clang_coverage", - "is_component_build=$is_component_build", - "is_debug=$v8_enable_debugging_features", - "is_DEBUG_defined=$is_DEBUG_defined", - "is_full_debug=$is_full_debug", - "is_msan=$is_msan", - "is_tsan=$is_tsan", - "is_ubsan_vptr=$is_ubsan_vptr", + "is_ios=$is_ios", + "js_shared_memory=$js_shared_memory", + "lite_mode=$v8_enable_lite_mode", + "mips_arch_variant=\"$mips_arch_variant_var\"", + "mips_use_msa=$mips_use_msa_var", + "msan=$is_msan", + "official_build=$is_official_build", + "pointer_compression=$v8_enable_pointer_compression", + "pointer_compression_shared_cage=$v8_enable_pointer_compression_shared_cage", + "runtime_call_stats=$v8_enable_runtime_call_stats", + "sandbox=$v8_enable_sandbox", + "shared_ro_heap=$v8_enable_shared_ro_heap", + "simd_mips=$simd_mips", + "simulator_run=$simulator_run", + "single_generation=$v8_enable_single_generation", + "slow_dchecks=$v8_enable_slow_dchecks", "target_cpu=\"$target_cpu\"", - "v8_code_comments=$v8_code_comments", - "v8_control_flow_integrity=$v8_control_flow_integrity", + "third_party_heap=$v8_enable_third_party_heap", + "tsan=$is_tsan", + "ubsan=$is_ubsan", + "use_sanitizer=$use_sanitizer", + "v8_cfi=$v8_control_flow_integrity", "v8_current_cpu=\"$v8_current_cpu\"", - "v8_dict_property_const_tracking=$v8_dict_property_const_tracking", - "v8_disable_write_barriers=$v8_disable_write_barriers", - "v8_enable_atomic_object_field_writes=" + - "$v8_enable_atomic_object_field_writes", - "v8_enable_cet_shadow_stack=$v8_enable_cet_shadow_stack", - "v8_enable_concurrent_marking=$v8_enable_concurrent_marking", - "v8_enable_conservative_stack_scanning=" + - "$v8_enable_conservative_stack_scanning", - "v8_enable_debug_code=$v8_enable_debug_code", - "v8_enable_disassembler=$v8_enable_disassembler", - "v8_enable_gdbjit=$v8_enable_gdbjit", - "v8_enable_i18n_support=$v8_enable_i18n_support", - "v8_enable_lite_mode=$v8_enable_lite_mode", - "v8_enable_maglev=$v8_enable_maglev", - "v8_enable_pointer_compression=$v8_enable_pointer_compression", - "v8_enable_pointer_compression_shared_cage=" + - "$v8_enable_pointer_compression_shared_cage", - "v8_enable_runtime_call_stats=$v8_enable_runtime_call_stats", - "v8_enable_sandbox=$v8_enable_sandbox", - "v8_enable_shared_ro_heap=$v8_enable_shared_ro_heap", - "v8_enable_single_generation=$v8_enable_single_generation", - "v8_enable_slow_dchecks=$v8_enable_slow_dchecks", - "v8_enable_third_party_heap=$v8_enable_third_party_heap", - "v8_enable_turbofan=$v8_enable_turbofan", - "v8_enable_verify_csa=$v8_enable_verify_csa", - "v8_enable_verify_heap=$v8_enable_verify_heap", - "v8_enable_verify_predictable=$v8_enable_verify_predictable", - "v8_enable_webassembly=$v8_enable_webassembly", - "v8_jitless=$v8_jitless", "v8_target_cpu=\"$v8_target_cpu\"", + "verify_csa=$v8_enable_verify_csa", + "verify_heap=$v8_enable_verify_heap", + "verify_predictable=$v8_enable_verify_predictable", ] - - if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { - args += [ - "mips_arch_variant=\"$mips_arch_variant\"", - "mips_use_msa=$mips_use_msa", - ] - } } ############################################################################### @@ -2467,7 +2703,10 @@ v8_source_set("v8_snapshot") { sources += [ "src/snapshot/snapshot-external.cc" ] } else { - public_deps += [ ":v8_maybe_icu" ] + public_deps += [ + ":v8_abseil", + ":v8_maybe_icu", + ] sources += [ "$target_gen_dir/snapshot.cc" ] } @@ -2650,7 +2889,10 @@ v8_source_set("v8_init") { "src/init/setup-isolate-full.cc", ] - public_deps = [ ":v8_maybe_icu" ] + public_deps = [ + ":v8_abseil", + ":v8_maybe_icu", + ] configs = [ ":internal_config" ] } @@ -2672,6 +2914,7 @@ v8_header_set("v8_config_headers") { sources = [ "include/v8-platform.h", + "include/v8-source-location.h", "include/v8config.h", ] @@ -2707,6 +2950,7 @@ v8_header_set("v8_headers") { "include/v8-forward.h", "include/v8-function-callback.h", "include/v8-function.h", + "include/v8-handle-base.h", "include/v8-initialization.h", "include/v8-internal.h", "include/v8-isolate.h", @@ -2894,6 +3138,7 @@ v8_header_set("v8_internal_headers") { "src/codegen/interface-descriptors-inl.h", "src/codegen/interface-descriptors.h", "src/codegen/label.h", + "src/codegen/linkage-location.h", "src/codegen/machine-type.h", "src/codegen/macro-assembler-base.h", "src/codegen/macro-assembler-inl.h", @@ -2907,6 +3152,7 @@ v8_header_set("v8_internal_headers") { "src/codegen/register.h", "src/codegen/reglist-base.h", "src/codegen/reglist.h", + "src/codegen/reloc-info-inl.h", "src/codegen/reloc-info.h", "src/codegen/safepoint-table-base.h", "src/codegen/safepoint-table.h", @@ -2941,6 +3187,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/backend/gap-resolver.h", "src/compiler/backend/instruction-codes.h", "src/compiler/backend/instruction-scheduler.h", + "src/compiler/backend/instruction-selector-adapter.h", "src/compiler/backend/instruction-selector-impl.h", "src/compiler/backend/instruction-selector.h", "src/compiler/backend/instruction.h", @@ -2994,6 +3241,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/js-create-lowering.h", "src/compiler/js-generic-lowering.h", "src/compiler/js-graph.h", + "src/compiler/js-heap-broker-inl.h", "src/compiler/js-heap-broker.h", "src/compiler/js-inlining-heuristic.h", "src/compiler/js-inlining.h", @@ -3029,6 +3277,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/operator-properties.h", "src/compiler/operator.h", "src/compiler/osr.h", + "src/compiler/pair-load-store-reducer.h", "src/compiler/per-isolate-compiler-cache.h", "src/compiler/persistent-map.h", "src/compiler/phase.h", @@ -3058,38 +3307,48 @@ v8_header_set("v8_internal_headers") { "src/compiler/turboshaft/builtin-call-descriptors.h", "src/compiler/turboshaft/dead-code-elimination-phase.h", "src/compiler/turboshaft/dead-code-elimination-reducer.h", + "src/compiler/turboshaft/debug-feature-lowering-phase.h", + "src/compiler/turboshaft/debug-feature-lowering-reducer.h", "src/compiler/turboshaft/decompression-optimization-phase.h", "src/compiler/turboshaft/decompression-optimization.h", "src/compiler/turboshaft/define-assembler-macros.inc", "src/compiler/turboshaft/deopt-data.h", + "src/compiler/turboshaft/doubly-threaded-list.h", + "src/compiler/turboshaft/explicit-truncation-reducer.h", + "src/compiler/turboshaft/fast-api-call-reducer.h", "src/compiler/turboshaft/fast-hash.h", "src/compiler/turboshaft/graph-builder.h", "src/compiler/turboshaft/graph-visualizer.h", "src/compiler/turboshaft/graph.h", "src/compiler/turboshaft/index.h", + "src/compiler/turboshaft/instruction-selection-phase.h", "src/compiler/turboshaft/late-escape-analysis-reducer.h", - "src/compiler/turboshaft/late-optimization-phase.h", + "src/compiler/turboshaft/late-load-elimination-reducer.h", "src/compiler/turboshaft/layered-hash-map.h", "src/compiler/turboshaft/machine-lowering-phase.h", "src/compiler/turboshaft/machine-lowering-reducer.h", "src/compiler/turboshaft/machine-optimization-reducer.h", "src/compiler/turboshaft/memory-optimization-reducer.h", - "src/compiler/turboshaft/operation-matching.h", + "src/compiler/turboshaft/operation-matcher.h", "src/compiler/turboshaft/operations.h", "src/compiler/turboshaft/optimization-phase.h", "src/compiler/turboshaft/optimize-phase.h", "src/compiler/turboshaft/phase.h", + "src/compiler/turboshaft/pretenuring-propagation-reducer.h", "src/compiler/turboshaft/recreate-schedule-phase.h", "src/compiler/turboshaft/recreate-schedule.h", + "src/compiler/turboshaft/reduce-args-helper.h", "src/compiler/turboshaft/reducer-traits.h", "src/compiler/turboshaft/representations.h", + "src/compiler/turboshaft/required-optimization-reducer.h", "src/compiler/turboshaft/runtime-call-descriptors.h", "src/compiler/turboshaft/select-lowering-reducer.h", "src/compiler/turboshaft/sidetable.h", "src/compiler/turboshaft/simplify-tf-loops.h", "src/compiler/turboshaft/snapshot-table.h", - "src/compiler/turboshaft/tag-untag-lowering-phase.h", - "src/compiler/turboshaft/tag-untag-lowering-reducer.h", + "src/compiler/turboshaft/store-store-elimination-phase.h", + "src/compiler/turboshaft/store-store-elimination-reducer.h", + "src/compiler/turboshaft/structural-optimization-reducer.h", "src/compiler/turboshaft/tracing.h", "src/compiler/turboshaft/type-assertions-phase.h", "src/compiler/turboshaft/type-inference-analysis.h", @@ -3101,6 +3360,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/turboshaft/types.h", "src/compiler/turboshaft/undef-assembler-macros.inc", "src/compiler/turboshaft/uniform-reducer-adapter.h", + "src/compiler/turboshaft/use-map.h", "src/compiler/turboshaft/utils.h", "src/compiler/turboshaft/value-numbering-reducer.h", "src/compiler/turboshaft/variable-reducer.h", @@ -3133,9 +3393,9 @@ v8_header_set("v8_internal_headers") { "src/deoptimizer/deoptimized-frame-info.h", "src/deoptimizer/deoptimizer.h", "src/deoptimizer/frame-description.h", + "src/deoptimizer/frame-translation-builder.h", "src/deoptimizer/materialized-object-store.h", "src/deoptimizer/translated-state.h", - "src/deoptimizer/translation-array.h", "src/deoptimizer/translation-opcode.h", "src/diagnostics/basic-block-profiler.h", "src/diagnostics/code-tracer.h", @@ -3202,7 +3462,6 @@ v8_header_set("v8_internal_headers") { "src/heap/array-buffer-sweeper.h", "src/heap/base-space.h", "src/heap/basic-memory-chunk.h", - "src/heap/code-object-registry.h", "src/heap/code-range.h", "src/heap/code-stats.h", "src/heap/collection-barrier.h", @@ -3221,6 +3480,7 @@ v8_header_set("v8_internal_headers") { "src/heap/cppgc-js/unified-heap-marking-visitor.h", "src/heap/cppgc-js/wrappable-info-inl.h", "src/heap/cppgc-js/wrappable-info.h", + "src/heap/ephemeron-remembered-set.h", "src/heap/evacuation-allocator-inl.h", "src/heap/evacuation-allocator.h", "src/heap/evacuation-verifier-inl.h", @@ -3248,8 +3508,7 @@ v8_header_set("v8_internal_headers") { "src/heap/incremental-marking-job.h", "src/heap/incremental-marking.h", "src/heap/index-generator.h", - "src/heap/invalidated-slots-inl.h", - "src/heap/invalidated-slots.h", + "src/heap/large-page.h", "src/heap/large-spaces.h", "src/heap/linear-allocation-area.h", "src/heap/list.h", @@ -3259,8 +3518,10 @@ v8_header_set("v8_internal_headers") { "src/heap/local-heap.h", "src/heap/mark-compact-inl.h", "src/heap/mark-compact.h", + "src/heap/mark-sweep-utilities.h", "src/heap/marking-barrier-inl.h", "src/heap/marking-barrier.h", + "src/heap/marking-inl.h", "src/heap/marking-state-inl.h", "src/heap/marking-state.h", "src/heap/marking-visitor-inl.h", @@ -3269,6 +3530,7 @@ v8_header_set("v8_internal_headers") { "src/heap/marking-worklist.h", "src/heap/marking.h", "src/heap/memory-allocator.h", + "src/heap/memory-balancer.h", "src/heap/memory-chunk-inl.h", "src/heap/memory-chunk-layout.h", "src/heap/memory-chunk.h", @@ -3276,21 +3538,26 @@ v8_header_set("v8_internal_headers") { "src/heap/memory-measurement.h", "src/heap/memory-reducer.h", "src/heap/minor-gc-job.h", + "src/heap/minor-mark-sweep-inl.h", + "src/heap/minor-mark-sweep.h", "src/heap/new-spaces-inl.h", "src/heap/new-spaces.h", "src/heap/object-lock.h", "src/heap/object-stats.h", "src/heap/objects-visiting-inl.h", "src/heap/objects-visiting.h", + "src/heap/page.h", "src/heap/paged-spaces-inl.h", "src/heap/paged-spaces.h", "src/heap/parallel-work-item.h", + "src/heap/parked-scope-inl.h", "src/heap/parked-scope.h", "src/heap/pretenuring-handler-inl.h", "src/heap/pretenuring-handler.h", "src/heap/progress-bar.h", "src/heap/read-only-heap-inl.h", "src/heap/read-only-heap.h", + "src/heap/read-only-promotion.h", "src/heap/read-only-spaces.h", "src/heap/remembered-set-inl.h", "src/heap/remembered-set.h", @@ -3303,6 +3570,9 @@ v8_header_set("v8_internal_headers") { "src/heap/sweeper.h", "src/heap/traced-handles-marking-visitor.h", "src/heap/weak-object-worklists.h", + "src/heap/young-generation-marking-visitor-inl.h", + "src/heap/young-generation-marking-visitor.h", + "src/heap/zapping.h", "src/ic/call-optimization.h", "src/ic/handler-configuration-inl.h", "src/ic/handler-configuration.h", @@ -3421,6 +3691,9 @@ v8_header_set("v8_internal_headers") { "src/objects/heap-number.h", "src/objects/heap-object-inl.h", "src/objects/heap-object.h", + "src/objects/hole-inl.h", + "src/objects/hole.h", + "src/objects/instance-type-checker.h", "src/objects/instance-type-inl.h", "src/objects/instance-type.h", "src/objects/internal-index.h", @@ -3555,6 +3828,7 @@ v8_header_set("v8_internal_headers") { "src/objects/tagged-index.h", "src/objects/tagged-value-inl.h", "src/objects/tagged-value.h", + "src/objects/tagged.h", "src/objects/template-objects-inl.h", "src/objects/template-objects.h", "src/objects/templates-inl.h", @@ -3639,10 +3913,18 @@ v8_header_set("v8_internal_headers") { "src/runtime/runtime.h", "src/sandbox/bounded-size-inl.h", "src/sandbox/bounded-size.h", + "src/sandbox/code-pointer-inl.h", + "src/sandbox/code-pointer-table-inl.h", + "src/sandbox/code-pointer-table.h", + "src/sandbox/code-pointer.h", + "src/sandbox/external-entity-table-inl.h", + "src/sandbox/external-entity-table.h", "src/sandbox/external-pointer-inl.h", "src/sandbox/external-pointer-table-inl.h", "src/sandbox/external-pointer-table.h", "src/sandbox/external-pointer.h", + "src/sandbox/indirect-pointer-inl.h", + "src/sandbox/indirect-pointer.h", "src/sandbox/sandbox.h", "src/sandbox/sandboxed-pointer-inl.h", "src/sandbox/sandboxed-pointer.h", @@ -3656,6 +3938,7 @@ v8_header_set("v8_internal_headers") { "src/snapshot/embedded/embedded-file-writer-interface.h", "src/snapshot/object-deserializer.h", "src/snapshot/read-only-deserializer.h", + "src/snapshot/read-only-serializer-deserializer.h", "src/snapshot/read-only-serializer.h", "src/snapshot/references.h", "src/snapshot/roots-serializer.h", @@ -3668,6 +3951,7 @@ v8_header_set("v8_internal_headers") { "src/snapshot/snapshot-source-sink.h", "src/snapshot/snapshot-utils.h", "src/snapshot/snapshot.h", + "src/snapshot/sort-builtins.h", "src/snapshot/startup-deserializer.h", "src/snapshot/startup-serializer.h", "src/strings/char-predicates-inl.h", @@ -3714,9 +3998,9 @@ v8_header_set("v8_internal_headers") { "src/zone/type-stats.h", "src/zone/zone-allocator.h", "src/zone/zone-chunk-list.h", + "src/zone/zone-compact-set.h", "src/zone/zone-compression.h", "src/zone/zone-containers.h", - "src/zone/zone-handle-set.h", "src/zone/zone-hashmap.h", "src/zone/zone-list-inl.h", "src/zone/zone-list.h", @@ -3755,12 +4039,15 @@ v8_header_set("v8_internal_headers") { "src/maglev/maglev-ir-inl.h", "src/maglev/maglev-ir.h", "src/maglev/maglev-phi-representation-selector.h", + "src/maglev/maglev-pipeline-statistics.h", "src/maglev/maglev-regalloc-data.h", "src/maglev/maglev-regalloc.h", "src/maglev/maglev-register-frame-array.h", "src/maglev/maglev.h", ] - if (v8_current_cpu == "arm64") { + if (v8_current_cpu == "arm") { + sources += [ "src/maglev/arm/maglev-assembler-arm-inl.h" ] + } else if (v8_current_cpu == "arm64") { sources += [ "src/maglev/arm64/maglev-assembler-arm64-inl.h" ] } else if (v8_current_cpu == "x64") { sources += [ "src/maglev/x64/maglev-assembler-x64-inl.h" ] @@ -3775,6 +4062,13 @@ v8_header_set("v8_internal_headers") { "src/asmjs/asm-scanner.h", "src/asmjs/asm-types.h", "src/compiler/int64-lowering.h", + "src/compiler/turboshaft/int64-lowering-phase.h", + "src/compiler/turboshaft/int64-lowering-reducer.h", + "src/compiler/turboshaft/wasm-js-lowering-reducer.h", + "src/compiler/turboshaft/wasm-lowering-reducer.h", + "src/compiler/turboshaft/wasm-optimize-phase.h", + "src/compiler/turboshaft/wasm-turboshaft-compiler.h", + "src/compiler/wasm-address-reassociation.h", "src/compiler/wasm-call-descriptors.h", "src/compiler/wasm-compiler-definitions.h", "src/compiler/wasm-compiler.h", @@ -3784,6 +4078,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/wasm-graph-assembler.h", "src/compiler/wasm-inlining-into-js.h", "src/compiler/wasm-inlining.h", + "src/compiler/wasm-js-lowering.h", "src/compiler/wasm-load-elimination.h", "src/compiler/wasm-loop-peeling.h", "src/compiler/wasm-typer.h", @@ -3792,7 +4087,6 @@ v8_header_set("v8_internal_headers") { "src/third_party/utf8-decoder/generalized-utf8-decoder.h", "src/trap-handler/trap-handler-internal.h", "src/trap-handler/trap-handler.h", - "src/wasm/assembler-buffer-cache.h", "src/wasm/baseline/liftoff-assembler-defs.h", "src/wasm/baseline/liftoff-assembler.h", "src/wasm/baseline/liftoff-compiler.h", @@ -3818,12 +4112,15 @@ v8_header_set("v8_internal_headers") { "src/wasm/names-provider.h", "src/wasm/object-access.h", "src/wasm/pgo.h", + "src/wasm/serialized-signature-inl.h", "src/wasm/simd-shuffle.h", "src/wasm/stacks.h", + "src/wasm/std-object-sizes.h", "src/wasm/streaming-decoder.h", "src/wasm/string-builder-multiline.h", "src/wasm/string-builder.h", "src/wasm/struct-types.h", + "src/wasm/turboshaft-graph-interface.h", "src/wasm/value-type.h", "src/wasm/wasm-arguments.h", "src/wasm/wasm-code-manager.h", @@ -4026,9 +4323,10 @@ v8_header_set("v8_internal_headers") { sources += [ "src/execution/arm64/pointer-authentication-arm64.h" ] } if (v8_enable_webassembly) { - # Trap handling is enabled on arm64 Mac and in simulators on x64 on Linux - # and Mac. - if ((current_cpu == "arm64" && (is_mac || is_ios)) || + # Trap handling is enabled on arm64 Mac and Linux and in simulators on + # x64 on Linux and Mac. + if ((current_cpu == "arm64" && + (is_linux || is_chromeos || is_mac || is_ios)) || (current_cpu == "x64" && (is_linux || is_chromeos || is_mac))) { sources += [ "src/trap-handler/handler-inside-posix.h" ] } @@ -4315,6 +4613,7 @@ v8_compiler_sources = [ "src/compiler/operator-properties.cc", "src/compiler/operator.cc", "src/compiler/osr.cc", + "src/compiler/pair-load-store-reducer.cc", "src/compiler/pipeline-statistics.cc", "src/compiler/pipeline.cc", "src/compiler/property-access-builder.cc", @@ -4431,7 +4730,12 @@ if (v8_current_cpu == "x86") { if (v8_enable_webassembly) { v8_compiler_sources += [ "src/compiler/int64-lowering.cc", + "src/compiler/turboshaft/int64-lowering-phase.cc", + "src/compiler/turboshaft/wasm-optimize-phase.cc", + "src/compiler/turboshaft/wasm-turboshaft-compiler.cc", + "src/compiler/wasm-address-reassociation.cc", "src/compiler/wasm-call-descriptors.cc", + "src/compiler/wasm-compiler-definitions.cc", "src/compiler/wasm-compiler.cc", "src/compiler/wasm-escape-analysis.cc", "src/compiler/wasm-gc-lowering.cc", @@ -4439,6 +4743,7 @@ if (v8_enable_webassembly) { "src/compiler/wasm-graph-assembler.cc", "src/compiler/wasm-inlining-into-js.cc", "src/compiler/wasm-inlining.cc", + "src/compiler/wasm-js-lowering.cc", "src/compiler/wasm-load-elimination.cc", "src/compiler/wasm-loop-peeling.cc", "src/compiler/wasm-typer.cc", @@ -4465,6 +4770,7 @@ v8_source_set("v8_compiler_for_mksnapshot_source_set") { public_deps = [ ":generate_bytecode_builtins_list", ":run_torque", + ":v8_abseil", ":v8_maybe_icu", ":v8_tracing", ] @@ -4502,6 +4808,7 @@ v8_source_set("v8_compiler") { public_deps = [ ":generate_bytecode_builtins_list", ":run_torque", + ":v8_abseil", ":v8_internal_headers", ":v8_maybe_icu", ":v8_tracing", @@ -4524,29 +4831,33 @@ v8_source_set("v8_turboshaft") { "src/compiler/turboshaft/assembler.cc", "src/compiler/turboshaft/build-graph-phase.cc", "src/compiler/turboshaft/dead-code-elimination-phase.cc", + "src/compiler/turboshaft/debug-feature-lowering-phase.cc", "src/compiler/turboshaft/decompression-optimization-phase.cc", "src/compiler/turboshaft/decompression-optimization.cc", "src/compiler/turboshaft/graph-builder.cc", "src/compiler/turboshaft/graph-visualizer.cc", "src/compiler/turboshaft/graph.cc", + "src/compiler/turboshaft/instruction-selection-phase.cc", "src/compiler/turboshaft/late-escape-analysis-reducer.cc", - "src/compiler/turboshaft/late-optimization-phase.cc", + "src/compiler/turboshaft/late-load-elimination-reducer.cc", "src/compiler/turboshaft/machine-lowering-phase.cc", "src/compiler/turboshaft/memory-optimization-reducer.cc", "src/compiler/turboshaft/operations.cc", "src/compiler/turboshaft/optimization-phase.cc", "src/compiler/turboshaft/optimize-phase.cc", "src/compiler/turboshaft/phase.cc", + "src/compiler/turboshaft/pretenuring-propagation-reducer.cc", "src/compiler/turboshaft/recreate-schedule-phase.cc", "src/compiler/turboshaft/recreate-schedule.cc", "src/compiler/turboshaft/representations.cc", "src/compiler/turboshaft/simplify-tf-loops.cc", - "src/compiler/turboshaft/tag-untag-lowering-phase.cc", + "src/compiler/turboshaft/store-store-elimination-phase.cc", "src/compiler/turboshaft/type-assertions-phase.cc", "src/compiler/turboshaft/type-parser.cc", "src/compiler/turboshaft/typed-optimizations-phase.cc", "src/compiler/turboshaft/typer.cc", "src/compiler/turboshaft/types.cc", + "src/compiler/turboshaft/use-map.cc", "src/compiler/turboshaft/utils.cc", ] @@ -4704,9 +5015,9 @@ v8_source_set("v8_base_without_compiler") { "src/deoptimizer/deoptimize-reason.cc", "src/deoptimizer/deoptimized-frame-info.cc", "src/deoptimizer/deoptimizer.cc", + "src/deoptimizer/frame-translation-builder.cc", "src/deoptimizer/materialized-object-store.cc", "src/deoptimizer/translated-state.cc", - "src/deoptimizer/translation-array.cc", "src/diagnostics/basic-block-profiler.cc", "src/diagnostics/compilation-statistics.cc", "src/diagnostics/disassembler.cc", @@ -4750,9 +5061,7 @@ v8_source_set("v8_base_without_compiler") { "src/handles/traced-handles.cc", "src/heap/allocation-observer.cc", "src/heap/array-buffer-sweeper.cc", - "src/heap/base-space.cc", "src/heap/basic-memory-chunk.cc", - "src/heap/code-object-registry.cc", "src/heap/code-range.cc", "src/heap/code-stats.cc", "src/heap/collection-barrier.cc", @@ -4765,6 +5074,7 @@ v8_source_set("v8_base_without_compiler") { "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/ephemeron-remembered-set.cc", "src/heap/evacuation-verifier.cc", "src/heap/factory-base.cc", "src/heap/factory.cc", @@ -4781,26 +5091,31 @@ v8_source_set("v8_base_without_compiler") { "src/heap/incremental-marking-job.cc", "src/heap/incremental-marking.cc", "src/heap/index-generator.cc", - "src/heap/invalidated-slots.cc", + "src/heap/large-page.cc", "src/heap/large-spaces.cc", "src/heap/local-factory.cc", "src/heap/local-heap.cc", "src/heap/mark-compact.cc", + "src/heap/mark-sweep-utilities.cc", "src/heap/marking-barrier.cc", "src/heap/marking-worklist.cc", "src/heap/marking.cc", "src/heap/memory-allocator.cc", + "src/heap/memory-balancer.cc", "src/heap/memory-chunk-layout.cc", "src/heap/memory-chunk.cc", "src/heap/memory-measurement.cc", "src/heap/memory-reducer.cc", "src/heap/minor-gc-job.cc", + "src/heap/minor-mark-sweep.cc", "src/heap/new-spaces.cc", "src/heap/object-stats.cc", "src/heap/objects-visiting.cc", + "src/heap/page.cc", "src/heap/paged-spaces.cc", "src/heap/pretenuring-handler.cc", "src/heap/read-only-heap.cc", + "src/heap/read-only-promotion.cc", "src/heap/read-only-spaces.cc", "src/heap/safepoint.cc", "src/heap/scavenger.cc", @@ -4810,6 +5125,7 @@ v8_source_set("v8_base_without_compiler") { "src/heap/sweeper.cc", "src/heap/traced-handles-marking-visitor.cc", "src/heap/weak-object-worklists.cc", + "src/heap/zapping.cc", "src/ic/call-optimization.cc", "src/ic/handler-configuration.cc", "src/ic/ic-stats.cc", @@ -4851,19 +5167,25 @@ v8_source_set("v8_base_without_compiler") { "src/logging/tracing-flags.cc", "src/numbers/conversions.cc", "src/numbers/math-random.cc", + "src/objects/abstract-code.cc", "src/objects/backing-store.cc", "src/objects/bigint.cc", + "src/objects/bytecode-array.cc", "src/objects/call-site-info.cc", "src/objects/code-kind.cc", "src/objects/code.cc", "src/objects/compilation-cache-table.cc", "src/objects/contexts.cc", "src/objects/debug-objects.cc", + "src/objects/deoptimization-data.cc", + "src/objects/dependent-code.cc", "src/objects/elements-kind.cc", "src/objects/elements.cc", "src/objects/embedder-data-array.cc", "src/objects/feedback-vector.cc", "src/objects/field-type.cc", + "src/objects/fixed-array.cc", + "src/objects/instruction-stream.cc", "src/objects/intl-objects.cc", "src/objects/js-array-buffer.cc", "src/objects/js-atomics-synchronization.cc", @@ -4996,6 +5318,7 @@ v8_source_set("v8_base_without_compiler") { "src/runtime/runtime-typedarray.cc", "src/runtime/runtime-weak-refs.cc", "src/runtime/runtime.cc", + "src/sandbox/code-pointer-table.cc", "src/sandbox/external-pointer-table.cc", "src/sandbox/sandbox.cc", "src/sandbox/testing.cc", @@ -5016,6 +5339,7 @@ v8_source_set("v8_base_without_compiler") { "src/snapshot/snapshot-source-sink.cc", "src/snapshot/snapshot-utils.cc", "src/snapshot/snapshot.cc", + "src/snapshot/sort-builtins.cc", "src/snapshot/startup-deserializer.cc", "src/snapshot/startup-serializer.cc", "src/strings/char-predicates.cc", @@ -5067,10 +5391,16 @@ v8_source_set("v8_base_without_compiler") { "src/maglev/maglev-interpreter-frame-state.cc", "src/maglev/maglev-ir.cc", "src/maglev/maglev-phi-representation-selector.cc", + "src/maglev/maglev-pipeline-statistics.cc", "src/maglev/maglev-regalloc.cc", "src/maglev/maglev.cc", ] - if (v8_current_cpu == "arm64") { + if (v8_current_cpu == "arm") { + sources += [ + "src/maglev/arm/maglev-assembler-arm.cc", + "src/maglev/arm/maglev-ir-arm.cc", + ] + } else if (v8_current_cpu == "arm64") { sources += [ "src/maglev/arm64/maglev-assembler-arm64.cc", "src/maglev/arm64/maglev-ir-arm64.cc", @@ -5096,7 +5426,6 @@ v8_source_set("v8_base_without_compiler") { "src/trap-handler/handler-inside.cc", "src/trap-handler/handler-outside.cc", "src/trap-handler/handler-shared.cc", - "src/wasm/assembler-buffer-cache.cc", "src/wasm/baseline/liftoff-assembler.cc", "src/wasm/baseline/liftoff-compiler.cc", "src/wasm/canonical-types.cc", @@ -5118,6 +5447,7 @@ v8_source_set("v8_base_without_compiler") { "src/wasm/stacks.cc", "src/wasm/streaming-decoder.cc", "src/wasm/sync-streaming-decoder.cc", + "src/wasm/turboshaft-graph-interface.cc", "src/wasm/value-type.cc", "src/wasm/wasm-code-manager.cc", "src/wasm/wasm-debug.cc", @@ -5126,7 +5456,6 @@ v8_source_set("v8_base_without_compiler") { "src/wasm/wasm-external-refs.cc", "src/wasm/wasm-features.cc", "src/wasm/wasm-import-wrapper-cache.cc", - "src/wasm/wasm-init-expr.cc", "src/wasm/wasm-js.cc", "src/wasm/wasm-module-builder.cc", "src/wasm/wasm-module-sourcemap.cc", @@ -5252,9 +5581,9 @@ v8_source_set("v8_base_without_compiler") { "src/regexp/arm64/regexp-macro-assembler-arm64.cc", ] if (v8_enable_webassembly) { - # Trap handling is enabled on arm64 Mac and in simulators on x64 on Linux, - # Mac, and Windows. - if ((current_cpu == "arm64" && is_apple) || + # Trap handling is enabled on arm64 Mac and Linux and in simulators on + # x64 on Linux, Mac, and Windows. + if ((current_cpu == "arm64" && (is_linux || is_chromeos || is_apple)) || (current_cpu == "x64" && (is_linux || is_chromeos || is_mac))) { sources += [ "src/trap-handler/handler-inside-posix.cc", @@ -5430,6 +5759,7 @@ v8_source_set("v8_base_without_compiler") { ":cppgc_base", ":generate_bytecode_builtins_list", ":run_torque", + ":v8_abseil", ":v8_headers", ":v8_internal_headers", ":v8_maybe_icu", @@ -5487,7 +5817,9 @@ v8_source_set("v8_base_without_compiler") { v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" || v8_current_cpu == "s390" || v8_current_cpu == "s390x" || v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { - libs += [ "atomic" ] + if (!is_clang) { + libs += [ "atomic" ] + } } if (v8_enable_vtunetracemark && (is_linux || is_chromeos || is_win)) { @@ -5497,13 +5829,6 @@ v8_source_set("v8_base_without_compiler") { ] deps += [ "src/third_party/vtune:v8_vtune_trace_mark" ] } - - if (v8_use_perfetto) { - sources += [ - "src/tracing/trace-categories.cc", - "src/tracing/trace-categories.h", - ] - } } group("v8_base") { @@ -5595,12 +5920,6 @@ v8_source_set("torque_base") { "//build/config/compiler:no_rtti", ] - if (is_win && is_asan) { - # Due to a bug in ASAN on Windows (chromium:893437), we disable ASAN for - # Torque on Windows. - remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] - } - if (is_debug && !v8_optimized_debug && v8_enable_fast_torque) { # The :no_optimize config is added to v8_add_configs in v8.gni. remove_configs += [ "//build/config/compiler:no_optimize" ] @@ -5637,10 +5956,6 @@ v8_source_set("torque_ls_base") { "//build/config/compiler:no_exceptions", "//build/config/compiler:no_rtti", ] - - if (is_win && is_asan) { - remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] - } } v8_component("v8_libbase") { @@ -5664,6 +5979,7 @@ v8_component("v8_libbase") { "src/base/cpu.h", "src/base/debug/stack_trace.cc", "src/base/debug/stack_trace.h", + "src/base/discriminated-union.h", "src/base/division-by-constant.cc", "src/base/division-by-constant.h", "src/base/emulated-virtual-address-subspace.cc", @@ -5680,6 +5996,7 @@ v8_component("v8_libbase") { "src/base/ieee754.cc", "src/base/ieee754.h", "src/base/immediate-crash.h", + "src/base/intrusive-set.h", "src/base/iterator.h", "src/base/lazy-instance.h", "src/base/logging.cc", @@ -5740,6 +6057,7 @@ v8_component("v8_libbase") { "src/base/sanitizer/lsan.h", "src/base/sanitizer/msan.h", "src/base/sanitizer/tsan.h", + "src/base/small-map.h", "src/base/small-vector.h", "src/base/string-format.h", "src/base/strings.cc", @@ -5768,6 +6086,8 @@ v8_component("v8_libbase") { deps = [ ":v8_config_headers" ] + libs = [] + data = [] data_deps = [] @@ -5838,8 +6158,8 @@ v8_component("v8_libbase") { "src/base/platform/platform-fuchsia.cc", ] deps += [ - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.kernel", - "//third_party/fuchsia-sdk/sdk/pkg/fdio", + "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.kernel:fuchsia.kernel_cpp", + "//third_party/fuchsia-sdk/sdk/pkg/component_incoming_cpp", "//third_party/fuchsia-sdk/sdk/pkg/zx", ] } else if (is_mac) { @@ -5858,6 +6178,7 @@ v8_component("v8_libbase") { sources += [ "src/base/debug/stack_trace_win.cc", "src/base/platform/platform-win32.cc", + "src/base/platform/platform-win32.h", "src/base/win32-headers.h", ] @@ -5890,7 +6211,9 @@ v8_component("v8_libbase") { } if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { - libs += [ "atomic" ] + if (!is_clang) { + libs += [ "atomic" ] + } } if (is_tsan && !build_with_chromium) { @@ -5943,6 +6266,8 @@ v8_component("v8_libplatform") { "src/libplatform/default-job.h", "src/libplatform/default-platform.cc", "src/libplatform/default-platform.h", + "src/libplatform/default-thread-isolated-allocator.cc", + "src/libplatform/default-thread-isolated-allocator.h", "src/libplatform/default-worker-threads-task-runner.cc", "src/libplatform/default-worker-threads-task-runner.h", "src/libplatform/delayed-task-queue.cc", @@ -5985,14 +6310,7 @@ v8_component("v8_libplatform") { "src/libplatform/tracing/trace-writer.cc", "src/libplatform/tracing/trace-writer.h", ] - sources += [ - "src/libplatform/tracing/trace-event-listener.cc", - "src/libplatform/tracing/trace-event-listener.h", - ] - deps += [ - # TODO(skyostil): Switch TraceEventListener to protozero. - "//third_party/perfetto/protos/perfetto/trace:lite", - ] + sources += [ "src/libplatform/tracing/trace-event-listener.h" ] } if (v8_enable_system_instrumentation) { @@ -6005,7 +6323,9 @@ v8_component("v8_libplatform") { } if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { - libs = [ "atomic" ] + if (!is_clang) { + libs = [ "atomic" ] + } } } @@ -6062,6 +6382,8 @@ v8_header_set("v8_heap_base_headers") { sources = [ "src/heap/base/active-system-pages.h", "src/heap/base/basic-slot-set.h", + "src/heap/base/bytes.h", + "src/heap/base/incremental-marking-schedule.h", "src/heap/base/stack.h", "src/heap/base/worklist.h", ] @@ -6074,6 +6396,7 @@ v8_header_set("v8_heap_base_headers") { v8_source_set("v8_heap_base") { sources = [ "src/heap/base/active-system-pages.cc", + "src/heap/base/incremental-marking-schedule.cc", "src/heap/base/stack.cc", "src/heap/base/worklist.cc", ] @@ -6222,8 +6545,6 @@ v8_source_set("cppgc_base") { "src/heap/cppgc/heap-visitor.h", "src/heap/cppgc/heap.cc", "src/heap/cppgc/heap.h", - "src/heap/cppgc/incremental-marking-schedule.cc", - "src/heap/cppgc/incremental-marking-schedule.h", "src/heap/cppgc/liveness-broker.cc", "src/heap/cppgc/liveness-broker.h", "src/heap/cppgc/logging.cc", @@ -6265,7 +6586,6 @@ v8_source_set("cppgc_base") { "src/heap/cppgc/raw-heap.h", "src/heap/cppgc/remembered-set.cc", "src/heap/cppgc/remembered-set.h", - "src/heap/cppgc/source-location.cc", "src/heap/cppgc/stats-collector.cc", "src/heap/cppgc/stats-collector.h", "src/heap/cppgc/sweeper.cc", @@ -6311,6 +6631,13 @@ v8_source_set("cppgc_base") { } else { public_deps += [ ":v8_tracing" ] } + + if (v8_use_perfetto) { + sources += [ + "src/tracing/trace-categories.cc", + "src/tracing/trace-categories.h", + ] + } } if (v8_check_header_includes) { @@ -6377,6 +6704,9 @@ if (v8_enable_webassembly) { ":v8_snapshot", "//build/win:default_exe_manifest", ] + if (v8_enable_vtunejit) { + deps += [ "src/third_party/vtune:v8_vtune" ] + } # TODO: v8dll-main.cc equivalent for shared library builds @@ -6490,10 +6820,6 @@ if (current_toolchain == v8_snapshot_toolchain) { "//build/config/compiler:no_exceptions", "//build/config/compiler:no_rtti", ] - - if (is_win && is_asan) { - remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] - } } } @@ -6521,10 +6847,6 @@ v8_executable("torque-language-server") { "//build/config/compiler:no_exceptions", "//build/config/compiler:no_rtti", ] - - if (is_win && is_asan) { - remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] - } } if (v8_enable_i18n_support) { @@ -6681,7 +7003,6 @@ group("v8_fuzzers") { ":v8_simple_inspector_fuzzer", ":v8_simple_json_fuzzer", ":v8_simple_parser_fuzzer", - ":v8_simple_regexp_builtins_fuzzer", ":v8_simple_regexp_fuzzer", ] @@ -6922,10 +7243,6 @@ if (want_v8_shell) { ":internal_config_base", ] - if (is_win && !v8_enable_cet_shadow_stack) { - v8_remove_configs += [ "//build/config/compiler:cet_shadow_stack" ] - } - deps = [ ":v8", ":v8_libbase", @@ -6939,7 +7256,9 @@ v8_executable("cppgc_hello_world") { sources = [ "samples/cppgc/hello-world.cc" ] if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { - libs = [ "atomic" ] + if (!is_clang) { + libs = [ "atomic" ] + } } configs = [ @@ -7002,23 +7321,6 @@ v8_source_set("parser_fuzzer") { v8_fuzzer("parser_fuzzer") { } -v8_source_set("regexp_builtins_fuzzer") { - sources = [ - "test/fuzzer/regexp-builtins.cc", - "test/fuzzer/regexp_builtins/mjsunit.js.h", - ] - - deps = [ ":fuzzer_support" ] - - configs = [ - ":external_config", - ":internal_config_base", - ] -} - -v8_fuzzer("regexp_builtins_fuzzer") { -} - v8_source_set("regexp_fuzzer") { sources = [ "test/fuzzer/regexp.cc" ] @@ -7052,8 +7354,6 @@ if (v8_enable_webassembly) { sources = [ "test/common/flag-utils.h", "test/common/wasm/flag-utils.h", - "test/common/wasm/wasm-interpreter.cc", - "test/common/wasm/wasm-interpreter.h", "test/common/wasm/wasm-module-runner.cc", "test/common/wasm/wasm-module-runner.h", ] @@ -7067,7 +7367,10 @@ if (v8_enable_webassembly) { ":v8_tracing", ] - public_deps = [ ":v8_maybe_icu" ] + public_deps = [ + ":v8_abseil", + ":v8_maybe_icu", + ] configs = [ ":external_config", @@ -7147,7 +7450,10 @@ if (v8_enable_webassembly) { ":wasm_test_common", ] - public_deps = [ ":v8_maybe_icu" ] + public_deps = [ + ":v8_abseil", + ":v8_maybe_icu", + ] configs = [ ":external_config", diff --git a/deps/v8/COMMON_OWNERS b/deps/v8/COMMON_OWNERS index b7dc8f2147de77..9e9d51d5835a1d 100644 --- a/deps/v8/COMMON_OWNERS +++ b/deps/v8/COMMON_OWNERS @@ -6,6 +6,8 @@ cbruni@chromium.org clemensb@chromium.org danno@chromium.org dinfuehr@chromium.org +dlehmann@chromium.org +dmercadier@chromium.org ecmziegler@chromium.org gdeepti@chromium.org hablich@chromium.org @@ -25,6 +27,7 @@ nicohartmann@chromium.org nikolaos@chromium.org omerkatz@chromium.org pthier@chromium.org +sroettger@google.com syg@chromium.org szuend@chromium.org tebbi@chromium.org diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 05b32b571c84e2..5cffcad442b366 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -14,18 +14,17 @@ vars = { # # Available images: # Emulation: - # - qemu.x64 (pulls terminal.qemu-x64-release) - # - qemu.arm64 (pulls terminal.qemu-arm64-release) + # - terminal.qemu-x64 + # - terminal.qemu-arm64 # - workstation.qemu-x64-release # Hardware: - # - generic.x64 (pulls terminal.x64-debug) - # - generic.arm64 (pulls terminal.arm64-debug) - # - chromebook.x64 (pulls terminal.chromebook-x64-debug) + # - minimal.x64 + # - core.x64-dfv2 # # Since the images are hundreds of MB, default to only downloading the image # most commonly useful for developers. Bots and developers that need to use # other images (e.g., qemu.arm64) can override this with additional images. - 'checkout_fuchsia_boot_images': "qemu.x64", + 'checkout_fuchsia_boot_images': "terminal.qemu-x64", 'checkout_fuchsia_product_bundles': '"{checkout_fuchsia_boot_images}" != ""', 'checkout_instrumented_libraries': False, @@ -50,30 +49,36 @@ vars = { 'check_v8_header_includes': False, # By default, download the fuchsia sdk from the public sdk directory. - 'fuchsia_sdk_cipd_prefix': 'fuchsia/sdk/gn/', + 'fuchsia_sdk_cipd_prefix': 'fuchsia/sdk/core/', + + # Used for downloading the Fuchsia SDK without running hooks. + 'checkout_fuchsia_no_hooks': False, # reclient CIPD package version - 'reclient_version': 're_client_version:0.99.0.3f95625-gomaip', + 'reclient_version': 're_client_version:0.113.0.8b45b89-gomaip', + + # This variable is overrided in Chromium's DEPS file. + 'build_with_chromium': False, # GN CIPD package version. - 'gn_version': 'git_revision:41fef642de70ecdcaaa26be96d56a0398f95abd4', + 'gn_version': 'git_revision:cc56a0f98bb34accd5323316e0292575ff17a5d4', # ninja CIPD package version # https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/ninja 'ninja_version': 'version:2@1.11.1.chromium.6', # luci-go CIPD package version. - 'luci_go': 'git_revision:320bf3ed60cd4d24549d0ea9ee3a94394f2665ce', + 'luci_go': 'git_revision:fe3cfd422b1012c2c8cf00d65cdb11aa2c26cd66', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Fuchsia sdk # and whatever else without interference from each other. - 'fuchsia_version': 'version:12.20230322.3.1', + 'fuchsia_version': 'version:14.20230902.2.1', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_build-tools_version # and whatever else without interference from each other. - 'android_sdk_build-tools_version': '-VRKr36Uw8L_iFqqo9nevIBgNMggND5iWxjidyjnCgsC', + 'android_sdk_build-tools_version': 'YK9Rzw3fDzMHVzatNN6VlyoD_81amLZpN1AbmkdOd6AC', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_emulator_version # and whatever else without interference from each other. @@ -89,11 +94,11 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_platform-tools_version # and whatever else without interference from each other. - 'android_sdk_platform-tools_version': 'RSI3iwryh7URLGRgJHsCvUxj092woTPnKt4pwFcJ6L8C', + 'android_sdk_platform-tools_version': 'HWVsGs2HCKgSVv41FsOcsfJbNcB0UFiNrF6Tc4yRArYC', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_platforms_version # and whatever else without interference from each other. - 'android_sdk_platforms_version': 'eo5KvW6UVor92LwZai8Zulc624BQZoCu-yn7wa1z_YcC', + 'android_sdk_platforms_version': 'u-bhWbTME6u-DjypTgr3ZikCyeAeU6txkR9ET6Uudc8C', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_sources_version # and whatever else without interference from each other. @@ -101,18 +106,16 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_tools-lint_version # and whatever else without interference from each other. - 'android_sdk_cmdline-tools_version': '3Yn5Sn7BMObm8gsoZCF0loJMKg9_PpgU07G9DObCLdQC', + 'android_sdk_cmdline-tools_version': 'Sy00LuyBIUJdRGYKwg0zjWH8eAIUvgnnNiPkI8etaZYC', } deps = { 'base/trace_event/common': Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + '147f65333c38ddd1ebf554e89965c243c8ce50b3', 'build': - Var('chromium_url') + '/chromium/src/build.git' + '@' + '9e9a4341dd24e68cba0f228567a6edbaff1c665b', + Var('chromium_url') + '/chromium/src/build.git' + '@' + 'e14e0cc3b60c6ba8901741da3f9c18b7fa983880', 'buildtools': - Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '0a6c69640f1841d9109eac70a25af310d4c1d8c7', - 'buildtools/clang_format/script': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + 'f97059df7f8b205064625cdb5f97b56668a125ef', + Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + 'b2043d4f435131d0a1bdd5342c17753ef9236572', 'buildtools/linux64': { 'packages': [ { @@ -133,12 +136,6 @@ deps = { 'dep_type': 'cipd', 'condition': 'host_os == "mac"', }, - 'buildtools/third_party/libc++/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + 'e44019bfac2b2d3ebe1618628884f85c8600e322', - 'buildtools/third_party/libc++abi/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '9643f2cf13d6935a84a30b7da7de53327733e190', - 'buildtools/third_party/libunwind/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + '29a6dda8c6588ba4abeafdb21be531e757983e31', 'buildtools/win': { 'packages': [ { @@ -164,19 +161,15 @@ 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' + '@' + 'd216cc197269fc41eb6eca14710529c3d6650535', - 'third_party/android_ndk': { - 'url': Var('chromium_url') + '/android_ndk.git' + '@' + '8388a2be5421311dc75c5f937aae13d821a27f3d', - 'condition': 'checkout_android', - }, + Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + '9efb4f8e531efbc297680145a7fa67d7415d0a4a', 'third_party/android_platform': { - 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + '1bf9b932433ebb78828bf3c8cd0ccc86b9ef4787', + 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + '4b4eee2d24ec8002602e1b82d63a586d46507501', 'condition': 'checkout_android', }, 'third_party/android_sdk/public': { 'packages': [ { - 'package': 'chromium/third_party/android_sdk/public/build-tools/33.0.0', + 'package': 'chromium/third_party/android_sdk/public/build-tools/34.0.0', 'version': Var('android_sdk_build-tools_version'), }, { @@ -196,7 +189,7 @@ deps = { 'version': Var('android_sdk_platform-tools_version'), }, { - 'package': 'chromium/third_party/android_sdk/public/platforms/android-33', + 'package': 'chromium/third_party/android_sdk/public/platforms/android-34', 'version': Var('android_sdk_platforms_version'), }, { @@ -211,35 +204,57 @@ deps = { 'condition': 'checkout_android', 'dep_type': 'cipd', }, + 'third_party/android_toolchain/ndk': { + 'packages': [ + { + 'package': 'chromium/third_party/android_toolchain/android_toolchain', + 'version': 'R_8suM8m0oHbZ1awdxGXvKEFpAOETscbfZxkkMthyk8C', + }, + ], + 'condition': 'checkout_android', + 'dep_type': 'cipd', + }, 'third_party/catapult': { - 'url': Var('chromium_url') + '/catapult.git' + '@' + '018d397758e54d6a6d3b6ddf28a1784664d63f83', + 'url': Var('chromium_url') + '/catapult.git' + '@' + 'f16ca3c78e46cefa982100444844da3fcb25390e', 'condition': 'checkout_android', }, + 'third_party/clang-format/script': + Var('chromium_url') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + 'e5337933f2951cacd3aeacd238ce4578163ca0b9', 'third_party/colorama/src': { 'url': Var('chromium_url') + '/external/colorama.git' + '@' + '3de9f013df4b470069d03d250224062e8cf15c49', 'condition': 'checkout_android', }, + 'third_party/cpu_features/src': { + 'url': Var('chromium_url') + '/external/github.com/google/cpu_features.git' + '@' + '936b9ab5515dead115606559502e3864958f7f6e', + 'condition': 'checkout_android', + }, 'third_party/depot_tools': - Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '479e1e9055020c8d1351bf2194d0a606aeca93d5', - 'third_party/fuchsia-sdk/sdk': { - 'packages': [ - { - 'package': Var('fuchsia_sdk_cipd_prefix') + '${{platform}}', - 'version': Var('fuchsia_version'), - }, - ], + Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '693e0b312171685d34de77b39bc90b8271ad6541', + 'third_party/fuchsia-gn-sdk': { + 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-gn-sdk.git' + '@' + 'd1e0ff4350f77c7f6b246ff62c232318a73c8176', 'condition': 'checkout_fuchsia', - 'dep_type': 'cipd', + }, + # Exists for rolling the Fuchsia SDK. Check out of the SDK should always + # rely on the hook running |update_sdk.py| script below. + 'third_party/fuchsia-sdk/sdk': { + 'packages': [ + { + 'package': Var('fuchsia_sdk_cipd_prefix') + '${{platform}}', + 'version': Var('fuchsia_version'), + }, + ], + 'condition': 'checkout_fuchsia_no_hooks', + 'dep_type': 'cipd', }, 'third_party/google_benchmark/src': { - 'url': Var('chromium_url') + '/external/github.com/google/benchmark.git' + '@' + 'e8baf2622591569a27615b31372d1e9cc046af10', + 'url': Var('chromium_url') + '/external/github.com/google/benchmark.git' + '@' + 'b177433f3ee2513b1075140c723d73ab8901790f', }, 'third_party/googletest/src': Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + 'af29db7ec28d6df1c7f0f745186884091e602e07', 'third_party/icu': - Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '1e49ac26ddc712b1ab702f69023cbc57e9ae6628', + Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '985b9a6f70e13f3db741fed121e4dcc3046ad494', 'third_party/instrumented_libraries': - Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + '0f536d22dbed454b1254c7e6d7130eab28fba1fa', + Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + '032e9c850ab975f7c088a625dcf2256917dbdfa6', 'third_party/ittapi': { # Force checkout ittapi libraries to pass v8 header includes check on # bots that has check_v8_header_includes enabled. @@ -247,13 +262,19 @@ deps = { 'condition': "checkout_ittapi or check_v8_header_includes", }, 'third_party/jinja2': - Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + '264c07d7e64f2874434a3b8039e101ddf1b01e7e', + Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + '515dd10de9bf63040045902a4a310d2ba25213a0', 'third_party/jsoncpp/source': Var('chromium_url') + '/external/github.com/open-source-parsers/jsoncpp.git'+ '@' + '42e892d96e47b1f6e29844cc705e148ec4856448', + 'third_party/libc++/src': + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '84fb809dd6dae36d556dc0bb702c6cc2ce9d4b80', + 'third_party/libc++abi/src': + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '331847d7a5e6f8706689cf5d468e6e58c868fa10', + 'third_party/libunwind/src': + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'a321409e66c212098e755cfae1a978bbcff1ccbb', 'third_party/logdog/logdog': Var('chromium_url') + '/infra/luci/luci-py/client/libs/logdog' + '@' + '0b2078a90f7a638d576b3a7c407d136f2fb62399', 'third_party/markupsafe': - Var('chromium_url') + '/chromium/src/third_party/markupsafe.git' + '@' + '13f4e8c9e206567eeb13bf585406ddc574005748', + Var('chromium_url') + '/chromium/src/third_party/markupsafe.git' + '@' + '006709ba3ed87660a17bd4548c45663628f5ed85', 'third_party/ninja': { 'packages': [ { @@ -265,17 +286,17 @@ deps = { 'condition': 'host_cpu != "s390" and host_cpu != "ppc"' }, 'third_party/perfetto': - Var('android_url') + '/platform/external/perfetto.git' + '@' + '0d180f46481a96cbe8340734fa5cdce3bba636c8', + Var('android_url') + '/platform/external/perfetto.git' + '@' + '446adf5b7bb431d42838cb0302b27311fa4331cd', 'third_party/protobuf': Var('chromium_url') + '/external/github.com/google/protobuf'+ '@' + '6a59a2ad1f61d9696092f79b6d74368b4d7970a3', 'third_party/requests': { - 'url': Var('chromium_url') + '/external/github.com/kennethreitz/requests.git' + '@' + 'refs/tags/v2.23.0', + 'url': Var('chromium_url') + '/external/github.com/kennethreitz/requests.git' + '@' + 'c7e0fc087ceeadb8b4c84a0953a422c474093d6d', 'condition': 'checkout_android', }, 'third_party/zlib': - Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + '5edb52d4302d7aef232d585ec9ae27ef5c3c5438', + Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + 'f5fd0ad2663e239a31184ad4c9919991dda16f46', 'tools/clang': - Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '7a7207a7f2eb0f7f5c9f304a51077a2fd504b3ed', + Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '9fc887ccded86c9355f1abbe80c651271c59632f', 'tools/luci-go': { 'packages': [ { @@ -290,6 +311,10 @@ deps = { 'condition': 'host_cpu != "s390" and host_os != "aix"', 'dep_type': 'cipd', }, + 'third_party/abseil-cpp': { + 'url': Var('chromium_url') + '/chromium/src/third_party/abseil-cpp.git' + '@' + '7affa303ea4ebf4d4de65b3f20f230c7bb16a2ed', + 'condition': 'not build_with_chromium', + } } include_rules = [ @@ -589,6 +614,17 @@ hooks = [ 'action': ['python3', 'build/util/lastchange.py', '-o', 'build/util/LASTCHANGE'], }, + { + 'name': 'Download Fuchsia SDK from GCS', + 'pattern': '.', + 'condition': 'checkout_fuchsia', + 'action': [ + 'python3', + 'build/fuchsia/update_sdk.py', + '--cipd-prefix={fuchsia_sdk_cipd_prefix}', + '--version={fuchsia_version}', + ], + }, { 'name': 'Download Fuchsia system images', 'pattern': '.', diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index 5c31d4dfabd776..5d4bf98bcb3ab7 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -433,26 +433,29 @@ def _SkipTreeCheck(input_api, output_api): def _CheckCommitMessageBugEntry(input_api, output_api): """Check that bug entries are well-formed in commit message.""" bogus_bug_msg = ( - 'Bogus BUG entry: {}. Please specify the issue tracker prefix and the ' - 'issue number, separated by a colon, e.g. v8:123 or chromium:12345.') + 'Bogus BUG entry: {}. Please specify prefix:number for v8 or chromium ' + '(e.g. chromium:12345) or b/number for buganizer.') results = [] for bug in (input_api.change.BUG or '').split(','): bug = bug.strip() if 'none'.startswith(bug.lower()): continue - if ':' not in bug: + if ':' not in bug and not bug.startswith('b/'): try: - if int(bug) > 100000: - # Rough indicator for current chromium bugs. - prefix_guess = 'chromium' + if int(bug) > 10000000: + results.append( + 'Buganizer entry requires issue tracker prefix b/{}'.format(bug)) else: - prefix_guess = 'v8' - results.append( - 'BUG entry requires issue tracker prefix, e.g. {}:{}'.format( - prefix_guess, bug)) + if int(bug) > 200000: + prefix_guess = 'chromium' + else: + prefix_guess = 'v8' + results.append( + 'BUG entry requires issue tracker prefix, e.g. {}:{}'.format( + prefix_guess, bug)) except ValueError: results.append(bogus_bug_msg.format(bug)) - elif not re.match(r'\w+:\d+', bug): + elif not re.match(r'\w+[:\/]\d+', bug): results.append(bogus_bug_msg.format(bug)) return [output_api.PresubmitError(r) for r in results] diff --git a/deps/v8/WORKSPACE b/deps/v8/WORKSPACE index 306aff18091e2e..1c9fc1078d4176 100644 --- a/deps/v8/WORKSPACE +++ b/deps/v8/WORKSPACE @@ -34,6 +34,16 @@ pip_install( requirements = "//:bazel/requirements.txt", ) +local_repository( + name = "com_google_absl", + path = "third_party/abseil-cpp", +) + +bind( + name = "absl_optional", + actual = "@com_google_absl//absl/types:optional" +) + new_local_repository( name = "com_googlesource_chromium_icu", build_file = "bazel/BUILD.icu", @@ -55,3 +65,17 @@ bind( name = "base_trace_event_common", actual = "@com_googlesource_chromium_base_trace_event_common//:trace_event_common", ) + +http_archive( + name = "intel_ittapi", + add_prefix = "third_party/ittapi", + build_file = "@//:bazel/BUILD.ittapi", + sha256 = "36c42d3f2446ddfaa2d7dfa02dfaa79615933f1a68a72d7e4f1d70de7b56e2c9", + strip_prefix = "ittapi-3.24.0", + url = "https://github.com/intel/ittapi/archive/refs/tags/v3.24.0.tar.gz", +) + +bind( + name = "ittapi", + actual = "@intel_ittapi//:lib_ittapi", +) diff --git a/deps/v8/bazel/BUILD.ittapi b/deps/v8/bazel/BUILD.ittapi new file mode 100644 index 00000000000000..5bc1d2bd07edce --- /dev/null +++ b/deps/v8/bazel/BUILD.ittapi @@ -0,0 +1,15 @@ +cc_library( + name = "lib_ittapi", + srcs = [ + "third_party/ittapi/include/ittnotify.h", + "third_party/ittapi/include/jitprofiling.h", + "third_party/ittapi/src/ittnotify/ittnotify_config.h", + "third_party/ittapi/src/ittnotify/jitprofiling.c", + ], + hdrs = [ + "third_party/ittapi/include/ittnotify.h", + "third_party/ittapi/src/ittnotify/ittnotify_types.h", + ], + copts = ["-Iexternal/intel_ittapi/third_party/ittapi/include"], + visibility = ["//visibility:public"], +) diff --git a/deps/v8/bazel/defs.bzl b/deps/v8/bazel/defs.bzl index d4ff96887e7ca7..09844919a5b572 100644 --- a/deps/v8/bazel/defs.bzl +++ b/deps/v8/bazel/defs.bzl @@ -308,7 +308,10 @@ def v8_library( **kwargs ) -def _torque_initializers_impl(ctx): +# Use a single generator target for torque definitions and initializers. We can +# split the set of outputs by using OutputGroupInfo, that way we do not need to +# run the torque generator twice. +def _torque_files_impl(ctx): if ctx.workspace_name == "v8": v8root = "." else: @@ -327,7 +330,8 @@ def _torque_initializers_impl(ctx): args += [f.path for f in ctx.files.srcs] # Generate/declare output files - outs = [] + defs = [] + inits = [] for src in ctx.files.srcs: root, _period, _ext = src.path.rpartition(".") @@ -335,107 +339,39 @@ def _torque_initializers_impl(ctx): if root[:len(v8root)] == v8root: root = root[len(v8root):] file = ctx.attr.prefix + "/torque-generated/" + root - outs.append(ctx.actions.declare_file(file + "-tq-csa.cc")) - outs.append(ctx.actions.declare_file(file + "-tq-csa.h")) - outs += [ctx.actions.declare_file(ctx.attr.prefix + "/torque-generated/" + f) for f in ctx.attr.extras] + defs.append(ctx.actions.declare_file(file + "-tq-inl.inc")) + defs.append(ctx.actions.declare_file(file + "-tq.inc")) + defs.append(ctx.actions.declare_file(file + "-tq.cc")) + inits.append(ctx.actions.declare_file(file + "-tq-csa.cc")) + inits.append(ctx.actions.declare_file(file + "-tq-csa.h")) + + defs += [ctx.actions.declare_file(ctx.attr.prefix + "/torque-generated/" + f) for f in ctx.attr.definition_extras] + inits += [ctx.actions.declare_file(ctx.attr.prefix + "/torque-generated/" + f) for f in ctx.attr.initializer_extras] + outs = defs + inits ctx.actions.run( outputs = outs, inputs = ctx.files.srcs, arguments = args, executable = ctx.executable.tool, - mnemonic = "GenTorqueInitializers", - progress_message = "Generating Torque initializers", + mnemonic = "GenTorqueFiles", + progress_message = "Generating Torque files", ) - return [DefaultInfo(files = depset(outs))] - -_v8_torque_initializers = rule( - implementation = _torque_initializers_impl, - # cfg = v8_target_cpu_transition, - attrs = { - "prefix": attr.string(mandatory = True), - "srcs": attr.label_list(allow_files = True, mandatory = True), - "extras": attr.string_list(), - "tool": attr.label( - allow_files = True, - executable = True, - cfg = "exec", + return [ + DefaultInfo(files = depset(outs)), + OutputGroupInfo( + initializers = depset(inits), + definitions = depset(defs), ), - "args": attr.string_list(), - }, -) - -def v8_torque_initializers(name, noicu_srcs, icu_srcs, args, extras): - _v8_torque_initializers( - name = "noicu/" + name, - prefix = "noicu", - srcs = noicu_srcs, - args = args, - extras = extras, - tool = select({ - "@v8//bazel/config:v8_target_is_32_bits": ":noicu/torque_non_pointer_compression", - "//conditions:default": ":noicu/torque", - }), - ) - _v8_torque_initializers( - name = "icu/" + name, - prefix = "icu", - srcs = icu_srcs, - args = args, - extras = extras, - tool = select({ - "@v8//bazel/config:v8_target_is_32_bits": ":icu/torque_non_pointer_compression", - "//conditions:default": ":icu/torque", - }), - ) - -def _torque_definitions_impl(ctx): - if ctx.workspace_name == "v8": - v8root = "." - else: - v8root = "external/v8" - - # Arguments - args = [] - args += ctx.attr.args - args.append("-o") - args.append(ctx.bin_dir.path + "/" + v8root + "/" + ctx.attr.prefix + "/torque-generated") - args.append("-strip-v8-root") - args.append("-v8-root") - args.append(v8root) - - # Sources - args += [f.path for f in ctx.files.srcs] - - # Generate/declare output files - outs = [] - for src in ctx.files.srcs: - root, _period, _ext = src.path.rpartition(".") - - # Strip v8root - if root[:len(v8root)] == v8root: - root = root[len(v8root):] - file = ctx.attr.prefix + "/torque-generated/" + root - outs.append(ctx.actions.declare_file(file + "-tq-inl.inc")) - outs.append(ctx.actions.declare_file(file + "-tq.inc")) - outs.append(ctx.actions.declare_file(file + "-tq.cc")) - outs += [ctx.actions.declare_file(ctx.attr.prefix + "/torque-generated/" + f) for f in ctx.attr.extras] - ctx.actions.run( - outputs = outs, - inputs = ctx.files.srcs, - arguments = args, - executable = ctx.executable.tool, - mnemonic = "GenTorqueDefinitions", - progress_message = "Generating Torque definitions", - ) - return [DefaultInfo(files = depset(outs))] + ] -_v8_torque_definitions = rule( - implementation = _torque_definitions_impl, +_v8_torque_files = rule( + implementation = _torque_files_impl, # cfg = v8_target_cpu_transition, attrs = { "prefix": attr.string(mandatory = True), "srcs": attr.label_list(allow_files = True, mandatory = True), - "extras": attr.string_list(), + "definition_extras": attr.string_list(), + "initializer_extras": attr.string_list(), "tool": attr.label( allow_files = True, executable = True, @@ -445,24 +381,26 @@ _v8_torque_definitions = rule( }, ) -def v8_torque_definitions(name, noicu_srcs, icu_srcs, args, extras): - _v8_torque_definitions( +def v8_torque_files(name, noicu_srcs, icu_srcs, args, definition_extras, initializer_extras): + _v8_torque_files( name = "noicu/" + name, prefix = "noicu", srcs = noicu_srcs, args = args, - extras = extras, + definition_extras = definition_extras, + initializer_extras = initializer_extras, tool = select({ "@v8//bazel/config:v8_target_is_32_bits": ":noicu/torque_non_pointer_compression", "//conditions:default": ":noicu/torque", }), ) - _v8_torque_definitions( + _v8_torque_files( name = "icu/" + name, prefix = "icu", srcs = icu_srcs, args = args, - extras = extras, + definition_extras = definition_extras, + initializer_extras = initializer_extras, tool = select({ "@v8//bazel/config:v8_target_is_32_bits": ":icu/torque_non_pointer_compression", "//conditions:default": ":icu/torque", @@ -592,51 +530,65 @@ def _json(kv_pairs): return content def build_config_content(cpu, icu): + arch = cpu + if cpu == 'x86': + arch = 'ia32' return _json([ + ("arch", arch), + ("asan", "false"), + ("atomic_object_field_writes", "false"), + ("cfi", "false"), + ("clang_coverage", "false"), + ("clang", "true"), + ("code_comments", "false"), + ("component_build", "false"), + ("concurrent_marking", "false"), + ("conservative_stack_scanning", "false"), ("current_cpu", cpu), ("dcheck_always_on", "false"), + ("debug_code", "false"), + ("DEBUG_defined", "false"), + ("debugging_features", "false"), + ("dict_property_const_tracking", "false"), + ("direct_handle", "false"), + ("direct_local", "false"), + ("disassembler", "false"), + ("full_debug", "false"), + ("gdbjit", "false"), + ("has_jitless", "false"), + ("has_maglev", "false"), + ("has_turbofan", "true"), + ("has_webassembly", "false"), + ("i18n", icu), ("is_android", "false"), - ("is_asan", "false"), - ("is_cfi", "false"), - ("is_clang", "true"), - ("is_clang_coverage", "false"), - ("is_component_build", "false"), - ("is_debug", "false"), - ("is_full_debug", "false"), - ("is_msan", "false"), - ("is_tsan", "false"), - ("is_ubsan_vptr", "false"), + ("is_ios", "false"), + ("js_shared_memory", "false"), + ("lite_mode", "false"), + ("mips_arch_variant", '""'), + ("mips_use_msa", "false"), + ("msan", "false"), + ("official_build", "false"), + ("pointer_compression_shared_cage", "false"), + ("pointer_compression", "true"), + ("runtime_call_stats", "false"), + ("sandbox", "false"), + ("shared_ro_heap", "false"), + ("simd_mips", "false"), + ("simulator_run", "false"), + ("single_generation", "false"), + ("slow_dchecks", "false"), ("target_cpu", cpu), + ("third_party_heap", "false"), + ("tsan", "false"), + ("ubsan", "false"), + ("use_sanitizer", "false"), + ("v8_cfi", "false"), ("v8_current_cpu", cpu), - ("v8_dict_property_const_tracking", "false"), - ("v8_enable_atomic_object_field_writes", "false"), - ("v8_enable_conservative_stack_scanning", "false"), - ("v8_enable_concurrent_marking", "false"), - ("v8_enable_i18n_support", icu), - ("v8_enable_verify_predictable", "false"), - ("v8_enable_verify_csa", "false"), - ("v8_enable_lite_mode", "false"), - ("v8_enable_runtime_call_stats", "false"), - ("v8_enable_pointer_compression", "true"), - ("v8_enable_pointer_compression_shared_cage", "false"), - ("v8_enable_third_party_heap", "false"), - ("v8_enable_webassembly", "false"), - ("v8_control_flow_integrity", "false"), - ("v8_enable_single_generation", "false"), - ("v8_enable_sandbox", "false"), - ("v8_enable_shared_ro_heap", "false"), - ("v8_disable_write_barriers", "false"), ("v8_target_cpu", cpu), - ("v8_code_comments", "false"), - ("v8_enable_debug_code", "false"), - ("v8_enable_verify_heap", "false"), - ("v8_enable_slow_dchecks", "false"), - ("v8_enable_maglev", "false"), - ("v8_enable_turbofan", "true"), - ("v8_enable_disassembler", "false"), - ("is_DEBUG_defined", "false"), - ("v8_enable_gdbjit", "false"), - ("v8_jitless", "false"), + ("verify_csa", "false"), + ("verify_heap", "false"), + ("verify_predictable", "false"), + ("write_barriers", "false"), ]) # TODO(victorgomes): Create a rule (instead of a macro), that can diff --git a/deps/v8/gni/Info.plist b/deps/v8/gni/Info.plist new file mode 100644 index 00000000000000..f56ebb9f398942 --- /dev/null +++ b/deps/v8/gni/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UISupportedInterfaceOrientation + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index d38f376b94ae4c..e2505eea24ea52 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/chrome_build.gni") import("//build/config/compiler/pgo/pgo.gni") import("//build/config/gclient_args.gni") import("//build/config/ios/config.gni") @@ -91,12 +92,18 @@ declare_args() { # Scan the call stack conservatively during garbage collection. v8_enable_conservative_stack_scanning = false + # Use direct pointers in internal (direct) handles. + v8_enable_direct_handle = "" + + # Use direct pointers in local handles. + v8_enable_direct_local = false + v8_enable_google_benchmark = false cppgc_is_standalone = false - # Enable object names in cppgc for debug purposes. - cppgc_enable_object_names = false + # Enable object names in cppgc for profiling purposes. + cppgc_enable_object_names = is_chrome_for_testing # Enable young generation in cppgc. cppgc_enable_young_generation = false @@ -114,6 +121,9 @@ declare_args() { # due to an increased number of OOMs. cppgc_enable_2gb_cage = false + # Enable support for larger cages, up to 16GB. + cppgc_enable_larger_cage = false + # Enable advanced BigInt algorithms, costing about 10-30 KB binary size # depending on platform. Disabled on Android to save binary size. v8_advanced_bigint_algorithms = !is_android @@ -131,6 +141,10 @@ declare_args() { # Location of zlib. v8_zlib_path = "//third_party/zlib" + + # Change code emission and runtime features to be CET shadow-stack compliant + # (incomplete and experimental). + v8_enable_cet_shadow_stack = false } if (v8_use_external_startup_data == "") { @@ -179,6 +193,12 @@ if (v8_enable_turbofan == "") { assert(v8_enable_turbofan || !v8_enable_webassembly, "Webassembly is not available when Turbofan is disabled.") +# Direct internal handles are enabled by default if conservative stack scanning +# is enabled. +if (v8_enable_direct_handle == "") { + v8_enable_direct_handle = v8_enable_conservative_stack_scanning +} + # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute # paths for all configs in templates as they are shared in different # subdirectories. @@ -283,24 +303,56 @@ template("v8_header_set") { } template("v8_executable") { - executable(target_name) { - forward_variables_from(invoker, - "*", - [ - "configs", - "remove_configs", - ]) - configs -= v8_remove_configs - configs += v8_add_configs - if (defined(invoker.remove_configs)) { - configs -= invoker.remove_configs + if (is_ios) { + import("//build/config/ios/rules.gni") + + ios_app_bundle(target_name) { + forward_variables_from(invoker, + "*", + [ + "configs", + "remove_configs", + ]) + configs -= v8_remove_configs + configs += v8_add_configs + if (defined(invoker.remove_configs)) { + configs -= invoker.remove_configs + } + configs += invoker.configs + deps += [ v8_path_prefix + ":v8_dump_build_config" ] + + # Provide sensible defaults in case invoker did not define any of those + # required variables. + if (!defined(info_plist) && !defined(info_plist_target)) { + info_plist = v8_path_prefix + "/gni/Info.plist" + } + + bundle_identifier = "$ios_app_bundle_id_prefix.chrome.unittests.dev" } - configs += invoker.configs - if (is_linux || is_chromeos) { - # For enabling ASLR. - ldflags = [ "-pie" ] + } else { + executable(target_name) { + forward_variables_from(invoker, + "*", + [ + "configs", + "remove_configs", + ]) + configs -= v8_remove_configs + configs += v8_add_configs + if (defined(invoker.remove_configs)) { + configs -= invoker.remove_configs + } + configs += invoker.configs + if (is_linux || is_chromeos) { + # For enabling ASLR. + ldflags = [ "-pie" ] + } + deps += [ v8_path_prefix + ":v8_dump_build_config" ] + + if (is_win && !v8_enable_cet_shadow_stack) { + configs -= [ "//build/config/compiler:cet_shadow_stack" ] + } } - deps += [ v8_path_prefix + ":v8_dump_build_config" ] } } diff --git a/deps/v8/include/cppgc/DEPS b/deps/v8/include/cppgc/DEPS index 861d1187ba5501..2ec7ebbd4abd66 100644 --- a/deps/v8/include/cppgc/DEPS +++ b/deps/v8/include/cppgc/DEPS @@ -2,6 +2,7 @@ include_rules = [ "-include", "+v8config.h", "+v8-platform.h", + "+v8-source-location.h", "+cppgc", "-src", "+libplatform/libplatform.h", diff --git a/deps/v8/include/cppgc/internal/api-constants.h b/deps/v8/include/cppgc/internal/api-constants.h index 453ab88b461eb7..4e2a637e420560 100644 --- a/deps/v8/include/cppgc/internal/api-constants.h +++ b/deps/v8/include/cppgc/internal/api-constants.h @@ -40,13 +40,32 @@ constexpr size_t kGuardPageSize = 4096; static constexpr size_t kLargeObjectSizeThreshold = kPageSize / 2; +#if defined(CPPGC_POINTER_COMPRESSION) +#if defined(CPPGC_ENABLE_LARGER_CAGE) +constexpr unsigned kPointerCompressionShift = 3; +#else // !defined(CPPGC_ENABLE_LARGER_CAGE) +constexpr unsigned kPointerCompressionShift = 1; +#endif // !defined(CPPGC_ENABLE_LARGER_CAGE) +#endif // !defined(CPPGC_POINTER_COMPRESSION) + #if defined(CPPGC_CAGED_HEAP) #if defined(CPPGC_2GB_CAGE) -constexpr size_t kCagedHeapReservationSize = static_cast(2) * kGB; -#else // !defined(CPPGC_2GB_CAGE) -constexpr size_t kCagedHeapReservationSize = static_cast(4) * kGB; +constexpr size_t kCagedHeapDefaultReservationSize = + static_cast(2) * kGB; +constexpr size_t kCagedHeapMaxReservationSize = + kCagedHeapDefaultReservationSize; +#else // !defined(CPPGC_2GB_CAGE) +constexpr size_t kCagedHeapDefaultReservationSize = + static_cast(4) * kGB; +#if defined(CPPGC_POINTER_COMPRESSION) +constexpr size_t kCagedHeapMaxReservationSize = + size_t{1} << (31 + kPointerCompressionShift); +#else // !defined(CPPGC_POINTER_COMPRESSION) +constexpr size_t kCagedHeapMaxReservationSize = + kCagedHeapDefaultReservationSize; +#endif // !defined(CPPGC_POINTER_COMPRESSION) #endif // !defined(CPPGC_2GB_CAGE) -constexpr size_t kCagedHeapReservationAlignment = kCagedHeapReservationSize; +constexpr size_t kCagedHeapReservationAlignment = kCagedHeapMaxReservationSize; #endif // defined(CPPGC_CAGED_HEAP) static constexpr size_t kDefaultAlignment = sizeof(void*); 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 7d689f87e71da1..1eb87dfb538955 100644 --- a/deps/v8/include/cppgc/internal/caged-heap-local-data.h +++ b/deps/v8/include/cppgc/internal/caged-heap-local-data.h @@ -46,7 +46,11 @@ class V8_EXPORT AgeTable final { enum class AdjacentCardsPolicy : uint8_t { kConsider, kIgnore }; static constexpr size_t kCardSizeInBytes = - api_constants::kCagedHeapReservationSize / kRequiredSize; + api_constants::kCagedHeapDefaultReservationSize / kRequiredSize; + + static constexpr size_t CalculateAgeTableSizeForHeapSize(size_t heap_size) { + return heap_size / kCardSizeInBytes; + } void SetAge(uintptr_t cage_offset, Age age) { table_[card(cage_offset)] = age; @@ -81,16 +85,18 @@ class V8_EXPORT AgeTable final { #endif // !V8_HAS_BUILTIN_CTZ static_assert((1 << kGranularityBits) == kCardSizeInBytes); const size_t entry = offset >> kGranularityBits; - CPPGC_DCHECK(table_.size() > entry); + CPPGC_DCHECK(CagedHeapBase::GetAgeTableSize() > entry); return entry; } - std::array table_; +#if defined(V8_CC_GNU) + // gcc disallows flexible arrays in otherwise empty classes. + Age table_[0]; +#else // !defined(V8_CC_GNU) + Age table_[]; +#endif // !defined(V8_CC_GNU) }; -static_assert(sizeof(AgeTable) == 1 * api_constants::kMB, - "Size of AgeTable is 1MB"); - #endif // CPPGC_YOUNG_GENERATION struct CagedHeapLocalData final { @@ -98,6 +104,10 @@ struct CagedHeapLocalData final { return *reinterpret_cast(CagedHeapBase::GetBase()); } + static constexpr size_t CalculateLocalDataSizeForHeapSize(size_t heap_size) { + return AgeTable::CalculateAgeTableSizeForHeapSize(heap_size); + } + #if defined(CPPGC_YOUNG_GENERATION) AgeTable age_table; #endif diff --git a/deps/v8/include/cppgc/internal/caged-heap.h b/deps/v8/include/cppgc/internal/caged-heap.h index 4db42aee089b5d..0c987a95447cc6 100644 --- a/deps/v8/include/cppgc/internal/caged-heap.h +++ b/deps/v8/include/cppgc/internal/caged-heap.h @@ -33,24 +33,31 @@ class V8_EXPORT CagedHeapBase { V8_INLINE static bool AreWithinCage(const void* addr1, const void* addr2) { #if defined(CPPGC_2GB_CAGE) - static constexpr size_t kHalfWordShift = sizeof(uint32_t) * CHAR_BIT - 1; + static constexpr size_t kHeapBaseShift = sizeof(uint32_t) * CHAR_BIT - 1; #else //! defined(CPPGC_2GB_CAGE) - static constexpr size_t kHalfWordShift = sizeof(uint32_t) * CHAR_BIT; +#if defined(CPPGC_POINTER_COMPRESSION) + static constexpr size_t kHeapBaseShift = + 31 + api_constants::kPointerCompressionShift; +#else // !defined(CPPGC_POINTER_COMPRESSION) + static constexpr size_t kHeapBaseShift = sizeof(uint32_t) * CHAR_BIT; +#endif // !defined(CPPGC_POINTER_COMPRESSION) #endif //! defined(CPPGC_2GB_CAGE) - static_assert((static_cast(1) << kHalfWordShift) == - api_constants::kCagedHeapReservationSize); + static_assert((static_cast(1) << kHeapBaseShift) == + api_constants::kCagedHeapMaxReservationSize); CPPGC_DCHECK(g_heap_base_); return !(((reinterpret_cast(addr1) ^ g_heap_base_) | (reinterpret_cast(addr2) ^ g_heap_base_)) >> - kHalfWordShift); + kHeapBaseShift); } V8_INLINE static uintptr_t GetBase() { return g_heap_base_; } + V8_INLINE static size_t GetAgeTableSize() { return g_age_table_size_; } private: friend class CagedHeap; static uintptr_t g_heap_base_; + static size_t g_age_table_size_; }; } // namespace internal diff --git a/deps/v8/include/cppgc/internal/gc-info.h b/deps/v8/include/cppgc/internal/gc-info.h index 08ffd411a8efab..c8cb99acbc0fde 100644 --- a/deps/v8/include/cppgc/internal/gc-info.h +++ b/deps/v8/include/cppgc/internal/gc-info.h @@ -24,89 +24,90 @@ struct V8_EXPORT EnsureGCInfoIndexTrait final { // Acquires a new GC info object and updates `registered_index` with the index // that identifies that new info accordingly. template - V8_INLINE static void EnsureIndex( + V8_INLINE static GCInfoIndex EnsureIndex( std::atomic& registered_index) { - EnsureGCInfoIndexTraitDispatch{}(registered_index); + return EnsureGCInfoIndexTraitDispatch{}(registered_index); } private: - template ::value, - bool = FinalizerTrait::HasFinalizer(), + template ::HasFinalizer(), bool = NameTrait::HasNonHiddenName()> struct EnsureGCInfoIndexTraitDispatch; - static void V8_PRESERVE_MOST - EnsureGCInfoIndexPolymorphic(std::atomic&, TraceCallback, - FinalizationCallback, NameCallback); - static void V8_PRESERVE_MOST EnsureGCInfoIndexPolymorphic( + static GCInfoIndex V8_PRESERVE_MOST + EnsureGCInfoIndex(std::atomic&, TraceCallback, + FinalizationCallback, NameCallback); + static GCInfoIndex V8_PRESERVE_MOST EnsureGCInfoIndex( std::atomic&, TraceCallback, FinalizationCallback); - static void V8_PRESERVE_MOST EnsureGCInfoIndexPolymorphic( - std::atomic&, TraceCallback, NameCallback); - static void V8_PRESERVE_MOST - EnsureGCInfoIndexPolymorphic(std::atomic&, TraceCallback); - static void V8_PRESERVE_MOST - EnsureGCInfoIndexNonPolymorphic(std::atomic&, TraceCallback, - FinalizationCallback, NameCallback); - static void V8_PRESERVE_MOST EnsureGCInfoIndexNonPolymorphic( - std::atomic&, TraceCallback, FinalizationCallback); - static void V8_PRESERVE_MOST EnsureGCInfoIndexNonPolymorphic( - std::atomic&, TraceCallback, NameCallback); - static void V8_PRESERVE_MOST - EnsureGCInfoIndexNonPolymorphic(std::atomic&, TraceCallback); + static GCInfoIndex V8_PRESERVE_MOST + EnsureGCInfoIndex(std::atomic&, TraceCallback, NameCallback); + static GCInfoIndex V8_PRESERVE_MOST + EnsureGCInfoIndex(std::atomic&, TraceCallback); }; -#define DISPATCH(is_polymorphic, has_finalizer, has_non_hidden_name, function) \ - template \ - struct EnsureGCInfoIndexTrait::EnsureGCInfoIndexTraitDispatch< \ - T, is_polymorphic, has_finalizer, has_non_hidden_name> { \ - V8_INLINE void operator()(std::atomic& registered_index) { \ - function; \ - } \ +#define DISPATCH(has_finalizer, has_non_hidden_name, function) \ + template \ + struct EnsureGCInfoIndexTrait::EnsureGCInfoIndexTraitDispatch< \ + T, has_finalizer, has_non_hidden_name> { \ + V8_INLINE GCInfoIndex \ + operator()(std::atomic& registered_index) { \ + return function; \ + } \ }; -// --------------------------------------------------------------------- // -// DISPATCH(is_polymorphic, has_finalizer, has_non_hidden_name, function) -// --------------------------------------------------------------------- // -DISPATCH(true, true, true, // - EnsureGCInfoIndexPolymorphic(registered_index, // - TraceTrait::Trace, // - FinalizerTrait::kCallback, // - NameTrait::GetName)) // -DISPATCH(true, true, false, // - EnsureGCInfoIndexPolymorphic(registered_index, // - TraceTrait::Trace, // - FinalizerTrait::kCallback)) // -DISPATCH(true, false, true, // - EnsureGCInfoIndexPolymorphic(registered_index, // - TraceTrait::Trace, // - NameTrait::GetName)) // -DISPATCH(true, false, false, // - EnsureGCInfoIndexPolymorphic(registered_index, // - TraceTrait::Trace)) // -DISPATCH(false, true, true, // - EnsureGCInfoIndexNonPolymorphic(registered_index, // - TraceTrait::Trace, // - FinalizerTrait::kCallback, // - NameTrait::GetName)) // -DISPATCH(false, true, false, // - EnsureGCInfoIndexNonPolymorphic(registered_index, // - TraceTrait::Trace, // - FinalizerTrait::kCallback)) // -DISPATCH(false, false, true, // - EnsureGCInfoIndexNonPolymorphic(registered_index, // - TraceTrait::Trace, // - NameTrait::GetName)) // -DISPATCH(false, false, false, // - EnsureGCInfoIndexNonPolymorphic(registered_index, // - TraceTrait::Trace)) // +// ------------------------------------------------------- // +// DISPATCH(has_finalizer, has_non_hidden_name, function) // +// ------------------------------------------------------- // +DISPATCH(true, true, // + EnsureGCInfoIndex(registered_index, // + TraceTrait::Trace, // + FinalizerTrait::kCallback, // + NameTrait::GetName)) // +DISPATCH(true, false, // + EnsureGCInfoIndex(registered_index, // + TraceTrait::Trace, // + FinalizerTrait::kCallback)) // +DISPATCH(false, true, // + EnsureGCInfoIndex(registered_index, // + TraceTrait::Trace, // + NameTrait::GetName)) // +DISPATCH(false, false, // + EnsureGCInfoIndex(registered_index, // + TraceTrait::Trace)) // #undef DISPATCH +// Trait determines how the garbage collector treats objects wrt. to traversing, +// finalization, and naming. +template +struct GCInfoTrait final { + V8_INLINE static GCInfoIndex Index() { + static_assert(sizeof(T), "T must be fully defined"); + static std::atomic + registered_index; // Uses zero initialization. + GCInfoIndex index = registered_index.load(std::memory_order_acquire); + if (V8_UNLIKELY(!index)) { + index = EnsureGCInfoIndexTrait::EnsureIndex(registered_index); + CPPGC_DCHECK(index != 0); + CPPGC_DCHECK(index == registered_index.load(std::memory_order_acquire)); + } + return index; + } + + static constexpr bool CheckCallbacksAreDefined() { + // No USE() macro available. + (void)static_cast(TraceTrait::Trace); + (void)static_cast(FinalizerTrait::kCallback); + (void)static_cast(NameTrait::GetName); + return true; + } +}; + // Fold types based on finalizer behavior. Note that finalizer characteristics // align with trace behavior, i.e., destructors are virtual when trace methods // are and vice versa. template -struct GCInfoFolding { +struct GCInfoFolding final { static constexpr bool kHasVirtualDestructorAtBase = std::has_virtual_destructor::value; static constexpr bool kBothTypesAreTriviallyDestructible = @@ -121,34 +122,24 @@ struct GCInfoFolding { static constexpr bool kWantsDetailedObjectNames = false; #endif // !CPPGC_SUPPORTS_OBJECT_NAMES - // Folding would regresses name resolution when deriving names from C++ - // class names as it would just folds a name to the base class name. - using ResultType = std::conditional_t<(kHasVirtualDestructorAtBase || - kBothTypesAreTriviallyDestructible || - kHasCustomFinalizerDispatchAtBase) && - !kWantsDetailedObjectNames, - ParentMostGarbageCollectedType, T>; -}; + // Always true. Forces the compiler to resolve callbacks which ensures that + // both modes don't break without requiring compiling a separate + // configuration. Only a single GCInfo (for `ResultType` below) will actually + // be instantiated but existence (and well-formedness) of all callbacks is + // checked. + static constexpr bool kCheckTypeGuardAlwaysTrue = + GCInfoTrait::CheckCallbacksAreDefined() && + GCInfoTrait::CheckCallbacksAreDefined(); -// Trait determines how the garbage collector treats objects wrt. to traversing, -// finalization, and naming. -template -struct GCInfoTrait final { - V8_INLINE static GCInfoIndex Index() { - static_assert(sizeof(T), "T must be fully defined"); - static std::atomic - registered_index; // Uses zero initialization. - GCInfoIndex index = registered_index.load(std::memory_order_acquire); - if (V8_UNLIKELY(!index)) { - EnsureGCInfoIndexTrait::EnsureIndex(registered_index); - // Slow path call uses V8_PRESERVE_MOST which does not support return - // values (also preserves RAX). Avoid out parameter by just reloading the - // value here which at this point is guaranteed to be set. - index = registered_index.load(std::memory_order_acquire); - CPPGC_DCHECK(index != 0); - } - return index; - } + // Folding would regress name resolution when deriving names from C++ + // class names as it would just folds a name to the base class name. + using ResultType = + std::conditional_t; }; } // namespace internal diff --git a/deps/v8/include/cppgc/internal/member-storage.h b/deps/v8/include/cppgc/internal/member-storage.h index 3dfafc4b08cd11..61b255ba637a92 100644 --- a/deps/v8/include/cppgc/internal/member-storage.h +++ b/deps/v8/include/cppgc/internal/member-storage.h @@ -122,17 +122,22 @@ class V8_TRIVIAL_ABI CompressedPointer final { } static V8_INLINE IntegralType Compress(const void* ptr) { - static_assert( - SentinelPointer::kSentinelValue == 0b10, - "The compression scheme relies on the sentinel encoded as 0b10"); + static_assert(SentinelPointer::kSentinelValue == + 1 << api_constants::kPointerCompressionShift, + "The compression scheme relies on the sentinel encoded as 1 " + "<< kPointerCompressionShift"); static constexpr size_t kGigaCageMask = ~(api_constants::kCagedHeapReservationAlignment - 1); + static constexpr size_t kPointerCompressionShiftMask = + (1 << api_constants::kPointerCompressionShift) - 1; CPPGC_DCHECK(CageBaseGlobal::IsSet()); const uintptr_t base = CageBaseGlobal::Get(); CPPGC_DCHECK(!ptr || ptr == kSentinelPointer || (base & kGigaCageMask) == (reinterpret_cast(ptr) & kGigaCageMask)); + CPPGC_DCHECK( + (reinterpret_cast(ptr) & kPointerCompressionShiftMask) == 0); #if defined(CPPGC_2GB_CAGE) // Truncate the pointer. @@ -140,8 +145,9 @@ class V8_TRIVIAL_ABI CompressedPointer final { static_cast(reinterpret_cast(ptr)); #else // !defined(CPPGC_2GB_CAGE) const auto uptr = reinterpret_cast(ptr); - // Shift the pointer by one and truncate. - auto compressed = static_cast(uptr >> 1); + // Shift the pointer and truncate. + auto compressed = static_cast( + uptr >> api_constants::kPointerCompressionShift); #endif // !defined(CPPGC_2GB_CAGE) // Normal compressed pointers must have the MSB set. CPPGC_DCHECK((!compressed || compressed == kCompressedSentinel) || @@ -157,9 +163,10 @@ class V8_TRIVIAL_ABI CompressedPointer final { #if defined(CPPGC_2GB_CAGE) const uint64_t mask = static_cast(static_cast(ptr)); #else // !defined(CPPGC_2GB_CAGE) - // Then, shift the result by one. It's important to shift the unsigned + // Then, shift the result. It's important to shift the unsigned // value, as otherwise it would result in undefined behavior. - const uint64_t mask = static_cast(static_cast(ptr)) << 1; + const uint64_t mask = static_cast(static_cast(ptr)) + << api_constants::kPointerCompressionShift; #endif // !defined(CPPGC_2GB_CAGE) return reinterpret_cast(mask & base); } @@ -170,7 +177,8 @@ class V8_TRIVIAL_ABI CompressedPointer final { SentinelPointer::kSentinelValue; #else // !defined(CPPGC_2GB_CAGE) static constexpr IntegralType kCompressedSentinel = - SentinelPointer::kSentinelValue >> 1; + SentinelPointer::kSentinelValue >> + api_constants::kPointerCompressionShift; #endif // !defined(CPPGC_2GB_CAGE) // All constructors initialize `value_`. Do not add a default value here as it // results in a non-atomic write on some builds, even when the atomic version diff --git a/deps/v8/include/cppgc/member.h b/deps/v8/include/cppgc/member.h index b6382a02358744..457f163bc78eab 100644 --- a/deps/v8/include/cppgc/member.h +++ b/deps/v8/include/cppgc/member.h @@ -597,8 +597,33 @@ using UncompressedMember = internal::BasicMember< T, internal::StrongMemberTag, internal::DijkstraWriteBarrierPolicy, internal::DefaultMemberCheckingPolicy, internal::RawPointer>; +#if defined(CPPGC_POINTER_COMPRESSION) +/** + * CompressedMember. Default implementation of cppgc::Member on builds with + * pointer compression. + */ +template +using CompressedMember = internal::BasicMember< + T, internal::StrongMemberTag, internal::DijkstraWriteBarrierPolicy, + internal::DefaultMemberCheckingPolicy, internal::CompressedPointer>; +#endif // defined(CPPGC_POINTER_COMPRESSION) + } // namespace subtle +namespace internal { + +struct Dummy; + +static constexpr size_t kSizeOfMember = sizeof(Member); +static constexpr size_t kSizeOfUncompressedMember = + sizeof(subtle::UncompressedMember); +#if defined(CPPGC_POINTER_COMPRESSION) +static constexpr size_t kSizeofCompressedMember = + sizeof(subtle::CompressedMember); +#endif // defined(CPPGC_POINTER_COMPRESSION) + +} // namespace internal + } // namespace cppgc #endif // INCLUDE_CPPGC_MEMBER_H_ diff --git a/deps/v8/include/cppgc/persistent.h b/deps/v8/include/cppgc/persistent.h index 709f3fd6ab0996..6eb1c659267d96 100644 --- a/deps/v8/include/cppgc/persistent.h +++ b/deps/v8/include/cppgc/persistent.h @@ -92,6 +92,7 @@ class BasicPersistent final : public PersistentBase, template ::value>> + // NOLINTNEXTLINE BasicPersistent( const BasicPersistent& other, @@ -116,6 +117,7 @@ class BasicPersistent final : public PersistentBase, typename MemberWeaknessTag, typename MemberCheckingPolicy, typename MemberStorageType, typename = std::enable_if_t::value>> + // NOLINTNEXTLINE BasicPersistent(const internal::BasicMember< U, MemberBarrierPolicy, MemberWeaknessTag, MemberCheckingPolicy, MemberStorageType>& member, @@ -180,6 +182,8 @@ class BasicPersistent final : public PersistentBase, } explicit operator bool() const { return Get(); } + // Historically we allow implicit conversions to T*. + // NOLINTNEXTLINE operator T*() const { return Get(); } T* operator->() const { return Get(); } T& operator*() const { return *Get(); } diff --git a/deps/v8/include/cppgc/platform.h b/deps/v8/include/cppgc/platform.h index 5a0a40ec8c0eb0..ae96579dd64e44 100644 --- a/deps/v8/include/cppgc/platform.h +++ b/deps/v8/include/cppgc/platform.h @@ -136,8 +136,13 @@ class V8_EXPORT Platform { * \param page_allocator The allocator used for maintaining meta data. Must stay * always alive and not change between multiple calls to InitializeProcess. If * no allocator is provided, a default internal version will be used. + * \param desired_heap_size Desired amount of virtual address space to reserve + * for the heap, in bytes. Actual size will be clamped to minimum and maximum + * values based on compile-time settings and may be rounded up. If this + * parameter is zero, a default value will be used. */ -V8_EXPORT void InitializeProcess(PageAllocator* page_allocator = nullptr); +V8_EXPORT void InitializeProcess(PageAllocator* page_allocator = nullptr, + size_t desired_heap_size = 0); /** * Must be called after destroying the last used heap. Some process-global diff --git a/deps/v8/include/cppgc/sentinel-pointer.h b/deps/v8/include/cppgc/sentinel-pointer.h index 8dbbab0ebd1f79..bee96c77607428 100644 --- a/deps/v8/include/cppgc/sentinel-pointer.h +++ b/deps/v8/include/cppgc/sentinel-pointer.h @@ -7,13 +7,20 @@ #include +#include "cppgc/internal/api-constants.h" + namespace cppgc { namespace internal { // Special tag type used to denote some sentinel member. The semantics of the // sentinel is defined by the embedder. struct SentinelPointer { +#if defined(CPPGC_POINTER_COMPRESSION) + static constexpr intptr_t kSentinelValue = + 1 << api_constants::kPointerCompressionShift; +#else // !defined(CPPGC_POINTER_COMPRESSION) static constexpr intptr_t kSentinelValue = 0b10; +#endif // !defined(CPPGC_POINTER_COMPRESSION) template operator T*() const { return reinterpret_cast(kSentinelValue); diff --git a/deps/v8/include/cppgc/source-location.h b/deps/v8/include/cppgc/source-location.h index da5a5ede520138..0dc28aedd9b225 100644 --- a/deps/v8/include/cppgc/source-location.h +++ b/deps/v8/include/cppgc/source-location.h @@ -5,87 +5,11 @@ #ifndef INCLUDE_CPPGC_SOURCE_LOCATION_H_ #define INCLUDE_CPPGC_SOURCE_LOCATION_H_ -#include -#include - -#include "v8config.h" // NOLINT(build/include_directory) - -#if defined(__has_builtin) -#define CPPGC_SUPPORTS_SOURCE_LOCATION \ - (__has_builtin(__builtin_FUNCTION) && __has_builtin(__builtin_FILE) && \ - __has_builtin(__builtin_LINE)) // NOLINT -#elif defined(V8_CC_GNU) && __GNUC__ >= 7 -#define CPPGC_SUPPORTS_SOURCE_LOCATION 1 -#elif defined(V8_CC_INTEL) && __ICC >= 1800 -#define CPPGC_SUPPORTS_SOURCE_LOCATION 1 -#else -#define CPPGC_SUPPORTS_SOURCE_LOCATION 0 -#endif +#include "v8-source-location.h" namespace cppgc { -/** - * Encapsulates source location information. Mimics C++20's - * `std::source_location`. - */ -class V8_EXPORT SourceLocation final { - public: - /** - * Construct source location information corresponding to the location of the - * call site. - */ -#if CPPGC_SUPPORTS_SOURCE_LOCATION - static constexpr SourceLocation Current( - const char* function = __builtin_FUNCTION(), - const char* file = __builtin_FILE(), size_t line = __builtin_LINE()) { - return SourceLocation(function, file, line); - } -#else - static constexpr SourceLocation Current() { return SourceLocation(); } -#endif // CPPGC_SUPPORTS_SOURCE_LOCATION - - /** - * Constructs unspecified source location information. - */ - constexpr SourceLocation() = default; - - /** - * Returns the name of the function associated with the position represented - * by this object, if any. - * - * \returns the function name as cstring. - */ - constexpr const char* Function() const { return function_; } - - /** - * Returns the name of the current source file represented by this object. - * - * \returns the file name as cstring. - */ - constexpr const char* FileName() const { return file_; } - - /** - * Returns the line number represented by this object. - * - * \returns the line number. - */ - constexpr size_t Line() const { return line_; } - - /** - * Returns a human-readable string representing this object. - * - * \returns a human-readable string representing source location information. - */ - std::string ToString() const; - - private: - constexpr SourceLocation(const char* function, const char* file, size_t line) - : function_(function), file_(file), line_(line) {} - - const char* function_ = nullptr; - const char* file_ = nullptr; - size_t line_ = 0u; -}; +using SourceLocation = v8::SourceLocation; } // namespace cppgc diff --git a/deps/v8/include/cppgc/trace-trait.h b/deps/v8/include/cppgc/trace-trait.h index 694fbfdccf4dcb..5fc863d2ebbac5 100644 --- a/deps/v8/include/cppgc/trace-trait.h +++ b/deps/v8/include/cppgc/trace-trait.h @@ -53,6 +53,14 @@ struct TraceDescriptor { TraceCallback callback; }; +/** + * Callback for getting a TraceDescriptor for a given address. + * + * \param address Possibly inner address of an object. + * \returns a TraceDescriptor for the provided address. + */ +using TraceDescriptorCallback = TraceDescriptor (*)(const void* address); + namespace internal { struct V8_EXPORT TraceTraitFromInnerAddressImpl { diff --git a/deps/v8/include/cppgc/visitor.h b/deps/v8/include/cppgc/visitor.h index 9b135e39a0be1c..1d6b39a14fd16a 100644 --- a/deps/v8/include/cppgc/visitor.h +++ b/deps/v8/include/cppgc/visitor.h @@ -5,10 +5,13 @@ #ifndef INCLUDE_CPPGC_VISITOR_H_ #define INCLUDE_CPPGC_VISITOR_H_ +#include + #include "cppgc/custom-space.h" #include "cppgc/ephemeron-pair.h" #include "cppgc/garbage-collected.h" #include "cppgc/internal/logging.h" +#include "cppgc/internal/member-storage.h" #include "cppgc/internal/pointer-policies.h" #include "cppgc/liveness-broker.h" #include "cppgc/member.h" @@ -113,6 +116,30 @@ class V8_EXPORT Visitor { } #endif // defined(CPPGC_POINTER_COMPRESSION) + template + void TraceMultiple(const subtle::UncompressedMember* start, size_t len) { + static_assert(sizeof(T), "Pointee type must be fully defined."); + static_assert(internal::IsGarbageCollectedOrMixinType::value, + "T must be GarbageCollected or GarbageCollectedMixin type"); + VisitMultipleUncompressedMember(start, len, + &TraceTrait::GetTraceDescriptor); + } + + template , subtle::UncompressedMember>>* = nullptr> + void TraceMultiple(const Member* start, size_t len) { + static_assert(sizeof(T), "Pointee type must be fully defined."); + static_assert(internal::IsGarbageCollectedOrMixinType::value, + "T must be GarbageCollected or GarbageCollectedMixin type"); +#if defined(CPPGC_POINTER_COMPRESSION) + static_assert(std::is_same_v, subtle::CompressedMember>, + "Member and CompressedMember must be the same."); + VisitMultipleCompressedMember(start, len, + &TraceTrait::GetTraceDescriptor); +#endif // defined(CPPGC_POINTER_COMPRESSION) + } + /** * Trace method for inlined objects that are not allocated themselves but * otherwise follow managed heap layout and have a Trace() method. @@ -131,6 +158,26 @@ class V8_EXPORT Visitor { TraceTrait::Trace(this, &object); } + template + void TraceMultiple(const T* start, size_t len) { +#if V8_ENABLE_CHECKS + // This object is embedded in potentially multiple nested objects. The + // outermost object must not be in construction as such objects are (a) not + // processed immediately, and (b) only processed conservatively if not + // otherwise possible. + CheckObjectNotInConstruction(start); +#endif // V8_ENABLE_CHECKS + for (size_t i = 0; i < len; ++i) { + const T* object = &start[i]; + if constexpr (std::is_polymorphic_v) { + // The object's vtable may be uninitialized in which case the object is + // not traced. + if (*reinterpret_cast(object) == 0) continue; + } + TraceTrait::Trace(this, object); + } + } + /** * Registers a weak callback method on the object of type T. See * LivenessBroker for an usage example. @@ -314,6 +361,39 @@ class V8_EXPORT Visitor { WeakCallback callback, const void* data) {} virtual void HandleMovableReference(const void**) {} + virtual void VisitMultipleUncompressedMember( + const void* start, size_t len, + TraceDescriptorCallback get_trace_descriptor) { + // Default implementation merely delegates to Visit(). + const char* it = static_cast(start); + const char* end = it + len * internal::kSizeOfUncompressedMember; + for (; it < end; it += internal::kSizeOfUncompressedMember) { + const auto* current = reinterpret_cast(it); + const void* object = current->LoadAtomic(); + if (!object) continue; + + Visit(object, get_trace_descriptor(object)); + } + } + +#if defined(CPPGC_POINTER_COMPRESSION) + virtual void VisitMultipleCompressedMember( + const void* start, size_t len, + TraceDescriptorCallback get_trace_descriptor) { + // Default implementation merely delegates to Visit(). + const char* it = static_cast(start); + const char* end = it + len * internal::kSizeofCompressedMember; + for (; it < end; it += internal::kSizeofCompressedMember) { + const auto* current = + reinterpret_cast(it); + const void* object = current->LoadAtomic(); + if (!object) continue; + + Visit(object, get_trace_descriptor(object)); + } + } +#endif // defined(CPPGC_POINTER_COMPRESSION) + private: template static void WeakCallbackMethodDelegate(const LivenessBroker& info, @@ -326,8 +406,7 @@ class V8_EXPORT Visitor { template static void HandleWeak(const LivenessBroker& info, const void* object) { const PointerType* weak = static_cast(object); - auto* raw_ptr = weak->GetFromGC(); - if (!info.IsHeapObjectAlive(raw_ptr)) { + if (!info.IsHeapObjectAlive(weak->GetFromGC())) { weak->ClearFromGC(); } } @@ -413,8 +492,7 @@ class V8_EXPORT RootVisitor { template static void HandleWeak(const LivenessBroker& info, const void* object) { const PointerType* weak = static_cast(object); - auto* raw_ptr = weak->GetFromGC(); - if (!info.IsHeapObjectAlive(raw_ptr)) { + if (!info.IsHeapObjectAlive(weak->GetFromGC())) { weak->ClearFromGC(); } } diff --git a/deps/v8/include/js_protocol.pdl b/deps/v8/include/js_protocol.pdl index 6285d9b6f24f63..ed6226308c266b 100644 --- a/deps/v8/include/js_protocol.pdl +++ b/deps/v8/include/js_protocol.pdl @@ -580,6 +580,7 @@ domain Debugger other promiseRejection XHR + step # Object containing break-specific auxiliary properties. optional object data # Hit breakpoints IDs @@ -631,7 +632,7 @@ domain Debugger Runtime.ExecutionContextId executionContextId # Content hash of the script, SHA-256. string hash - # Embedder-specific auxiliary data. + # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} optional object executionContextAuxData # URL of source map associated with script (if any). optional string sourceMapURL @@ -670,7 +671,7 @@ domain Debugger Runtime.ExecutionContextId executionContextId # Content hash of the script, SHA-256. string hash - # Embedder-specific auxiliary data. + # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} optional object executionContextAuxData # True, if this script is generated as a result of the live edit operation. experimental optional boolean isLiveEdit @@ -1013,9 +1014,33 @@ 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 + # Represents options for serialization. Overrides `generatePreview`, `returnByValue` and + # `generateWebDriverValue`. + type SerializationOptions extends object + properties + enum serialization + # Whether the result should be deep-serialized. The result is put into + # `deepSerializedValue` and `ObjectId` is provided. + deep + # Whether the result is expected to be a JSON object which should be sent by value. + # The result is put either into `value` or into `unserializableValue`. Synonym of + # `returnByValue: true`. Overrides `returnByValue`. + json + # Only remote object id is put in the result. Same bahaviour as if no + # `serializationOptions`, `generatePreview`, `returnByValue` nor `generateWebDriverValue` + # are provided. + idOnly + + # Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode. + optional integer maxDepth + + # Embedder-specific parameters. For example if connected to V8 in Chrome these control DOM + # serialization via `maxNodeDepth: integer` and `includeShadowTree: "none" | "open" | "all"`. + # Values can be only of type string or integer. + optional object additionalParameters + + # Represents deep serialized value. + type DeepSerializedValue extends object properties enum type undefined @@ -1043,6 +1068,10 @@ domain Runtime window optional any value optional string objectId + # Set if value reference met more then once during serialization. In such + # case, value is provided only to one of the serialized values. Unique + # per value in the scope of one CDP call. + optional integer weakLocalObjectReference # Unique object identifier. type RemoteObjectId extends string @@ -1096,8 +1125,10 @@ domain Runtime optional UnserializableValue unserializableValue # String representation of the object. optional string description - # WebDriver BiDi representation of the value. - experimental optional WebDriverValue webDriverValue + # Deprecated. Use `deepSerializedValue` instead. WebDriver BiDi representation of the value. + deprecated optional DeepSerializedValue webDriverValue + # Deep serialized value. + experimental optional DeepSerializedValue deepSerializedValue # Unique object identifier (for non-primitive values). optional RemoteObjectId objectId # Preview containing abbreviated property values. Specified for `object` type values only. @@ -1283,7 +1314,7 @@ domain Runtime # multiple processes, so can be reliably used to identify specific context while backend # performs a cross-process navigation. experimental string uniqueId - # Embedder-specific auxiliary data. + # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} optional object auxData # Detailed information about exception (or error) that was thrown during script compilation or @@ -1387,6 +1418,7 @@ domain Runtime # execution. Overrides `setPauseOnException` state. optional boolean silent # Whether the result is expected to be a JSON object which should be sent by value. + # Can be overriden by `serializationOptions`. optional boolean returnByValue # Whether preview should be generated for the result. experimental optional boolean generatePreview @@ -1410,10 +1442,15 @@ domain Runtime # boundaries). # This is mutually exclusive with `executionContextId`. experimental optional string uniqueContextId + # Deprecated. Use `serializationOptions: {serialization:"deep"}` instead. # Whether the result should contain `webDriverValue`, serialized according to # https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but # resulting `objectId` is still provided. - experimental optional boolean generateWebDriverValue + deprecated optional boolean generateWebDriverValue + # Specifies the result serialization. If provided, overrides + # `generatePreview`, `returnByValue` and `generateWebDriverValue`. + experimental optional SerializationOptions serializationOptions + returns # Call result. RemoteObject result @@ -1499,8 +1536,15 @@ 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 + # Deprecated. Use `serializationOptions: {serialization:"deep"}` instead. + # Whether the result should contain `webDriverValue`, serialized + # according to + # https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but + # resulting `objectId` is still provided. + deprecated optional boolean generateWebDriverValue + # Specifies the result serialization. If provided, overrides + # `generatePreview`, `returnByValue` and `generateWebDriverValue`. + experimental optional SerializationOptions serializationOptions returns # Evaluation result. RemoteObject result diff --git a/deps/v8/include/libplatform/libplatform.h b/deps/v8/include/libplatform/libplatform.h index 9ec60c04f9cce6..6a34f4324106c6 100644 --- a/deps/v8/include/libplatform/libplatform.h +++ b/deps/v8/include/libplatform/libplatform.h @@ -23,6 +23,8 @@ enum class MessageLoopBehavior : bool { kWaitForWork = true }; +enum class PriorityMode : bool { kDontApply, kApply }; + /** * Returns a new instance of the default v8::Platform implementation. * @@ -35,13 +37,17 @@ enum class MessageLoopBehavior : bool { * calling v8::platform::RunIdleTasks to process the idle tasks. * If |tracing_controller| is nullptr, the default platform will create a * v8::platform::TracingController instance and use it. + * If |priority_mode| is PriorityMode::kApply, the default platform will use + * multiple task queues executed by threads different system-level priorities + * (where available) to schedule tasks. */ V8_PLATFORM_EXPORT std::unique_ptr NewDefaultPlatform( int thread_pool_size = 0, IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled, InProcessStackDumping in_process_stack_dumping = InProcessStackDumping::kDisabled, - std::unique_ptr tracing_controller = {}); + std::unique_ptr tracing_controller = {}, + PriorityMode priority_mode = PriorityMode::kDontApply); /** * The same as NewDefaultPlatform but disables the worker thread pool. diff --git a/deps/v8/include/v8-callbacks.h b/deps/v8/include/v8-callbacks.h index f0fa561a3d76fb..2a25b9ee04e003 100644 --- a/deps/v8/include/v8-callbacks.h +++ b/deps/v8/include/v8-callbacks.h @@ -147,14 +147,18 @@ using JitCodeEventHandler = void (*)(const JitCodeEvent* event); * the callback functions, you therefore cannot manipulate objects (set or * delete properties for example) since it is possible such operations will * result in the allocation of objects. + * TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink. */ enum GCType { kGCTypeScavenge = 1 << 0, - kGCTypeMinorMarkCompact = 1 << 1, + kGCTypeMinorMarkSweep = 1 << 1, + kGCTypeMinorMarkCompact V8_DEPRECATE_SOON( + "Use kGCTypeMinorMarkSweep instead of kGCTypeMinorMarkCompact.") = + kGCTypeMinorMarkSweep, kGCTypeMarkSweepCompact = 1 << 2, kGCTypeIncrementalMarking = 1 << 3, kGCTypeProcessWeakCallbacks = 1 << 4, - kGCTypeAll = kGCTypeScavenge | kGCTypeMinorMarkCompact | + kGCTypeAll = kGCTypeScavenge | kGCTypeMinorMarkSweep | kGCTypeMarkSweepCompact | kGCTypeIncrementalMarking | kGCTypeProcessWeakCallbacks }; @@ -323,20 +327,21 @@ using WasmAsyncResolvePromiseCallback = void (*)( using WasmLoadSourceMapCallback = Local (*)(Isolate* isolate, const char* name); -// --- Callback for checking if WebAssembly Simd is enabled --- -using WasmSimdEnabledCallback = bool (*)(Local context); - -// --- Callback for checking if WebAssembly exceptions are enabled --- -using WasmExceptionsEnabledCallback = bool (*)(Local context); - // --- Callback for checking if WebAssembly GC is enabled --- // If the callback returns true, it will also enable Wasm stringrefs. using WasmGCEnabledCallback = bool (*)(Local context); +// --- Callback for checking if WebAssembly imported strings are enabled --- +using WasmImportedStringsEnabledCallback = bool (*)(Local context); + // --- Callback for checking if the SharedArrayBuffer constructor is enabled --- using SharedArrayBufferConstructorEnabledCallback = bool (*)(Local context); +// --- Callback for checking if the compile hints magic comments are enabled --- +using JavaScriptCompileHintsMagicEnabledCallback = + bool (*)(Local context); + /** * HostImportModuleDynamicallyCallback is called when we * require the embedder to load a module. This is used as part of the dynamic @@ -419,6 +424,45 @@ using PrepareStackTraceCallback = MaybeLocal (*)(Local context, Local error, Local sites); +#if defined(V8_OS_WIN) +/** + * Callback to selectively enable ETW tracing based on the document URL. + * Implemented by the embedder, it should never call back into V8. + * + * Windows allows passing additional data to the ETW EnableCallback: + * https://learn.microsoft.com/en-us/windows/win32/api/evntprov/nc-evntprov-penablecallback + * + * This data can be configured in a WPR (Windows Performance Recorder) + * profile, adding a CustomFilter to an EventProvider like the following: + * + * + * + * + * + * Where: + * - Name="57277741-3638-4A4B-BDBA-0AC6E45DA56C" is the GUID of the V8 + * ETW provider, (see src/libplatform/etw/etw-provider-win.h), + * - Type="0x80000000" is EVENT_FILTER_TYPE_SCHEMATIZED, + * - Value="AQABAAAAAA..." is a base64-encoded byte array that is + * base64-decoded by Windows and passed to the ETW enable callback in + * the 'PEVENT_FILTER_DESCRIPTOR FilterData' argument; see: + * https://learn.microsoft.com/en-us/windows/win32/api/evntprov/ns-evntprov-event_filter_descriptor. + * + * This array contains a struct EVENT_FILTER_HEADER followed by a + * variable length payload, and as payload we pass a string in JSON format, + * with a list of regular expressions that should match the document URL + * in order to enable ETW tracing: + * { + * "version": "1.0", + * "filtered_urls": [ + * "https:\/\/.*\.chromium\.org\/.*", "https://v8.dev/";, "..." + * ] + * } + */ +using FilterETWSessionByURLCallback = + bool (*)(Local context, const std::string& etw_filter_payload); +#endif // V8_OS_WIN + } // namespace v8 #endif // INCLUDE_V8_ISOLATE_CALLBACKS_H_ diff --git a/deps/v8/include/v8-context.h b/deps/v8/include/v8-context.h index 3589caabd4b7c1..50c7e6f494ce36 100644 --- a/deps/v8/include/v8-context.h +++ b/deps/v8/include/v8-context.h @@ -395,7 +395,7 @@ Local Context::GetEmbedderData(int index) { #ifndef V8_ENABLE_CHECKS using A = internal::Address; using I = internal::Internals; - A ctx = *reinterpret_cast(this); + A ctx = internal::ValueHelper::ValueAsAddress(this); A embedder_data = I::ReadTaggedPointerField(ctx, I::kNativeContextEmbedderDataOffset); int value_offset = @@ -407,15 +407,9 @@ Local Context::GetEmbedderData(int index) { value = I::DecompressTaggedField(embedder_data, static_cast(value)); #endif -#ifdef V8_ENABLE_CONSERVATIVE_STACK_SCANNING - return Local(reinterpret_cast(value)); -#else - internal::Isolate* isolate = internal::IsolateFromNeverReadOnlySpaceObject( - *reinterpret_cast(this)); - A* result = HandleScope::CreateHandle(isolate, value); - return Local(reinterpret_cast(result)); -#endif - + auto isolate = reinterpret_cast( + internal::IsolateFromNeverReadOnlySpaceObject(ctx)); + return Local::New(isolate, value); #else return SlowGetEmbedderData(index); #endif @@ -442,9 +436,12 @@ void* Context::GetAlignedPointerFromEmbedderData(int index) { template MaybeLocal Context::GetDataFromSnapshotOnce(size_t index) { - T* data = reinterpret_cast(GetDataFromSnapshotOnce(index)); - if (data) internal::PerformCastCheck(data); - return Local(data); + auto slot = GetDataFromSnapshotOnce(index); + if (slot) { + internal::PerformCastCheck( + internal::ValueHelper::SlotAsValue(slot)); + } + return Local::FromSlot(slot); } Context* Context::Cast(v8::Data* data) { diff --git a/deps/v8/include/v8-embedder-heap.h b/deps/v8/include/v8-embedder-heap.h index 9e2e3ef58c4341..c37dadf7a39d55 100644 --- a/deps/v8/include/v8-embedder-heap.h +++ b/deps/v8/include/v8-embedder-heap.h @@ -34,6 +34,8 @@ class V8_EXPORT EmbedderRootsHandler { * for retaining the object. The embedder may use |WrapperClassId()| to * distinguish cases where it wants handles to be treated as roots from not * being treated as roots. + * + * The concrete implementations must be thread-safe. */ virtual bool IsRoot(const v8::TracedReference& handle) = 0; @@ -47,6 +49,16 @@ class V8_EXPORT EmbedderRootsHandler { * handle via the object or class id. */ virtual void ResetRoot(const v8::TracedReference& handle) = 0; + + /** + * Similar to |ResetRoot()|, but opportunistic. The function is called in + * parallel for different handles and as such must be thread-safe. In case, + * |false| is returned, |ResetRoot()| will be recalled for the same handle. + */ + virtual bool TryResetRoot(const v8::TracedReference& handle) { + ResetRoot(handle); + return true; + } }; } // namespace v8 diff --git a/deps/v8/include/v8-fast-api-calls.h b/deps/v8/include/v8-fast-api-calls.h index 0fe7cd2489b05e..e40f1068faba99 100644 --- a/deps/v8/include/v8-fast-api-calls.h +++ b/deps/v8/include/v8-fast-api-calls.h @@ -388,13 +388,19 @@ struct FastOneByteString { class V8_EXPORT CFunctionInfo { public: + enum class Int64Representation : uint8_t { + kNumber = 0, // Use numbers to represent 64 bit integers. + kBigInt = 1, // Use BigInts to represent 64 bit integers. + }; + // Construct a struct to hold a CFunction's type information. // |return_info| describes the function's return type. // |arg_info| is an array of |arg_count| CTypeInfos describing the // arguments. Only the last argument may be of the special type // CTypeInfo::kCallbackOptionsType. CFunctionInfo(const CTypeInfo& return_info, unsigned int arg_count, - const CTypeInfo* arg_info); + const CTypeInfo* arg_info, + Int64Representation repr = Int64Representation::kNumber); const CTypeInfo& ReturnInfo() const { return return_info_; } @@ -404,6 +410,8 @@ class V8_EXPORT CFunctionInfo { return HasOptions() ? arg_count_ - 1 : arg_count_; } + Int64Representation GetInt64Representation() const { return repr_; } + // |index| must be less than ArgumentCount(). // Note: if the last argument passed on construction of CFunctionInfo // has type CTypeInfo::kCallbackOptionsType, it is not included in @@ -418,6 +426,7 @@ class V8_EXPORT CFunctionInfo { private: const CTypeInfo return_info_; + const Int64Representation repr_; const unsigned int arg_count_; const CTypeInfo* arg_info_; }; @@ -469,6 +478,9 @@ class V8_EXPORT CFunction { unsigned int ArgumentCount() const { return type_info_->ArgumentCount(); } const void* GetAddress() const { return address_; } + CFunctionInfo::Int64Representation GetInt64Representation() const { + return type_info_->GetInt64Representation(); + } const CFunctionInfo* GetTypeInfo() const { return type_info_; } enum class OverloadResolution { kImpossible, kAtRuntime, kAtCompileTime }; @@ -598,7 +610,8 @@ struct count template struct count : count {}; -template +template class CFunctionInfoImpl : public CFunctionInfo { static constexpr int kOptionsArgCount = count(); @@ -613,18 +626,20 @@ class CFunctionInfoImpl : public CFunctionInfo { public: constexpr CFunctionInfoImpl() : CFunctionInfo(RetBuilder::Build(), sizeof...(ArgBuilders), - arg_info_storage_), + arg_info_storage_, Representation), arg_info_storage_{ArgBuilders::Build()...} { constexpr CTypeInfo::Type kReturnType = RetBuilder::Build().GetType(); static_assert(kReturnType == CTypeInfo::Type::kVoid || kReturnType == CTypeInfo::Type::kBool || kReturnType == CTypeInfo::Type::kInt32 || kReturnType == CTypeInfo::Type::kUint32 || + kReturnType == CTypeInfo::Type::kInt64 || + kReturnType == CTypeInfo::Type::kUint64 || kReturnType == CTypeInfo::Type::kFloat32 || kReturnType == CTypeInfo::Type::kFloat64 || kReturnType == CTypeInfo::Type::kPointer || kReturnType == CTypeInfo::Type::kAny, - "64-bit int, string and api object values are not currently " + "String and api object values are not currently " "supported return types."); } @@ -845,8 +860,11 @@ class CFunctionBuilderWithFunction { return *this; } + template auto Build() { - static CFunctionInfoImpl instance; + static CFunctionInfoImpl + instance; return CFunction(fn_, &instance); } diff --git a/deps/v8/include/v8-function-callback.h b/deps/v8/include/v8-function-callback.h index 60ecca1fd2a34f..17b37cdda1e817 100644 --- a/deps/v8/include/v8-function-callback.h +++ b/deps/v8/include/v8-function-callback.h @@ -78,7 +78,6 @@ class ReturnValue { // See FunctionCallbackInfo. static constexpr int kIsolateValueIndex = -2; - static constexpr int kDefaultValueValueIndex = -1; internal::Address* value_; }; @@ -127,16 +126,16 @@ class FunctionCallbackInfo { friend class internal::FunctionCallbackArguments; friend class internal::CustomArguments; friend class debug::ConsoleCallArguments; - friend class internal::Builtins; + static constexpr int kHolderIndex = 0; static constexpr int kIsolateIndex = 1; - static constexpr int kReturnValueDefaultValueIndex = 2; + static constexpr int kUnusedIndex = 2; static constexpr int kReturnValueIndex = 3; static constexpr int kDataIndex = 4; static constexpr int kNewTargetIndex = 5; - static constexpr int kArgsLength = 6; - static constexpr int kArgsLengthWithReceiver = 7; + + static constexpr int kArgsLengthWithReceiver = kArgsLength + 1; // Codegen constants: static constexpr int kSize = 3 * internal::kApiSystemPointerSize; @@ -147,8 +146,6 @@ class FunctionCallbackInfo { kValuesOffset + internal::kApiSystemPointerSize; static constexpr int kThisValuesIndex = -1; - static_assert(ReturnValue::kDefaultValueValueIndex == - kReturnValueDefaultValueIndex - kReturnValueIndex); static_assert(ReturnValue::kIsolateValueIndex == kIsolateIndex - kReturnValueIndex); @@ -258,17 +255,17 @@ class PropertyCallbackInfo { static constexpr int kShouldThrowOnErrorIndex = 0; static constexpr int kHolderIndex = 1; static constexpr int kIsolateIndex = 2; - static constexpr int kReturnValueDefaultValueIndex = 3; + static constexpr int kUnusedIndex = 3; static constexpr int kReturnValueIndex = 4; static constexpr int kDataIndex = 5; static constexpr int kThisIndex = 6; - static constexpr int kArgsLength = 7; static constexpr int kSize = 1 * internal::kApiSystemPointerSize; V8_INLINE explicit PropertyCallbackInfo(internal::Address* args) : args_(args) {} + internal::Address* args_; }; @@ -286,7 +283,7 @@ void ReturnValue::Set(const Global& handle) { if (V8_UNLIKELY(handle.IsEmpty())) { *value_ = GetDefaultValue(); } else { - *value_ = *reinterpret_cast(*handle); + *value_ = handle.ptr(); } } @@ -297,7 +294,7 @@ void ReturnValue::Set(const BasicTracedReference& handle) { if (V8_UNLIKELY(handle.IsEmpty())) { *value_ = GetDefaultValue(); } else { - *value_ = *reinterpret_cast(handle.val_); + *value_ = handle.ptr(); } } @@ -309,7 +306,7 @@ void ReturnValue::Set(const Local handle) { if (V8_UNLIKELY(handle.IsEmpty())) { *value_ = GetDefaultValue(); } else { - *value_ = internal::ValueHelper::ValueAsAddress(*handle); + *value_ = handle.ptr(); } } @@ -378,7 +375,6 @@ void ReturnValue::SetEmptyString() { template Isolate* ReturnValue::GetIsolate() const { - // Isolate is always the pointer below the default value on the stack. return *reinterpret_cast(&value_[kIsolateValueIndex]); } @@ -403,8 +399,8 @@ void ReturnValue::Set(S* whatever) { template internal::Address ReturnValue::GetDefaultValue() { - // Default value is always the pointer below value_ on the stack. - return value_[kDefaultValueValueIndex]; + using I = internal::Internals; + return I::GetRoot(GetIsolate(), I::kTheHoleValueRootIndex); } template diff --git a/deps/v8/include/v8-function.h b/deps/v8/include/v8-function.h index 1e35bfc8bfa272..30a9fcfe174acb 100644 --- a/deps/v8/include/v8-function.h +++ b/deps/v8/include/v8-function.h @@ -87,6 +87,12 @@ class V8_EXPORT Function : public Object { */ int GetScriptColumnNumber() const; + /** + * Returns zero based start position (character offset) of function body and + * kLineOffsetNotFound if no information available. + */ + int GetScriptStartPosition() const; + /** * Returns scriptId. */ diff --git a/deps/v8/include/v8-handle-base.h b/deps/v8/include/v8-handle-base.h new file mode 100644 index 00000000000000..d346a80de2a147 --- /dev/null +++ b/deps/v8/include/v8-handle-base.h @@ -0,0 +1,185 @@ +// Copyright 2023 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef INCLUDE_V8_HANDLE_BASE_H_ +#define INCLUDE_V8_HANDLE_BASE_H_ + +#include "v8-internal.h" // NOLINT(build/include_directory) + +namespace v8 { + +namespace internal { + +// Helper functions about values contained in handles. +// A value is either an indirect pointer or a direct pointer, depending on +// whether direct local support is enabled. +class ValueHelper final { + public: +#ifdef V8_ENABLE_DIRECT_LOCAL + static constexpr Address kTaggedNullAddress = 1; + static constexpr Address kEmpty = kTaggedNullAddress; +#else + static constexpr Address kEmpty = kNullAddress; +#endif // V8_ENABLE_DIRECT_LOCAL + + template + V8_INLINE static bool IsEmpty(T* value) { + return reinterpret_cast
(value) == kEmpty; + } + + // Returns a handle's "value" for all kinds of abstract handles. For Local, + // it is equivalent to `*handle`. The variadic parameters support handle + // types with extra type parameters, like `Persistent`. + template