diff --git a/common.gypi b/common.gypi index cbb8280a826c21..108788e98a3f2c 100644 --- a/common.gypi +++ b/common.gypi @@ -37,7 +37,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.15', + 'v8_embedder_string': '-node.9', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/.clang-format b/deps/v8/.clang-format index bd7d80dfb7b964..96a5eb602702d2 100644 --- a/deps/v8/.clang-format +++ b/deps/v8/.clang-format @@ -4,3 +4,6 @@ BasedOnStyle: Google DerivePointerAlignment: false MaxEmptyLinesToKeep: 1 IfMacros: ['IF', 'IF_NOT', 'ELSE', 'ELSE_IF'] +StatementMacros: + - DECL_CAST + - DECL_VERIFIER diff --git a/deps/v8/.clang-tidy b/deps/v8/.clang-tidy index 80e243c5a0ea37..f4796364697225 100644 --- a/deps/v8/.clang-tidy +++ b/deps/v8/.clang-tidy @@ -1,6 +1,7 @@ --- --- Checks: '-*, + bugprone-unique-ptr-array-mismatch, modernize-redundant-void-arg, modernize-replace-random-shuffle, modernize-shrink-to-fit, @@ -11,6 +12,7 @@ modernize-use-nullptr, modernize-use-override, # google-build-explicit-make-pair, + google-default-arguments, google-explicit-constructor, google-readability-casting' WarningsAsErrors: '' diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index f9f655b8b1b3d6..dbe1504e0931d8 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -129,3 +129,6 @@ bazel-v8 /third_party/zlib/contrib/tests /third_party/zlib/google/test !/third_party/ittapi +!/third_party/abseil-cpp +/third_party/abseil-cpp/.github +/third_party/abseil-cpp/ci diff --git a/deps/v8/.vpython3 b/deps/v8/.vpython3 index c4adffad12ea28..6afd6e51890055 100644 --- a/deps/v8/.vpython3 +++ b/deps/v8/.vpython3 @@ -96,3 +96,7 @@ wheel: < name: "infra/python/wheels/charset_normalizer-py3" version: "version:2.0.4" > +wheel: < + name: "infra/python/wheels/pyfakefs-py2_py3" + version: "version:3.7.2" +> \ No newline at end of file diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index 80aaead7f55fd6..2136b85df21be9 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -25,6 +25,7 @@ Code Aurora Forum <*@codeaurora.org> Home Jinni Inc. <*@homejinni.com> IBM Inc. <*@*.ibm.com> IBM Inc. <*@ibm.com> +Raptor Computing Systems, LLC <*@raptorcs.com> Red Hat Inc. <*@redhat.com> Samsung <*@*.samsung.com> Samsung <*@samsung.com> @@ -89,6 +90,7 @@ Chengzhong Wu Choongwoo Han Chris Nardi Christopher A. Taylor +Christopher Nady Colin Ihrig Cong Zuo Craig Schlenter @@ -134,6 +136,7 @@ Hannu Trey Harshal Nandigramwar Harshil Jain Henrique Ferreiro +Helmut Januschka Hirofumi Mako Hisham Muhammad Ho Cheung @@ -153,6 +156,7 @@ Jan de Mooij Janusz Majnert Javad Amiri Jay Freeman +Jeroen Bobbeldijk Jérôme Vouillon Jesper van den Ende Ji Qiu diff --git a/deps/v8/BUILD.bazel b/deps/v8/BUILD.bazel index b0cf80ede4226c..03ff0d8b3b0aca 100644 --- a/deps/v8/BUILD.bazel +++ b/deps/v8/BUILD.bazel @@ -42,12 +42,13 @@ load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression # v8_enable_conservative_stack_scanning # v8_enable_direct_handle # v8_enable_direct_local +# v8_enable_local_off_stack_check # v8_enable_ignition_dispatch_counting # v8_enable_builtins_optimization # v8_enable_builtins_profiling # v8_enable_builtins_profiling_verbose # v8_builtins_profiling_log_file -# v8_enable_external_code_space +# v8_enable_builtins_reordering # v8_postmortem_support # v8_use_siphash # v8_no_inline @@ -148,6 +149,53 @@ v8_flag(name = "v8_enable_verify_predictable") v8_flag(name = "v8_enable_test_features") +v8_flag( + name = "v8_enable_maglev", + default = True, +) + +# Default setting for v8_enable_maglev +selects.config_setting_group( + name = "maglev_by_default", + match_any = [ + "@v8//bazel/config:v8_target_x64", + "@v8//bazel/config:v8_target_arm64", + ], +) + +# Maglev enabled option. +selects.config_setting_group( + name = "enable_maglev", + match_all = [ + ":is_v8_enable_maglev", + ":maglev_by_default", + ], +) + +selects.config_setting_group( + name = "enable_maglev_x64", + match_all = [ + ":enable_maglev", + "@v8//bazel/config:v8_target_x64", + ], +) + +selects.config_setting_group( + name = "enable_maglev_arm64", + match_all = [ + ":enable_maglev", + "@v8//bazel/config:v8_target_arm64", + ], +) + +selects.config_setting_group( + name = "enable_maglev_arm", + match_all = [ + ":enable_maglev", + "@v8//bazel/config:v8_target_arm", + ], +) + v8_flag( name = "v8_enable_turbofan", default = True, @@ -258,6 +306,23 @@ selects.config_setting_group( ], ) +# Enable support for external code range relative to the pointer compression +# cage. +v8_flag( + name = "v8_enable_external_code_space", + default = True, +) + +# Enable support for external code range if enable_pointer_compression_shared_cage and +# v8_enable_external_code_space. +selects.config_setting_group( + name = "enable_external_code_space", + match_all = [ + ":enable_pointer_compression_shared_cage", + ":is_v8_enable_external_code_space", + ], +) + # We use a string flag to create a 3 value-logic. # If no explicit value for v8_enable_short_builtin_calls, we set it to 'none'. v8_string( @@ -363,6 +428,7 @@ v8_config( "GOOGLE3", "V8_ADVANCED_BIGINT_ALGORITHMS", "V8_CONCURRENT_MARKING", + "V8_ENABLE_SPARKPLUG", ] + select({ "@v8//bazel/config:is_debug": [ "DEBUG", @@ -443,6 +509,16 @@ v8_config( "V8_SHORT_BUILTIN_CALLS", ], "//conditions:default": [], + }) + select({ + ":enable_external_code_space": [ + "V8_EXTERNAL_CODE_SPACE", + ], + "//conditions:default": [], + }) + select({ + ":enable_maglev": [ + "V8_ENABLE_MAGLEV", + ], + "//conditions:default": [], }) + select({ ":is_v8_enable_test_features": [ "V8_ENABLE_ALLOCATION_TIMEOUT", @@ -622,6 +698,8 @@ filegroup( filegroup( name = "v8_libbase_files", srcs = [ + "src/base/abort-mode.cc", + "src/base/abort-mode.h", "src/base/address-region.h", "src/base/atomic-utils.h", "src/base/atomicops.h", @@ -644,6 +722,7 @@ filegroup( "src/base/discriminated-union.h", "src/base/division-by-constant.cc", "src/base/division-by-constant.h", + "src/base/doubly-threaded-list.h", "src/base/emulated-virtual-address-subspace.cc", "src/base/emulated-virtual-address-subspace.h", "src/base/enum-set.h", @@ -827,6 +906,7 @@ filegroup( "src/builtins/array-findindex.tq", "src/builtins/array-findlast.tq", "src/builtins/array-findlastindex.tq", + "src/builtins/array-flat.tq", "src/builtins/array-foreach.tq", "src/builtins/array-from.tq", "src/builtins/array-from-async.tq", @@ -936,6 +1016,7 @@ filegroup( "src/builtins/string-substring.tq", "src/builtins/string-towellformed.tq", "src/builtins/string-trim.tq", + "src/builtins/suppressed-error.tq", "src/builtins/symbol.tq", "src/builtins/torque-internal.tq", "src/builtins/typed-array.tq", @@ -1038,6 +1119,7 @@ filegroup( "third_party/v8/builtins/array-sort.tq", ] + select({ ":is_v8_enable_webassembly": [ + "src/builtins/js-to-js.tq", "src/builtins/js-to-wasm.tq", "src/builtins/wasm.tq", "src/builtins/wasm-strings.tq", @@ -1194,6 +1276,7 @@ filegroup( "src/builtins/accessors.cc", "src/builtins/accessors.h", "src/builtins/builtins.cc", + "src/builtins/builtins-inl.h", "src/builtins/builtins.h", "src/builtins/builtins-api.cc", "src/builtins/builtins-array.cc", @@ -1233,6 +1316,7 @@ filegroup( "src/builtins/builtins-weak-refs.cc", "src/builtins/constants-table-builder.cc", "src/builtins/constants-table-builder.h", + "src/builtins/data-view-ops.h", "src/builtins/profile-data-reader.h", "src/codegen/aligned-slot-allocator.cc", "src/codegen/aligned-slot-allocator.h", @@ -1475,6 +1559,7 @@ filegroup( "src/handles/shared-object-conveyor-handles.h", "src/handles/traced-handles.cc", "src/handles/traced-handles.h", + "src/handles/traced-handles-inl.h", "src/heap/allocation-observer.cc", "src/heap/allocation-observer.h", "src/heap/allocation-result.h", @@ -1488,15 +1573,14 @@ filegroup( "src/heap/basic-memory-chunk.h", "src/heap/code-range.cc", "src/heap/code-range.h", + "src/heap/trusted-range.cc", + "src/heap/trusted-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.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", @@ -1950,6 +2034,8 @@ filegroup( "src/objects/objects-inl.h", "src/objects/oddball.h", "src/objects/oddball-inl.h", + "src/objects/off-heap-hash-table.h", + "src/objects/off-heap-hash-table-inl.h", "src/objects/hole.h", "src/objects/trusted-object.h", "src/objects/trusted-object-inl.h", @@ -1978,6 +2064,7 @@ filegroup( "src/objects/prototype-info.h", "src/objects/prototype-info-inl.h", "src/objects/prototype-inl.h", + "src/objects/regexp-match-info.cc", "src/objects/regexp-match-info.h", "src/objects/regexp-match-info-inl.h", "src/objects/scope-info.cc", @@ -2205,14 +2292,17 @@ filegroup( "src/sandbox/code-pointer-table.cc", "src/sandbox/code-pointer-table.h", "src/sandbox/code-pointer-table-inl.h", - "src/sandbox/indirect-pointer-table.cc", - "src/sandbox/indirect-pointer-table.h", - "src/sandbox/indirect-pointer-table-inl.h", + "src/sandbox/trusted-pointer-table.cc", + "src/sandbox/trusted-pointer-table.h", + "src/sandbox/trusted-pointer-table-inl.h", "src/sandbox/code-pointer.h", "src/sandbox/code-pointer-inl.h", + "src/sandbox/isolate.h", + "src/sandbox/isolate-inl.h", "src/sandbox/indirect-pointer.h", "src/sandbox/indirect-pointer-tag.h", "src/sandbox/indirect-pointer-inl.h", + "src/sandbox/code-entrypoint-tag.h", "src/sandbox/external-entity-table.h", "src/sandbox/external-entity-table-inl.h", "src/sandbox/sandbox.cc", @@ -2380,7 +2470,7 @@ filegroup( "src/execution/ia32/frame-constants-ia32.h", "src/regexp/ia32/regexp-macro-assembler-ia32.cc", "src/regexp/ia32/regexp-macro-assembler-ia32.h", - "src/wasm/baseline/ia32/liftoff-assembler-ia32.h", + "src/wasm/baseline/ia32/liftoff-assembler-ia32-inl.h", ], "@v8//bazel/config:v8_target_x64": [ "src/baseline/x64/baseline-assembler-x64-inl.h", @@ -2407,7 +2497,7 @@ filegroup( "src/execution/x64/frame-constants-x64.h", "src/regexp/x64/regexp-macro-assembler-x64.cc", "src/regexp/x64/regexp-macro-assembler-x64.h", - "src/wasm/baseline/x64/liftoff-assembler-x64.h", + "src/wasm/baseline/x64/liftoff-assembler-x64-inl.h", ], "@v8//bazel/config:v8_target_arm": [ "src/baseline/arm/baseline-assembler-arm-inl.h", @@ -2433,7 +2523,7 @@ filegroup( "src/execution/arm/simulator-arm.h", "src/regexp/arm/regexp-macro-assembler-arm.cc", "src/regexp/arm/regexp-macro-assembler-arm.h", - "src/wasm/baseline/arm/liftoff-assembler-arm.h", + "src/wasm/baseline/arm/liftoff-assembler-arm-inl.h", ], "@v8//bazel/config:v8_target_arm64": [ "src/baseline/arm64/baseline-assembler-arm64-inl.h", @@ -2471,7 +2561,7 @@ filegroup( "src/execution/arm64/simulator-logic-arm64.cc", "src/regexp/arm64/regexp-macro-assembler-arm64.cc", "src/regexp/arm64/regexp-macro-assembler-arm64.h", - "src/wasm/baseline/arm64/liftoff-assembler-arm64.h", + "src/wasm/baseline/arm64/liftoff-assembler-arm64-inl.h", ], "@v8//bazel/config:v8_target_s390x": [ "src/baseline/s390/baseline-assembler-s390-inl.h", @@ -2497,32 +2587,51 @@ filegroup( "src/execution/s390/simulator-s390.h", "src/regexp/s390/regexp-macro-assembler-s390.cc", "src/regexp/s390/regexp-macro-assembler-s390.h", - "src/wasm/baseline/s390/liftoff-assembler-s390.h", + "src/wasm/baseline/s390/liftoff-assembler-s390-inl.h", ], "@v8//bazel/config:v8_target_riscv64": [ - "src/baseline/riscv64/baseline-assembler-riscv64-inl.h", - "src/baseline/riscv64/baseline-compiler-riscv64-inl.h", - "src/codegen/riscv64/assembler-riscv64.cc", - "src/codegen/riscv64/assembler-riscv64.h", - "src/codegen/riscv64/assembler-riscv64-inl.h", - "src/codegen/riscv64/constants-riscv64.cc", - "src/codegen/riscv64/constants-riscv64.h", - "src/codegen/riscv64/cpu-riscv64.cc", - "src/codegen/riscv64/interface-descriptors-riscv64-inl.h", - "src/codegen/riscv64/macro-assembler-riscv64.cc", - "src/codegen/riscv64/macro-assembler-riscv64.h", - "src/codegen/riscv64/register-riscv64.h", - "src/codegen/riscv64/reglist-riscv64.h", - "src/deoptimizer/riscv64/deoptimizer-riscv64.cc", - "src/diagnostics/riscv64/disasm-riscv64.cc", - "src/diagnostics/riscv64/unwinder-riscv64.cc", - "src/execution/riscv64/frame-constants-riscv64.cc", - "src/execution/riscv64/frame-constants-riscv64.h", - "src/execution/riscv64/simulator-riscv64.cc", - "src/execution/riscv64/simulator-riscv64.h", - "src/regexp/riscv64/regexp-macro-assembler-riscv64.cc", - "src/regexp/riscv64/regexp-macro-assembler-riscv64.h", - "src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h", + "src/baseline/riscv/baseline-assembler-riscv-inl.h", + "src/baseline/riscv/baseline-compiler-riscv-inl.h", + "src/codegen/riscv/assembler-riscv-inl.h", + "src/codegen/riscv/assembler-riscv.h", + "src/codegen/riscv/base-assembler-riscv.h", + "src/codegen/riscv/base-constants-riscv.h", + "src/codegen/riscv/base-riscv-i.h", + "src/codegen/riscv/constant-riscv-a.h", + "src/codegen/riscv/constant-riscv-b.h", + "src/codegen/riscv/constant-riscv-c.h", + "src/codegen/riscv/constant-riscv-d.h", + "src/codegen/riscv/constant-riscv-f.h", + "src/codegen/riscv/constant-riscv-m.h", + "src/codegen/riscv/constant-riscv-v.h", + "src/codegen/riscv/constant-riscv-zicsr.h", + "src/codegen/riscv/constant-riscv-zifencei.h", + "src/codegen/riscv/constants-riscv.h", + "src/codegen/riscv/extension-riscv-a.h", + "src/codegen/riscv/extension-riscv-b.h", + "src/codegen/riscv/extension-riscv-c.h", + "src/codegen/riscv/extension-riscv-d.h", + "src/codegen/riscv/extension-riscv-f.h", + "src/codegen/riscv/extension-riscv-inl.h", + "src/codegen/riscv/extension-riscv-m.h", + "src/codegen/riscv/extension-riscv-v.h", + "src/codegen/riscv/extension-riscv-zicsr.h", + "src/codegen/riscv/extension-riscv-zifencei.h", + "src/codegen/riscv/interface-descriptors-riscv-inl.h", + "src/codegen/riscv/macro-assembler-riscv.h", + "src/codegen/riscv/register-riscv.h", + "src/codegen/riscv/reglist-riscv.h", + "src/deoptimizer/riscv/deoptimizer-riscv.cc", + "src/diagnostics/riscv/disasm-riscv.cc", + "src/diagnostics/riscv/unwinder-riscv.cc", + "src/execution/riscv/frame-constants-riscv.cc", + "src/execution/riscv/frame-constants-riscv.h", + "src/execution/riscv/simulator-riscv.cc", + "src/execution/riscv/simulator-riscv.h", + "src/regexp/riscv/regexp-macro-assembler-riscv.cc", + "src/regexp/riscv/regexp-macro-assembler-riscv.h", + "src/wasm/baseline/riscv/liftoff-assembler-riscv-inl.h", + "src/wasm/baseline/riscv/liftoff-assembler-riscv64-inl.h", ], "@v8//bazel/config:v8_target_ppc64le": [ "src/baseline/ppc/baseline-assembler-ppc-inl.h", @@ -2548,7 +2657,7 @@ filegroup( "src/execution/ppc/simulator-ppc.h", "src/regexp/ppc/regexp-macro-assembler-ppc.cc", "src/regexp/ppc/regexp-macro-assembler-ppc.h", - "src/wasm/baseline/ppc/liftoff-assembler-ppc.h", + "src/wasm/baseline/ppc/liftoff-assembler-ppc-inl.h", ], }) + select({ # Only for x64 builds and for arm64 with x64 host simulator. @@ -2580,6 +2689,69 @@ filegroup( "src/diagnostics/unwinding-info-win64.h", ], "//conditions:default": [], + }) + select({ + ":enable_maglev": [ + "src/maglev/maglev-assembler-inl.h", + "src/maglev/maglev-assembler.h", + "src/maglev/maglev-basic-block.h", + "src/maglev/maglev-code-gen-state.h", + "src/maglev/maglev-code-generator.h", + "src/maglev/maglev-compilation-info.h", + "src/maglev/maglev-compilation-unit.h", + "src/maglev/maglev-compiler.h", + "src/maglev/maglev-concurrent-dispatcher.h", + "src/maglev/maglev-graph-builder.h", + "src/maglev/maglev-graph-labeller.h", + "src/maglev/maglev-graph-printer.h", + "src/maglev/maglev-graph-processor.h", + "src/maglev/maglev-graph-verifier.h", + "src/maglev/maglev-graph.h", + "src/maglev/maglev-interpreter-frame-state.h", + "src/maglev/maglev-ir-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", + "src/maglev/maglev-assembler.cc", + "src/maglev/maglev-code-generator.cc", + "src/maglev/maglev-compilation-info.cc", + "src/maglev/maglev-compilation-unit.cc", + "src/maglev/maglev-compiler.cc", + "src/maglev/maglev-concurrent-dispatcher.cc", + "src/maglev/maglev-graph-builder.cc", + "src/maglev/maglev-graph-printer.cc", + "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", + ], + "//conditions:default": [], + }) + select({ + ":enable_maglev_x64": [ + "src/maglev/x64/maglev-assembler-x64-inl.h", + "src/maglev/x64/maglev-assembler-x64.cc", + "src/maglev/x64/maglev-ir-x64.cc", + ], + "//conditions:default": [], + }) + select({ + ":enable_maglev_arm64": [ + "src/maglev/arm64/maglev-assembler-arm64-inl.h", + "src/maglev/arm64/maglev-assembler-arm64.cc", + "src/maglev/arm64/maglev-ir-arm64.cc", + ], + "//conditions:default": [], + }) + select({ + ":enable_maglev_arm": [ + "src/maglev/arm/maglev-assembler-arm-inl.h", + "src/maglev/arm/maglev-assembler-arm.cc", + "src/maglev/arm/maglev-ir-arm.cc", + ], + "//conditions:default": [], }) + select({ ":is_v8_enable_webassembly": [ "src/asmjs/asm-js.cc", @@ -2607,9 +2779,13 @@ filegroup( "src/wasm/baseline/liftoff-assembler.cc", "src/wasm/baseline/liftoff-assembler.h", "src/wasm/baseline/liftoff-assembler-defs.h", + "src/wasm/baseline/liftoff-assembler-inl.h", "src/wasm/baseline/liftoff-compiler.cc", "src/wasm/baseline/liftoff-compiler.h", "src/wasm/baseline/liftoff-register.h", + "src/wasm/baseline/parallel-move.cc", + "src/wasm/baseline/parallel-move.h", + "src/wasm/baseline/parallel-move-inl.h", "src/wasm/branch-hint-map.h", "src/wasm/canonical-types.cc", "src/wasm/canonical-types.h", @@ -2628,6 +2804,7 @@ filegroup( "src/wasm/function-compiler.h", "src/wasm/graph-builder-interface.cc", "src/wasm/graph-builder-interface.h", + "src/wasm/inlining-tree.h", "src/wasm/jump-table-assembler.cc", "src/wasm/jump-table-assembler.h", "src/wasm/leb-helper.h", @@ -2795,8 +2972,6 @@ filegroup( "src/compiler/backend/instruction-selector-impl.h", "src/compiler/backend/jump-threading.cc", "src/compiler/backend/jump-threading.h", - "src/compiler/backend/mid-tier-register-allocator.cc", - "src/compiler/backend/mid-tier-register-allocator.h", "src/compiler/backend/move-optimizer.cc", "src/compiler/backend/move-optimizer.h", "src/compiler/backend/register-allocation.h", @@ -2998,15 +3173,21 @@ filegroup( "src/compiler/string-builder-optimizer.h", "src/compiler/turbofan.h", "src/compiler/turbofan-enabled.cc", + "src/compiler/turboshaft/analyzer-iterator.cc", + "src/compiler/turboshaft/analyzer-iterator.h", "src/compiler/turboshaft/assembler.cc", "src/compiler/turboshaft/assembler.h", "src/compiler/turboshaft/assert-types-reducer.h", + "src/compiler/turboshaft/duplication-optimization-reducer.h", "src/compiler/turboshaft/branch-elimination-reducer.h", "src/compiler/turboshaft/build-graph-phase.cc", "src/compiler/turboshaft/build-graph-phase.h", "src/compiler/turboshaft/builtin-call-descriptors.h", - "src/compiler/turboshaft/dead-code-elimination-phase.cc", - "src/compiler/turboshaft/dead-code-elimination-phase.h", + "src/compiler/turboshaft/csa-optimize-phase.cc", + "src/compiler/turboshaft/csa-optimize-phase.h", + "src/compiler/turboshaft/dataview-reducer.h", + "src/compiler/turboshaft/code-elimination-and-simplification-phase.cc", + "src/compiler/turboshaft/code-elimination-and-simplification-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", @@ -3017,7 +3198,6 @@ filegroup( "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", @@ -3035,21 +3215,30 @@ filegroup( "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/load-store-simplification-reducer.h", + "src/compiler/turboshaft/loop-finder.cc", + "src/compiler/turboshaft/loop-finder.h", + "src/compiler/turboshaft/loop-peeling-phase.cc", + "src/compiler/turboshaft/loop-peeling-phase.h", + "src/compiler/turboshaft/loop-peeling-reducer.h", "src/compiler/turboshaft/loop-unrolling-phase.cc", "src/compiler/turboshaft/loop-unrolling-phase.h", "src/compiler/turboshaft/loop-unrolling-reducer.cc", "src/compiler/turboshaft/loop-unrolling-reducer.h", "src/compiler/turboshaft/machine-lowering-phase.cc", "src/compiler/turboshaft/machine-lowering-phase.h", - "src/compiler/turboshaft/machine-lowering-reducer.h", + "src/compiler/turboshaft/machine-lowering-reducer-inl.h", + "src/compiler/turboshaft/maglev-graph-building-phase.cc", + "src/compiler/turboshaft/maglev-graph-building-phase.h", "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/optimization-phase.cc", - "src/compiler/turboshaft/optimization-phase.h", + "src/compiler/turboshaft/opmasks.h", + "src/compiler/turboshaft/copying-phase.cc", + "src/compiler/turboshaft/copying-phase.h", "src/compiler/turboshaft/optimize-phase.cc", "src/compiler/turboshaft/optimize-phase.h", "src/compiler/turboshaft/phase.cc", @@ -3067,7 +3256,11 @@ filegroup( "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.cc", "src/compiler/turboshaft/sidetable.h", + "src/compiler/turboshaft/simplified-lowering-phase.cc", + "src/compiler/turboshaft/simplified-lowering-phase.h", + "src/compiler/turboshaft/simplified-lowering-reducer.h", "src/compiler/turboshaft/simplify-tf-loops.cc", "src/compiler/turboshaft/simplify-tf-loops.h", "src/compiler/turboshaft/snapshot-table.h", @@ -3158,10 +3351,10 @@ filegroup( "src/compiler/backend/s390/unwinding-info-writer-s390.h", ], "@v8//bazel/config:v8_target_riscv64": [ - "src/compiler/backend/riscv64/code-generator-riscv64.cc", - "src/compiler/backend/riscv64/instruction-codes-riscv64.h", - "src/compiler/backend/riscv64/instruction-scheduler-riscv64.cc", - "src/compiler/backend/riscv64/instruction-selector-riscv64.cc", + "src/compiler/backend/riscv/code-generator-riscv.cc", + "src/compiler/backend/riscv/instruction-codes-riscv.h", + "src/compiler/backend/riscv/instruction-scheduler-riscv.cc", + "src/compiler/backend/riscv/instruction-selector-riscv64.cc", ], "@v8//bazel/config:v8_target_ppc64le": [ "src/compiler/backend/ppc/code-generator-ppc.cc", @@ -3178,11 +3371,15 @@ filegroup( "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-assembler-helpers.h", "src/compiler/turboshaft/wasm-gc-optimize-phase.cc", "src/compiler/turboshaft/wasm-gc-optimize-phase.h", "src/compiler/turboshaft/wasm-gc-type-reducer.cc", "src/compiler/turboshaft/wasm-gc-type-reducer.h", + "src/compiler/turboshaft/wasm-load-elimination-reducer.h", + "src/compiler/turboshaft/wasm-lowering-phase.cc", + "src/compiler/turboshaft/wasm-lowering-phase.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", @@ -3277,6 +3474,7 @@ filegroup( "src/builtins/setup-builtins-internal.cc", "src/builtins/torque-csa-header-includes.h", "src/codegen/code-stub-assembler.cc", + "src/codegen/code-stub-assembler-inl.h", "src/codegen/code-stub-assembler.h", "src/heap/setup-heap-internal.cc", "src/ic/accessor-assembler.cc", @@ -3301,7 +3499,7 @@ filegroup( "@v8//bazel/config:v8_target_arm": ["src/builtins/arm/builtins-arm.cc"], "@v8//bazel/config:v8_target_arm64": ["src/builtins/arm64/builtins-arm64.cc"], "@v8//bazel/config:v8_target_s390x": ["src/builtins/s390/builtins-s390.cc"], - "@v8//bazel/config:v8_target_riscv64": ["src/builtins/riscv64/builtins-riscv64.cc"], + "@v8//bazel/config:v8_target_riscv64": ["src/builtins/riscv/builtins-riscv.cc"], "@v8//bazel/config:v8_target_ppc64le": ["src/builtins/ppc/builtins-ppc.cc"], }) + select({ ":is_v8_enable_webassembly": [ @@ -3309,6 +3507,32 @@ filegroup( "src/builtins/builtins-wasm-gen.h", ], "//conditions:default": [], + }) + select({ + # Turboshaft's Maglev graph builder needs some Maglev files. We only + # include them explicitely when Maglev is disabled. + ":enable_maglev": [], + "//conditions:default": [ + "src/maglev/maglev-basic-block.h", + "src/maglev/maglev-code-gen-state.h", + "src/maglev/maglev-compilation-info.cc", + "src/maglev/maglev-compilation-info.h", + "src/maglev/maglev-compilation-unit.cc", + "src/maglev/maglev-compilation-unit.h", + "src/maglev/maglev-graph-builder.cc", + "src/maglev/maglev-graph-builder.h", + "src/maglev/maglev-graph.h", + "src/maglev/maglev-graph-labeller.h", + "src/maglev/maglev-graph-printer.cc", + "src/maglev/maglev-graph-printer.h", + "src/maglev/maglev-graph-processor.h", + "src/maglev/maglev-graph-verifier.h", + "src/maglev/maglev-interpreter-frame-state.cc", + "src/maglev/maglev-interpreter-frame-state.h", + "src/maglev/maglev-ir.cc", + "src/maglev/maglev-ir.h", + "src/maglev/maglev-ir-inl.h", + "src/maglev/maglev-register-frame-array.h", + ], }), ) @@ -3940,6 +4164,9 @@ v8_library( deps = [ ":v8_libbase", "//external:base_trace_event_common", + "//external:absl_btree", + "//external:absl_flat_hash_map", + "//external:absl_flat_hash_set", ], ) diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 6e105c0657e676..133701b20ed9ba 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -196,7 +196,7 @@ declare_args() { # 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 + v8_enable_builtins_reordering = true # Provides the given V8 log file as an input to mksnapshot, where it can be # used for profile-guided optimization of builtins. @@ -366,6 +366,11 @@ declare_args() { # Allow for JS promise hooks (instead of just C++). v8_enable_javascript_promise_hooks = false + # Allow embedder data to be saved on continuations. Used to support + # TaskAttribution and `scheduler.yield()`. + # The flag enables disabling the feature, to test this data's overhead. + v8_enable_continuation_preserved_embedder_data = true + # Enable allocation folding globally (sets -dV8_ALLOCATION_FOLDING). # When it's disabled, the --turbo-allocation-folding runtime flag will be ignored. v8_enable_allocation_folding = true @@ -401,6 +406,10 @@ declare_args() { # applications yet so disable jit. v8_jitless = v8_enable_lite_mode || target_is_ios_device + # Enable Sparkplug + # Sets -DV8_ENABLE_SPARKPLUG. + v8_enable_sparkplug = "" + # Enable Maglev's graph printer. # Sets -DV8_ENABLE_MAGLEV_GRAPH_PRINTER. v8_enable_maglev_graph_printer = !build_with_chromium @@ -499,6 +508,9 @@ if (v8_enable_external_code_space == "") { v8_enable_pointer_compression_shared_cage && (v8_current_cpu == "x64" || v8_current_cpu == "arm64") } +if (v8_enable_sparkplug == "") { + v8_enable_sparkplug = !v8_jitless +} if (v8_enable_maglev == "") { v8_enable_maglev = v8_enable_turbofan && (v8_current_cpu == "arm" || v8_current_cpu == "x64" || @@ -507,9 +519,9 @@ if (v8_enable_maglev == "") { assert(v8_enable_turbofan || !v8_enable_maglev, "Maglev is not available when Turbofan is disabled.") -assert(!v8_jitless || - (!v8_enable_maglev && !v8_enable_turbofan && !v8_enable_webassembly), - "Maglev, Turbofan and Wasm are not available in jitless mode") +assert(!v8_jitless || (!v8_enable_sparkplug && !v8_enable_maglev && + !v8_enable_turbofan && !v8_enable_webassembly), + "Sparkplug, Maglev, Turbofan and Wasm are not available in jitless mode") if (v8_enable_single_generation == "") { v8_enable_single_generation = v8_disable_write_barriers @@ -711,6 +723,10 @@ if (v8_enable_single_generation == true) { assert(!v8_enable_snapshot_compression || v8_use_zlib, "Snapshot compression requires zlib") +if (v8_expose_public_symbols == "") { + v8_expose_public_symbols = v8_expose_symbols +} + v8_random_seed = "314159265" v8_toolset_for_shell = "host" @@ -728,7 +744,6 @@ config("internal_config_base") { ".", "include", "$target_gen_dir", - "$target_gen_dir/include", ] } @@ -746,6 +761,8 @@ config("internal_config") { ] if (is_component_build) { + defines += [ "BUILDING_V8_SHARED_PRIVATE" ] + } else if (v8_expose_public_symbols) { defines += [ "BUILDING_V8_SHARED" ] } @@ -784,7 +801,6 @@ config("libbase_config") { if (is_android && current_toolchain != host_toolchain) { libs += [ "log" ] } - include_dirs = [ "$target_gen_dir/include" ] } # Standalone cppgc cannot be built within chrome or with perfetto. @@ -808,10 +824,7 @@ config("headers_config") { ":v8_header_features", ":cppgc_header_features", ] - include_dirs = [ - "include", - "$target_gen_dir/include", - ] + include_dirs = [ "include" ] } # This config should only be applied to code using V8 and not any V8 code @@ -820,7 +833,10 @@ config("external_config") { configs = [ ":headers_config" ] defines = [] if (is_component_build) { - defines += [ "USING_V8_SHARED" ] + defines += [ + "USING_V8_SHARED", + "USING_V8_SHARED_PRIVATE", + ] } if (current_cpu == "riscv64" || current_cpu == "riscv32") { @@ -840,6 +856,8 @@ config("external_startup_data") { # List of defines that can appear in externally visible header files and that # are controlled by args.gn. +# Make sure the |v8_generate_features_json| action is also updated when adding +# or removing defines below. external_v8_defines = [ "V8_ENABLE_CHECKS", "V8_COMPRESS_POINTERS", @@ -850,7 +868,6 @@ external_v8_defines = [ "V8_ENABLE_SANDBOX", "V8_DEPRECATION_WARNINGS", "V8_IMMINENT_DEPRECATION_WARNINGS", - "V8_NO_ARGUMENTS_ADAPTOR", "V8_USE_PERFETTO", "V8_MAP_PACKING", "V8_IS_TSAN", @@ -1120,6 +1137,9 @@ config("features") { if (v8_enable_cet_shadow_stack) { defines += [ "V8_ENABLE_CET_SHADOW_STACK" ] } + if (v8_enable_cet_ibt) { + defines += [ "V8_ENABLE_CET_IBT" ] + } if (v8_enable_wasm_gdb_remote_debugging) { defines += [ "V8_ENABLE_WASM_GDB_REMOTE_DEBUGGING" ] } @@ -1135,6 +1155,9 @@ config("features") { if (v8_enable_external_code_space) { defines += [ "V8_EXTERNAL_CODE_SPACE" ] } + if (v8_enable_sparkplug) { + defines += [ "V8_ENABLE_SPARKPLUG" ] + } if (v8_enable_maglev) { defines += [ "V8_ENABLE_MAGLEV" ] } @@ -1165,6 +1188,9 @@ config("features") { if (v8_enable_javascript_promise_hooks) { defines += [ "V8_ENABLE_JAVASCRIPT_PROMISE_HOOKS" ] } + if (v8_enable_continuation_preserved_embedder_data) { + defines += [ "V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA" ] + } if (v8_enable_allocation_folding) { defines += [ "V8_ALLOCATION_FOLDING" ] } @@ -1216,6 +1242,9 @@ config("features") { if (v8_enable_extensible_ro_snapshot) { defines += [ "V8_ENABLE_EXTENSIBLE_RO_SNAPSHOT" ] } + if (v8_enable_local_off_stack_check) { + defines += [ "V8_ENABLE_LOCAL_OFF_STACK_CHECK" ] + } } config("toolchain") { @@ -1343,6 +1372,21 @@ config("toolchain") { } # Under simulator build, compiler will not provide __riscv_xlen. Define here + if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { + if (riscv_use_rvv || target_is_simulator) { + defines += [ "CAN_USE_RVV_INSTRUCTIONS" ] + defines += [ "RVV_VLEN=${riscv_rvv_vlen}" ] + } + if (riscv_use_zba || target_is_simulator) { + defines += [ "CAN_USE_ZBA_INSTRUCTIONS" ] + } + if (riscv_use_zbb || target_is_simulator) { + defines += [ "CAN_USE_ZBB_INSTRUCTIONS" ] + } + if (riscv_use_zbs || target_is_simulator) { + defines += [ "CAN_USE_ZBS_INSTRUCTIONS" ] + } + } if (v8_current_cpu == "riscv64") { defines += [ "V8_TARGET_ARCH_RISCV64" ] defines += [ "__riscv_xlen=64" ] @@ -1350,21 +1394,12 @@ config("toolchain") { if (!is_clang) { cflags += [ "-ffp-contract=off" ] } - if (riscv_use_rvv || target_is_simulator) { - defines += [ "CAN_USE_RVV_INSTRUCTIONS" ] - defines += [ "RVV_VLEN=${riscv_rvv_vlen}" ] - } } if (v8_current_cpu == "riscv32") { 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") { @@ -1417,16 +1452,13 @@ config("toolchain") { # TODO(infra): Support v8_enable_prof on Windows. # TODO(infra): Add support for compiling with simulators. - if (v8_enable_debugging_features) { - if ((is_linux || is_chromeos) && v8_enable_backtrace) { - ldflags += [ "-rdynamic" ] - } - } if (v8_enable_debugging_features || dcheck_always_on) { defines += [ "DEBUG" ] if (v8_enable_slow_dchecks) { defines += [ "ENABLE_SLOW_DCHECKS" ] } + } else { + defines += [ "NDEBUG" ] } if (v8_enable_verify_csa) { @@ -1744,7 +1776,7 @@ if (v8_postmortem_support) { script = "tools/gen-postmortem-metadata.py" # NOSORT - sources = [ + inputs = [ "$target_gen_dir/torque-generated/instance-types.h", "src/objects/allocation-site.h", "src/objects/allocation-site-inl.h", @@ -1830,7 +1862,7 @@ if (v8_postmortem_support) { outputs = [ "$target_gen_dir/debug-support.cc" ] args = rebase_path(outputs, root_build_dir) + - rebase_path(sources, root_build_dir) + rebase_path(inputs, root_build_dir) deps = [ ":run_torque" ] } @@ -1847,6 +1879,7 @@ torque_files = [ "src/builtins/array-findindex.tq", "src/builtins/array-findlast.tq", "src/builtins/array-findlastindex.tq", + "src/builtins/array-flat.tq", "src/builtins/array-foreach.tq", "src/builtins/array-from-async.tq", "src/builtins/array-from.tq", @@ -1957,6 +1990,7 @@ torque_files = [ "src/builtins/string-substring.tq", "src/builtins/string-towellformed.tq", "src/builtins/string-trim.tq", + "src/builtins/suppressed-error.tq", "src/builtins/symbol.tq", "src/builtins/torque-internal.tq", "src/builtins/typed-array-at.tq", @@ -2080,6 +2114,7 @@ if (v8_enable_i18n_support) { if (v8_enable_webassembly) { torque_files += [ + "src/builtins/js-to-js.tq", "src/builtins/js-to-wasm.tq", "src/builtins/wasm.tq", "src/builtins/wasm-strings.tq", @@ -2352,6 +2387,7 @@ template("run_mksnapshot") { "root_out_dir") + "/mksnapshot", root_build_dir), "--turbo_instruction_scheduling", + "--stress-turbo-late-spilling", # In cross builds, the snapshot may be generated for both the host and # target toolchains. The same host binary is used to generate both, so @@ -2649,6 +2685,7 @@ action("v8_dump_build_config") { "is_ios=$is_ios", "js_shared_memory=$js_shared_memory", "lite_mode=$v8_enable_lite_mode", + "local_off_stack_check=$v8_enable_local_off_stack_check", "mips_arch_variant=\"$mips_arch_variant_var\"", "mips_use_msa=$mips_use_msa_var", "msan=$is_msan", @@ -2676,6 +2713,46 @@ action("v8_dump_build_config") { ] } +# Generate a json file containing essential V8 build flags. +# This json file is consumed by embedders like Node.js and Electron to provide +# information for building third party modules. There is currently no exact +# rules on which build flags should be outputed in the json file, but anything +# affecting the |external_v8_defines| list must be listed here and added to +# the common.gypi file in Node.js repo. +generated_file("v8_generate_features_json") { + outputs = [ "$root_out_dir/v8_features.json" ] + output_conversion = "json" + contents = { + v8_deprecation_warnings = v8_deprecation_warnings + v8_enable_31bit_smis_on_64bit_arch = v8_enable_31bit_smis_on_64bit_arch + v8_enable_conservative_stack_scanning = + v8_enable_conservative_stack_scanning + v8_enable_direct_local = v8_enable_direct_local + v8_enable_extensible_ro_snapshot = v8_enable_extensible_ro_snapshot + v8_enable_gdbjit = v8_enable_gdbjit + v8_enable_hugepage = v8_enable_hugepage + v8_enable_i18n_support = v8_enable_i18n_support + v8_enable_javascript_promise_hooks = v8_enable_javascript_promise_hooks + v8_enable_lite_mode = v8_enable_lite_mode + v8_enable_map_packing = v8_enable_map_packing + v8_enable_object_print = v8_enable_object_print + v8_enable_pointer_compression = v8_enable_pointer_compression + v8_enable_pointer_compression_shared_cage = + v8_enable_pointer_compression_shared_cage + v8_enable_sandbox = v8_enable_sandbox + v8_enable_shared_ro_heap = v8_enable_shared_ro_heap + v8_enable_short_builtin_calls = v8_enable_short_builtin_calls + v8_enable_v8_checks = v8_enable_v8_checks + v8_enable_webassembly = v8_enable_webassembly + v8_enable_zone_compression = v8_enable_zone_compression + v8_imminent_deprecation_warnings = v8_imminent_deprecation_warnings + v8_optimized_debug = v8_optimized_debug + v8_random_seed = v8_random_seed + v8_use_perfetto = v8_use_perfetto + v8_use_siphash = v8_use_siphash + } +} + ############################################################################### # Source Sets (aka static libraries) # @@ -2798,6 +2875,7 @@ v8_source_set("v8_initializers") { "src/builtins/profile-data-reader.h", "src/builtins/setup-builtins-internal.cc", "src/builtins/torque-csa-header-includes.h", + "src/codegen/code-stub-assembler-inl.h", "src/codegen/code-stub-assembler.cc", "src/codegen/code-stub-assembler.h", "src/heap/setup-heap-internal.cc", @@ -3085,6 +3163,8 @@ v8_header_set("v8_flags") { v8_header_set("v8_internal_headers") { configs = [ ":internal_config" ] + public_configs = [ "src/inspector:inspector_config" ] + sources = [ ### gcmole(all) ### "$target_gen_dir/builtins-generated/bytecodes-builtins-list.h", @@ -3112,21 +3192,19 @@ v8_header_set("v8_internal_headers") { "src/ast/scopes.h", "src/ast/source-range-ast-visitor.h", "src/ast/variables.h", - "src/baseline/baseline-assembler-inl.h", - "src/baseline/baseline-assembler.h", - "src/baseline/baseline-batch-compiler.h", - "src/baseline/baseline-compiler.h", "src/baseline/baseline.h", "src/baseline/bytecode-offset-iterator.h", "src/builtins/accessors.h", "src/builtins/builtins-constructor.h", "src/builtins/builtins-definitions.h", "src/builtins/builtins-descriptors.h", + "src/builtins/builtins-inl.h", "src/builtins/builtins-promise.h", "src/builtins/builtins-utils-inl.h", "src/builtins/builtins-utils.h", "src/builtins/builtins.h", "src/builtins/constants-table-builder.h", + "src/builtins/data-view-ops.h", "src/builtins/profile-data-reader.h", "src/codegen/aligned-slot-allocator.h", "src/codegen/assembler-arch.h", @@ -3207,7 +3285,6 @@ v8_header_set("v8_internal_headers") { "src/compiler/backend/instruction-selector.h", "src/compiler/backend/instruction.h", "src/compiler/backend/jump-threading.h", - "src/compiler/backend/mid-tier-register-allocator.h", "src/compiler/backend/move-optimizer.h", "src/compiler/backend/register-allocation.h", "src/compiler/backend/register-allocator-verifier.h", @@ -3315,12 +3392,16 @@ v8_header_set("v8_internal_headers") { "src/compiler/store-store-elimination.h", "src/compiler/string-builder-optimizer.h", "src/compiler/turbofan.h", + "src/compiler/turboshaft/analyzer-iterator.h", "src/compiler/turboshaft/assembler.h", "src/compiler/turboshaft/assert-types-reducer.h", "src/compiler/turboshaft/branch-elimination-reducer.h", "src/compiler/turboshaft/build-graph-phase.h", "src/compiler/turboshaft/builtin-call-descriptors.h", - "src/compiler/turboshaft/dead-code-elimination-phase.h", + "src/compiler/turboshaft/code-elimination-and-simplification-phase.h", + "src/compiler/turboshaft/copying-phase.h", + "src/compiler/turboshaft/csa-optimize-phase.h", + "src/compiler/turboshaft/dataview-reducer.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", @@ -3328,7 +3409,7 @@ v8_header_set("v8_internal_headers") { "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/duplication-optimization-reducer.h", "src/compiler/turboshaft/explicit-truncation-reducer.h", "src/compiler/turboshaft/fast-api-call-reducer.h", "src/compiler/turboshaft/fast-hash.h", @@ -3340,15 +3421,20 @@ v8_header_set("v8_internal_headers") { "src/compiler/turboshaft/late-escape-analysis-reducer.h", "src/compiler/turboshaft/late-load-elimination-reducer.h", "src/compiler/turboshaft/layered-hash-map.h", + "src/compiler/turboshaft/load-store-simplification-reducer.h", + "src/compiler/turboshaft/loop-finder.h", + "src/compiler/turboshaft/loop-peeling-phase.h", + "src/compiler/turboshaft/loop-peeling-reducer.h", "src/compiler/turboshaft/loop-unrolling-phase.h", "src/compiler/turboshaft/loop-unrolling-reducer.h", "src/compiler/turboshaft/machine-lowering-phase.h", - "src/compiler/turboshaft/machine-lowering-reducer.h", + "src/compiler/turboshaft/machine-lowering-reducer-inl.h", "src/compiler/turboshaft/machine-optimization-reducer.h", + "src/compiler/turboshaft/maglev-graph-building-phase.h", "src/compiler/turboshaft/memory-optimization-reducer.h", "src/compiler/turboshaft/operation-matcher.h", "src/compiler/turboshaft/operations.h", - "src/compiler/turboshaft/optimization-phase.h", + "src/compiler/turboshaft/opmasks.h", "src/compiler/turboshaft/optimize-phase.h", "src/compiler/turboshaft/phase.h", "src/compiler/turboshaft/pretenuring-propagation-reducer.h", @@ -3361,6 +3447,8 @@ v8_header_set("v8_internal_headers") { "src/compiler/turboshaft/runtime-call-descriptors.h", "src/compiler/turboshaft/select-lowering-reducer.h", "src/compiler/turboshaft/sidetable.h", + "src/compiler/turboshaft/simplified-lowering-phase.h", + "src/compiler/turboshaft/simplified-lowering-reducer.h", "src/compiler/turboshaft/simplify-tf-loops.h", "src/compiler/turboshaft/snapshot-table-opindex.h", "src/compiler/turboshaft/snapshot-table.h", @@ -3475,6 +3563,7 @@ v8_header_set("v8_internal_headers") { "src/handles/maybe-handles.h", "src/handles/persistent-handles.h", "src/handles/shared-object-conveyor-handles.h", + "src/handles/traced-handles-inl.h", "src/handles/traced-handles.h", "src/heap/allocation-observer.h", "src/heap/allocation-result.h", @@ -3486,8 +3575,6 @@ v8_header_set("v8_internal_headers") { "src/heap/code-stats.h", "src/heap/collection-barrier.h", "src/heap/combined-heap.h", - "src/heap/concurrent-allocator-inl.h", - "src/heap/concurrent-allocator.h", "src/heap/concurrent-marking.h", "src/heap/cppgc-js/cpp-heap.h", "src/heap/cppgc-js/cpp-marking-state-inl.h", @@ -3591,6 +3678,7 @@ v8_header_set("v8_internal_headers") { "src/heap/spaces.h", "src/heap/sweeper.h", "src/heap/traced-handles-marking-visitor.h", + "src/heap/trusted-range.h", "src/heap/weak-object-worklists.h", "src/heap/young-generation-marking-visitor-inl.h", "src/heap/young-generation-marking-visitor.h", @@ -3792,6 +3880,8 @@ v8_header_set("v8_internal_headers") { "src/objects/objects.h", "src/objects/oddball-inl.h", "src/objects/oddball.h", + "src/objects/off-heap-hash-table-inl.h", + "src/objects/off-heap-hash-table.h", "src/objects/option-utils.h", "src/objects/ordered-hash-table-inl.h", "src/objects/ordered-hash-table.h", @@ -3937,6 +4027,7 @@ v8_header_set("v8_internal_headers") { "src/runtime/runtime.h", "src/sandbox/bounded-size-inl.h", "src/sandbox/bounded-size.h", + "src/sandbox/code-entrypoint-tag.h", "src/sandbox/code-pointer-inl.h", "src/sandbox/code-pointer-table-inl.h", "src/sandbox/code-pointer-table.h", @@ -3948,14 +4039,16 @@ v8_header_set("v8_internal_headers") { "src/sandbox/external-pointer-table.h", "src/sandbox/external-pointer.h", "src/sandbox/indirect-pointer-inl.h", - "src/sandbox/indirect-pointer-table-inl.h", - "src/sandbox/indirect-pointer-table.h", "src/sandbox/indirect-pointer-tag.h", "src/sandbox/indirect-pointer.h", + "src/sandbox/isolate-inl.h", + "src/sandbox/isolate.h", "src/sandbox/sandbox.h", "src/sandbox/sandboxed-pointer-inl.h", "src/sandbox/sandboxed-pointer.h", "src/sandbox/testing.h", + "src/sandbox/trusted-pointer-table-inl.h", + "src/sandbox/trusted-pointer-table.h", "src/snapshot/code-serializer.h", "src/snapshot/context-deserializer.h", "src/snapshot/context-serializer.h", @@ -4045,6 +4138,15 @@ v8_header_set("v8_internal_headers") { sources -= [ "//base/trace_event/common/trace_event_common.h" ] } + if (v8_enable_sparkplug) { + sources += [ + "src/baseline/baseline-assembler-inl.h", + "src/baseline/baseline-assembler.h", + "src/baseline/baseline-batch-compiler.h", + "src/baseline/baseline-compiler.h", + ] + } + if (v8_enable_maglev) { sources += [ "src/maglev/maglev-assembler-inl.h", @@ -4091,9 +4193,12 @@ v8_header_set("v8_internal_headers") { "src/compiler/int64-lowering.h", "src/compiler/turboshaft/int64-lowering-phase.h", "src/compiler/turboshaft/int64-lowering-reducer.h", + "src/compiler/turboshaft/wasm-assembler-helpers.h", "src/compiler/turboshaft/wasm-gc-optimize-phase.h", "src/compiler/turboshaft/wasm-gc-type-reducer.h", "src/compiler/turboshaft/wasm-js-lowering-reducer.h", + "src/compiler/turboshaft/wasm-load-elimination-reducer.h", + "src/compiler/turboshaft/wasm-lowering-phase.h", "src/compiler/turboshaft/wasm-lowering-reducer.h", "src/compiler/turboshaft/wasm-optimize-phase.h", "src/compiler/turboshaft/wasm-turboshaft-compiler.h", @@ -4117,9 +4222,12 @@ v8_header_set("v8_internal_headers") { "src/trap-handler/trap-handler-internal.h", "src/trap-handler/trap-handler.h", "src/wasm/baseline/liftoff-assembler-defs.h", + "src/wasm/baseline/liftoff-assembler-inl.h", "src/wasm/baseline/liftoff-assembler.h", "src/wasm/baseline/liftoff-compiler.h", "src/wasm/baseline/liftoff-register.h", + "src/wasm/baseline/parallel-move-inl.h", + "src/wasm/baseline/parallel-move.h", "src/wasm/canonical-types.h", "src/wasm/code-space-access.h", "src/wasm/compilation-environment.h", @@ -4130,6 +4238,7 @@ v8_header_set("v8_internal_headers") { "src/wasm/function-body-decoder.h", "src/wasm/function-compiler.h", "src/wasm/graph-builder-interface.h", + "src/wasm/inlining-tree.h", "src/wasm/jump-table-assembler.h", "src/wasm/leb-helper.h", "src/wasm/local-decl-encoder.h", @@ -4185,6 +4294,8 @@ v8_header_set("v8_internal_headers") { sources += [ "src/compiler/linear-scheduler.h", "src/compiler/revectorizer.h", + "src/compiler/turboshaft/wasm-revec-phase.h", + "src/compiler/turboshaft/wasm-revec-reducer.h", ] } @@ -4266,13 +4377,17 @@ v8_header_set("v8_internal_headers") { "src/compiler/backend/ia32/instruction-codes-ia32.h", "src/execution/ia32/frame-constants-ia32.h", "src/regexp/ia32/regexp-macro-assembler-ia32.h", - "src/wasm/baseline/ia32/liftoff-assembler-ia32.h", + "src/wasm/baseline/ia32/liftoff-assembler-ia32-inl.h", ] + if (v8_enable_sparkplug) { + sources += [ + "src/baseline/ia32/baseline-assembler-ia32-inl.h", + "src/baseline/ia32/baseline-compiler-ia32-inl.h", + ] + } } else if (v8_current_cpu == "x64") { sources += [ ### gcmole(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/x64/assembler-x64-inl.h", "src/codegen/x64/assembler-x64.h", @@ -4288,13 +4403,20 @@ v8_header_set("v8_internal_headers") { "src/execution/x64/frame-constants-x64.h", "src/regexp/x64/regexp-macro-assembler-x64.h", "src/third_party/valgrind/valgrind.h", - "src/wasm/baseline/x64/liftoff-assembler-x64.h", + "src/wasm/baseline/x64/liftoff-assembler-x64-inl.h", ] if (is_win) { sources += [ "src/diagnostics/unwinding-info-win64.h" ] } + if (v8_enable_sparkplug) { + sources += [ + "src/baseline/x64/baseline-assembler-x64-inl.h", + "src/baseline/x64/baseline-compiler-x64-inl.h", + ] + } + if (v8_enable_webassembly) { # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both # based on Darwin and thus POSIX-compliant to a similar degree. @@ -4308,8 +4430,6 @@ v8_header_set("v8_internal_headers") { } else if (v8_current_cpu == "arm") { sources += [ ### gcmole(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.h", "src/codegen/arm/constants-arm.h", @@ -4322,13 +4442,18 @@ v8_header_set("v8_internal_headers") { "src/execution/arm/frame-constants-arm.h", "src/execution/arm/simulator-arm.h", "src/regexp/arm/regexp-macro-assembler-arm.h", - "src/wasm/baseline/arm/liftoff-assembler-arm.h", + "src/wasm/baseline/arm/liftoff-assembler-arm-inl.h", ] + + if (v8_enable_sparkplug) { + sources += [ + "src/baseline/arm/baseline-assembler-arm-inl.h", + "src/baseline/arm/baseline-compiler-arm-inl.h", + ] + } } else if (v8_current_cpu == "arm64") { sources += [ ### gcmole(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.h", "src/codegen/arm64/constants-arm64.h", @@ -4347,11 +4472,17 @@ v8_header_set("v8_internal_headers") { "src/execution/arm64/frame-constants-arm64.h", "src/execution/arm64/simulator-arm64.h", "src/regexp/arm64/regexp-macro-assembler-arm64.h", - "src/wasm/baseline/arm64/liftoff-assembler-arm64.h", + "src/wasm/baseline/arm64/liftoff-assembler-arm64-inl.h", ] if (v8_control_flow_integrity) { sources += [ "src/execution/arm64/pointer-authentication-arm64.h" ] } + if (v8_enable_sparkplug) { + sources += [ + "src/baseline/arm64/baseline-assembler-arm64-inl.h", + "src/baseline/arm64/baseline-compiler-arm64-inl.h", + ] + } if (v8_enable_webassembly) { # Trap handling is enabled on arm64 Mac and Linux and in simulators on # x64 on Linux and Mac. @@ -4371,8 +4502,6 @@ v8_header_set("v8_internal_headers") { } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { sources += [ ### gcmole(mips64el) ### - "src/baseline/mips64/baseline-assembler-mips64-inl.h", - "src/baseline/mips64/baseline-compiler-mips64-inl.h", "src/codegen/mips64/assembler-mips64-inl.h", "src/codegen/mips64/assembler-mips64.h", "src/codegen/mips64/constants-mips64.h", @@ -4383,13 +4512,17 @@ v8_header_set("v8_internal_headers") { "src/execution/mips64/frame-constants-mips64.h", "src/execution/mips64/simulator-mips64.h", "src/regexp/mips64/regexp-macro-assembler-mips64.h", - "src/wasm/baseline/mips64/liftoff-assembler-mips64.h", + "src/wasm/baseline/mips64/liftoff-assembler-mips64-inl.h", ] + if (v8_enable_sparkplug) { + sources += [ + "src/baseline/mips64/baseline-assembler-mips64-inl.h", + "src/baseline/mips64/baseline-compiler-mips64-inl.h", + ] + } } else if (v8_current_cpu == "loong64") { sources += [ ### gcmole(loong64) ### - "src/baseline/loong64/baseline-assembler-loong64-inl.h", - "src/baseline/loong64/baseline-compiler-loong64-inl.h", "src/codegen/loong64/assembler-loong64-inl.h", "src/codegen/loong64/assembler-loong64.h", "src/codegen/loong64/constants-loong64.h", @@ -4400,8 +4533,14 @@ v8_header_set("v8_internal_headers") { "src/execution/loong64/frame-constants-loong64.h", "src/execution/loong64/simulator-loong64.h", "src/regexp/loong64/regexp-macro-assembler-loong64.h", - "src/wasm/baseline/loong64/liftoff-assembler-loong64.h", + "src/wasm/baseline/loong64/liftoff-assembler-loong64-inl.h", ] + if (v8_enable_sparkplug) { + sources += [ + "src/baseline/loong64/baseline-assembler-loong64-inl.h", + "src/baseline/loong64/baseline-compiler-loong64-inl.h", + ] + } if (v8_enable_webassembly) { # Trap handling is enabled on loong64 Linux and in simulators on # x64 on Linux. @@ -4428,13 +4567,11 @@ v8_header_set("v8_internal_headers") { "src/execution/ppc/frame-constants-ppc.h", "src/execution/ppc/simulator-ppc.h", "src/regexp/ppc/regexp-macro-assembler-ppc.h", - "src/wasm/baseline/ppc/liftoff-assembler-ppc.h", + "src/wasm/baseline/ppc/liftoff-assembler-ppc-inl.h", ] } else if (v8_current_cpu == "ppc64") { sources += [ ### gcmole(ppc64) ### - "src/baseline/ppc/baseline-assembler-ppc-inl.h", - "src/baseline/ppc/baseline-compiler-ppc-inl.h", "src/codegen/ppc/assembler-ppc-inl.h", "src/codegen/ppc/assembler-ppc.h", "src/codegen/ppc/constants-ppc.h", @@ -4447,13 +4584,17 @@ v8_header_set("v8_internal_headers") { "src/execution/ppc/frame-constants-ppc.h", "src/execution/ppc/simulator-ppc.h", "src/regexp/ppc/regexp-macro-assembler-ppc.h", - "src/wasm/baseline/ppc/liftoff-assembler-ppc.h", + "src/wasm/baseline/ppc/liftoff-assembler-ppc-inl.h", ] + if (v8_enable_sparkplug) { + sources += [ + "src/baseline/ppc/baseline-assembler-ppc-inl.h", + "src/baseline/ppc/baseline-compiler-ppc-inl.h", + ] + } } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { sources += [ ### gcmole(s390) ### - "src/baseline/s390/baseline-assembler-s390-inl.h", - "src/baseline/s390/baseline-compiler-s390-inl.h", "src/codegen/s390/assembler-s390-inl.h", "src/codegen/s390/assembler-s390.h", "src/codegen/s390/constants-s390.h", @@ -4466,8 +4607,14 @@ v8_header_set("v8_internal_headers") { "src/execution/s390/frame-constants-s390.h", "src/execution/s390/simulator-s390.h", "src/regexp/s390/regexp-macro-assembler-s390.h", - "src/wasm/baseline/s390/liftoff-assembler-s390.h", + "src/wasm/baseline/s390/liftoff-assembler-s390-inl.h", ] + if (v8_enable_sparkplug) { + sources += [ + "src/baseline/s390/baseline-assembler-s390-inl.h", + "src/baseline/s390/baseline-compiler-s390-inl.h", + ] + } } else if (v8_current_cpu == "riscv64") { sources += [ ### gcmole(riscv64) ### @@ -4479,6 +4626,7 @@ v8_header_set("v8_internal_headers") { "src/codegen/riscv/base-constants-riscv.h", "src/codegen/riscv/base-riscv-i.h", "src/codegen/riscv/constant-riscv-a.h", + "src/codegen/riscv/constant-riscv-b.h", "src/codegen/riscv/constant-riscv-c.h", "src/codegen/riscv/constant-riscv-d.h", "src/codegen/riscv/constant-riscv-f.h", @@ -4488,6 +4636,7 @@ v8_header_set("v8_internal_headers") { "src/codegen/riscv/constant-riscv-zifencei.h", "src/codegen/riscv/constants-riscv.h", "src/codegen/riscv/extension-riscv-a.h", + "src/codegen/riscv/extension-riscv-b.h", "src/codegen/riscv/extension-riscv-c.h", "src/codegen/riscv/extension-riscv-d.h", "src/codegen/riscv/extension-riscv-f.h", @@ -4504,19 +4653,24 @@ v8_header_set("v8_internal_headers") { "src/execution/riscv/frame-constants-riscv.h", "src/execution/riscv/simulator-riscv.h", "src/regexp/riscv/regexp-macro-assembler-riscv.h", - "src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h", + "src/wasm/baseline/riscv/liftoff-assembler-riscv64-inl.h", ] + if (v8_enable_sparkplug) { + sources += [ + "src/baseline/riscv/baseline-assembler-riscv-inl.h", + "src/baseline/riscv/baseline-compiler-riscv-inl.h", + ] + } } else if (v8_current_cpu == "riscv32") { sources += [ ### gcmole(riscv32) ### - "src/baseline/riscv/baseline-assembler-riscv-inl.h", - "src/baseline/riscv/baseline-compiler-riscv-inl.h", "src/codegen/riscv/assembler-riscv-inl.h", "src/codegen/riscv/assembler-riscv.h", "src/codegen/riscv/base-assembler-riscv.h", "src/codegen/riscv/base-constants-riscv.h", "src/codegen/riscv/base-riscv-i.h", "src/codegen/riscv/constant-riscv-a.h", + "src/codegen/riscv/constant-riscv-b.h", "src/codegen/riscv/constant-riscv-c.h", "src/codegen/riscv/constant-riscv-d.h", "src/codegen/riscv/constant-riscv-f.h", @@ -4527,6 +4681,7 @@ v8_header_set("v8_internal_headers") { "src/codegen/riscv/constant-riscv-zifencei.h", "src/codegen/riscv/constants-riscv.h", "src/codegen/riscv/extension-riscv-a.h", + "src/codegen/riscv/extension-riscv-b.h", "src/codegen/riscv/extension-riscv-c.h", "src/codegen/riscv/extension-riscv-d.h", "src/codegen/riscv/extension-riscv-f.h", @@ -4543,8 +4698,14 @@ v8_header_set("v8_internal_headers") { "src/execution/riscv/frame-constants-riscv.h", "src/execution/riscv/simulator-riscv.h", "src/regexp/riscv/regexp-macro-assembler-riscv.h", - "src/wasm/baseline/riscv32/liftoff-assembler-riscv32.h", + "src/wasm/baseline/riscv32/liftoff-assembler-riscv32-inl.h", ] + if (v8_enable_sparkplug) { + sources += [ + "src/baseline/riscv/baseline-assembler-riscv-inl.h", + "src/baseline/riscv/baseline-compiler-riscv-inl.h", + ] + } } public_deps = [ @@ -4553,12 +4714,14 @@ v8_header_set("v8_internal_headers") { ":v8_headers", ":v8_maybe_icu", ":v8_shared_internal_headers", + "//third_party/fp16", ] deps = [ ":cppgc_headers", ":generate_bytecode_builtins_list", ":run_torque", + ":v8_abseil", ":v8_heap_base_headers", ":v8_libbase", ] @@ -4578,7 +4741,6 @@ v8_compiler_sources = [ "src/compiler/backend/instruction-selector.cc", "src/compiler/backend/instruction.cc", "src/compiler/backend/jump-threading.cc", - "src/compiler/backend/mid-tier-register-allocator.cc", "src/compiler/backend/move-optimizer.cc", "src/compiler/backend/register-allocator-verifier.cc", "src/compiler/backend/register-allocator.cc", @@ -4774,6 +4936,7 @@ if (v8_enable_webassembly) { "src/compiler/turboshaft/int64-lowering-phase.cc", "src/compiler/turboshaft/wasm-gc-optimize-phase.cc", "src/compiler/turboshaft/wasm-gc-type-reducer.cc", + "src/compiler/turboshaft/wasm-lowering-phase.cc", "src/compiler/turboshaft/wasm-optimize-phase.cc", "src/compiler/turboshaft/wasm-turboshaft-compiler.cc", "src/compiler/wasm-address-reassociation.cc", @@ -4797,6 +4960,8 @@ if (v8_enable_wasm_simd256_revec) { v8_compiler_sources += [ "src/compiler/linear-scheduler.cc", "src/compiler/revectorizer.cc", + "src/compiler/turboshaft/wasm-revec-phase.cc", + "src/compiler/turboshaft/wasm-revec-reducer.cc", ] } @@ -4871,9 +5036,12 @@ v8_source_set("v8_turboshaft") { visibility = [ ":*" ] # Only targets in this file can depend on this. sources = [ + "src/compiler/turboshaft/analyzer-iterator.cc", "src/compiler/turboshaft/assembler.cc", "src/compiler/turboshaft/build-graph-phase.cc", - "src/compiler/turboshaft/dead-code-elimination-phase.cc", + "src/compiler/turboshaft/code-elimination-and-simplification-phase.cc", + "src/compiler/turboshaft/copying-phase.cc", + "src/compiler/turboshaft/csa-optimize-phase.cc", "src/compiler/turboshaft/debug-feature-lowering-phase.cc", "src/compiler/turboshaft/decompression-optimization-phase.cc", "src/compiler/turboshaft/decompression-optimization.cc", @@ -4883,18 +5051,22 @@ v8_source_set("v8_turboshaft") { "src/compiler/turboshaft/instruction-selection-phase.cc", "src/compiler/turboshaft/late-escape-analysis-reducer.cc", "src/compiler/turboshaft/late-load-elimination-reducer.cc", + "src/compiler/turboshaft/loop-finder.cc", + "src/compiler/turboshaft/loop-peeling-phase.cc", "src/compiler/turboshaft/loop-unrolling-phase.cc", "src/compiler/turboshaft/loop-unrolling-reducer.cc", "src/compiler/turboshaft/machine-lowering-phase.cc", + "src/compiler/turboshaft/maglev-graph-building-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/sidetable.cc", + "src/compiler/turboshaft/simplified-lowering-phase.cc", "src/compiler/turboshaft/simplify-tf-loops.cc", "src/compiler/turboshaft/store-store-elimination-phase.cc", "src/compiler/turboshaft/type-assertions-phase.cc", @@ -4906,6 +5078,18 @@ v8_source_set("v8_turboshaft") { "src/compiler/turboshaft/utils.cc", ] + if (!v8_enable_maglev) { + # When Maglev is not enabled, Turboshaft still needs Maglev's graph builder. + sources += [ + "src/maglev/maglev-compilation-info.cc", + "src/maglev/maglev-compilation-unit.cc", + "src/maglev/maglev-graph-builder.cc", + "src/maglev/maglev-graph-printer.cc", + "src/maglev/maglev-interpreter-frame-state.cc", + "src/maglev/maglev-ir.cc", + ] + } + public_deps = [ ":generate_bytecode_builtins_list", ":run_torque", @@ -4972,8 +5156,6 @@ v8_source_set("v8_base_without_compiler") { "src/ast/scopes.cc", "src/ast/source-range-ast-visitor.cc", "src/ast/variables.cc", - "src/baseline/baseline-batch-compiler.cc", - "src/baseline/baseline-compiler.cc", "src/baseline/baseline.cc", "src/baseline/bytecode-offset-iterator.cc", "src/builtins/accessors.cc", @@ -5111,7 +5293,6 @@ v8_source_set("v8_base_without_compiler") { "src/heap/code-stats.cc", "src/heap/collection-barrier.cc", "src/heap/combined-heap.cc", - "src/heap/concurrent-allocator.cc", "src/heap/concurrent-marking.cc", "src/heap/cppgc-js/cpp-heap.cc", "src/heap/cppgc-js/cpp-snapshot.cc", @@ -5171,6 +5352,7 @@ v8_source_set("v8_base_without_compiler") { "src/heap/stress-scavenge-observer.cc", "src/heap/sweeper.cc", "src/heap/traced-handles-marking-visitor.cc", + "src/heap/trusted-range.cc", "src/heap/weak-object-worklists.cc", "src/heap/zapping.cc", "src/ic/call-optimization.cc", @@ -5269,6 +5451,7 @@ v8_source_set("v8_base_without_compiler") { "src/objects/ordered-hash-table.cc", "src/objects/property-descriptor.cc", "src/objects/property.cc", + "src/objects/regexp-match-info.cc", "src/objects/scope-info.cc", "src/objects/shared-function-info.cc", "src/objects/simd.cc", @@ -5367,9 +5550,9 @@ v8_source_set("v8_base_without_compiler") { "src/runtime/runtime.cc", "src/sandbox/code-pointer-table.cc", "src/sandbox/external-pointer-table.cc", - "src/sandbox/indirect-pointer-table.cc", "src/sandbox/sandbox.cc", "src/sandbox/testing.cc", + "src/sandbox/trusted-pointer-table.cc", "src/snapshot/code-serializer.cc", "src/snapshot/context-deserializer.cc", "src/snapshot/context-serializer.cc", @@ -5426,6 +5609,13 @@ v8_source_set("v8_base_without_compiler") { sources += [ "src/snapshot/snapshot-compression.cc" ] } + if (v8_enable_sparkplug) { + sources += [ + "src/baseline/baseline-batch-compiler.cc", + "src/baseline/baseline-compiler.cc", + ] + } + if (v8_enable_maglev) { sources += [ "src/maglev/maglev-assembler.cc", @@ -5477,6 +5667,7 @@ v8_source_set("v8_base_without_compiler") { "src/trap-handler/handler-shared.cc", "src/wasm/baseline/liftoff-assembler.cc", "src/wasm/baseline/liftoff-compiler.cc", + "src/wasm/baseline/parallel-move.cc", "src/wasm/canonical-types.cc", "src/wasm/code-space-access.cc", "src/wasm/constant-expression-interface.cc", @@ -5750,6 +5941,7 @@ v8_source_set("v8_base_without_compiler") { "src/codegen/riscv/base-riscv-i.cc", "src/codegen/riscv/cpu-riscv.cc", "src/codegen/riscv/extension-riscv-a.cc", + "src/codegen/riscv/extension-riscv-b.cc", "src/codegen/riscv/extension-riscv-c.cc", "src/codegen/riscv/extension-riscv-d.cc", "src/codegen/riscv/extension-riscv-f.cc", @@ -5774,6 +5966,7 @@ v8_source_set("v8_base_without_compiler") { "src/codegen/riscv/base-riscv-i.cc", "src/codegen/riscv/cpu-riscv.cc", "src/codegen/riscv/extension-riscv-a.cc", + "src/codegen/riscv/extension-riscv-b.cc", "src/codegen/riscv/extension-riscv-c.cc", "src/codegen/riscv/extension-riscv-d.cc", "src/codegen/riscv/extension-riscv-f.cc", @@ -5828,6 +6021,15 @@ v8_source_set("v8_base_without_compiler") { ":v8_maybe_icu", ] + if (v8_fuzzilli) { + sources += [ + "src/fuzzilli/cov.cc", + "src/fuzzilli/cov.h", + "src/fuzzilli/fuzzilli.cc", + "src/fuzzilli/fuzzilli.h", + ] + } + if (v8_enable_i18n_support) { deps += [ ":run_gen-regexp-special-case" ] sources += [ "$target_gen_dir/src/regexp/special-case.cc" ] @@ -6023,6 +6225,8 @@ v8_source_set("torque_ls_base") { v8_component("v8_libbase") { sources = [ + "src/base/abort-mode.cc", + "src/base/abort-mode.h", "src/base/address-region.h", "src/base/atomic-utils.h", "src/base/atomicops.h", @@ -6045,6 +6249,7 @@ v8_component("v8_libbase") { "src/base/discriminated-union.h", "src/base/division-by-constant.cc", "src/base/division-by-constant.h", + "src/base/doubly-threaded-list.h", "src/base/emulated-virtual-address-subspace.cc", "src/base/emulated-virtual-address-subspace.h", "src/base/enum-set.h", @@ -6820,8 +7025,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - sources = [ "src/snapshot/embedded/embedded-empty.cc", "src/snapshot/embedded/embedded-file-writer.cc", @@ -7223,13 +7426,6 @@ v8_executable("d8") { "src/d8/d8.h", ] - if (v8_fuzzilli) { - sources += [ - "src/d8/cov.cc", - "src/d8/cov.h", - ] - } - configs = [ # Note: don't use :internal_config here because this target will get # the :external_config applied to it by virtue of depending on :v8, and diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 810434bdf0ee96..badda7719a4500 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -24,7 +24,7 @@ vars = { # 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': "terminal.qemu-x64,terminal.x64", + 'checkout_fuchsia_boot_images': "terminal.x64", 'checkout_fuchsia_product_bundles': '"{checkout_fuchsia_boot_images}" != ""', 'checkout_instrumented_libraries': False, @@ -55,7 +55,7 @@ vars = { 'checkout_fuchsia_no_hooks': False, # reclient CIPD package version - 'reclient_version': 're_client_version:0.113.0.8b45b89-gomaip', + 'reclient_version': 're_client_version:0.126.0.4aaef37-gomaip', # Fetch configuration files required for the 'use_remoteexec' gn arg 'download_remoteexec_cfg': False, @@ -71,19 +71,19 @@ vars = { 'build_with_chromium': False, # GN CIPD package version. - 'gn_version': 'git_revision:991530ce394efb58fcd848195469022fa17ae126', + 'gn_version': 'git_revision:b5adfe5f574d7110b80feb9aae6fae97c366840b', # 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:589d8654cfa7808816a6ecb4284ed2fd72c2f6d5', + 'luci_go': 'git_revision:0d11be367258bfe14a13ff1afcf43a0bc6aedb45', # 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:15.20230930.1.1', + 'fuchsia_version': 'version:17.20240120.1.1', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_build-tools_version @@ -116,16 +116,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': 'Sy00LuyBIUJdRGYKwg0zjWH8eAIUvgnnNiPkI8etaZYC', + 'android_sdk_cmdline-tools_version': 'BRpfUGFd3WoveSGTLVgkQF7ugIVyywGneVICP4c0010C', } deps = { 'base/trace_event/common': Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + '29ac73db520575590c3aceb0a6f1f58dda8934f6', 'build': - Var('chromium_url') + '/chromium/src/build.git' + '@' + 'b3ac98b5aa5333fa8b1059b5bf19885923dfe050', + Var('chromium_url') + '/chromium/src/build.git' + '@' + '28cd6ea727d171ec990e6174308451d4178d7f8e', 'buildtools': - Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '50c348906cbd450e031bc3123b657f833f8455b7', + Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '17ce6d2f0416038de7989bc71d055c07d333ccb5', 'buildtools/linux64': { 'packages': [ { @@ -164,14 +164,14 @@ deps = { } ], 'dep_type': 'cipd', - 'condition': '(host_os == "linux" or host_os == "mac" or host_os == "win") and host_cpu != "s390" and host_cpu != "ppc" and host_cpu != "arm64"', + 'condition': '(host_os == "linux" or host_os == "mac" or host_os == "win") and host_cpu != "s390" and host_cpu != "ppc" and (host_cpu != "arm64" or host_os == "mac")', }, 'test/benchmarks/data': Var('chromium_url') + '/v8/deps/third_party/benchmarks.git' + '@' + '05d7188267b4560491ff9155c5ee13e207ecd65f', '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' + '@' + '6789b50cce139af4ca819feb8ce3a9c77ba4098a', + Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + 'a1ba783ca340e4bf3d80b5f5e11fa54f2ee5f1ef', 'third_party/android_platform': { 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + 'eeb2d566f963bb66212fdc0d9bbe1dde550b4969', 'condition': 'checkout_android', @@ -218,14 +218,14 @@ deps = { 'packages': [ { 'package': 'chromium/third_party/android_toolchain/android_toolchain', - 'version': 'NSOM616pOQCfRfDAhC72ltgjyUQp9lAWCMzlmgB18dAC', + 'version': 'wpJvg81kuXdMM66r_l9Doa-pLfR6S26Jd1x40LpwWEoC', }, ], 'condition': 'checkout_android', 'dep_type': 'cipd', }, 'third_party/catapult': { - 'url': Var('chromium_url') + '/catapult.git' + '@' + '4f81c1e295978227d83f1b42ceff40b4f9b5b08c', + 'url': Var('chromium_url') + '/catapult.git' + '@' + '3e413d7b62c09fda8713146714ba2146a0369d86', 'condition': 'checkout_android', }, 'third_party/clang-format/script': @@ -239,9 +239,11 @@ deps = { 'condition': 'checkout_android', }, 'third_party/depot_tools': - Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '90a30a5b5357636fa05bb315c393275be7ca705c', + Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '46cb7d0aca592cd20ddc2f6cb16ee386b2abbf0d', + 'third_party/fp16/src': + Var('chromium_url') + '/external/github.com/Maratyszcza/FP16.git' + '@' + '0a92994d729ff76a58f692d3028ca1b64b145d91', 'third_party/fuchsia-gn-sdk': { - 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-gn-sdk.git' + '@' + 'd1e0ff4350f77c7f6b246ff62c232318a73c8176', + 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-gn-sdk.git' + '@' + '6ad82eadcb1a4404964a8d86c544fda1dab7af94', 'condition': 'checkout_fuchsia', }, # Exists for rolling the Fuchsia SDK. Check out of the SDK should always @@ -256,15 +258,18 @@ deps = { 'condition': 'checkout_fuchsia_no_hooks', 'dep_type': 'cipd', }, - 'third_party/google_benchmark/src': { + 'third_party/google_benchmark_chrome': { + 'url': Var('chromium_url') + '/chromium/src/third_party/google_benchmark.git' + '@' + '992199c3cb1076d307816e963ed4b5102df53c65', + }, + 'third_party/google_benchmark_chrome/src': { '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' + '@' + '985b9a6f70e13f3db741fed121e4dcc3046ad494', + Var('chromium_url') + '/chromium/deps/icu.git' + '@' + 'a622de35ac311c5ad390a7af80724634e5dc61ed', 'third_party/instrumented_libraries': - Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + '032e9c850ab975f7c088a625dcf2256917dbdfa6', + Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + '0011c28c8d35fc5093bb29631d05428932cd1206', 'third_party/ittapi': { # Force checkout ittapi libraries to pass v8 header includes check on # bots that has check_v8_header_includes enabled. @@ -272,19 +277,19 @@ deps = { 'condition': "checkout_ittapi or check_v8_header_includes", }, 'third_party/jinja2': - Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + '515dd10de9bf63040045902a4a310d2ba25213a0', + Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + 'e2d024354e11cc6b041b0cff032d73f0c7e43a07', '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' + '@' + '7cf98622abaf832e2d4784889ebc69d5b6fde4d8', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '28aa23ffb4c7344914a5b4ac7169f12e5a12333f', 'third_party/libc++abi/src': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + 'e8e4eb8f1c413ea4365256b2b83a6093c95d2d86', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + 'ea028d4d2b8a901f6302f5371c68a24480766e2b', 'third_party/libunwind/src': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + '43e5a34c5b7066a7ee15c74f09dc37b4b9b5630e', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'f400fdb561d4416b59b8f8a33d8ec8b79da60495', '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' + '@' + '006709ba3ed87660a17bd4548c45663628f5ed85', + Var('chromium_url') + '/chromium/src/third_party/markupsafe.git' + '@' + '0bad08bb207bbfc1d6f3bbc82b9242b0c50e5794', 'third_party/ninja': { 'packages': [ { @@ -296,7 +301,7 @@ deps = { 'condition': 'host_cpu != "s390" and host_cpu != "ppc"' }, 'third_party/perfetto': - Var('android_url') + '/platform/external/perfetto.git' + '@' + '446adf5b7bb431d42838cb0302b27311fa4331cd', + Var('android_url') + '/platform/external/perfetto.git' + '@' + '6fc824d618d2f06b5d9cd8655ba0419b6b3b366e', 'third_party/protobuf': Var('chromium_url') + '/external/github.com/google/protobuf'+ '@' + '6a59a2ad1f61d9696092f79b6d74368b4d7970a3', 'third_party/requests': { @@ -304,9 +309,9 @@ deps = { 'condition': 'checkout_android', }, 'third_party/zlib': - Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + '3f0af7f1d5ca6bb9d247f40b861346627c3032a1', + Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + '63c0cec0344e6ba70f22bd690187088299baaa94', 'tools/clang': - Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + 'dc3593cbb8b6e77c06e17697ea5b34b38d54a7ba', + Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + 'f0b1beffd512e855db0f46571958cfc83c8b05a9', 'tools/luci-go': { 'packages': [ { @@ -322,7 +327,7 @@ deps = { 'dep_type': 'cipd', }, 'third_party/abseil-cpp': { - 'url': Var('chromium_url') + '/chromium/src/third_party/abseil-cpp.git' + '@' + '7207ed23d56aa19796ffd08b8203f7af7f3b5f29', + 'url': Var('chromium_url') + '/chromium/src/third_party/abseil-cpp.git' + '@' + '5ff8c1facf6b2e54811969ae7b90152bc1f44269', 'condition': 'not build_with_chromium', } } @@ -338,6 +343,9 @@ include_rules = [ # the Chromium guidelines (though note that some requirements in V8 may be # different to Chromium's): # https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++11.md + '+absl/container/flat_hash_map.h', + '+absl/container/flat_hash_set.h', + '+absl/container/btree_map.h', '+absl/types/optional.h', '+absl/types/variant.h', '+absl/status', @@ -692,7 +700,7 @@ hooks = [ }, # Configure remote exec cfg files { - 'name': 'configure_reclient_cfgs', + 'name': 'download_and_configure_reclient_cfgs', 'pattern': '.', 'condition': 'download_remoteexec_cfg and not build_with_chromium', 'action': ['python3', @@ -706,4 +714,19 @@ hooks = [ '--quiet', ], }, + { + 'name': 'configure_reclient_cfgs', + 'pattern': '.', + 'condition': 'not download_remoteexec_cfg and not build_with_chromium', + 'action': ['python3', + 'buildtools/reclient_cfgs/configure_reclient_cfgs.py', + '--rbe_instance', + Var('rbe_instance'), + '--reproxy_cfg_template', + 'reproxy.cfg.template', + '--rewrapper_cfg_project', + Var('rewrapper_cfg_project'), + '--skip_remoteexec_cfg_fetch', + ], + }, ] diff --git a/deps/v8/INFRA_OWNERS b/deps/v8/INFRA_OWNERS index 33c1024df844fd..46a61df39665cf 100644 --- a/deps/v8/INFRA_OWNERS +++ b/deps/v8/INFRA_OWNERS @@ -2,4 +2,3 @@ alexschulze@chromium.org almuthanna@chromium.org liviurau@chromium.org machenbach@chromium.org -tmrts@chromium.org diff --git a/deps/v8/OWNERS b/deps/v8/OWNERS index cd95b48bac3eba..c25282ec9089b1 100644 --- a/deps/v8/OWNERS +++ b/deps/v8/OWNERS @@ -10,16 +10,12 @@ per-file codereview.settings=file:INFRA_OWNERS per-file AUTHORS=file:COMMON_OWNERS per-file BUILD.bazel=file:COMMON_OWNERS per-file BUILD.gn=file:COMMON_OWNERS -per-file DEPS=file:INFRA_OWNERS +per-file DEPS=file:COMMON_OWNERS per-file INFRA_OWNERS=file:INFRA_OWNERS per-file PRESUBMIT.py=file:INFRA_OWNERS per-file WATCHLISTS=file:COMMON_OWNERS per-file WORKSPACE=file:COMMON_OWNERS -# For Test262 rolls. -per-file DEPS=mathias@chromium.org -per-file DEPS=syg@chromium.org - # Needed by the auto_tag builder per-file WATCHLISTS=v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com per-file DEPS=v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index 5d4bf98bcb3ab7..244f4ab168ad8e 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -132,7 +132,8 @@ def FilterJSFile(affected_file): results.append(output_api.PresubmitError("GCMole pattern check failed")) results.extend(input_api.canned_checks.CheckAuthorizedAuthor( input_api, output_api, bot_allowlist=[ - 'v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com' + 'v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com', + 'v8-ci-test262-import-export@chops-service-accounts.iam.gserviceaccount.com', ])) return results diff --git a/deps/v8/WORKSPACE b/deps/v8/WORKSPACE index 1c9fc1078d4176..87d8cb1fe8c991 100644 --- a/deps/v8/WORKSPACE +++ b/deps/v8/WORKSPACE @@ -44,6 +44,21 @@ bind( actual = "@com_google_absl//absl/types:optional" ) +bind( + name = "absl_btree", + actual = "@com_google_absl//absl/container:btree" +) + +bind( + name = "absl_flat_hash_map", + actual = "@com_google_absl//absl/container:flat_hash_map" +) + +bind( + name = "absl_flat_hash_set", + actual = "@com_google_absl//absl/container:flat_hash_set" +) + new_local_repository( name = "com_googlesource_chromium_icu", build_file = "bazel/BUILD.icu", diff --git a/deps/v8/bazel/BUILD.icu b/deps/v8/bazel/BUILD.icu index 2ae79a5784f252..5fda2f468492a7 100644 --- a/deps/v8/bazel/BUILD.icu +++ b/deps/v8/bazel/BUILD.icu @@ -5,6 +5,7 @@ filegroup( name = "icudata", srcs = ["common/icudtl.dat"], + visibility = ["//visibility:public"], ) cc_library( @@ -21,17 +22,11 @@ cc_library( "/utf-8", # ICU source files are in UTF-8. ], "//conditions:default": [ - "-Wno-unused-function", - "-Wno-parentheses", - "-Wno-unused-function", - "-Wno-unused-variable", "-Wno-deprecated-declarations", ], }), data = [":icudata"], defines = [ - "U_COMMON_IMPLEMENTATION", - "U_ICUDATAENTRY_IN_COMMON", "HAVE_DLOPEN=0", "UCONFIG_ONLY_HTML_CONVERSION=1", "U_CHARSET_IS_UTF8=1", @@ -54,6 +49,10 @@ cc_library( "source/common", "source/i18n", ], + local_defines = [ + "U_COMMON_IMPLEMENTATION", + "U_ICUDATAENTRY_IN_COMMON", + ], tags = ["requires-rtti"], alwayslink = 1, ) @@ -71,18 +70,13 @@ cc_library( "/wd4267", # Conversion from size_t on 64-bits. "/utf-8", # ICU source files are in UTF-8. ], - "//conditions:default": [], - }), - defines = [ - "U_I18N_IMPLEMENTATION", - ] + select({ - "@platforms//os:windows": [ - "U_STATIC_IMPLEMENTATION", - "UNICODE", - "_UNICODE", + "//conditions:default": [ + "-Wno-deprecated-declarations", ], - "//conditions:default": [], }), + local_defines = [ + "U_I18N_IMPLEMENTATION", + ], deps = [":icuuc"], alwayslink = 1, ) @@ -91,6 +85,7 @@ cc_library( name = "icu", srcs = [ "source/stubdata/stubdata.cpp", + "source/stubdata/stubdata.h", ], hdrs = glob([ "source/common/unicode/*.h", @@ -105,17 +100,10 @@ cc_library( ], "//conditions:default": [], }), - defines = [ - "U_I18N_IMPLEMENTATION", - ] + select({ - "@platforms//os:windows": [ - "U_STATIC_IMPLEMENTATION", - "UNICODE", - "_UNICODE", - ], - "//conditions:default": [], - }), include_prefix = "third_party/icu", + local_defines = [ + "U_COMMON_IMPLEMENTATION", + ], visibility = ["//visibility:public"], deps = [ ":icui18n", diff --git a/deps/v8/bazel/defs.bzl b/deps/v8/bazel/defs.bzl index 09844919a5b572..1ea9bc0da8de0f 100644 --- a/deps/v8/bazel/defs.bzl +++ b/deps/v8/bazel/defs.bzl @@ -108,6 +108,7 @@ def _default_args(): "-fno-strict-aliasing", "-Werror", "-Wextra", + "-Wno-unneeded-internal-declaration", "-Wno-unknown-warning-option", "-Wno-bitwise-instead-of-logical", "-Wno-builtin-assume-aligned-alignment", @@ -556,7 +557,7 @@ def build_config_content(cpu, icu): ("full_debug", "false"), ("gdbjit", "false"), ("has_jitless", "false"), - ("has_maglev", "false"), + ("has_maglev", "true"), ("has_turbofan", "true"), ("has_webassembly", "false"), ("i18n", icu), @@ -564,6 +565,7 @@ def build_config_content(cpu, icu): ("is_ios", "false"), ("js_shared_memory", "false"), ("lite_mode", "false"), + ("local_off_stack_check", "false"), ("mips_arch_variant", '""'), ("mips_use_msa", "false"), ("msan", "false"), diff --git a/deps/v8/gni/release_branch_toggle.gni b/deps/v8/gni/release_branch_toggle.gni index c502c8c62e5836..da60c2433bcd1a 100644 --- a/deps/v8/gni/release_branch_toggle.gni +++ b/deps/v8/gni/release_branch_toggle.gni @@ -3,5 +3,8 @@ # found in the LICENSE file. declare_args() { - is_on_release_branch = true + # TODO(liviurau): Remove old name after Chromium config update + # https://crbug.com/1476977. + is_on_release_branch = false + v8_is_on_release_branch = true } \ No newline at end of file diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index e2505eea24ea52..72381c75cae640 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -48,7 +48,11 @@ declare_args() { # Enable monolithic static library for embedders. v8_monolithic = false - # Expose symbols for dynamic linking. + # Expose public symbols for native modules of Node.js and Electron. Default + # is false. + v8_expose_public_symbols = "" + + # Deprecated for v8_expose_public_symbols. v8_expose_symbols = false # Implement tracing using Perfetto (https://perfetto.dev). @@ -84,7 +88,10 @@ declare_args() { v8_enable_wasm_simd256_revec = false # Enable runtime call stats. - v8_enable_runtime_call_stats = !is_on_release_branch + # TODO(liviurau): Remove old name after Chromium config update + # https://crbug.com/1476977. + v8_enable_runtime_call_stats = + !(is_on_release_branch || v8_is_on_release_branch) # Add fuzzilli fuzzer support. v8_fuzzilli = false @@ -98,6 +105,9 @@ declare_args() { # Use direct pointers in local handles. v8_enable_direct_local = false + # Check for off-stack allocated local handles. + v8_enable_local_off_stack_check = false + v8_enable_google_benchmark = false cppgc_is_standalone = false @@ -145,6 +155,9 @@ declare_args() { # Change code emission and runtime features to be CET shadow-stack compliant # (incomplete and experimental). v8_enable_cet_shadow_stack = false + + # Emit CET IBT landing pad instructions in JIT generated code (experimental). + v8_enable_cet_ibt = false } if (v8_use_external_startup_data == "") { @@ -252,8 +265,7 @@ if (v8_symbol_level != symbol_level) { } } -if ((is_posix || is_fuchsia) && - (v8_enable_backtrace || v8_monolithic || v8_expose_symbols)) { +if ((is_posix || is_fuchsia) && (v8_enable_backtrace || v8_monolithic)) { v8_remove_configs += [ "//build/config/gcc:symbol_visibility_hidden" ] v8_add_configs += [ "//build/config/gcc:symbol_visibility_default" ] } diff --git a/deps/v8/include/cppgc/type-traits.h b/deps/v8/include/cppgc/type-traits.h index 4651435390058f..c595deca7f2520 100644 --- a/deps/v8/include/cppgc/type-traits.h +++ b/deps/v8/include/cppgc/type-traits.h @@ -128,13 +128,13 @@ struct IsSubclassOfBasicMemberTemplate { private: template static std::true_type SubclassCheck( - BasicMember*); + const BasicMember*); static std::false_type SubclassCheck(...); public: - static constexpr bool value = - decltype(SubclassCheck(std::declval()))::value; + static constexpr bool value = decltype(SubclassCheck( + std::declval*>()))::value; }; template , std::decay_t> && !IsDecayedSameV; +template +constexpr bool IsAnyMemberTypeV = false; + +template +constexpr bool IsAnyMemberTypeV> = true; + } // namespace internal /** @@ -245,6 +253,19 @@ constexpr bool IsWeakV = internal::IsWeak::value; template constexpr bool IsCompleteV = internal::IsComplete::value; +/** + * Value is true for member types `Member` and `WeakMember`. + */ +template +constexpr bool IsMemberOrWeakMemberTypeV = + IsMemberTypeV || IsWeakMemberTypeV; + +/** + * Value is true for any member type. + */ +template +constexpr bool IsAnyMemberTypeV = internal::IsAnyMemberTypeV>; + } // namespace cppgc #endif // INCLUDE_CPPGC_TYPE_TRAITS_H_ diff --git a/deps/v8/include/js_protocol.pdl b/deps/v8/include/js_protocol.pdl index 4754f17c5b02d7..8dad9c98de9f6e 100644 --- a/deps/v8/include/js_protocol.pdl +++ b/deps/v8/include/js_protocol.pdl @@ -1665,7 +1665,7 @@ domain Runtime # Binding function takes exactly one argument, this argument should be string, # in case of any other input, function throws an exception. # Each binding function call produces Runtime.bindingCalled notification. - experimental command addBinding + command addBinding parameters string name # If specified, the binding would only be exposed to the specified @@ -1675,17 +1675,17 @@ domain Runtime # Deprecated in favor of `executionContextName` due to an unclear use case # and bugs in implementation (crbug.com/1169639). `executionContextId` will be # removed in the future. - deprecated optional ExecutionContextId executionContextId + experimental deprecated optional ExecutionContextId executionContextId # If specified, the binding is exposed to the executionContext with # matching name, even for contexts created after the binding is added. # See also `ExecutionContext.name` and `worldName` parameter to # `Page.addScriptToEvaluateOnNewDocument`. # This parameter is mutually exclusive with `executionContextId`. - experimental optional string executionContextName + optional string executionContextName # This method does not remove binding function from global object but # unsubscribes current runtime agent from Runtime.bindingCalled notifications. - experimental command removeBinding + command removeBinding parameters string name diff --git a/deps/v8/include/v8-container.h b/deps/v8/include/v8-container.h index 1d9e72c117df6f..380999e5ee4596 100644 --- a/deps/v8/include/v8-container.h +++ b/deps/v8/include/v8-container.h @@ -8,6 +8,8 @@ #include #include +#include + #include "v8-local-handle.h" // NOLINT(build/include_directory) #include "v8-object.h" // NOLINT(build/include_directory) #include "v8config.h" // NOLINT(build/include_directory) @@ -43,6 +45,22 @@ class V8_EXPORT Array : public Object { return static_cast(value); } + /** + * Creates a JavaScript array from a provided callback. + * + * \param context The v8::Context to create the array in. + * \param length The length of the array to be created. + * \param next_value_callback The callback that is invoked to retrieve + * elements for the array. The embedder can signal that the array + * initialization should be aborted by throwing an exception and returning + * an empty MaybeLocal. + * \returns The v8::Array if all elements were constructed successfully and an + * empty MaybeLocal otherwise. + */ + static MaybeLocal New( + Local context, size_t length, + std::function()> next_value_callback); + enum class CallbackResult { kException, kBreak, diff --git a/deps/v8/include/v8-context.h b/deps/v8/include/v8-context.h index 50c7e6f494ce36..5552c7a809cbf1 100644 --- a/deps/v8/include/v8-context.h +++ b/deps/v8/include/v8-context.h @@ -181,8 +181,27 @@ class V8_EXPORT Context : public Data { * also be considered for freezing should be added to the children_out * parameter. Returns true if the operation completed successfully. */ + V8_DEPRECATED("Please use the version that takes a LocalVector&") virtual bool FreezeEmbedderObjectAndGetChildren( - Local obj, std::vector>& children_out) = 0; + Local obj, std::vector>& children_out) { + // TODO(chromium:1454114): This method is temporarily defined in order to + // smoothen the transition to the version that follows. + return true; + } + virtual bool FreezeEmbedderObjectAndGetChildren( + Local obj, LocalVector& children_out) { + // TODO(chromium:1454114): This method is temporarily defined and + // calls the previous version, soon to be deprecated, in order to + // smoothen the transition. When deprecation is completed, this + // will become an abstract method. + std::vector> children; + START_ALLOW_USE_DEPRECATED() + // Temporarily use the old callback. + bool result = FreezeEmbedderObjectAndGetChildren(obj, children); + END_ALLOW_USE_DEPRECATED() + children_out.insert(children_out.end(), children.begin(), children.end()); + return result; + } }; /** @@ -313,12 +332,16 @@ class V8_EXPORT Context : public Data { * Returns the value that was set or restored by * SetContinuationPreservedEmbedderData(), if any. */ + V8_DEPRECATE_SOON( + "Use v8::Isolate::GetContinuationPreservedEmbedderData instead") Local GetContinuationPreservedEmbedderData() const; /** * Sets a value that will be stored on continuations and reset while the * continuation runs. */ + V8_DEPRECATE_SOON( + "Use v8::Isolate::SetContinuationPreservedEmbedderData instead") void SetContinuationPreservedEmbedderData(Local context); /** diff --git a/deps/v8/include/v8-embedder-heap.h b/deps/v8/include/v8-embedder-heap.h index c37dadf7a39d55..236e1c1e94385c 100644 --- a/deps/v8/include/v8-embedder-heap.h +++ b/deps/v8/include/v8-embedder-heap.h @@ -9,6 +9,9 @@ #include "v8config.h" // NOLINT(build/include_directory) namespace v8 { +namespace internal { +class TracedHandles; +} // namespace internal class Isolate; class Value; @@ -18,8 +21,17 @@ class Value; */ class V8_EXPORT EmbedderRootsHandler { public: + enum class RootHandling { + kQueryEmbedderForNonDroppableReferences, + kDontQueryEmbedderForAnyReference, + }; + virtual ~EmbedderRootsHandler() = default; + EmbedderRootsHandler() = default; + explicit EmbedderRootsHandler(RootHandling default_traced_reference_handling) + : default_traced_reference_handling_(default_traced_reference_handling) {} + /** * Returns true if the |TracedReference| handle should be considered as root * for the currently running non-tracing garbage collection and false @@ -31,9 +43,7 @@ class V8_EXPORT EmbedderRootsHandler { * |TracedReference|. * * Note that the `handle` is different from the handle that the embedder holds - * 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. + * for retaining the object. * * The concrete implementations must be thread-safe. */ @@ -59,6 +69,12 @@ class V8_EXPORT EmbedderRootsHandler { ResetRoot(handle); return true; } + + private: + const RootHandling default_traced_reference_handling_ = + RootHandling::kQueryEmbedderForNonDroppableReferences; + + friend class internal::TracedHandles; }; } // namespace v8 diff --git a/deps/v8/include/v8-embedder-state-scope.h b/deps/v8/include/v8-embedder-state-scope.h index d8a3b08d5caeae..ec8da457339a96 100644 --- a/deps/v8/include/v8-embedder-state-scope.h +++ b/deps/v8/include/v8-embedder-state-scope.h @@ -7,12 +7,13 @@ #include -#include "v8-context.h" // NOLINT(build/include_directory) #include "v8-internal.h" // NOLINT(build/include_directory) #include "v8-local-handle.h" // NOLINT(build/include_directory) namespace v8 { +class Context; + namespace internal { class EmbedderState; } // namespace internal diff --git a/deps/v8/include/v8-exception.h b/deps/v8/include/v8-exception.h index 3b76636c392ff6..86f8b3a4bafaba 100644 --- a/deps/v8/include/v8-exception.h +++ b/deps/v8/include/v8-exception.h @@ -213,7 +213,6 @@ class V8_EXPORT TryCatch { bool can_continue_ : 1; bool capture_message_ : 1; bool rethrow_ : 1; - bool has_terminated_ : 1; friend class internal::Isolate; friend class internal::ThreadLocalTop; diff --git a/deps/v8/include/v8-fast-api-calls.h b/deps/v8/include/v8-fast-api-calls.h index e40f1068faba99..74d4cb152ed6a6 100644 --- a/deps/v8/include/v8-fast-api-calls.h +++ b/deps/v8/include/v8-fast-api-calls.h @@ -254,8 +254,8 @@ class CTypeInfo { // migrated from v8::ApiObject to v8::Local. kAny, // This is added to enable untyped representation of fast // call arguments for test purposes. It can represent any of - // the other types stored in the same memory as a union (see - // the AnyCType struct declared below). This allows for + // the other types stored in the same memory as a union + // (see AnyCType declared below). This allows for // uniform passing of arguments w.r.t. their location // (in a register or on the stack), independent of their // actual type. It's currently used by the arm64 simulator @@ -344,7 +344,8 @@ struct FastApiTypedArray : public FastApiTypedArrayBase { ValidateIndex(index); #endif // DEBUG T tmp; - memcpy(&tmp, reinterpret_cast(data_) + index, sizeof(T)); + memcpy(&tmp, static_cast(reinterpret_cast(data_) + index), + sizeof(T)); return tmp; } @@ -434,35 +435,43 @@ class V8_EXPORT CFunctionInfo { struct FastApiCallbackOptions; // Provided for testing. -struct AnyCType { +union V8_TRIVIAL_ABI AnyCType { AnyCType() : int64_value(0) {} - union { - bool bool_value; - int32_t int32_value; - uint32_t uint32_value; - int64_t int64_value; - uint64_t uint64_value; - float float_value; - double double_value; - void* pointer_value; - Local object_value; - Local sequence_value; - const FastApiTypedArray* uint8_ta_value; - const FastApiTypedArray* int32_ta_value; - const FastApiTypedArray* uint32_ta_value; - const FastApiTypedArray* int64_ta_value; - const FastApiTypedArray* uint64_ta_value; - const FastApiTypedArray* float_ta_value; - const FastApiTypedArray* double_ta_value; - const FastOneByteString* string_value; - FastApiCallbackOptions* options_value; - }; +#if defined(V8_ENABLE_LOCAL_OFF_STACK_CHECK) && V8_HAS_ATTRIBUTE_TRIVIAL_ABI + // In this case, Local is not trivially copyable and the implicit + // copy constructor and copy assignment for the union are deleted. + AnyCType(const AnyCType& other) : int64_value(other.int64_value) {} + AnyCType& operator=(const AnyCType& other) { + int64_value = other.int64_value; + return *this; + } +#endif + + bool bool_value; + int32_t int32_value; + uint32_t uint32_value; + int64_t int64_value; + uint64_t uint64_value; + float float_value; + double double_value; + void* pointer_value; + Local object_value; + Local sequence_value; + const FastApiTypedArray* uint8_ta_value; + const FastApiTypedArray* int32_ta_value; + const FastApiTypedArray* uint32_ta_value; + const FastApiTypedArray* int64_ta_value; + const FastApiTypedArray* uint64_ta_value; + const FastApiTypedArray* float_ta_value; + const FastApiTypedArray* double_ta_value; + const FastOneByteString* string_value; + FastApiCallbackOptions* options_value; }; static_assert( sizeof(AnyCType) == 8, - "The AnyCType struct should have size == 64 bits, as this is assumed " + "The union AnyCType should have size == 64 bits, as this is assumed " "by EffectControlLinearizer."); class V8_EXPORT CFunction { diff --git a/deps/v8/include/v8-function-callback.h b/deps/v8/include/v8-function-callback.h index 17b37cdda1e817..a21d59d1299a28 100644 --- a/deps/v8/include/v8-function-callback.h +++ b/deps/v8/include/v8-function-callback.h @@ -5,6 +5,9 @@ #ifndef INCLUDE_V8_FUNCTION_CALLBACK_H_ #define INCLUDE_V8_FUNCTION_CALLBACK_H_ +#include +#include + #include "v8-local-handle.h" // NOLINT(build/include_directory) #include "v8-primitive.h" // NOLINT(build/include_directory) #include "v8config.h" // NOLINT(build/include_directory) @@ -39,14 +42,21 @@ class ReturnValue { template V8_INLINE void Set(const Global& handle); template + V8_INLINE void SetNonEmpty(const Global& handle); + template V8_INLINE void Set(const BasicTracedReference& handle); template + V8_INLINE void SetNonEmpty(const BasicTracedReference& handle); + template V8_INLINE void Set(const Local handle); + template + V8_INLINE void SetNonEmpty(const Local handle); // Fast primitive setters V8_INLINE void Set(bool value); V8_INLINE void Set(double i); V8_INLINE void Set(int32_t i); V8_INLINE void Set(uint32_t i); + V8_INLINE void Set(uint16_t); // Fast JS primitive setters V8_INLINE void SetNull(); V8_INLINE void SetUndefined(); @@ -287,6 +297,16 @@ void ReturnValue::Set(const Global& handle) { } } +template +template +void ReturnValue::SetNonEmpty(const Global& handle) { + static_assert(std::is_base_of::value, "type check"); +#ifdef V8_ENABLE_CHECKS + internal::VerifyHandleIsNonEmpty(handle.IsEmpty()); +#endif // V8_ENABLE_CHECKS + *value_ = handle.ptr(); +} + template template void ReturnValue::Set(const BasicTracedReference& handle) { @@ -298,6 +318,16 @@ void ReturnValue::Set(const BasicTracedReference& handle) { } } +template +template +void ReturnValue::SetNonEmpty(const BasicTracedReference& handle) { + static_assert(std::is_base_of::value, "type check"); +#ifdef V8_ENABLE_CHECKS + internal::VerifyHandleIsNonEmpty(handle.IsEmpty()); +#endif // V8_ENABLE_CHECKS + *value_ = handle.ptr(); +} + template template void ReturnValue::Set(const Local handle) { @@ -310,6 +340,17 @@ void ReturnValue::Set(const Local handle) { } } +template +template +void ReturnValue::SetNonEmpty(const Local handle) { + static_assert(std::is_void::value || std::is_base_of::value, + "type check"); +#ifdef V8_ENABLE_CHECKS + internal::VerifyHandleIsNonEmpty(handle.IsEmpty()); +#endif // V8_ENABLE_CHECKS + *value_ = handle.ptr(); +} + template void ReturnValue::Set(double i) { static_assert(std::is_base_of::value, "type check"); @@ -339,10 +380,28 @@ void ReturnValue::Set(uint32_t i) { Set(Integer::NewFromUnsigned(GetIsolate(), i)); } +template +void ReturnValue::Set(uint16_t i) { + static_assert(std::is_base_of::value, "type check"); + using I = internal::Internals; + static_assert(I::IsValidSmi(std::numeric_limits::min())); + static_assert(I::IsValidSmi(std::numeric_limits::max())); + *value_ = I::IntToSmi(i); +} + template void ReturnValue::Set(bool value) { static_assert(std::is_base_of::value, "type check"); using I = internal::Internals; +#if V8_STATIC_ROOTS_BOOL +#ifdef V8_ENABLE_CHECKS + internal::PerformCastCheck( + internal::ValueHelper::SlotAsValue(value_)); +#endif // V8_ENABLE_CHECKS + *value_ = I::DecompressTaggedField( + *value_, value ? I::StaticReadOnlyRoot::kTrueValue + : I::StaticReadOnlyRoot::kFalseValue); +#else int root_index; if (value) { root_index = I::kTrueValueRootIndex; @@ -350,27 +409,55 @@ void ReturnValue::Set(bool value) { root_index = I::kFalseValueRootIndex; } *value_ = I::GetRoot(GetIsolate(), root_index); +#endif // V8_STATIC_ROOTS_BOOL } template void ReturnValue::SetNull() { static_assert(std::is_base_of::value, "type check"); using I = internal::Internals; +#if V8_STATIC_ROOTS_BOOL +#ifdef V8_ENABLE_CHECKS + internal::PerformCastCheck( + internal::ValueHelper::SlotAsValue(value_)); +#endif // V8_ENABLE_CHECKS + *value_ = + I::DecompressTaggedField(*value_, I::StaticReadOnlyRoot::kNullValue); +#else *value_ = I::GetRoot(GetIsolate(), I::kNullValueRootIndex); +#endif // V8_STATIC_ROOTS_BOOL } template void ReturnValue::SetUndefined() { static_assert(std::is_base_of::value, "type check"); using I = internal::Internals; +#if V8_STATIC_ROOTS_BOOL +#ifdef V8_ENABLE_CHECKS + internal::PerformCastCheck( + internal::ValueHelper::SlotAsValue(value_)); +#endif // V8_ENABLE_CHECKS + *value_ = + I::DecompressTaggedField(*value_, I::StaticReadOnlyRoot::kUndefinedValue); +#else *value_ = I::GetRoot(GetIsolate(), I::kUndefinedValueRootIndex); +#endif // V8_STATIC_ROOTS_BOOL } template void ReturnValue::SetEmptyString() { static_assert(std::is_base_of::value, "type check"); using I = internal::Internals; +#if V8_STATIC_ROOTS_BOOL +#ifdef V8_ENABLE_CHECKS + internal::PerformCastCheck( + internal::ValueHelper::SlotAsValue(value_)); +#endif // V8_ENABLE_CHECKS + *value_ = + I::DecompressTaggedField(*value_, I::StaticReadOnlyRoot::kEmptyString); +#else *value_ = I::GetRoot(GetIsolate(), I::kEmptyStringRootIndex); +#endif // V8_STATIC_ROOTS_BOOL } template @@ -385,7 +472,7 @@ Local ReturnValue::Get() const { if (I::is_identical(*value_, I::StaticReadOnlyRoot::kTheHoleValue)) { #else if (*value_ == I::GetRoot(GetIsolate(), I::kTheHoleValueRootIndex)) { -#endif +#endif // V8_STATIC_ROOTS_BOOL return Undefined(GetIsolate()); } return Local::New(GetIsolate(), reinterpret_cast(value_)); diff --git a/deps/v8/include/v8-handle-base.h b/deps/v8/include/v8-handle-base.h index d346a80de2a147..c2e1947a5dbd61 100644 --- a/deps/v8/include/v8-handle-base.h +++ b/deps/v8/include/v8-handle-base.h @@ -7,92 +7,44 @@ #include "v8-internal.h" // NOLINT(build/include_directory) -namespace v8 { +namespace v8::api_internal { -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 { +template +class StackAllocated { 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