From 9d7cd9b864cacb72409e693aa26c36338efa05ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 14 Aug 2024 20:41:00 +0200 Subject: [PATCH] deps: update V8 to 12.8.374.13 PR-URL: https://github.com/nodejs/node/pull/54077 Reviewed-By: Jiawen Geng Reviewed-By: Richard Lau Reviewed-By: Joyee Cheung Reviewed-By: Marco Ippolito --- deps/v8/.gitignore | 4 + deps/v8/.gn | 2 + deps/v8/AUTHORS | 3 + deps/v8/BUILD.bazel | 229 +- deps/v8/BUILD.gn | 970 +- deps/v8/COMMON_OWNERS | 9 +- deps/v8/DEPS | 355 +- deps/v8/ENG_REVIEW_OWNERS | 2 + deps/v8/PRESUBMIT.py | 24 + deps/v8/WATCHLISTS | 12 +- deps/v8/WORKSPACE | 11 - deps/v8/bazel/BUILD.trace_event_common | 10 - deps/v8/bazel/config/BUILD.bazel | 24 - deps/v8/bazel/defs.bzl | 16 +- deps/v8/bazel/v8-non-pointer-compression.bzl | 2 +- deps/v8/build_overrides/build.gni | 13 +- deps/v8/gni/proto_library.gni | 282 - deps/v8/gni/protoc.py | 51 - deps/v8/gni/v8.gni | 32 +- deps/v8/include/cppgc/allocation.h | 21 +- deps/v8/include/cppgc/heap-statistics.h | 2 + .../v8/include/cppgc/internal/api-constants.h | 7 +- deps/v8/include/cppgc/internal/gc-info.h | 22 +- .../include/cppgc/internal/member-storage.h | 6 + deps/v8/include/cppgc/internal/name-trait.h | 6 +- deps/v8/include/cppgc/name-provider.h | 7 + deps/v8/include/v8-array-buffer.h | 68 +- deps/v8/include/v8-callbacks.h | 13 +- deps/v8/include/v8-context.h | 50 +- deps/v8/include/v8-cppgc.h | 58 +- deps/v8/include/v8-date.h | 9 + deps/v8/include/v8-embedder-heap.h | 5 +- deps/v8/include/v8-exception.h | 70 + deps/v8/include/v8-fast-api-calls.h | 66 +- deps/v8/include/v8-function-callback.h | 265 +- deps/v8/include/v8-function.h | 3 - deps/v8/include/v8-initialization.h | 19 +- deps/v8/include/v8-inspector.h | 9 +- deps/v8/include/v8-internal.h | 352 +- deps/v8/include/v8-isolate.h | 84 +- deps/v8/include/v8-local-handle.h | 15 +- deps/v8/include/v8-message.h | 21 - deps/v8/include/v8-metrics.h | 4 + deps/v8/include/v8-microtask-queue.h | 5 - deps/v8/include/v8-object.h | 309 +- deps/v8/include/v8-persistent-handle.h | 19 - deps/v8/include/v8-platform.h | 36 +- deps/v8/include/v8-primitive.h | 69 +- deps/v8/include/v8-profiler.h | 33 +- deps/v8/include/v8-promise.h | 4 +- deps/v8/include/v8-sandbox.h | 173 + deps/v8/include/v8-script.h | 56 +- deps/v8/include/v8-snapshot.h | 40 +- deps/v8/include/v8-template.h | 355 +- deps/v8/include/v8-traced-handle.h | 19 +- deps/v8/include/v8-unwinder.h | 3 +- deps/v8/include/v8-util.h | 116 - deps/v8/include/v8-version.h | 6 +- deps/v8/include/v8-wasm.h | 3 + deps/v8/include/v8config.h | 38 +- deps/v8/infra/builder_properties.pyl | 23 + deps/v8/infra/mb/mb_config.pyl | 43 +- deps/v8/infra/testing/builders.pyl | 220 +- deps/v8/samples/process.cc | 60 +- deps/v8/src/DEPS | 9 +- deps/v8/src/api/OWNERS | 1 - deps/v8/src/api/api-arguments-inl.h | 558 +- deps/v8/src/api/api-arguments.cc | 28 +- deps/v8/src/api/api-arguments.h | 189 +- deps/v8/src/api/api-inl.h | 30 +- deps/v8/src/api/api-natives.cc | 187 +- deps/v8/src/api/api-natives.h | 16 +- deps/v8/src/api/api.cc | 1640 ++-- deps/v8/src/api/api.h | 23 +- deps/v8/src/asmjs/asm-js.cc | 43 +- deps/v8/src/asmjs/asm-js.h | 10 +- deps/v8/src/asmjs/asm-parser.cc | 2 +- .../ast/ast-function-literal-id-reindexer.cc | 7 + .../ast/ast-function-literal-id-reindexer.h | 1 + deps/v8/src/ast/ast-value-factory.h | 8 +- deps/v8/src/ast/ast.cc | 76 +- deps/v8/src/ast/ast.h | 150 +- deps/v8/src/ast/modules.cc | 42 +- deps/v8/src/ast/modules.h | 21 +- deps/v8/src/ast/prettyprinter.cc | 29 +- deps/v8/src/ast/prettyprinter.h | 10 +- deps/v8/src/ast/scopes.cc | 269 +- deps/v8/src/ast/scopes.h | 96 +- deps/v8/src/ast/variables.cc | 2 + deps/v8/src/ast/variables.h | 11 +- deps/v8/src/base/OWNERS | 2 + deps/v8/src/base/abort-mode.h | 44 +- deps/v8/src/base/bits.h | 5 + deps/v8/src/base/bounded-page-allocator.cc | 76 +- deps/v8/src/base/bounded-page-allocator.h | 17 + deps/v8/src/base/build_config.h | 14 +- deps/v8/src/base/compiler-specific.h | 13 +- deps/v8/src/base/cpu.cc | 95 +- deps/v8/src/base/cpu.h | 8 + deps/v8/src/base/debug/stack_trace_zos.cc | 123 + deps/v8/src/base/enum-set.h | 17 +- deps/v8/src/base/hashmap-entry.h | 17 + deps/v8/src/base/immediate-crash.h | 5 + deps/v8/src/base/logging.cc | 14 +- deps/v8/src/base/logging.h | 97 +- deps/v8/src/base/macros.h | 58 +- deps/v8/src/base/memory.h | 2 - deps/v8/src/base/optional.h | 2 +- deps/v8/src/base/page-allocator.cc | 2 +- .../base/platform/memory-protection-key.cc | 26 +- .../src/base/platform/memory-protection-key.h | 5 +- deps/v8/src/base/platform/memory.h | 14 +- deps/v8/src/base/platform/platform-aix.cc | 4 +- deps/v8/src/base/platform/platform-cygwin.cc | 4 +- deps/v8/src/base/platform/platform-darwin.cc | 6 +- deps/v8/src/base/platform/platform-freebsd.cc | 4 +- deps/v8/src/base/platform/platform-fuchsia.cc | 4 +- deps/v8/src/base/platform/platform-ios.cc | 22 - deps/v8/src/base/platform/platform-linux.cc | 7 +- deps/v8/src/base/platform/platform-openbsd.cc | 4 +- deps/v8/src/base/platform/platform-posix.cc | 54 +- deps/v8/src/base/platform/platform-qnx.cc | 4 +- deps/v8/src/base/platform/platform-solaris.cc | 4 +- .../src/base/platform/platform-starboard.cc | 4 +- deps/v8/src/base/platform/platform-win32.cc | 74 +- deps/v8/src/base/platform/platform-zos.cc | 235 + deps/v8/src/base/platform/platform.h | 25 +- deps/v8/src/base/platform/semaphore.h | 2 + deps/v8/src/base/platform/time.cc | 11 +- deps/v8/src/base/region-allocator.h | 2 +- deps/v8/src/base/sanitizer/asan.h | 10 + .../src/base/sanitizer/lsan-page-allocator.cc | 25 +- .../src/base/sanitizer/lsan-page-allocator.h | 9 + deps/v8/src/base/small-vector.h | 4 + deps/v8/src/base/sys-info.cc | 7 + .../template-meta-programming/algorithm.h | 75 + .../template-meta-programming/functional.h | 29 + .../src/base/template-meta-programming/list.h | 48 + .../string-literal.h | 64 + deps/v8/src/base/template-utils.h | 21 +- deps/v8/src/base/vector.h | 7 +- deps/v8/src/base/vlq.h | 64 +- .../baseline/arm/baseline-assembler-arm-inl.h | 20 +- .../baseline/arm/baseline-compiler-arm-inl.h | 3 +- .../arm64/baseline-assembler-arm64-inl.h | 23 +- .../arm64/baseline-compiler-arm64-inl.h | 3 +- deps/v8/src/baseline/baseline-assembler.h | 2 +- .../src/baseline/baseline-batch-compiler.cc | 24 +- .../v8/src/baseline/baseline-batch-compiler.h | 2 +- deps/v8/src/baseline/baseline-compiler.cc | 148 +- deps/v8/src/baseline/baseline-compiler.h | 38 +- deps/v8/src/baseline/baseline.cc | 2 +- .../ia32/baseline-assembler-ia32-inl.h | 16 +- .../ia32/baseline-compiler-ia32-inl.h | 3 +- .../loong64/baseline-assembler-loong64-inl.h | 19 +- .../loong64/baseline-compiler-loong64-inl.h | 3 +- .../mips64/baseline-assembler-mips64-inl.h | 21 +- .../mips64/baseline-compiler-mips64-inl.h | 3 +- .../baseline/ppc/baseline-assembler-ppc-inl.h | 20 +- .../baseline/ppc/baseline-compiler-ppc-inl.h | 3 +- .../riscv/baseline-assembler-riscv-inl.h | 17 +- .../riscv/baseline-compiler-riscv-inl.h | 3 +- .../s390/baseline-assembler-s390-inl.h | 22 +- .../s390/baseline-compiler-s390-inl.h | 3 +- .../baseline/x64/baseline-assembler-x64-inl.h | 23 +- .../baseline/x64/baseline-compiler-x64-inl.h | 3 +- deps/v8/src/bigint/OWNERS | 1 - deps/v8/src/bigint/bigint.h | 30 - deps/v8/src/builtins/DEPS | 16 + deps/v8/src/builtins/accessors.cc | 83 +- deps/v8/src/builtins/accessors.h | 2 +- deps/v8/src/builtins/arm/builtins-arm.cc | 600 +- deps/v8/src/builtins/arm64/builtins-arm64.cc | 619 +- deps/v8/src/builtins/base.tq | 40 +- deps/v8/src/builtins/builtins-api.cc | 64 +- deps/v8/src/builtins/builtins-array-gen.cc | 317 + deps/v8/src/builtins/builtins-array-gen.h | 2 +- deps/v8/src/builtins/builtins-array.cc | 160 +- deps/v8/src/builtins/builtins-arraybuffer.cc | 46 +- .../builtins-async-disposable-stack.cc | 75 + .../builtins/builtins-async-function-gen.cc | 58 +- deps/v8/src/builtins/builtins-async-gen.cc | 9 +- deps/v8/src/builtins/builtins-async-gen.h | 12 +- .../builtins/builtins-async-generator-gen.cc | 55 +- .../builtins/builtins-async-iterator-gen.cc | 245 +- deps/v8/src/builtins/builtins-async-module.cc | 6 +- .../builtins-atomics-synchronization.cc | 188 +- deps/v8/src/builtins/builtins-bigint.cc | 17 +- deps/v8/src/builtins/builtins-call-gen.cc | 2 +- deps/v8/src/builtins/builtins-call-gen.h | 5 +- deps/v8/src/builtins/builtins-callsite.cc | 8 +- .../src/builtins/builtins-collections-gen.cc | 6 +- deps/v8/src/builtins/builtins-console.cc | 112 +- .../src/builtins/builtins-constructor-gen.cc | 74 +- .../src/builtins/builtins-constructor-gen.h | 4 + .../src/builtins/builtins-conversion-gen.cc | 7 + deps/v8/src/builtins/builtins-dataview.cc | 20 +- deps/v8/src/builtins/builtins-date-gen.cc | 86 +- deps/v8/src/builtins/builtins-date.cc | 268 +- deps/v8/src/builtins/builtins-definitions.h | 328 +- deps/v8/src/builtins/builtins-descriptors.h | 9 +- .../src/builtins/builtins-disposable-stack.cc | 269 + deps/v8/src/builtins/builtins-error.cc | 2 +- deps/v8/src/builtins/builtins-function.cc | 57 +- deps/v8/src/builtins/builtins-global.cc | 2 +- deps/v8/src/builtins/builtins-inl.h | 6 + deps/v8/src/builtins/builtins-internal-gen.cc | 135 +- deps/v8/src/builtins/builtins-intl.cc | 125 +- deps/v8/src/builtins/builtins-json.cc | 2 +- .../builtins/builtins-microtask-queue-gen.cc | 2 +- deps/v8/src/builtins/builtins-number.cc | 29 +- deps/v8/src/builtins/builtins-object-gen.cc | 143 +- deps/v8/src/builtins/builtins-object.cc | 43 +- deps/v8/src/builtins/builtins-reflect.cc | 9 +- deps/v8/src/builtins/builtins-regexp-gen.cc | 7 +- deps/v8/src/builtins/builtins-regexp.cc | 11 +- deps/v8/src/builtins/builtins-shadow-realm.cc | 25 +- deps/v8/src/builtins/builtins-shared-array.cc | 2 +- .../builtins/builtins-sharedarraybuffer.cc | 110 +- deps/v8/src/builtins/builtins-string-gen.cc | 7 +- deps/v8/src/builtins/builtins-string-tsa.cc | 48 + deps/v8/src/builtins/builtins-string.cc | 12 +- deps/v8/src/builtins/builtins-string.tq | 16 + deps/v8/src/builtins/builtins-struct.cc | 16 +- deps/v8/src/builtins/builtins-symbol.cc | 6 +- deps/v8/src/builtins/builtins-temporal.cc | 4 +- deps/v8/src/builtins/builtins-trace.cc | 43 +- .../src/builtins/builtins-typed-array-gen.cc | 2 + deps/v8/src/builtins/builtins-typed-array.cc | 5 +- deps/v8/src/builtins/builtins-utils-gen.h | 22 + deps/v8/src/builtins/builtins-utils.h | 2 +- deps/v8/src/builtins/builtins-wasm-gen.cc | 23 + deps/v8/src/builtins/builtins-wasm-gen.h | 5 + deps/v8/src/builtins/builtins-weak-refs.cc | 3 +- deps/v8/src/builtins/builtins.cc | 20 +- deps/v8/src/builtins/builtins.h | 30 +- .../src/builtins/constants-table-builder.cc | 11 +- .../v8/src/builtins/constants-table-builder.h | 2 +- deps/v8/src/builtins/convert.tq | 3 - deps/v8/src/builtins/finalization-registry.tq | 7 +- deps/v8/src/builtins/function.tq | 4 + deps/v8/src/builtins/ia32/builtins-ia32.cc | 510 +- deps/v8/src/builtins/ic-callable.tq | 17 +- deps/v8/src/builtins/ic.tq | 2 +- deps/v8/src/builtins/iterator-helpers.tq | 52 +- deps/v8/src/builtins/js-to-js.tq | 7 +- deps/v8/src/builtins/js-to-wasm.tq | 207 +- .../src/builtins/loong64/builtins-loong64.cc | 547 +- deps/v8/src/builtins/math.tq | 138 +- .../v8/src/builtins/mips64/builtins-mips64.cc | 636 +- deps/v8/src/builtins/number.tq | 6 +- deps/v8/src/builtins/ppc/builtins-ppc.cc | 695 +- deps/v8/src/builtins/promise-constructor.tq | 9 - deps/v8/src/builtins/promise-misc.tq | 2 - deps/v8/src/builtins/promise-try.tq | 48 + deps/v8/src/builtins/riscv/builtins-riscv.cc | 1452 ++- deps/v8/src/builtins/s390/builtins-s390.cc | 806 +- deps/v8/src/builtins/set-difference.tq | 3 +- deps/v8/src/builtins/set-intersection.tq | 3 +- deps/v8/src/builtins/set-is-disjoint-from.tq | 3 +- deps/v8/src/builtins/set-is-subset-of.tq | 3 +- deps/v8/src/builtins/set-is-superset-of.tq | 3 +- .../src/builtins/setup-builtins-internal.cc | 93 +- deps/v8/src/builtins/typed-array-from.tq | 5 +- deps/v8/src/builtins/typed-array-of.tq | 4 +- deps/v8/src/builtins/typed-array-with.tq | 5 +- deps/v8/src/builtins/typed-array.tq | 21 +- deps/v8/src/builtins/wasm-strings.tq | 6 +- deps/v8/src/builtins/wasm-to-js.tq | 55 +- deps/v8/src/builtins/wasm.tq | 333 +- deps/v8/src/builtins/weak-ref.tq | 10 +- deps/v8/src/builtins/x64/builtins-x64.cc | 495 +- deps/v8/src/codegen/DEPS | 6 + deps/v8/src/codegen/arm/assembler-arm-inl.h | 16 +- deps/v8/src/codegen/arm/assembler-arm.h | 6 + .../arm/interface-descriptors-arm-inl.h | 3 +- .../v8/src/codegen/arm/macro-assembler-arm.cc | 270 +- deps/v8/src/codegen/arm/macro-assembler-arm.h | 32 +- .../src/codegen/arm64/assembler-arm64-inl.h | 29 +- deps/v8/src/codegen/arm64/assembler-arm64.cc | 195 +- deps/v8/src/codegen/arm64/assembler-arm64.h | 35 +- deps/v8/src/codegen/arm64/constants-arm64.h | 20 +- deps/v8/src/codegen/arm64/decoder-arm64-inl.h | 15 +- deps/v8/src/codegen/arm64/decoder-arm64.h | 2 + .../v8/src/codegen/arm64/instructions-arm64.h | 7 + .../arm64/interface-descriptors-arm64-inl.h | 3 +- .../codegen/arm64/macro-assembler-arm64-inl.h | 16 +- .../codegen/arm64/macro-assembler-arm64.cc | 284 +- .../src/codegen/arm64/macro-assembler-arm64.h | 35 +- deps/v8/src/codegen/arm64/register-arm64.cc | 10 +- deps/v8/src/codegen/arm64/register-arm64.h | 8 +- deps/v8/src/codegen/assembler.cc | 3 +- deps/v8/src/codegen/assembler.h | 28 +- deps/v8/src/codegen/background-merge-task.h | 9 +- deps/v8/src/codegen/bailout-reason.cc | 2 + deps/v8/src/codegen/bailout-reason.h | 6 +- deps/v8/src/codegen/code-factory.h | 1 - deps/v8/src/codegen/code-stub-assembler-inl.h | 224 +- deps/v8/src/codegen/code-stub-assembler.cc | 397 +- deps/v8/src/codegen/code-stub-assembler.h | 473 +- deps/v8/src/codegen/compilation-cache.cc | 48 +- deps/v8/src/codegen/compilation-cache.h | 25 +- deps/v8/src/codegen/compiler.cc | 866 +- deps/v8/src/codegen/compiler.h | 29 +- deps/v8/src/codegen/cpu-features.h | 6 + deps/v8/src/codegen/external-reference.cc | 241 +- deps/v8/src/codegen/external-reference.h | 70 +- .../v8/src/codegen/flush-instruction-cache.cc | 3 + deps/v8/src/codegen/handler-table.cc | 53 +- deps/v8/src/codegen/handler-table.h | 15 +- deps/v8/src/codegen/heap-object-list.h | 233 + deps/v8/src/codegen/ia32/assembler-ia32-inl.h | 17 +- deps/v8/src/codegen/ia32/assembler-ia32.h | 8 +- .../ia32/interface-descriptors-ia32-inl.h | 3 +- .../src/codegen/ia32/macro-assembler-ia32.cc | 306 +- .../src/codegen/ia32/macro-assembler-ia32.h | 35 +- .../src/codegen/interface-descriptors-inl.h | 6 +- deps/v8/src/codegen/interface-descriptors.h | 62 +- .../codegen/loong64/assembler-loong64-inl.h | 19 +- .../src/codegen/loong64/assembler-loong64.h | 6 + .../interface-descriptors-loong64-inl.h | 3 +- .../loong64/macro-assembler-loong64.cc | 336 +- .../codegen/loong64/macro-assembler-loong64.h | 34 +- deps/v8/src/codegen/machine-type.cc | 6 + deps/v8/src/codegen/machine-type.h | 27 +- deps/v8/src/codegen/macro-assembler-base.cc | 5 + deps/v8/src/codegen/macro-assembler.h | 2 +- .../src/codegen/mips64/assembler-mips64-inl.h | 42 +- .../v8/src/codegen/mips64/assembler-mips64.cc | 17 + deps/v8/src/codegen/mips64/assembler-mips64.h | 6 + .../mips64/interface-descriptors-mips64-inl.h | 3 +- .../codegen/mips64/macro-assembler-mips64.cc | 378 +- .../codegen/mips64/macro-assembler-mips64.h | 59 +- .../src/codegen/optimized-compilation-info.cc | 7 +- .../src/codegen/optimized-compilation-info.h | 6 +- .../src/codegen/pending-optimization-table.cc | 31 +- .../src/codegen/pending-optimization-table.h | 8 +- deps/v8/src/codegen/ppc/assembler-ppc-inl.h | 52 +- deps/v8/src/codegen/ppc/assembler-ppc.cc | 7 + deps/v8/src/codegen/ppc/assembler-ppc.h | 6 + .../ppc/interface-descriptors-ppc-inl.h | 5 +- .../v8/src/codegen/ppc/macro-assembler-ppc.cc | 295 +- deps/v8/src/codegen/ppc/macro-assembler-ppc.h | 32 +- deps/v8/src/codegen/register-configuration.h | 3 + deps/v8/src/codegen/reloc-info.cc | 31 +- deps/v8/src/codegen/reloc-info.h | 13 +- .../src/codegen/riscv/assembler-riscv-inl.h | 64 +- deps/v8/src/codegen/riscv/assembler-riscv.cc | 102 +- deps/v8/src/codegen/riscv/assembler-riscv.h | 42 +- .../src/codegen/riscv/base-constants-riscv.h | 14 +- deps/v8/src/codegen/riscv/constant-riscv-b.h | 25 + .../v8/src/codegen/riscv/extension-riscv-b.cc | 41 +- deps/v8/src/codegen/riscv/extension-riscv-b.h | 14 +- .../riscv/interface-descriptors-riscv-inl.h | 3 +- .../codegen/riscv/macro-assembler-riscv.cc | 987 +- .../src/codegen/riscv/macro-assembler-riscv.h | 82 +- deps/v8/src/codegen/s390/assembler-s390-inl.h | 35 +- deps/v8/src/codegen/s390/assembler-s390.cc | 46 +- deps/v8/src/codegen/s390/assembler-s390.h | 82 +- deps/v8/src/codegen/s390/constants-s390.h | 47 + .../s390/interface-descriptors-s390-inl.h | 21 +- .../src/codegen/s390/macro-assembler-s390.cc | 688 +- .../src/codegen/s390/macro-assembler-s390.h | 134 +- deps/v8/src/codegen/s390/register-s390.h | 43 +- .../macro-assembler-shared-ia32-x64.cc | 15 + .../macro-assembler-shared-ia32-x64.h | 10 + deps/v8/src/codegen/signature.h | 7 + deps/v8/src/codegen/source-position.cc | 20 +- deps/v8/src/codegen/tnode.h | 101 +- .../turboshaft-builtins-assembler-inl.h | 38 + deps/v8/src/codegen/x64/assembler-x64-inl.h | 19 +- deps/v8/src/codegen/x64/assembler-x64.cc | 79 +- deps/v8/src/codegen/x64/assembler-x64.h | 94 +- deps/v8/src/codegen/x64/fma-instr.h | 80 +- .../x64/interface-descriptors-x64-inl.h | 3 +- .../v8/src/codegen/x64/macro-assembler-x64.cc | 600 +- deps/v8/src/codegen/x64/macro-assembler-x64.h | 60 +- deps/v8/src/codegen/x64/register-x64.h | 4 + deps/v8/src/common/assert-scope.cc | 103 +- deps/v8/src/common/assert-scope.h | 195 +- deps/v8/src/common/code-memory-access-inl.h | 78 +- deps/v8/src/common/code-memory-access.cc | 90 +- deps/v8/src/common/code-memory-access.h | 42 +- deps/v8/src/common/globals.h | 262 +- deps/v8/src/common/message-template.h | 12 +- deps/v8/src/common/ptr-compr-inl.h | 51 +- deps/v8/src/common/ptr-compr.h | 21 +- deps/v8/src/common/simd128.h | 72 + .../lazy-compile-dispatcher.cc | 37 +- .../lazy-compile-dispatcher.h | 13 +- .../optimizing-compile-dispatcher.cc | 77 +- .../optimizing-compile-dispatcher.h | 82 +- deps/v8/src/compiler/OWNERS | 6 +- deps/v8/src/compiler/access-builder.cc | 20 +- deps/v8/src/compiler/access-builder.h | 12 +- deps/v8/src/compiler/access-info.cc | 41 +- .../backend/arm/code-generator-arm.cc | 34 +- .../backend/arm/instruction-selector-arm.cc | 89 +- .../backend/arm64/code-generator-arm64.cc | 196 +- .../backend/arm64/instruction-codes-arm64.h | 1 + .../arm64/instruction-scheduler-arm64.cc | 2 + .../arm64/instruction-selector-arm64.cc | 953 +- .../compiler/backend/code-generator-impl.h | 8 +- .../v8/src/compiler/backend/code-generator.cc | 317 +- deps/v8/src/compiler/backend/code-generator.h | 86 +- deps/v8/src/compiler/backend/frame-elider.cc | 25 +- deps/v8/src/compiler/backend/frame-elider.h | 4 +- .../backend/ia32/code-generator-ia32.cc | 39 +- .../backend/ia32/instruction-selector-ia32.cc | 62 +- .../src/compiler/backend/instruction-codes.h | 11 +- .../compiler/backend/instruction-scheduler.cc | 1 + .../backend/instruction-selector-adapter.h | 71 +- .../backend/instruction-selector-impl.h | 18 +- .../compiler/backend/instruction-selector.cc | 251 +- .../compiler/backend/instruction-selector.h | 104 +- deps/v8/src/compiler/backend/instruction.cc | 52 +- deps/v8/src/compiler/backend/instruction.h | 82 +- .../backend/loong64/code-generator-loong64.cc | 35 +- .../loong64/instruction-codes-loong64.h | 2 + .../loong64/instruction-selector-loong64.cc | 1093 ++- .../backend/mips64/code-generator-mips64.cc | 81 +- .../backend/mips64/instruction-codes-mips64.h | 1 + .../mips64/instruction-scheduler-mips64.cc | 3 + .../mips64/instruction-selector-mips64.cc | 838 +- .../backend/ppc/code-generator-ppc.cc | 52 +- .../backend/ppc/instruction-codes-ppc.h | 1 + .../backend/ppc/instruction-scheduler-ppc.cc | 1 + .../backend/ppc/instruction-selector-ppc.cc | 171 +- .../compiler/backend/register-allocation.h | 5 +- .../compiler/backend/register-allocator.cc | 13 +- .../backend/riscv/code-generator-riscv.cc | 174 +- .../backend/riscv/instruction-codes-riscv.h | 20 +- .../riscv/instruction-scheduler-riscv.cc | 141 +- .../riscv/instruction-selector-riscv.h | 661 +- .../riscv/instruction-selector-riscv32.cc | 696 +- .../riscv/instruction-selector-riscv64.cc | 1006 +- .../backend/s390/code-generator-s390.cc | 57 +- .../backend/s390/instruction-codes-s390.h | 1 + .../s390/instruction-scheduler-s390.cc | 1 + .../backend/s390/instruction-selector-s390.cc | 995 +- .../backend/x64/code-generator-x64.cc | 381 +- .../backend/x64/instruction-codes-x64.h | 14 +- .../backend/x64/instruction-scheduler-x64.cc | 11 + .../backend/x64/instruction-selector-x64.cc | 1262 ++- .../src/compiler/basic-block-instrumentor.cc | 55 +- .../src/compiler/basic-block-instrumentor.h | 6 + deps/v8/src/compiler/bytecode-analysis.cc | 35 +- deps/v8/src/compiler/bytecode-analysis.h | 3 - .../v8/src/compiler/bytecode-graph-builder.cc | 121 +- deps/v8/src/compiler/code-assembler.cc | 34 +- deps/v8/src/compiler/code-assembler.h | 15 +- deps/v8/src/compiler/common-node-cache.cc | 2 +- deps/v8/src/compiler/common-operator.cc | 10 +- deps/v8/src/compiler/common-operator.h | 6 +- .../src/compiler/compilation-dependencies.cc | 23 +- .../v8/src/compiler/control-flow-optimizer.cc | 146 - deps/v8/src/compiler/control-flow-optimizer.h | 60 - .../src/compiler/effect-control-linearizer.cc | 8638 ----------------- .../src/compiler/effect-control-linearizer.h | 32 - deps/v8/src/compiler/fast-api-calls.cc | 87 +- deps/v8/src/compiler/frame-states.cc | 11 +- deps/v8/src/compiler/frame-states.h | 51 +- deps/v8/src/compiler/globals.h | 40 + deps/v8/src/compiler/graph-assembler.cc | 20 +- deps/v8/src/compiler/graph-assembler.h | 8 +- deps/v8/src/compiler/graph-reducer.h | 6 +- deps/v8/src/compiler/graph-visualizer.cc | 65 +- deps/v8/src/compiler/graph-visualizer.h | 2 +- deps/v8/src/compiler/heap-refs.cc | 134 +- deps/v8/src/compiler/heap-refs.h | 50 +- deps/v8/src/compiler/js-call-reducer.cc | 241 +- deps/v8/src/compiler/js-call-reducer.h | 1 + deps/v8/src/compiler/js-create-lowering.cc | 26 + deps/v8/src/compiler/js-create-lowering.h | 1 + deps/v8/src/compiler/js-generic-lowering.cc | 8 +- deps/v8/src/compiler/js-heap-broker.cc | 87 +- deps/v8/src/compiler/js-heap-broker.h | 32 +- deps/v8/src/compiler/js-inlining-heuristic.cc | 5 +- deps/v8/src/compiler/js-inlining.cc | 25 +- deps/v8/src/compiler/js-intrinsic-lowering.cc | 36 +- deps/v8/src/compiler/js-intrinsic-lowering.h | 6 +- .../js-native-context-specialization.cc | 48 +- deps/v8/src/compiler/js-operator.cc | 3 +- deps/v8/src/compiler/js-operator.h | 1 + deps/v8/src/compiler/js-type-hint-lowering.cc | 35 +- deps/v8/src/compiler/js-typed-lowering.cc | 77 +- deps/v8/src/compiler/linkage.cc | 53 +- deps/v8/src/compiler/load-elimination.cc | 6 + .../v8/src/compiler/machine-graph-verifier.cc | 2 + deps/v8/src/compiler/machine-operator.cc | 75 +- deps/v8/src/compiler/machine-operator.h | 18 +- deps/v8/src/compiler/node-origin-table.cc | 10 + deps/v8/src/compiler/node-origin-table.h | 1 + deps/v8/src/compiler/opcodes.h | 18 +- deps/v8/src/compiler/operator-properties.cc | 1 + deps/v8/src/compiler/phase.h | 83 +- deps/v8/src/compiler/pipeline-data-inl.h | 162 +- deps/v8/src/compiler/pipeline-statistics.cc | 24 +- deps/v8/src/compiler/pipeline.cc | 2193 ++--- deps/v8/src/compiler/pipeline.h | 17 +- deps/v8/src/compiler/processed-feedback.h | 13 + .../src/compiler/property-access-builder.cc | 2 +- deps/v8/src/compiler/raw-machine-assembler.h | 4 +- deps/v8/src/compiler/representation-change.cc | 6 +- deps/v8/src/compiler/revectorizer.cc | 1 + deps/v8/src/compiler/schedule.cc | 1 + deps/v8/src/compiler/scheduler.cc | 2 + .../compiler/simplified-lowering-verifier.cc | 3 +- deps/v8/src/compiler/simplified-lowering.cc | 264 +- deps/v8/src/compiler/simplified-operator.cc | 33 +- deps/v8/src/compiler/simplified-operator.h | 99 +- .../src/compiler/store-store-elimination.cc | 572 -- .../v8/src/compiler/store-store-elimination.h | 57 - .../src/compiler/turboshaft/access-builder.h | 82 + deps/v8/src/compiler/turboshaft/assembler.h | 1566 ++- .../turboshaft/assert-types-reducer.h | 2 +- .../turboshaft/block-instrumentation-phase.cc | 18 + .../turboshaft/block-instrumentation-phase.h | 20 + .../block-instrumentation-reducer.cc | 21 + .../block-instrumentation-reducer.h | 174 + .../turboshaft/branch-elimination-reducer.h | 33 +- .../compiler/turboshaft/build-graph-phase.cc | 25 +- .../compiler/turboshaft/build-graph-phase.h | 8 +- .../turboshaft/builtin-call-descriptors.h | 169 +- ...de-elimination-and-simplification-phase.cc | 9 +- ...ode-elimination-and-simplification-phase.h | 2 +- .../src/compiler/turboshaft/copying-phase.h | 276 +- .../compiler/turboshaft/csa-optimize-phase.cc | 23 +- .../compiler/turboshaft/csa-optimize-phase.h | 10 +- .../dead-code-elimination-reducer.h | 12 +- .../debug-feature-lowering-phase.cc | 4 +- .../turboshaft/debug-feature-lowering-phase.h | 2 +- .../debug-feature-lowering-reducer.h | 8 +- .../decompression-optimization-phase.cc | 5 +- .../decompression-optimization-phase.h | 4 +- .../turboshaft/decompression-optimization.cc | 9 +- .../turboshaft/define-assembler-macros.inc | 48 +- deps/v8/src/compiler/turboshaft/deopt-data.h | 9 +- .../duplication-optimization-reducer.h | 14 +- .../fast-api-call-lowering-reducer.h | 234 +- .../src/compiler/turboshaft/graph-builder.cc | 345 +- .../src/compiler/turboshaft/graph-builder.h | 5 +- deps/v8/src/compiler/turboshaft/graph.h | 105 +- deps/v8/src/compiler/turboshaft/index.h | 423 +- ...truction-selection-normalization-reducer.h | 100 + .../turboshaft/instruction-selection-phase.cc | 44 +- .../turboshaft/instruction-selection-phase.h | 26 +- .../turboshaft/int64-lowering-phase.cc | 5 +- .../turboshaft/int64-lowering-phase.h | 2 +- .../turboshaft/int64-lowering-reducer.h | 269 +- .../turboshaft/js-generic-lowering-reducer.h | 41 +- .../late-escape-analysis-reducer.cc | 4 +- .../late-load-elimination-reducer.cc | 111 +- .../late-load-elimination-reducer.h | 45 +- .../load-store-simplification-reducer.h | 32 +- .../compiler/turboshaft/loop-peeling-phase.cc | 5 +- .../compiler/turboshaft/loop-peeling-phase.h | 2 +- .../turboshaft/loop-peeling-reducer.h | 38 +- .../turboshaft/loop-unrolling-phase.cc | 22 +- .../turboshaft/loop-unrolling-phase.h | 2 +- .../turboshaft/loop-unrolling-reducer.cc | 297 +- .../turboshaft/loop-unrolling-reducer.h | 287 +- .../turboshaft/machine-lowering-phase.cc | 4 +- .../turboshaft/machine-lowering-phase.h | 2 +- .../turboshaft/machine-lowering-reducer-inl.h | 905 +- .../turboshaft/machine-optimization-reducer.h | 299 +- .../maglev-early-lowering-reducer-inl.h | 296 +- .../turboshaft/maglev-graph-building-phase.cc | 4551 +++++++-- .../turboshaft/maglev-graph-building-phase.h | 2 +- .../turboshaft/memory-optimization-reducer.cc | 4 +- .../turboshaft/memory-optimization-reducer.h | 71 +- .../compiler/turboshaft/operation-matcher.h | 129 +- deps/v8/src/compiler/turboshaft/operations.cc | 312 +- deps/v8/src/compiler/turboshaft/operations.h | 1741 ++-- deps/v8/src/compiler/turboshaft/opmasks.h | 22 +- .../src/compiler/turboshaft/optimize-phase.cc | 7 +- .../src/compiler/turboshaft/optimize-phase.h | 2 +- deps/v8/src/compiler/turboshaft/phase.cc | 58 +- deps/v8/src/compiler/turboshaft/phase.h | 480 +- deps/v8/src/compiler/turboshaft/pipelines.cc | 69 + deps/v8/src/compiler/turboshaft/pipelines.h | 595 ++ .../turboshaft/recreate-schedule-phase.cc | 22 +- .../turboshaft/recreate-schedule-phase.h | 9 +- .../compiler/turboshaft/recreate-schedule.cc | 96 +- .../compiler/turboshaft/recreate-schedule.h | 6 +- .../turboshaft/register-allocation-phase.h | 219 + .../compiler/turboshaft/representations.cc | 10 + .../src/compiler/turboshaft/representations.h | 175 +- .../turboshaft/runtime-call-descriptors.h | 150 +- .../turboshaft/select-lowering-reducer.h | 6 +- .../turboshaft/simplified-lowering-phase.cc | 4 +- .../turboshaft/simplified-lowering-phase.h | 2 +- .../turboshaft/simplified-lowering-reducer.h | 8 +- .../turboshaft/stack-check-lowering-reducer.h | 115 +- .../store-store-elimination-phase.cc | 14 +- .../store-store-elimination-phase.h | 4 +- ... => store-store-elimination-reducer-inl.h} | 30 +- .../turboshaft/type-assertions-phase.cc | 7 +- .../turboshaft/type-assertions-phase.h | 2 +- .../turboshaft/type-inference-analysis.h | 4 +- .../turboshaft/type-inference-reducer.h | 25 +- .../turboshaft/typed-optimizations-phase.cc | 8 +- .../turboshaft/typed-optimizations-phase.h | 2 +- deps/v8/src/compiler/turboshaft/types.h | 5 + .../turboshaft/uniform-reducer-adapter.h | 12 +- .../turboshaft/value-numbering-reducer.h | 2 +- .../compiler/turboshaft/variable-reducer.h | 79 +- .../turboshaft/wasm-assembler-helpers.h | 12 +- .../wasm-dead-code-elimination-phase.cc | 8 +- .../wasm-dead-code-elimination-phase.h | 2 +- .../turboshaft/wasm-gc-optimize-phase.cc | 6 +- .../turboshaft/wasm-gc-optimize-phase.h | 2 +- .../wasm-gc-typed-optimization-reducer.cc | 21 +- .../wasm-gc-typed-optimization-reducer.h | 48 +- .../turboshaft/wasm-js-lowering-reducer.h | 20 +- .../wasm-load-elimination-reducer.h | 110 +- .../turboshaft/wasm-lowering-phase.cc | 7 +- .../compiler/turboshaft/wasm-lowering-phase.h | 2 +- .../turboshaft/wasm-lowering-reducer.h | 199 +- .../turboshaft/wasm-optimize-phase.cc | 6 +- .../compiler/turboshaft/wasm-optimize-phase.h | 2 +- .../compiler/turboshaft/wasm-revec-phase.cc | 19 +- .../compiler/turboshaft/wasm-revec-phase.h | 15 +- .../compiler/turboshaft/wasm-revec-reducer.cc | 521 +- .../compiler/turboshaft/wasm-revec-reducer.h | 596 +- .../turboshaft/wasm-turboshaft-compiler.cc | 4 +- .../turboshaft/wasm-turboshaft-compiler.h | 4 +- .../src/compiler/turboshaft/zone-with-name.h | 107 + deps/v8/src/compiler/typer.cc | 4 + deps/v8/src/compiler/types.cc | 4 + deps/v8/src/compiler/use-info.h | 3 + deps/v8/src/compiler/verifier.cc | 3 + .../src/compiler/wasm-compiler-definitions.cc | 9 - .../src/compiler/wasm-compiler-definitions.h | 76 +- deps/v8/src/compiler/wasm-compiler.cc | 887 +- deps/v8/src/compiler/wasm-compiler.h | 68 +- deps/v8/src/compiler/wasm-gc-lowering.cc | 6 +- deps/v8/src/compiler/wasm-graph-assembler.cc | 42 +- deps/v8/src/compiler/wasm-graph-assembler.h | 14 +- deps/v8/src/compiler/wasm-inlining.cc | 8 +- deps/v8/src/compiler/wasm-inlining.h | 6 +- deps/v8/src/compiler/zone-stats.h | 20 +- deps/v8/src/d8/OWNERS | 3 + deps/v8/src/d8/async-hooks-wrapper.cc | 4 +- deps/v8/src/d8/async-hooks-wrapper.h | 3 + deps/v8/src/d8/d8-console.cc | 98 +- deps/v8/src/d8/d8-console.h | 9 +- deps/v8/src/d8/d8-platforms.cc | 9 +- deps/v8/src/d8/d8-posix.cc | 6 +- deps/v8/src/d8/d8-test.cc | 573 +- deps/v8/src/d8/d8.cc | 980 +- deps/v8/src/d8/d8.h | 53 +- deps/v8/src/date/date.cc | 46 +- deps/v8/src/date/date.h | 17 +- deps/v8/src/debug/OWNERS | 1 - deps/v8/src/debug/debug-coverage.cc | 18 +- deps/v8/src/debug/debug-evaluate.cc | 94 +- deps/v8/src/debug/debug-evaluate.h | 2 +- deps/v8/src/debug/debug-frames.cc | 8 +- deps/v8/src/debug/debug-frames.h | 2 +- deps/v8/src/debug/debug-interface.cc | 129 +- deps/v8/src/debug/debug-property-iterator.cc | 8 +- deps/v8/src/debug/debug-scope-iterator.cc | 10 +- deps/v8/src/debug/debug-scope-iterator.h | 2 +- deps/v8/src/debug/debug-scopes.cc | 76 +- deps/v8/src/debug/debug-scopes.h | 15 +- .../src/debug/debug-stack-trace-iterator.cc | 17 +- deps/v8/src/debug/debug-wasm-objects-inl.h | 2 - deps/v8/src/debug/debug-wasm-objects.cc | 282 +- deps/v8/src/debug/debug-wasm-objects.h | 18 +- deps/v8/src/debug/debug.cc | 458 +- deps/v8/src/debug/debug.h | 99 +- deps/v8/src/debug/liveedit.cc | 61 +- .../wasm/gdb-server/wasm-module-debug.cc | 4 +- deps/v8/src/deoptimizer/OWNERS | 3 +- .../v8/src/deoptimizer/arm/deoptimizer-arm.cc | 22 +- .../deoptimizer/arm64/deoptimizer-arm64.cc | 21 +- deps/v8/src/deoptimizer/deoptimize-reason.h | 6 + .../src/deoptimizer/deoptimized-frame-info.cc | 2 +- .../deoptimizer/deoptimizer-cfi-builtins.cc | 17 +- deps/v8/src/deoptimizer/deoptimizer.cc | 680 +- deps/v8/src/deoptimizer/deoptimizer.h | 25 +- deps/v8/src/deoptimizer/frame-description.h | 163 +- .../deoptimizer/frame-translation-builder.cc | 60 +- .../deoptimizer/frame-translation-builder.h | 9 +- .../src/deoptimizer/ia32/deoptimizer-ia32.cc | 20 +- .../loong64/deoptimizer-loong64.cc | 21 +- .../deoptimizer/materialized-object-store.cc | 10 +- .../deoptimizer/materialized-object-store.h | 2 +- .../deoptimizer/mips64/deoptimizer-mips64.cc | 21 +- .../v8/src/deoptimizer/ppc/deoptimizer-ppc.cc | 19 +- .../deoptimizer/riscv/deoptimizer-riscv.cc | 13 +- .../src/deoptimizer/s390/deoptimizer-s390.cc | 19 +- deps/v8/src/deoptimizer/translated-state.cc | 407 +- deps/v8/src/deoptimizer/translated-state.h | 78 +- deps/v8/src/deoptimizer/translation-opcode.h | 4 + .../v8/src/deoptimizer/x64/deoptimizer-x64.cc | 19 +- deps/v8/src/diagnostics/DEPS | 1 + deps/v8/src/diagnostics/arm64/disasm-arm64.cc | 82 +- deps/v8/src/diagnostics/arm64/disasm-arm64.h | 1 + .../src/diagnostics/basic-block-profiler.cc | 38 +- .../v8/src/diagnostics/basic-block-profiler.h | 3 +- deps/v8/src/diagnostics/etw-jit-win.cc | 7 +- deps/v8/src/diagnostics/gdb-jit.cc | 4 +- deps/v8/src/diagnostics/objects-debug.cc | 336 +- deps/v8/src/diagnostics/objects-printer.cc | 700 +- deps/v8/src/diagnostics/perf-jit.cc | 14 +- deps/v8/src/diagnostics/riscv/disasm-riscv.cc | 26 + deps/v8/src/diagnostics/x64/disasm-x64.cc | 16 +- deps/v8/src/execution/arguments-inl.h | 6 +- deps/v8/src/execution/arguments.h | 5 +- .../src/execution/arm/frame-constants-arm.h | 23 + deps/v8/src/execution/arm/simulator-arm.cc | 2 +- .../execution/arm64/frame-constants-arm64.h | 22 +- .../arm64/pointer-authentication-arm64.h | 72 +- .../v8/src/execution/arm64/simulator-arm64.cc | 301 +- deps/v8/src/execution/arm64/simulator-arm64.h | 32 + .../execution/arm64/simulator-logic-arm64.cc | 295 +- deps/v8/src/execution/encoded-c-signature.cc | 6 +- deps/v8/src/execution/encoded-c-signature.h | 27 +- deps/v8/src/execution/execution.cc | 66 +- deps/v8/src/execution/execution.h | 4 +- deps/v8/src/execution/frame-constants.h | 199 +- deps/v8/src/execution/frames-inl.h | 83 +- deps/v8/src/execution/frames.cc | 628 +- deps/v8/src/execution/frames.h | 140 +- deps/v8/src/execution/futex-emulation.cc | 37 +- deps/v8/src/execution/futex-emulation.h | 6 +- .../src/execution/ia32/frame-constants-ia32.h | 15 +- deps/v8/src/execution/isolate-data.h | 215 +- deps/v8/src/execution/isolate-inl.h | 50 +- deps/v8/src/execution/isolate.cc | 1558 ++- deps/v8/src/execution/isolate.h | 310 +- deps/v8/src/execution/local-isolate-inl.h | 13 +- deps/v8/src/execution/local-isolate.h | 11 +- .../loong64/frame-constants-loong64.h | 27 +- .../execution/loong64/simulator-loong64.cc | 2 +- deps/v8/src/execution/messages.cc | 295 +- deps/v8/src/execution/messages.h | 47 +- deps/v8/src/execution/microtask-queue.cc | 84 +- deps/v8/src/execution/microtask-queue.h | 4 +- .../execution/mips64/frame-constants-mips64.h | 23 +- .../src/execution/mips64/simulator-mips64.cc | 2 +- .../execution/pointer-authentication-dummy.h | 12 + .../v8/src/execution/pointer-authentication.h | 7 + .../src/execution/ppc/frame-constants-ppc.h | 13 + deps/v8/src/execution/ppc/simulator-ppc.cc | 2 +- deps/v8/src/execution/protectors-inl.h | 2 +- .../execution/riscv/frame-constants-riscv.h | 12 + .../v8/src/execution/riscv/simulator-riscv.cc | 338 +- deps/v8/src/execution/riscv/simulator-riscv.h | 63 +- .../execution/s390/frame-constants-s390.cc | 6 +- .../src/execution/s390/frame-constants-s390.h | 11 + deps/v8/src/execution/s390/simulator-s390.cc | 2 +- deps/v8/src/execution/simulator-base.h | 10 +- deps/v8/src/execution/simulator.h | 9 + deps/v8/src/execution/thread-local-top.h | 4 + deps/v8/src/execution/tiering-manager.cc | 67 +- deps/v8/src/execution/vm-state-inl.h | 8 +- deps/v8/src/execution/vm-state.h | 11 +- .../src/execution/x64/frame-constants-x64.h | 47 +- .../externalize-string-extension.cc | 10 +- .../v8/src/extensions/statistics-extension.cc | 6 +- deps/v8/src/flags/flag-definitions.h | 462 +- deps/v8/src/flags/flags-impl.h | 6 + deps/v8/src/flags/flags.cc | 45 +- deps/v8/src/flags/flags.h | 1 + deps/v8/src/fuzzilli/cov.cc | 18 +- deps/v8/src/fuzzilli/fuzzilli.cc | 24 +- deps/v8/src/handles/global-handles-inl.h | 4 +- deps/v8/src/handles/global-handles.cc | 2 +- deps/v8/src/handles/global-handles.h | 2 +- deps/v8/src/handles/handles-inl.h | 59 +- deps/v8/src/handles/handles.cc | 8 +- deps/v8/src/handles/handles.h | 276 +- deps/v8/src/handles/maybe-handles-inl.h | 53 +- deps/v8/src/handles/maybe-handles.h | 15 +- deps/v8/src/handles/traced-handles-inl.h | 40 +- deps/v8/src/handles/traced-handles.cc | 290 +- deps/v8/src/handles/traced-handles.h | 81 +- deps/v8/src/heap/WRITE_BARRIER.md | 68 + deps/v8/src/heap/allocation-result.h | 11 +- deps/v8/src/heap/array-buffer-sweeper.cc | 407 +- deps/v8/src/heap/array-buffer-sweeper.h | 29 +- .../heap/base/asm/arm/push_registers_asm.cc | 8 +- .../heap/base/asm/arm64/push_registers_asm.cc | 8 +- .../heap/base/asm/ia32/push_registers_asm.cc | 9 +- .../base/asm/loong64/push_registers_asm.cc | 5 +- .../heap/base/asm/riscv/push_registers_asm.cc | 10 +- .../heap/base/asm/x64/push_registers_asm.cc | 64 +- .../heap/base/asm/x64/push_registers_masm.asm | 15 +- .../heap/base/asm/zos/push_registers_asm.cc | 37 + deps/v8/src/heap/base/bytes.h | 4 +- deps/v8/src/heap/base/cached-unordered-map.h | 86 + .../heap/base/incremental-marking-schedule.h | 4 +- deps/v8/src/heap/base/memory-tagging.cc | 7 + deps/v8/src/heap/base/stack.cc | 178 +- deps/v8/src/heap/base/stack.h | 123 +- deps/v8/src/heap/base/worklist.h | 5 +- deps/v8/src/heap/code-range.cc | 102 +- deps/v8/src/heap/code-range.h | 14 +- deps/v8/src/heap/code-stats.cc | 8 +- deps/v8/src/heap/collection-barrier.cc | 2 +- deps/v8/src/heap/collection-barrier.h | 1 - deps/v8/src/heap/concurrent-marking.cc | 64 +- deps/v8/src/heap/concurrent-marking.h | 82 +- .../v8/src/heap/conservative-stack-visitor.cc | 84 +- deps/v8/src/heap/conservative-stack-visitor.h | 17 +- deps/v8/src/heap/cppgc-js/cpp-heap.cc | 99 +- deps/v8/src/heap/cppgc-js/cpp-heap.h | 50 +- .../src/heap/cppgc-js/cpp-marking-state-inl.h | 33 +- deps/v8/src/heap/cppgc-js/cpp-marking-state.h | 33 +- deps/v8/src/heap/cppgc-js/cpp-snapshot.cc | 59 +- .../cppgc-js/unified-heap-marking-state-inl.h | 24 +- .../cppgc-js/unified-heap-marking-state.cc | 6 - .../cppgc-js/unified-heap-marking-state.h | 4 - .../cppgc-js/unified-heap-marking-verifier.cc | 8 +- .../cppgc-js/unified-heap-marking-visitor.cc | 4 +- .../v8/src/heap/cppgc-js/wrappable-info-inl.h | 50 - deps/v8/src/heap/cppgc-js/wrappable-info.h | 35 - deps/v8/src/heap/cppgc/DEPS | 1 + deps/v8/src/heap/cppgc/compactor.cc | 1 + deps/v8/src/heap/cppgc/explicit-management.cc | 21 + deps/v8/src/heap/cppgc/garbage-collector.h | 3 +- deps/v8/src/heap/cppgc/gc-info.cc | 7 +- deps/v8/src/heap/cppgc/gc-invoker.cc | 7 +- deps/v8/src/heap/cppgc/gc-invoker.h | 4 +- deps/v8/src/heap/cppgc/globals.h | 6 + deps/v8/src/heap/cppgc/heap-base.cc | 16 +- deps/v8/src/heap/cppgc/heap-config.h | 5 + deps/v8/src/heap/cppgc/heap-object-header.cc | 9 +- deps/v8/src/heap/cppgc/heap-object-header.h | 21 +- deps/v8/src/heap/cppgc/heap-page.cc | 14 +- deps/v8/src/heap/cppgc/heap-page.h | 47 +- .../heap/cppgc/heap-statistics-collector.cc | 8 + deps/v8/src/heap/cppgc/heap.h | 6 +- deps/v8/src/heap/cppgc/marker.cc | 65 +- deps/v8/src/heap/cppgc/marker.h | 28 +- deps/v8/src/heap/cppgc/marking-state.cc | 4 + deps/v8/src/heap/cppgc/marking-state.h | 30 +- deps/v8/src/heap/cppgc/marking-verifier.cc | 36 +- deps/v8/src/heap/cppgc/marking-verifier.h | 8 +- deps/v8/src/heap/cppgc/marking-visitor.cc | 3 +- deps/v8/src/heap/cppgc/name-trait.cc | 2 +- deps/v8/src/heap/cppgc/object-allocator.cc | 18 + deps/v8/src/heap/cppgc/object-allocator.h | 5 +- deps/v8/src/heap/cppgc/page-memory.cc | 62 +- deps/v8/src/heap/cppgc/page-memory.h | 22 +- deps/v8/src/heap/cppgc/stats-collector.h | 1 + deps/v8/src/heap/cppgc/sweeper.cc | 735 +- deps/v8/src/heap/cppgc/task-handle.h | 6 + deps/v8/src/heap/cppgc/trace-event.h | 4 +- deps/v8/src/heap/cppgc/unmarker.h | 14 +- deps/v8/src/heap/evacuation-allocator.h | 12 +- deps/v8/src/heap/evacuation-verifier-inl.h | 5 +- deps/v8/src/heap/factory-base-inl.h | 18 +- deps/v8/src/heap/factory-base.cc | 162 +- deps/v8/src/heap/factory-base.h | 39 +- deps/v8/src/heap/factory-inl.h | 72 +- deps/v8/src/heap/factory.cc | 862 +- deps/v8/src/heap/factory.h | 150 +- deps/v8/src/heap/free-list-inl.h | 1 + deps/v8/src/heap/free-list.cc | 6 +- deps/v8/src/heap/free-list.h | 18 +- deps/v8/src/heap/gc-idle-time-handler.cc | 41 - deps/v8/src/heap/gc-idle-time-handler.h | 47 - deps/v8/src/heap/gc-tracer.cc | 238 +- deps/v8/src/heap/gc-tracer.h | 49 +- deps/v8/src/heap/heap-allocator-inl.h | 26 +- deps/v8/src/heap/heap-allocator.cc | 172 +- deps/v8/src/heap/heap-allocator.h | 31 +- deps/v8/src/heap/heap-controller.cc | 30 +- deps/v8/src/heap/heap-controller.h | 4 +- deps/v8/src/heap/heap-inl.h | 65 +- deps/v8/src/heap/heap-layout-tracer.cc | 16 +- deps/v8/src/heap/heap-layout-tracer.h | 6 +- deps/v8/src/heap/heap-verifier.cc | 95 +- deps/v8/src/heap/heap-write-barrier-inl.h | 140 +- deps/v8/src/heap/heap-write-barrier.cc | 49 +- deps/v8/src/heap/heap-write-barrier.h | 18 +- deps/v8/src/heap/heap.cc | 1272 +-- deps/v8/src/heap/heap.h | 261 +- deps/v8/src/heap/incremental-marking-inl.h | 8 +- deps/v8/src/heap/incremental-marking-job.cc | 8 +- deps/v8/src/heap/incremental-marking-job.h | 9 +- deps/v8/src/heap/incremental-marking.cc | 120 +- deps/v8/src/heap/incremental-marking.h | 18 +- deps/v8/src/heap/index-generator.cc | 4 +- deps/v8/src/heap/index-generator.h | 4 +- deps/v8/src/heap/large-page-metadata-inl.h | 23 + .../{large-page.cc => large-page-metadata.cc} | 34 +- .../{large-page.h => large-page-metadata.h} | 18 +- deps/v8/src/heap/large-spaces.cc | 27 +- deps/v8/src/heap/large-spaces.h | 10 +- deps/v8/src/heap/local-factory-inl.h | 2 +- deps/v8/src/heap/local-heap-inl.h | 47 +- deps/v8/src/heap/local-heap.cc | 73 +- deps/v8/src/heap/local-heap.h | 28 +- deps/v8/src/heap/main-allocator-inl.h | 6 + deps/v8/src/heap/main-allocator.cc | 53 +- deps/v8/src/heap/main-allocator.h | 28 +- deps/v8/src/heap/mark-compact-inl.h | 51 +- deps/v8/src/heap/mark-compact.cc | 1016 +- deps/v8/src/heap/mark-compact.h | 73 +- deps/v8/src/heap/mark-sweep-utilities.cc | 21 +- deps/v8/src/heap/marking-barrier-inl.h | 36 +- deps/v8/src/heap/marking-barrier.cc | 191 +- deps/v8/src/heap/marking-barrier.h | 10 +- deps/v8/src/heap/marking-inl.h | 59 + deps/v8/src/heap/marking-state-inl.h | 2 +- deps/v8/src/heap/marking-visitor-inl.h | 369 +- deps/v8/src/heap/marking-visitor.h | 89 +- deps/v8/src/heap/marking-worklist-inl.h | 24 +- deps/v8/src/heap/marking-worklist.cc | 72 +- deps/v8/src/heap/marking-worklist.h | 18 +- deps/v8/src/heap/marking.h | 44 +- deps/v8/src/heap/memory-allocator.cc | 372 +- deps/v8/src/heap/memory-allocator.h | 38 +- deps/v8/src/heap/memory-balancer.h | 6 +- deps/v8/src/heap/memory-chunk-inl.h | 40 + deps/v8/src/heap/memory-chunk-layout.cc | 40 +- deps/v8/src/heap/memory-chunk-layout.h | 39 +- deps/v8/src/heap/memory-chunk-metadata-inl.h | 52 + deps/v8/src/heap/memory-chunk-metadata.cc | 40 +- deps/v8/src/heap/memory-chunk-metadata.h | 81 +- deps/v8/src/heap/memory-chunk.cc | 200 +- deps/v8/src/heap/memory-chunk.h | 204 +- deps/v8/src/heap/memory-measurement.cc | 31 +- deps/v8/src/heap/memory-reducer.cc | 2 +- deps/v8/src/heap/minor-gc-job.cc | 18 +- deps/v8/src/heap/minor-mark-sweep-inl.h | 7 +- deps/v8/src/heap/minor-mark-sweep.cc | 251 +- deps/v8/src/heap/minor-mark-sweep.h | 24 +- ...page-inl.h => mutable-page-metadata-inl.h} | 23 +- ...table-page.cc => mutable-page-metadata.cc} | 104 +- ...mutable-page.h => mutable-page-metadata.h} | 58 +- deps/v8/src/heap/new-spaces-inl.h | 18 +- deps/v8/src/heap/new-spaces.cc | 79 +- deps/v8/src/heap/new-spaces.h | 28 +- deps/v8/src/heap/object-lock-inl.h | 45 + deps/v8/src/heap/object-lock.h | 26 +- deps/v8/src/heap/object-stats.cc | 75 +- deps/v8/src/heap/object-stats.h | 2 +- deps/v8/src/heap/objects-visiting-inl.h | 228 +- deps/v8/src/heap/objects-visiting.cc | 22 +- deps/v8/src/heap/objects-visiting.h | 212 +- .../heap/{page-inl.h => page-metadata-inl.h} | 32 +- .../v8/src/heap/{page.cc => page-metadata.cc} | 25 +- deps/v8/src/heap/{page.h => page-metadata.h} | 37 +- deps/v8/src/heap/paged-spaces.cc | 52 +- deps/v8/src/heap/paged-spaces.h | 74 +- deps/v8/src/heap/parked-scope-inl.h | 20 +- deps/v8/src/heap/parked-scope.h | 31 +- deps/v8/src/heap/pretenuring-handler-inl.h | 13 +- deps/v8/src/heap/pretenuring-handler.cc | 9 +- deps/v8/src/heap/read-only-heap.cc | 28 +- deps/v8/src/heap/read-only-heap.h | 2 +- deps/v8/src/heap/read-only-promotion.cc | 160 +- deps/v8/src/heap/read-only-spaces.cc | 42 +- deps/v8/src/heap/read-only-spaces.h | 22 +- deps/v8/src/heap/reference-summarizer.cc | 27 +- deps/v8/src/heap/remembered-set-inl.h | 4 +- deps/v8/src/heap/remembered-set.h | 19 +- deps/v8/src/heap/safepoint.cc | 5 +- deps/v8/src/heap/safepoint.h | 6 +- deps/v8/src/heap/scavenger-inl.h | 65 +- deps/v8/src/heap/scavenger.cc | 87 +- deps/v8/src/heap/scavenger.h | 13 +- deps/v8/src/heap/setup-heap-internal.cc | 239 +- deps/v8/src/heap/spaces-inl.h | 4 +- deps/v8/src/heap/spaces.cc | 2 +- deps/v8/src/heap/spaces.h | 7 +- deps/v8/src/heap/sweeper.cc | 402 +- deps/v8/src/heap/sweeper.h | 56 +- .../heap/traced-handles-marking-visitor.cc | 25 +- .../src/heap/traced-handles-marking-visitor.h | 3 - deps/v8/src/heap/trusted-range.cc | 5 +- deps/v8/src/heap/weak-object-worklists.cc | 39 +- deps/v8/src/heap/weak-object-worklists.h | 77 +- .../young-generation-marking-visitor-inl.h | 118 +- .../heap/young-generation-marking-visitor.h | 26 +- deps/v8/src/heap/zapping.cc | 1 + deps/v8/src/ic/accessor-assembler.cc | 254 +- deps/v8/src/ic/accessor-assembler.h | 3 - deps/v8/src/ic/binary-op-assembler.cc | 4 +- deps/v8/src/ic/call-optimization.cc | 16 +- deps/v8/src/ic/call-optimization.h | 2 +- deps/v8/src/ic/handler-configuration-inl.h | 9 +- deps/v8/src/ic/handler-configuration.cc | 55 +- deps/v8/src/ic/handler-configuration.h | 14 +- deps/v8/src/ic/ic-inl.h | 4 +- deps/v8/src/ic/ic-stats.cc | 2 +- deps/v8/src/ic/ic.cc | 944 +- deps/v8/src/ic/ic.h | 39 +- deps/v8/src/ic/stub-cache.cc | 4 +- deps/v8/src/init/OWNERS | 1 - deps/v8/src/init/bootstrapper.cc | 785 +- deps/v8/src/init/bootstrapper.h | 2 +- deps/v8/src/init/heap-symbols.h | 141 +- deps/v8/src/init/isolate-allocator.cc | 142 - deps/v8/src/init/isolate-allocator.h | 67 - deps/v8/src/init/isolate-group.cc | 218 + deps/v8/src/init/isolate-group.h | 167 + deps/v8/src/init/v8.cc | 155 +- deps/v8/src/inspector/DEPS | 1 + deps/v8/src/inspector/OWNERS | 1 - deps/v8/src/inspector/custom-preview.cc | 4 + deps/v8/src/inspector/v8-console-message.cc | 69 +- deps/v8/src/inspector/v8-console-message.h | 24 +- deps/v8/src/inspector/v8-console.cc | 301 +- deps/v8/src/inspector/v8-debugger.cc | 18 +- .../inspector/v8-heap-profiler-agent-impl.cc | 2 +- deps/v8/src/inspector/v8-inspector-impl.cc | 9 + deps/v8/src/inspector/value-mirror.cc | 78 +- .../src/interpreter/bytecode-array-builder.cc | 42 +- .../src/interpreter/bytecode-array-builder.h | 24 +- .../interpreter/bytecode-array-iterator.cc | 19 +- .../src/interpreter/bytecode-array-iterator.h | 2 +- .../src/interpreter/bytecode-array-writer.cc | 19 +- .../src/interpreter/bytecode-array-writer.h | 3 +- deps/v8/src/interpreter/bytecode-decoder.cc | 3 +- ...-flags.cc => bytecode-flags-and-tokens.cc} | 2 +- ...de-flags.h => bytecode-flags-and-tokens.h} | 18 +- deps/v8/src/interpreter/bytecode-generator.cc | 252 +- deps/v8/src/interpreter/bytecode-generator.h | 16 +- deps/v8/src/interpreter/bytecode-operands.h | 9 +- .../bytecode-register-optimizer.cc | 89 +- .../interpreter/bytecode-register-optimizer.h | 15 +- deps/v8/src/interpreter/bytecode-traits.h | 183 +- deps/v8/src/interpreter/bytecodes.cc | 52 +- deps/v8/src/interpreter/bytecodes.h | 48 +- .../src/interpreter/constant-array-builder.cc | 9 +- .../src/interpreter/constant-array-builder.h | 3 +- .../src/interpreter/control-flow-builders.cc | 6 +- .../src/interpreter/control-flow-builders.h | 10 +- .../src/interpreter/interpreter-assembler.cc | 48 +- .../src/interpreter/interpreter-assembler.h | 14 +- .../src/interpreter/interpreter-generator.cc | 159 +- .../interpreter-intrinsics-generator.cc | 26 +- .../src/interpreter/interpreter-intrinsics.h | 8 +- deps/v8/src/interpreter/interpreter.cc | 29 +- deps/v8/src/json/json-parser.cc | 355 +- deps/v8/src/json/json-parser.h | 31 +- deps/v8/src/json/json-stringifier.cc | 148 +- deps/v8/src/libplatform/DEPS | 1 + .../default-foreground-task-runner.cc | 71 +- .../default-foreground-task-runner.h | 31 +- .../src/libplatform/tracing/trace-object.cc | 2 +- .../src/libplatform/tracing/trace-writer.cc | 2 +- deps/v8/src/libsampler/sampler.cc | 36 +- deps/v8/src/libsampler/sampler.h | 2 +- deps/v8/src/logging/code-events.h | 46 +- deps/v8/src/logging/counters-definitions.h | 48 +- deps/v8/src/logging/counters.h | 1 - deps/v8/src/logging/log-file.cc | 6 +- deps/v8/src/logging/log.cc | 169 +- deps/v8/src/logging/log.h | 10 +- deps/v8/src/logging/runtime-call-stats.h | 21 +- deps/v8/src/maglev/OWNERS | 5 +- .../src/maglev/arm/maglev-assembler-arm-inl.h | 22 +- .../v8/src/maglev/arm/maglev-assembler-arm.cc | 148 +- deps/v8/src/maglev/arm/maglev-ir-arm.cc | 60 +- .../maglev/arm64/maglev-assembler-arm64-inl.h | 20 + .../maglev/arm64/maglev-assembler-arm64.cc | 150 +- deps/v8/src/maglev/arm64/maglev-ir-arm64.cc | 60 +- deps/v8/src/maglev/maglev-assembler-inl.h | 29 +- deps/v8/src/maglev/maglev-assembler.cc | 43 + deps/v8/src/maglev/maglev-assembler.h | 52 +- deps/v8/src/maglev/maglev-basic-block.h | 135 +- deps/v8/src/maglev/maglev-code-gen-state.h | 10 +- deps/v8/src/maglev/maglev-code-generator.cc | 466 +- deps/v8/src/maglev/maglev-code-generator.h | 4 +- deps/v8/src/maglev/maglev-compilation-info.cc | 33 +- deps/v8/src/maglev/maglev-compilation-info.h | 33 +- deps/v8/src/maglev/maglev-compilation-unit.cc | 8 +- deps/v8/src/maglev/maglev-compilation-unit.h | 17 +- deps/v8/src/maglev/maglev-compiler.cc | 520 +- .../maglev/maglev-concurrent-dispatcher.cc | 18 +- .../src/maglev/maglev-concurrent-dispatcher.h | 2 +- deps/v8/src/maglev/maglev-graph-builder.cc | 5777 +++++++---- deps/v8/src/maglev/maglev-graph-builder.h | 986 +- deps/v8/src/maglev/maglev-graph-labeller.h | 7 + deps/v8/src/maglev/maglev-graph-printer.cc | 80 +- deps/v8/src/maglev/maglev-graph-processor.h | 27 +- deps/v8/src/maglev/maglev-graph.h | 77 +- .../maglev/maglev-interpreter-frame-state.cc | 783 +- .../maglev/maglev-interpreter-frame-state.h | 287 +- deps/v8/src/maglev/maglev-ir-inl.h | 256 +- deps/v8/src/maglev/maglev-ir.cc | 970 +- deps/v8/src/maglev/maglev-ir.h | 1177 ++- .../maglev-phi-representation-selector.cc | 42 +- ...maglev-post-hoc-optimizations-processors.h | 211 + .../maglev-pre-regalloc-codegen-processors.h | 356 + deps/v8/src/maglev/maglev-regalloc.cc | 18 +- deps/v8/src/maglev/maglev.cc | 3 + deps/v8/src/maglev/maglev.h | 1 + .../maglev/s390/maglev-assembler-s390-inl.h | 1268 +++ .../src/maglev/s390/maglev-assembler-s390.cc | 567 ++ deps/v8/src/maglev/s390/maglev-ir-s390.cc | 826 ++ .../src/maglev/x64/maglev-assembler-x64-inl.h | 18 + .../v8/src/maglev/x64/maglev-assembler-x64.cc | 149 +- deps/v8/src/maglev/x64/maglev-ir-x64.cc | 55 +- deps/v8/src/numbers/conversions-inl.h | 12 +- deps/v8/src/numbers/conversions.cc | 6 +- deps/v8/src/numbers/conversions.h | 7 +- deps/v8/src/numbers/math-random.cc | 14 +- deps/v8/src/numbers/math-random.h | 2 +- deps/v8/src/objects/abstract-code-inl.h | 20 +- deps/v8/src/objects/abstract-code.cc | 42 +- deps/v8/src/objects/abstract-code.h | 4 - deps/v8/src/objects/all-objects-inl.h | 1 + deps/v8/src/objects/allocation-site-inl.h | 16 +- .../src/objects/allocation-site-scopes-inl.h | 9 +- deps/v8/src/objects/allocation-site-scopes.h | 6 +- deps/v8/src/objects/allocation-site.h | 3 +- deps/v8/src/objects/api-callbacks-inl.h | 3 +- deps/v8/src/objects/api-callbacks.h | 4 +- deps/v8/src/objects/api-callbacks.tq | 1 - deps/v8/src/objects/arguments-inl.h | 1 - deps/v8/src/objects/arguments.h | 1 - deps/v8/src/objects/arguments.tq | 9 + deps/v8/src/objects/backing-store.cc | 50 +- deps/v8/src/objects/backing-store.h | 2 - deps/v8/src/objects/bigint-inl.h | 17 +- deps/v8/src/objects/bigint.cc | 406 +- deps/v8/src/objects/bigint.h | 66 +- deps/v8/src/objects/bytecode-array-inl.h | 40 +- deps/v8/src/objects/bytecode-array.cc | 26 + deps/v8/src/objects/bytecode-array.h | 15 +- deps/v8/src/objects/bytecode-array.tq | 3 +- deps/v8/src/objects/call-site-info-inl.h | 2 +- deps/v8/src/objects/call-site-info.cc | 152 +- deps/v8/src/objects/call-site-info.h | 31 +- deps/v8/src/objects/casting.h | 155 + deps/v8/src/objects/code-inl.h | 67 +- deps/v8/src/objects/code-kind.h | 6 +- deps/v8/src/objects/code.cc | 46 +- deps/v8/src/objects/code.h | 113 +- .../src/objects/compilation-cache-table-inl.h | 31 +- .../v8/src/objects/compilation-cache-table.cc | 82 +- deps/v8/src/objects/compilation-cache-table.h | 19 +- deps/v8/src/objects/compressed-slots-inl.h | 29 +- deps/v8/src/objects/compressed-slots.h | 7 + deps/v8/src/objects/contexts-inl.h | 50 +- deps/v8/src/objects/contexts.cc | 85 +- deps/v8/src/objects/contexts.h | 59 +- deps/v8/src/objects/contexts.tq | 1 + deps/v8/src/objects/debug-objects-inl.h | 7 +- deps/v8/src/objects/debug-objects.cc | 140 +- deps/v8/src/objects/debug-objects.h | 51 +- deps/v8/src/objects/debug-objects.tq | 5 - deps/v8/src/objects/deoptimization-data-inl.h | 66 +- deps/v8/src/objects/deoptimization-data.cc | 132 +- deps/v8/src/objects/deoptimization-data.h | 166 +- deps/v8/src/objects/dependent-code-inl.h | 1 - deps/v8/src/objects/dependent-code.cc | 35 +- deps/v8/src/objects/dependent-code.h | 6 +- deps/v8/src/objects/descriptor-array-inl.h | 7 +- deps/v8/src/objects/descriptor-array.h | 12 +- deps/v8/src/objects/dictionary-inl.h | 48 +- deps/v8/src/objects/dictionary.h | 16 +- deps/v8/src/objects/elements-kind.cc | 1 + deps/v8/src/objects/elements.cc | 785 +- deps/v8/src/objects/embedder-data-array.cc | 29 + deps/v8/src/objects/embedder-data-slot-inl.h | 53 +- deps/v8/src/objects/embedder-data-slot.h | 13 +- deps/v8/src/objects/feedback-cell-inl.h | 17 +- deps/v8/src/objects/feedback-cell.h | 12 +- deps/v8/src/objects/feedback-cell.tq | 1 + deps/v8/src/objects/feedback-vector-inl.h | 12 +- deps/v8/src/objects/feedback-vector.cc | 130 +- deps/v8/src/objects/feedback-vector.h | 31 +- deps/v8/src/objects/feedback-vector.tq | 3 +- deps/v8/src/objects/field-type.cc | 18 +- deps/v8/src/objects/field-type.h | 19 +- deps/v8/src/objects/fixed-array-inl.h | 190 +- deps/v8/src/objects/fixed-array.cc | 12 +- deps/v8/src/objects/fixed-array.h | 175 +- deps/v8/src/objects/fixed-array.tq | 6 + deps/v8/src/objects/foreign-inl.h | 49 +- deps/v8/src/objects/foreign.h | 44 +- deps/v8/src/objects/foreign.tq | 5 +- deps/v8/src/objects/free-space-inl.h | 14 +- deps/v8/src/objects/free-space.h | 3 - deps/v8/src/objects/function-kind.h | 10 +- deps/v8/src/objects/hash-table-inl.h | 37 +- deps/v8/src/objects/hash-table.h | 28 +- deps/v8/src/objects/heap-number-inl.h | 5 - deps/v8/src/objects/heap-number.h | 1 - deps/v8/src/objects/heap-object.h | 40 +- deps/v8/src/objects/hole-inl.h | 6 +- deps/v8/src/objects/hole.h | 6 +- deps/v8/src/objects/instance-type-checker.h | 8 +- deps/v8/src/objects/instruction-stream-inl.h | 50 +- deps/v8/src/objects/instruction-stream.cc | 15 +- deps/v8/src/objects/instruction-stream.h | 18 +- deps/v8/src/objects/intl-objects.cc | 152 +- deps/v8/src/objects/intl-objects.h | 37 +- deps/v8/src/objects/js-array-buffer-inl.h | 50 +- deps/v8/src/objects/js-array-buffer.cc | 24 +- deps/v8/src/objects/js-array-buffer.h | 41 +- deps/v8/src/objects/js-array-buffer.tq | 10 +- deps/v8/src/objects/js-array-inl.h | 18 +- deps/v8/src/objects/js-array.h | 14 +- .../objects/js-atomics-synchronization-inl.h | 22 +- .../src/objects/js-atomics-synchronization.cc | 1423 ++- .../src/objects/js-atomics-synchronization.h | 185 +- deps/v8/src/objects/js-break-iterator.cc | 41 +- deps/v8/src/objects/js-break-iterator.h | 16 +- deps/v8/src/objects/js-collator.cc | 29 +- deps/v8/src/objects/js-collator.h | 4 +- deps/v8/src/objects/js-collection-inl.h | 5 +- deps/v8/src/objects/js-collection.h | 27 +- deps/v8/src/objects/js-date-time-format.cc | 267 +- deps/v8/src/objects/js-date-time-format.h | 14 +- deps/v8/src/objects/js-display-names.cc | 38 +- deps/v8/src/objects/js-display-names.h | 10 +- deps/v8/src/objects/js-disposable-stack-inl.h | 192 + deps/v8/src/objects/js-disposable-stack.cc | 164 + deps/v8/src/objects/js-disposable-stack.h | 110 + deps/v8/src/objects/js-disposable-stack.tq | 33 + deps/v8/src/objects/js-duration-format-inl.h | 6 +- deps/v8/src/objects/js-duration-format.cc | 700 +- deps/v8/src/objects/js-duration-format.h | 7 +- deps/v8/src/objects/js-duration-format.tq | 6 +- deps/v8/src/objects/js-function-inl.h | 24 +- deps/v8/src/objects/js-function.cc | 243 +- deps/v8/src/objects/js-function.h | 38 +- deps/v8/src/objects/js-iterator-helpers-inl.h | 6 - deps/v8/src/objects/js-iterator-helpers.h | 5 - deps/v8/src/objects/js-iterator-helpers.tq | 5 +- deps/v8/src/objects/js-list-format.cc | 53 +- deps/v8/src/objects/js-list-format.h | 14 +- deps/v8/src/objects/js-locale.cc | 161 +- deps/v8/src/objects/js-locale.h | 56 +- deps/v8/src/objects/js-number-format.cc | 102 +- deps/v8/src/objects/js-number-format.h | 18 +- deps/v8/src/objects/js-objects-inl.h | 105 +- deps/v8/src/objects/js-objects.cc | 1072 +- deps/v8/src/objects/js-objects.h | 196 +- deps/v8/src/objects/js-objects.tq | 22 +- deps/v8/src/objects/js-plural-rules.cc | 39 +- deps/v8/src/objects/js-plural-rules.h | 12 +- deps/v8/src/objects/js-promise-inl.h | 1 - deps/v8/src/objects/js-promise.h | 12 +- deps/v8/src/objects/js-promise.tq | 1 - deps/v8/src/objects/js-proxy.h | 37 +- deps/v8/src/objects/js-raw-json.cc | 5 +- deps/v8/src/objects/js-regexp-inl.h | 14 +- deps/v8/src/objects/js-regexp.cc | 74 +- deps/v8/src/objects/js-regexp.h | 20 +- .../v8/src/objects/js-relative-time-format.cc | 74 +- deps/v8/src/objects/js-relative-time-format.h | 8 +- deps/v8/src/objects/js-segment-iterator-inl.h | 2 + deps/v8/src/objects/js-segment-iterator.cc | 95 +- deps/v8/src/objects/js-segment-iterator.h | 20 +- deps/v8/src/objects/js-segment-iterator.tq | 16 +- deps/v8/src/objects/js-segmenter.cc | 25 +- deps/v8/src/objects/js-segmenter.h | 4 +- deps/v8/src/objects/js-segments.cc | 75 +- deps/v8/src/objects/js-segments.h | 17 +- deps/v8/src/objects/js-shared-array-inl.h | 2 - deps/v8/src/objects/js-shared-array.h | 1 - deps/v8/src/objects/js-struct-inl.h | 2 - deps/v8/src/objects/js-struct.cc | 37 +- deps/v8/src/objects/js-struct.h | 9 +- deps/v8/src/objects/js-temporal-objects.cc | 2903 +++--- deps/v8/src/objects/js-temporal-objects.h | 256 +- deps/v8/src/objects/js-weak-refs-inl.h | 38 +- deps/v8/src/objects/js-weak-refs.h | 6 +- deps/v8/src/objects/keys.cc | 185 +- deps/v8/src/objects/keys.h | 28 +- deps/v8/src/objects/literal-objects-inl.h | 4 +- deps/v8/src/objects/literal-objects.cc | 30 +- deps/v8/src/objects/literal-objects.h | 2 - deps/v8/src/objects/lookup-inl.h | 61 +- deps/v8/src/objects/lookup.cc | 148 +- deps/v8/src/objects/lookup.h | 54 +- deps/v8/src/objects/managed-inl.h | 65 +- deps/v8/src/objects/managed.cc | 4 + deps/v8/src/objects/managed.h | 141 +- deps/v8/src/objects/map-inl.h | 75 +- deps/v8/src/objects/map-updater.cc | 280 +- deps/v8/src/objects/map-updater.h | 25 +- deps/v8/src/objects/map.cc | 464 +- deps/v8/src/objects/map.h | 259 +- deps/v8/src/objects/maybe-object-inl.h | 3 +- deps/v8/src/objects/module-inl.h | 54 +- deps/v8/src/objects/module.cc | 154 +- deps/v8/src/objects/module.h | 21 +- deps/v8/src/objects/name-inl.h | 35 +- deps/v8/src/objects/name.h | 5 +- deps/v8/src/objects/object-list-macros.h | 44 +- deps/v8/src/objects/object-macros-undef.h | 2 - deps/v8/src/objects/object-macros.h | 102 +- deps/v8/src/objects/object-type.cc | 2 +- .../objects/objects-body-descriptors-inl.h | 509 +- .../v8/src/objects/objects-body-descriptors.h | 164 +- deps/v8/src/objects/objects-definitions.h | 1 - deps/v8/src/objects/objects-inl.h | 520 +- deps/v8/src/objects/objects.cc | 1630 ++-- deps/v8/src/objects/objects.h | 97 +- deps/v8/src/objects/oddball-inl.h | 41 +- deps/v8/src/objects/oddball.h | 21 +- deps/v8/src/objects/off-heap-hash-table.h | 1 - deps/v8/src/objects/option-utils.cc | 25 +- deps/v8/src/objects/ordered-hash-table-inl.h | 27 +- deps/v8/src/objects/ordered-hash-table.cc | 164 +- deps/v8/src/objects/ordered-hash-table.h | 62 +- .../src/objects/primitive-heap-object-inl.h | 5 - deps/v8/src/objects/primitive-heap-object.h | 1 - deps/v8/src/objects/property-array-inl.h | 18 +- deps/v8/src/objects/property-array.h | 10 +- deps/v8/src/objects/property-cell-inl.h | 6 +- deps/v8/src/objects/property-cell.h | 11 +- .../src/objects/property-descriptor-object.tq | 4 +- deps/v8/src/objects/property-descriptor.cc | 44 +- deps/v8/src/objects/property-descriptor.h | 28 +- deps/v8/src/objects/property-details.h | 2 +- deps/v8/src/objects/property.cc | 2 +- deps/v8/src/objects/property.h | 2 +- deps/v8/src/objects/prototype-info-inl.h | 25 +- deps/v8/src/objects/prototype-info.h | 17 +- deps/v8/src/objects/prototype-inl.h | 14 +- deps/v8/src/objects/prototype.h | 7 +- deps/v8/src/objects/regexp-match-info-inl.h | 1 - deps/v8/src/objects/regexp-match-info.h | 1 - deps/v8/src/objects/scope-info-inl.h | 4 +- deps/v8/src/objects/scope-info.cc | 207 +- deps/v8/src/objects/scope-info.h | 35 +- deps/v8/src/objects/scope-info.tq | 26 +- deps/v8/src/objects/script-inl.h | 51 +- deps/v8/src/objects/script.h | 56 +- deps/v8/src/objects/script.tq | 2 +- .../v8/src/objects/shared-function-info-inl.h | 210 +- deps/v8/src/objects/shared-function-info.cc | 150 +- deps/v8/src/objects/shared-function-info.h | 60 +- deps/v8/src/objects/shared-function-info.tq | 20 +- deps/v8/src/objects/simd.cc | 6 +- deps/v8/src/objects/slots-inl.h | 92 +- deps/v8/src/objects/slots.h | 78 +- deps/v8/src/objects/smi.h | 9 +- deps/v8/src/objects/source-text-module.cc | 786 +- deps/v8/src/objects/source-text-module.h | 106 +- deps/v8/src/objects/source-text-module.tq | 15 +- .../src/objects/string-forwarding-table-inl.h | 10 +- .../v8/src/objects/string-forwarding-table.cc | 8 +- deps/v8/src/objects/string-inl.h | 119 +- deps/v8/src/objects/string-set-inl.h | 6 +- deps/v8/src/objects/string-set.h | 5 +- deps/v8/src/objects/string-table.cc | 93 +- deps/v8/src/objects/string-table.h | 6 +- deps/v8/src/objects/string.cc | 120 +- deps/v8/src/objects/string.h | 18 +- deps/v8/src/objects/struct.h | 11 +- .../src/objects/swiss-name-dictionary-inl.h | 9 +- deps/v8/src/objects/swiss-name-dictionary.cc | 12 +- deps/v8/src/objects/swiss-name-dictionary.h | 15 +- deps/v8/src/objects/synthetic-module.cc | 41 +- deps/v8/src/objects/synthetic-module.h | 16 +- deps/v8/src/objects/tagged-field.h | 2 + deps/v8/src/objects/tagged-impl-inl.h | 16 +- deps/v8/src/objects/tagged-impl.cc | 10 +- deps/v8/src/objects/tagged-impl.h | 10 +- deps/v8/src/objects/tagged-index.h | 14 +- deps/v8/src/objects/tagged.h | 389 +- deps/v8/src/objects/template-objects.cc | 29 +- deps/v8/src/objects/template-objects.h | 6 +- deps/v8/src/objects/templates-inl.h | 60 +- deps/v8/src/objects/templates.cc | 75 +- deps/v8/src/objects/templates.h | 47 +- deps/v8/src/objects/transitions-inl.h | 176 +- deps/v8/src/objects/transitions.cc | 229 +- deps/v8/src/objects/transitions.h | 124 +- deps/v8/src/objects/trusted-object-inl.h | 2 - deps/v8/src/objects/trusted-object.h | 2 - deps/v8/src/objects/type-hints.cc | 4 + deps/v8/src/objects/type-hints.h | 3 +- deps/v8/src/objects/union.h | 103 + deps/v8/src/objects/value-serializer.cc | 253 +- deps/v8/src/objects/value-serializer.h | 33 +- deps/v8/src/objects/visitors-inl.h | 4 +- deps/v8/src/objects/visitors.h | 14 +- deps/v8/src/objects/waiter-queue-node.cc | 172 + deps/v8/src/objects/waiter-queue-node.h | 98 + deps/v8/src/parsing/expression-scope.h | 9 +- deps/v8/src/parsing/keywords-gen.h | 75 +- deps/v8/src/parsing/keywords.txt | 1 + deps/v8/src/parsing/parse-info.cc | 9 +- deps/v8/src/parsing/parse-info.h | 8 +- deps/v8/src/parsing/parser-base.h | 509 +- deps/v8/src/parsing/parser.cc | 482 +- deps/v8/src/parsing/parser.h | 66 +- deps/v8/src/parsing/parsing.cc | 14 +- .../pending-compilation-error-handler.cc | 8 +- deps/v8/src/parsing/preparse-data.cc | 11 +- deps/v8/src/parsing/preparser-logger.h | 10 +- deps/v8/src/parsing/preparser.cc | 16 +- deps/v8/src/parsing/preparser.h | 160 +- deps/v8/src/parsing/rewriter.cc | 14 - .../src/parsing/scanner-character-streams.cc | 19 +- deps/v8/src/parsing/scanner-inl.h | 1 + deps/v8/src/parsing/scanner.cc | 32 +- deps/v8/src/parsing/scanner.h | 20 +- deps/v8/src/parsing/token.h | 1 + deps/v8/src/profiler/OWNERS | 2 + deps/v8/src/profiler/allocation-tracker.cc | 124 +- deps/v8/src/profiler/allocation-tracker.h | 45 +- deps/v8/src/profiler/cpu-profiler.cc | 6 +- deps/v8/src/profiler/heap-profiler.cc | 19 +- deps/v8/src/profiler/heap-profiler.h | 7 +- .../src/profiler/heap-snapshot-generator.cc | 428 +- .../v8/src/profiler/heap-snapshot-generator.h | 53 +- deps/v8/src/profiler/profile-generator.cc | 9 +- deps/v8/src/profiler/profiler-listener.cc | 18 +- deps/v8/src/profiler/profiler-listener.h | 3 +- .../v8/src/profiler/sampling-heap-profiler.cc | 7 +- deps/v8/src/profiler/strings-storage.cc | 10 +- deps/v8/src/profiler/symbolizer.cc | 1 + deps/v8/src/profiler/tick-sample.cc | 13 +- deps/v8/src/profiler/weak-code-registry.cc | 3 +- deps/v8/src/profiler/weak-code-registry.h | 2 +- deps/v8/src/protobuf/DEPS | 3 - deps/v8/src/protobuf/OWNERS | 1 - .../v8/src/protobuf/protobuf-compiler-main.cc | 28 - .../regexp/arm/regexp-macro-assembler-arm.cc | 9 +- .../arm64/regexp-macro-assembler-arm64.cc | 9 +- .../experimental/experimental-bytecode.cc | 12 + .../experimental/experimental-bytecode.h | 55 +- .../experimental/experimental-compiler.cc | 220 +- .../experimental/experimental-interpreter.cc | 495 +- .../experimental/experimental-interpreter.h | 2 +- .../src/regexp/experimental/experimental.cc | 27 +- .../v8/src/regexp/experimental/experimental.h | 14 +- .../ia32/regexp-macro-assembler-ia32.cc | 10 +- .../loong64/regexp-macro-assembler-loong64.cc | 6 +- .../mips64/regexp-macro-assembler-mips64.cc | 6 +- .../regexp/ppc/regexp-macro-assembler-ppc.cc | 9 +- deps/v8/src/regexp/regexp-ast.h | 15 +- .../v8/src/regexp/regexp-bytecode-peephole.cc | 2 +- deps/v8/src/regexp/regexp-bytecode-peephole.h | 2 +- deps/v8/src/regexp/regexp-compiler-tonode.cc | 2 + deps/v8/src/regexp/regexp-compiler.cc | 58 +- deps/v8/src/regexp/regexp-compiler.h | 2 +- deps/v8/src/regexp/regexp-interpreter.cc | 32 +- deps/v8/src/regexp/regexp-interpreter.h | 9 +- .../regexp/regexp-macro-assembler-tracer.cc | 16 +- deps/v8/src/regexp/regexp-macro-assembler.cc | 27 +- deps/v8/src/regexp/regexp-macro-assembler.h | 5 +- deps/v8/src/regexp/regexp-nodes.h | 5 +- deps/v8/src/regexp/regexp-parser.cc | 33 +- deps/v8/src/regexp/regexp-parser.h | 3 +- deps/v8/src/regexp/regexp-utils.cc | 40 +- deps/v8/src/regexp/regexp-utils.h | 14 +- deps/v8/src/regexp/regexp.cc | 110 +- deps/v8/src/regexp/regexp.h | 19 +- .../riscv/regexp-macro-assembler-riscv.cc | 6 +- .../s390/regexp-macro-assembler-s390.cc | 84 +- .../regexp/x64/regexp-macro-assembler-x64.cc | 10 +- deps/v8/src/roots/roots-inl.h | 27 +- deps/v8/src/roots/roots.cc | 15 +- deps/v8/src/roots/roots.h | 21 +- deps/v8/src/roots/static-roots.h | 1460 +-- deps/v8/src/runtime/runtime-array.cc | 36 +- deps/v8/src/runtime/runtime-atomics.cc | 4 +- deps/v8/src/runtime/runtime-bigint.cc | 87 +- deps/v8/src/runtime/runtime-classes.cc | 140 +- deps/v8/src/runtime/runtime-collections.cc | 30 +- deps/v8/src/runtime/runtime-compiler.cc | 64 +- deps/v8/src/runtime/runtime-debug.cc | 114 +- deps/v8/src/runtime/runtime-forin.cc | 14 +- deps/v8/src/runtime/runtime-function.cc | 22 +- deps/v8/src/runtime/runtime-futex.cc | 15 +- deps/v8/src/runtime/runtime-generator.cc | 51 +- deps/v8/src/runtime/runtime-internal.cc | 74 +- deps/v8/src/runtime/runtime-intl.cc | 8 +- deps/v8/src/runtime/runtime-literals.cc | 141 +- deps/v8/src/runtime/runtime-module.cc | 11 +- deps/v8/src/runtime/runtime-numbers.cc | 2 +- deps/v8/src/runtime/runtime-object.cc | 254 +- deps/v8/src/runtime/runtime-promise.cc | 28 +- deps/v8/src/runtime/runtime-proxy.cc | 4 +- deps/v8/src/runtime/runtime-regexp.cc | 133 +- deps/v8/src/runtime/runtime-scopes.cc | 234 +- deps/v8/src/runtime/runtime-shadow-realm.cc | 6 +- deps/v8/src/runtime/runtime-strings.cc | 29 +- deps/v8/src/runtime/runtime-symbol.cc | 20 +- deps/v8/src/runtime/runtime-temporal.cc | 2 +- deps/v8/src/runtime/runtime-test-wasm.cc | 359 +- deps/v8/src/runtime/runtime-test.cc | 516 +- deps/v8/src/runtime/runtime-trace.cc | 4 +- deps/v8/src/runtime/runtime-typedarray.cc | 15 +- deps/v8/src/runtime/runtime-wasm.cc | 556 +- deps/v8/src/runtime/runtime-weak-refs.cc | 8 +- deps/v8/src/runtime/runtime.cc | 146 +- deps/v8/src/runtime/runtime.h | 206 +- deps/v8/src/sandbox/README.md | 52 +- deps/v8/src/sandbox/check.h | 65 + deps/v8/src/sandbox/code-pointer-table-inl.h | 5 + deps/v8/src/sandbox/code-pointer-table.cc | 9 + deps/v8/src/sandbox/code-pointer-table.h | 7 + .../compactible-external-entity-table-inl.h | 223 + .../compactible-external-entity-table.h | 181 + deps/v8/src/sandbox/cppheap-pointer-inl.h | 103 + .../src/sandbox/cppheap-pointer-table-inl.h | 200 + deps/v8/src/sandbox/cppheap-pointer-table.cc | 177 + deps/v8/src/sandbox/cppheap-pointer-table.h | 286 + deps/v8/src/sandbox/external-buffer-inl.h | 75 + .../src/sandbox/external-buffer-table-inl.h | 179 + deps/v8/src/sandbox/external-buffer-table.cc | 202 + deps/v8/src/sandbox/external-buffer-table.h | 226 + deps/v8/src/sandbox/external-buffer-tag.h | 88 + deps/v8/src/sandbox/external-buffer.h | 48 + .../src/sandbox/external-entity-table-inl.h | 35 +- deps/v8/src/sandbox/external-entity-table.h | 42 +- deps/v8/src/sandbox/external-pointer-inl.h | 41 +- .../src/sandbox/external-pointer-table-inl.h | 281 +- deps/v8/src/sandbox/external-pointer-table.cc | 263 +- deps/v8/src/sandbox/external-pointer-table.h | 335 +- deps/v8/src/sandbox/external-pointer.h | 25 +- deps/v8/src/sandbox/hardware-support.cc | 100 + deps/v8/src/sandbox/hardware-support.h | 63 + deps/v8/src/sandbox/indirect-pointer-tag.h | 102 +- deps/v8/src/sandbox/isolate-inl.h | 96 +- deps/v8/src/sandbox/isolate.h | 34 +- deps/v8/src/sandbox/js-dispatch-table-inl.h | 152 + deps/v8/src/sandbox/js-dispatch-table.cc | 73 + deps/v8/src/sandbox/js-dispatch-table.h | 203 + deps/v8/src/sandbox/sandbox.cc | 8 + deps/v8/src/sandbox/tagged-payload.h | 100 + deps/v8/src/sandbox/testing.cc | 200 +- deps/v8/src/sandbox/testing.h | 30 + .../src/sandbox/trusted-pointer-table-inl.h | 25 +- deps/v8/src/sandbox/trusted-pointer-table.h | 44 +- deps/v8/src/snapshot/code-serializer.cc | 67 +- deps/v8/src/snapshot/code-serializer.h | 4 +- deps/v8/src/snapshot/context-deserializer.cc | 87 +- deps/v8/src/snapshot/context-deserializer.h | 3 + deps/v8/src/snapshot/context-serializer.cc | 86 +- deps/v8/src/snapshot/context-serializer.h | 7 + deps/v8/src/snapshot/deserializer.cc | 155 +- deps/v8/src/snapshot/deserializer.h | 15 +- .../v8/src/snapshot/embedded/embedded-data.cc | 2 +- deps/v8/src/snapshot/embedded/embedded-data.h | 2 +- .../snapshot/embedded/embedded-file-writer.cc | 18 + .../snapshot/embedded/embedded-file-writer.h | 6 +- .../platform-embedded-file-writer-base.cc | 8 + .../platform-embedded-file-writer-base.h | 3 + .../platform-embedded-file-writer-zos.cc | 174 + .../platform-embedded-file-writer-zos.h | 62 + deps/v8/src/snapshot/object-deserializer.cc | 9 +- .../v8/src/snapshot/read-only-deserializer.cc | 42 +- .../read-only-serializer-deserializer.h | 6 +- deps/v8/src/snapshot/read-only-serializer.cc | 12 +- deps/v8/src/snapshot/references.h | 3 +- .../src/snapshot/serializer-deserializer.cc | 12 +- .../v8/src/snapshot/serializer-deserializer.h | 32 +- deps/v8/src/snapshot/serializer.cc | 98 +- deps/v8/src/snapshot/serializer.h | 8 +- .../src/snapshot/shared-heap-deserializer.cc | 7 +- .../v8/src/snapshot/shared-heap-serializer.cc | 8 +- deps/v8/src/snapshot/snapshot.cc | 59 +- deps/v8/src/snapshot/snapshot.h | 4 +- deps/v8/src/snapshot/startup-deserializer.cc | 18 +- deps/v8/src/snapshot/startup-deserializer.h | 1 + deps/v8/src/snapshot/startup-serializer.cc | 35 +- deps/v8/src/snapshot/static-roots-gen.cc | 5 + deps/v8/src/strings/string-builder-inl.h | 418 +- deps/v8/src/strings/string-builder.cc | 65 +- deps/v8/src/strings/string-builder.h | 208 + deps/v8/src/strings/string-stream.cc | 38 +- deps/v8/src/strings/uri.cc | 16 +- deps/v8/src/torque/OWNERS | 1 - deps/v8/src/torque/ast.h | 2 +- deps/v8/src/torque/cc-generator.cc | 2 +- deps/v8/src/torque/constants.h | 1 + deps/v8/src/torque/earley-parser.h | 2 +- deps/v8/src/torque/global-context.cc | 2 + deps/v8/src/torque/global-context.h | 2 + deps/v8/src/torque/implementation-visitor.cc | 45 +- deps/v8/src/torque/torque-compiler.cc | 4 +- deps/v8/src/torque/torque-parser.cc | 14 +- deps/v8/src/torque/type-oracle.h | 5 + deps/v8/src/torque/types.cc | 63 + deps/v8/src/torque/types.h | 12 +- deps/v8/src/tracing/code-data-source.cc | 9 +- deps/v8/src/tracing/perfetto-logger.cc | 4 +- deps/v8/src/tracing/trace-categories.h | 2 + .../tracing/trace-event-no-perfetto.h} | 287 +- deps/v8/src/tracing/trace-event.h | 4 +- .../src/tracing/tracing-category-observer.cc | 1 + .../src/trap-handler/handler-inside-posix.cc | 6 + deps/v8/src/trap-handler/handler-inside.cc | 10 + .../trap-handler/handler-outside-simulator.cc | 3 +- deps/v8/src/trap-handler/handler-outside.cc | 7 + deps/v8/src/trap-handler/handler-shared.cc | 2 + .../src/trap-handler/trap-handler-internal.h | 9 + deps/v8/src/trap-handler/trap-handler.h | 6 + deps/v8/src/utils/address-map.cc | 4 +- deps/v8/src/utils/allocation.cc | 23 +- deps/v8/src/utils/allocation.h | 12 +- deps/v8/src/utils/boxed-float.h | 3 + deps/v8/src/utils/identity-map.h | 8 +- deps/v8/src/utils/memcopy.h | 6 +- deps/v8/src/utils/utils.h | 18 +- deps/v8/src/wasm/DEPS | 11 +- .../baseline/arm/liftoff-assembler-arm-inl.h | 71 +- .../arm64/liftoff-assembler-arm64-inl.h | 117 +- .../ia32/liftoff-assembler-ia32-inl.h | 75 +- .../wasm/baseline/liftoff-assembler-defs.h | 10 +- .../src/wasm/baseline/liftoff-assembler-inl.h | 8 + .../v8/src/wasm/baseline/liftoff-assembler.cc | 72 +- deps/v8/src/wasm/baseline/liftoff-assembler.h | 164 +- deps/v8/src/wasm/baseline/liftoff-compiler.cc | 1498 ++- deps/v8/src/wasm/baseline/liftoff-compiler.h | 4 +- deps/v8/src/wasm/baseline/liftoff-register.h | 23 +- deps/v8/src/wasm/baseline/liftoff-varstate.h | 119 + .../loong64/liftoff-assembler-loong64-inl.h | 87 +- .../mips64/liftoff-assembler-mips64-inl.h | 84 +- deps/v8/src/wasm/baseline/parallel-move.h | 7 +- .../baseline/ppc/liftoff-assembler-ppc-inl.h | 104 +- .../riscv/liftoff-assembler-riscv-inl.h | 47 +- .../riscv/liftoff-assembler-riscv32-inl.h | 17 +- .../riscv/liftoff-assembler-riscv64-inl.h | 67 +- .../s390/liftoff-assembler-s390-inl.h | 79 +- .../baseline/x64/liftoff-assembler-x64-inl.h | 114 +- deps/v8/src/wasm/c-api.cc | 237 +- deps/v8/src/wasm/canonical-types.cc | 116 +- deps/v8/src/wasm/canonical-types.h | 19 +- .../v8/src/wasm/compilation-environment-inl.h | 11 +- deps/v8/src/wasm/compilation-environment.h | 31 +- .../src/wasm/constant-expression-interface.cc | 102 +- .../src/wasm/constant-expression-interface.h | 9 +- deps/v8/src/wasm/constant-expression.cc | 26 +- deps/v8/src/wasm/constant-expression.h | 33 +- deps/v8/src/wasm/float16.h | 43 + deps/v8/src/wasm/function-body-decoder-impl.h | 448 +- deps/v8/src/wasm/function-body-decoder.cc | 269 +- deps/v8/src/wasm/function-body-decoder.h | 34 +- deps/v8/src/wasm/function-compiler.cc | 37 +- deps/v8/src/wasm/function-compiler.h | 45 +- .../wasm/fuzzing/random-module-generation.cc | 2997 +++--- .../wasm/fuzzing/random-module-generation.h | 25 +- deps/v8/src/wasm/graph-builder-interface.cc | 155 +- deps/v8/src/wasm/graph-builder-interface.h | 7 +- deps/v8/src/wasm/inlining-tree.h | 302 +- deps/v8/src/wasm/module-compiler.cc | 652 +- deps/v8/src/wasm/module-compiler.h | 61 +- deps/v8/src/wasm/module-decoder-impl.h | 395 +- deps/v8/src/wasm/module-decoder.cc | 44 +- deps/v8/src/wasm/module-decoder.h | 29 +- deps/v8/src/wasm/module-instantiate.cc | 1316 +-- deps/v8/src/wasm/module-instantiate.h | 45 +- deps/v8/src/wasm/names-provider.cc | 5 + deps/v8/src/wasm/object-access.h | 6 + deps/v8/src/wasm/pgo.cc | 9 +- deps/v8/src/wasm/pgo.h | 2 +- deps/v8/src/wasm/signature-hashing.h | 237 + deps/v8/src/wasm/simd-shuffle.cc | 39 + deps/v8/src/wasm/simd-shuffle.h | 173 + deps/v8/src/wasm/stacks.cc | 52 +- deps/v8/src/wasm/stacks.h | 51 +- deps/v8/src/wasm/streaming-decoder.h | 2 +- deps/v8/src/wasm/string-builder-multiline.h | 9 +- deps/v8/src/wasm/sync-streaming-decoder.cc | 19 +- .../v8/src/wasm/turboshaft-graph-interface.cc | 2588 +++-- deps/v8/src/wasm/turboshaft-graph-interface.h | 18 +- deps/v8/src/wasm/value-type.cc | 1 + deps/v8/src/wasm/value-type.h | 63 +- deps/v8/src/wasm/wasm-builtin-list.h | 7 +- deps/v8/src/wasm/wasm-code-manager.cc | 314 +- deps/v8/src/wasm/wasm-code-manager.h | 136 +- deps/v8/src/wasm/wasm-constants.h | 30 +- deps/v8/src/wasm/wasm-debug.cc | 107 +- deps/v8/src/wasm/wasm-deopt-data.cc | 70 + deps/v8/src/wasm/wasm-deopt-data.h | 108 + deps/v8/src/wasm/wasm-disassembler-impl.h | 11 +- deps/v8/src/wasm/wasm-disassembler.cc | 62 +- deps/v8/src/wasm/wasm-disassembler.h | 13 + deps/v8/src/wasm/wasm-engine.cc | 360 +- deps/v8/src/wasm/wasm-engine.h | 85 +- deps/v8/src/wasm/wasm-external-refs.cc | 77 +- deps/v8/src/wasm/wasm-external-refs.h | 17 +- deps/v8/src/wasm/wasm-feature-flags.h | 55 +- deps/v8/src/wasm/wasm-features.cc | 37 +- deps/v8/src/wasm/wasm-features.h | 193 +- deps/v8/src/wasm/wasm-import-wrapper-cache.cc | 8 +- deps/v8/src/wasm/wasm-import-wrapper-cache.h | 13 +- deps/v8/src/wasm/wasm-init-expr.h | 2 +- deps/v8/src/wasm/wasm-js.cc | 847 +- deps/v8/src/wasm/wasm-js.h | 9 +- deps/v8/src/wasm/wasm-limits.h | 7 +- deps/v8/src/wasm/wasm-module-builder.cc | 152 +- deps/v8/src/wasm/wasm-module-builder.h | 43 +- deps/v8/src/wasm/wasm-module.cc | 66 +- deps/v8/src/wasm/wasm-module.h | 120 +- deps/v8/src/wasm/wasm-objects-inl.h | 236 +- deps/v8/src/wasm/wasm-objects.cc | 1303 +-- deps/v8/src/wasm/wasm-objects.h | 444 +- deps/v8/src/wasm/wasm-objects.tq | 132 +- deps/v8/src/wasm/wasm-opcodes-inl.h | 4 + deps/v8/src/wasm/wasm-opcodes.cc | 1 + deps/v8/src/wasm/wasm-opcodes.h | 61 +- deps/v8/src/wasm/wasm-result.cc | 15 +- deps/v8/src/wasm/wasm-result.h | 3 +- deps/v8/src/wasm/wasm-serialization.cc | 154 +- deps/v8/src/wasm/wasm-serialization.h | 17 +- deps/v8/src/wasm/wasm-subtyping.cc | 1 + deps/v8/src/wasm/wasm-value.h | 60 +- deps/v8/src/wasm/well-known-imports.h | 2 +- deps/v8/src/wasm/wrappers.cc | 621 +- deps/v8/src/zone/zone-list.h | 7 +- deps/v8/src/zone/zone.h | 2 +- deps/v8/test/benchmarks/benchmarks.status | 6 +- deps/v8/test/benchmarks/cpp/BUILD.gn | 18 + deps/v8/test/benchmarks/cpp/DEPS | 4 + deps/v8/test/benchmarks/cpp/benchmark-main.cc | 24 + .../v8/test/benchmarks/cpp/benchmark-utils.cc | 48 + deps/v8/test/benchmarks/cpp/benchmark-utils.h | 41 + deps/v8/test/benchmarks/cpp/bindings.cc | 416 + deps/v8/test/cctest/BUILD.gn | 17 +- deps/v8/test/cctest/cctest-utils.h | 3 + deps/v8/test/cctest/cctest.cc | 2 +- deps/v8/test/cctest/cctest.h | 6 +- deps/v8/test/cctest/cctest.status | 81 +- .../test/cctest/compiler/function-tester.cc | 8 +- .../v8/test/cctest/compiler/function-tester.h | 13 +- .../cctest/compiler/js-heap-broker-base.h | 8 +- .../cctest/compiler/test-code-assembler.cc | 2 +- .../cctest/compiler/test-code-generator.cc | 80 +- .../test-concurrent-shared-function-info.cc | 11 +- .../test-js-context-specialization.cc | 60 +- .../cctest/compiler/test-js-typed-lowering.cc | 4 +- deps/v8/test/cctest/compiler/test-linkage.cc | 5 +- .../cctest/compiler/test-multiple-return.cc | 37 +- .../test/cctest/compiler/test-run-machops.cc | 6 +- .../cctest/compiler/test-run-native-calls.cc | 2 +- .../compiler/turboshaft-codegen-tester.h | 36 +- .../turboshaft-test-compare-combine.cc | 1020 ++ deps/v8/test/cctest/heap/heap-utils.cc | 7 +- deps/v8/test/cctest/heap/test-alloc.cc | 8 +- .../cctest/heap/test-array-buffer-tracker.cc | 63 +- deps/v8/test/cctest/heap/test-compaction.cc | 24 +- .../cctest/heap/test-concurrent-allocation.cc | 69 +- .../cctest/heap/test-concurrent-marking.cc | 2 +- .../heap/test-external-string-tracker.cc | 3 +- deps/v8/test/cctest/heap/test-heap.cc | 618 +- deps/v8/test/cctest/heap/test-mark-compact.cc | 19 +- .../cctest/heap/test-memory-measurement.cc | 58 +- deps/v8/test/cctest/heap/test-spaces.cc | 66 +- .../test/cctest/heap/test-weak-references.cc | 99 +- .../v8/test/cctest/heap/test-write-barrier.cc | 18 +- .../v8/test/cctest/test-accessor-assembler.cc | 12 +- deps/v8/test/cctest/test-accessors.cc | 96 +- deps/v8/test/cctest/test-api-array-buffer.cc | 6 +- deps/v8/test/cctest/test-api-interceptors.cc | 1386 ++- deps/v8/test/cctest/test-api-stack-traces.cc | 5 +- deps/v8/test/cctest/test-api-typed-array.cc | 24 +- deps/v8/test/cctest/test-api.cc | 1363 ++- deps/v8/test/cctest/test-api.h | 137 +- deps/v8/test/cctest/test-assembler-arm64.cc | 150 +- deps/v8/test/cctest/test-assembler-ppc.cc | 16 +- deps/v8/test/cctest/test-assembler-riscv32.cc | 11 +- deps/v8/test/cctest/test-assembler-riscv64.cc | 103 +- .../test/cctest/test-code-stub-assembler.cc | 429 +- deps/v8/test/cctest/test-cpu-profiler.cc | 62 +- deps/v8/test/cctest/test-debug-helper.cc | 36 +- deps/v8/test/cctest/test-debug.cc | 532 +- deps/v8/test/cctest/test-descriptor-array.cc | 6 +- .../test/cctest/test-disasm-regex-helper.cc | 4 +- .../test/cctest/test-field-type-tracking.cc | 643 +- .../test/cctest/test-func-name-inference.cc | 19 +- deps/v8/test/cctest/test-heap-profiler.cc | 267 +- .../cctest/test-inobject-slack-tracking.cc | 116 +- deps/v8/test/cctest/test-js-to-wasm.cc | 1 + deps/v8/test/cctest/test-js-weak-refs.cc | 149 +- deps/v8/test/cctest/test-liveedit.cc | 5 +- deps/v8/test/cctest/test-log-stack-tracer.cc | 2 +- .../cctest/test-macro-assembler-mips64.cc | 2 +- deps/v8/test/cctest/test-mementos.cc | 4 +- deps/v8/test/cctest/test-orderedhashtable.cc | 174 +- deps/v8/test/cctest/test-profile-generator.cc | 21 +- deps/v8/test/cctest/test-ptr-compr-cage.cc | 4 +- deps/v8/test/cctest/test-regexp.cc | 7 +- deps/v8/test/cctest/test-serialize.cc | 537 +- deps/v8/test/cctest/test-shared-strings.cc | 250 +- .../test/cctest/test-stack-unwinding-win64.cc | 6 +- deps/v8/test/cctest/test-strings.cc | 177 +- .../cctest/test-swiss-name-dictionary-csa.cc | 7 +- .../test-swiss-name-dictionary-infra.cc | 2 +- .../cctest/test-swiss-name-dictionary-infra.h | 2 +- .../test/cctest/test-swiss-name-dictionary.cc | 17 +- deps/v8/test/cctest/test-transitions.cc | 8 +- deps/v8/test/cctest/test-transitions.h | 2 +- .../test-unscopables-hidden-prototype.cc | 26 +- .../test/cctest/test-unwinder-code-pages.cc | 6 +- deps/v8/test/cctest/test-verifiers.cc | 38 +- deps/v8/test/cctest/torque/test-torque.cc | 20 +- deps/v8/test/cctest/wasm/test-c-wasm-entry.cc | 2 +- .../cctest/wasm/test-compilation-cache.cc | 14 +- deps/v8/test/cctest/wasm/test-gc.cc | 61 +- deps/v8/test/cctest/wasm/test-grow-memory.cc | 3 +- .../cctest/wasm/test-liftoff-inspection.cc | 16 +- .../cctest/wasm/test-run-wasm-bulk-memory.cc | 27 +- .../cctest/wasm/test-run-wasm-exceptions.cc | 10 +- deps/v8/test/cctest/wasm/test-run-wasm-f16.cc | 132 + deps/v8/test/cctest/wasm/test-run-wasm-js.cc | 15 +- .../cctest/wasm/test-run-wasm-memory64.cc | 9 +- .../test/cctest/wasm/test-run-wasm-module.cc | 12 +- .../cctest/wasm/test-run-wasm-relaxed-simd.cc | 364 + .../v8/test/cctest/wasm/test-run-wasm-simd.cc | 3331 ++++--- .../cctest/wasm/test-run-wasm-wrappers.cc | 95 +- .../cctest/wasm/test-streaming-compilation.cc | 26 +- .../test/cctest/wasm/test-wasm-breakpoints.cc | 12 +- .../wasm/test-wasm-import-wrapper-cache.cc | 4 +- deps/v8/test/cctest/wasm/test-wasm-metrics.cc | 6 +- .../cctest/wasm/test-wasm-serialization.cc | 244 +- .../cctest/wasm/test-wasm-shared-engine.cc | 14 +- deps/v8/test/cctest/wasm/test-wasm-stack.cc | 31 +- .../cctest/wasm/test-wasm-trap-position.cc | 14 +- deps/v8/test/cctest/wasm/wasm-run-utils.cc | 110 +- deps/v8/test/cctest/wasm/wasm-run-utils.h | 31 +- deps/v8/test/cctest/wasm/wasm-simd-utils.cc | 1797 ++-- deps/v8/test/cctest/wasm/wasm-simd-utils.h | 97 +- deps/v8/test/common/assembler-tester.h | 8 +- deps/v8/test/common/call-tester.h | 2 +- deps/v8/test/common/flag-utils.h | 8 +- deps/v8/test/common/types-fuzz.h | 10 +- deps/v8/test/common/wasm/flag-utils.h | 27 +- deps/v8/test/common/wasm/test-signatures.h | 12 + deps/v8/test/common/wasm/wasm-macro-gen.h | 14 +- .../v8/test/common/wasm/wasm-module-runner.cc | 25 +- .../debug/compiler/loop-interrupt-check.js | 58 + .../debug/debug-break-class-fields.js | 62 +- .../es8/async-debug-caught-exception-cases.js | 4 +- .../debug/regress/regress-crbug-401915.js | 19 - .../debug-evaluate-no-side-effect-builtins.js | 74 +- ...g-evaluate-no-side-effect-runtime-check.js | 64 + ...breakpoint-memoryestimation-concurrency.js | 24 + .../debugger/debug/wasm/exception-muting.js | 59 + deps/v8/test/fuzzer/DEPS | 1 + deps/v8/test/fuzzer/inspector-fuzzer.cc | 16 +- deps/v8/test/fuzzer/multi-return.cc | 6 +- deps/v8/test/fuzzer/testcfg.py | 2 + deps/v8/test/fuzzer/wasm-async.cc | 2 +- deps/v8/test/fuzzer/wasm-code.cc | 2 +- deps/v8/test/fuzzer/wasm-compile-all.cc | 32 + deps/v8/test/fuzzer/wasm-compile-simd.cc | 4 +- deps/v8/test/fuzzer/wasm-compile-wasmgc.cc | 32 + deps/v8/test/fuzzer/wasm-compile.cc | 4 +- deps/v8/test/fuzzer/wasm-deopt.cc | 304 + deps/v8/test/fuzzer/wasm-fuzzer-common.cc | 725 +- deps/v8/test/fuzzer/wasm-fuzzer-common.h | 6 + deps/v8/test/fuzzer/wasm-init-expr.cc | 45 +- deps/v8/test/fuzzer/wasm-streaming.cc | 12 +- deps/v8/test/fuzzer/wasm.cc | 2 +- deps/v8/test/fuzzer/wasm_corpus.tar.gz.sha1 | 1 - .../console-time-and-clear-expected.txt | 13 + .../console/console-time-and-clear.js | 25 + ...ofile-end-parameterless-crash-expected.txt | 3 - ...console-profile-end-parameterless-crash.js | 46 - ...tion-promise-catch-prediction-expected.txt | 22 +- .../debugger/class-fields-scopes-expected.txt | 56 +- ...lass-private-accessors-static-expected.txt | 65 + .../class-private-accessors-static.js | 64 + ...ible-breakpoints-class-fields-expected.txt | 114 +- .../set-breakpoint-muting-expected.txt | 90 + .../debugger/set-breakpoint-muting.js | 118 + .../wasm-jspi-async-stack-expected.txt | 446 + .../debugger/wasm-jspi-async-stack.js | 277 + deps/v8/test/inspector/frontend-channel.h | 18 +- deps/v8/test/inspector/inspector-test.cc | 18 +- deps/v8/test/inspector/inspector.status | 18 +- deps/v8/test/inspector/isolate-data.cc | 1 - .../regress-crbug-349248170-expected.txt | 10 + .../regress/regress-crbug-349248170.js | 52 + .../runtime/command-line-api-expected.txt | 22 - .../runtime/console-context-expected.txt | 14 + .../test/inspector/runtime/console-context.js | 28 + .../console-count-default-expected.txt | 25 + .../runtime/console-count-default.js | 43 + ...console-message-before-enable-expected.txt | 7 + .../runtime/console-methods-expected.txt | 36 - .../runtime/console-time-default-expected.txt | 29 + .../inspector/runtime/console-time-default.js | 43 + .../console-time-end-stack-expected.txt | 7 + .../runtime/console-time-end-stack.js | 37 + .../runtime/custom-error-stack-expected.txt | 97 + .../inspector/runtime/custom-error-stack.js | 47 + .../runtime/custom-preview-expected.txt | 40 + .../test/inspector/runtime/custom-preview.js | 12 +- .../runtime/error-preview-expected.txt | 8 - .../test/inspector/runtime/error-preview.js | 15 - .../runtime/remote-object-expected.txt | 18 +- .../test/inspector/runtime/remote-object.js | 6 +- ...e-get-properties-and-accessor-expected.txt | 6 + .../runtime-get-properties-and-accessor.js | 4 +- .../set-max-call-stack-size-expected.txt | 25 + deps/v8/test/inspector/utils.cc | 11 - deps/v8/test/inspector/utils.h | 2 - deps/v8/test/intl/general/case-mapping.js | 4 +- deps/v8/test/intl/regress-40855035.js | 6 + deps/v8/test/js-perf-test/JSTests3.json | 4 +- deps/v8/test/js-perf-test/JSTests5.json | 2 +- deps/v8/test/message/fail/console.js | 14 +- deps/v8/test/message/fail/console.out | 15 +- deps/v8/test/message/message.status | 16 +- .../v8/test/message/wasm-recognize-imports.js | 3 + .../test/message/wasm-recognize-imports.out | 8 +- .../test/message/wasm-speculative-inlining.js | 103 + .../message/wasm-speculative-inlining.out | 75 + deps/v8/test/message/wasm-trace-deopt-32.js | 52 + deps/v8/test/message/wasm-trace-deopt-32.out | 29 + deps/v8/test/message/wasm-trace-deopt-64.js | 52 + deps/v8/test/message/wasm-trace-deopt-64.out | 28 + deps/v8/test/mjsunit/asm/log-lazy-code.js | 5 + deps/v8/test/mjsunit/clone-ic-regressions.js | 163 +- .../mjsunit/code-coverage-class-fields.js | 22 +- .../mjsunit/compiler/bigint-shift-left.js | 2 +- .../compiler/deopt-literal-receiver.js | 41 + .../mjsunit/compiler/deopt-literal-string.js | 32 + .../efficiency-mode-limits-tiering.js | 4 +- .../mjsunit/compiler/fast-api-calls-8args.js | 10 +- .../mjsunit/compiler/fast-api-calls-string.js | 8 +- .../mjsunit/compiler/fast-api-calls-throw.js | 119 + .../mjsunit/compiler/fast-api-calls-wasm.js | 44 +- .../test/mjsunit/compiler/fast-api-calls.js | 62 +- .../mjsunit/compiler/fast-api-exceptions.js | 27 - .../test/mjsunit/compiler/fast-api-helpers.js | 3 +- .../compiler/fast-api-interface-types.js | 11 +- .../compiler/fast-api-sequences-x64.js | 10 +- .../mjsunit/compiler/fast-api-sequences.js | 95 +- .../mjsunit/compiler/float16-array-next.js | 21 + .../mjsunit/compiler/regress-330638807.js | 26 + .../mjsunit/compiler/regress-331909453.js | 19 + .../mjsunit/compiler/regress-335310000.js | 25 + .../mjsunit/compiler/regress-339492379.js | 15 + .../mjsunit/compiler/regress-340663085.js | 29 + .../mjsunit/compiler/regress-347724915.js | 26 + .../mjsunit/compiler/regress-347905990.js | 50 + .../mjsunit/compiler/regress-356183775.js | 11 + .../mjsunit/compiler/regress-crbug-1148758.js | 8 + ...ing-let-invalidate-storeglobal-baseline.js | 2 +- ...-let-invalidate-storeglobal-interpreter.js | 2 +- ...cking-let-invalidate-storeglobal-maglev.js | 2 +- ...ing-let-invalidate-storeglobal-turbofan.js | 2 +- .../d8/d8-finalization-registry-quit.js | 21 + .../d8/d8-worker-onmessage-ping-pong.js | 23 + deps/v8/test/mjsunit/d8/d8-worker-script.txt | 2 +- .../mjsunit/d8/d8-worker-sharedarraybuffer.js | 4 +- .../test/mjsunit/d8/d8-worker-shutdown-gc.js | 11 +- .../mjsunit/d8/d8-worker-shutdown-spawn.js | 2 +- deps/v8/test/mjsunit/d8/d8-worker-shutdown.js | 11 +- .../test/mjsunit/d8/d8-worker-spawn-worker.js | 2 +- deps/v8/test/mjsunit/d8/d8-worker.js | 8 +- deps/v8/test/mjsunit/d8/modules-data-url.mjs | 16 + deps/v8/test/mjsunit/date.js | 10 + deps/v8/test/mjsunit/es6/math-hypot.js | 11 + deps/v8/test/mjsunit/es6/proxies-has.js | 2 +- deps/v8/test/mjsunit/es6/reflect-construct.js | 15 + ...t-by-array-like-prototype-element-added.js | 2 +- deps/v8/test/mjsunit/frozen-array-reduce.js | 22 - deps/v8/test/mjsunit/get-iterator.js | 23 + .../test/mjsunit/harmony/array-from-async.js | 2 - .../harmony/async-from-sync-iterator.js | 4 +- .../async-module-ordinal-reset/entry.mjs | 4 + .../async-module-ordinal-reset/skip-a.mjs | 7 + .../skip-async-module.mjs | 5 + .../async-module-ordinal-reset/skip-b.mjs | 7 + .../async-module-ordinal-reset/skip-c.mjs | 7 + .../skip-common.mjs | 7 + .../async-module-ordinal-reset/skip-d.mjs | 7 + .../async-module-ordinal-reset/skip-e.mjs | 7 + .../async-module-ordinal-reset/skip-f.mjs | 7 + .../skip-imports-async-module.mjs | 4 + .../async-module-ordinal-reset/skip-run.mjs | 25 + .../mjsunit/harmony/atomics-value-check.js | 2 +- ...tasync-1thread-timeouts-and-no-timeouts.js | 2 +- ...r-shutdown-before-wait-finished-2-waits.js | 2 +- ...shutdown-before-wait-finished-2-workers.js | 2 +- ...hutdown-before-wait-finished-no-timeout.js | 2 +- ...r-shutdown-before-wait-finished-timeout.js | 2 +- deps/v8/test/mjsunit/harmony/bigint/exp.js | 4 + .../mjsunit/harmony/class-static-blocks.js | 11 +- deps/v8/test/mjsunit/harmony/error-cause.js | 2 +- deps/v8/test/mjsunit/harmony/futex.js | 4 +- .../test/mjsunit/harmony/iterator-helpers.js | 136 + deps/v8/test/mjsunit/harmony/map-groupby.js | 2 +- .../mjsunit/harmony/modules-import-16.mjs | 6 +- .../harmony/modules-import-attributes-3.mjs | 2 +- .../modules-import-attributes-dynamic-5.mjs | 2 +- ...modules-skip-imports-attributes-json-1.mjs | 8 + .../harmony/modules-skip-imports-json-1.mjs | 2 + ...modules-skip-top-level-cycle-mixed-sync.js | 5 + .../modules-skip-top-level-cycle-mixed-tla.js | 6 + .../modules-top-level-await-cycle-mixed.mjs | 6 + ...y-fast-path-assumptions-array-protector.js | 2 +- .../object-groupby-fast-path-assumptions.js | 2 - .../v8/test/mjsunit/harmony/object-groupby.js | 2 - .../test/mjsunit/harmony/regexp-modifiers.js | 12 + .../harmony/regress/regress-crbug-1492391.js | 1 - .../harmony/regress/regress-crbug-1492700.js | 1 - .../v8/test/mjsunit/harmony/set-difference.js | 41 +- .../test/mjsunit/harmony/set-intersection.js | 37 + .../mjsunit/harmony/set-is-disjoint-from.js | 34 + .../test/mjsunit/harmony/set-is-subset-of.js | 34 + .../mjsunit/harmony/set-is-superset-of.js | 34 + ...ry-scheduled-for-cleanup-multiple-times.js | 12 +- .../multiple-dirty-finalization-groups.js | 12 +- deps/v8/test/mjsunit/huge-typedarrays.js | 4 +- deps/v8/test/mjsunit/ic-callable-obj.js | 96 + deps/v8/test/mjsunit/maglev/351177445.js | 23 + .../mjsunit/maglev/arguments-forwarding.js | 575 ++ .../mjsunit/maglev/escape-analysis-context.js | 34 + .../extend-properties-backing-store-1.js | 34 + .../extend-properties-backing-store-2.js | 44 + deps/v8/test/mjsunit/maglev/get-prototype.js | 51 + .../v8/test/mjsunit/maglev/inline-phi-leak.js | 7 + .../test/mjsunit/maglev/maglev-343069827.js | 20 + .../mjsunit/maglev/no-deopt-deprecated-map.js | 40 + .../test/mjsunit/maglev/polymorphic-store.js | 30 + .../test/mjsunit/maglev/regress-329474361.js | 18 + .../test/mjsunit/maglev/regress-329476993.js | 25 + .../mjsunit/maglev/regress-330095905-2.js | 19 + .../mjsunit/maglev/regress-330095905-3.js | 21 + .../test/mjsunit/maglev/regress-330095905.js | 18 + .../test/mjsunit/maglev/regress-330427711.js | 28 + .../test/mjsunit/maglev/regress-330578127.js | 20 + .../test/mjsunit/maglev/regress-331420133.js | 25 + .../test/mjsunit/maglev/regress-331711028.js | 22 + .../test/mjsunit/maglev/regress-334974242.js | 18 + .../test/mjsunit/maglev/regress-335245513.js | 51 + .../test/mjsunit/maglev/regress-335704890.js | 26 + .../test/mjsunit/maglev/regress-336179080.js | 17 + .../test/mjsunit/maglev/regress-336833467.js | 24 + .../test/mjsunit/maglev/regress-338457105.js | 20 + .../test/mjsunit/maglev/regress-338457109.js | 20 + .../test/mjsunit/maglev/regress-339506922.js | 29 + .../test/mjsunit/maglev/regress-339684352.js | 23 + .../test/mjsunit/maglev/regress-340167165.js | 15 + .../test/mjsunit/maglev/regress-341167196.js | 20 + .../test/mjsunit/maglev/regress-341972221.js | 21 + .../test/mjsunit/maglev/regress-342460071.js | 19 + .../test/mjsunit/maglev/regress-343069819.js | 23 + .../test/mjsunit/maglev/regress-343069823.js | 25 + .../test/mjsunit/maglev/regress-343263982.js | 28 + .../test/mjsunit/maglev/regress-346686148.js | 45 + .../test/mjsunit/maglev/regress-347867186.js | 17 + .../test/mjsunit/maglev/regress-348328061.js | 22 + .../test/mjsunit/maglev/regress-348567825.js | 22 + .../test/mjsunit/maglev/regress-349432498.js | 14 + .../test/mjsunit/maglev/regress-349435463.js | 19 + .../test/mjsunit/maglev/regress-349864879.js | 113 + .../test/mjsunit/maglev/regress-349877604.js | 19 + .../test/mjsunit/maglev/regress-351251992.js | 70 + .../test/mjsunit/maglev/regress-352352903.js | 15 + .../test/mjsunit/maglev/regress-352407774.js | 15 + .../test/mjsunit/maglev/regress-352414612.js | 14 + .../test/mjsunit/maglev/regress-353628448.js | 15 + .../test/mjsunit/maglev/regress-353877568.js | 30 + .../test/mjsunit/maglev/regress-355256380.js | 19 + .../test/mjsunit/maglev/regress-41494766.js | 140 + .../maglev/yes-deopt-deprecated-map.js | 45 + deps/v8/test/mjsunit/mjsunit.status | 182 +- .../mjsunit/non-extensible-array-reduce.js | 22 - .../test/mjsunit/object-assign-regressions.js | 23 + deps/v8/test/mjsunit/object-in-array.js | 298 + .../string-wrapper-to-primitive-10.js | 19 + .../string-wrapper-to-primitive-11.js | 21 + .../string-wrapper-to-primitive-12.js | 21 + .../string-wrapper-to-primitive-13.js | 18 + .../string-wrapper-to-primitive-14.js | 19 + .../string-wrapper-to-primitive-15.js | 20 + .../string-wrapper-to-primitive-16.js | 21 + .../string-wrapper-to-primitive-17.js | 24 + .../string-wrapper-to-primitive-18.js | 20 + .../string-wrapper-to-primitive-19.js | 28 + .../string-wrapper-to-primitive-20.js | 26 + .../string-wrapper-to-primitive-21.js | 30 + .../string-wrapper-to-primitive-22.js | 30 + .../string-wrapper-to-primitive-9.js | 19 + .../mjsunit/rab-gsab-transfer-to-worker.js | 20 +- deps/v8/test/mjsunit/regexp-experimental.js | 20 + deps/v8/test/mjsunit/regress-332392668.js | 21 + deps/v8/test/mjsunit/regress-332570754.js | 19 + deps/v8/test/mjsunit/regress-332947120.js | 18 + deps/v8/test/mjsunit/regress-343338105.js | 17 + deps/v8/test/mjsunit/regress-343384810.js | 22 + deps/v8/test/mjsunit/regress-344638604.js | 19 + deps/v8/test/mjsunit/regress-346411877.js | 19 + deps/v8/test/mjsunit/regress-352402518.js | 7 + deps/v8/test/mjsunit/regress-352414652.js | 13 + deps/v8/test/mjsunit/regress-352739458.js | 13 + deps/v8/test/mjsunit/regress-353561476.js | 40 + .../test/mjsunit/regress-4530868594868224.js | 22 + .../mjsunit/regress-class-initializer-eval.js | 12 + .../regress/proto-transition-regress.js | 72 + .../test/mjsunit/regress/regress-1073440.js | 1 - .../test/mjsunit/regress/regress-1205290.js | 2 +- .../test/mjsunit/regress/regress-1212404.js | 2 +- .../test/mjsunit/regress/regress-1221035.js | 2 +- .../test/mjsunit/regress/regress-1232620.js | 2 +- .../test/mjsunit/regress/regress-1353555.js | 2 +- .../test/mjsunit/regress/regress-1376663.js | 2 +- .../test/mjsunit/regress/regress-330638812.js | 18 + .../test/mjsunit/regress/regress-330765777.js | 15 + .../test/mjsunit/regress/regress-331074427.js | 21 + .../test/mjsunit/regress/regress-332745405.js | 52 + .../test/mjsunit/regress/regress-333926321.js | 6 + .../test/mjsunit/regress/regress-335548148.js | 29 + .../test/mjsunit/regress/regress-338457101.js | 10 + .../test/mjsunit/regress/regress-339681888.js | 49 + .../test/mjsunit/regress/regress-340824111.js | 17 + .../test/mjsunit/regress/regress-340921322.js | 23 + .../test/mjsunit/regress/regress-341972220.js | 13 + .../test/mjsunit/regress/regress-342451738.js | 29 + .../test/mjsunit/regress/regress-344664770.js | 14 + .../test/mjsunit/regress/regress-345960102.js | 19 + .../test/mjsunit/regress/regress-346086168.js | 16 + .../test/mjsunit/regress/regress-346414894.js | 10 + .../test/mjsunit/regress/regress-346617164.js | 33 + .../test/mjsunit/regress/regress-346876227.js | 22 + .../test/mjsunit/regress/regress-347071496.js | 19 + .../test/mjsunit/regress/regress-347118120.js | 13 + .../test/mjsunit/regress/regress-347863970.js | 27 + .../test/mjsunit/regress/regress-350779648.js | 16 + .../test/mjsunit/regress/regress-351926098.js | 40 + .../test/mjsunit/regress/regress-352402863.js | 32 + .../test/mjsunit/regress/regress-352407772.js | 18 + .../test/mjsunit/regress/regress-353628445.js | 31 + .../test/mjsunit/regress/regress-354626177.js | 33 + .../test/mjsunit/regress/regress-41488094.js | 52 + .../v8/test/mjsunit/regress/regress-444805.js | 2 +- .../v8/test/mjsunit/regress/regress-708247.js | 5 +- .../v8/test/mjsunit/regress/regress-996391.js | 2 +- .../regress/regress-chromium-1194026.js | 4 +- .../mjsunit/regress/regress-crbug-1237153.js | 2 +- .../mjsunit/regress/regress-crbug-1412487.js | 2 +- .../mjsunit/regress/regress-crbug-1421451.js | 4 +- .../regress/regress-crbug-329693878.js | 20 + .../regress/regress-crbug-331085620.js | 23 + .../regress/regress-crbug-332947126.js | 17 + .../regress/regress-crbug-333065494.js | 27 + .../regress/regress-crbug-333281864.js | 30 + .../regress/regress-crbug-335544080.js | 16 + .../regress/regress-crbug-335580637.js | 41 + .../regress/regress-crbug-335592004.js | 34 + .../regress/regress-crbug-335592010.js | 26 + .../regress/regress-crbug-335704358.js | 53 + .../regress/regress-crbug-335774293.js | 64 + .../regress/regress-crbug-336852492.js | 19 + .../mjsunit/regress/regress-crbug-511880.js | 2 +- .../mjsunit/regress/regress-crbug-722871.js | 4 +- .../mjsunit/regress/regress-crbug-9161.js | 2 +- .../test/mjsunit/regress/regress-v8-14662.js | 8 + .../test/mjsunit/regress/regress-v8-6716.js | 2 +- .../mjsunit/regress/wasm/regress-1010272.js | 3 +- .../mjsunit/regress/wasm/regress-1067621.js | 2 +- .../mjsunit/regress/wasm/regress-1114005.js | 3 +- .../mjsunit/regress/wasm/regress-11809.js | 2 +- .../mjsunit/regress/wasm/regress-1217064.js | 2 +- .../mjsunit/regress/wasm/regress-1227351.js | 2 +- .../mjsunit/regress/wasm/regress-1228720.js | 2 +- .../mjsunit/regress/wasm/regress-1231950.js | 2 +- .../mjsunit/regress/wasm/regress-1239116.js | 2 +- .../mjsunit/regress/wasm/regress-1239116b.js | 2 +- .../mjsunit/regress/wasm/regress-1242300.js | 2 +- .../mjsunit/regress/wasm/regress-1255354.js | 6 +- .../mjsunit/regress/wasm/regress-14689.js | 25 + .../mjsunit/regress/wasm/regress-14695.js | 18 + .../mjsunit/regress/wasm/regress-14700.js | 32 + .../mjsunit/regress/wasm/regress-330580823.js | 31 + .../mjsunit/regress/wasm/regress-330767273.js | 35 + .../mjsunit/regress/wasm/regress-331358160.js | 11 + .../mjsunit/regress/wasm/regress-331383939.js | 17 + .../mjsunit/regress/wasm/regress-331704408.js | 13 + .../mjsunit/regress/wasm/regress-332572762.js | 16 + .../mjsunit/regress/wasm/regress-332939161.js | 45 + .../mjsunit/regress/wasm/regress-333457544.js | 20 + .../mjsunit/regress/wasm/regress-333754542.js | 37 + .../mjsunit/regress/wasm/regress-334687959.js | 23 + .../mjsunit/regress/wasm/regress-336007398.js | 25 + .../mjsunit/regress/wasm/regress-336214779.js | 41 + .../regress/wasm/regress-336358915-a.js | 18 + .../mjsunit/regress/wasm/regress-336358915.js | 19 + .../mjsunit/regress/wasm/regress-336852356.js | 22 + .../mjsunit/regress/wasm/regress-337870524.js | 23 + .../mjsunit/regress/wasm/regress-339704607.js | 20 + .../mjsunit/regress/wasm/regress-339984212.js | 30 + .../mjsunit/regress/wasm/regress-341875188.js | 32 + .../mjsunit/regress/wasm/regress-341947685.js | 92 + .../mjsunit/regress/wasm/regress-343035068.js | 35 + .../mjsunit/regress/wasm/regress-343633071.js | 25 + .../mjsunit/regress/wasm/regress-343748812.js | 30 + .../mjsunit/regress/wasm/regress-343772336.js | 28 + .../mjsunit/regress/wasm/regress-343917751.js | 34 + .../mjsunit/regress/wasm/regress-344014332.js | 24 + .../mjsunit/regress/wasm/regress-344484969.js | 23 + .../mjsunit/regress/wasm/regress-346505953.js | 26 + .../regress/wasm/regress-347905990-2.js | 67 + .../mjsunit/regress/wasm/regress-347914823.js | 39 + .../mjsunit/regress/wasm/regress-347914831.js | 21 + .../mjsunit/regress/wasm/regress-347961785.js | 63 + .../regress/wasm/regress-348473836-global.js | 6 + .../regress/wasm/regress-348473836-memory.js | 6 + .../regress/wasm/regress-348473836-table.js | 6 + .../regress/wasm/regress-348473836-tag.js | 6 + .../wasm/regress-348473836-webassembly.js | 6 + .../mjsunit/regress/wasm/regress-350779988.js | 140 + .../regress/wasm/regress-352720899-2.js | 38 + .../mjsunit/regress/wasm/regress-352720899.js | 30 + .../mjsunit/regress/wasm/regress-353582136.js | 59 + .../mjsunit/regress/wasm/regress-40258436.js | 35 + .../mjsunit/regress/wasm/regress-5391956.js | 18 + .../test/mjsunit/regress/wasm/regress-8059.js | 2 +- .../mjsunit/regress/wasm/regress-808848.js | 2 +- .../test/mjsunit/regress/wasm/regress-8533.js | 2 +- .../regress/wasm/regress-crbug-1466312.js | 14 +- .../regress/wasm/regress-crbug-816961.js | 8 +- .../mjsunit/regress/wasm/regress-v8-14471.js | 2 +- .../mjsunit/regress/wasm/regress-v8-14710.js | 76 + ...learraybuffer-growablesharedarraybuffer.js | 2 +- .../mjsunit/sandbox/memory-corruption-api.js | 48 + .../sandbox/regress/regress-334120897.js | 76 + .../sandbox/regress/regress-349502157.js | 70 + .../regress/regress-crbug-335810507.js | 23 + .../sandbox/regress/regress-crbug-40926051.js | 20 + .../wasm-imports-concurrent-mutation.js | 84 + .../mjsunit/sandbox/wasm-inlining-sigcheck.js | 100 + .../sandbox/wasm-manipulated-instance.js | 78 + .../sandbox/wasm-signature-verification.js | 76 + .../test/mjsunit/sandbox/wasm-table-import.js | 72 + .../mjsunit/sandbox/wasm-table-sigcheck.js | 86 + .../sandbox/wasm-table-wasmjsfunction.js | 85 + deps/v8/test/mjsunit/sealed-array-reduce.js | 22 - ...sync-synchronization-workers-terminated.js | 110 + .../condition-async-wait-realm-disposed.js | 99 + .../condition-async-wait-timeout.js | 30 + .../shared-memory/condition-async-wait.js | 47 + .../shared-memory/condition-workers.js | 4 +- .../mutex-async-lock-promise-reject.js | 34 + .../mutex-async-lock-promise-resolve.js | 38 + .../mutex-async-lock-realm-disposed.js | 89 + .../mutex-async-lock-workers-timeout.js | 68 + .../shared-memory/mutex-async-lock-workers.js | 64 + .../mjsunit/shared-memory/mutex-async-lock.js | 32 + .../mutex-async-locked-worker-terminated.js | 52 + .../mutex-async-unlocked-worker-terminated.js | 62 + .../mjsunit/shared-memory/mutex-workers.js | 89 +- .../shared-memory/regress-crbug-333007256.js | 27 + .../shared-memory/regress-crbug-339043696.js | 30 + .../shared-memory/regress-crbug-349639796.js | 17 + .../shared-memory/regress-crbug-350641990.js | 21 + .../shared-array-atomics-workers.js | 4 +- .../shared-memory/shared-array-workers.js | 2 +- .../shared-string-copy-on-share-large.js | 2 +- .../shared-string-copy-on-share.js | 2 +- .../mjsunit/shared-memory/shared-string.js | 2 +- .../shared-struct-atomics-workers.js | 4 +- .../shared-struct-workers-optimized-code.js | 2 +- .../shared-memory/shared-struct-workers.js | 2 +- deps/v8/test/mjsunit/stack-traces.js | 29 + .../string-constructor-inlining-lazy-deopt.js | 22 + .../duration-to-json-boundary-cases.js | 389 +- .../test/mjsunit/test-scopeinfo-reuse-eval.js | 15 + deps/v8/test/mjsunit/tools/tickprocessor.mjs | 10 +- deps/v8/test/mjsunit/try-finally-in-for-of.js | 29 + .../Uint8Clamped-typed-array.js | 63 + .../maglev-frontend/add-double-property.js | 17 + .../maglev-frontend/api-call-no-prof.js | 22 + .../maglev-frontend/api-call-prof.js | 22 + .../maglev-frontend/array-buffer-detached.js | 29 + .../maglev-frontend/array-destruct.js | 16 + .../maglev-frontend/array-double-load.js | 20 + .../maglev-frontend/array-foreach.js | 36 + .../array-holey-double-load.js | 28 + .../maglev-frontend/array-load-hole.js | 16 + .../maglev-frontend/array-oob-load.js | 24 + .../maglev-frontend/array-push-grow.js | 22 + .../maglev-frontend/array-push-pop.js | 21 + .../maglev-frontend/array-smi-load.js | 21 + .../maglev-frontend/array-transitions.js | 44 + .../turboshaft/maglev-frontend/bitwise-smi.js | 21 + .../maglev-frontend/branch-on-math.js | 37 + .../builtin-continuation-deopt.js | 38 + .../maglev-frontend/call-spread-and-args.js | 20 + .../turboshaft/maglev-frontend/call-spread.js | 25 + .../maglev-frontend/catch-and-return.js | 28 + .../maglev-frontend/catch-multiple.js | 33 + .../turboshaft/maglev-frontend/catch.js | 31 + .../turboshaft/maglev-frontend/char-at.js | 15 + .../char-code-at-uint32max-deopt.js | 21 + .../maglev-frontend/check-value-equals-f64.js | 16 + .../maglev-frontend/const-tracking-let.js | 47 + .../maglev-frontend/construct-with-spread.js | 22 + .../constructor-extend-null-throw.js | 21 + .../constructor-super-called-twice.js | 22 + .../constructor-super-not-called.js | 21 + .../maglev-frontend/constructors.js | 26 + .../maglev-frontend/convert-receiver.js | 54 + .../maglev-frontend/create-array-lit.js | 23 + .../maglev-frontend/create-closure.js | 20 + .../maglev-frontend/create-object-lit.js | 16 + .../maglev-frontend/create-regexp-lit.js | 16 + .../create-shallow-array-literal.js | 14 + .../maglev-frontend/create-shallow-literal.js | 19 + .../turboshaft/maglev-frontend/dataview.js | 22 + .../maglev-frontend/delete-property-sloppy.js | 20 + .../maglev-frontend/delete-property-strict.js | 22 + .../dematerialized-arguments-length.js | 31 + .../dematerialized-arguments.js | 31 + .../dematerialized-double-array.js | 25 + .../dematerialized-duplicated-recursive.js | 32 + .../dematerialized-duplicated.js | 29 + .../dematerialized-heap-number.js | 23 + .../dematerialized-multi-escape.js | 42 + .../dematerialized-nested-objects.js | 27 + .../dematerialized-rest-length.js | 26 + .../maglev-frontend/dematerialized-rest.js | 25 + .../dematerialized-simple-object.js | 25 + .../maglev-frontend/deopt-raw-float-int32.js | 33 + .../turboshaft/maglev-frontend/eval.js | 21 + .../exception-phis-retagging.js | 38 + .../turboshaft/maglev-frontend/fact.js | 20 + .../turboshaft/maglev-frontend/float-arith.js | 22 + .../maglev-frontend/float64-compare.js | 99 + .../maglev-frontend/float64-phi-osr.js | 19 + .../maglev-frontend/float64-to-bool-branch.js | 24 + .../maglev-frontend/float64-to-bool.js | 20 + .../turboshaft/maglev-frontend/for-in-arr.js | 16 + .../turboshaft/maglev-frontend/for-in-obj.js | 21 + .../turboshaft/maglev-frontend/for-in-this.js | 19 + .../function-apply-arguments.js | 22 + .../maglev-frontend/function-apply.js | 21 + .../maglev-frontend/function-call-generic.js | 20 + .../generic-binop-exception.js | 23 + .../maglev-frontend/generic-binops-unops.js | 55 + .../has-in-prototype-chain-wasm.js | 32 + .../maglev-frontend/has-in-prototype-chain.js | 30 + .../maglev-frontend/holey-array-load.js | 28 + .../maglev-frontend/holey-float64-deopt.js | 38 + .../holey-float64-phi-deopt.js | 40 + .../maglev-frontend/ieee754-unary.js | 42 + .../maglev-frontend/inlined-function-loop.js | 24 + .../maglev-frontend/inner-function.js | 23 + .../turboshaft/maglev-frontend/instanceof.js | 20 + .../maglev-frontend/int32-compare.js | 62 + .../javascript-builtin-continuation.js | 35 + .../maglev-frontend/js-call-lazy-deopt.js | 40 + .../maglev-frontend/js-call-on-receiver.js | 17 + .../turboshaft/maglev-frontend/js-fun-call.js | 18 + .../lazy-deopt-multi-return.js | 31 + .../load-arr-with-float64-index.js | 24 + .../maglev-frontend/load-const-string-key.js | 20 + .../turboshaft/maglev-frontend/load-field.js | 19 + .../load-global-inside-typeof.js | 17 + .../turboshaft/maglev-frontend/load-global.js | 17 + .../load-holey-double-arr-for-branch.js | 23 + .../load-holey-double-arr-for-return.js | 21 + .../maglev-frontend/load-named-from-super.js | 24 + .../maglev-frontend/load-named-generic.js | 24 + .../maglev-frontend/load-named-on-num.js | 18 + .../loop-multiple-forward-edges-no-phi.js | 29 + .../loop-multiple-forward-edges.js | 32 + .../turboshaft/maglev-frontend/loop.js | 19 + .../maglev-frontend/make-array-init-size.js | 19 + .../make-array-no-init-size.js | 17 + .../maglev-frontend/make-fast-arr.js | 22 + .../maglev-frontend/make_objects.js | 17 + .../maglev-frontend/map-migration.js | 36 + .../turboshaft/maglev-frontend/math-round.js | 24 + .../maglev-frontend/megamorphic-load.js | 29 + .../mutable-heap-number-field.js | 39 + .../maglev-frontend/nested-loop-osr-throw.js | 13 + .../turboshaft/maglev-frontend/new-array.js | 42 + .../turboshaft/maglev-frontend/new-derived.js | 17 + .../maglev-frontend/new-obj-deopt.js | 37 + .../turboshaft/maglev-frontend/new-obj.js | 38 + .../maglev-frontend/new_obj_arr_proto.js | 17 + .../maglev-frontend/new_obj_int_property.js | 16 + .../maglev-frontend/no-backedge-loop.js | 19 + .../not-initialized-let-in-switch.js | 23 + .../maglev-frontend/number-float-truncate.js | 22 + .../maglev-frontend/number-to-string.js | 16 + .../mjsunit/turboshaft/maglev-frontend/osr.js | 39 + .../over-under-application-inline.js | 30 + .../over-under-application-not-inline.js | 35 + .../maglev-frontend/poly-store-transition.js | 32 + .../turboshaft/maglev-frontend/raw-abs.js | 40 + .../maglev-frontend/regress-351177452.js | 21 + .../maglev-frontend/regress-351219206.js | 19 + .../maglev-frontend/regress-351283984.js | 17 + .../maglev-frontend/regress-351418008.js | 22 + .../maglev-frontend/regress-351418019.js | 148 + .../maglev-frontend/regress-351576252.js | 32 + .../maglev-frontend/rest-param-length.js | 15 + .../maglev-frontend/set-get-keyed-generic.js | 18 + .../maglev-frontend/set-named-generic.js | 19 + .../turboshaft/maglev-frontend/shift_left.js | 17 + .../turboshaft/maglev-frontend/smi-arith.js | 26 + .../maglev-frontend/stack-overflow.js | 20 + .../turboshaft/maglev-frontend/store-field.js | 21 + .../store-float-to-smi-field.js | 23 + .../maglev-frontend/store-global.js | 18 + .../maglev-frontend/store-jsarray.js | 30 + .../store-uint32-to-smi-field.js | 32 + .../turboshaft/maglev-frontend/string-cmp.js | 61 + .../maglev-frontend/string-concat-throw.js | 35 + .../maglev-frontend/string-concat.js | 26 + .../maglev-frontend/string-from-charcode.js | 15 + .../turboshaft/maglev-frontend/string-lt.js | 15 + .../maglev-frontend/string-to-boolean.js | 18 + .../turboshaft/maglev-frontend/switch.js | 57 + .../turboshaft/maglev-frontend/symbol-eq.js | 22 + .../maglev-frontend/tagged-equal.js | 34 + .../maglev-frontend/test-undetectable.js | 24 + .../turboshaft/maglev-frontend/throw.js | 36 + .../turboshaft/maglev-frontend/to-boolean.js | 21 + .../turboshaft/maglev-frontend/to-name.js | 19 + .../maglev-frontend/to-number-int32-phi.js | 27 + .../turboshaft/maglev-frontend/to-number.js | 21 + .../turboshaft/maglev-frontend/to-string.js | 22 + .../maglev-frontend/typed-arrays.js | 25 + .../turboshaft/maglev-frontend/typeof-self.js | 16 + .../turboshaft/maglev-frontend/uint32-conv.js | 23 + .../uint8-clamped-arr-deopt.js | 19 + .../unary_minus_smi_minus_0.js | 15 + .../maglev-frontend/unconditional-deopt.js | 23 + .../under-applied-builtin-call.js | 14 + .../maglev-frontend/unreachable-catch.js | 32 + .../maglev-frontend/write-const-glob.js | 26 + .../turboshaft/turboshaft-maglev-frontend.js | 743 -- ...array-growablesharedarraybuffer-atomics.js | 4 +- ...typedarray-resizablearraybuffer-atomics.js | 2 +- deps/v8/test/mjsunit/typeof.js | 56 + .../v8/test/mjsunit/wasm/array-copy-errors.js | 61 + .../mjsunit/wasm/atomic-wait-multi-memory.js | 2 +- deps/v8/test/mjsunit/wasm/atomics-memory64.js | 2 +- deps/v8/test/mjsunit/wasm/atomics-stress.js | 2 +- deps/v8/test/mjsunit/wasm/atomics64-stress.js | 2 +- deps/v8/test/mjsunit/wasm/call_indirect.js | 3 +- .../wasm/code-flushing-single-isolate.js | 40 + deps/v8/test/mjsunit/wasm/code-flushing.js | 36 +- .../mjsunit/wasm/compare-exchange-stress.js | 2 +- .../mjsunit/wasm/compare-exchange64-stress.js | 2 +- .../mjsunit/wasm/deopt/deopt-call-indirect.js | 59 + .../wasm/deopt/deopt-dynamic-tierup.js | 64 + .../wasm/deopt/deopt-feedback-states.js | 117 + .../deopt/deopt-inlined-param-stack-slots.js | 68 + .../wasm/deopt/deopt-inlined-stacktrace.js | 93 + .../test/mjsunit/wasm/deopt/deopt-inlined.js | 105 + .../mjsunit/wasm/deopt/deopt-int64-values.js | 125 + .../wasm/deopt/deopt-large-i31ref-constant.js | 45 + .../deopt-many-params-many-locals-s128.js | 114 + .../wasm/deopt/deopt-many-params-tagged.js | 145 + .../mjsunit/wasm/deopt/deopt-many-params.js | 64 + .../mjsunit/wasm/deopt/deopt-memory-access.js | 58 + .../test/mjsunit/wasm/deopt/deopt-metrics.js | 58 + .../test/mjsunit/wasm/deopt/deopt-minimal.js | 61 + .../deopt-multi-instance-different-callee.js | 59 + .../deopt/deopt-multi-instance-inlined.js | 114 + .../wasm/deopt/deopt-multi-instance.js | 95 + .../test/mjsunit/wasm/deopt/deopt-multiple.js | 62 + deps/v8/test/mjsunit/wasm/deopt/deopt-nan.js | 170 + .../wasm/deopt/deopt-non-inlineable-target.js | 115 + .../wasm/deopt/deopt-non-inlined-target.js | 59 + .../wasm/deopt/deopt-signal-handler.js | 53 + .../deopt/deopt-tail-call-parent-frame.js | 58 + .../deopt/deopt-untagged-parameters-s128.js | 85 + .../wasm/deopt/deopt-untagged-parameters.js | 51 + .../mjsunit/wasm/deopt/deopt-value-types.js | 245 + deps/v8/test/mjsunit/wasm/errors.js | 4 +- deps/v8/test/mjsunit/wasm/exceptions-api.js | 11 +- .../wasm/exceptions-type-reflection.js | 2 +- deps/v8/test/mjsunit/wasm/exnref-api.js | 205 + deps/v8/test/mjsunit/wasm/exnref-global.js | 23 +- deps/v8/test/mjsunit/wasm/exnref.js | 7 +- ...i-calls-with-wellknown-imports-conflict.js | 69 + ...api-calls-with-wellknown-imports-floats.js | 87 + ...st-api-calls-with-wellknown-imports-i64.js | 183 + ...api-calls-with-wellknown-imports-tagged.js | 36 + .../fast-api-calls-with-wellknown-imports.js | 76 - deps/v8/test/mjsunit/wasm/ffi-error.js | 11 +- deps/v8/test/mjsunit/wasm/ffi.js | 4 +- deps/v8/test/mjsunit/wasm/futex.js | 2 +- deps/v8/test/mjsunit/wasm/gc-casts-exnref.js | 299 + deps/v8/test/mjsunit/wasm/gc-casts-invalid.js | 7 + .../mjsunit/wasm/gc-optimization-array-get.js | 58 + .../test/mjsunit/wasm/grow-shared-memory.js | 18 +- .../wasm/imported-strings-constants.js | 116 + .../mjsunit/wasm/js-wrapper-typechecks.js | 4 +- .../wasm/log-code-after-post-message.js | 2 +- .../wasm/log-wasm-to-js-wrapper-callref.js | 5 +- .../wasm/log-wasm-to-js-wrapper-indirect.js | 5 + deps/v8/test/mjsunit/wasm/memory64.js | 4 +- .../mjsunit/wasm/multi-memory64-memorysize.js | 45 + .../wasm/multi-memory64-wrong-offset.js | 39 + deps/v8/test/mjsunit/wasm/multi-memory64.js | 116 + deps/v8/test/mjsunit/wasm/nan-constant.js | 56 + .../test/mjsunit/wasm/origin-trial-flags.js | 2 +- .../wasm/reference-table-js-interop.js | 5 +- .../shared-arraybuffer-worker-simple-gc.js | 2 +- .../mjsunit/wasm/shared-everything/basic.js | 310 +- .../mjsunit/wasm/shared-memory-worker-gc.js | 9 +- .../wasm/shared-memory-worker-simple-gc.js | 2 +- .../test/mjsunit/wasm/speculative-inlining.js | 84 +- .../wasm/stack-switching-conditional.js | 18 + .../mjsunit/wasm/stack-switching-new-api.js | 562 ++ deps/v8/test/mjsunit/wasm/stack-switching.js | 29 +- .../mjsunit/wasm/stringref-array-nonetype.js | 30 + .../test/mjsunit/wasm/stringref-memory64.js | 78 + deps/v8/test/mjsunit/wasm/stringrefs-exec.js | 165 +- deps/v8/test/mjsunit/wasm/stringrefs-js.js | 108 +- deps/v8/test/mjsunit/wasm/stringrefs-valid.js | 23 +- .../mjsunit/wasm/stringview-valuestack.js | 7 +- deps/v8/test/mjsunit/wasm/table-limits.js | 5 +- .../test/mjsunit/wasm/table64-callindirect.js | 121 + deps/v8/test/mjsunit/wasm/table64-copy.js | 231 + deps/v8/test/mjsunit/wasm/table64-fill.js | 86 + deps/v8/test/mjsunit/wasm/table64-get.js | 134 + deps/v8/test/mjsunit/wasm/table64-grow.js | 44 + deps/v8/test/mjsunit/wasm/table64-import.js | 61 + deps/v8/test/mjsunit/wasm/table64-init.js | 110 + deps/v8/test/mjsunit/wasm/table64-limits.js | 75 + deps/v8/test/mjsunit/wasm/table64-set.js | 127 + deps/v8/test/mjsunit/wasm/table64-size.js | 21 + deps/v8/test/mjsunit/wasm/torque-wrapper.js | 8 +- .../wasm/turboshaft/br-table-analysis.js | 100 + .../mjsunit/wasm/type-reflection-exnref.js | 2 +- .../wasm/type-reflection-with-externref.js | 8 +- .../type-reflection-wrap-wasm-function.js | 32 + deps/v8/test/mjsunit/wasm/type-reflection.js | 24 +- deps/v8/test/mjsunit/wasm/unicode.js | 9 +- .../test/mjsunit/wasm/wasm-module-builder.js | 65 +- .../test/mjsunit/wasm/wasm-null-intrinsic.js | 17 + deps/v8/test/mjsunit/wasm/worker-memory.js | 6 +- deps/v8/test/mjsunit/wasm/worker-module.js | 2 +- ...worker-running-empty-loop-interruptible.js | 2 +- deps/v8/test/mjsunit/worker-ping-test.js | 2 +- deps/v8/test/mkgrokdump/mkgrokdump.cc | 2 +- deps/v8/test/test262/harness-agent.js | 2 +- ...using-in-async-function-call-with-await.js | 33 + ...ng-in-async-function-call-without-await.js | 32 + .../await-using-in-block.js | 32 + .../await-using-in-for-in-statement.js | 26 + .../await-using-in-for-of-statement.js | 27 + .../await-using-in-for-statement.js | 26 + .../await-using-in-switch-case-block.js | 28 + ...wait-using-with-no-async-dispose-method.js | 23 + .../await-using-with-sync-dispose-method.js | 32 + .../mixed-call-dispose-methods.js | 32 + .../local-tests/test/staging/features.txt | 63 +- deps/v8/test/test262/test262.status | 1989 ++-- deps/v8/test/test262/testcfg.py | 27 +- deps/v8/test/test262/tools/v8_exporter.py | 95 +- deps/v8/test/test262/tools/v8_importer.py | 26 +- deps/v8/test/unittests/BUILD.gn | 24 +- .../unittests/api/access-check-unittest.cc | 127 +- .../test/unittests/api/api-wasm-unittest.cc | 43 +- .../unittests/api/deserialize-unittest.cc | 128 +- .../api/dictionary-template-unittest.cc | 8 +- .../unittests/api/interceptor-unittest.cc | 53 +- .../unittests/api/remote-object-unittest.cc | 6 +- .../test/unittests/api/v8-object-unittest.cc | 2 +- .../test/unittests/api/v8-script-unittest.cc | 186 +- .../assembler/assembler-x64-unittest.cc | 207 +- .../assembler/disasm-arm64-unittest.cc | 21 + .../assembler/disasm-riscv-unittest.cc | 16 +- .../assembler/disasm-x64-unittest.cc | 72 +- .../macro-assembler-ia32-unittest.cc | 29 + .../assembler/macro-assembler-x64-unittest.cc | 299 +- .../unittests/codegen/code-layout-unittest.cc | 4 +- .../unittests/codegen/code-pages-unittest.cc | 30 +- .../codegen/code-stub-assembler-unittest.cc | 14 +- .../unittests/codegen/factory-unittest.cc | 2 +- .../compiler-dispatcher-unittest.cc | 41 +- ...aft-instruction-selector-arm64-unittest.cc | 2214 +++-- .../backend/instruction-selector-unittest.cc | 7 +- .../backend/instruction-selector-unittest.h | 4 +- ...urboshaft-instruction-selector-unittest.cc | 9 +- ...turboshaft-instruction-selector-unittest.h | 201 +- .../compiler/bytecode-analysis-unittest.cc | 2 + .../unittests/compiler/codegen-unittest.cc | 4 +- .../unittests/compiler/compiler-unittest.cc | 59 +- .../control-flow-optimizer-unittest.cc | 103 - .../effect-control-linearizer-unittest.cc | 293 - .../unittests/compiler/function-tester.cc | 15 +- .../test/unittests/compiler/function-tester.h | 13 +- .../test/unittests/compiler/graph-unittest.cc | 6 +- .../compiler/js-call-reducer-unittest.cc | 8 +- .../compiler/js-create-lowering-unittest.cc | 2 +- .../instruction-selector-riscv32-unittest.cc | 44 - ...t-instruction-selector-riscv32-unittest.cc | 1180 +++ .../instruction-selector-riscv64-unittest.cc | 128 +- ...t-instruction-selector-riscv64-unittest.cc | 1576 +++ .../run-bytecode-graph-builder-unittest.cc | 128 +- .../compiler/run-jsobjects-unittest.cc | 18 +- .../compiler/run-tail-calls-unittest.cc | 4 +- .../turboshaft/control-flow-unittest.cc | 31 +- .../loop-unrolling-analyzer-unittest.cc | 421 + .../compiler/turboshaft/opmask-unittest.cc | 2 +- .../compiler/turboshaft/reducer-test.h | 52 +- ...tore-store-elimination-reducer-unittest.cc | 3 +- .../test/unittests/compiler/types-unittest.cc | 29 +- ...shaft-instruction-selector-x64-unittest.cc | 1289 ++- .../debug/debug-property-iterator-unittest.cc | 2 +- .../deoptimizer/deoptimization-unittest.cc | 2 +- .../execution/microtask-queue-unittest.cc | 51 +- .../flags/flag-definitions-unittest.cc | 2 + deps/v8/test/unittests/fuzztest.cc | 5 +- .../v8/test/unittests/gen_fuzztest_configs.py | 31 +- .../unittests/gen_fuzztest_configs_test.py | 21 +- .../conservative-stack-visitor-unittest.cc | 193 +- .../embedder-roots-handler-unittest.cc | 189 +- .../cppgc-js/traced-reference-unittest.cc | 28 +- .../unified-heap-snapshot-unittest.cc | 271 +- .../heap/cppgc-js/unified-heap-unittest.cc | 133 +- .../heap/cppgc-js/unified-heap-utils.cc | 59 +- .../heap/cppgc-js/unified-heap-utils.h | 32 +- .../cppgc-js/young-unified-heap-unittest.cc | 16 +- .../heap/cppgc/compactor-unittest.cc | 8 + .../heap/cppgc/concurrent-sweeper-unittest.cc | 15 +- .../heap/cppgc/gc-invoker-unittest.cc | 20 +- .../heap-statistics-collector-unittest.cc | 45 + .../heap/cppgc/marking-verifier-unittest.cc | 21 +- .../heap/cppgc/name-trait-unittest.cc | 14 +- .../heap/cppgc/page-memory-unittest.cc | 80 +- .../unittests/heap/cppgc/stack-unittest.cc | 4 +- .../unittests/heap/cppgc/sweeper-unittest.cc | 6 +- .../unittests/heap/direct-handles-unittest.cc | 16 +- .../heap/gc-idle-time-handler-unittest.cc | 96 - .../unittests/heap/global-handles-unittest.cc | 8 +- deps/v8/test/unittests/heap/heap-unittest.cc | 68 +- deps/v8/test/unittests/heap/heap-utils.cc | 2 +- .../heap/inner-pointer-resolution-unittest.cc | 8 +- .../unittests/heap/local-factory-unittest.cc | 25 +- .../unittests/heap/local-handles-unittest.cc | 15 +- .../heap/marking-worklist-unittest.cc | 14 +- .../heap/persistent-handles-unittest.cc | 11 +- deps/v8/test/unittests/heap/pool-unittest.cc | 12 +- .../unittests/heap/shared-heap-unittest.cc | 238 +- .../v8/test/unittests/heap/spaces-unittest.cc | 14 +- .../bytecode-array-builder-unittest.cc | 29 +- .../bytecode-array-iterator-unittest.cc | 10 +- ...bytecode-array-random-iterator-unittest.cc | 30 +- .../bytecode-array-writer-unittest.cc | 44 +- .../interpreter/bytecode-decoder-unittest.cc | 5 +- .../bytecode-expectations-printer.cc | 48 +- .../bytecode-expectations-printer.h | 7 +- .../AsyncGenerators.golden | 554 +- .../bytecode_expectations/AsyncModules.golden | 8 +- .../CallLookupSlot.golden | 2 +- .../DestructuringAssignment.golden | 186 +- .../ElideRedundantHoleChecks.golden | 106 +- .../bytecode_expectations/Eval.golden | 2 +- .../bytecode_expectations/ForAwaitOf.golden | 356 +- .../bytecode_expectations/ForIn.golden | 42 +- .../bytecode_expectations/ForOf.golden | 198 +- .../bytecode_expectations/ForOfLoop.golden | 456 +- .../bytecode_expectations/Generators.golden | 66 +- .../bytecode_expectations/LookupSlot.golden | 14 +- .../LookupSlotInEval.golden | 4 +- .../PrivateAccessorAccess.golden | 8 +- .../PrivateMethodAccess.golden | 4 +- .../StandardForLoop.golden | 4 +- .../StaticPrivateMethodAccess.golden | 30 +- .../bytecode_expectations/Switch.golden | 12 +- .../bytecode_expectations/TryFinally.golden | 90 +- .../bytecode_expectations/Typeof.golden | 8 +- .../VariableWithHint.golden | 30 +- .../WideRegisters.golden | 10 +- .../interpreter/bytecodes-unittest.cc | 2 +- .../constant-array-builder-unittest.cc | 55 +- .../interpreter-assembler-unittest.cc | 1 + .../interpreter/interpreter-tester.cc | 6 +- .../interpreter/interpreter-tester.h | 6 +- .../interpreter/interpreter-unittest.cc | 360 +- .../interpreter/source-positions-unittest.cc | 4 +- .../unittests/libsampler/sampler-unittest.cc | 5 +- .../v8/test/unittests/logging/log-unittest.cc | 37 +- deps/v8/test/unittests/maglev/maglev-test.cc | 4 +- .../unittests/maglev/node-type-unittest.cc | 4 +- .../test/unittests/numbers/bigint-unittest.cc | 14 +- .../unittests/numbers/conversions-unittest.cc | 9 +- .../concurrent-descriptor-array-unittest.cc | 6 +- .../concurrent-feedback-vector-unittest.cc | 22 +- .../objects/concurrent-js-array-unittest.cc | 8 +- .../objects/concurrent-prototype-unittest.cc | 4 +- ...oncurrent-script-context-table-unittest.cc | 16 +- .../objects/concurrent-string-unittest.cc | 6 +- .../concurrent-transition-array-unittest.cc | 12 +- .../unittests/objects/dictionary-unittest.cc | 4 +- .../objects/elements-kind-unittest.cc | 13 +- .../objects/feedback-vector-unittest.cc | 68 +- .../objects/global-object-unittest.cc | 23 +- .../unittests/objects/hashcode-unittest.cc | 26 +- .../test/unittests/objects/intl-unittest.cc | 6 +- .../unittests/objects/managed-unittest.cc | 48 +- .../unittests/objects/modules-unittest.cc | 28 + .../test/unittests/objects/object-unittest.cc | 47 +- .../test/unittests/objects/roots-unittest.cc | 7 +- .../objects/value-serializer-unittest.cc | 46 +- .../objects/weakarraylist-unittest.cc | 6 +- .../unittests/objects/weakmaps-unittest.cc | 100 +- .../unittests/objects/weaksets-unittest.cc | 54 +- .../test/unittests/parser/decls-unittest.cc | 116 +- .../parser/parse-decision-unittest.cc | 6 +- .../test/unittests/parser/parsing-unittest.cc | 475 +- .../unittests/parser/preparser-unittest.cc | 56 +- .../parser/scanner-streams-unittest.cc | 14 +- .../test/unittests/parser/scanner-unittest.cc | 44 + .../profiler/strings-storage-unittest.cc | 19 +- .../unittests/regexp/fuzzer_regexp_grammar.g4 | 624 ++ .../v8/test/unittests/regexp/regexp-fuzzer.cc | 179 + .../v8/test/unittests/regexp/regexp-grammar.h | 1050 ++ .../test/unittests/regexp/regexp-unittest.cc | 212 +- .../regress/regress-crbug-1056054-unittest.cc | 2 +- .../runtime/runtime-debug-unittest.cc | 8 +- .../unittests/strings/unicode-unittest.cc | 66 +- .../tasks/background-compile-task-unittest.cc | 35 +- .../temporal/temporal-parser-unittest.cc | 2 +- deps/v8/test/unittests/test-helpers.cc | 32 +- deps/v8/test/unittests/test-helpers.h | 15 +- deps/v8/test/unittests/test-utils.h | 9 +- .../test/unittests/torque/torque-unittest.cc | 2 + deps/v8/test/unittests/unittests.status | 7 - .../unittests/utils/identity-map-unittest.cc | 17 +- .../wasm/function-body-decoder-unittest.cc | 414 +- .../wasm/liftoff-register-unittests.cc | 4 +- .../wasm/memory-protection-unittest.cc | 17 +- .../wasm/module-decoder-memory64-unittest.cc | 16 +- .../wasm/module-decoder-table64-unittest.cc | 138 + .../unittests/wasm/module-decoder-unittest.cc | 193 +- .../wasm/signature-hashing-unittest.cc | 79 + .../unittests/wasm/simd-shuffle-unittest.cc | 133 +- .../test/unittests/wasm/subtyping-unittest.cc | 6 +- .../wasm/trap-handler-simulator-unittest.cc | 4 +- .../wasm-disassembler-unittest-mvp.wat.inc | 2 +- .../wasm-disassembler-unittest-names.wat.inc | 2 +- deps/v8/test/wasm-api-tests/memory.cc | 3 +- deps/v8/test/wasm-api-tests/reflect.cc | 2 +- deps/v8/test/wasm-api-tests/startup-errors.cc | 4 +- deps/v8/test/wasm-api-tests/traps.cc | 5 +- deps/v8/test/wasm-js/testcfg.py | 4 + deps/v8/test/wasm-js/tests.tar.gz.sha1 | 2 +- deps/v8/test/wasm-js/wasm-js.status | 7 + deps/v8/test/wasm-spec-tests/testcfg.py | 4 + .../v8/test/wasm-spec-tests/tests.tar.gz.sha1 | 2 +- .../wasm-spec-tests/wasm-spec-tests.status | 12 + deps/v8/third_party/abseil-cpp/BUILD.gn | 19 +- .../abseil-cpp/CMake/AbseilDll.cmake | 100 +- .../abseil-cpp/CMake/AbseilHelpers.cmake | 2 +- .../CMake/Googletest/CMakeLists.txt.in | 2 +- .../v8/third_party/abseil-cpp/CMake/README.md | 4 +- .../CMake/install_test_project/CMakeLists.txt | 2 +- deps/v8/third_party/abseil-cpp/CMakeLists.txt | 63 +- .../v8/third_party/abseil-cpp/README.chromium | 2 +- .../abseil-cpp/absl/CMakeLists.txt | 4 +- .../abseil-cpp/absl/abseil.podspec.gen.py | 13 +- .../abseil-cpp/absl/algorithm/BUILD.bazel | 2 + .../abseil-cpp/absl/algorithm/BUILD.gn | 4 +- .../abseil-cpp/absl/algorithm/CMakeLists.txt | 2 + .../abseil-cpp/absl/algorithm/container.h | 75 +- .../absl/algorithm/container_test.cc | 63 + .../abseil-cpp/absl/base/BUILD.bazel | 48 + .../third_party/abseil-cpp/absl/base/BUILD.gn | 29 + .../abseil-cpp/absl/base/CMakeLists.txt | 31 + .../abseil-cpp/absl/base/attributes.h | 37 + .../abseil-cpp/absl/base/c_header_test.c | 30 + .../third_party/abseil-cpp/absl/base/config.h | 75 +- .../absl/base/dynamic_annotations.h | 16 - .../absl/base/internal/nullability_impl.h | 4 +- .../abseil-cpp/absl/base/internal/poison.cc | 84 + .../abseil-cpp/absl/base/internal/poison.h | 59 + .../absl/base/internal/poison_test.cc | 41 + .../abseil-cpp/absl/base/internal/spinlock.h | 14 +- .../absl/base/internal/unscaledcycleclock.cc | 12 - .../base/internal/unscaledcycleclock_config.h | 8 +- .../third_party/abseil-cpp/absl/base/macros.h | 12 + .../abseil-cpp/absl/base/no_destructor.h | 56 +- .../abseil-cpp/absl/base/nullability.h | 40 +- .../abseil-cpp/absl/base/optimization.h | 11 + .../abseil-cpp/absl/container/BUILD.bazel | 41 +- .../abseil-cpp/absl/container/BUILD.gn | 60 +- .../abseil-cpp/absl/container/CMakeLists.txt | 43 +- .../abseil-cpp/absl/container/btree_map.h | 6 +- .../abseil-cpp/absl/container/btree_set.h | 7 +- .../abseil-cpp/absl/container/flat_hash_map.h | 53 +- .../absl/container/flat_hash_map_test.cc | 89 + .../abseil-cpp/absl/container/flat_hash_set.h | 40 +- .../absl/container/flat_hash_set_test.cc | 33 + .../absl/container/hash_container_defaults.h | 45 + .../absl/container/internal/btree.h | 47 +- .../container/internal/compressed_tuple.h | 12 +- .../internal/compressed_tuple_test.cc | 70 +- .../container/internal/hash_policy_traits.h | 4 +- .../container/internal/hashtablez_sampler.cc | 26 +- .../container/internal/hashtablez_sampler.h | 34 +- .../internal/hashtablez_sampler_test.cc | 124 +- .../absl/container/internal/inlined_vector.h | 13 +- .../absl/container/internal/layout.h | 264 +- .../container/internal/layout_benchmark.cc | 177 +- .../absl/container/internal/layout_test.cc | 396 +- .../absl/container/internal/raw_hash_set.cc | 327 +- .../absl/container/internal/raw_hash_set.h | 788 +- .../internal/raw_hash_set_benchmark.cc | 64 + .../container/internal/raw_hash_set_test.cc | 756 +- .../abseil-cpp/absl/container/node_hash_map.h | 48 +- .../absl/container/node_hash_map_test.cc | 65 + .../abseil-cpp/absl/container/node_hash_set.h | 42 +- .../absl/container/node_hash_set_test.cc | 46 + .../absl/copts/AbseilConfigureCopts.cmake | 4 +- .../absl/copts/GENERATED_AbseilCopts.cmake | 8 +- .../abseil-cpp/absl/copts/GENERATED_copts.bzl | 8 +- .../abseil-cpp/absl/copts/copts.py | 4 +- .../abseil-cpp/absl/crc/BUILD.bazel | 8 +- .../internal/crc32_x86_arm_combined_simd.h | 29 +- .../absl/crc/internal/crc_memcpy_fallback.cc | 3 +- .../internal/crc_memcpy_x86_arm_combined.cc | 20 +- .../crc/internal/crc_non_temporal_memcpy.cc | 2 +- .../absl/crc/internal/crc_x86_arm_combined.cc | 18 +- .../absl/crc/internal/non_temporal_memcpy.h | 35 +- .../abseil-cpp/absl/debugging/BUILD.bazel | 103 + .../abseil-cpp/absl/debugging/BUILD.gn | 86 +- .../abseil-cpp/absl/debugging/CMakeLists.txt | 116 +- .../internal/bounded_utf8_length_sequence.h | 126 + .../bounded_utf8_length_sequence_test.cc | 126 + .../internal/decode_rust_punycode.cc | 258 + .../debugging/internal/decode_rust_punycode.h | 55 + .../internal/decode_rust_punycode_test.cc | 606 ++ .../absl/debugging/internal/demangle.cc | 1010 +- .../absl/debugging/internal/demangle.h | 3 + .../absl/debugging/internal/demangle_rust.cc | 925 ++ .../absl/debugging/internal/demangle_rust.h | 42 + .../debugging/internal/demangle_rust_test.cc | 584 ++ .../absl/debugging/internal/demangle_test.cc | 1610 ++- .../absl/debugging/internal/elf_mem_image.cc | 59 +- .../absl/debugging/internal/elf_mem_image.h | 15 +- .../internal/stacktrace_aarch64-inl.inc | 2 + .../debugging/internal/utf8_for_code_point.cc | 70 + .../debugging/internal/utf8_for_code_point.h | 47 + .../internal/utf8_for_code_point_test.cc | 175 + .../abseil-cpp/absl/flags/BUILD.bazel | 1 + .../abseil-cpp/absl/flags/BUILD.gn | 1 + .../abseil-cpp/absl/flags/CMakeLists.txt | 1 + .../abseil-cpp/absl/flags/commandlineflag.h | 11 + .../abseil-cpp/absl/flags/flag_benchmark.cc | 2 +- .../abseil-cpp/absl/flags/flag_test.cc | 200 +- .../abseil-cpp/absl/flags/internal/flag.cc | 147 +- .../abseil-cpp/absl/flags/internal/flag.h | 216 +- .../abseil-cpp/absl/flags/parse_test.cc | 10 +- .../abseil-cpp/absl/flags/reflection.cc | 10 + .../abseil-cpp/absl/functional/CMakeLists.txt | 4 + .../absl/functional/any_invocable.h | 16 +- .../absl/functional/internal/any_invocable.h | 14 +- .../abseil-cpp/absl/functional/overload.h | 66 +- .../absl/functional/overload_test.cc | 157 +- .../abseil-cpp/absl/hash/hash_benchmark.cc | 14 +- .../abseil-cpp/absl/hash/hash_test.cc | 2 +- .../abseil-cpp/absl/hash/internal/hash.h | 16 +- .../absl/hash/internal/low_level_hash.cc | 8 +- .../abseil-cpp/absl/log/BUILD.bazel | 10 +- .../third_party/abseil-cpp/absl/log/BUILD.gn | 5 +- .../abseil-cpp/absl/log/CMakeLists.txt | 6 + .../absl/log/absl_log_basic_test.cc | 1 + .../abseil-cpp/absl/log/absl_vlog_is_on.h | 6 +- .../abseil-cpp/absl/log/check_test_impl.inc | 158 + .../abseil-cpp/absl/log/die_if_null.h | 2 +- .../third_party/abseil-cpp/absl/log/globals.h | 43 +- .../abseil-cpp/absl/log/internal/BUILD.bazel | 5 +- .../abseil-cpp/absl/log/internal/BUILD.gn | 1 + .../abseil-cpp/absl/log/internal/check_op.cc | 20 + .../abseil-cpp/absl/log/internal/check_op.h | 84 +- .../abseil-cpp/absl/log/internal/conditions.h | 4 +- .../abseil-cpp/absl/log/internal/log_impl.h | 46 +- .../absl/log/internal/log_message.cc | 151 +- .../absl/log/internal/log_message.h | 27 +- .../abseil-cpp/absl/log/internal/nullstream.h | 11 +- .../abseil-cpp/absl/log/internal/strip.h | 36 + .../absl/log/internal/test_matchers.cc | 9 +- .../absl/log/internal/test_matchers.h | 2 +- deps/v8/third_party/abseil-cpp/absl/log/log.h | 6 +- .../abseil-cpp/absl/log/log_basic_test.cc | 1 + .../absl/log/log_basic_test_impl.inc | 233 +- .../abseil-cpp/absl/log/log_benchmark.cc | 67 + .../abseil-cpp/absl/log/log_format_test.cc | 680 +- .../absl/log/log_modifier_methods_test.cc | 36 +- .../abseil-cpp/absl/log/log_streamer_test.cc | 269 +- .../abseil-cpp/absl/log/structured_test.cc | 5 +- .../abseil-cpp/absl/log/vlog_is_on.h | 6 +- .../abseil-cpp/absl/meta/type_traits.h | 122 +- .../abseil-cpp/absl/meta/type_traits_test.cc | 92 +- .../abseil-cpp/absl/numeric/BUILD.bazel | 2 + .../abseil-cpp/absl/numeric/BUILD.gn | 2 + .../abseil-cpp/absl/numeric/CMakeLists.txt | 2 + .../abseil-cpp/absl/numeric/int128.h | 35 + .../absl/numeric/int128_have_intrinsic.inc | 14 + .../absl/numeric/int128_no_intrinsic.inc | 18 + .../abseil-cpp/absl/numeric/int128_test.cc | 8 + .../abseil-cpp/absl/numeric/internal/bits.h | 8 +- .../profiling/internal/periodic_sampler.h | 2 +- .../abseil-cpp/absl/random/BUILD.bazel | 16 +- .../abseil-cpp/absl/random/BUILD.gn | 50 + .../abseil-cpp/absl/random/CMakeLists.txt | 36 +- .../abseil-cpp/absl/random/benchmarks.cc | 4 +- .../absl/random/beta_distribution.h | 16 +- .../abseil-cpp/absl/random/bit_gen_ref.h | 15 +- .../absl/random/discrete_distribution_test.cc | 2 +- .../abseil-cpp/absl/random/distributions.h | 22 +- .../absl/random/distributions_test.cc | 60 +- .../absl/random/internal/BUILD.bazel | 16 +- .../abseil-cpp/absl/random/internal/BUILD.gn | 78 +- .../absl/random/internal/mock_helpers.h | 40 +- .../absl/random/internal/mock_overload_set.h | 82 +- .../absl/random/internal/mock_validators.h | 98 + .../absl/random/mock_distributions.h | 19 +- .../absl/random/mock_distributions_test.cc | 215 + .../abseil-cpp/absl/random/mocking_bit_gen.h | 158 +- .../absl/random/mocking_bit_gen_test.cc | 49 +- .../abseil-cpp/absl/status/BUILD.bazel | 36 + .../abseil-cpp/absl/status/BUILD.gn | 33 + .../abseil-cpp/absl/status/CMakeLists.txt | 38 + .../absl/status/internal/status_matchers.cc | 68 + .../absl/status/internal/status_matchers.h | 246 + .../absl/status/internal/statusor_internal.h | 63 +- .../abseil-cpp/absl/status/status.cc | 4 - .../abseil-cpp/absl/status/status_matchers.h | 118 + .../absl/status/status_matchers_test.cc | 119 + .../abseil-cpp/absl/status/statusor.h | 250 +- .../abseil-cpp/absl/status/statusor_test.cc | 167 +- .../abseil-cpp/absl/strings/BUILD.bazel | 4 + .../abseil-cpp/absl/strings/BUILD.gn | 4 + .../abseil-cpp/absl/strings/CMakeLists.txt | 7 +- .../abseil-cpp/absl/strings/ascii.cc | 103 +- .../abseil-cpp/absl/strings/ascii_test.cc | 4 + .../abseil-cpp/absl/strings/cord.cc | 35 +- .../abseil-cpp/absl/strings/cord.h | 68 +- .../abseil-cpp/absl/strings/cord_test.cc | 120 +- .../abseil-cpp/absl/strings/escaping.cc | 13 +- .../abseil-cpp/absl/strings/escaping_test.cc | 7 + .../absl/strings/has_absl_stringify.h | 1 + .../absl/strings/internal/charconv_bigint.h | 10 + .../absl/strings/internal/cord_internal.h | 3 +- .../absl/strings/internal/cordz_functions.cc | 32 +- .../absl/strings/internal/cordz_functions.h | 36 +- .../strings/internal/cordz_functions_test.cc | 14 +- .../absl/strings/internal/cordz_info.cc | 19 +- .../absl/strings/internal/cordz_info.h | 13 +- .../internal/cordz_info_statistics_test.cc | 4 +- .../absl/strings/internal/cordz_info_test.cc | 32 +- .../internal/cordz_sample_token_test.cc | 14 +- .../internal/cordz_update_scope_test.cc | 2 +- .../absl/strings/internal/escaping.cc | 7 +- .../strings/internal/has_absl_stringify.h | 12 +- .../internal/str_format/convert_test.cc | 74 +- .../absl/strings/internal/str_join_internal.h | 25 +- .../abseil-cpp/absl/strings/numbers.cc | 440 +- .../abseil-cpp/absl/strings/numbers.h | 163 +- .../abseil-cpp/absl/strings/numbers_test.cc | 7 - .../abseil-cpp/absl/strings/str_cat.cc | 191 +- .../abseil-cpp/absl/strings/str_cat.h | 149 +- .../abseil-cpp/absl/strings/str_cat_test.cc | 46 - .../abseil-cpp/absl/strings/str_format.h | 2 +- .../abseil-cpp/absl/strings/str_join.h | 24 +- .../absl/strings/str_join_benchmark.cc | 10 + .../abseil-cpp/absl/strings/str_join_test.cc | 36 + .../abseil-cpp/absl/strings/str_split.h | 2 +- .../abseil-cpp/absl/strings/string_view.h | 3 +- .../absl/strings/string_view_test.cc | 9 + .../abseil-cpp/absl/strings/substitute.cc | 4 + .../synchronization/internal/graphcycles.cc | 11 +- .../synchronization/internal/graphcycles.h | 5 + .../internal/graphcycles_test.cc | 19 + .../internal/kernel_timeout_test.cc | 11 +- .../internal/per_thread_sem_test.cc | 2 +- .../synchronization/internal/waiter_test.cc | 2 +- .../abseil-cpp/absl/synchronization/mutex.h | 9 +- .../abseil-cpp/absl/time/CMakeLists.txt | 2 +- .../abseil-cpp/absl/time/civil_time.h | 4 +- .../abseil-cpp/absl/time/duration_test.cc | 61 + .../abseil-cpp/absl/time/format.cc | 3 +- .../absl/time/internal/cctz/BUILD.gn | 5 - .../time/internal/cctz/src/time_zone_libc.cc | 2 +- .../third_party/abseil-cpp/absl/time/time.h | 48 + .../abseil-cpp/absl/time/time_test.cc | 156 +- .../abseil-cpp/absl/types/BUILD.bazel | 1 + .../abseil-cpp/absl/types/BUILD.gn | 15 + .../abseil-cpp/absl/types/CMakeLists.txt | 1 + .../abseil-cpp/absl/types/internal/variant.h | 15 +- .../third_party/abseil-cpp/absl/types/span.h | 3 +- .../abseil-cpp/absl/types/span_test.cc | 5 + .../abseil-cpp/absl/utility/utility.h | 44 +- .../abseil-cpp/absl/utility/utility_test.cc | 8 - deps/v8/third_party/abseil-cpp/create_lts.py | 27 +- .../abseil-cpp/generate_def_files.py | 5 +- .../abseil-cpp/symbols_arm64_dbg.def | 368 +- .../abseil-cpp/symbols_arm64_rel.def | 283 +- .../abseil-cpp/symbols_x64_dbg.def | 373 +- .../abseil-cpp/symbols_x64_rel.def | 269 +- .../abseil-cpp/symbols_x64_rel_asan.def | 304 +- .../abseil-cpp/symbols_x86_dbg.def | 373 +- .../abseil-cpp/symbols_x86_rel.def | 278 +- .../fp16/src/include/fp16/bitcasts.h | 10 +- deps/v8/third_party/highway/BUILD.gn | 36 + deps/v8/third_party/highway/DIR_METADATA | 6 + deps/v8/third_party/highway/LICENSE | 201 + deps/v8/third_party/highway/OWNERS | 2 + deps/v8/third_party/highway/README.chromium | 17 + .../third_party/inspector_protocol/README.v8 | 2 +- .../check_protocol_compatibility.py | 1 - .../inspector_protocol/crdtp/json.cc | 90 +- deps/v8/third_party/jinja2/README.chromium | 3 + deps/v8/third_party/jinja2/environment.py | 6 + .../0001-canonicalize-zipinfo-create-system | 17 + .../v8/third_party/markupsafe/README.chromium | 1 + deps/v8/third_party/re2/BUILD.gn | 1 - deps/v8/third_party/re2/DIR_METADATA | 3 + deps/v8/third_party/v8/builtins/OWNERS | 1 - deps/v8/third_party/zlib/BUILD.gn | 46 +- deps/v8/third_party/zlib/CMakeLists.txt | 165 +- deps/v8/third_party/zlib/adler32.c | 13 +- deps/v8/third_party/zlib/adler32_simd.c | 90 + deps/v8/third_party/zlib/chromeconf.h | 1 - .../zlib/contrib/minizip/README.chromium | 3 +- .../zlib/contrib/optimizations/chunkcopy.h | 75 + .../zlib/contrib/qat/deflate_qat.cpp | 312 + .../zlib/contrib/qat/deflate_qat.h | 54 + .../zlib/contrib/qat/qatzpp/io_buffers.cpp | 31 + .../zlib/contrib/qat/qatzpp/io_buffers.h | 62 + .../zlib/contrib/qat/qatzpp/memory.cpp | 30 + .../zlib/contrib/qat/qatzpp/memory.hpp | 40 + .../zlib/contrib/qat/qatzpp/qat.cpp | 73 + .../zlib/contrib/qat/qatzpp/qat.hpp | 19 + .../contrib/qat/qatzpp/qat_buffer_list.cpp | 34 + .../contrib/qat/qatzpp/qat_buffer_list.hpp | 32 + .../zlib/contrib/qat/qatzpp/qat_instance.cpp | 135 + .../zlib/contrib/qat/qatzpp/qat_instance.hpp | 45 + .../zlib/contrib/qat/qatzpp/qat_task.cpp | 58 + .../zlib/contrib/qat/qatzpp/qat_task.hpp | 54 + .../zlib/contrib/qat/qatzpp/session.cpp | 129 + .../zlib/contrib/qat/qatzpp/session.hpp | 45 + deps/v8/third_party/zlib/cpu_features.c | 32 +- deps/v8/third_party/zlib/cpu_features.h | 3 + deps/v8/third_party/zlib/crc32.c | 36 +- deps/v8/third_party/zlib/crc32_simd.c | 9 +- deps/v8/third_party/zlib/deflate.c | 70 +- deps/v8/third_party/zlib/deflate.h | 7 + deps/v8/third_party/zlib/examples/zpipe.c | 209 + .../zlib/google/compression_utils.cc | 1 - .../third_party/zlib/google/zip_internal.cc | 110 +- deps/v8/third_party/zlib/google/zip_reader.cc | 11 +- deps/v8/third_party/zlib/google/zip_reader.h | 3 +- .../zlib/google/zip_reader_unittest.cc | 20 +- .../third_party/zlib/google/zip_unittest.cc | 6 +- deps/v8/third_party/zlib/test/minigzip.c | 579 ++ .../tools/builtins-pgo/download_profiles.py | 16 +- .../builtins-pgo/download_profiles_test.py | 33 +- deps/v8/tools/builtins-pgo/generate.py | 12 - .../clusterfuzz/foozzie/v8_fuzz_flags.json | 3 +- deps/v8/tools/clusterfuzz/js_fuzzer/OWNERS | 4 - .../trials/clusterfuzz_trials_config.json | 5 +- deps/v8/tools/debug_helper/debug-helper.h | 7 +- .../debug_helper/get-object-properties.cc | 32 +- deps/v8/tools/dev/gen-static-roots.py | 4 +- deps/v8/tools/dev/gm.py | 95 +- deps/v8/tools/dev/setup-reclient.py | 251 + deps/v8/tools/dev/update-compile-commands.py | 2 +- deps/v8/tools/dev/v8gen.py | 59 +- deps/v8/tools/gcmole/BUILD.gn | 1 - deps/v8/tools/gcmole/gcmole-test.cc | 6 +- deps/v8/tools/gcmole/gcmole.cc | 8 +- deps/v8/tools/gcmole/test-expectations.txt | 100 +- deps/v8/tools/gdbinit | 42 +- deps/v8/tools/gen-keywords-gen-h.py | 12 +- deps/v8/tools/gen-postmortem-metadata.py | 4 +- .../tools/generate-header-include-checks.py | 2 +- deps/v8/tools/lldb_commands.py | 7 +- deps/v8/tools/mb/docs/user_guide.md | 16 +- deps/v8/tools/mb/mb.py | 58 +- deps/v8/tools/mb/mb_test.py | 90 +- .../sanitizer/escalate_sanitizer_warnings.py | 123 + deps/v8/tools/profiling/linux-perf-d8.py | 378 +- deps/v8/tools/profview/index.html | 8 +- deps/v8/tools/profview/profile-utils.js | 67 +- deps/v8/tools/profview/profview.css | 6 + deps/v8/tools/profview/profview.js | 195 +- deps/v8/tools/release/roll_merge_gerrit.py | 25 +- .../tools/release/roll_merge_gerrit_test.py | 58 +- .../testdata/roll_merge_gerrit_happy_path.txt | 7 +- deps/v8/tools/testrunner/local/statusfile.py | 2 +- deps/v8/tools/testrunner/local/utils.py | 8 + deps/v8/tools/testrunner/local/variants.py | 25 +- deps/v8/tools/testrunner/objects/testcase.py | 37 +- deps/v8/tools/testrunner/outproc/message.py | 5 +- deps/v8/tools/testrunner/standard_runner.py | 3 +- deps/v8/tools/testrunner/testproc/fuzzer.py | 3 +- deps/v8/tools/tickprocessor.mjs | 38 +- .../tools/turbolizer/css/turbo-visualizer.css | 1 + deps/v8/tools/turbolizer/css/turboshaft.css | 8 + .../img/toolbox/toggle-compact-view-icon.png | Bin 0 -> 7349 bytes deps/v8/tools/turbolizer/src/edge.ts | 8 +- deps/v8/tools/turbolizer/src/node.ts | 8 +- deps/v8/tools/turbolizer/src/origin.ts | 6 +- .../turboshaft-graph-block.ts | 19 +- .../turboshaft-graph-edge.ts | 4 +- .../turboshaft-graph-node.ts | 84 - .../turboshaft-graph-operation.ts | 648 ++ .../turboshaft-graph-phase.ts | 37 +- deps/v8/tools/turbolizer/src/position.ts | 4 +- .../src/selection/selection-broker.ts | 4 +- .../src/selection/selection-handler.ts | 6 +- .../tools/turbolizer/src/source-resolver.ts | 6 +- .../tools/turbolizer/src/turboshaft-graph.ts | 12 +- .../turbolizer/src/views/history-view.ts | 6 +- .../turbolizer/src/views/movable-view.ts | 14 +- .../src/views/turboshaft-graph-view.ts | 80 +- deps/v8/tools/turbolizer/tsconfig.json | 2 +- deps/v8/tools/ubsan/ignorelist.txt | 4 + .../v8windbg/src/v8-debug-helper-interop.cc | 31 +- deps/v8/tools/vim/ninja-build.vim | 2 - .../wasm/mjsunit-module-disassembler-impl.h | 408 +- deps/v8/tools/wasm/module-inspector.cc | 24 +- deps/v8/tools/wasm/update-wasm-fuzzers.sh | 23 +- deps/v8/tools/wasm/update-wasm-spec-tests.sh | 2 +- deps/v8/tools/whitespace.txt | 1 + deps/v8/tools/zone-stats/index.html | 4 +- 3126 files changed, 179392 insertions(+), 91276 deletions(-) delete mode 100644 deps/v8/bazel/BUILD.trace_event_common delete mode 100644 deps/v8/gni/proto_library.gni delete mode 100755 deps/v8/gni/protoc.py create mode 100644 deps/v8/include/v8-sandbox.h create mode 100644 deps/v8/infra/builder_properties.pyl create mode 100644 deps/v8/src/base/debug/stack_trace_zos.cc delete mode 100644 deps/v8/src/base/platform/platform-ios.cc create mode 100644 deps/v8/src/base/platform/platform-zos.cc create mode 100644 deps/v8/src/base/template-meta-programming/algorithm.h create mode 100644 deps/v8/src/base/template-meta-programming/functional.h create mode 100644 deps/v8/src/base/template-meta-programming/list.h create mode 100644 deps/v8/src/base/template-meta-programming/string-literal.h create mode 100644 deps/v8/src/builtins/DEPS create mode 100644 deps/v8/src/builtins/builtins-async-disposable-stack.cc create mode 100644 deps/v8/src/builtins/builtins-disposable-stack.cc create mode 100644 deps/v8/src/builtins/builtins-string-tsa.cc create mode 100644 deps/v8/src/builtins/promise-try.tq create mode 100644 deps/v8/src/codegen/heap-object-list.h create mode 100644 deps/v8/src/codegen/turboshaft-builtins-assembler-inl.h create mode 100644 deps/v8/src/common/simd128.h delete mode 100644 deps/v8/src/compiler/control-flow-optimizer.cc delete mode 100644 deps/v8/src/compiler/control-flow-optimizer.h delete mode 100644 deps/v8/src/compiler/effect-control-linearizer.cc delete mode 100644 deps/v8/src/compiler/effect-control-linearizer.h delete mode 100644 deps/v8/src/compiler/store-store-elimination.cc delete mode 100644 deps/v8/src/compiler/store-store-elimination.h create mode 100644 deps/v8/src/compiler/turboshaft/access-builder.h create mode 100644 deps/v8/src/compiler/turboshaft/block-instrumentation-phase.cc create mode 100644 deps/v8/src/compiler/turboshaft/block-instrumentation-phase.h create mode 100644 deps/v8/src/compiler/turboshaft/block-instrumentation-reducer.cc create mode 100644 deps/v8/src/compiler/turboshaft/block-instrumentation-reducer.h create mode 100644 deps/v8/src/compiler/turboshaft/instruction-selection-normalization-reducer.h create mode 100644 deps/v8/src/compiler/turboshaft/pipelines.cc create mode 100644 deps/v8/src/compiler/turboshaft/pipelines.h create mode 100644 deps/v8/src/compiler/turboshaft/register-allocation-phase.h rename deps/v8/src/compiler/turboshaft/{store-store-elimination-reducer.h => store-store-elimination-reducer-inl.h} (93%) create mode 100644 deps/v8/src/compiler/turboshaft/zone-with-name.h create mode 100644 deps/v8/src/heap/WRITE_BARRIER.md create mode 100644 deps/v8/src/heap/base/asm/zos/push_registers_asm.cc create mode 100644 deps/v8/src/heap/base/cached-unordered-map.h delete mode 100644 deps/v8/src/heap/cppgc-js/wrappable-info-inl.h delete mode 100644 deps/v8/src/heap/cppgc-js/wrappable-info.h delete mode 100644 deps/v8/src/heap/gc-idle-time-handler.cc delete mode 100644 deps/v8/src/heap/gc-idle-time-handler.h create mode 100644 deps/v8/src/heap/large-page-metadata-inl.h rename deps/v8/src/heap/{large-page.cc => large-page-metadata.cc} (71%) rename deps/v8/src/heap/{large-page.h => large-page-metadata.h} (80%) create mode 100644 deps/v8/src/heap/memory-chunk-inl.h create mode 100644 deps/v8/src/heap/memory-chunk-metadata-inl.h rename deps/v8/src/heap/{mutable-page-inl.h => mutable-page-metadata-inl.h} (71%) rename deps/v8/src/heap/{mutable-page.cc => mutable-page-metadata.cc} (80%) rename deps/v8/src/heap/{mutable-page.h => mutable-page-metadata.h} (87%) create mode 100644 deps/v8/src/heap/object-lock-inl.h rename deps/v8/src/heap/{page-inl.h => page-metadata-inl.h} (55%) rename deps/v8/src/heap/{page.cc => page-metadata.cc} (88%) rename deps/v8/src/heap/{page.h => page-metadata.h} (82%) delete mode 100644 deps/v8/src/init/isolate-allocator.cc delete mode 100644 deps/v8/src/init/isolate-allocator.h create mode 100644 deps/v8/src/init/isolate-group.cc create mode 100644 deps/v8/src/init/isolate-group.h rename deps/v8/src/interpreter/{bytecode-flags.cc => bytecode-flags-and-tokens.cc} (98%) rename deps/v8/src/interpreter/{bytecode-flags.h => bytecode-flags-and-tokens.h} (79%) create mode 100644 deps/v8/src/maglev/maglev-post-hoc-optimizations-processors.h create mode 100644 deps/v8/src/maglev/maglev-pre-regalloc-codegen-processors.h create mode 100644 deps/v8/src/maglev/s390/maglev-assembler-s390-inl.h create mode 100644 deps/v8/src/maglev/s390/maglev-assembler-s390.cc create mode 100644 deps/v8/src/maglev/s390/maglev-ir-s390.cc create mode 100644 deps/v8/src/objects/casting.h create mode 100644 deps/v8/src/objects/js-disposable-stack-inl.h create mode 100644 deps/v8/src/objects/js-disposable-stack.cc create mode 100644 deps/v8/src/objects/js-disposable-stack.h create mode 100644 deps/v8/src/objects/js-disposable-stack.tq create mode 100644 deps/v8/src/objects/union.h create mode 100644 deps/v8/src/objects/waiter-queue-node.cc create mode 100644 deps/v8/src/objects/waiter-queue-node.h delete mode 100644 deps/v8/src/protobuf/DEPS delete mode 100644 deps/v8/src/protobuf/OWNERS delete mode 100644 deps/v8/src/protobuf/protobuf-compiler-main.cc create mode 100644 deps/v8/src/sandbox/check.h create mode 100644 deps/v8/src/sandbox/compactible-external-entity-table-inl.h create mode 100644 deps/v8/src/sandbox/compactible-external-entity-table.h create mode 100644 deps/v8/src/sandbox/cppheap-pointer-inl.h create mode 100644 deps/v8/src/sandbox/cppheap-pointer-table-inl.h create mode 100644 deps/v8/src/sandbox/cppheap-pointer-table.cc create mode 100644 deps/v8/src/sandbox/cppheap-pointer-table.h create mode 100644 deps/v8/src/sandbox/external-buffer-inl.h create mode 100644 deps/v8/src/sandbox/external-buffer-table-inl.h create mode 100644 deps/v8/src/sandbox/external-buffer-table.cc create mode 100644 deps/v8/src/sandbox/external-buffer-table.h create mode 100644 deps/v8/src/sandbox/external-buffer-tag.h create mode 100644 deps/v8/src/sandbox/external-buffer.h create mode 100644 deps/v8/src/sandbox/hardware-support.cc create mode 100644 deps/v8/src/sandbox/hardware-support.h create mode 100644 deps/v8/src/sandbox/js-dispatch-table-inl.h create mode 100644 deps/v8/src/sandbox/js-dispatch-table.cc create mode 100644 deps/v8/src/sandbox/js-dispatch-table.h create mode 100644 deps/v8/src/sandbox/tagged-payload.h create mode 100644 deps/v8/src/snapshot/embedded/platform-embedded-file-writer-zos.cc create mode 100644 deps/v8/src/snapshot/embedded/platform-embedded-file-writer-zos.h create mode 100644 deps/v8/src/strings/string-builder.h rename deps/v8/{base/trace_event/common/trace_event_common.h => src/tracing/trace-event-no-perfetto.h} (82%) create mode 100644 deps/v8/src/wasm/baseline/liftoff-varstate.h create mode 100644 deps/v8/src/wasm/float16.h create mode 100644 deps/v8/src/wasm/signature-hashing.h create mode 100644 deps/v8/src/wasm/wasm-deopt-data.cc create mode 100644 deps/v8/src/wasm/wasm-deopt-data.h create mode 100644 deps/v8/test/benchmarks/cpp/benchmark-main.cc create mode 100644 deps/v8/test/benchmarks/cpp/benchmark-utils.cc create mode 100644 deps/v8/test/benchmarks/cpp/benchmark-utils.h create mode 100644 deps/v8/test/benchmarks/cpp/bindings.cc create mode 100644 deps/v8/test/cctest/compiler/turboshaft-test-compare-combine.cc create mode 100644 deps/v8/test/cctest/wasm/test-run-wasm-f16.cc create mode 100644 deps/v8/test/debugger/debug/compiler/loop-interrupt-check.js delete mode 100644 deps/v8/test/debugger/debug/regress/regress-crbug-401915.js create mode 100644 deps/v8/test/debugger/debug/wasm/breakpoint-memoryestimation-concurrency.js create mode 100644 deps/v8/test/debugger/debug/wasm/exception-muting.js create mode 100644 deps/v8/test/fuzzer/wasm-compile-all.cc create mode 100644 deps/v8/test/fuzzer/wasm-compile-wasmgc.cc create mode 100644 deps/v8/test/fuzzer/wasm-deopt.cc delete mode 100644 deps/v8/test/fuzzer/wasm_corpus.tar.gz.sha1 create mode 100644 deps/v8/test/inspector/console/console-time-and-clear-expected.txt create mode 100644 deps/v8/test/inspector/console/console-time-and-clear.js delete mode 100644 deps/v8/test/inspector/cpu-profiler/console-profile-end-parameterless-crash-expected.txt delete mode 100644 deps/v8/test/inspector/cpu-profiler/console-profile-end-parameterless-crash.js create mode 100644 deps/v8/test/inspector/debugger/class-private-accessors-static-expected.txt create mode 100644 deps/v8/test/inspector/debugger/class-private-accessors-static.js create mode 100644 deps/v8/test/inspector/debugger/set-breakpoint-muting-expected.txt create mode 100644 deps/v8/test/inspector/debugger/set-breakpoint-muting.js create mode 100644 deps/v8/test/inspector/debugger/wasm-jspi-async-stack-expected.txt create mode 100644 deps/v8/test/inspector/debugger/wasm-jspi-async-stack.js create mode 100644 deps/v8/test/inspector/regress/regress-crbug-349248170-expected.txt create mode 100644 deps/v8/test/inspector/regress/regress-crbug-349248170.js create mode 100644 deps/v8/test/inspector/runtime/console-count-default-expected.txt create mode 100644 deps/v8/test/inspector/runtime/console-count-default.js create mode 100644 deps/v8/test/inspector/runtime/console-time-default-expected.txt create mode 100644 deps/v8/test/inspector/runtime/console-time-default.js create mode 100644 deps/v8/test/inspector/runtime/console-time-end-stack-expected.txt create mode 100644 deps/v8/test/inspector/runtime/console-time-end-stack.js create mode 100644 deps/v8/test/inspector/runtime/custom-error-stack-expected.txt create mode 100644 deps/v8/test/inspector/runtime/custom-error-stack.js delete mode 100644 deps/v8/test/inspector/runtime/error-preview-expected.txt delete mode 100644 deps/v8/test/inspector/runtime/error-preview.js create mode 100644 deps/v8/test/intl/regress-40855035.js create mode 100644 deps/v8/test/message/wasm-speculative-inlining.js create mode 100644 deps/v8/test/message/wasm-speculative-inlining.out create mode 100644 deps/v8/test/message/wasm-trace-deopt-32.js create mode 100644 deps/v8/test/message/wasm-trace-deopt-32.out create mode 100644 deps/v8/test/message/wasm-trace-deopt-64.js create mode 100644 deps/v8/test/message/wasm-trace-deopt-64.out create mode 100644 deps/v8/test/mjsunit/compiler/deopt-literal-receiver.js create mode 100644 deps/v8/test/mjsunit/compiler/deopt-literal-string.js create mode 100644 deps/v8/test/mjsunit/compiler/fast-api-calls-throw.js delete mode 100644 deps/v8/test/mjsunit/compiler/fast-api-exceptions.js create mode 100644 deps/v8/test/mjsunit/compiler/float16-array-next.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-330638807.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-331909453.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-335310000.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-339492379.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-340663085.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-347724915.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-347905990.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-356183775.js create mode 100644 deps/v8/test/mjsunit/d8/d8-finalization-registry-quit.js create mode 100644 deps/v8/test/mjsunit/d8/d8-worker-onmessage-ping-pong.js create mode 100644 deps/v8/test/mjsunit/d8/modules-data-url.mjs create mode 100644 deps/v8/test/mjsunit/get-iterator.js create mode 100644 deps/v8/test/mjsunit/harmony/async-module-ordinal-reset/entry.mjs create mode 100644 deps/v8/test/mjsunit/harmony/async-module-ordinal-reset/skip-a.mjs create mode 100644 deps/v8/test/mjsunit/harmony/async-module-ordinal-reset/skip-async-module.mjs create mode 100644 deps/v8/test/mjsunit/harmony/async-module-ordinal-reset/skip-b.mjs create mode 100644 deps/v8/test/mjsunit/harmony/async-module-ordinal-reset/skip-c.mjs create mode 100644 deps/v8/test/mjsunit/harmony/async-module-ordinal-reset/skip-common.mjs create mode 100644 deps/v8/test/mjsunit/harmony/async-module-ordinal-reset/skip-d.mjs create mode 100644 deps/v8/test/mjsunit/harmony/async-module-ordinal-reset/skip-e.mjs create mode 100644 deps/v8/test/mjsunit/harmony/async-module-ordinal-reset/skip-f.mjs create mode 100644 deps/v8/test/mjsunit/harmony/async-module-ordinal-reset/skip-imports-async-module.mjs create mode 100644 deps/v8/test/mjsunit/harmony/async-module-ordinal-reset/skip-run.mjs create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-imports-attributes-json-1.mjs create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-top-level-cycle-mixed-sync.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-top-level-cycle-mixed-tla.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-top-level-await-cycle-mixed.mjs create mode 100644 deps/v8/test/mjsunit/ic-callable-obj.js create mode 100644 deps/v8/test/mjsunit/maglev/351177445.js create mode 100644 deps/v8/test/mjsunit/maglev/arguments-forwarding.js create mode 100644 deps/v8/test/mjsunit/maglev/escape-analysis-context.js create mode 100644 deps/v8/test/mjsunit/maglev/extend-properties-backing-store-1.js create mode 100644 deps/v8/test/mjsunit/maglev/extend-properties-backing-store-2.js create mode 100644 deps/v8/test/mjsunit/maglev/get-prototype.js create mode 100644 deps/v8/test/mjsunit/maglev/maglev-343069827.js create mode 100644 deps/v8/test/mjsunit/maglev/no-deopt-deprecated-map.js create mode 100644 deps/v8/test/mjsunit/maglev/polymorphic-store.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-329474361.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-329476993.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-330095905-2.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-330095905-3.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-330095905.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-330427711.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-330578127.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-331420133.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-331711028.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-334974242.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-335245513.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-335704890.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-336179080.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-336833467.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-338457105.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-338457109.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-339506922.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-339684352.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-340167165.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-341167196.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-341972221.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-342460071.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-343069819.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-343069823.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-343263982.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-346686148.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-347867186.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-348328061.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-348567825.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-349432498.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-349435463.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-349864879.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-349877604.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-351251992.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-352352903.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-352407774.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-352414612.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-353628448.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-353877568.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-355256380.js create mode 100644 deps/v8/test/mjsunit/maglev/regress-41494766.js create mode 100644 deps/v8/test/mjsunit/maglev/yes-deopt-deprecated-map.js create mode 100644 deps/v8/test/mjsunit/object-assign-regressions.js create mode 100644 deps/v8/test/mjsunit/object-in-array.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-10.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-11.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-12.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-13.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-14.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-15.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-16.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-17.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-18.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-19.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-20.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-21.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-22.js create mode 100644 deps/v8/test/mjsunit/protector-cell/string-wrapper-to-primitive-9.js create mode 100644 deps/v8/test/mjsunit/regress-332392668.js create mode 100644 deps/v8/test/mjsunit/regress-332570754.js create mode 100644 deps/v8/test/mjsunit/regress-332947120.js create mode 100644 deps/v8/test/mjsunit/regress-343338105.js create mode 100644 deps/v8/test/mjsunit/regress-343384810.js create mode 100644 deps/v8/test/mjsunit/regress-344638604.js create mode 100644 deps/v8/test/mjsunit/regress-346411877.js create mode 100644 deps/v8/test/mjsunit/regress-352402518.js create mode 100644 deps/v8/test/mjsunit/regress-352414652.js create mode 100644 deps/v8/test/mjsunit/regress-352739458.js create mode 100644 deps/v8/test/mjsunit/regress-353561476.js create mode 100644 deps/v8/test/mjsunit/regress-4530868594868224.js create mode 100644 deps/v8/test/mjsunit/regress-class-initializer-eval.js create mode 100644 deps/v8/test/mjsunit/regress/proto-transition-regress.js create mode 100644 deps/v8/test/mjsunit/regress/regress-330638812.js create mode 100644 deps/v8/test/mjsunit/regress/regress-330765777.js create mode 100644 deps/v8/test/mjsunit/regress/regress-331074427.js create mode 100644 deps/v8/test/mjsunit/regress/regress-332745405.js create mode 100644 deps/v8/test/mjsunit/regress/regress-333926321.js create mode 100644 deps/v8/test/mjsunit/regress/regress-335548148.js create mode 100644 deps/v8/test/mjsunit/regress/regress-338457101.js create mode 100644 deps/v8/test/mjsunit/regress/regress-339681888.js create mode 100644 deps/v8/test/mjsunit/regress/regress-340824111.js create mode 100644 deps/v8/test/mjsunit/regress/regress-340921322.js create mode 100644 deps/v8/test/mjsunit/regress/regress-341972220.js create mode 100644 deps/v8/test/mjsunit/regress/regress-342451738.js create mode 100644 deps/v8/test/mjsunit/regress/regress-344664770.js create mode 100644 deps/v8/test/mjsunit/regress/regress-345960102.js create mode 100644 deps/v8/test/mjsunit/regress/regress-346086168.js create mode 100644 deps/v8/test/mjsunit/regress/regress-346414894.js create mode 100644 deps/v8/test/mjsunit/regress/regress-346617164.js create mode 100644 deps/v8/test/mjsunit/regress/regress-346876227.js create mode 100644 deps/v8/test/mjsunit/regress/regress-347071496.js create mode 100644 deps/v8/test/mjsunit/regress/regress-347118120.js create mode 100644 deps/v8/test/mjsunit/regress/regress-347863970.js create mode 100644 deps/v8/test/mjsunit/regress/regress-350779648.js create mode 100644 deps/v8/test/mjsunit/regress/regress-351926098.js create mode 100644 deps/v8/test/mjsunit/regress/regress-352402863.js create mode 100644 deps/v8/test/mjsunit/regress/regress-352407772.js create mode 100644 deps/v8/test/mjsunit/regress/regress-353628445.js create mode 100644 deps/v8/test/mjsunit/regress/regress-354626177.js create mode 100644 deps/v8/test/mjsunit/regress/regress-41488094.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-329693878.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-331085620.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-332947126.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-333065494.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-333281864.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-335544080.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-335580637.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-335592004.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-335592010.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-335704358.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-335774293.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-336852492.js create mode 100644 deps/v8/test/mjsunit/regress/regress-v8-14662.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-14689.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-14695.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-14700.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-330580823.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-330767273.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-331358160.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-331383939.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-331704408.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-332572762.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-332939161.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-333457544.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-333754542.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-334687959.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-336007398.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-336214779.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-336358915-a.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-336358915.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-336852356.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-337870524.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-339704607.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-339984212.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-341875188.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-341947685.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-343035068.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-343633071.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-343748812.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-343772336.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-343917751.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-344014332.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-344484969.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-346505953.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-347905990-2.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-347914823.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-347914831.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-347961785.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-348473836-global.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-348473836-memory.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-348473836-table.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-348473836-tag.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-348473836-webassembly.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-350779988.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-352720899-2.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-352720899.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-353582136.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-40258436.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-5391956.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-v8-14710.js create mode 100644 deps/v8/test/mjsunit/sandbox/memory-corruption-api.js create mode 100644 deps/v8/test/mjsunit/sandbox/regress/regress-334120897.js create mode 100644 deps/v8/test/mjsunit/sandbox/regress/regress-349502157.js create mode 100644 deps/v8/test/mjsunit/sandbox/regress/regress-crbug-335810507.js create mode 100644 deps/v8/test/mjsunit/sandbox/regress/regress-crbug-40926051.js create mode 100644 deps/v8/test/mjsunit/sandbox/wasm-imports-concurrent-mutation.js create mode 100644 deps/v8/test/mjsunit/sandbox/wasm-inlining-sigcheck.js create mode 100644 deps/v8/test/mjsunit/sandbox/wasm-manipulated-instance.js create mode 100644 deps/v8/test/mjsunit/sandbox/wasm-signature-verification.js create mode 100644 deps/v8/test/mjsunit/sandbox/wasm-table-import.js create mode 100644 deps/v8/test/mjsunit/sandbox/wasm-table-sigcheck.js create mode 100644 deps/v8/test/mjsunit/sandbox/wasm-table-wasmjsfunction.js create mode 100644 deps/v8/test/mjsunit/shared-memory/async-synchronization-workers-terminated.js create mode 100644 deps/v8/test/mjsunit/shared-memory/condition-async-wait-realm-disposed.js create mode 100644 deps/v8/test/mjsunit/shared-memory/condition-async-wait-timeout.js create mode 100644 deps/v8/test/mjsunit/shared-memory/condition-async-wait.js create mode 100644 deps/v8/test/mjsunit/shared-memory/mutex-async-lock-promise-reject.js create mode 100644 deps/v8/test/mjsunit/shared-memory/mutex-async-lock-promise-resolve.js create mode 100644 deps/v8/test/mjsunit/shared-memory/mutex-async-lock-realm-disposed.js create mode 100644 deps/v8/test/mjsunit/shared-memory/mutex-async-lock-workers-timeout.js create mode 100644 deps/v8/test/mjsunit/shared-memory/mutex-async-lock-workers.js create mode 100644 deps/v8/test/mjsunit/shared-memory/mutex-async-lock.js create mode 100644 deps/v8/test/mjsunit/shared-memory/mutex-async-locked-worker-terminated.js create mode 100644 deps/v8/test/mjsunit/shared-memory/mutex-async-unlocked-worker-terminated.js create mode 100644 deps/v8/test/mjsunit/shared-memory/regress-crbug-333007256.js create mode 100644 deps/v8/test/mjsunit/shared-memory/regress-crbug-339043696.js create mode 100644 deps/v8/test/mjsunit/shared-memory/regress-crbug-349639796.js create mode 100644 deps/v8/test/mjsunit/shared-memory/regress-crbug-350641990.js create mode 100644 deps/v8/test/mjsunit/string-constructor-inlining-lazy-deopt.js create mode 100644 deps/v8/test/mjsunit/test-scopeinfo-reuse-eval.js create mode 100644 deps/v8/test/mjsunit/try-finally-in-for-of.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/Uint8Clamped-typed-array.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/add-double-property.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/api-call-no-prof.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/api-call-prof.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/array-buffer-detached.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/array-destruct.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/array-double-load.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/array-foreach.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/array-holey-double-load.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/array-load-hole.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/array-oob-load.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/array-push-grow.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/array-push-pop.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/array-smi-load.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/array-transitions.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/bitwise-smi.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/branch-on-math.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/builtin-continuation-deopt.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/call-spread-and-args.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/call-spread.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/catch-and-return.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/catch-multiple.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/catch.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/char-at.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/char-code-at-uint32max-deopt.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/check-value-equals-f64.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/const-tracking-let.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/construct-with-spread.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/constructor-extend-null-throw.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/constructor-super-called-twice.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/constructor-super-not-called.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/constructors.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/convert-receiver.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/create-array-lit.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/create-closure.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/create-object-lit.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/create-regexp-lit.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/create-shallow-array-literal.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/create-shallow-literal.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/dataview.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/delete-property-sloppy.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/delete-property-strict.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/dematerialized-arguments-length.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/dematerialized-arguments.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/dematerialized-double-array.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/dematerialized-duplicated-recursive.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/dematerialized-duplicated.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/dematerialized-heap-number.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/dematerialized-multi-escape.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/dematerialized-nested-objects.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/dematerialized-rest-length.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/dematerialized-rest.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/dematerialized-simple-object.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/deopt-raw-float-int32.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/eval.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/exception-phis-retagging.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/fact.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/float-arith.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/float64-compare.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/float64-phi-osr.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/float64-to-bool-branch.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/float64-to-bool.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/for-in-arr.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/for-in-obj.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/for-in-this.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/function-apply-arguments.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/function-apply.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/function-call-generic.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/generic-binop-exception.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/generic-binops-unops.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/has-in-prototype-chain-wasm.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/has-in-prototype-chain.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/holey-array-load.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/holey-float64-deopt.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/holey-float64-phi-deopt.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/ieee754-unary.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/inlined-function-loop.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/inner-function.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/instanceof.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/int32-compare.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/javascript-builtin-continuation.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/js-call-lazy-deopt.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/js-call-on-receiver.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/js-fun-call.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/lazy-deopt-multi-return.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/load-arr-with-float64-index.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/load-const-string-key.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/load-field.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/load-global-inside-typeof.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/load-global.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/load-holey-double-arr-for-branch.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/load-holey-double-arr-for-return.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/load-named-from-super.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/load-named-generic.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/load-named-on-num.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/loop-multiple-forward-edges-no-phi.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/loop-multiple-forward-edges.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/loop.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/make-array-init-size.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/make-array-no-init-size.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/make-fast-arr.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/make_objects.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/map-migration.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/math-round.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/megamorphic-load.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/mutable-heap-number-field.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/nested-loop-osr-throw.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/new-array.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/new-derived.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/new-obj-deopt.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/new-obj.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/new_obj_arr_proto.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/new_obj_int_property.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/no-backedge-loop.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/not-initialized-let-in-switch.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/number-float-truncate.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/number-to-string.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/osr.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/over-under-application-inline.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/over-under-application-not-inline.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/poly-store-transition.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/raw-abs.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/regress-351177452.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/regress-351219206.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/regress-351283984.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/regress-351418008.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/regress-351418019.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/regress-351576252.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/rest-param-length.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/set-get-keyed-generic.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/set-named-generic.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/shift_left.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/smi-arith.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/stack-overflow.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/store-field.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/store-float-to-smi-field.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/store-global.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/store-jsarray.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/store-uint32-to-smi-field.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/string-cmp.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/string-concat-throw.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/string-concat.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/string-from-charcode.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/string-lt.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/string-to-boolean.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/switch.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/symbol-eq.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/tagged-equal.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/test-undetectable.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/throw.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/to-boolean.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/to-name.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/to-number-int32-phi.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/to-number.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/to-string.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/typed-arrays.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/typeof-self.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/uint32-conv.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/uint8-clamped-arr-deopt.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/unary_minus_smi_minus_0.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/unconditional-deopt.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/under-applied-builtin-call.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/unreachable-catch.js create mode 100644 deps/v8/test/mjsunit/turboshaft/maglev-frontend/write-const-glob.js delete mode 100644 deps/v8/test/mjsunit/turboshaft/turboshaft-maglev-frontend.js create mode 100644 deps/v8/test/mjsunit/wasm/array-copy-errors.js create mode 100644 deps/v8/test/mjsunit/wasm/code-flushing-single-isolate.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-call-indirect.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-dynamic-tierup.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-feedback-states.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-inlined-param-stack-slots.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-inlined-stacktrace.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-inlined.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-int64-values.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-large-i31ref-constant.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-many-params-many-locals-s128.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-many-params-tagged.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-many-params.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-memory-access.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-metrics.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-minimal.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-multi-instance-different-callee.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-multi-instance-inlined.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-multi-instance.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-multiple.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-nan.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-non-inlineable-target.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-non-inlined-target.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-signal-handler.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-tail-call-parent-frame.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-untagged-parameters-s128.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-untagged-parameters.js create mode 100644 deps/v8/test/mjsunit/wasm/deopt/deopt-value-types.js create mode 100644 deps/v8/test/mjsunit/wasm/exnref-api.js create mode 100644 deps/v8/test/mjsunit/wasm/fast-api-calls-with-wellknown-imports-conflict.js create mode 100644 deps/v8/test/mjsunit/wasm/fast-api-calls-with-wellknown-imports-floats.js create mode 100644 deps/v8/test/mjsunit/wasm/fast-api-calls-with-wellknown-imports-i64.js create mode 100644 deps/v8/test/mjsunit/wasm/fast-api-calls-with-wellknown-imports-tagged.js delete mode 100644 deps/v8/test/mjsunit/wasm/fast-api-calls-with-wellknown-imports.js create mode 100644 deps/v8/test/mjsunit/wasm/gc-casts-exnref.js create mode 100644 deps/v8/test/mjsunit/wasm/gc-optimization-array-get.js create mode 100644 deps/v8/test/mjsunit/wasm/imported-strings-constants.js create mode 100644 deps/v8/test/mjsunit/wasm/multi-memory64-memorysize.js create mode 100644 deps/v8/test/mjsunit/wasm/multi-memory64-wrong-offset.js create mode 100644 deps/v8/test/mjsunit/wasm/nan-constant.js create mode 100644 deps/v8/test/mjsunit/wasm/stack-switching-conditional.js create mode 100644 deps/v8/test/mjsunit/wasm/stack-switching-new-api.js create mode 100644 deps/v8/test/mjsunit/wasm/stringref-array-nonetype.js create mode 100644 deps/v8/test/mjsunit/wasm/stringref-memory64.js create mode 100644 deps/v8/test/mjsunit/wasm/table64-callindirect.js create mode 100644 deps/v8/test/mjsunit/wasm/table64-copy.js create mode 100644 deps/v8/test/mjsunit/wasm/table64-fill.js create mode 100644 deps/v8/test/mjsunit/wasm/table64-get.js create mode 100644 deps/v8/test/mjsunit/wasm/table64-grow.js create mode 100644 deps/v8/test/mjsunit/wasm/table64-import.js create mode 100644 deps/v8/test/mjsunit/wasm/table64-init.js create mode 100644 deps/v8/test/mjsunit/wasm/table64-limits.js create mode 100644 deps/v8/test/mjsunit/wasm/table64-set.js create mode 100644 deps/v8/test/mjsunit/wasm/table64-size.js create mode 100644 deps/v8/test/mjsunit/wasm/turboshaft/br-table-analysis.js create mode 100644 deps/v8/test/mjsunit/wasm/type-reflection-wrap-wasm-function.js create mode 100644 deps/v8/test/mjsunit/wasm/wasm-null-intrinsic.js create mode 100644 deps/v8/test/test262/local-tests/test/staging/explicit-resource-management/await-using-in-async-function-call-with-await.js create mode 100644 deps/v8/test/test262/local-tests/test/staging/explicit-resource-management/await-using-in-async-function-call-without-await.js create mode 100644 deps/v8/test/test262/local-tests/test/staging/explicit-resource-management/await-using-in-block.js create mode 100644 deps/v8/test/test262/local-tests/test/staging/explicit-resource-management/await-using-in-for-in-statement.js create mode 100644 deps/v8/test/test262/local-tests/test/staging/explicit-resource-management/await-using-in-for-of-statement.js create mode 100644 deps/v8/test/test262/local-tests/test/staging/explicit-resource-management/await-using-in-for-statement.js create mode 100644 deps/v8/test/test262/local-tests/test/staging/explicit-resource-management/await-using-in-switch-case-block.js create mode 100644 deps/v8/test/test262/local-tests/test/staging/explicit-resource-management/await-using-with-no-async-dispose-method.js create mode 100644 deps/v8/test/test262/local-tests/test/staging/explicit-resource-management/await-using-with-sync-dispose-method.js create mode 100644 deps/v8/test/test262/local-tests/test/staging/explicit-resource-management/mixed-call-dispose-methods.js delete mode 100644 deps/v8/test/unittests/compiler/control-flow-optimizer-unittest.cc delete mode 100644 deps/v8/test/unittests/compiler/effect-control-linearizer-unittest.cc create mode 100644 deps/v8/test/unittests/compiler/riscv32/turboshaft-instruction-selector-riscv32-unittest.cc create mode 100644 deps/v8/test/unittests/compiler/riscv64/turboshaft-instruction-selector-riscv64-unittest.cc create mode 100644 deps/v8/test/unittests/compiler/turboshaft/loop-unrolling-analyzer-unittest.cc delete mode 100644 deps/v8/test/unittests/heap/gc-idle-time-handler-unittest.cc create mode 100644 deps/v8/test/unittests/regexp/fuzzer_regexp_grammar.g4 create mode 100644 deps/v8/test/unittests/regexp/regexp-fuzzer.cc create mode 100644 deps/v8/test/unittests/regexp/regexp-grammar.h create mode 100644 deps/v8/test/unittests/wasm/module-decoder-table64-unittest.cc create mode 100644 deps/v8/test/unittests/wasm/signature-hashing-unittest.cc create mode 100644 deps/v8/third_party/abseil-cpp/absl/base/c_header_test.c create mode 100644 deps/v8/third_party/abseil-cpp/absl/base/internal/poison.cc create mode 100644 deps/v8/third_party/abseil-cpp/absl/base/internal/poison.h create mode 100644 deps/v8/third_party/abseil-cpp/absl/base/internal/poison_test.cc create mode 100644 deps/v8/third_party/abseil-cpp/absl/container/hash_container_defaults.h create mode 100644 deps/v8/third_party/abseil-cpp/absl/debugging/internal/bounded_utf8_length_sequence.h create mode 100644 deps/v8/third_party/abseil-cpp/absl/debugging/internal/bounded_utf8_length_sequence_test.cc create mode 100644 deps/v8/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc create mode 100644 deps/v8/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.h create mode 100644 deps/v8/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode_test.cc create mode 100644 deps/v8/third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc create mode 100644 deps/v8/third_party/abseil-cpp/absl/debugging/internal/demangle_rust.h create mode 100644 deps/v8/third_party/abseil-cpp/absl/debugging/internal/demangle_rust_test.cc create mode 100644 deps/v8/third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.cc create mode 100644 deps/v8/third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.h create mode 100644 deps/v8/third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point_test.cc create mode 100644 deps/v8/third_party/abseil-cpp/absl/random/internal/mock_validators.h create mode 100644 deps/v8/third_party/abseil-cpp/absl/status/internal/status_matchers.cc create mode 100644 deps/v8/third_party/abseil-cpp/absl/status/internal/status_matchers.h create mode 100644 deps/v8/third_party/abseil-cpp/absl/status/status_matchers.h create mode 100644 deps/v8/third_party/abseil-cpp/absl/status/status_matchers_test.cc create mode 100644 deps/v8/third_party/highway/BUILD.gn create mode 100644 deps/v8/third_party/highway/DIR_METADATA create mode 100644 deps/v8/third_party/highway/LICENSE create mode 100644 deps/v8/third_party/highway/OWNERS create mode 100644 deps/v8/third_party/highway/README.chromium create mode 100644 deps/v8/third_party/jinja2/patches/0001-canonicalize-zipinfo-create-system create mode 100644 deps/v8/third_party/zlib/contrib/qat/deflate_qat.cpp create mode 100644 deps/v8/third_party/zlib/contrib/qat/deflate_qat.h create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/io_buffers.cpp create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/io_buffers.h create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/memory.cpp create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/memory.hpp create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/qat.cpp create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/qat.hpp create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/qat_buffer_list.cpp create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/qat_buffer_list.hpp create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/qat_instance.cpp create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/qat_instance.hpp create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/qat_task.cpp create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/qat_task.hpp create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/session.cpp create mode 100644 deps/v8/third_party/zlib/contrib/qat/qatzpp/session.hpp create mode 100644 deps/v8/third_party/zlib/examples/zpipe.c create mode 100644 deps/v8/third_party/zlib/test/minigzip.c create mode 100755 deps/v8/tools/dev/setup-reclient.py create mode 100644 deps/v8/tools/memory/sanitizer/escalate_sanitizer_warnings.py create mode 100644 deps/v8/tools/turbolizer/img/toolbox/toggle-compact-view-icon.png delete mode 100644 deps/v8/tools/turbolizer/src/phases/turboshaft-graph-phase/turboshaft-graph-node.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/turboshaft-graph-phase/turboshaft-graph-operation.ts diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index bfc93c7d444980..e805b2aabfeacc 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -40,6 +40,7 @@ .torquelint-cache .vscode /_* +/base /build /buildtools /check-header-includes @@ -77,6 +78,8 @@ !/third_party/googletest/src/googletest/include/gtest /third_party/googletest/src/googletest/include/gtest/* !/third_party/googletest/src/googletest/include/gtest/gtest_prod.h +!/third_party/highway +/third_party/highway/src !/third_party/inspector_protocol !/third_party/jsoncpp /third_party/jsoncpp/source @@ -96,6 +99,7 @@ /tools/luci-go /tools/oom_dump/oom_dump /tools/oom_dump/oom_dump.o +/tools/protoc_wrapper /tools/turbolizer/build /tools/turbolizer/.rpt2_cache /tools/turbolizer/deploy diff --git a/deps/v8/.gn b/deps/v8/.gn index 3a73ff4e2a1a08..afdb6fa1201d0e 100644 --- a/deps/v8/.gn +++ b/deps/v8/.gn @@ -25,6 +25,8 @@ no_check_targets = [ ] default_args = { + # Disable js dependencies like the closure compiler. + enable_js_protobuf = false # Disable rust dependencies. enable_rust = false } diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index 54fb45992db176..e53a6577c54950 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -57,6 +57,7 @@ Alexander Botero-Lowry Alexander Karpinsky Alexander Neville Alexandre Vassalotti +Alexey Pavlyutkin Alexis Campailla Allan Sandfeld Jensen Amos Lim @@ -100,6 +101,7 @@ Daniel Bevenius Daniel Dromboski Daniel James Daniel Shelton +Daniil Bakin Danylo Boiko Darshan Sen David Carlier @@ -258,6 +260,7 @@ Sander Mathijs van Veen Sandro Santilli Sanjoy Das Sam James +Sébastien Doeraene Seo Sanghyeon Shawn Anastasio Shawn Presser diff --git a/deps/v8/BUILD.bazel b/deps/v8/BUILD.bazel index 05b7472165ae85..0718b28b052946 100644 --- a/deps/v8/BUILD.bazel +++ b/deps/v8/BUILD.bazel @@ -28,6 +28,8 @@ load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression # v8_custom_deps # v8_embed_script # v8_embedder_string +# v8_array_buffer_internal_field_count +# v8_array_buffer_view_internal_field_count # v8_promise_internal_field_count # v8_enable_vtunetracemark # v8_enable_fast_torque @@ -274,18 +276,6 @@ v8_flag( default = True, ) -# Shared RO heap. Flag has to be set to false when -# v8_enable_pointer_compression_shared_cage is set to false. -v8_flag( - name = "v8_enable_shared_ro_heap", - default = True, -) - -v8_flag( - name = "v8_enable_extensible_ro_snapshot", - default = True, -) - # Enable shared cage if v8_enable_pointer_compression # and v8_enable_pointer_compression_shared_cage. selects.config_setting_group( @@ -429,6 +419,8 @@ v8_config( "V8_ADVANCED_BIGINT_ALGORITHMS", "V8_CONCURRENT_MARKING", "V8_ENABLE_SPARKPLUG", + "V8_ENABLE_EXTENSIBLE_RO_SNAPSHOT", + "V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA", ] + select({ "@v8//bazel/config:is_debug": [ "DEBUG", @@ -497,13 +489,13 @@ v8_config( ], "//conditions:default": [], }) + select({ - ":is_v8_enable_shared_ro_heap": [ + # Shared RO heap is unconfigurable in bazel. However, we + # still have to make sure that the flag is disabled when + # v8_enable_pointer_compression_shared_cage is set to false. + ":is_v8_enable_pointer_compression_shared_cage": [ "V8_SHARED_RO_HEAP", ], - }) + select({ - ":is_v8_enable_extensible_ro_snapshot": [ - "V8_ENABLE_EXTENSIBLE_RO_SNAPSHOT", - ], + "//conditions:default": [], }) + select({ ":is_v8_enable_short_builtin_calls": [ "V8_SHORT_BUILTIN_CALLS", @@ -653,6 +645,7 @@ filegroup( "include/v8-promise.h", "include/v8-proxy.h", "include/v8-regexp.h", + "include/v8-sandbox.h", "include/v8-script.h", "include/v8-snapshot.h", "include/v8-statistics.h", @@ -798,6 +791,10 @@ filegroup( "src/base/strings.h", "src/base/sys-info.cc", "src/base/sys-info.h", + "src/base/template-meta-programming/algorithm.h", + "src/base/template-meta-programming/functional.h", + "src/base/template-meta-programming/list.h", + "src/base/template-meta-programming/string-literal.h", "src/base/template-utils.h", "src/base/threaded-list.h", "src/base/timezone-cache.h", @@ -969,6 +966,7 @@ filegroup( "src/builtins/promise-reaction-job.tq", "src/builtins/promise-resolve.tq", "src/builtins/promise-then.tq", + "src/builtins/promise-try.tq", "src/builtins/promise-withresolvers.tq", "src/builtins/proxy.tq", "src/builtins/proxy-constructor.tq", @@ -1070,6 +1068,7 @@ filegroup( "src/objects/js-atomics-synchronization.tq", "src/objects/js-collection.tq", "src/objects/js-collection-iterator.tq", + "src/objects/js-disposable-stack.tq", "src/objects/js-function.tq", "src/objects/js-generator.tq", "src/objects/js-iterator-helpers.tq", @@ -1209,15 +1208,6 @@ filegroup( ], ) -# Default setting for v8_enable_pointer_compression when target is x64. -selects.config_setting_group( - name = "is_v8_enable_webassembly_on_non_android_posix_x64", - match_all = [ - ":is_v8_enable_webassembly", - "@v8//bazel/config:is_non_android_posix_x64", - ], -) - filegroup( name = "v8_base_without_compiler_files", srcs = [ @@ -1281,6 +1271,7 @@ filegroup( "src/builtins/builtins-api.cc", "src/builtins/builtins-array.cc", "src/builtins/builtins-arraybuffer.cc", + "src/builtins/builtins-async-disposable-stack.cc", "src/builtins/builtins-async-module.cc", "src/builtins/builtins-atomics-synchronization.cc", "src/builtins/builtins-bigint.cc", @@ -1292,6 +1283,7 @@ filegroup( "src/builtins/builtins-date.cc", "src/builtins/builtins-definitions.h", "src/builtins/builtins-descriptors.h", + "src/builtins/builtins-disposable-stack.cc", "src/builtins/builtins-error.cc", "src/builtins/builtins-function.cc", "src/builtins/builtins-global.cc", @@ -1355,6 +1347,7 @@ filegroup( "src/codegen/flush-instruction-cache.h", "src/codegen/handler-table.cc", "src/codegen/handler-table.h", + "src/codegen/heap-object-list.h", "src/codegen/interface-descriptors.cc", "src/codegen/interface-descriptors.h", "src/codegen/interface-descriptors-inl.h", @@ -1409,6 +1402,7 @@ filegroup( "src/common/ptr-compr.cc", "src/common/ptr-compr.h", "src/common/ptr-compr-inl.h", + "src/common/simd128.h", "src/compiler-dispatcher/lazy-compile-dispatcher.cc", "src/compiler-dispatcher/lazy-compile-dispatcher.h", "src/compiler-dispatcher/optimizing-compile-dispatcher.cc", @@ -1572,6 +1566,7 @@ filegroup( "src/heap/base/active-system-pages.h", "src/heap/memory-chunk-metadata.cc", "src/heap/memory-chunk-metadata.h", + "src/heap/memory-chunk-metadata-inl.h", "src/heap/code-range.cc", "src/heap/code-range.h", "src/heap/trusted-range.cc", @@ -1599,8 +1594,6 @@ filegroup( "src/heap/cppgc-js/unified-heap-marking-verifier.h", "src/heap/cppgc-js/unified-heap-marking-visitor.cc", "src/heap/cppgc-js/unified-heap-marking-visitor.h", - "src/heap/cppgc-js/wrappable-info.h", - "src/heap/cppgc-js/wrappable-info-inl.h", "src/heap/ephemeron-remembered-set.h", "src/heap/ephemeron-remembered-set.cc", "src/heap/evacuation-allocator.cc", @@ -1621,8 +1614,6 @@ filegroup( "src/heap/free-list.h", "src/heap/free-list-inl.h", "src/heap/gc-callbacks.h", - "src/heap/gc-idle-time-handler.cc", - "src/heap/gc-idle-time-handler.h", "src/heap/gc-tracer.cc", "src/heap/gc-tracer.h", "src/heap/gc-tracer-inl.h", @@ -1648,8 +1639,9 @@ filegroup( "src/heap/incremental-marking-job.h", "src/heap/index-generator.cc", "src/heap/index-generator.h", - "src/heap/large-page.cc", - "src/heap/large-page.h", + "src/heap/large-page-metadata.cc", + "src/heap/large-page-metadata.h", + "src/heap/large-page-metadata-inl.h", "src/heap/large-spaces.cc", "src/heap/large-spaces.h", "src/heap/linear-allocation-area.h", @@ -1688,11 +1680,12 @@ filegroup( "src/heap/memory-allocator.h", "src/heap/memory-balancer.cc", "src/heap/memory-balancer.h", - "src/heap/mutable-page.cc", - "src/heap/mutable-page.h", + "src/heap/mutable-page-metadata.cc", + "src/heap/mutable-page-metadata.h", + "src/heap/mutable-page-metadata-inl.h", "src/heap/memory-chunk.cc", "src/heap/memory-chunk.h", - "src/heap/mutable-page-inl.h", + "src/heap/memory-chunk-inl.h", "src/heap/memory-chunk-layout.cc", "src/heap/memory-chunk-layout.h", "src/heap/memory-measurement.cc", @@ -1706,14 +1699,15 @@ filegroup( "src/heap/new-spaces.h", "src/heap/new-spaces-inl.h", "src/heap/object-lock.h", + "src/heap/object-lock-inl.h", "src/heap/object-stats.cc", "src/heap/object-stats.h", "src/heap/objects-visiting.cc", "src/heap/objects-visiting.h", "src/heap/objects-visiting-inl.h", - "src/heap/page.cc", - "src/heap/page.h", - "src/heap/page-inl.h", + "src/heap/page-metadata.cc", + "src/heap/page-metadata.h", + "src/heap/page-metadata-inl.h", "src/heap/paged-spaces.cc", "src/heap/paged-spaces.h", "src/heap/paged-spaces-inl.h", @@ -1774,8 +1768,8 @@ filegroup( "src/init/heap-symbols.h", "src/init/icu_util.cc", "src/init/icu_util.h", - "src/init/isolate-allocator.cc", - "src/init/isolate-allocator.h", + "src/init/isolate-group.cc", + "src/init/isolate-group.h", "src/init/setup-isolate.h", "src/init/startup-data-util.cc", "src/init/startup-data-util.h", @@ -1792,8 +1786,8 @@ filegroup( "src/interpreter/bytecode-array-writer.h", "src/interpreter/bytecode-decoder.cc", "src/interpreter/bytecode-decoder.h", - "src/interpreter/bytecode-flags.cc", - "src/interpreter/bytecode-flags.h", + "src/interpreter/bytecode-flags-and-tokens.cc", + "src/interpreter/bytecode-flags-and-tokens.h", "src/interpreter/bytecode-generator.cc", "src/interpreter/bytecode-generator.h", "src/interpreter/bytecode-jump-table.h", @@ -1877,6 +1871,7 @@ filegroup( "src/objects/call-site-info.cc", "src/objects/call-site-info.h", "src/objects/call-site-info-inl.h", + "src/objects/casting.h", "src/objects/cell.h", "src/objects/cell-inl.h", "src/objects/code.cc", @@ -1960,6 +1955,9 @@ filegroup( "src/objects/js-collection-inl.h", "src/objects/js-collection-iterator.h", "src/objects/js-collection-iterator-inl.h", + "src/objects/js-disposable-stack.cc", + "src/objects/js-disposable-stack.h", + "src/objects/js-disposable-stack-inl.h", "src/objects/js-function.cc", "src/objects/js-function.h", "src/objects/js-function-inl.h", @@ -2120,6 +2118,7 @@ filegroup( "src/objects/tagged-index.h", "src/objects/tagged-value.h", "src/objects/tagged-value-inl.h", + "src/objects/union.h", "src/objects/template-objects.cc", "src/objects/template-objects.h", "src/objects/template-objects-inl.h", @@ -2142,6 +2141,8 @@ filegroup( "src/objects/visitors.cc", "src/objects/visitors.h", "src/objects/visitors-inl.h", + "src/objects/waiter-queue-node.cc", + "src/objects/waiter-queue-node.h", "src/parsing/expression-scope.h", "src/parsing/func-name-inferrer.cc", "src/parsing/func-name-inferrer.h", @@ -2287,31 +2288,50 @@ filegroup( "src/runtime/runtime-weak-refs.cc", "src/sandbox/bounded-size.h", "src/sandbox/bounded-size-inl.h", + "src/sandbox/check.h", "src/sandbox/external-pointer.h", "src/sandbox/external-pointer-inl.h", "src/sandbox/external-pointer-table.cc", "src/sandbox/external-pointer-table.h", "src/sandbox/external-pointer-table-inl.h", + "src/sandbox/cppheap-pointer-inl.h", + "src/sandbox/cppheap-pointer-table.cc", + "src/sandbox/cppheap-pointer-table.h", + "src/sandbox/cppheap-pointer-table-inl.h", "src/sandbox/code-pointer-table.cc", "src/sandbox/code-pointer-table.h", "src/sandbox/code-pointer-table-inl.h", + "src/sandbox/js-dispatch-table.cc", + "src/sandbox/js-dispatch-table.h", + "src/sandbox/js-dispatch-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/compactible-external-entity-table-inl.h", + "src/sandbox/compactible-external-entity-table.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-buffer.h", + "src/sandbox/external-buffer-tag.h", + "src/sandbox/external-buffer-inl.h", + "src/sandbox/external-buffer-table.cc", + "src/sandbox/external-buffer-table-inl.h", + "src/sandbox/external-buffer-table.h", "src/sandbox/external-entity-table.h", "src/sandbox/external-entity-table-inl.h", + "src/sandbox/hardware-support.cc", + "src/sandbox/hardware-support.h", "src/sandbox/sandbox.cc", "src/sandbox/sandbox.h", "src/sandbox/sandboxed-pointer.h", "src/sandbox/sandboxed-pointer-inl.h", + "src/sandbox/tagged-payload.h", "src/sandbox/testing.cc", "src/sandbox/testing.h", "src/snapshot/code-serializer.cc", @@ -2364,6 +2384,7 @@ filegroup( "src/strings/char-predicates.h", "src/strings/char-predicates-inl.h", "src/strings/string-builder.cc", + "src/strings/string-builder.h", "src/strings/string-builder-inl.h", "src/strings/string-case.cc", "src/strings/string-case.h", @@ -2393,6 +2414,7 @@ filegroup( "src/torque/runtime-macro-shims.h", "src/tracing/trace-event.cc", "src/tracing/trace-event.h", + "src/tracing/trace-event-no-perfetto.h", "src/tracing/traced-value.cc", "src/tracing/traced-value.h", "src/tracing/tracing-category-observer.cc", @@ -2663,12 +2685,7 @@ filegroup( "src/wasm/baseline/ppc/liftoff-assembler-ppc-inl.h", ], }) + select({ - # Only for x64 builds and for arm64 with x64 host simulator. - ":is_v8_enable_webassembly_on_non_android_posix_x64": [ - "src/trap-handler/handler-inside-posix.cc", - "src/trap-handler/handler-outside-posix.cc", - ], - "@v8//bazel/config:is_macos_arm64": [ + "@v8//bazel/config:is_posix": [ "src/trap-handler/handler-inside-posix.cc", "src/trap-handler/handler-outside-posix.cc", ], @@ -2714,6 +2731,8 @@ filegroup( "src/maglev/maglev-ir.h", "src/maglev/maglev-phi-representation-selector.h", "src/maglev/maglev-pipeline-statistics.h", + "src/maglev/maglev-post-hoc-optimizations-processors.h", + "src/maglev/maglev-pre-regalloc-codegen-processors.h", "src/maglev/maglev-regalloc-data.h", "src/maglev/maglev-regalloc.h", "src/maglev/maglev-register-frame-array.h", @@ -2786,6 +2805,7 @@ filegroup( "src/wasm/baseline/liftoff-compiler.cc", "src/wasm/baseline/liftoff-compiler.h", "src/wasm/baseline/liftoff-register.h", + "src/wasm/baseline/liftoff-varstate.h", "src/wasm/baseline/parallel-move.cc", "src/wasm/baseline/parallel-move.h", "src/wasm/baseline/parallel-move-inl.h", @@ -2801,6 +2821,7 @@ filegroup( "src/wasm/constant-expression-interface.cc", "src/wasm/constant-expression-interface.h", "src/wasm/decoder.h", + "src/wasm/float16.h", "src/wasm/function-body-decoder.cc", "src/wasm/function-body-decoder.h", "src/wasm/function-body-decoder-impl.h", @@ -2831,6 +2852,7 @@ filegroup( "src/wasm/pgo.cc", "src/wasm/pgo.h", "src/wasm/serialized-signature-inl.h", + "src/wasm/signature-hashing.h", "src/wasm/simd-shuffle.cc", "src/wasm/simd-shuffle.h", "src/wasm/stacks.cc", @@ -2852,6 +2874,8 @@ filegroup( "src/wasm/wasm-code-manager.h", "src/wasm/wasm-debug.cc", "src/wasm/wasm-debug.h", + "src/wasm/wasm-deopt-data.cc", + "src/wasm/wasm-deopt-data.h", "src/wasm/wasm-disassembler.cc", "src/wasm/wasm-disassembler.h", "src/wasm/wasm-disassembler-impl.h", @@ -3022,8 +3046,6 @@ filegroup( "src/compiler/const-tracking-let-helpers.h", "src/compiler/control-equivalence.cc", "src/compiler/control-equivalence.h", - "src/compiler/control-flow-optimizer.cc", - "src/compiler/control-flow-optimizer.h", "src/compiler/control-path-state.h", "src/compiler/csa-load-elimination.cc", "src/compiler/csa-load-elimination.h", @@ -3032,8 +3054,6 @@ filegroup( "src/compiler/decompression-optimizer.cc", "src/compiler/decompression-optimizer.h", "src/compiler/diamond.h", - "src/compiler/effect-control-linearizer.cc", - "src/compiler/effect-control-linearizer.h", "src/compiler/escape-analysis.cc", "src/compiler/escape-analysis.h", "src/compiler/escape-analysis-reducer.cc", @@ -3177,18 +3197,20 @@ filegroup( "src/compiler/simplified-operator-reducer.h", "src/compiler/state-values-utils.cc", "src/compiler/state-values-utils.h", - "src/compiler/store-store-elimination.cc", - "src/compiler/store-store-elimination.h", "src/compiler/string-builder-optimizer.cc", "src/compiler/string-builder-optimizer.h", "src/compiler/turbofan.h", "src/compiler/turbofan-enabled.cc", + "src/compiler/turboshaft/access-builder.h", "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/block-instrumentation-phase.cc", + "src/compiler/turboshaft/block-instrumentation-phase.h", + "src/compiler/turboshaft/block-instrumentation-reducer.cc", + "src/compiler/turboshaft/block-instrumentation-reducer.h", "src/compiler/turboshaft/branch-elimination-reducer.h", "src/compiler/turboshaft/build-graph-phase.cc", "src/compiler/turboshaft/build-graph-phase.h", @@ -3198,6 +3220,8 @@ filegroup( "src/compiler/turboshaft/dataview-lowering-reducer.h", "src/compiler/turboshaft/code-elimination-and-simplification-phase.cc", "src/compiler/turboshaft/code-elimination-and-simplification-phase.h", + "src/compiler/turboshaft/copying-phase.cc", + "src/compiler/turboshaft/copying-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", @@ -3208,6 +3232,7 @@ filegroup( "src/compiler/turboshaft/decompression-optimization-phase.h", "src/compiler/turboshaft/define-assembler-macros.inc", "src/compiler/turboshaft/deopt-data.h", + "src/compiler/turboshaft/duplication-optimization-reducer.h", "src/compiler/turboshaft/explicit-truncation-reducer.h", "src/compiler/turboshaft/fast-api-call-lowering-reducer.h", "src/compiler/turboshaft/fast-hash.h", @@ -3219,6 +3244,7 @@ filegroup( "src/compiler/turboshaft/graph-visualizer.h", "src/compiler/turboshaft/js-generic-lowering-reducer.h", "src/compiler/turboshaft/index.h", + "src/compiler/turboshaft/instruction-selection-normalization-reducer.h", "src/compiler/turboshaft/instruction-selection-phase.cc", "src/compiler/turboshaft/instruction-selection-phase.h", "src/compiler/turboshaft/late-escape-analysis-reducer.cc", @@ -3249,12 +3275,12 @@ filegroup( "src/compiler/turboshaft/operations.cc", "src/compiler/turboshaft/operations.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", "src/compiler/turboshaft/phase.h", + "src/compiler/turboshaft/pipelines.cc", + "src/compiler/turboshaft/pipelines.h", "src/compiler/turboshaft/pretenuring-propagation-reducer.cc", "src/compiler/turboshaft/pretenuring-propagation-reducer.h", "src/compiler/turboshaft/recreate-schedule.cc", @@ -3262,6 +3288,7 @@ filegroup( "src/compiler/turboshaft/recreate-schedule-phase.cc", "src/compiler/turboshaft/recreate-schedule-phase.h", "src/compiler/turboshaft/reducer-traits.h", + "src/compiler/turboshaft/register-allocation-phase.h", "src/compiler/turboshaft/representations.cc", "src/compiler/turboshaft/representations.h", "src/compiler/turboshaft/required-optimization-reducer.h", @@ -3279,7 +3306,7 @@ filegroup( "src/compiler/turboshaft/stack-check-lowering-reducer.h", "src/compiler/turboshaft/store-store-elimination-phase.cc", "src/compiler/turboshaft/store-store-elimination-phase.h", - "src/compiler/turboshaft/store-store-elimination-reducer.h", + "src/compiler/turboshaft/store-store-elimination-reducer-inl.h", "src/compiler/turboshaft/structural-optimization-reducer.h", "src/compiler/turboshaft/tracing.h", "src/compiler/turboshaft/type-assertions-phase.cc", @@ -3304,6 +3331,7 @@ filegroup( "src/compiler/turboshaft/value-numbering-reducer.h", "src/compiler/turboshaft/variable-reducer.h", "src/compiler/turboshaft/wasm-js-lowering-reducer.h", + "src/compiler/turboshaft/zone-with-name.h", "src/compiler/type-cache.cc", "src/compiler/type-cache.h", "src/compiler/type-narrowing-reducer.cc", @@ -3425,6 +3453,36 @@ filegroup( "src/compiler/wasm-typer.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", + "src/maglev/maglev-phi-representation-selector.cc", + "src/maglev/maglev-phi-representation-selector.h", + "src/maglev/maglev-post-hoc-optimizations-processors.h", + "src/maglev/maglev-pre-regalloc-codegen-processors.h", + ], }), ) @@ -3474,6 +3532,7 @@ filegroup( "src/builtins/builtins-sharedarraybuffer-gen.cc", "src/builtins/builtins-string-gen.cc", "src/builtins/builtins-string-gen.h", + "src/builtins/builtins-string-tsa.cc", "src/builtins/builtins-temporal-gen.cc", "src/builtins/builtins-typed-array-gen.cc", "src/builtins/builtins-typed-array-gen.h", @@ -3484,6 +3543,7 @@ filegroup( "src/builtins/profile-data-reader.h", "src/builtins/setup-builtins-internal.cc", "src/builtins/torque-csa-header-includes.h", + "src/codegen/turboshaft-builtins-assembler-inl.h", "src/codegen/code-stub-assembler.cc", "third_party/v8/codegen/fp16-inl.h", "src/codegen/code-stub-assembler-inl.h", @@ -3519,32 +3579,6 @@ 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", - ], }), ) @@ -3660,6 +3694,7 @@ filegroup( "src/heap/base/active-system-pages.h", "src/heap/base/basic-slot-set.h", "src/heap/base/bytes.h", + "src/heap/base/cached-unordered-map.h", "src/heap/base/incremental-marking-schedule.cc", "src/heap/base/incremental-marking-schedule.h", "src/heap/base/memory-tagging.h", @@ -3739,6 +3774,8 @@ filegroup( "src/snapshot/embedded/platform-embedded-file-writer-mac.h", "src/snapshot/embedded/platform-embedded-file-writer-win.cc", "src/snapshot/embedded/platform-embedded-file-writer-win.h", + "src/snapshot/embedded/platform-embedded-file-writer-zos.cc", + "src/snapshot/embedded/platform-embedded-file-writer-zos.h", "src/snapshot/mksnapshot.cc", "src/snapshot/snapshot-empty.cc", "src/snapshot/static-roots-gen.cc", @@ -4188,7 +4225,6 @@ v8_library( deps = [ ":lib_fp16", ":v8_libbase", - "//external:base_trace_event_common", "//external:absl_btree", "//external:absl_flat_hash_map", "//external:absl_flat_hash_set", @@ -4372,6 +4408,11 @@ alias( v8_build_config( name = "v8_build_config", + arch = select({ + "@v8//bazel/config:v8_target_arm64": "arm64", + "@v8//bazel/config:v8_target_x64": "x64", + "//conditions:default": "x64", + }), ) # Runs mjsunit with d8. @@ -4389,6 +4430,15 @@ py_test( "--variant=google3_noicu", "--outdir noicu", "--verbose", + ] + select({ + "@v8//bazel/config:v8_target_arm64": [ + "--arch=arm64", + ], + "@v8//bazel/config:v8_target_x64": [ + "--arch=x64", + ], + "//conditions:default": [], + }) + [ "mjsunit", ], data = [ @@ -4419,6 +4469,15 @@ py_test( "--variant=google3_icu", "--outdir icu", "--verbose", + ] + select({ + "@v8//bazel/config:v8_target_arm64": [ + "--arch=arm64", + ], + "@v8//bazel/config:v8_target_x64": [ + "--arch=x64", + ], + "//conditions:default": [], + }) + [ "mjsunit", ], data = [ diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index e2e0c16d97080d..92e8541951384f 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -31,10 +31,6 @@ declare_args() { # Dynamically set an additional dependency from v8/custom_deps. v8_custom_deps = "" - # Turns on all V8 debug features. Enables running V8 in a pseudo debug mode - # within a release Chrome. - v8_enable_debugging_features = is_debug - # Sets -DV8_ENABLE_FUTURE. v8_enable_future = false @@ -71,6 +67,12 @@ declare_args() { # Sets the number of internal fields on promise objects. v8_promise_internal_field_count = 0 + # Sets the number of internal fields on array buffer objects. + v8_array_buffer_internal_field_count = 0 + + # Sets the number of internal fields on array buffer view objects. + v8_array_buffer_view_internal_field_count = 0 + # Sets -dENABLE_GDB_JIT_INTERFACE. v8_enable_gdbjit = "" @@ -333,7 +335,7 @@ declare_args() { # Sets -DV8_COMPRESS_ZONES. v8_enable_zone_compression = "" - # Enable the experimental V8 sandbox. + # Enable the V8 sandbox. # Sets -DV8_ENABLE_SANDBOX. v8_enable_sandbox = "" @@ -404,9 +406,7 @@ declare_args() { # when this is set to 'false', one can run V8 in jitless mode at runtime by # passing the `--jitless` flag; but then you miss out on compile-time # optimizations. - # iOS (non-simulator) does not have executable pages for 3rd party - # applications yet so disable jit. - v8_jitless = v8_enable_lite_mode || target_is_ios_device + v8_jitless = v8_enable_lite_mode # Enable Sparkplug # Sets -DV8_ENABLE_SPARKPLUG. @@ -428,11 +428,19 @@ declare_args() { # Whether custom embedder snapshots may extend (= allocate new objects in) # ReadOnlySpace. v8_enable_extensible_ro_snapshot = true + + # Use sticky mark-bits for separating object generations. + v8_enable_sticky_mark_bits = false + + # Use the experimental TSA-based definition for some builtins. + v8_enable_experimental_tsa_builtins = false + + v8_dcheck_always_on = dcheck_always_on } # Derived defaults. if (cppgc_enable_verify_heap == "") { - cppgc_enable_verify_heap = v8_enable_debugging_features || dcheck_always_on + cppgc_enable_verify_heap = v8_enable_debugging_features || v8_dcheck_always_on } if (v8_enable_verify_heap == "") { v8_enable_verify_heap = v8_enable_debugging_features @@ -447,14 +455,14 @@ if (v8_enable_trace_maps == "") { v8_enable_trace_maps = v8_enable_debugging_features } if (v8_enable_test_features == "") { - v8_enable_test_features = v8_enable_debugging_features || dcheck_always_on + v8_enable_test_features = v8_enable_debugging_features || v8_dcheck_always_on } if (v8_enable_v8_checks == "") { v8_enable_v8_checks = v8_enable_debugging_features } if (v8_enable_heap_snapshot_verify == "") { v8_enable_heap_snapshot_verify = - v8_enable_debugging_features || dcheck_always_on + v8_enable_debugging_features || v8_dcheck_always_on } if (v8_enable_snapshot_code_comments) { assert(v8_code_comments == true || v8_code_comments == "", @@ -553,7 +561,7 @@ assert(!v8_enable_trace_ignition || v8_enable_trace_unoptimized, assert(!v8_enable_trace_baseline_exec || v8_enable_trace_unoptimized, "Baseline tracing requires unoptimized tracing to be enabled.") assert( - v8_enable_debugging_features == true || dcheck_always_on || + v8_enable_debugging_features == true || v8_dcheck_always_on || !v8_enable_slow_dchecks, "v8_enable_slow_dchecks requires v8_enable_debugging_features or dcheck_always_on.") @@ -619,7 +627,7 @@ if (v8_builtins_profiling_log_file == "default") { # * `v8_enable_webassembly` because it changes the set of opcodes which # affects graphs hashes. if (v8_enable_builtins_optimization && !v8_enable_builtins_profiling && - !is_debug && !dcheck_always_on && v8_enable_webassembly) { + !is_debug && !v8_dcheck_always_on && v8_enable_webassembly) { # This is about function arguments evaluation order on the machine building # mksnapshot, which makes node IDs not predictable for subgraphs like # Op1(Op2(), Op3()) and as a result different graph hashes. @@ -691,12 +699,6 @@ assert( !v8_enable_pointer_compression_shared_cage || v8_enable_pointer_compression, "Can't share a pointer compression cage if pointers aren't compressed") -assert( - !v8_enable_pointer_compression || - v8_enable_pointer_compression_shared_cage || - !v8_enable_external_code_space, - "Multi-cage pointer compression mode is not compatible with external code space") - assert( !v8_enable_pointer_compression_shared_cage || v8_current_cpu == "x64" || v8_current_cpu == "arm64" || v8_current_cpu == "riscv64" || @@ -807,6 +809,12 @@ config("libbase_config") { } } +config("zoslib_config") { + if (current_os == "zos") { + configs = [ "//third_party/zoslib:zoslib_config" ] + } +} + # Standalone cppgc cannot be built within chrome or with perfetto. assert(!cppgc_is_standalone || !build_with_chromium) assert(!cppgc_is_standalone || !v8_use_perfetto) @@ -863,10 +871,12 @@ config("external_startup_data") { # Make sure the |v8_generate_features_json| action is also updated when adding # or removing defines below. external_v8_defines = [ + "V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT=${v8_array_buffer_internal_field_count}", + "V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT=${v8_array_buffer_view_internal_field_count}", + "V8_PROMISE_INTERNAL_FIELD_COUNT=${v8_promise_internal_field_count}", "V8_ENABLE_CHECKS", "V8_COMPRESS_POINTERS", "V8_COMPRESS_POINTERS_IN_SHARED_CAGE", - "V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE", "V8_31BIT_SMIS_ON_64BIT_ARCH", "V8_COMPRESS_ZONES", "V8_ENABLE_SANDBOX", @@ -878,9 +888,21 @@ external_v8_defines = [ "V8_ENABLE_CONSERVATIVE_STACK_SCANNING", "V8_ENABLE_DIRECT_LOCAL", "V8_MINORMS_STRING_SHORTCUTTING", + "V8_HAVE_TARGET_OS", + "V8_TARGET_OS_ANDROID", + "V8_TARGET_OS_FUCHSIA", + "V8_TARGET_OS_IOS", + "V8_TARGET_OS_LINUX", + "V8_TARGET_OS_MACOS", + "V8_TARGET_OS_WIN", + "V8_TARGET_OS_CHROMEOS", ] -enabled_external_v8_defines = [] +enabled_external_v8_defines = [ + "V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT=${v8_array_buffer_internal_field_count}", + "V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT=${v8_array_buffer_view_internal_field_count}", + "V8_PROMISE_INTERNAL_FIELD_COUNT=${v8_promise_internal_field_count}", +] if (v8_enable_v8_checks) { enabled_external_v8_defines += [ "V8_ENABLE_CHECKS" ] @@ -889,8 +911,6 @@ if (v8_enable_pointer_compression) { enabled_external_v8_defines += [ "V8_COMPRESS_POINTERS" ] if (v8_enable_pointer_compression_shared_cage) { enabled_external_v8_defines += [ "V8_COMPRESS_POINTERS_IN_SHARED_CAGE" ] - } else { - enabled_external_v8_defines += [ "V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE" ] } } if (v8_enable_pointer_compression || v8_enable_31bit_smis_on_64bit_arch) { @@ -926,6 +946,34 @@ if (v8_enable_direct_local) { if (v8_shortcut_strings_in_minor_ms) { enabled_external_v8_defines += [ "V8_MINORMS_STRING_SHORTCUTTING" ] } + +# V8_TARGET_OS_ defines. The target OS may differ from host OS e.g. in +# mksnapshot. We additionally set V8_HAVE_TARGET_OS to determine that a +# target OS has in fact been set; otherwise we internally assume that target +# OS == host OS (see v8config.h). +if (target_os == "android") { + enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ] + enabled_external_v8_defines += [ "V8_TARGET_OS_ANDROID" ] +} else if (target_os == "fuchsia") { + enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ] + enabled_external_v8_defines += [ "V8_TARGET_OS_FUCHSIA" ] +} else if (target_os == "ios") { + enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ] + enabled_external_v8_defines += [ "V8_TARGET_OS_IOS" ] +} else if (target_os == "linux") { + enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ] + enabled_external_v8_defines += [ "V8_TARGET_OS_LINUX" ] +} else if (target_os == "mac") { + enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ] + enabled_external_v8_defines += [ "V8_TARGET_OS_MACOS" ] +} else if (target_os == "win") { + enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ] + enabled_external_v8_defines += [ "V8_TARGET_OS_WIN" ] +} else if (target_os == "chromeos") { + enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ] + enabled_external_v8_defines += [ "V8_TARGET_OS_CHROMEOS" ] +} + disabled_external_v8_defines = external_v8_defines - enabled_external_v8_defines # Put defines that are used in public headers here; public headers are @@ -1007,7 +1055,8 @@ config("features") { # Only targets in this file and its subdirs can depend on this. visibility = [ "./*" ] - defines = [] + defines = + [ "V8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=${v8_typed_array_max_size_in_heap}" ] configs = [ ":v8_header_features", @@ -1022,6 +1071,11 @@ config("features") { defines += [ "CPPGC_ALLOW_ALLOCATIONS_IN_PREFINALIZERS" ] } + if (v8_enable_pointer_compression && + !v8_enable_pointer_compression_shared_cage) { + defines += [ "V8_COMPRESS_POINTERS_IN_MULTIPLE_CAGES" ] + } + if (v8_embedder_string != "") { defines += [ "V8_EMBEDDER_STRING=\"$v8_embedder_string\"" ] } @@ -1031,13 +1085,6 @@ config("features") { if (v8_log_builtins_block_count_input != "") { defines += [ "LOG_BUILTIN_BLOCK_COUNT" ] } - if (v8_promise_internal_field_count != 0) { - defines += - [ "V8_PROMISE_INTERNAL_FIELD_COUNT=${v8_promise_internal_field_count}" ] - } - defines += - [ "V8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=${v8_typed_array_max_size_in_heap}" ] - if (v8_enable_future) { defines += [ "V8_ENABLE_FUTURE" ] } @@ -1253,6 +1300,12 @@ config("features") { if (v8_enable_local_off_stack_check) { defines += [ "V8_ENABLE_LOCAL_OFF_STACK_CHECK" ] } + if (v8_enable_sticky_mark_bits) { + defines += [ "V8_ENABLE_STICKY_MARK_BITS" ] + } + if (v8_enable_experimental_tsa_builtins) { + defines += [ "V8_ENABLE_EXPERIMENTAL_TSA_BUILTINS" ] + } } config("toolchain") { @@ -1351,7 +1404,7 @@ config("toolchain") { } if (host_byteorder == "little") { defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ] - } else { + } else if (current_os != "zos") { cflags += [ "-march=z196" ] } } @@ -1385,20 +1438,10 @@ config("toolchain") { 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" ] - defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] if (!is_clang) { cflags += [ "-ffp-contract=off" ] } @@ -1407,7 +1450,6 @@ config("toolchain") { if (v8_current_cpu == "riscv32") { defines += [ "V8_TARGET_ARCH_RISCV32" ] defines += [ "__riscv_xlen=32" ] - defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] } if (v8_current_cpu == "x86") { @@ -1430,37 +1472,10 @@ config("toolchain") { defines += [ "V8_ANDROID_LOG_STDOUT" ] } - # V8_TARGET_OS_ defines. The target OS may differ from host OS e.g. in - # mksnapshot. We additionally set V8_HAVE_TARGET_OS to determine that a - # target OS has in fact been set; otherwise we internally assume that target - # OS == host OS (see v8config.h). - if (target_os == "android") { - defines += [ "V8_HAVE_TARGET_OS" ] - defines += [ "V8_TARGET_OS_ANDROID" ] - } else if (target_os == "fuchsia") { - defines += [ "V8_HAVE_TARGET_OS" ] - defines += [ "V8_TARGET_OS_FUCHSIA" ] - } else if (target_os == "ios") { - defines += [ "V8_HAVE_TARGET_OS" ] - defines += [ "V8_TARGET_OS_IOS" ] - } else if (target_os == "linux") { - defines += [ "V8_HAVE_TARGET_OS" ] - defines += [ "V8_TARGET_OS_LINUX" ] - } else if (target_os == "mac") { - defines += [ "V8_HAVE_TARGET_OS" ] - defines += [ "V8_TARGET_OS_MACOS" ] - } else if (target_os == "win") { - defines += [ "V8_HAVE_TARGET_OS" ] - defines += [ "V8_TARGET_OS_WIN" ] - } else if (target_os == "chromeos") { - defines += [ "V8_HAVE_TARGET_OS" ] - defines += [ "V8_TARGET_OS_CHROMEOS" ] - } - # TODO(infra): Support v8_enable_prof on Windows. # TODO(infra): Add support for compiling with simulators. - if (v8_enable_debugging_features || dcheck_always_on) { + if (v8_enable_debugging_features || v8_dcheck_always_on) { defines += [ "DEBUG" ] if (v8_enable_slow_dchecks) { defines += [ "ENABLE_SLOW_DCHECKS" ] @@ -1807,6 +1822,7 @@ if (v8_postmortem_support) { "src/objects/abstract-code-inl.h", "src/objects/instruction-stream.h", "src/objects/instruction-stream-inl.h", + "src/objects/casting.h", "src/objects/code.h", "src/objects/code-inl.h", "src/objects/data-handler.h", @@ -1874,6 +1890,7 @@ if (v8_postmortem_support) { "src/objects/struct.h", "src/objects/struct-inl.h", "src/objects/tagged.h", + "src/objects/union.h", ] outputs = [ "$target_gen_dir/debug-support.cc" ] @@ -1960,6 +1977,7 @@ torque_files = [ "src/builtins/promise-reaction-job.tq", "src/builtins/promise-resolve.tq", "src/builtins/promise-then.tq", + "src/builtins/promise-try.tq", "src/builtins/promise-withresolvers.tq", "src/builtins/proxy-constructor.tq", "src/builtins/proxy-delete-property.tq", @@ -2061,6 +2079,7 @@ torque_files = [ "src/objects/js-atomics-synchronization.tq", "src/objects/js-collection-iterator.tq", "src/objects/js-collection.tq", + "src/objects/js-disposable-stack.tq", "src/objects/js-function.tq", "src/objects/js-generator.tq", "src/objects/js-iterator-helpers.tq", @@ -2268,6 +2287,12 @@ group("v8_abseil") { ] } +group("zoslib") { + if (current_os == "zos") { + deps = [ "//third_party/zoslib" ] + } +} + v8_header_set("torque_runtime_support") { visibility = [ ":*" ] @@ -2399,6 +2424,12 @@ template("run_mksnapshot") { data = [] + if (current_os != "zos") { + ext = "S" + } else { + ext = "s" + } + args = [ "./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)", "root_out_dir") + "/mksnapshot", @@ -2414,7 +2445,7 @@ template("run_mksnapshot") { "--target_arch=$current_cpu", "--embedded_src", - rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir), + rebase_path("$target_gen_dir/embedded${suffix}.${ext}", root_build_dir), ] if (v8_log_builtins_block_count_input != "") { @@ -2457,7 +2488,7 @@ template("run_mksnapshot") { args += invoker.args - outputs += [ "$target_gen_dir/embedded${suffix}.S" ] + outputs += [ "$target_gen_dir/embedded${suffix}.${ext}" ] if (invoker.embedded_variant != "") { args += [ "--embedded_variant", @@ -2636,7 +2667,7 @@ if (v8_verify_builtins_compatibility) { action("v8_dump_build_config") { script = "tools/testrunner/utils/dump_build_config.py" outputs = [ "$root_out_dir/v8_build_config.json" ] - is_DEBUG_defined = v8_enable_debugging_features || dcheck_always_on + is_DEBUG_defined = v8_enable_debugging_features || v8_dcheck_always_on is_full_debug = v8_enable_debugging_features && !v8_optimized_debug arch = v8_target_cpu @@ -2683,7 +2714,7 @@ action("v8_dump_build_config") { "concurrent_marking=$v8_enable_concurrent_marking", "conservative_stack_scanning=$v8_enable_conservative_stack_scanning", "current_cpu=\"$current_cpu\"", - "dcheck_always_on=$dcheck_always_on", + "dcheck_always_on=$v8_dcheck_always_on", "debug_code=$v8_enable_debug_code", "DEBUG_defined=$is_DEBUG_defined", "debugging_features=$v8_enable_debugging_features", @@ -2727,6 +2758,7 @@ action("v8_dump_build_config") { "verify_csa=$v8_enable_verify_csa", "verify_heap=$v8_enable_verify_heap", "verify_predictable=$v8_enable_verify_predictable", + "memory_corruption_api=$v8_enable_memory_corruption_api", ] } @@ -2803,7 +2835,11 @@ v8_source_set("v8_snapshot") { deps += [ ":asm_to_inline_asm_default" ] sources += [ "$target_gen_dir/embedded.cc" ] } else { - sources += [ "$target_gen_dir/embedded.S" ] + if (current_os != "zos") { + sources += [ "$target_gen_dir/embedded.S" ] + } else { + sources += [ "$target_gen_dir/embedded.s" ] + } } configs = [ ":internal_config" ] @@ -2883,6 +2919,7 @@ v8_source_set("v8_initializers") { "src/builtins/builtins-sharedarraybuffer-gen.cc", "src/builtins/builtins-string-gen.cc", "src/builtins/builtins-string-gen.h", + "src/builtins/builtins-string-tsa.cc", "src/builtins/builtins-temporal-gen.cc", "src/builtins/builtins-typed-array-gen.cc", "src/builtins/builtins-typed-array-gen.h", @@ -2896,6 +2933,8 @@ v8_source_set("v8_initializers") { "src/codegen/code-stub-assembler-inl.h", "src/codegen/code-stub-assembler.cc", "src/codegen/code-stub-assembler.h", + "src/codegen/heap-object-list.h", + "src/codegen/turboshaft-builtins-assembler-inl.h", "src/heap/setup-heap-internal.cc", "src/ic/accessor-assembler.cc", "src/ic/accessor-assembler.h", @@ -3082,6 +3121,7 @@ v8_header_set("v8_headers") { "include/v8-promise.h", "include/v8-proxy.h", "include/v8-regexp.h", + "include/v8-sandbox.h", "include/v8-script.h", "include/v8-snapshot.h", "include/v8-statistics.h", @@ -3188,7 +3228,6 @@ v8_header_set("v8_internal_headers") { sources = [ ### gcmole(all) ### "$target_gen_dir/builtins-generated/bytecodes-builtins-list.h", - "//base/trace_event/common/trace_event_common.h", "include/cppgc/common.h", "include/v8-inspector-protocol.h", "include/v8-inspector.h", @@ -3285,6 +3324,7 @@ v8_header_set("v8_internal_headers") { "src/common/operation.h", "src/common/ptr-compr-inl.h", "src/common/ptr-compr.h", + "src/common/simd128.h", "src/compiler-dispatcher/lazy-compile-dispatcher.h", "src/compiler-dispatcher/optimizing-compile-dispatcher.h", "src/compiler/access-builder.h", @@ -3327,13 +3367,11 @@ v8_header_set("v8_internal_headers") { "src/compiler/const-tracking-let-helpers.h", "src/compiler/constant-folding-reducer.h", "src/compiler/control-equivalence.h", - "src/compiler/control-flow-optimizer.h", "src/compiler/control-path-state.h", "src/compiler/csa-load-elimination.h", "src/compiler/dead-code-elimination.h", "src/compiler/decompression-optimizer.h", "src/compiler/diamond.h", - "src/compiler/effect-control-linearizer.h", "src/compiler/escape-analysis-reducer.h", "src/compiler/escape-analysis.h", "src/compiler/fast-api-calls.h", @@ -3411,12 +3449,14 @@ v8_header_set("v8_internal_headers") { "src/compiler/simplified-operator-reducer.h", "src/compiler/simplified-operator.h", "src/compiler/state-values-utils.h", - "src/compiler/store-store-elimination.h", "src/compiler/string-builder-optimizer.h", "src/compiler/turbofan.h", + "src/compiler/turboshaft/access-builder.h", "src/compiler/turboshaft/analyzer-iterator.h", "src/compiler/turboshaft/assembler.h", "src/compiler/turboshaft/assert-types-reducer.h", + "src/compiler/turboshaft/block-instrumentation-phase.h", + "src/compiler/turboshaft/block-instrumentation-reducer.h", "src/compiler/turboshaft/branch-elimination-reducer.h", "src/compiler/turboshaft/build-graph-phase.h", "src/compiler/turboshaft/builtin-call-descriptors.h", @@ -3439,6 +3479,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/turboshaft/graph-visualizer.h", "src/compiler/turboshaft/graph.h", "src/compiler/turboshaft/index.h", + "src/compiler/turboshaft/instruction-selection-normalization-reducer.h", "src/compiler/turboshaft/instruction-selection-phase.h", "src/compiler/turboshaft/js-generic-lowering-reducer.h", "src/compiler/turboshaft/late-escape-analysis-reducer.h", @@ -3461,10 +3502,12 @@ v8_header_set("v8_internal_headers") { "src/compiler/turboshaft/opmasks.h", "src/compiler/turboshaft/optimize-phase.h", "src/compiler/turboshaft/phase.h", + "src/compiler/turboshaft/pipelines.h", "src/compiler/turboshaft/pretenuring-propagation-reducer.h", "src/compiler/turboshaft/recreate-schedule-phase.h", "src/compiler/turboshaft/recreate-schedule.h", "src/compiler/turboshaft/reducer-traits.h", + "src/compiler/turboshaft/register-allocation-phase.h", "src/compiler/turboshaft/representations.h", "src/compiler/turboshaft/required-optimization-reducer.h", "src/compiler/turboshaft/runtime-call-descriptors.h", @@ -3477,7 +3520,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/turboshaft/snapshot-table.h", "src/compiler/turboshaft/stack-check-lowering-reducer.h", "src/compiler/turboshaft/store-store-elimination-phase.h", - "src/compiler/turboshaft/store-store-elimination-reducer.h", + "src/compiler/turboshaft/store-store-elimination-reducer-inl.h", "src/compiler/turboshaft/structural-optimization-reducer.h", "src/compiler/turboshaft/tracing.h", "src/compiler/turboshaft/type-assertions-phase.h", @@ -3495,6 +3538,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/turboshaft/value-numbering-reducer.h", "src/compiler/turboshaft/variable-reducer.h", "src/compiler/turboshaft/wasm-dead-code-elimination-phase.h", + "src/compiler/turboshaft/zone-with-name.h", "src/compiler/type-cache.h", "src/compiler/type-narrowing-reducer.h", "src/compiler/typed-optimization.h", @@ -3607,8 +3651,6 @@ v8_header_set("v8_internal_headers") { "src/heap/cppgc-js/unified-heap-marking-state.h", "src/heap/cppgc-js/unified-heap-marking-verifier.h", "src/heap/cppgc-js/unified-heap-marking-visitor.h", - "src/heap/cppgc-js/wrappable-info-inl.h", - "src/heap/cppgc-js/wrappable-info.h", "src/heap/ephemeron-remembered-set.h", "src/heap/evacuation-allocator-inl.h", "src/heap/evacuation-allocator.h", @@ -3622,7 +3664,6 @@ v8_header_set("v8_internal_headers") { "src/heap/free-list-inl.h", "src/heap/free-list.h", "src/heap/gc-callbacks.h", - "src/heap/gc-idle-time-handler.h", "src/heap/gc-tracer-inl.h", "src/heap/gc-tracer.h", "src/heap/heap-allocator-inl.h", @@ -3637,7 +3678,8 @@ v8_header_set("v8_internal_headers") { "src/heap/incremental-marking-job.h", "src/heap/incremental-marking.h", "src/heap/index-generator.h", - "src/heap/large-page.h", + "src/heap/large-page-metadata-inl.h", + "src/heap/large-page-metadata.h", "src/heap/large-spaces.h", "src/heap/linear-allocation-area.h", "src/heap/list.h", @@ -3662,7 +3704,9 @@ v8_header_set("v8_internal_headers") { "src/heap/marking.h", "src/heap/memory-allocator.h", "src/heap/memory-balancer.h", + "src/heap/memory-chunk-inl.h", "src/heap/memory-chunk-layout.h", + "src/heap/memory-chunk-metadata-inl.h", "src/heap/memory-chunk-metadata.h", "src/heap/memory-chunk.h", "src/heap/memory-measurement-inl.h", @@ -3671,15 +3715,16 @@ v8_header_set("v8_internal_headers") { "src/heap/minor-gc-job.h", "src/heap/minor-mark-sweep-inl.h", "src/heap/minor-mark-sweep.h", - "src/heap/mutable-page-inl.h", - "src/heap/mutable-page.h", + "src/heap/mutable-page-metadata-inl.h", + "src/heap/mutable-page-metadata.h", "src/heap/new-spaces-inl.h", "src/heap/new-spaces.h", + "src/heap/object-lock-inl.h", "src/heap/object-lock.h", "src/heap/object-stats.h", "src/heap/objects-visiting-inl.h", "src/heap/objects-visiting.h", - "src/heap/page.h", + "src/heap/page-metadata.h", "src/heap/paged-spaces-inl.h", "src/heap/paged-spaces.h", "src/heap/parallel-work-item.h", @@ -3717,7 +3762,7 @@ v8_header_set("v8_internal_headers") { "src/init/bootstrapper.h", "src/init/heap-symbols.h", "src/init/icu_util.h", - "src/init/isolate-allocator.h", + "src/init/isolate-group.h", "src/init/setup-isolate.h", "src/init/startup-data-util.h", "src/init/v8.h", @@ -3727,7 +3772,7 @@ v8_header_set("v8_internal_headers") { "src/interpreter/bytecode-array-random-iterator.h", "src/interpreter/bytecode-array-writer.h", "src/interpreter/bytecode-decoder.h", - "src/interpreter/bytecode-flags.h", + "src/interpreter/bytecode-flags-and-tokens.h", "src/interpreter/bytecode-generator.h", "src/interpreter/bytecode-jump-table.h", "src/interpreter/bytecode-label.h", @@ -3778,6 +3823,7 @@ v8_header_set("v8_internal_headers") { "src/objects/bigint.h", "src/objects/call-site-info-inl.h", "src/objects/call-site-info.h", + "src/objects/casting.h", "src/objects/cell-inl.h", "src/objects/cell.h", "src/objects/code-inl.h", @@ -3841,6 +3887,8 @@ v8_header_set("v8_internal_headers") { "src/objects/js-collection-iterator-inl.h", "src/objects/js-collection-iterator.h", "src/objects/js-collection.h", + "src/objects/js-disposable-stack-inl.h", + "src/objects/js-disposable-stack.h", "src/objects/js-function-inl.h", "src/objects/js-function.h", "src/objects/js-generator-inl.h", @@ -3980,9 +4028,11 @@ v8_header_set("v8_internal_headers") { "src/objects/turboshaft-types-inl.h", "src/objects/turboshaft-types.h", "src/objects/type-hints.h", + "src/objects/union.h", "src/objects/value-serializer.h", "src/objects/visitors-inl.h", "src/objects/visitors.h", + "src/objects/waiter-queue-node.h", "src/parsing/expression-scope.h", "src/parsing/func-name-inferrer.h", "src/parsing/import-assertions.h", @@ -4051,25 +4101,40 @@ v8_header_set("v8_internal_headers") { "src/runtime/runtime.h", "src/sandbox/bounded-size-inl.h", "src/sandbox/bounded-size.h", + "src/sandbox/check.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", "src/sandbox/code-pointer.h", + "src/sandbox/compactible-external-entity-table-inl.h", + "src/sandbox/compactible-external-entity-table.h", + "src/sandbox/cppheap-pointer-inl.h", + "src/sandbox/cppheap-pointer-table-inl.h", + "src/sandbox/cppheap-pointer-table.h", + "src/sandbox/external-buffer-inl.h", + "src/sandbox/external-buffer-table-inl.h", + "src/sandbox/external-buffer-table.h", + "src/sandbox/external-buffer-tag.h", + "src/sandbox/external-buffer.h", "src/sandbox/external-entity-table-inl.h", "src/sandbox/external-entity-table.h", "src/sandbox/external-pointer-inl.h", "src/sandbox/external-pointer-table-inl.h", "src/sandbox/external-pointer-table.h", "src/sandbox/external-pointer.h", + "src/sandbox/hardware-support.h", "src/sandbox/indirect-pointer-inl.h", "src/sandbox/indirect-pointer-tag.h", "src/sandbox/indirect-pointer.h", "src/sandbox/isolate-inl.h", "src/sandbox/isolate.h", + "src/sandbox/js-dispatch-table-inl.h", + "src/sandbox/js-dispatch-table.h", "src/sandbox/sandbox.h", "src/sandbox/sandboxed-pointer-inl.h", "src/sandbox/sandboxed-pointer.h", + "src/sandbox/tagged-payload.h", "src/sandbox/testing.h", "src/sandbox/trusted-pointer-table-inl.h", "src/sandbox/trusted-pointer-table.h", @@ -4101,6 +4166,7 @@ v8_header_set("v8_internal_headers") { "src/strings/char-predicates-inl.h", "src/strings/char-predicates.h", "src/strings/string-builder-inl.h", + "src/strings/string-builder.h", "src/strings/string-case.h", "src/strings/string-hasher-inl.h", "src/strings/string-hasher.h", @@ -4117,6 +4183,7 @@ v8_header_set("v8_internal_headers") { "src/third_party/siphash/halfsiphash.h", "src/third_party/utf8-decoder/utf8-decoder.h", "src/torque/runtime-macro-shims.h", + "src/tracing/trace-event-no-perfetto.h", "src/tracing/trace-event.h", "src/tracing/traced-value.h", "src/tracing/tracing-category-observer.h", @@ -4159,7 +4226,7 @@ v8_header_set("v8_internal_headers") { } if (v8_use_perfetto) { - sources -= [ "//base/trace_event/common/trace_event_common.h" ] + sources -= [ "src/tracing/trace-event-no-perfetto.h" ] sources += [ "src/tracing/code-data-source.h", "src/tracing/code-trace-context.h", @@ -4199,6 +4266,8 @@ v8_header_set("v8_internal_headers") { "src/maglev/maglev-ir.h", "src/maglev/maglev-phi-representation-selector.h", "src/maglev/maglev-pipeline-statistics.h", + "src/maglev/maglev-post-hoc-optimizations-processors.h", + "src/maglev/maglev-pre-regalloc-codegen-processors.h", "src/maglev/maglev-regalloc-data.h", "src/maglev/maglev-regalloc.h", "src/maglev/maglev-register-frame-array.h", @@ -4210,6 +4279,8 @@ v8_header_set("v8_internal_headers") { sources += [ "src/maglev/arm64/maglev-assembler-arm64-inl.h" ] } else if (v8_current_cpu == "x64") { sources += [ "src/maglev/x64/maglev-assembler-x64-inl.h" ] + } else if (v8_current_cpu == "s390x") { + sources += [ "src/maglev/s390/maglev-assembler-s390-inl.h" ] } } @@ -4256,6 +4327,7 @@ v8_header_set("v8_internal_headers") { "src/wasm/baseline/liftoff-assembler.h", "src/wasm/baseline/liftoff-compiler.h", "src/wasm/baseline/liftoff-register.h", + "src/wasm/baseline/liftoff-varstate.h", "src/wasm/baseline/parallel-move-inl.h", "src/wasm/baseline/parallel-move.h", "src/wasm/canonical-types.h", @@ -4265,6 +4337,7 @@ v8_header_set("v8_internal_headers") { "src/wasm/constant-expression-interface.h", "src/wasm/constant-expression.h", "src/wasm/decoder.h", + "src/wasm/float16.h", "src/wasm/function-body-decoder-impl.h", "src/wasm/function-body-decoder.h", "src/wasm/function-compiler.h", @@ -4283,6 +4356,7 @@ v8_header_set("v8_internal_headers") { "src/wasm/object-access.h", "src/wasm/pgo.h", "src/wasm/serialized-signature-inl.h", + "src/wasm/signature-hashing.h", "src/wasm/simd-shuffle.h", "src/wasm/stacks.h", "src/wasm/std-object-sizes.h", @@ -4296,6 +4370,7 @@ v8_header_set("v8_internal_headers") { "src/wasm/wasm-builtin-list.h", "src/wasm/wasm-code-manager.h", "src/wasm/wasm-debug.h", + "src/wasm/wasm-deopt-data.h", "src/wasm/wasm-disassembler-impl.h", "src/wasm/wasm-disassembler.h", "src/wasm/wasm-engine.h", @@ -4751,6 +4826,11 @@ v8_header_set("v8_internal_headers") { } } + frameworks = [] + if (is_ios) { + frameworks += [ "BrowserEngineKit.framework" ] + } + public_deps = [ ":torque_runtime_support", ":v8_flags", @@ -4805,11 +4885,9 @@ v8_compiler_sources = [ "src/compiler/const-tracking-let-helpers.cc", "src/compiler/constant-folding-reducer.cc", "src/compiler/control-equivalence.cc", - "src/compiler/control-flow-optimizer.cc", "src/compiler/csa-load-elimination.cc", "src/compiler/dead-code-elimination.cc", "src/compiler/decompression-optimizer.cc", - "src/compiler/effect-control-linearizer.cc", "src/compiler/escape-analysis-reducer.cc", "src/compiler/escape-analysis.cc", "src/compiler/fast-api-calls.cc", @@ -4876,7 +4954,6 @@ v8_compiler_sources = [ "src/compiler/simplified-operator-reducer.cc", "src/compiler/simplified-operator.cc", "src/compiler/state-values-utils.cc", - "src/compiler/store-store-elimination.cc", "src/compiler/string-builder-optimizer.cc", "src/compiler/turbofan-enabled.cc", "src/compiler/type-cache.cc", @@ -5082,6 +5159,8 @@ v8_source_set("v8_turboshaft") { sources = [ "src/compiler/turboshaft/analyzer-iterator.cc", "src/compiler/turboshaft/assembler.cc", + "src/compiler/turboshaft/block-instrumentation-phase.cc", + "src/compiler/turboshaft/block-instrumentation-reducer.cc", "src/compiler/turboshaft/build-graph-phase.cc", "src/compiler/turboshaft/code-elimination-and-simplification-phase.cc", "src/compiler/turboshaft/copying-phase.cc", @@ -5105,6 +5184,7 @@ v8_source_set("v8_turboshaft") { "src/compiler/turboshaft/operations.cc", "src/compiler/turboshaft/optimize-phase.cc", "src/compiler/turboshaft/phase.cc", + "src/compiler/turboshaft/pipelines.cc", "src/compiler/turboshaft/pretenuring-propagation-reducer.cc", "src/compiler/turboshaft/recreate-schedule-phase.cc", "src/compiler/turboshaft/recreate-schedule.cc", @@ -5131,6 +5211,7 @@ v8_source_set("v8_turboshaft") { "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", ] } @@ -5206,6 +5287,7 @@ v8_source_set("v8_base_without_compiler") { "src/builtins/builtins-api.cc", "src/builtins/builtins-array.cc", "src/builtins/builtins-arraybuffer.cc", + "src/builtins/builtins-async-disposable-stack.cc", "src/builtins/builtins-async-module.cc", "src/builtins/builtins-atomics-synchronization.cc", "src/builtins/builtins-bigint.cc", @@ -5214,6 +5296,7 @@ v8_source_set("v8_base_without_compiler") { "src/builtins/builtins-console.cc", "src/builtins/builtins-dataview.cc", "src/builtins/builtins-date.cc", + "src/builtins/builtins-disposable-stack.cc", "src/builtins/builtins-error.cc", "src/builtins/builtins-function.cc", "src/builtins/builtins-global.cc", @@ -5350,7 +5433,6 @@ v8_source_set("v8_base_without_compiler") { "src/heap/factory.cc", "src/heap/finalization-registry-cleanup-task.cc", "src/heap/free-list.cc", - "src/heap/gc-idle-time-handler.cc", "src/heap/gc-tracer.cc", "src/heap/heap-allocator.cc", "src/heap/heap-controller.cc", @@ -5361,7 +5443,7 @@ v8_source_set("v8_base_without_compiler") { "src/heap/incremental-marking-job.cc", "src/heap/incremental-marking.cc", "src/heap/index-generator.cc", - "src/heap/large-page.cc", + "src/heap/large-page-metadata.cc", "src/heap/large-spaces.cc", "src/heap/local-factory.cc", "src/heap/local-heap.cc", @@ -5380,11 +5462,11 @@ v8_source_set("v8_base_without_compiler") { "src/heap/memory-reducer.cc", "src/heap/minor-gc-job.cc", "src/heap/minor-mark-sweep.cc", - "src/heap/mutable-page.cc", + "src/heap/mutable-page-metadata.cc", "src/heap/new-spaces.cc", "src/heap/object-stats.cc", "src/heap/objects-visiting.cc", - "src/heap/page.cc", + "src/heap/page-metadata.cc", "src/heap/paged-spaces.cc", "src/heap/pretenuring-handler.cc", "src/heap/read-only-heap.cc", @@ -5407,7 +5489,7 @@ v8_source_set("v8_base_without_compiler") { "src/ic/stub-cache.cc", "src/init/bootstrapper.cc", "src/init/icu_util.cc", - "src/init/isolate-allocator.cc", + "src/init/isolate-group.cc", "src/init/startup-data-util.cc", "src/init/v8.cc", "src/interpreter/bytecode-array-builder.cc", @@ -5415,7 +5497,7 @@ v8_source_set("v8_base_without_compiler") { "src/interpreter/bytecode-array-random-iterator.cc", "src/interpreter/bytecode-array-writer.cc", "src/interpreter/bytecode-decoder.cc", - "src/interpreter/bytecode-flags.cc", + "src/interpreter/bytecode-flags-and-tokens.cc", "src/interpreter/bytecode-generator.cc", "src/interpreter/bytecode-label.cc", "src/interpreter/bytecode-node.cc", @@ -5467,6 +5549,7 @@ v8_source_set("v8_base_without_compiler") { "src/objects/js-collator.cc", "src/objects/js-date-time-format.cc", "src/objects/js-display-names.cc", + "src/objects/js-disposable-stack.cc", "src/objects/js-duration-format.cc", "src/objects/js-function.cc", "src/objects/js-list-format.cc", @@ -5515,6 +5598,7 @@ v8_source_set("v8_base_without_compiler") { "src/objects/type-hints.cc", "src/objects/value-serializer.cc", "src/objects/visitors.cc", + "src/objects/waiter-queue-node.cc", "src/parsing/func-name-inferrer.cc", "src/parsing/import-assertions.cc", "src/parsing/literal-buffer.cc", @@ -5594,7 +5678,11 @@ v8_source_set("v8_base_without_compiler") { "src/runtime/runtime-weak-refs.cc", "src/runtime/runtime.cc", "src/sandbox/code-pointer-table.cc", + "src/sandbox/cppheap-pointer-table.cc", + "src/sandbox/external-buffer-table.cc", "src/sandbox/external-pointer-table.cc", + "src/sandbox/hardware-support.cc", + "src/sandbox/js-dispatch-table.cc", "src/sandbox/sandbox.cc", "src/sandbox/testing.cc", "src/sandbox/trusted-pointer-table.cc", @@ -5693,6 +5781,11 @@ v8_source_set("v8_base_without_compiler") { "src/maglev/x64/maglev-assembler-x64.cc", "src/maglev/x64/maglev-ir-x64.cc", ] + } else if (v8_current_cpu == "s390x") { + sources += [ + "src/maglev/s390/maglev-assembler-s390.cc", + "src/maglev/s390/maglev-ir-s390.cc", + ] } } @@ -5744,6 +5837,7 @@ v8_source_set("v8_base_without_compiler") { "src/wasm/value-type.cc", "src/wasm/wasm-code-manager.cc", "src/wasm/wasm-debug.cc", + "src/wasm/wasm-deopt-data.cc", "src/wasm/wasm-disassembler.cc", "src/wasm/wasm-engine.cc", "src/wasm/wasm-external-refs.cc", @@ -6154,7 +6248,8 @@ v8_source_set("v8_base_without_compiler") { # to implement atomic memory access if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" || v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" || - v8_current_cpu == "s390" || v8_current_cpu == "s390x" || + (current_os != "zos" && + (v8_current_cpu == "s390" || v8_current_cpu == "s390x")) || v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { if (!is_clang) { libs += [ "atomic" ] @@ -6243,7 +6338,10 @@ v8_source_set("torque_base") { ":v8_shared_internal_headers", ] - public_deps = [ ":v8_libbase" ] + public_deps = [ + ":v8_config_headers", + ":v8_libbase", + ] # The use of exceptions for Torque in violation of the Chromium style-guide # is justified by the fact that it is only used from the non-essential @@ -6406,6 +6504,10 @@ v8_component("v8_libbase") { "src/base/strings.h", "src/base/sys-info.cc", "src/base/sys-info.h", + "src/base/template-meta-programming/algorithm.h", + "src/base/template-meta-programming/functional.h", + "src/base/template-meta-programming/list.h", + "src/base/template-meta-programming/string-literal.h", "src/base/template-utils.h", "src/base/threaded-list.h", "src/base/timezone-cache.h", @@ -6427,6 +6529,11 @@ v8_component("v8_libbase") { deps = [ ":v8_config_headers" ] + if (current_os == "zos") { + public_configs += [ ":zoslib_config" ] + deps += [ ":zoslib" ] + } + libs = [] data = [] @@ -6444,7 +6551,7 @@ v8_component("v8_libbase") { "src/base/platform/platform-posix.cc", "src/base/platform/platform-posix.h", ] - if (current_os != "aix") { + if (current_os != "aix" && current_os != "zos") { sources += [ "src/base/platform/platform-posix-time.cc", "src/base/platform/platform-posix-time.h", @@ -6512,7 +6619,6 @@ v8_component("v8_libbase") { sources += [ "src/base/debug/stack_trace_posix.cc", "src/base/platform/platform-darwin.cc", - "src/base/platform/platform-ios.cc", ] } else if (is_win) { # TODO(infra): Add support for cygwin. @@ -6536,6 +6642,11 @@ v8_component("v8_libbase") { } data_deps += [ "//build/win:runtime_libs" ] + } else if (current_os == "zos") { + sources += [ + "src/base/debug/stack_trace_zos.cc", + "src/base/platform/platform-zos.cc", + ] } if (v8_current_cpu == "mips64") { @@ -6597,7 +6708,6 @@ if (v8_use_libm_trig_functions) { v8_component("v8_libplatform") { sources = [ - "//base/trace_event/common/trace_event_common.h", "include/libplatform/libplatform-export.h", "include/libplatform/libplatform.h", "include/libplatform/v8-tracing.h", @@ -6624,6 +6734,7 @@ v8_component("v8_libplatform") { "src/libplatform/tracing/tracing-controller.cc", "src/libplatform/worker-thread.cc", "src/libplatform/worker-thread.h", + "src/tracing/trace-event-no-perfetto.h", ] configs = [ ":internal_config_base" ] @@ -6644,12 +6755,12 @@ v8_component("v8_libplatform") { if (v8_use_perfetto) { sources -= [ - "//base/trace_event/common/trace_event_common.h", "src/libplatform/tracing/trace-buffer.cc", "src/libplatform/tracing/trace-buffer.h", "src/libplatform/tracing/trace-object.cc", "src/libplatform/tracing/trace-writer.cc", "src/libplatform/tracing/trace-writer.h", + "src/tracing/trace-event-no-perfetto.h", ] sources += [ "src/libplatform/tracing/trace-event-listener.h" ] } @@ -6724,6 +6835,7 @@ v8_header_set("v8_heap_base_headers") { "src/heap/base/active-system-pages.h", "src/heap/base/basic-slot-set.h", "src/heap/base/bytes.h", + "src/heap/base/cached-unordered-map.h", "src/heap/base/incremental-marking-schedule.h", "src/heap/base/memory-tagging.h", "src/heap/base/stack.h", @@ -6746,7 +6858,12 @@ v8_source_set("v8_heap_base") { if (is_clang || !is_win) { if (current_cpu == "x64") { - sources += [ "src/heap/base/asm/x64/push_registers_asm.cc" ] + if (is_win) { + # Prefer a masm version with unwind directives. + sources += [ "src/heap/base/asm/x64/push_registers_masm.asm" ] + } else { + sources += [ "src/heap/base/asm/x64/push_registers_asm.cc" ] + } } else if (current_cpu == "x86") { sources += [ "src/heap/base/asm/ia32/push_registers_asm.cc" ] } else if (current_cpu == "arm") { @@ -6755,6 +6872,8 @@ v8_source_set("v8_heap_base") { sources += [ "src/heap/base/asm/arm64/push_registers_asm.cc" ] } else if (current_cpu == "ppc64") { sources += [ "src/heap/base/asm/ppc/push_registers_asm.cc" ] + } else if (current_os == "zos") { + sources += [ "src/heap/base/asm/zos/push_registers_asm.cc" ] } else if (current_cpu == "s390x") { sources += [ "src/heap/base/asm/s390/push_registers_asm.cc" ] } else if (current_cpu == "mips64el") { @@ -6848,6 +6967,10 @@ v8_header_set("cppgc_headers") { ":v8_libplatform", ] + if (current_os == "zos" && is_component_build) { + deps += [ ":zoslib" ] + } + public_deps = [ ":v8_config_headers" ] } @@ -6972,7 +7095,7 @@ v8_source_set("cppgc_base") { ] if (cppgc_is_standalone && !v8_use_perfetto) { - sources += [ "//base/trace_event/common/trace_event_common.h" ] + sources += [ "src/tracing/trace-event-no-perfetto.h" ] } else { public_deps += [ ":v8_tracing" ] } @@ -7112,6 +7235,8 @@ if (current_toolchain == v8_snapshot_toolchain) { "src/snapshot/embedded/platform-embedded-file-writer-mac.h", "src/snapshot/embedded/platform-embedded-file-writer-win.cc", "src/snapshot/embedded/platform-embedded-file-writer-win.h", + "src/snapshot/embedded/platform-embedded-file-writer-zos.cc", + "src/snapshot/embedded/platform-embedded-file-writer-zos.h", "src/snapshot/mksnapshot.cc", "src/snapshot/snapshot-empty.cc", "src/snapshot/static-roots-gen.cc", @@ -7122,7 +7247,10 @@ if (current_toolchain == v8_snapshot_toolchain) { sources += [ "src/deoptimizer/deoptimizer-cfi-empty.cc" ] } - configs = [ ":internal_config" ] + configs = [ + ":internal_config", + ":disable_icf", + ] deps = [ ":v8_base_without_compiler", @@ -7137,6 +7265,23 @@ if (current_toolchain == v8_snapshot_toolchain) { "//build/win:default_exe_manifest", ] } + + # This config disables a link time optimization "ICF", which may merge + # different functions into one if the function signature and body of them are + # identical. + # + # ICF breaks 1:1 mappings of the external references for V8 snapshot, so we + # disable it while taking a V8 snapshot. + config("disable_icf") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + if (is_win) { + ldflags = [ "/OPT:NOICF" ] # link.exe, but also lld-link.exe. + } else if (is_apple && !use_lld) { + ldflags = [ "-Wl,-no_deduplicate" ] # ld64. + } else if (use_lld) { + ldflags = [ "-Wl,--icf=none" ] + } + } } if (current_toolchain == v8_snapshot_toolchain) { @@ -7350,14 +7495,21 @@ group("v8_fuzzers") { ] if (v8_enable_webassembly) { + if (!is_official_build) { + data_deps += [ + ":v8_simple_wasm_compile_all_fuzzer", + ":v8_simple_wasm_compile_fuzzer", + ":v8_simple_wasm_compile_simd_fuzzer", + ":v8_simple_wasm_compile_wasmgc_fuzzer", + ":v8_simple_wasm_deopt_fuzzer", + ":v8_simple_wasm_init_expr_fuzzer", + ] + } data_deps += [ ":v8_simple_multi_return_fuzzer", ":v8_simple_wasm_async_fuzzer", ":v8_simple_wasm_code_fuzzer", - ":v8_simple_wasm_compile_fuzzer", - ":v8_simple_wasm_compile_simd_fuzzer", ":v8_simple_wasm_fuzzer", - ":v8_simple_wasm_init_expr_fuzzer", ":v8_simple_wasm_streaming_fuzzer", ] } @@ -7532,6 +7684,9 @@ v8_executable("d8") { if (v8_enable_vtunejit) { deps += [ "src/third_party/vtune:v8_vtune" ] } + if (current_os == "zos" && is_component_build) { + deps += [ ":zoslib" ] + } } v8_executable("v8_hello_world") { @@ -7575,6 +7730,9 @@ v8_executable("v8_sample_process") { ":v8_libplatform", "//build/win:default_exe_manifest", ] + if (current_os == "zos" && is_component_build) { + deps += [ ":zoslib" ] + } } if (want_v8_shell) { @@ -7594,6 +7752,9 @@ if (want_v8_shell) { ":v8_libplatform", "//build/win:default_exe_manifest", ] + if (current_os == "zos" && is_component_build) { + deps += [ ":zoslib" ] + } } } @@ -7624,11 +7785,25 @@ v8_executable("cppgc_hello_world") { } template("v8_fuzzer") { - name = target_name - forward_variables_from(invoker, "*") - v8_executable("v8_simple_" + name) { + fuzzer_name = target_name + + v8_source_set(fuzzer_name) { + sources = invoker.sources + + deps = [ ":fuzzer_support" ] + if (defined(invoker.deps)) { + deps += invoker.deps + } + + configs = [ + ":external_config", + ":internal_config_base", + ] + } + + v8_executable("v8_simple_${fuzzer_name}") { deps = [ - ":" + name, + ":${fuzzer_name}", "//build/win:default_exe_manifest", ] @@ -7638,61 +7813,21 @@ template("v8_fuzzer") { } } -v8_source_set("json_fuzzer") { - sources = [ "test/fuzzer/json.cc" ] - - deps = [ ":fuzzer_support" ] - - configs = [ - ":external_config", - ":internal_config_base", - ] -} - v8_fuzzer("json_fuzzer") { -} - -v8_source_set("parser_fuzzer") { - sources = [ "test/fuzzer/parser.cc" ] - - deps = [ ":fuzzer_support" ] - - configs = [ - ":external_config", - ":internal_config_base", - ] + sources = [ "test/fuzzer/json.cc" ] } v8_fuzzer("parser_fuzzer") { -} - -v8_source_set("regexp_fuzzer") { - sources = [ "test/fuzzer/regexp.cc" ] - - deps = [ ":fuzzer_support" ] - - configs = [ - ":external_config", - ":internal_config_base", - ] + sources = [ "test/fuzzer/parser.cc" ] } v8_fuzzer("regexp_fuzzer") { + sources = [ "test/fuzzer/regexp.cc" ] } if (v8_enable_webassembly) { - v8_source_set("multi_return_fuzzer") { - sources = [ "test/fuzzer/multi-return.cc" ] - - deps = [ ":fuzzer_support" ] - - configs = [ - ":external_config", - ":internal_config_base", - ] - } - v8_fuzzer("multi_return_fuzzer") { + sources = [ "test/fuzzer/multi-return.cc" ] } v8_source_set("wasm_test_common") { @@ -7723,67 +7858,11 @@ if (v8_enable_webassembly) { ] } - v8_source_set("wasm_fuzzer") { - sources = [ "test/fuzzer/wasm.cc" ] - - deps = [ - ":fuzzer_support", - ":lib_wasm_fuzzer_common", - ":wasm_test_common", - ] - - configs = [ - ":external_config", - ":internal_config_base", - ] - } - - v8_fuzzer("wasm_fuzzer") { - } - - v8_source_set("wasm_async_fuzzer") { - sources = [ "test/fuzzer/wasm-async.cc" ] - - deps = [ - ":fuzzer_support", - ":lib_wasm_fuzzer_common", - ":wasm_test_common", - ] - - configs = [ - ":external_config", - ":internal_config_base", - ] - } - - v8_fuzzer("wasm_async_fuzzer") { - } - - v8_source_set("wasm_code_fuzzer") { - sources = [ - "test/common/wasm/test-signatures.h", - "test/fuzzer/wasm-code.cc", - ] - - deps = [ - ":fuzzer_support", - ":lib_wasm_fuzzer_common", - ":wasm_test_common", - ] - - configs = [ - ":external_config", - ":internal_config_base", - ] - } - - v8_fuzzer("wasm_code_fuzzer") { - } - - v8_source_set("lib_wasm_fuzzer_common") { + v8_source_set("wasm_fuzzer_common") { sources = [ "test/fuzzer/wasm-fuzzer-common.cc", "test/fuzzer/wasm-fuzzer-common.h", + "tools/wasm/mjsunit-module-disassembler-impl.h", ] deps = [ @@ -7806,100 +7885,81 @@ if (v8_enable_webassembly) { ] } - v8_source_set("wasm_compile_fuzzer") { - sources = [ - "test/common/wasm/test-signatures.h", - "test/fuzzer/wasm-compile.cc", - ] - - deps = [ - ":fuzzer_support", - ":lib_wasm_fuzzer_common", - ":wasm_test_common", - ] + template("v8_wasm_fuzzer") { + forward_variables_from(invoker, "*") + v8_fuzzer(target_name) { + deps = [ + ":wasm_fuzzer_common", + ":wasm_test_common", + ] + } + } - configs = [ - ":external_config", - ":internal_config_base", - ] + v8_wasm_fuzzer("wasm_fuzzer") { + sources = [ "test/fuzzer/wasm.cc" ] } - v8_fuzzer("wasm_compile_fuzzer") { + v8_wasm_fuzzer("wasm_async_fuzzer") { + sources = [ "test/fuzzer/wasm-async.cc" ] } - v8_source_set("wasm_compile_simd_fuzzer") { + v8_wasm_fuzzer("wasm_code_fuzzer") { sources = [ "test/common/wasm/test-signatures.h", - "test/fuzzer/wasm-compile-simd.cc", - ] - - deps = [ - ":fuzzer_support", - ":lib_wasm_fuzzer_common", - ":wasm_test_common", - ] - - configs = [ - ":external_config", - ":internal_config_base", + "test/fuzzer/wasm-code.cc", ] } - v8_fuzzer("wasm_compile_simd_fuzzer") { - } - - v8_source_set("wasm_streaming_fuzzer") { + v8_wasm_fuzzer("wasm_streaming_fuzzer") { sources = [ "test/fuzzer/wasm-streaming.cc" ] - - deps = [ - ":fuzzer_support", - ":lib_wasm_fuzzer_common", - ":wasm_test_common", - ] - - configs = [ - ":external_config", - ":internal_config_base", - ] - } - - v8_fuzzer("wasm_streaming_fuzzer") { } - v8_source_set("wasm_init_expr_fuzzer") { - sources = [ "test/fuzzer/wasm-init-expr.cc" ] - - deps = [ - ":fuzzer_support", - ":lib_wasm_fuzzer_common", - ":wasm_test_common", - ] + # Some fuzzers depend on fuzzing functionality linked into the v8 library. + # For binary size reasons this functionality is not available for official + # builds, therefore these fuzzers do not function there and should be skipped + # instead. + if (!is_official_build) { + v8_wasm_fuzzer("wasm_compile_all_fuzzer") { + sources = [ + "test/common/wasm/test-signatures.h", + "test/fuzzer/wasm-compile-all.cc", + ] + } - configs = [ - ":external_config", - ":internal_config_base", - ] - } + v8_wasm_fuzzer("wasm_compile_fuzzer") { + sources = [ + "test/common/wasm/test-signatures.h", + "test/fuzzer/wasm-compile.cc", + ] + } - v8_fuzzer("wasm_init_expr_fuzzer") { - } -} + v8_wasm_fuzzer("wasm_compile_simd_fuzzer") { + sources = [ + "test/common/wasm/test-signatures.h", + "test/fuzzer/wasm-compile-simd.cc", + ] + } -v8_source_set("inspector_fuzzer") { - sources = [ "test/fuzzer/inspector-fuzzer.cc" ] + v8_wasm_fuzzer("wasm_compile_wasmgc_fuzzer") { + sources = [ + "test/common/wasm/test-signatures.h", + "test/fuzzer/wasm-compile-wasmgc.cc", + ] + } - deps = [ - ":fuzzer_support", - "test/inspector:inspector_test", - ] + v8_wasm_fuzzer("wasm_init_expr_fuzzer") { + sources = [ "test/fuzzer/wasm-init-expr.cc" ] + } - configs = [ - ":external_config", - ":internal_config_base", - ] + v8_wasm_fuzzer("wasm_deopt_fuzzer") { + sources = [ "test/fuzzer/wasm-deopt.cc" ] + } + } # !is_official_build } v8_fuzzer("inspector_fuzzer") { + sources = [ "test/fuzzer/inspector-fuzzer.cc" ] + deps = [ "test/inspector:inspector_test" ] } # Target to build all generated .cc files. @@ -7916,334 +7976,6 @@ group("v8_generated_cc_files") { # Protobuf targets, used only when building outside of chromium. if (!build_with_chromium && v8_use_perfetto) { - # This config is applied to the autogenerated .pb.{cc,h} files in - # proto_library.gni. This config is propagated up to the source sets - # that depend on generated proto headers. - config("protobuf_gen_config") { - defines = [ - "GOOGLE_PROTOBUF_NO_RTTI", - "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", - ] - cflags = [ - "-Wno-unknown-warning-option", - "-Wno-deprecated", - "-Wno-undef", - "-Wno-zero-as-null-pointer-constant", - "-Wno-thread-safety-attributes", - ] - include_dirs = [ "third_party/protobuf/src" ] - } - - # Configuration used to build libprotobuf_* and the protoc compiler. - config("protobuf_config") { - # Apply the lighter supressions and macro definitions from above. - configs = [ ":protobuf_gen_config" ] - - if (!is_win) { - defines = [ "HAVE_PTHREAD=1" ] - } - if (is_clang) { - cflags = [ - "-Wno-unused-private-field", - "-Wno-unused-function", - "-Wno-inconsistent-missing-override", - "-Wno-unknown-warning-option", - "-Wno-enum-compare-switch", - "-Wno-user-defined-warnings", - "-Wno-tautological-constant-compare", - ] - } - if (is_win && is_clang) { - cflags += [ "-Wno-microsoft-unqualified-friend" ] - } - } - - source_set("protobuf_lite") { - sources = [ - "third_party/protobuf/src/google/protobuf/any_lite.cc", - "third_party/protobuf/src/google/protobuf/arena.cc", - "third_party/protobuf/src/google/protobuf/arena.h", - "third_party/protobuf/src/google/protobuf/arena_impl.h", - "third_party/protobuf/src/google/protobuf/arenastring.h", - "third_party/protobuf/src/google/protobuf/extension_set.cc", - "third_party/protobuf/src/google/protobuf/extension_set.h", - "third_party/protobuf/src/google/protobuf/generated_enum_util.cc", - "third_party/protobuf/src/google/protobuf/generated_enum_util.h", - "third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc", - "third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.h", - "third_party/protobuf/src/google/protobuf/generated_message_util.cc", - "third_party/protobuf/src/google/protobuf/generated_message_util.h", - "third_party/protobuf/src/google/protobuf/has_bits.h", - "third_party/protobuf/src/google/protobuf/implicit_weak_message.cc", - "third_party/protobuf/src/google/protobuf/implicit_weak_message.h", - "third_party/protobuf/src/google/protobuf/inlined_string_field.h", - "third_party/protobuf/src/google/protobuf/io/coded_stream.cc", - "third_party/protobuf/src/google/protobuf/io/coded_stream.h", - "third_party/protobuf/src/google/protobuf/io/coded_stream_inl.h", - "third_party/protobuf/src/google/protobuf/io/io_win32.cc", - "third_party/protobuf/src/google/protobuf/io/io_win32.h", - "third_party/protobuf/src/google/protobuf/io/strtod.cc", - "third_party/protobuf/src/google/protobuf/io/strtod.h", - "third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc", - "third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h", - "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc", - "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h", - "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", - "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h", - "third_party/protobuf/src/google/protobuf/map.h", - "third_party/protobuf/src/google/protobuf/map_entry_lite.h", - "third_party/protobuf/src/google/protobuf/map_field_lite.h", - "third_party/protobuf/src/google/protobuf/map_type_handler.h", - "third_party/protobuf/src/google/protobuf/message_lite.cc", - "third_party/protobuf/src/google/protobuf/message_lite.h", - "third_party/protobuf/src/google/protobuf/repeated_field.cc", - "third_party/protobuf/src/google/protobuf/repeated_field.h", - "third_party/protobuf/src/google/protobuf/stubs/bytestream.cc", - "third_party/protobuf/src/google/protobuf/stubs/bytestream.h", - "third_party/protobuf/src/google/protobuf/stubs/callback.h", - "third_party/protobuf/src/google/protobuf/stubs/casts.h", - "third_party/protobuf/src/google/protobuf/stubs/common.cc", - "third_party/protobuf/src/google/protobuf/stubs/common.h", - "third_party/protobuf/src/google/protobuf/stubs/fastmem.h", - "third_party/protobuf/src/google/protobuf/stubs/hash.h", - "third_party/protobuf/src/google/protobuf/stubs/int128.cc", - "third_party/protobuf/src/google/protobuf/stubs/int128.h", - "third_party/protobuf/src/google/protobuf/stubs/logging.h", - "third_party/protobuf/src/google/protobuf/stubs/macros.h", - "third_party/protobuf/src/google/protobuf/stubs/map_util.h", - "third_party/protobuf/src/google/protobuf/stubs/mutex.h", - "third_party/protobuf/src/google/protobuf/stubs/once.h", - "third_party/protobuf/src/google/protobuf/stubs/platform_macros.h", - "third_party/protobuf/src/google/protobuf/stubs/port.h", - "third_party/protobuf/src/google/protobuf/stubs/status.cc", - "third_party/protobuf/src/google/protobuf/stubs/status.h", - "third_party/protobuf/src/google/protobuf/stubs/status_macros.h", - "third_party/protobuf/src/google/protobuf/stubs/statusor.cc", - "third_party/protobuf/src/google/protobuf/stubs/statusor.h", - "third_party/protobuf/src/google/protobuf/stubs/stl_util.h", - "third_party/protobuf/src/google/protobuf/stubs/stringpiece.cc", - "third_party/protobuf/src/google/protobuf/stubs/stringpiece.h", - "third_party/protobuf/src/google/protobuf/stubs/stringprintf.cc", - "third_party/protobuf/src/google/protobuf/stubs/stringprintf.h", - "third_party/protobuf/src/google/protobuf/stubs/structurally_valid.cc", - "third_party/protobuf/src/google/protobuf/stubs/strutil.cc", - "third_party/protobuf/src/google/protobuf/stubs/strutil.h", - "third_party/protobuf/src/google/protobuf/stubs/template_util.h", - "third_party/protobuf/src/google/protobuf/stubs/time.cc", - "third_party/protobuf/src/google/protobuf/stubs/time.h", - "third_party/protobuf/src/google/protobuf/wire_format_lite.cc", - "third_party/protobuf/src/google/protobuf/wire_format_lite.h", - ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ - "//build/config/compiler:no_chromium_code", - ":protobuf_config", - ] - if (is_win) { - configs -= [ "//build/config/win:lean_and_mean" ] - } - public_configs = [ ":protobuf_gen_config" ] - } - - # This target should be used only by the protoc compiler and by test targets. - source_set("protobuf_full") { - deps = [ ":protobuf_lite" ] - sources = [ - "third_party/protobuf/src/google/protobuf/any.cc", - "third_party/protobuf/src/google/protobuf/any.h", - "third_party/protobuf/src/google/protobuf/any.pb.cc", - "third_party/protobuf/src/google/protobuf/any.pb.h", - "third_party/protobuf/src/google/protobuf/api.pb.cc", - "third_party/protobuf/src/google/protobuf/api.pb.h", - "third_party/protobuf/src/google/protobuf/compiler/importer.cc", - "third_party/protobuf/src/google/protobuf/compiler/importer.h", - "third_party/protobuf/src/google/protobuf/compiler/parser.cc", - "third_party/protobuf/src/google/protobuf/compiler/parser.h", - "third_party/protobuf/src/google/protobuf/descriptor.cc", - "third_party/protobuf/src/google/protobuf/descriptor.h", - "third_party/protobuf/src/google/protobuf/descriptor.pb.cc", - "third_party/protobuf/src/google/protobuf/descriptor.pb.h", - "third_party/protobuf/src/google/protobuf/descriptor_database.cc", - "third_party/protobuf/src/google/protobuf/descriptor_database.h", - "third_party/protobuf/src/google/protobuf/duration.pb.cc", - "third_party/protobuf/src/google/protobuf/duration.pb.h", - "third_party/protobuf/src/google/protobuf/dynamic_message.cc", - "third_party/protobuf/src/google/protobuf/dynamic_message.h", - "third_party/protobuf/src/google/protobuf/empty.pb.cc", - "third_party/protobuf/src/google/protobuf/empty.pb.h", - "third_party/protobuf/src/google/protobuf/extension_set_heavy.cc", - "third_party/protobuf/src/google/protobuf/field_mask.pb.cc", - "third_party/protobuf/src/google/protobuf/field_mask.pb.h", - "third_party/protobuf/src/google/protobuf/generated_enum_reflection.h", - "third_party/protobuf/src/google/protobuf/generated_message_reflection.cc", - "third_party/protobuf/src/google/protobuf/generated_message_reflection.h", - "third_party/protobuf/src/google/protobuf/io/gzip_stream.cc", - "third_party/protobuf/src/google/protobuf/io/gzip_stream.h", - "third_party/protobuf/src/google/protobuf/io/printer.cc", - "third_party/protobuf/src/google/protobuf/io/printer.h", - "third_party/protobuf/src/google/protobuf/io/tokenizer.cc", - "third_party/protobuf/src/google/protobuf/io/tokenizer.h", - "third_party/protobuf/src/google/protobuf/map_entry.h", - "third_party/protobuf/src/google/protobuf/map_field.cc", - "third_party/protobuf/src/google/protobuf/map_field.h", - "third_party/protobuf/src/google/protobuf/map_field_inl.h", - "third_party/protobuf/src/google/protobuf/message.cc", - "third_party/protobuf/src/google/protobuf/message.h", - "third_party/protobuf/src/google/protobuf/metadata.h", - "third_party/protobuf/src/google/protobuf/reflection.h", - "third_party/protobuf/src/google/protobuf/reflection_internal.h", - "third_party/protobuf/src/google/protobuf/reflection_ops.cc", - "third_party/protobuf/src/google/protobuf/reflection_ops.h", - "third_party/protobuf/src/google/protobuf/service.cc", - "third_party/protobuf/src/google/protobuf/service.h", - "third_party/protobuf/src/google/protobuf/source_context.pb.cc", - "third_party/protobuf/src/google/protobuf/source_context.pb.h", - "third_party/protobuf/src/google/protobuf/struct.pb.cc", - "third_party/protobuf/src/google/protobuf/struct.pb.h", - "third_party/protobuf/src/google/protobuf/stubs/mathlimits.cc", - "third_party/protobuf/src/google/protobuf/stubs/mathlimits.h", - "third_party/protobuf/src/google/protobuf/stubs/mathutil.h", - "third_party/protobuf/src/google/protobuf/stubs/substitute.cc", - "third_party/protobuf/src/google/protobuf/stubs/substitute.h", - "third_party/protobuf/src/google/protobuf/text_format.cc", - "third_party/protobuf/src/google/protobuf/text_format.h", - "third_party/protobuf/src/google/protobuf/timestamp.pb.cc", - "third_party/protobuf/src/google/protobuf/timestamp.pb.h", - "third_party/protobuf/src/google/protobuf/type.pb.cc", - "third_party/protobuf/src/google/protobuf/type.pb.h", - "third_party/protobuf/src/google/protobuf/unknown_field_set.cc", - "third_party/protobuf/src/google/protobuf/unknown_field_set.h", - "third_party/protobuf/src/google/protobuf/util/field_comparator.cc", - "third_party/protobuf/src/google/protobuf/util/field_comparator.h", - "third_party/protobuf/src/google/protobuf/util/field_mask_util.cc", - "third_party/protobuf/src/google/protobuf/util/field_mask_util.h", - "third_party/protobuf/src/google/protobuf/util/internal/constants.h", - "third_party/protobuf/src/google/protobuf/util/internal/datapiece.cc", - "third_party/protobuf/src/google/protobuf/util/internal/datapiece.h", - "third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc", - "third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h", - "third_party/protobuf/src/google/protobuf/util/internal/error_listener.cc", - "third_party/protobuf/src/google/protobuf/util/internal/error_listener.h", - "third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc", - "third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.h", - "third_party/protobuf/src/google/protobuf/util/internal/json_escaping.cc", - "third_party/protobuf/src/google/protobuf/util/internal/json_escaping.h", - "third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc", - "third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h", - "third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc", - "third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.h", - "third_party/protobuf/src/google/protobuf/util/internal/location_tracker.h", - "third_party/protobuf/src/google/protobuf/util/internal/object_location_tracker.h", - "third_party/protobuf/src/google/protobuf/util/internal/object_source.h", - "third_party/protobuf/src/google/protobuf/util/internal/object_writer.cc", - "third_party/protobuf/src/google/protobuf/util/internal/object_writer.h", - "third_party/protobuf/src/google/protobuf/util/internal/proto_writer.cc", - "third_party/protobuf/src/google/protobuf/util/internal/proto_writer.h", - "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc", - "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.h", - "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc", - "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h", - "third_party/protobuf/src/google/protobuf/util/internal/structured_objectwriter.h", - "third_party/protobuf/src/google/protobuf/util/internal/type_info.cc", - "third_party/protobuf/src/google/protobuf/util/internal/type_info.h", - "third_party/protobuf/src/google/protobuf/util/internal/type_info_test_helper.cc", - "third_party/protobuf/src/google/protobuf/util/internal/type_info_test_helper.h", - "third_party/protobuf/src/google/protobuf/util/internal/utility.cc", - "third_party/protobuf/src/google/protobuf/util/internal/utility.h", - "third_party/protobuf/src/google/protobuf/util/json_util.cc", - "third_party/protobuf/src/google/protobuf/util/json_util.h", - "third_party/protobuf/src/google/protobuf/util/message_differencer.cc", - "third_party/protobuf/src/google/protobuf/util/message_differencer.h", - "third_party/protobuf/src/google/protobuf/util/time_util.cc", - "third_party/protobuf/src/google/protobuf/util/time_util.h", - "third_party/protobuf/src/google/protobuf/util/type_resolver.h", - "third_party/protobuf/src/google/protobuf/util/type_resolver_util.cc", - "third_party/protobuf/src/google/protobuf/util/type_resolver_util.h", - "third_party/protobuf/src/google/protobuf/wire_format.cc", - "third_party/protobuf/src/google/protobuf/wire_format.h", - "third_party/protobuf/src/google/protobuf/wrappers.pb.cc", - "third_party/protobuf/src/google/protobuf/wrappers.pb.h", - ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ - "//build/config/compiler:no_chromium_code", - ":protobuf_config", - ] - if (is_win) { - configs -= [ "//build/config/win:lean_and_mean" ] - } - public_configs = [ ":protobuf_gen_config" ] - } - - if (current_toolchain == host_toolchain) { - source_set("protoc_lib") { - deps = [ ":protobuf_full" ] - sources = [ - "third_party/protobuf/src/google/protobuf/compiler/code_generator.cc", - "third_party/protobuf/src/google/protobuf/compiler/code_generator.h", - "third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc", - "third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_layout_helper.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc", - "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h", - "third_party/protobuf/src/google/protobuf/compiler/plugin.cc", - "third_party/protobuf/src/google/protobuf/compiler/plugin.h", - "third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc", - "third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h", - "third_party/protobuf/src/google/protobuf/compiler/subprocess.cc", - "third_party/protobuf/src/google/protobuf/compiler/subprocess.h", - "third_party/protobuf/src/google/protobuf/compiler/zip_writer.cc", - "third_party/protobuf/src/google/protobuf/compiler/zip_writer.h", - ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ - "//build/config/compiler:no_chromium_code", - ":protobuf_config", - ] - if (is_win) { - configs -= [ "//build/config/win:lean_and_mean" ] - } - public_configs = [ ":protobuf_gen_config" ] - } - - executable("protoc") { - deps = [ - ":protoc_lib", - "//build/win:default_exe_manifest", - ] - sources = [ "src/protobuf/protobuf-compiler-main.cc" ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - } - } # host_toolchain - v8_component("v8_libperfetto") { configs = [ ":v8_tracing_config" ] public_configs = [ "//third_party/perfetto/gn:public_config" ] diff --git a/deps/v8/COMMON_OWNERS b/deps/v8/COMMON_OWNERS index 9e9d51d5835a1d..5d4e99dec543bd 100644 --- a/deps/v8/COMMON_OWNERS +++ b/deps/v8/COMMON_OWNERS @@ -1,5 +1,6 @@ adamk@chromium.org ahaas@chromium.org +alexschulze@chromium.org bikineev@chromium.org bmeurer@chromium.org cbruni@chromium.org @@ -9,6 +10,7 @@ dinfuehr@chromium.org dlehmann@chromium.org dmercadier@chromium.org ecmziegler@chromium.org +evih@chromium.org gdeepti@chromium.org hablich@chromium.org hpayer@chromium.org @@ -16,21 +18,22 @@ ishell@chromium.org jgruber@chromium.org jkummerow@chromium.org leszeks@chromium.org +liviurau@chromium.org machenbach@chromium.org manoskouk@chromium.org -mathias@chromium.org marja@chromium.org +mathias@chromium.org mliedtke@chromium.org mlippautz@chromium.org -mslekova@chromium.org nicohartmann@chromium.org nikolaos@chromium.org +olivf@chromium.org omerkatz@chromium.org pthier@chromium.org +rezvan@chromium.org sroettger@google.com syg@chromium.org szuend@chromium.org -tebbi@chromium.org thibaudm@chromium.org vahl@chromium.org verwaest@chromium.org diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 8f2b6e603dbde4..6b06081f88e887 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -57,7 +57,7 @@ vars = { 'checkout_fuchsia_no_hooks': False, # reclient CIPD package version - 'reclient_version': 're_client_version:0.134.1.2c9285b-gomaip', + 'reclient_version': 're_client_version:0.150.1.d9707319-gomaip', # Fetch configuration files required for the 'use_remoteexec' gn arg 'download_remoteexec_cfg': False, @@ -73,27 +73,27 @@ vars = { 'build_with_chromium': False, # GN CIPD package version. - 'gn_version': 'git_revision:59c4bb920542ee903ee1df39097ae024e2e8226f', + 'gn_version': 'git_revision:b2afae122eeb6ce09c52d63f67dc53fc517dbdc8', # ninja CIPD package version - # https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/ninja - 'ninja_version': 'version:2@1.11.1.chromium.6', + # https://chrome-infra-packages.appspot.com/p/infra/3pp/build_support/ninja-1_11_1/ + 'ninja_version': 'version:2@1.11.1.chromium.2', # siso CIPD package version - 'siso_version': 'git_revision:110b1d8c0528de153cef259f09f3dc5ee627e6cb', + 'siso_version': 'git_revision:50a6db5dae3978d2d2e8dce29f6df024dde48d1b', # luci-go CIPD package version. - 'luci_go': 'git_revision:623f8d17a069eaea6d0fca13147888284ec76ff1', + 'luci_go': 'git_revision:771ea9a614a104c71655f699ef82219a2a474817', # 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:19.20240305.3.1', + 'fuchsia_version': 'version:22.20240717.4.1', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_build-tools_version # and whatever else without interference from each other. - 'android_sdk_build-tools_version': 'YK9Rzw3fDzMHVzatNN6VlyoD_81amLZpN1AbmkdOd6AC', + 'android_sdk_build-tools_version': 'DxwAZ3hD551Neu6ycuW5CPnXFrdleRBd93oX1eB_m9YC', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_emulator_version # and whatever else without interference from each other. @@ -109,11 +109,11 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_platform-tools_version # and whatever else without interference from each other. - 'android_sdk_platform-tools_version': 'HWVsGs2HCKgSVv41FsOcsfJbNcB0UFiNrF6Tc4yRArYC', + 'android_sdk_platform-tools_version': 'WihaseZR6cojZbkzIqwGhpTp92ztaGfqq8njBU8eTXYC', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_platforms_version # and whatever else without interference from each other. - 'android_sdk_platforms_version': 'u-bhWbTME6u-DjypTgr3ZikCyeAeU6txkR9ET6Uudc8C', + 'android_sdk_platforms_version': 'kIXA-9XuCfOESodXEdOBkW5f1ytrGWdbp3HFp1I8A_0C', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_sources_version # and whatever else without interference from each other. @@ -125,12 +125,10 @@ vars = { } deps = { - 'base/trace_event/common': - Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + '29ac73db520575590c3aceb0a6f1f58dda8934f6', 'build': - Var('chromium_url') + '/chromium/src/build.git' + '@' + 'bca39698b291b392f0b4336857caf929c603ada3', + Var('chromium_url') + '/chromium/src/build.git' + '@' + '7a8285c06acd753e6228263f48e5595e20ca1577', 'buildtools': - Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '68fce43789231d29d2028ca85530e4814aac6f50', + Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '3ef44a2b92d5dd1faa5189a06f3a5febe6db2d58', 'buildtools/linux64': { 'packages': [ { @@ -139,7 +137,7 @@ deps = { } ], 'dep_type': 'cipd', - 'condition': 'host_os == "linux" and host_cpu != "s390" and host_cpu != "ppc"', + 'condition': 'host_os == "linux" and host_cpu != "s390" and host_os != "zos" and host_cpu != "ppc"', }, 'buildtools/mac': { 'packages': [ @@ -169,22 +167,22 @@ 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" or host_os == "mac")', + 'condition': '(host_os == "linux" or host_os == "mac" or host_os == "win") and host_cpu != "s390" and host_os != "zos" 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' + '@' + '0b1abd5ee70867311bea78e851bd609ad842011a', + Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + 'b01075d87cf48f69a468d75a0eb7c372902965c7', 'third_party/android_platform': { - 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + 'eeb2d566f963bb66212fdc0d9bbe1dde550b4969', + 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + '6337c445f9963ec3914e7e0c5787941d07b46509', 'condition': 'checkout_android', }, 'third_party/android_sdk/public': { 'packages': [ { - 'package': 'chromium/third_party/android_sdk/public/build-tools/34.0.0', + 'package': 'chromium/third_party/android_sdk/public/build-tools/35.0.0', 'version': Var('android_sdk_build-tools_version'), }, { @@ -204,7 +202,7 @@ deps = { 'version': Var('android_sdk_platform-tools_version'), }, { - 'package': 'chromium/third_party/android_sdk/public/platforms/android-34', + 'package': 'chromium/third_party/android_sdk/public/platforms/android-35', 'version': Var('android_sdk_platforms_version'), }, { @@ -223,26 +221,26 @@ deps = { 'packages': [ { 'package': 'chromium/third_party/android_toolchain/android_toolchain', - 'version': 'wpJvg81kuXdMM66r_l9Doa-pLfR6S26Jd1x40LpwWEoC', + 'version': 'h9HeidXTeHQ-oskldbqCZx26-7VrVvXpLfqOI87uy4QC', }, ], 'condition': 'checkout_android', 'dep_type': 'cipd', }, 'third_party/boringssl': { - 'url': Var('chromium_url') + '/chromium/src/third_party/boringssl.git' + '@' + '9ead20bdbf0ecc33219d25fd3a426876c54d126e', + 'url': Var('chromium_url') + '/chromium/src/third_party/boringssl.git' + '@' + '35f4fcbdeae229a56fd50320dc03ae6de407aca4', 'condition': "checkout_centipede_deps", }, 'third_party/boringssl/src': { - 'url': Var('boringssl_url') + '/boringssl.git' + '@' + '414f69504d30d0848b69f6453ea7fb5e88004cb4', + 'url': Var('boringssl_url') + '/boringssl.git' + '@' + 'f01108e4761e1d4189cb134322c3cb01dc71ef87', 'condition': "checkout_centipede_deps", }, 'third_party/catapult': { - 'url': Var('chromium_url') + '/catapult.git' + '@' + '97c002a33e5b777eaa60e3ddc977a185f89446f7', + 'url': Var('chromium_url') + '/catapult.git' + '@' + '16999365265c9850d7b5c46e53ddd52aca56f8dc', 'condition': 'checkout_android', }, 'third_party/clang-format/script': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + 'e5337933f2951cacd3aeacd238ce4578163ca0b9', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + '3c0acd2d4e73dd911309d9e970ba09d58bf23a62', 'third_party/colorama/src': { 'url': Var('chromium_url') + '/external/colorama.git' + '@' + '3de9f013df4b470069d03d250224062e8cf15c49', 'condition': 'checkout_android', @@ -252,11 +250,11 @@ deps = { 'condition': 'checkout_android', }, 'third_party/depot_tools': - Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + 'fe6a359a803f55829ede3666215d080f6775f173', + Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + 'cdcdd6efeec145eb246eeac20c78f2c55c9d393e', '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' + '@' + '727f65f8dae76c0d5c39c0f95d9d8f3a90de79f1', + 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-gn-sdk.git' + '@' + '30fee7b68b3675e351fa47303c3b6ef322941ccd', 'condition': 'checkout_fuchsia', }, # Exists for rolling the Fuchsia SDK. Check out of the SDK should always @@ -278,15 +276,19 @@ deps = { 'url': Var('chromium_url') + '/external/github.com/google/benchmark.git' + '@' + '344117638c8ff7e239044fd0fa7085839fc03021', }, 'third_party/fuzztest': - Var('chromium_url') + '/chromium/src/third_party/fuzztest.git' + '@' + 'daea7ab861050a6445f59758f09cc3173f5add76', + Var('chromium_url') + '/chromium/src/third_party/fuzztest.git' + '@' + '69fe98bf87d80fdc773481ae5180c63e431a13a1', 'third_party/fuzztest/src': - Var('chromium_url') + '/external/github.com/google/fuzztest.git' + '@' + 'bddcd9f77ba0a81a99ce50bcadf5149efe545df0', + Var('chromium_url') + '/external/github.com/google/fuzztest.git' + '@' + '32eb84a95951fa3a0148fb3e6a1a02f830ded136', 'third_party/googletest/src': - Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + 'b479e7a3c161d7087113a05f8cb034b870313a55', + Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + 'cee1ba1f24fb12b9ae8f31e70dca3f73dbb12cc2', + 'third_party/highway/src': + Var('chromium_url') + '/external/github.com/google/highway.git' + '@' + '8295336dd70f1201d42c22ab5b0861de38cf8fbf', 'third_party/icu': - Var('chromium_url') + '/chromium/deps/icu.git' + '@' + 'a622de35ac311c5ad390a7af80724634e5dc61ed', - 'third_party/instrumented_libraries': - Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + '0893d760101b3ddf9a2408b9d20f15ec2b80b2c1', + Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '9408c6fd4a39e6fef0e1c4077602e1c83b15f3fb', + 'third_party/instrumented_libs': { + 'url': Var('chromium_url') + '/chromium/third_party/instrumented_libraries.git' + '@' + 'bb6dbcf2df7a9beb34c3773ef4df161800e3aed9', + 'condition': 'checkout_instrumented_libraries', + }, 'third_party/ittapi': { # Force checkout ittapi libraries to pass v8 header includes check on # bots that has check_v8_header_includes enabled. @@ -294,35 +296,153 @@ deps = { 'condition': "checkout_ittapi or check_v8_header_includes", }, 'third_party/jinja2': - Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + 'c9c77525ea20c871a1d4658f8d312b51266d4bad', + Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + '2f6f2ff5e4c1d727377f5e1b9e1903d871f41e74', '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' + '@' + '80307e66e74bae927fb8709a549859e777e3bf0b', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '6bb75caa139ee1e686d2205910454cf6ea212e58', 'third_party/libc++abi/src': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + 'fc6253a642c9e336480b17fb17771e2c1efc7fff', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + 'a3c7d3e2f3e1e724b4651891b1a71257cbd88acc', 'third_party/libunwind/src': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + '8bad7bd6ec30f94bce82f7cb5b58ecbd6ce02996', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'd09db732ff68f40fd3581306c650b17ea1955b4e', + 'third_party/llvm-build/Release+Asserts': { + 'dep_type': 'gcs', + 'bucket': 'chromium-browser-clang', + 'objects': [ + { + 'object_name': 'Linux_x64/clang-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': '2c48fb44f408328f59482a1dafb2143bb8b6b04be23f407600117e6f6d4fa437', + 'size_bytes': 51489572, + 'generation': 1721105679311662, + 'condition': 'host_os == "linux"', + }, + { + 'object_name': 'Linux_x64/clang-tidy-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': '3570497c3c507be0f8f4c0aa149a57fc600ed49252da42676996ea651df05e60', + 'size_bytes': 13081104, + 'generation': 1721105679453016, + 'condition': 'host_os == "linux" and checkout_clang_tidy', + }, + { + 'object_name': 'Linux_x64/llvm-code-coverage-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': 'dd6f1c05d5fe244b4524af86e6aa20de2d730f7d7e01fe4002b5aa72347b7658', + 'size_bytes': 2357488, + 'generation': 1721105679795112, + 'condition': 'host_os == "linux" and checkout_clang_coverage_tools', + }, + { + 'object_name': 'Linux_x64/llvmobjdump-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': 'a93d8b39ac573376a2db77b04f014d8751375de8c70ee16ca4713e5da467c5ec', + 'size_bytes': 5387304, + 'generation': 1721105679641287, + 'condition': '(checkout_linux or checkout_mac or checkout_android and host_os != "mac")', + }, + { + 'object_name': 'Mac/clang-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': '04956a3db535f4cf1ab0a6e40383cbb5db7d6ee09721e31a706d230af206eaa0', + 'size_bytes': 46446976, + 'generation': 1721105680965575, + 'condition': 'host_os == "mac" and host_cpu == "x64"', + }, + { + 'object_name': 'Mac/clang-mac-runtime-library-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': 'c684d46962bd39f785a143c2b28a0400c6e6d41a610a04ad6982f7513b930a35', + 'size_bytes': 865444, + 'generation': 1721105687851327, + 'condition': 'checkout_mac and not host_os == "mac"', + }, + { + 'object_name': 'Mac/clang-tidy-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': '1bcfd396959c5f0e835e33f7bd15f29b2a1b1b27c619480dab767d034da48098', + 'size_bytes': 12650532, + 'generation': 1721105681146275, + 'condition': 'host_os == "mac" and host_cpu == "x64" and checkout_clang_tidy', + }, + { + 'object_name': 'Mac/llvm-code-coverage-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': 'dbaf0d0bc4d19be0a9bd033b94033a2e9f826f8ed4ec3e9e6fa732ca3b4f1b6f', + 'size_bytes': 2234200, + 'generation': 1721105681470376, + 'condition': 'host_os == "mac" and host_cpu == "x64" and checkout_clang_coverage_tools', + }, + { + 'object_name': 'Mac_arm64/clang-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': '3d8d0a32604b9c8f9add4865d4e2b4950607d2a201bcd1c3de9e67e2998f1a84', + 'size_bytes': 42076344, + 'generation': 1721105689042846, + 'condition': 'host_os == "mac" and host_cpu == "arm64"', + }, + { + 'object_name': 'Mac_arm64/clang-tidy-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': '12524e94777f1d78489f58bcd966a341c8a61dca56175c7d6e8835240b2dcade', + 'size_bytes': 11612984, + 'generation': 1721105689155910, + 'condition': 'host_os == "mac" and host_cpu == "arm64" and checkout_clang_tidy', + }, + { + 'object_name': 'Mac_arm64/llvm-code-coverage-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': '85db7e11d059902cd2c3d04e1d0380524d0ef4bf6ec3c93f0afdfd663d8b2a64', + 'size_bytes': 2005884, + 'generation': 1721105689448152, + 'condition': 'host_os == "mac" and host_cpu == "arm64" and checkout_clang_coverage_tools', + }, + { + 'object_name': 'Win/clang-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': '34ba04b75548fdce4b3d2ba9dc8320a11afb0cad8622d537c1cf37f1c5587bab', + 'size_bytes': 41800448, + 'generation': 1721105697679553, + 'condition': 'host_os == "win"', + }, + { + 'object_name': 'Win/clang-tidy-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': '41fe89c54964a6a8efb66c398dbf763e8a4aca6a675c6f4d15a94c5236ba1ab7', + 'size_bytes': 12869556, + 'generation': 1721105697770165, + 'condition': 'host_os == "win" and checkout_clang_tidy', + }, + { + 'object_name': 'Win/clang-win-runtime-library-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': 'ce7886ecbfb129660a14cc11c4eacd6a2ef6488b36a88a7afb71a8cd22277da0', + 'size_bytes': 2842872, + 'generation': 1721105704724295, + 'condition': 'checkout_win and not host_os == "win"', + }, + { + 'object_name': 'Win/llvm-code-coverage-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': 'e5778f9a2fa59936676579b01b3b576d8c545b72e5261c47a36751d4f1f6b61a', + 'size_bytes': 2357104, + 'generation': 1721105698068261, + 'condition': 'host_os == "win" and checkout_clang_coverage_tools', + }, + { + 'object_name': 'Win/llvmobjdump-llvmorg-19-init-14561-gecea8371-3.tar.xz', + 'sha256sum': 'ad7d9162e1632b5c64188f95362318f0d31e09002be0615df847f2c23cddef4c', + 'size_bytes': 5362484, + 'generation': 1721105697937832, + 'condition': 'checkout_linux or checkout_mac or checkout_android and host_os == "win"', + }, + ], + }, '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' + '@' + 'e582d7f0edb9d67499b0f5abd6ae5550e91da7f2', + Var('chromium_url') + '/chromium/src/third_party/markupsafe.git' + '@' + '6638e9b0a79afc2ff7edd9e84b518fe7d5d5fea9', 'third_party/ninja': { 'packages': [ { - 'package': 'infra/3pp/tools/ninja/${{platform}}', + 'package': 'infra/3pp/build_support/ninja-1_11_1/${{platform}}', 'version': Var('ninja_version'), } ], 'dep_type': 'cipd', - 'condition': 'host_cpu != "s390" and host_cpu != "ppc"' + 'condition': 'host_cpu != "s390" and host_os != "zos" and host_cpu != "ppc"' }, 'third_party/perfetto': Var('android_url') + '/platform/external/perfetto.git' + '@' + '6fc824d618d2f06b5d9cd8655ba0419b6b3b366e', - 'third_party/protobuf': - Var('chromium_url') + '/external/github.com/google/protobuf'+ '@' + '6a59a2ad1f61d9696092f79b6d74368b4d7970a3', + 'third_party/protobuf_chrome': + Var('chromium_url') + '/chromium/src/third_party/protobuf.git' + '@' + 'da2fe725b80ac0ba646fbf77d0ce5b4ac236f823', 'third_party/re2/src': - Var('chromium_url') + '/external/github.com/google/re2.git' + '@' + '108914d28a79243d4300e7e651cd0a0d5883ca0f', + Var('chromium_url') + '/external/github.com/google/re2.git' + '@' + '6dcd83d60f7944926bfd308cc13979fc53dd69ca', 'third_party/requests': { 'url': Var('chromium_url') + '/external/github.com/kennethreitz/requests.git' + '@' + 'c7e0fc087ceeadb8b4c84a0953a422c474093d6d', 'condition': 'checkout_android', @@ -335,12 +455,12 @@ deps = { } ], 'dep_type': 'cipd', - 'condition': 'not build_with_chromium and host_cpu != "s390" and host_cpu != "ppc"', + 'condition': 'not build_with_chromium and host_cpu != "s390" and host_os != "zos" and host_cpu != "ppc"', }, 'third_party/zlib': - Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + 'c5bf1b566e5df14e763507e2ce30cbfebefeeccf', + Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + 'c2469fdd73f192383d2d94288da0ff5b9a3869f5', 'tools/clang': - Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '1ed379eda880f53d895559815cd3e30b370abff5', + Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '4dc76da47b1145e53e508a23c1bf2204cf5ee7ee', 'tools/luci-go': { 'packages': [ { @@ -352,12 +472,18 @@ deps = { 'version': Var('luci_go'), }, ], - 'condition': 'host_cpu != "s390" and host_os != "aix"', + 'condition': 'host_cpu != "s390" and host_os != "zos" and host_os != "aix"', 'dep_type': 'cipd', }, + 'tools/protoc_wrapper': + Var('chromium_url') + '/chromium/src/tools/protoc_wrapper.git' + '@' + 'dbcbea90c20ae1ece442d8ef64e61c7b10e2b013', 'third_party/abseil-cpp': { - 'url': Var('chromium_url') + '/chromium/src/third_party/abseil-cpp.git' + '@' + 'b3ae305fd5dbc6ad41eed9add26768c29181219f', + 'url': Var('chromium_url') + '/chromium/src/third_party/abseil-cpp.git' + '@' + '9d1552f25c3d9e9114b7d7aed55790570a99bc4d', 'condition': 'not build_with_chromium', + }, + 'third_party/zoslib': { + 'url': Var('chromium_url') + '/external/github.com/ibmruntimes/zoslib.git' + '@' + '1e68de6e37efced3738a88536fccb6bbfe2d70b2', + 'condition': 'host_os == "zos"', } } @@ -456,57 +582,6 @@ hooks = [ '-o', 'tools/clang/dsymutil/bin/dsymutil', ], }, - # Pull clang-format binaries using checked-in hashes. - { - 'name': 'clang_format_win', - 'pattern': '.', - 'condition': 'host_os == "win"', - 'action': [ 'python3', - 'third_party/depot_tools/download_from_google_storage.py', - '--no_resume', - '--no_auth', - '--bucket', 'chromium-clang-format', - '-s', 'buildtools/win/clang-format.exe.sha1', - ], - }, - { - 'name': 'clang_format_mac_x64', - 'pattern': '.', - 'condition': 'host_os == "mac" and host_cpu == "x64"', - 'action': [ 'python3', - 'third_party/depot_tools/download_from_google_storage.py', - '--no_resume', - '--no_auth', - '--bucket', 'chromium-clang-format', - '-s', 'buildtools/mac/clang-format.x64.sha1', - '-o', 'buildtools/mac/clang-format', - ], - }, - { - 'name': 'clang_format_mac_arm64', - 'pattern': '.', - 'condition': 'host_os == "mac" and host_cpu == "arm64"', - 'action': [ 'python3', - 'third_party/depot_tools/download_from_google_storage.py', - '--no_resume', - '--no_auth', - '--bucket', 'chromium-clang-format', - '-s', 'buildtools/mac/clang-format.arm64.sha1', - '-o', 'buildtools/mac/clang-format', - ], - }, - { - 'name': 'clang_format_linux', - 'pattern': '.', - 'condition': 'host_os == "linux"', - 'action': [ 'python3', - 'third_party/depot_tools/download_from_google_storage.py', - '--no_resume', - '--no_auth', - '--bucket', 'chromium-clang-format', - '-s', 'buildtools/linux64/clang-format.sha1', - ], - }, { 'name': 'gcmole', 'pattern': '.', @@ -555,58 +630,6 @@ hooks = [ '-s', 'test/wasm-js/tests.tar.gz.sha1', ], }, - { - 'name': 'sysroot_arm', - 'pattern': '.', - 'condition': '(checkout_linux and checkout_arm)', - 'action': ['python3', 'build/linux/sysroot_scripts/install-sysroot.py', - '--arch=arm'], - }, - { - 'name': 'sysroot_arm64', - 'pattern': '.', - 'condition': '(checkout_linux and checkout_arm64)', - 'action': ['python3', 'build/linux/sysroot_scripts/install-sysroot.py', - '--arch=arm64'], - }, - { - 'name': 'sysroot_x86', - 'pattern': '.', - 'condition': '(checkout_linux and (checkout_x86 or checkout_x64))', - 'action': ['python3', 'build/linux/sysroot_scripts/install-sysroot.py', - '--arch=x86'], - }, - { - 'name': 'sysroot_x64', - 'pattern': '.', - 'condition': 'checkout_linux and checkout_x64', - 'action': ['python3', 'build/linux/sysroot_scripts/install-sysroot.py', - '--arch=x64'], - }, - { - 'name': 'msan_chained_origins_focal', - 'pattern': '.', - 'condition': 'checkout_instrumented_libraries', - 'action': [ 'python3', - 'third_party/depot_tools/download_from_google_storage.py', - '--no_resume', - '--no_auth', - '--bucket', 'chromium-instrumented-libraries', - '-s', 'third_party/instrumented_libraries/binaries/msan-chained-origins-focal.tgz.sha1', - ], - }, - { - 'name': 'msan_no_origins_focal', - 'pattern': '.', - 'condition': 'checkout_instrumented_libraries', - 'action': [ 'python3', - 'third_party/depot_tools/download_from_google_storage.py', - '--no_resume', - '--no_auth', - '--bucket', 'chromium-instrumented-libraries', - '-s', 'third_party/instrumented_libraries/binaries/msan-no-origins-focal.tgz.sha1', - ], - }, { # Case-insensitivity for the Win SDK. Must run before win_toolchain below. 'name': 'ciopfs_linux', @@ -634,29 +657,6 @@ hooks = [ 'condition': 'checkout_mac', 'action': ['python3', 'build/mac_toolchain.py'], }, - { - # Note: On Win, this should run after win_toolchain, as it may use it. - 'name': 'clang', - 'pattern': '.', - # clang not supported on aix - 'condition': 'host_os != "aix"', - 'action': ['python3', 'tools/clang/scripts/update.py'], - }, - { - # This is supposed to support the same set of platforms as 'clang' above. - 'name': 'clang_coverage', - 'pattern': '.', - 'condition': 'checkout_clang_coverage_tools', - 'action': ['python3', 'tools/clang/scripts/update.py', - '--package=coverage_tools'], - }, - { - 'name': 'clang_tidy', - 'pattern': '.', - 'condition': 'checkout_clang_tidy', - 'action': ['python3', 'tools/clang/scripts/update.py', - '--package=clang-tidy'], - }, { # Update LASTCHANGE. 'name': 'lastchange', @@ -718,6 +718,7 @@ hooks = [ 'python3', 'tools/builtins-pgo/download_profiles.py', 'download', + '--quiet', ], }, { @@ -773,3 +774,9 @@ hooks = [ ], }, ] + +recursedeps = [ + 'build', + 'buildtools', + 'third_party/instrumented_libs', +] diff --git a/deps/v8/ENG_REVIEW_OWNERS b/deps/v8/ENG_REVIEW_OWNERS index 7d582ec7d4016b..27a979ebaf9d9e 100644 --- a/deps/v8/ENG_REVIEW_OWNERS +++ b/deps/v8/ENG_REVIEW_OWNERS @@ -4,8 +4,10 @@ adamk@chromium.org danno@chromium.org +gdeepti@chromium.org hpayer@chromium.org leszeks@chromium.org mlippautz@chromium.org +syg@chromium.org verwaest@chromium.org vahl@chromium.org diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index 42cebdd65328f3..5318df8fc473a9 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -31,10 +31,12 @@ for more details about the presubmit API built into gcl. """ +import ast import json import os import re import sys +import traceback # This line is 'magic' in that git-cl looks for it to decide whether to # use Python3 instead of Python2 when running the code in this file. @@ -138,6 +140,27 @@ def FilterJSFile(affected_file): return results +def _CheckPythonLiterals(input_api, output_api): + """Checks that all .pyl files are valid python literals.""" + affected_files = [ + af for af in input_api.AffectedFiles() + if af.LocalPath().endswith('.pyl') + ] + + results = [] + for af in affected_files: + try: + ast.literal_eval('\n'.join(af.NewContents())) + except SyntaxError as e: + results.append(output_api.PresubmitError( + f'Failed to parse python literal {af.LocalPath()}:\n' + + traceback.format_exc(0) + )) + + return results + + + def _CheckUnwantedDependencies(input_api, output_api): """Runs checkdeps on #include statements added in this change. Breaking - rules is an error, breaking ! rules is a @@ -416,6 +439,7 @@ def _CommonChecks(input_api, output_api): _CheckJSONFiles, _CheckNoexceptAnnotations, _RunTestsWithVPythonSpec, + _CheckPythonLiterals, ] return sum([check(input_api, output_api) for check in checks], []) diff --git a/deps/v8/WATCHLISTS b/deps/v8/WATCHLISTS index d853a0de2a2e36..6850defb79dd1e 100644 --- a/deps/v8/WATCHLISTS +++ b/deps/v8/WATCHLISTS @@ -73,6 +73,9 @@ 'maglev': { 'filepath': 'src/maglev/', }, + 'compiler': { + 'filepath': 'src/compiler', + }, 'parser': { 'filepath': 'src/ast/' \ '|src/parsing/', @@ -104,9 +107,6 @@ 'trap-handler': { 'filepath': 'src/trap-handler/', }, - 'tests': { - 'filepath': 'test/', - }, }, 'WATCHLISTS': { @@ -115,6 +115,9 @@ 'verwaest+watch@chromium.org', 'victorgomes+watch@chromium.org', ], + 'compiler': [ + 'dmercadier+watch@chromium.org', + ], 'snapshot': [ 'jgruber+watch@chromium.org', ], @@ -180,8 +183,5 @@ 'mark@chromium.org', 'mseaborn@chromium.org', ], - 'tests': [ - 'almuthanna+watch@chromium.org', - ], }, } diff --git a/deps/v8/WORKSPACE b/deps/v8/WORKSPACE index 96ef24384ed084..8692e456b9a87f 100644 --- a/deps/v8/WORKSPACE +++ b/deps/v8/WORKSPACE @@ -70,17 +70,6 @@ bind( actual = "@com_googlesource_chromium_icu//:icu", ) -new_local_repository( - name = "com_googlesource_chromium_base_trace_event_common", - build_file = "//:bazel/BUILD.trace_event_common", - path = "base/trace_event/common", -) - -bind( - name = "base_trace_event_common", - actual = "@com_googlesource_chromium_base_trace_event_common//:trace_event_common", -) - http_archive( name = "intel_ittapi", add_prefix = "third_party/ittapi", diff --git a/deps/v8/bazel/BUILD.trace_event_common b/deps/v8/bazel/BUILD.trace_event_common deleted file mode 100644 index 685b284071946c..00000000000000 --- a/deps/v8/bazel/BUILD.trace_event_common +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright 2021 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -cc_library( - name = "trace_event_common", - hdrs = ["trace_event_common.h"], - include_prefix = "base/trace_event/common", - visibility = ["//visibility:public"], -) diff --git a/deps/v8/bazel/config/BUILD.bazel b/deps/v8/bazel/config/BUILD.bazel index 67454fa90eea46..c81f2782031269 100644 --- a/deps/v8/bazel/config/BUILD.bazel +++ b/deps/v8/bazel/config/BUILD.bazel @@ -201,14 +201,6 @@ selects.config_setting_group( ] ) -selects.config_setting_group( - name = "is_non_android_posix", - match_any = [ - ":is_linux", - ":is_macos", - ], -) - selects.config_setting_group( name = "is_posix_x64", match_all = [ @@ -217,14 +209,6 @@ selects.config_setting_group( ], ) -selects.config_setting_group( - name = "is_non_android_posix_x64", - match_all = [ - ":is_non_android_posix", - ":is_x64", - ], -) - selects.config_setting_group( name = "is_inline_asm_x64", match_all = [ @@ -305,14 +289,6 @@ selects.config_setting_group( ], ) -selects.config_setting_group( - name = "is_macos_arm64", - match_all = [ - ":is_macos", - ":is_arm64", - ], -) - config_setting( name = "is_compiler_default", flag_values = { diff --git a/deps/v8/bazel/defs.bzl b/deps/v8/bazel/defs.bzl index f23f48ef03ae6a..520a311595e488 100644 --- a/deps/v8/bazel/defs.bzl +++ b/deps/v8/bazel/defs.bzl @@ -109,7 +109,8 @@ def _default_args(): "-Werror", "-Wextra", "-Wno-unneeded-internal-declaration", - "-Wno-unknown-warning-option", + "-Wno-unknown-warning-option", # b/330781959 + "-Wno-cast-function-type-mismatch", # b/330781959 "-Wno-bitwise-instead-of-logical", "-Wno-builtin-assume-aligned-alignment", "-Wno-unused-parameter", @@ -122,7 +123,8 @@ def _default_args(): }) + select({ "@v8//bazel/config:is_clang": [ "-Wno-invalid-offsetof", - "-std=c++17", + "-Wno-deprecated-this-capture", + "-std=c++20", ], "@v8//bazel/config:is_gcc": [ "-Wno-extra", @@ -137,12 +139,13 @@ def _default_args(): "-Wno-redundant-move", "-Wno-return-type", "-Wno-stringop-overflow", + "-Wno-deprecated-this-capture", # Use GNU dialect, because GCC doesn't allow using # ##__VA_ARGS__ when in standards-conforming mode. - "-std=gnu++17", + "-std=gnu++2a", ], "@v8//bazel/config:is_windows": [ - "/std:c++17", + "/std:c++20", ], "//conditions:default": [], }) + select({ @@ -560,6 +563,7 @@ def build_config_content(cpu, icu): ("js_shared_memory", "false"), ("lite_mode", "false"), ("local_off_stack_check", "false"), + ("memory_corruption_api", "false"), ("mips_arch_variant", '""'), ("mips_use_msa", "false"), ("msan", "false"), @@ -589,8 +593,8 @@ def build_config_content(cpu, icu): # TODO(victorgomes): Create a rule (instead of a macro), that can # dynamically populate the build config. -def v8_build_config(name): - cpu = _quote("x64") +def v8_build_config(name, arch): + cpu = '"' + arch + '"' native.genrule( name = "noicu/" + name, outs = ["noicu/" + name + ".json"], diff --git a/deps/v8/bazel/v8-non-pointer-compression.bzl b/deps/v8/bazel/v8-non-pointer-compression.bzl index a9f73728301254..8c9294548406e0 100644 --- a/deps/v8/bazel/v8-non-pointer-compression.bzl +++ b/deps/v8/bazel/v8-non-pointer-compression.bzl @@ -3,7 +3,7 @@ Exposes the rule v8_binary_non_pointer_compression, which forces a label to be compiled without pointer compression. """ -def _v8_disable_pointer_compression(): +def _v8_disable_pointer_compression(settings, attr): return { "//:v8_enable_pointer_compression": "False", } diff --git a/deps/v8/build_overrides/build.gni b/deps/v8/build_overrides/build.gni index 32896733f83bf1..0a1fc3c46d23a6 100644 --- a/deps/v8/build_overrides/build.gni +++ b/deps/v8/build_overrides/build.gni @@ -17,11 +17,14 @@ build_with_node = false # chromium build. perfetto_build_with_embedder = true -# When embedding perfetto, its build files need to know in which BUILD.gn file -# the embedder (v8) declared the protobuf targets. In the v8 case they are -# declared in the root v8/BUILD.gn. -perfetto_protobuf_target_prefix = "//" -perfetto_protobuf_gni = "//gni/proto_library.gni" +# TODO(https://crbug.com/337736622): Perfetto and FuzzTest need to know the +# path to protobuf targets. V8 stores them in a different location than Chrome +# until M129. Thereafter, it can move to //third_party/protobuf and these +# variables can be removed. +protobuf_target_prefix = "//third_party/protobuf_chrome/" +perfetto_protobuf_target_prefix = protobuf_target_prefix +perfetto_protobuf_gni = "//third_party/protobuf_chrome/proto_library.gni" +perfetto_protobuf_src_dir = "//third_party/protobuf_chrome/src" # We use Perfetto's Trace Processor to convert traces to the legacy JSON # format. diff --git a/deps/v8/gni/proto_library.gni b/deps/v8/gni/proto_library.gni deleted file mode 100644 index a8690999f97710..00000000000000 --- a/deps/v8/gni/proto_library.gni +++ /dev/null @@ -1,282 +0,0 @@ -# Copyright 2019 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import("//build_overrides/build.gni") - -# This file should not be pulled in chromium builds. -assert(!build_with_chromium) - -if (host_os == "win") { - _host_executable_suffix = ".exe" -} else { - _host_executable_suffix = "" -} - -template("proto_library") { - assert(defined(invoker.sources)) - proto_sources = invoker.sources - - # All the proto imports should be relative to the project root. - proto_in_dir = "//" - if (defined(invoker.proto_in_dir)) { - proto_in_dir = invoker.proto_in_dir - } - assert(defined(invoker.proto_out_dir), - "proto_out_dir must be explicitly defined") - proto_out_dir = invoker.proto_out_dir - - # We don't support generate_python in the standalone build, but still must - # check that the caller sets this to false. This is because when building in - # the chromium tree, chromium's proto_library.gni in chrome (!= this) defaults - # generate_python = true. - assert(defined(invoker.generate_python) && !invoker.generate_python) - - import_dirs = [] - if (defined(invoker.import_dirs)) { - import_dirs = invoker.import_dirs - } - - # If false will not generate the default .pb.{cc,h} files. Used for custom - # codegen plugins. - generate_cc = true - if (defined(invoker.generate_cc)) { - generate_cc = invoker.generate_cc - } - - generate_descriptor = "" - if (defined(invoker.generate_descriptor)) { - generate_descriptor = invoker.generate_descriptor - } - - if (defined(invoker.generator_plugin_label)) { - plugin_host_label = invoker.generator_plugin_label + "($host_toolchain)" - plugin_path = - get_label_info(plugin_host_label, "root_out_dir") + "/" + - get_label_info(plugin_host_label, "name") + _host_executable_suffix - generate_with_plugin = true - } else if (defined(invoker.generator_plugin_script)) { - plugin_path = invoker.generator_plugin_script - generate_with_plugin = true - } else { - generate_with_plugin = false - } - - if (generate_with_plugin) { - if (defined(invoker.generator_plugin_suffix)) { - generator_plugin_suffixes = [ - "${invoker.generator_plugin_suffix}.h", - "${invoker.generator_plugin_suffix}.cc", - ] - } else { - generator_plugin_suffixes = invoker.generator_plugin_suffixes - } - } - - out_dir = "$root_gen_dir/" + proto_out_dir - rel_out_dir = rebase_path(out_dir, root_build_dir) - - # exclude_imports is only used for generating the descriptor. Therefore, the - # check needs to be here to avoid complaints from GN about the unused - # variable. - if (generate_descriptor != "") { - if (defined(invoker.exclude_imports)) { - exclude_imports = invoker.exclude_imports - } else { - exclude_imports = false - } - } - - # Prevent unused errors when generating descriptor only. - if (generate_descriptor != "") { - not_needed([ "rel_out_dir" ]) - } - - protos = rebase_path(proto_sources, proto_in_dir) - protogens = [] - - if (generate_descriptor != "") { - protogens += [ "$out_dir/${generate_descriptor}" ] - } - - foreach(proto, protos) { - proto_dir = get_path_info(proto, "dir") - proto_name = get_path_info(proto, "name") - proto_path = proto_dir + "/" + proto_name - - # Prevent unused errors when generating descriptor only. - if (generate_descriptor != "") { - not_needed([ "proto_path" ]) - } - - if (generate_cc) { - protogens += [ - "$out_dir/$proto_path.pb.h", - "$out_dir/$proto_path.pb.cc", - ] - } - if (generate_with_plugin) { - foreach(suffix, generator_plugin_suffixes) { - protogens += [ "$out_dir/${proto_path}${suffix}" ] - } - } - } - - config_name = "${target_name}_config" - if (generate_descriptor == "") { - action_name = "${target_name}_gen" - source_set_name = target_name - } else { - action_name = target_name - } - - config(config_name) { - include_dirs = [ out_dir ] - } - - # The XXX_gen action that generates the .pb.{cc,h} files. - action(action_name) { - if (generate_descriptor == "") { - visibility = [ ":$source_set_name" ] - } - sources = proto_sources - outputs = get_path_info(protogens, "abspath") - - protoc_label = "//:protoc($host_toolchain)" - protoc_path = get_label_info(protoc_label, "root_out_dir") + "/protoc" + - _host_executable_suffix - protoc_rebased_path = "./" + rebase_path(protoc_path, root_build_dir) - script = "//gni/protoc.py" - args = [ - # Path should be rebased because |root_build_dir| for current toolchain - # may be different from |root_out_dir| of protoc built on host toolchain. - protoc_rebased_path, - "--proto_path", - rebase_path(proto_in_dir, root_build_dir), - ] - - foreach(path, import_dirs) { - args += [ - "--proto_path", - rebase_path(path, root_build_dir), - ] - } - - if (generate_cc) { - cc_generator_options_ = "" - if (defined(invoker.cc_generator_options)) { - cc_generator_options_ = invoker.cc_generator_options - } - args += [ - "--cpp_out", - cc_generator_options_ + rel_out_dir, - ] - } - if (generate_descriptor != "") { - depfile = "$out_dir/$generate_descriptor.d" - if (!exclude_imports) { - args += [ "--include_imports" ] - } - args += [ - "--descriptor_set_out", - rebase_path("$out_dir/$generate_descriptor", root_build_dir), - "--dependency_out", - rebase_path(depfile, root_build_dir), - ] - } - - if (generate_with_plugin) { - plugin_path_rebased = rebase_path(plugin_path, root_build_dir) - plugin_out_args = "" - if (defined(invoker.generator_plugin_options)) { - plugin_out_args += invoker.generator_plugin_options - } - plugin_out_args += ":$rel_out_dir" - - args += [ - "--plugin=protoc-gen-plugin=$plugin_path_rebased", - "--plugin_out=$plugin_out_args", - ] - } - - args += rebase_path(proto_sources, root_build_dir) - - inputs = [ protoc_path ] - deps = [ protoc_label ] - - # TODO(hjd): Avoid adding to deps here this. - # When we generate BUILD files we need find the transitive proto, - # dependencies, so also add link_deps to actual deps so they show up - # in gn desc. - if (defined(invoker.link_deps)) { - deps += invoker.link_deps - } - if (generate_with_plugin) { - inputs += [ plugin_path ] - if (defined(plugin_host_label)) { - # Action depends on native generator plugin but for host toolchain only. - deps += [ plugin_host_label ] - } - } - - if (defined(invoker.deps)) { - deps += invoker.deps - } - } # action(action_name) - - # The source_set that builds the generated .pb.cc files. - if (generate_descriptor == "") { - source_set(source_set_name) { - forward_variables_from(invoker, - [ - "defines", - "include_dirs", - "public_configs", - "testonly", - "visibility", - ]) - - sources = get_target_outputs(":$action_name") - - if (defined(invoker.extra_configs)) { - configs += invoker.extra_configs - } - - if (!defined(invoker.public_configs)) { - public_configs = [] - } - - public_configs += [ - "//:protobuf_gen_config", - ":$config_name", - ] - - # By default, propagate the config for |include_dirs| to dependent - # targets, so that public imports can be resolved to corresponding header - # files. In some cases, the embedder target handles include directory - # propagation itself, e.g. via a common config. - propagate_imports_configs = !defined(invoker.propagate_imports_configs) || - invoker.propagate_imports_configs - if (propagate_imports_configs) { - public_configs += [ ":$config_name" ] - } else { - configs += [ ":$config_name" ] - } - - # Use protobuf_full only for tests. - if (defined(invoker.use_protobuf_full) && - invoker.use_protobuf_full == true) { - deps = [ "//:protobuf_full" ] - } else if (generate_cc) { - deps = [ "//:protobuf_lite" ] - } else { - deps = [] - } - - deps += [ ":$action_name" ] - if (defined(invoker.deps)) { - deps += invoker.deps - } - } # source_set(source_set_name) - } -} # template diff --git a/deps/v8/gni/protoc.py b/deps/v8/gni/protoc.py deleted file mode 100755 index d529d1c65a536b..00000000000000 --- a/deps/v8/gni/protoc.py +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env python3 -# Copyright 2021 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -"""Script to wrap protoc execution. - -This script exists to work-around the bad depfile generation by protoc when -generating descriptors.""" - -from __future__ import print_function -import argparse -import os -import sys -import subprocess -import tempfile -import uuid - -from codecs import open - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument('--descriptor_set_out', default=None) - parser.add_argument('--dependency_out', default=None) - parser.add_argument('protoc') - args, remaining = parser.parse_known_args() - - if args.dependency_out and args.descriptor_set_out: - tmp_path = os.path.join(tempfile.gettempdir(), str(uuid.uuid4())) - custom = [ - '--descriptor_set_out', args.descriptor_set_out, '--dependency_out', - tmp_path - ] - try: - cmd = [args.protoc] + custom + remaining - subprocess.check_call(cmd) - with open(tmp_path, 'rb') as tmp_rd: - dependency_data = tmp_rd.read().decode('utf-8') - finally: - if os.path.exists(tmp_path): - os.unlink(tmp_path) - - with open(args.dependency_out, 'w', encoding='utf-8') as f: - f.write(args.descriptor_set_out + ":") - f.write(dependency_data) - else: - subprocess.check_call(sys.argv[1:]) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index 7c4e3ba5c34af2..9ee57a49806c1b 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni") import("//build/config/compiler/pgo/pgo.gni") import("//build/config/gclient_args.gni") import("//build/config/ios/config.gni") +import("//build/config/ios/ios_sdk_overrides.gni") import("//build/config/sanitizers/sanitizers.gni") import("//build/config/v8_target_cpu.gni") import("//build_overrides/build.gni") @@ -39,6 +40,10 @@ declare_args() { # Includes profiles to optimize builtins. v8_enable_builtins_optimization = "" + # Turns on all V8 debug features. Enables running V8 in a pseudo debug mode + # within a release Chrome. + v8_enable_debugging_features = is_debug + # Enable ECMAScript Internationalization API. Enabling this feature will # add a dependency on the ICU library. v8_enable_i18n_support = true @@ -70,6 +75,14 @@ declare_args() { # Sets -DV8_LITE_MODE. v8_enable_lite_mode = false + # iOS executable code pages is in 17.4 SDK. We + # use target_os == "ios" here because it isn't equivalent + # to is_ios (is_ios is based on host_os). + if (target_os == "ios") { + # TODO(dtapuska): Change this to an assert. + v8_enable_lite_mode = ios_deployment_target != "17.4" + } + # Enable the Turbofan compiler. # Sets -dV8_ENABLE_TURBOFAN. v8_enable_turbofan = "" @@ -138,7 +151,7 @@ declare_args() { cppgc_enable_2gb_cage = false # Enable support for larger cages, up to 16GB. - cppgc_enable_larger_cage = false + cppgc_enable_larger_cage = true # Enable advanced BigInt algorithms, costing about 10-30 KB binary size # depending on platform. Disabled on Android to save binary size. @@ -147,11 +160,6 @@ declare_args() { # TODO: macros for determining endian type are clang specific. v8_use_libm_trig_functions = is_clang - # iOS device does not support executable code pages. Not we - # use target_os == "ios" here because it isn't equivalent - # to is_ios (is_ios is based on host_os). - target_is_ios_device = target_os == "ios" && target_environment == "device" - # Location of icu. v8_icu_path = "//third_party/icu" @@ -176,9 +184,9 @@ if (v8_enable_backtrace == "") { v8_enable_backtrace = is_debug && !v8_optimized_debug } -# If chromium is configured to use the perfetto client library, v8 should also +# Chromium is configured to use the perfetto client library, v8 should also # use perfetto for tracing. -if (build_with_chromium && use_perfetto_client_library) { +if (build_with_chromium) { v8_use_perfetto = true } @@ -196,18 +204,14 @@ if (v8_enable_builtins_optimization == "") { # v8_jitless. # WebAssembly is enabled by default, except in lite mode. if (v8_enable_webassembly == "") { - # iOS (non-simulator) does not have executable pages for 3rd party - # applications yet so disable webassembly. - v8_enable_webassembly = !v8_enable_lite_mode && !target_is_ios_device + v8_enable_webassembly = !v8_enable_lite_mode } assert(!(v8_enable_webassembly && v8_enable_lite_mode), "Webassembly is not available in lite mode.") # Turbofan is enabled by default, except in lite mode. if (v8_enable_turbofan == "") { - # iOS (non-simulator) does not have executable pages for 3rd party - # applications yet so disable turbofan. - v8_enable_turbofan = !v8_enable_lite_mode && !target_is_ios_device + v8_enable_turbofan = !v8_enable_lite_mode } assert(v8_enable_turbofan || !v8_enable_webassembly, "Webassembly is not available when Turbofan is disabled.") diff --git a/deps/v8/include/cppgc/allocation.h b/deps/v8/include/cppgc/allocation.h index 69883fb34d1e46..cdd3fd48f1fae6 100644 --- a/deps/v8/include/cppgc/allocation.h +++ b/deps/v8/include/cppgc/allocation.h @@ -47,7 +47,7 @@ namespace internal { // Similar to C++17 std::align_val_t; enum class AlignVal : size_t {}; -class V8_EXPORT MakeGarbageCollectedTraitInternal { +class MakeGarbageCollectedTraitInternal { protected: static inline void MarkObjectAsFullyConstructed(const void* payload) { // See api_constants for an explanation of the constants. @@ -121,16 +121,15 @@ class V8_EXPORT MakeGarbageCollectedTraitInternal { }; private: - static void* CPPGC_DEFAULT_ALIGNED Allocate(cppgc::AllocationHandle&, size_t, - GCInfoIndex); - static void* CPPGC_DOUBLE_WORD_ALIGNED Allocate(cppgc::AllocationHandle&, - size_t, AlignVal, - GCInfoIndex); - static void* CPPGC_DEFAULT_ALIGNED Allocate(cppgc::AllocationHandle&, size_t, - GCInfoIndex, CustomSpaceIndex); - static void* CPPGC_DOUBLE_WORD_ALIGNED Allocate(cppgc::AllocationHandle&, - size_t, AlignVal, GCInfoIndex, - CustomSpaceIndex); + V8_EXPORT static void* CPPGC_DEFAULT_ALIGNED + Allocate(cppgc::AllocationHandle&, size_t, GCInfoIndex); + V8_EXPORT static void* CPPGC_DOUBLE_WORD_ALIGNED + Allocate(cppgc::AllocationHandle&, size_t, AlignVal, GCInfoIndex); + V8_EXPORT static void* CPPGC_DEFAULT_ALIGNED + Allocate(cppgc::AllocationHandle&, size_t, GCInfoIndex, CustomSpaceIndex); + V8_EXPORT static void* CPPGC_DOUBLE_WORD_ALIGNED + Allocate(cppgc::AllocationHandle&, size_t, AlignVal, GCInfoIndex, + CustomSpaceIndex); friend class HeapObjectHeader; }; diff --git a/deps/v8/include/cppgc/heap-statistics.h b/deps/v8/include/cppgc/heap-statistics.h index 5e389874099426..c357f916f16a5b 100644 --- a/deps/v8/include/cppgc/heap-statistics.h +++ b/deps/v8/include/cppgc/heap-statistics.h @@ -102,6 +102,8 @@ struct HeapStatistics final { size_t resident_size_bytes = 0; /** Amount of memory actually used on the heap. */ size_t used_size_bytes = 0; + /** Memory retained in the page pool, not used directly by the heap. */ + size_t pooled_memory_size_bytes = 0; /** Detail level of this HeapStatistics. */ DetailLevel detail_level; diff --git a/deps/v8/include/cppgc/internal/api-constants.h b/deps/v8/include/cppgc/internal/api-constants.h index fed7005b46089b..8a0bb082fb9b20 100644 --- a/deps/v8/include/cppgc/internal/api-constants.h +++ b/deps/v8/include/cppgc/internal/api-constants.h @@ -30,10 +30,15 @@ static constexpr size_t kFullyConstructedBitFieldOffsetFromPayload = // Mask for in-construction bit. static constexpr uint16_t kFullyConstructedBitMask = uint16_t{1}; -static constexpr size_t kPageSize = size_t{1} << 17; +static constexpr size_t kPageSizeBits = 17; +static constexpr size_t kPageSize = size_t{1} << kPageSizeBits; #if defined(V8_HOST_ARCH_ARM64) && defined(V8_OS_DARWIN) constexpr size_t kGuardPageSize = 0; +#elif defined(V8_HOST_ARCH_PPC64) +constexpr size_t kGuardPageSize = 0; +#elif defined(V8_HOST_ARCH_LOONG64) || defined(V8_HOST_ARCH_MIPS64) +constexpr size_t kGuardPageSize = 0; #else constexpr size_t kGuardPageSize = 4096; #endif diff --git a/deps/v8/include/cppgc/internal/gc-info.h b/deps/v8/include/cppgc/internal/gc-info.h index c8cb99acbc0fde..d52710b369dc28 100644 --- a/deps/v8/include/cppgc/internal/gc-info.h +++ b/deps/v8/include/cppgc/internal/gc-info.h @@ -94,12 +94,11 @@ struct GCInfoTrait final { return index; } - static constexpr bool CheckCallbacksAreDefined() { + static constexpr void CheckCallbacksAreDefined() { // No USE() macro available. (void)static_cast(TraceTrait::Trace); (void)static_cast(FinalizerTrait::kCallback); (void)static_cast(NameTrait::GetName); - return true; } }; @@ -127,19 +126,22 @@ struct GCInfoFolding final { // configuration. Only a single GCInfo (for `ResultType` below) will actually // be instantiated but existence (and well-formedness) of all callbacks is // checked. - static constexpr bool kCheckTypeGuardAlwaysTrue = - GCInfoTrait::CheckCallbacksAreDefined() && + static constexpr bool WantToFold() { + if constexpr ((kHasVirtualDestructorAtBase || + kBothTypesAreTriviallyDestructible || + kHasCustomFinalizerDispatchAtBase) && + !kWantsDetailedObjectNames) { + GCInfoTrait::CheckCallbacksAreDefined(); GCInfoTrait::CheckCallbacksAreDefined(); + return true; + } + return false; + } // Folding would regress name resolution when deriving names from C++ // class names as it would just folds a name to the base class name. using ResultType = - std::conditional_t; + std::conditional_t; }; } // namespace internal diff --git a/deps/v8/include/cppgc/internal/member-storage.h b/deps/v8/include/cppgc/internal/member-storage.h index 61b255ba637a92..2b5bfec4ed5cc1 100644 --- a/deps/v8/include/cppgc/internal/member-storage.h +++ b/deps/v8/include/cppgc/internal/member-storage.h @@ -158,6 +158,12 @@ class V8_TRIVIAL_ABI CompressedPointer final { static V8_INLINE void* Decompress(IntegralType ptr) { CPPGC_DCHECK(CageBaseGlobal::IsSet()); const uintptr_t base = CageBaseGlobal::Get(); + return Decompress(ptr, base); + } + + static V8_INLINE void* Decompress(IntegralType ptr, uintptr_t base) { + CPPGC_DCHECK(CageBaseGlobal::IsSet()); + CPPGC_DCHECK(base == CageBaseGlobal::Get()); // Treat compressed pointer as signed and cast it to uint64_t, which will // sign-extend it. #if defined(CPPGC_2GB_CAGE) diff --git a/deps/v8/include/cppgc/internal/name-trait.h b/deps/v8/include/cppgc/internal/name-trait.h index 1d927a9d0a962c..6be298557df44b 100644 --- a/deps/v8/include/cppgc/internal/name-trait.h +++ b/deps/v8/include/cppgc/internal/name-trait.h @@ -121,7 +121,11 @@ class NameTrait final : public NameTraitBase { #undef PRETTY_FUNCTION_VALUE #else // !CPPGC_SUPPORTS_OBJECT_NAMES - return {NameProvider::kHiddenName, true}; + // We wanted to use a class name but were unable to provide one due to + // compiler limitations or build configuration. As such, return the hidden + // name with name_was_hidden=false, which will cause this object to be + // visible in the snapshot. + return {NameProvider::kHiddenName, false}; #endif // !CPPGC_SUPPORTS_OBJECT_NAMES } }; diff --git a/deps/v8/include/cppgc/name-provider.h b/deps/v8/include/cppgc/name-provider.h index 216f6098d99dd1..ec512441472d47 100644 --- a/deps/v8/include/cppgc/name-provider.h +++ b/deps/v8/include/cppgc/name-provider.h @@ -55,6 +55,13 @@ class V8_EXPORT NameProvider { * Specifies a name for the garbage-collected object. Such names will never * be hidden, as they are explicitly specified by the user of this API. * + * V8 may call this function while generating a heap snapshot or at other + * times. If V8 is currently generating a heap snapshot (according to + * HeapProfiler::IsTakingSnapshot), then the returned string must stay alive + * until the snapshot generation has completed. Otherwise, the returned string + * must stay alive forever. If you need a place to store a temporary string + * during snapshot generation, use HeapProfiler::CopyNameForHeapSnapshot. + * * @returns a human readable name for the object. */ virtual const char* GetHumanReadableName() const = 0; diff --git a/deps/v8/include/v8-array-buffer.h b/deps/v8/include/v8-array-buffer.h index ea6f5b5571a476..0a3d8170f68214 100644 --- a/deps/v8/include/v8-array-buffer.h +++ b/deps/v8/include/v8-array-buffer.h @@ -18,11 +18,12 @@ namespace v8 { class SharedArrayBuffer; #ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT -// The number of required internal fields can be defined by embedder. +// Defined using gn arg `v8_array_buffer_internal_field_count`. #define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2 #endif enum class ArrayBufferCreationMode { kInternalized, kExternalized }; +enum class BackingStoreInitializationMode { kZeroInitialized, kUninitialized }; /** * A wrapper around the backing store (i.e. the raw memory) of an array buffer. @@ -87,6 +88,9 @@ class V8_EXPORT BackingStore : public v8::internal::BackingStoreBase { * Assumes that the backing_store was allocated by the ArrayBuffer allocator * of the given isolate. */ + V8_DEPRECATED( + "Reallocate is unsafe, please do not use. Please allocate a new " + "BackingStore and copy instead.") static std::unique_ptr Reallocate( v8::Isolate* isolate, std::unique_ptr backing_store, size_t byte_length); @@ -179,6 +183,9 @@ class V8_EXPORT ArrayBuffer : public Object { * * The default implementation allocates a new block and copies data. */ + V8_DEPRECATED( + "Reallocate is unsafe, please do not use. Please allocate new memory " + "and copy instead.") virtual void* Reallocate(void* data, size_t old_length, size_t new_length); /** @@ -211,12 +218,15 @@ class V8_EXPORT ArrayBuffer : public Object { size_t MaxByteLength() const; /** - * Create a new ArrayBuffer. Allocate |byte_length| bytes. - * Allocated memory will be owned by a created ArrayBuffer and - * will be deallocated when it is garbage-collected, + * Create a new ArrayBuffer. Allocate |byte_length| bytes, which are either + * zero-initialized or uninitialized. Allocated memory will be owned by a + * created ArrayBuffer and will be deallocated when it is garbage-collected, * unless the object is externalized. */ - static Local New(Isolate* isolate, size_t byte_length); + static Local New( + Isolate* isolate, size_t byte_length, + BackingStoreInitializationMode initialization_mode = + BackingStoreInitializationMode::kZeroInitialized); /** * Create a new ArrayBuffer with an existing backing store. @@ -235,15 +245,18 @@ class V8_EXPORT ArrayBuffer : public Object { /** * Returns a new standalone BackingStore that is allocated using the array - * buffer allocator of the isolate. The result can be later passed to + * buffer allocator of the isolate. The allocation can either be zero + * intialized, or uninitialized. The result can be later passed to * ArrayBuffer::New. * * If the allocator returns nullptr, then the function may cause GCs in the * given isolate and re-try the allocation. If GCs do not help, then the * function will crash with an out-of-memory error. */ - static std::unique_ptr NewBackingStore(Isolate* isolate, - size_t byte_length); + static std::unique_ptr NewBackingStore( + Isolate* isolate, size_t byte_length, + BackingStoreInitializationMode initialization_mode = + BackingStoreInitializationMode::kZeroInitialized); /** * Returns a new standalone BackingStore that takes over the ownership of * the given buffer. The destructor of the BackingStore invokes the given @@ -287,7 +300,7 @@ class V8_EXPORT ArrayBuffer : public Object { * preventing JavaScript from ever accessing underlying backing store. * ArrayBuffer should have been externalized and must be detachable. */ - V8_DEPRECATE_SOON( + V8_DEPRECATED( "Use the version which takes a key parameter (passing a null handle is " "ok).") void Detach(); @@ -337,8 +350,9 @@ class V8_EXPORT ArrayBuffer : public Object { return static_cast(value); } - static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; - static const int kEmbedderFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; + static constexpr int kInternalFieldCount = + V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; + static constexpr int kEmbedderFieldCount = kInternalFieldCount; private: ArrayBuffer(); @@ -346,7 +360,7 @@ class V8_EXPORT ArrayBuffer : public Object { }; #ifndef V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT -// The number of required internal fields can be defined by embedder. +// Defined using gn arg `v8_array_buffer_view_internal_field_count`. #define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT 2 #endif @@ -393,10 +407,9 @@ class V8_EXPORT ArrayBufferView : public Object { return static_cast(value); } - static const int kInternalFieldCount = - V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT; - static const int kEmbedderFieldCount = + static constexpr int kInternalFieldCount = V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT; + static const int kEmbedderFieldCount = kInternalFieldCount; private: ArrayBufferView(); @@ -440,12 +453,15 @@ class V8_EXPORT SharedArrayBuffer : public Object { size_t MaxByteLength() const; /** - * Create a new SharedArrayBuffer. Allocate |byte_length| bytes. - * Allocated memory will be owned by a created SharedArrayBuffer and - * will be deallocated when it is garbage-collected, - * unless the object is externalized. + * Create a new SharedArrayBuffer. Allocate |byte_length| bytes, which are + * either zero-initialized or uninitialized. Allocated memory will be owned by + * a created SharedArrayBuffer and will be deallocated when it is + * garbage-collected, unless the object is externalized. */ - static Local New(Isolate* isolate, size_t byte_length); + static Local New( + Isolate* isolate, size_t byte_length, + BackingStoreInitializationMode initialization_mode = + BackingStoreInitializationMode::kZeroInitialized); /** * Create a new SharedArrayBuffer with an existing backing store. @@ -464,15 +480,18 @@ class V8_EXPORT SharedArrayBuffer : public Object { /** * Returns a new standalone BackingStore that is allocated using the array - * buffer allocator of the isolate. The result can be later passed to + * buffer allocator of the isolate. The allocation can either be zero + * intialized, or uninitialized. The result can be later passed to * SharedArrayBuffer::New. * * If the allocator returns nullptr, then the function may cause GCs in the * given isolate and re-try the allocation. If GCs do not help, then the * function will crash with an out-of-memory error. */ - static std::unique_ptr NewBackingStore(Isolate* isolate, - size_t byte_length); + static std::unique_ptr NewBackingStore( + Isolate* isolate, size_t byte_length, + BackingStoreInitializationMode initialization_mode = + BackingStoreInitializationMode::kZeroInitialized); /** * Returns a new standalone BackingStore that takes over the ownership of * the given buffer. The destructor of the BackingStore invokes the given @@ -506,7 +525,8 @@ class V8_EXPORT SharedArrayBuffer : public Object { return static_cast(value); } - static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; + static constexpr int kInternalFieldCount = + V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; private: SharedArrayBuffer(); diff --git a/deps/v8/include/v8-callbacks.h b/deps/v8/include/v8-callbacks.h index 4f5e716f8147a2..6096301258719e 100644 --- a/deps/v8/include/v8-callbacks.h +++ b/deps/v8/include/v8-callbacks.h @@ -152,9 +152,6 @@ using JitCodeEventHandler = void (*)(const JitCodeEvent* event); enum GCType { kGCTypeScavenge = 1 << 0, kGCTypeMinorMarkSweep = 1 << 1, - kGCTypeMinorMarkCompact V8_DEPRECATE_SOON( - "Use kGCTypeMinorMarkSweep instead of kGCTypeMinorMarkCompact.") = - kGCTypeMinorMarkSweep, kGCTypeMarkSweepCompact = 1 << 2, kGCTypeIncrementalMarking = 1 << 3, kGCTypeProcessWeakCallbacks = 1 << 4, @@ -234,7 +231,7 @@ using MessageCallback = void (*)(Local message, Local data); // --- Tracing --- -enum LogEventStatus : int { kStart = 0, kEnd = 1, kStamp = 2 }; +enum LogEventStatus : int { kStart = 0, kEnd = 1, kLog = 2 }; using LogEventCallback = void (*)(const char* name, int /* LogEventStatus */ status); @@ -341,6 +338,14 @@ using JavaScriptCompileHintsMagicEnabledCallback = // --- Callback for checking if WebAssembly JSPI is enabled --- using WasmJSPIEnabledCallback = bool (*)(Local context); +/** + * Import phases in import requests. + */ +enum class ModuleImportPhase { + kSource, + kEvaluation, +}; + /** * HostImportModuleDynamicallyCallback is called when we * require the embedder to load a module. This is used as part of the dynamic diff --git a/deps/v8/include/v8-context.h b/deps/v8/include/v8-context.h index 4849c925806f95..f432ff67f7053a 100644 --- a/deps/v8/include/v8-context.h +++ b/deps/v8/include/v8-context.h @@ -107,6 +107,10 @@ class V8_EXPORT Context : public Data { * configured if the default context snapshot contains no pointer embedder * data, or if no custom startup snapshot is configured in the * v8::CreateParams used to create the isolate. + * + * \param api_wrapper_deserializer An optional callback used to deserialize + * API wrapper objects that was initially set with v8::Object::Wrap() and then + * serialized using SerializeAPIWrapperCallback. */ static Local New( Isolate* isolate, ExtensionConfiguration* extensions = nullptr, @@ -116,17 +120,19 @@ class V8_EXPORT Context : public Data { DeserializeInternalFieldsCallback(), MicrotaskQueue* microtask_queue = nullptr, DeserializeContextDataCallback context_data_deserializer = - DeserializeContextDataCallback()); + DeserializeContextDataCallback(), + DeserializeAPIWrapperCallback api_wrapper_deserializer = + DeserializeAPIWrapperCallback()); /** * Create a new context from a (non-default) context snapshot. There * is no way to provide a global object template since we do not create * a new global object from template, but we can reuse a global object. * - * \param isolate See v8::Context::New. + * \param isolate See v8::Context::New(). * * \param context_snapshot_index The index of the context snapshot to - * deserialize from. Use v8::Context::New for the default snapshot. + * deserialize from. Use v8::Context::New() for the default snapshot. * * \param internal_fields_deserializer An optional callback used * to deserialize fields set by @@ -136,19 +142,23 @@ class V8_EXPORT Context : public Data { * pointer fields in the default context snapshot or if no startup * snapshot is configured when the isolate is created. * - * \param extensions See v8::Context::New. + * \param extensions See v8::Context::New(). * - * \param global_object See v8::Context::New. + * \param global_object See v8::Context::New(). * * \param internal_fields_deserializer Similar to - * internal_fields_deserializer in v8::Context::New but applies to + * internal_fields_deserializer in v8::Context::New() but applies to * the context specified by the context_snapshot_index. * - * \param microtask_queue See v8::Context::New. + * \param microtask_queue See v8::Context::New(). * * \param context_data_deserializer Similar to - * context_data_deserializer in v8::Context::New but applies to + * context_data_deserializer in v8::Context::New() but applies to * the context specified by the context_snapshot_index. + * + *\param api_wrapper_deserializer Similar to api_wrapper_deserializer in + * v8::Context::New() but applies to the context specified by the + * context_snapshot_index. */ static MaybeLocal FromSnapshot( Isolate* isolate, size_t context_snapshot_index, @@ -158,7 +168,9 @@ class V8_EXPORT Context : public Data { MaybeLocal global_object = MaybeLocal(), MicrotaskQueue* microtask_queue = nullptr, DeserializeContextDataCallback context_data_deserializer = - DeserializeContextDataCallback()); + DeserializeContextDataCallback(), + DeserializeAPIWrapperCallback api_wrapper_deserializer = + DeserializeAPIWrapperCallback()); /** * Returns an global object that isn't backed by an actual context. @@ -290,6 +302,8 @@ class V8_EXPORT Context : public Data { * SetAlignedPointerInEmbedderData with the same index. Note that index 0 * currently has a special meaning for Chrome's debugger. */ + V8_INLINE void* GetAlignedPointerFromEmbedderData(Isolate* isolate, + int index); V8_INLINE void* GetAlignedPointerFromEmbedderData(int index); /** @@ -444,6 +458,24 @@ Local Context::GetEmbedderData(int index) { #endif } +void* Context::GetAlignedPointerFromEmbedderData(Isolate* isolate, int index) { +#if !defined(V8_ENABLE_CHECKS) + using A = internal::Address; + using I = internal::Internals; + A ctx = internal::ValueHelper::ValueAsAddress(this); + A embedder_data = + I::ReadTaggedPointerField(ctx, I::kNativeContextEmbedderDataOffset); + int value_offset = I::kEmbedderDataArrayHeaderSize + + (I::kEmbedderDataSlotSize * index) + + I::kEmbedderDataSlotExternalPointerOffset; + return reinterpret_cast( + I::ReadExternalPointerField( + isolate, embedder_data, value_offset)); +#else + return SlowGetAlignedPointerFromEmbedderData(index); +#endif +} + void* Context::GetAlignedPointerFromEmbedderData(int index) { #if !defined(V8_ENABLE_CHECKS) using A = internal::Address; diff --git a/deps/v8/include/v8-cppgc.h b/deps/v8/include/v8-cppgc.h index e0d76f45016e87..6ebae86c97f3b5 100644 --- a/deps/v8/include/v8-cppgc.h +++ b/deps/v8/include/v8-cppgc.h @@ -32,62 +32,15 @@ class CppHeap; class CustomSpaceStatisticsReceiver; -/** - * Describes how V8 wrapper objects maintain references to garbage-collected C++ - * objects. - */ -struct WrapperDescriptor final { - /** - * The index used on `v8::Ojbect::SetAlignedPointerFromInternalField()` and - * related APIs to add additional data to an object which is used to identify - * JS->C++ references. - */ - using InternalFieldIndex = int; - - /** - * Unknown embedder id. The value is reserved for internal usages and must not - * be used with `CppHeap`. - */ - static constexpr uint16_t kUnknownEmbedderId = UINT16_MAX; - - constexpr WrapperDescriptor(InternalFieldIndex wrappable_type_index, - InternalFieldIndex wrappable_instance_index, - uint16_t embedder_id_for_garbage_collected) - : wrappable_type_index(wrappable_type_index), - wrappable_instance_index(wrappable_instance_index), - embedder_id_for_garbage_collected(embedder_id_for_garbage_collected) {} - - /** - * Index of the wrappable type. - */ - InternalFieldIndex wrappable_type_index; - - /** - * Index of the wrappable instance. - */ - InternalFieldIndex wrappable_instance_index; - - /** - * Embedder id identifying instances of garbage-collected objects. It is - * expected that the first field of the wrappable type is a uint16_t holding - * the id. Only references to instances of wrappables types with an id of - * `embedder_id_for_garbage_collected` will be considered by CppHeap. - */ - uint16_t embedder_id_for_garbage_collected; -}; - struct V8_EXPORT CppHeapCreateParams { - CppHeapCreateParams( - std::vector> custom_spaces, - WrapperDescriptor wrapper_descriptor) - : custom_spaces(std::move(custom_spaces)), - wrapper_descriptor(wrapper_descriptor) {} + explicit CppHeapCreateParams( + std::vector> custom_spaces) + : custom_spaces(std::move(custom_spaces)) {} CppHeapCreateParams(const CppHeapCreateParams&) = delete; CppHeapCreateParams& operator=(const CppHeapCreateParams&) = delete; std::vector> custom_spaces; - WrapperDescriptor wrapper_descriptor; /** * Specifies which kind of marking are supported by the heap. The type may be * further reduced via runtime flags when attaching the heap to an Isolate. @@ -177,11 +130,6 @@ class V8_EXPORT CppHeap { void CollectGarbageInYoungGenerationForTesting( cppgc::EmbedderStackState stack_state); - /** - * \returns the wrapper descriptor of this CppHeap. - */ - v8::WrapperDescriptor wrapper_descriptor() const; - private: CppHeap() = default; diff --git a/deps/v8/include/v8-date.h b/deps/v8/include/v8-date.h index 8d82ccc9ea60bb..5c3cbd91c75afd 100644 --- a/deps/v8/include/v8-date.h +++ b/deps/v8/include/v8-date.h @@ -21,6 +21,10 @@ class V8_EXPORT Date : public Object { static V8_WARN_UNUSED_RESULT MaybeLocal New(Local context, double time); + static V8_WARN_UNUSED_RESULT MaybeLocal Parse( + Local context, + Local date_string); + /** * A specialization of Value::NumberValue that is more efficient * because we know the structure of this object. @@ -32,6 +36,11 @@ class V8_EXPORT Date : public Object { */ v8::Local ToISOString() const; + /** + * Generates UTC string representation. + */ + v8::Local ToUTCString() const; + V8_INLINE static Date* Cast(Value* value) { #ifdef V8_ENABLE_CHECKS CheckCast(value); diff --git a/deps/v8/include/v8-embedder-heap.h b/deps/v8/include/v8-embedder-heap.h index 236e1c1e94385c..7cc9aa0e637b75 100644 --- a/deps/v8/include/v8-embedder-heap.h +++ b/deps/v8/include/v8-embedder-heap.h @@ -29,6 +29,8 @@ class V8_EXPORT EmbedderRootsHandler { virtual ~EmbedderRootsHandler() = default; EmbedderRootsHandler() = default; + + V8_DEPRECATED("Use the default constructor instead.") explicit EmbedderRootsHandler(RootHandling default_traced_reference_handling) : default_traced_reference_handling_(default_traced_reference_handling) {} @@ -47,6 +49,7 @@ class V8_EXPORT EmbedderRootsHandler { * * The concrete implementations must be thread-safe. */ + V8_DEPRECATED("Use TracedReferenceHandling::kDroppable instead.") virtual bool IsRoot(const v8::TracedReference& handle) = 0; /** @@ -72,7 +75,7 @@ class V8_EXPORT EmbedderRootsHandler { private: const RootHandling default_traced_reference_handling_ = - RootHandling::kQueryEmbedderForNonDroppableReferences; + RootHandling::kDontQueryEmbedderForAnyReference; friend class internal::TracedHandles; }; diff --git a/deps/v8/include/v8-exception.h b/deps/v8/include/v8-exception.h index 86f8b3a4bafaba..a7f49b6c71b43c 100644 --- a/deps/v8/include/v8-exception.h +++ b/deps/v8/include/v8-exception.h @@ -8,6 +8,7 @@ #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) namespace v8 { @@ -58,8 +59,77 @@ class V8_EXPORT Exception { * of a given exception, or an empty handle if not available. */ static Local GetStackTrace(Local exception); + + /** + * Captures the current stack trace and attaches it to the given object in the + * form of `stack` property. + */ + static Maybe CaptureStackTrace(Local context, + Local object); }; +/** + * This is a part of experimental Api and might be changed without further + * notice. + * Do not use it. + */ +enum class ExceptionContext : uint32_t { + kUnknown, + kConstructor, + kOperation, + kAttributeGet, + kAttributeSet, + kIndexedQuery, + kIndexedGetter, + kIndexedDescriptor, + kIndexedSetter, + kIndexedDefiner, + kIndexedDeleter, + kNamedQuery, + kNamedGetter, + kNamedDescriptor, + kNamedSetter, + kNamedDefiner, + kNamedDeleter, + kNamedEnumerator +}; + +/** + * This is a part of experimental Api and might be changed without further + * notice. + * Do not use it. + */ +class ExceptionPropagationMessage { + public: + ExceptionPropagationMessage(v8::Isolate* isolate, Local exception, + Local interface_name, + Local property_name, + ExceptionContext exception_context) + : isolate_(isolate), + exception_(exception), + interface_name_(interface_name), + property_name_(property_name), + exception_context_(exception_context) {} + + V8_INLINE Isolate* GetIsolate() const { return isolate_; } + V8_INLINE Local GetException() const { return exception_; } + V8_INLINE Local GetInterfaceName() const { return interface_name_; } + V8_INLINE Local GetPropertyName() const { return property_name_; } + V8_INLINE ExceptionContext GetExceptionContext() const { + return exception_context_; + } + + private: + Isolate* isolate_; + Local exception_; + Local interface_name_; + Local property_name_; + ExceptionContext exception_context_; +}; + +using ExceptionPropagationCallback = + void (*)(ExceptionPropagationMessage message); + /** * An external exception handler. */ diff --git a/deps/v8/include/v8-fast-api-calls.h b/deps/v8/include/v8-fast-api-calls.h index 74d4cb152ed6a6..1cd99cb880f023 100644 --- a/deps/v8/include/v8-fast-api-calls.h +++ b/deps/v8/include/v8-fast-api-calls.h @@ -337,7 +337,13 @@ struct FastApiTypedArrayBase { }; template -struct FastApiTypedArray : public FastApiTypedArrayBase { +struct V8_DEPRECATE_SOON( + "When an API function expects a TypedArray as a parameter, the type in the " + "signature should be `v8::Local` instead of " + "FastApiTypedArray<>. The API function then has to type-check the " + "parameter and convert it to a `v8::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; }; @@ -529,16 +528,22 @@ class V8_EXPORT CFunction { } template - static CFunction Make(F* func) { - return ArgUnwrap::Make(func); + static CFunction Make(F* func, + CFunctionInfo::Int64Representation int64_rep = + CFunctionInfo::Int64Representation::kNumber) { + CFunction result = ArgUnwrap::Make(func, int64_rep); + result.GetInt64Representation(); + return result; } // Provided for testing purposes. template static CFunction Make(R (*func)(Args...), - R_Patch (*patching_func)(Args_Patch...)) { - CFunction c_func = ArgUnwrap::Make(func); + R_Patch (*patching_func)(Args_Patch...), + CFunctionInfo::Int64Representation int64_rep = + CFunctionInfo::Int64Representation::kNumber) { + CFunction c_func = ArgUnwrap::Make(func, int64_rep); static_assert( sizeof...(Args_Patch) == sizeof...(Args), "The patching function must have the same number of arguments."); @@ -561,7 +566,9 @@ class V8_EXPORT CFunction { template class ArgUnwrap { public: - static CFunction Make(R (*func)(Args...)); + static CFunction Make(R (*func)(Args...), + CFunctionInfo::Int64Representation int64_rep = + CFunctionInfo::Int64Representation::kNumber); }; }; @@ -577,9 +584,11 @@ struct FastApiCallbackOptions { * returned instance may be filled with mock data. */ static FastApiCallbackOptions CreateForTesting(Isolate* isolate) { - return {false, {0}, nullptr}; + return {}; } + v8::Isolate* isolate = nullptr; + /** * If the callback wants to signal an error condition or to perform an * allocation, it must set options.fallback to true and do an early return @@ -591,21 +600,26 @@ struct FastApiCallbackOptions { * fallback conditions are checked, because otherwise executing the slow * callback might produce visible side-effects twice. */ - bool fallback; + V8_DEPRECATED( + "It is not necessary to use the `fallback` flag anymore, as it is " + "possible now to trigger GC, throw exceptions, and call back into " + "JavaScript even in API functions called with a fast API call.") + bool fallback = false; /** * The `data` passed to the FunctionTemplate constructor, or `undefined`. - * `data_ptr` allows for default constructing FastApiCallbackOptions. */ - union { - uintptr_t data_ptr; - v8::Local data; - }; + v8::Local data; /** * When called from WebAssembly, a view of the calling module's memory. */ - FastApiTypedArray* const wasm_memory; + V8_DEPRECATED( + "The wasm memory should either be provided as a field of the receiver, " + "the data object of the FunctionTemplate, or as a normal parameter of " + "the API function. Since regular API calls don't have this magic " + "`wasm_memory parameter, one of the options above should be possible.") + FastApiTypedArray* const wasm_memory = nullptr; }; namespace internal { @@ -929,8 +943,14 @@ class CFunctionBuilder { // static template -CFunction CFunction::ArgUnwrap::Make(R (*func)(Args...)) { - return internal::CFunctionBuilder().Fn(func).Build(); +CFunction CFunction::ArgUnwrap::Make( + R (*func)(Args...), CFunctionInfo::Int64Representation int64_rep) { + if (int64_rep == CFunctionInfo::Int64Representation::kNumber) { + return internal::CFunctionBuilder().Fn(func).Build(); + } + return internal::CFunctionBuilder() + .Fn(func) + .template Build(); } using CFunctionBuilder = internal::CFunctionBuilder; diff --git a/deps/v8/include/v8-function-callback.h b/deps/v8/include/v8-function-callback.h index 86a3ea72f4033c..7208c19ebf62c6 100644 --- a/deps/v8/include/v8-function-callback.h +++ b/deps/v8/include/v8-function-callback.h @@ -8,6 +8,7 @@ #include #include +#include "v8-internal.h" // NOLINT(build/include_directory) #include "v8-local-handle.h" // NOLINT(build/include_directory) #include "v8-primitive.h" // NOLINT(build/include_directory) #include "v8config.h" // NOLINT(build/include_directory) @@ -31,6 +32,11 @@ namespace debug { class ConsoleCallArguments; } // namespace debug +namespace api_internal { +V8_EXPORT v8::Local GetFunctionTemplateData( + v8::Isolate* isolate, v8::Local raw_target); +} // namespace api_internal + template class ReturnValue { public: @@ -38,7 +44,7 @@ class ReturnValue { V8_INLINE ReturnValue(const ReturnValue& that) : value_(that.value_) { static_assert(std::is_base_of::value, "type check"); } - // Local setters + // Handle-based setters. template V8_INLINE void Set(const Global& handle); template @@ -51,15 +57,19 @@ class ReturnValue { V8_INLINE void Set(const Local handle); template V8_INLINE void SetNonEmpty(const Local handle); - // Fast primitive setters + // Fast primitive number setters. V8_INLINE void Set(bool value); V8_INLINE void Set(double i); + V8_INLINE void Set(int16_t i); V8_INLINE void Set(int32_t i); + V8_INLINE void Set(int64_t i); + V8_INLINE void Set(uint16_t i); V8_INLINE void Set(uint32_t i); - V8_INLINE void Set(uint16_t); + V8_INLINE void Set(uint64_t i); // Fast JS primitive setters V8_INLINE void SetNull(); V8_INLINE void SetUndefined(); + V8_INLINE void SetFalse(); V8_INLINE void SetEmptyString(); // Convenience getter for Isolate V8_INLINE Isolate* GetIsolate() const; @@ -83,14 +93,13 @@ class ReturnValue { template friend class PersistentValueMapBase; V8_INLINE void SetInternal(internal::Address value); - // Setting the hole value has different meanings depending on the usage: - // - for function template callbacks it means that the callback returns - // the undefined value, - // - for property getter callbacks is means that the callback returns - // the undefined value (for property setter callbacks the value returned - // is ignored), - // - for interceptor callbacks it means that the request was not handled. - V8_INLINE void SetTheHole(); + // Default value depends on : + // - -> true_value, + // - -> true_value, + // - -> 0, + // - -> undefined_value, + // - -> undefined_value. + V8_INLINE void SetDefaultValue(); V8_INLINE explicit ReturnValue(internal::Address* slot); // See FunctionCallbackInfo. @@ -127,6 +136,12 @@ class FunctionCallbackInfo { * referencing this callback was found (which in V8 internally is often * referred to as holder [sic]). */ + V8_DEPRECATED( + "V8 will stop providing access to hidden prototype (i.e. " + "JSGlobalObject). Use This() instead. \n" + "DO NOT try to workaround this by accessing JSGlobalObject via " + "v8::Object::GetPrototype() - it'll be deprecated soon too. \n" + "See http://crbug.com/333672197. ") V8_INLINE Local Holder() const; /** For construct calls, this returns the "new.target" value. */ V8_INLINE Local NewTarget() const; @@ -139,16 +154,22 @@ class FunctionCallbackInfo { /** The ReturnValue for the call. */ V8_INLINE ReturnValue GetReturnValue() const; + // This is a temporary replacement for Holder() added just for the purpose + // of testing the deprecated Holder() machinery until it's removed for real. + // DO NOT use it. + V8_INLINE Local HolderSoonToBeDeprecated() const; + private: friend class internal::FunctionCallbackArguments; friend class internal::CustomArguments; friend class debug::ConsoleCallArguments; + friend void internal::PrintFunctionCallbackInfo(void*); static constexpr int kHolderIndex = 0; static constexpr int kIsolateIndex = 1; - static constexpr int kUnusedIndex = 2; + static constexpr int kContextIndex = 2; static constexpr int kReturnValueIndex = 3; - static constexpr int kDataIndex = 4; + static constexpr int kTargetIndex = 4; static constexpr int kNewTargetIndex = 5; static constexpr int kArgsLength = 6; @@ -168,9 +189,13 @@ class FunctionCallbackInfo { V8_INLINE FunctionCallbackInfo(internal::Address* implicit_args, internal::Address* values, int length); + + // TODO(https://crbug.com/326505377): flatten the v8::FunctionCallbackInfo + // object to avoid indirect loads through values_ and implicit_args_ and + // reduce the number of instructions in the CallApiCallback builtin. internal::Address* implicit_args_; internal::Address* values_; - int length_; + internal::Address length_; }; /** @@ -244,8 +269,23 @@ class PropertyCallbackInfo { * * \note For security reasons, do not pass the object back into the runtime. */ + V8_DEPRECATE_SOON( + "V8 will stop providing access to hidden prototype (i.e. " + "JSGlobalObject). Use HolderV2() instead. \n" + "DO NOT try to workaround this by accessing JSGlobalObject via " + "v8::Object::GetPrototype() - it'll be deprecated soon too. \n" + "See http://crbug.com/333672197. ") V8_INLINE Local Holder() const; + /** + * \return The object in the prototype chain of the receiver that has the + * interceptor. Suppose you have `x` and its prototype is `y`, and `y` + * has an interceptor. Then `info.This()` is `x` and `info.Holder()` is `y`. + * In case the property is installed on the global object the Holder() + * would return the global proxy. + */ + V8_INLINE Local HolderV2() const; + /** * \return The return value of the callback. * Can be changed by calling Set(). @@ -266,24 +306,28 @@ class PropertyCallbackInfo { V8_INLINE bool ShouldThrowOnError() const; private: + template + friend class PropertyCallbackInfo; friend class MacroAssembler; friend class internal::PropertyCallbackArguments; friend class internal::CustomArguments; - static constexpr int kShouldThrowOnErrorIndex = 0; - static constexpr int kHolderIndex = 1; - static constexpr int kIsolateIndex = 2; - static constexpr int kUnusedIndex = 3; - static constexpr int kReturnValueIndex = 4; - static constexpr int kDataIndex = 5; - static constexpr int kThisIndex = 6; - static constexpr int kArgsLength = 7; + friend void internal::PrintPropertyCallbackInfo(void*); + + static constexpr int kPropertyKeyIndex = 0; + static constexpr int kShouldThrowOnErrorIndex = 1; + static constexpr int kHolderIndex = 2; + static constexpr int kIsolateIndex = 3; + static constexpr int kHolderV2Index = 4; + static constexpr int kReturnValueIndex = 5; + static constexpr int kDataIndex = 6; + static constexpr int kThisIndex = 7; + static constexpr int kArgsLength = 8; - static constexpr int kSize = 1 * internal::kApiSystemPointerSize; + static constexpr int kSize = kArgsLength * internal::kApiSystemPointerSize; - V8_INLINE explicit PropertyCallbackInfo(internal::Address* args) - : args_(args) {} + explicit PropertyCallbackInfo() = default; - internal::Address* args_; + mutable internal::Address args_[kArgsLength]; }; using FunctionCallback = void (*)(const FunctionCallbackInfo& info); @@ -312,7 +356,7 @@ template void ReturnValue::Set(const Global& handle) { static_assert(std::is_base_of::value, "type check"); if (V8_UNLIKELY(handle.IsEmpty())) { - SetTheHole(); + SetDefaultValue(); } else { SetInternal(handle.ptr()); } @@ -333,7 +377,7 @@ template void ReturnValue::Set(const BasicTracedReference& handle) { static_assert(std::is_base_of::value, "type check"); if (V8_UNLIKELY(handle.IsEmpty())) { - SetTheHole(); + SetDefaultValue(); } else { SetInternal(handle.ptr()); } @@ -352,10 +396,25 @@ void ReturnValue::SetNonEmpty(const BasicTracedReference& handle) { template template void ReturnValue::Set(const Local handle) { - static_assert(std::is_void::value || std::is_base_of::value, - "type check"); + // "V8_DEPRECATE_SOON" this method if |T| is |void|. +#ifdef V8_IMMINENT_DEPRECATION_WARNINGS + static constexpr bool is_allowed_void = false; + static_assert(!std::is_void::value, + "ReturnValue::Set(const Local) is deprecated. " + "Do nothing to indicate that the operation succeeded or use " + "SetFalse() to indicate that the operation failed (don't " + "forget to handle info.ShouldThrowOnError()). " + "See http://crbug.com/348660658 for details."); +#else + static constexpr bool is_allowed_void = std::is_void::value; +#endif // V8_IMMINENT_DEPRECATION_WARNINGS + static_assert(is_allowed_void || std::is_base_of::value, "type check"); if (V8_UNLIKELY(handle.IsEmpty())) { - SetTheHole(); + SetDefaultValue(); + } else if constexpr (is_allowed_void) { + // Simulate old behaviour for "v8::AccessorSetterCallback" for which + // it was possible to set the return value even for ReturnValue. + Set(handle->BooleanValue(GetIsolate())); } else { SetInternal(handle.ptr()); } @@ -364,12 +423,29 @@ 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"); + // "V8_DEPRECATE_SOON" this method if |T| is |void|. +#ifdef V8_IMMINENT_DEPRECATION_WARNINGS + static constexpr bool is_allowed_void = false; + static_assert(!std::is_void::value, + "ReturnValue::SetNonEmpty(const Local) is deprecated. " + "Do nothing to indicate that the operation succeeded or use " + "SetFalse() to indicate that the operation failed (don't " + "forget to handle info.ShouldThrowOnError()). " + "See http://crbug.com/348660658 for details."); +#else + static constexpr bool is_allowed_void = std::is_void::value; +#endif // V8_IMMINENT_DEPRECATION_WARNINGS + static_assert(is_allowed_void || std::is_base_of::value, "type check"); #ifdef V8_ENABLE_CHECKS internal::VerifyHandleIsNonEmpty(handle.IsEmpty()); #endif // V8_ENABLE_CHECKS - SetInternal(handle.ptr()); + if constexpr (is_allowed_void) { + // Simulate old behaviour for "v8::AccessorSetterCallback" for which + // it was possible to set the return value even for ReturnValue. + Set(handle->BooleanValue(GetIsolate())); + } else { + SetInternal(handle.ptr()); + } } template @@ -379,26 +455,32 @@ void ReturnValue::Set(double i) { } template -void ReturnValue::Set(int32_t i) { +void ReturnValue::Set(int16_t i) { static_assert(std::is_base_of::value, "type check"); using I = internal::Internals; - if (V8_LIKELY(I::IsValidSmi(i))) { - SetInternal(I::IntToSmi(i)); + static_assert(I::IsValidSmi(std::numeric_limits::min())); + static_assert(I::IsValidSmi(std::numeric_limits::max())); + SetInternal(I::IntegralToSmi(i)); +} + +template +void ReturnValue::Set(int32_t i) { + static_assert(std::is_base_of::value, "type check"); + if (const auto result = internal::Internals::TryIntegralToSmi(i)) { + SetInternal(*result); return; } SetNonEmpty(Integer::New(GetIsolate(), i)); } template -void ReturnValue::Set(uint32_t i) { +void ReturnValue::Set(int64_t i) { static_assert(std::is_base_of::value, "type check"); - // Can't simply use INT32_MAX here for whatever reason. - bool fits_into_int32_t = (i & (1U << 31)) == 0; - if (V8_LIKELY(fits_into_int32_t)) { - Set(static_cast(i)); + if (const auto result = internal::Internals::TryIntegralToSmi(i)) { + SetInternal(*result); return; } - SetNonEmpty(Integer::NewFromUnsigned(GetIsolate(), i)); + SetNonEmpty(Number::New(GetIsolate(), static_cast(i))); } template @@ -407,12 +489,33 @@ void ReturnValue::Set(uint16_t i) { using I = internal::Internals; static_assert(I::IsValidSmi(std::numeric_limits::min())); static_assert(I::IsValidSmi(std::numeric_limits::max())); - SetInternal(I::IntToSmi(i)); + SetInternal(I::IntegralToSmi(i)); +} + +template +void ReturnValue::Set(uint32_t i) { + static_assert(std::is_base_of::value, "type check"); + if (const auto result = internal::Internals::TryIntegralToSmi(i)) { + SetInternal(*result); + return; + } + SetNonEmpty(Integer::NewFromUnsigned(GetIsolate(), i)); +} + +template +void ReturnValue::Set(uint64_t i) { + static_assert(std::is_base_of::value, "type check"); + if (const auto result = internal::Internals::TryIntegralToSmi(i)) { + SetInternal(*result); + return; + } + SetNonEmpty(Number::New(GetIsolate(), static_cast(i))); } template void ReturnValue::Set(bool value) { - static_assert(std::is_base_of::value, "type check"); + static_assert(std::is_void::value || std::is_base_of::value, + "type check"); using I = internal::Internals; #if V8_STATIC_ROOTS_BOOL #ifdef V8_ENABLE_CHECKS @@ -433,13 +536,20 @@ void ReturnValue::Set(bool value) { } template -void ReturnValue::SetTheHole() { +void ReturnValue::SetDefaultValue() { using I = internal::Internals; + if constexpr (std::is_same_v || std::is_same_v) { + Set(true); + } else if constexpr (std::is_same_v) { + SetInternal(I::IntegralToSmi(0)); + } else { + static_assert(std::is_same_v || std::is_same_v); #if V8_STATIC_ROOTS_BOOL - SetInternal(I::StaticReadOnlyRoot::kTheHoleValue); + SetInternal(I::StaticReadOnlyRoot::kUndefinedValue); #else - *value_ = I::GetRoot(GetIsolate(), I::kTheHoleValueRootIndex); + *value_ = I::GetRoot(GetIsolate(), I::kUndefinedValueRootIndex); #endif // V8_STATIC_ROOTS_BOOL + } } template @@ -472,6 +582,22 @@ void ReturnValue::SetUndefined() { #endif // V8_STATIC_ROOTS_BOOL } +template +void ReturnValue::SetFalse() { + static_assert(std::is_void::value || 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 + SetInternal(I::StaticReadOnlyRoot::kFalseValue); +#else + *value_ = I::GetRoot(GetIsolate(), I::kFalseValueRootIndex); +#endif // V8_STATIC_ROOTS_BOOL +} + template void ReturnValue::SetEmptyString() { static_assert(std::is_base_of::value, "type check"); @@ -494,14 +620,6 @@ Isolate* ReturnValue::GetIsolate() const { template Local ReturnValue::Get() const { - using I = internal::Internals; -#if V8_STATIC_ROOTS_BOOL - if (I::is_identical(*value_, I::StaticReadOnlyRoot::kTheHoleValue)) { -#else - if (*value_ == I::GetRoot(GetIsolate(), I::kTheHoleValueRootIndex)) { -#endif // V8_STATIC_ROOTS_BOOL - return Undefined(GetIsolate()); - } return Local::New(GetIsolate(), internal::ValueHelper::SlotAsValue(value_)); } @@ -521,7 +639,7 @@ FunctionCallbackInfo::FunctionCallbackInfo(internal::Address* implicit_args, template Local FunctionCallbackInfo::operator[](int i) const { // values_ points to the first argument (not the receiver). - if (i < 0 || length_ <= i) return Undefined(GetIsolate()); + if (i < 0 || Length() <= i) return Undefined(GetIsolate()); return Local::FromSlot(values_ + i); } @@ -532,10 +650,15 @@ Local FunctionCallbackInfo::This() const { } template -Local FunctionCallbackInfo::Holder() const { +Local FunctionCallbackInfo::HolderSoonToBeDeprecated() const { return Local::FromSlot(&implicit_args_[kHolderIndex]); } +template +Local FunctionCallbackInfo::Holder() const { + return HolderSoonToBeDeprecated(); +} + template Local FunctionCallbackInfo::NewTarget() const { return Local::FromSlot(&implicit_args_[kNewTargetIndex]); @@ -543,7 +666,8 @@ Local FunctionCallbackInfo::NewTarget() const { template Local FunctionCallbackInfo::Data() const { - return Local::FromSlot(&implicit_args_[kDataIndex]); + auto target = Local::FromSlot(&implicit_args_[kTargetIndex]); + return api_internal::GetFunctionTemplateData(GetIsolate(), target); } template @@ -563,7 +687,7 @@ bool FunctionCallbackInfo::IsConstructCall() const { template int FunctionCallbackInfo::Length() const { - return length_; + return static_cast(length_); } template @@ -586,6 +710,23 @@ Local PropertyCallbackInfo::Holder() const { return Local::FromSlot(&args_[kHolderIndex]); } +namespace api_internal { +// Returns JSGlobalProxy if holder is JSGlobalObject or unmodified holder +// otherwise. +V8_EXPORT internal::Address ConvertToJSGlobalProxyIfNecessary( + internal::Address holder); +} // namespace api_internal + +template +Local PropertyCallbackInfo::HolderV2() const { + using I = internal::Internals; + if (!I::HasHeapObjectTag(args_[kHolderV2Index])) { + args_[kHolderV2Index] = + api_internal::ConvertToJSGlobalProxyIfNecessary(args_[kHolderIndex]); + } + return Local::FromSlot(&args_[kHolderV2Index]); +} + template ReturnValue PropertyCallbackInfo::GetReturnValue() const { return ReturnValue(&args_[kReturnValueIndex]); @@ -595,8 +736,8 @@ template bool PropertyCallbackInfo::ShouldThrowOnError() const { using I = internal::Internals; if (args_[kShouldThrowOnErrorIndex] != - I::IntToSmi(I::kInferShouldThrowMode)) { - return args_[kShouldThrowOnErrorIndex] != I::IntToSmi(I::kDontThrow); + I::IntegralToSmi(I::kInferShouldThrowMode)) { + return args_[kShouldThrowOnErrorIndex] != I::IntegralToSmi(I::kDontThrow); } return v8::internal::ShouldThrowOnError( reinterpret_cast(GetIsolate())); diff --git a/deps/v8/include/v8-function.h b/deps/v8/include/v8-function.h index 30a9fcfe174acb..50f730f3929fe5 100644 --- a/deps/v8/include/v8-function.h +++ b/deps/v8/include/v8-function.h @@ -59,9 +59,6 @@ class V8_EXPORT Function : public Object { void SetName(Local name); Local GetName() const; - V8_DEPRECATED("No direct replacement") - MaybeLocal GetUnboundScript() const; - /** * Name inferred from variable or property assignment of this function. * Used to facilitate debugging and profiling of JavaScript code written diff --git a/deps/v8/include/v8-initialization.h b/deps/v8/include/v8-initialization.h index d3e35d6ec5f860..c3984668bb1100 100644 --- a/deps/v8/include/v8-initialization.h +++ b/deps/v8/include/v8-initialization.h @@ -52,6 +52,9 @@ using ReturnAddressLocationResolver = using DcheckErrorCallback = void (*)(const char* file, int line, const char* message); +using V8FatalErrorCallback = void (*)(const char* file, int line, + const char* message); + /** * Container class for static utility functions. */ @@ -77,6 +80,12 @@ class V8_EXPORT V8 { /** Set the callback to invoke in case of Dcheck failures. */ static void SetDcheckErrorHandler(DcheckErrorCallback that); + /** Set the callback to invoke in the case of CHECK failures or fatal + * errors. This is distinct from Isolate::SetFatalErrorHandler, which + * is invoked in response to API usage failures. + * */ + static void SetFatalErrorHandler(V8FatalErrorCallback that); + /** * Sets V8 flags from a string. */ @@ -97,10 +106,17 @@ class V8_EXPORT V8 { * is created. It always returns true. */ V8_INLINE static bool Initialize() { +#ifdef V8_TARGET_OS_ANDROID + const bool kV8TargetOsIsAndroid = true; +#else + const bool kV8TargetOsIsAndroid = false; +#endif + const int kBuildConfiguration = (internal::PointerCompressionIsEnabled() ? kPointerCompression : 0) | (internal::SmiValuesAre31Bits() ? k31BitSmis : 0) | - (internal::SandboxIsEnabled() ? kSandbox : 0); + (internal::SandboxIsEnabled() ? kSandbox : 0) | + (kV8TargetOsIsAndroid ? kTargetOsIsAndroid : 0); return Initialize(kBuildConfiguration); } @@ -271,6 +287,7 @@ class V8_EXPORT V8 { kPointerCompression = 1 << 0, k31BitSmis = 1 << 1, kSandbox = 1 << 2, + kTargetOsIsAndroid = 1 << 3, }; /** diff --git a/deps/v8/include/v8-inspector.h b/deps/v8/include/v8-inspector.h index 182b193a0fd700..89bb0bbd539b28 100644 --- a/deps/v8/include/v8-inspector.h +++ b/deps/v8/include/v8-inspector.h @@ -297,9 +297,12 @@ class V8_EXPORT V8InspectorClient { return v8::MaybeLocal(); } - virtual void consoleTime(const StringView& title) {} - virtual void consoleTimeEnd(const StringView& title) {} - virtual void consoleTimeStamp(const StringView& title) {} + virtual void consoleTime(v8::Isolate* isolate, v8::Local label); + virtual void consoleTimeEnd(v8::Isolate* isolate, + v8::Local label); + virtual void consoleTimeStamp(v8::Isolate* isolate, + v8::Local label); + virtual void consoleClear(int contextGroupId) {} virtual double currentTimeMS() { return 0; } typedef void (*TimerCallback)(void*); diff --git a/deps/v8/include/v8-internal.h b/deps/v8/include/v8-internal.h index 322b22d98e8be4..8c385aa10a915b 100644 --- a/deps/v8/include/v8-internal.h +++ b/deps/v8/include/v8-internal.h @@ -11,7 +11,9 @@ #include #include +#include #include +#include #include #include "v8config.h" // NOLINT(build/include_directory) @@ -87,7 +89,10 @@ struct SmiTagging<4> { // Truncate and shift down (requires >> to be sign extending). return static_cast(static_cast(value)) >> shift_bits; } - V8_INLINE static constexpr bool IsValidSmi(intptr_t value) { + + template && + std::is_signed_v>* = nullptr> + V8_INLINE static constexpr bool IsValidSmi(T value) { // Is value in range [kSmiMinValue, kSmiMaxValue]. // Use unsigned operations in order to avoid undefined behaviour in case of // signed integer overflow. @@ -96,6 +101,28 @@ struct SmiTagging<4> { (static_cast(kSmiMaxValue) - static_cast(kSmiMinValue)); } + + template && + std::is_unsigned_v>* = nullptr> + V8_INLINE static constexpr bool IsValidSmi(T value) { + static_assert(kSmiMaxValue <= std::numeric_limits::max()); + return value <= static_cast(kSmiMaxValue); + } + + // Same as the `intptr_t` version but works with int64_t on 32-bit builds + // without slowing down anything else. + V8_INLINE static constexpr bool IsValidSmi(int64_t value) { + return (static_cast(value) - + static_cast(kSmiMinValue)) <= + (static_cast(kSmiMaxValue) - + static_cast(kSmiMinValue)); + } + + V8_INLINE static constexpr bool IsValidSmi(uint64_t value) { + static_assert(kSmiMaxValue <= std::numeric_limits::max()); + return value <= static_cast(kSmiMaxValue); + } }; // Smi constants for systems where tagged pointer is a 64-bit value. @@ -112,10 +139,21 @@ struct SmiTagging<8> { // Shift down and throw away top 32 bits. return static_cast(static_cast(value) >> shift_bits); } - V8_INLINE static constexpr bool IsValidSmi(intptr_t value) { + + template && + std::is_signed_v>* = nullptr> + V8_INLINE static constexpr bool IsValidSmi(T value) { // To be representable as a long smi, the value must be a 32-bit integer. return (value == static_cast(value)); } + + template && + std::is_unsigned_v>* = nullptr> + V8_INLINE static constexpr bool IsValidSmi(T value) { + return (static_cast(value) == + static_cast(static_cast(value))); + } }; #ifdef V8_COMPRESS_POINTERS @@ -253,15 +291,15 @@ static_assert(1ULL << (64 - kBoundedSizeShift) == // size allows omitting bounds checks on table accesses if the indices are // guaranteed (e.g. through shifting) to be below the maximum index. This // value must be a power of two. -constexpr size_t kExternalPointerTableReservationSize = 512 * MB; +constexpr size_t kExternalPointerTableReservationSize = 256 * MB; // The external pointer table indices stored in HeapObjects as external // pointers are shifted to the left by this amount to guarantee that they are // smaller than the maximum table size. -constexpr uint32_t kExternalPointerIndexShift = 6; +constexpr uint32_t kExternalPointerIndexShift = 7; #else -constexpr size_t kExternalPointerTableReservationSize = 1024 * MB; -constexpr uint32_t kExternalPointerIndexShift = 5; +constexpr size_t kExternalPointerTableReservationSize = 512 * MB; +constexpr uint32_t kExternalPointerIndexShift = 6; #endif // V8_TARGET_OS_ANDROID // The maximum number of entries in an external pointer table. @@ -301,6 +339,95 @@ using ExternalPointer_t = Address; constexpr ExternalPointer_t kNullExternalPointer = 0; constexpr ExternalPointerHandle kNullExternalPointerHandle = 0; +// See `ExternalPointerHandle` for the main documentation. The difference to +// `ExternalPointerHandle` is that the handle does not represent an arbitrary +// external pointer but always refers to an object managed by `CppHeap`. The +// handles are using in combination with a dedicated table for `CppHeap` +// references. +using CppHeapPointerHandle = uint32_t; + +// The actual pointer to objects located on the `CppHeap`. When pointer +// compression is enabled these pointers are stored as `CppHeapPointerHandle`. +// In non-compressed configurations the pointers are simply stored as raw +// pointers. +#ifdef V8_COMPRESS_POINTERS +using CppHeapPointer_t = CppHeapPointerHandle; +#else +using CppHeapPointer_t = Address; +#endif + +constexpr CppHeapPointer_t kNullCppHeapPointer = 0; +constexpr CppHeapPointerHandle kNullCppHeapPointerHandle = 0; + +constexpr uint64_t kCppHeapPointerMarkBit = 1ULL; +constexpr uint64_t kCppHeapPointerTagShift = 1; +constexpr uint64_t kCppHeapPointerPayloadShift = 16; + +#ifdef V8_COMPRESS_POINTERS +// CppHeapPointers use a dedicated pointer table. These constants control the +// size and layout of the table. See the corresponding constants for the +// external pointer table for further details. +constexpr size_t kCppHeapPointerTableReservationSize = + kExternalPointerTableReservationSize; +constexpr uint32_t kCppHeapPointerIndexShift = kExternalPointerIndexShift; + +constexpr int kCppHeapPointerTableEntrySize = 8; +constexpr int kCppHeapPointerTableEntrySizeLog2 = 3; +constexpr size_t kMaxCppHeapPointers = + kCppHeapPointerTableReservationSize / kCppHeapPointerTableEntrySize; +static_assert((1 << (32 - kCppHeapPointerIndexShift)) == kMaxCppHeapPointers, + "kCppHeapPointerTableReservationSize and " + "kCppHeapPointerIndexShift don't match"); + +#else // !V8_COMPRESS_POINTERS + +// Needed for the V8.SandboxedCppHeapPointersCount histogram. +constexpr size_t kMaxCppHeapPointers = 0; + +#endif // V8_COMPRESS_POINTERS + +// See `ExternalPointerHandle` for the main documentation. The difference to +// `ExternalPointerHandle` is that the handle always refers to a +// (external pointer, size) tuple. The handles are used in combination with a +// dedicated external buffer table (EBT). +using ExternalBufferHandle = uint32_t; + +// ExternalBuffer point to buffer located outside the sandbox. When the V8 +// sandbox is enabled, these are stored on heap as ExternalBufferHandles, +// otherwise they are simply raw pointers. +#ifdef V8_ENABLE_SANDBOX +using ExternalBuffer_t = ExternalBufferHandle; +#else +using ExternalBuffer_t = Address; +#endif + +#ifdef V8_TARGET_OS_ANDROID +// The size of the virtual memory reservation for the external buffer table. +// As with the external pointer table, a maximum table size in combination with +// shifted indices allows omitting bounds checks. +constexpr size_t kExternalBufferTableReservationSize = 64 * MB; + +// The external buffer handles are stores shifted to the left by this amount +// to guarantee that they are smaller than the maximum table size. +constexpr uint32_t kExternalBufferHandleShift = 10; +#else +constexpr size_t kExternalBufferTableReservationSize = 128 * MB; +constexpr uint32_t kExternalBufferHandleShift = 9; +#endif // V8_TARGET_OS_ANDROID + +// A null handle always references an entry that contains nullptr. +constexpr ExternalBufferHandle kNullExternalBufferHandle = 0; + +// The maximum number of entries in an external buffer table. +constexpr int kExternalBufferTableEntrySize = 16; +constexpr int kExternalBufferTableEntrySizeLog2 = 4; +constexpr size_t kMaxExternalBufferPointers = + kExternalBufferTableReservationSize / kExternalBufferTableEntrySize; +static_assert((1 << (32 - kExternalBufferHandleShift)) == + kMaxExternalBufferPointers, + "kExternalBufferTableReservationSize and " + "kExternalBufferHandleShift don't match"); + // // External Pointers. // @@ -365,7 +492,7 @@ constexpr ExternalPointerHandle kNullExternalPointerHandle = 0; // extension (MTE) which would use bits [56, 60). // // External pointer tables are also available even when the sandbox is off but -// pointer compression is on. In that case, the mechanism can be used to easy +// pointer compression is on. In that case, the mechanism can be used to ease // alignment requirements as it turns unaligned 64-bit raw pointers into // aligned 32-bit indices. To "opt-in" to the external pointer table mechanism // for this purpose, instead of using the ExternalPointer accessors one needs to @@ -380,7 +507,7 @@ constexpr uint64_t kExternalPointerTagShift = 48; // These are sorted so that tags can be grouped together and it can efficiently // be checked if a tag belongs to a given group. See for example the // IsSharedExternalPointerType routine. -constexpr uint64_t kAllExternalPointerTypeTags[] = { +constexpr uint64_t kAllTagsForAndBasedTypeChecking[] = { 0b00001111, 0b00010111, 0b00011011, 0b00011101, 0b00011110, 0b00100111, 0b00101011, 0b00101101, 0b00101110, 0b00110011, 0b00110101, 0b00110110, 0b00111001, 0b00111010, 0b00111100, 0b01000111, 0b01001011, 0b01001101, @@ -394,8 +521,8 @@ constexpr uint64_t kAllExternalPointerTypeTags[] = { 0b11001100, 0b11010001, 0b11010010, 0b11010100, 0b11011000, 0b11100001, 0b11100010, 0b11100100, 0b11101000, 0b11110000}; -#define TAG(i) \ - ((kAllExternalPointerTypeTags[i] << kExternalPointerTagShift) | \ +#define TAG(i) \ + ((kAllTagsForAndBasedTypeChecking[i] << kExternalPointerTagShift) | \ kExternalPointerMarkBit) // clang-format off @@ -414,26 +541,73 @@ constexpr uint64_t kAllExternalPointerTypeTags[] = { V(kExternalStringResourceTag, TAG(1)) \ V(kExternalStringResourceDataTag, TAG(2)) \ V(kLastSharedTag, TAG(2)) + // Leave some space in the tag range here for future shared tags. // External pointers using these tags are kept in a per-Isolate external // pointer table and can only be accessed when this Isolate is active. #define PER_ISOLATE_EXTERNAL_POINTER_TAGS(V) \ - V(kForeignForeignAddressTag, TAG(10)) \ - V(kNativeContextMicrotaskQueueTag, TAG(11)) \ - V(kEmbedderDataSlotPayloadTag, TAG(12)) \ + V(kNativeContextMicrotaskQueueTag, TAG(5)) \ + V(kEmbedderDataSlotPayloadTag, TAG(6)) \ /* This tag essentially stands for a `void*` pointer in the V8 API, and */ \ /* it is the Embedder's responsibility to ensure type safety (against */ \ /* substitution) and lifetime validity of these objects. */ \ - V(kExternalObjectValueTag, TAG(13)) \ - V(kFunctionTemplateInfoCallbackTag, TAG(14)) \ - V(kAccessorInfoGetterTag, TAG(15)) \ - V(kAccessorInfoSetterTag, TAG(16)) \ - V(kWasmInternalFunctionCallTargetTag, TAG(17)) \ - V(kWasmTypeInfoNativeTypeTag, TAG(18)) \ - V(kWasmExportedFunctionDataSignatureTag, TAG(19)) \ - V(kWasmContinuationJmpbufTag, TAG(20)) \ - V(kWasmIndirectFunctionTargetTag, TAG(21)) \ - V(kArrayBufferExtensionTag, TAG(22)) + V(kExternalObjectValueTag, TAG(7)) \ + V(kFunctionTemplateInfoCallbackTag, TAG(8)) \ + V(kAccessorInfoGetterTag, TAG(9)) \ + V(kAccessorInfoSetterTag, TAG(10)) \ + V(kWasmInternalFunctionCallTargetTag, TAG(11)) \ + V(kWasmTypeInfoNativeTypeTag, TAG(12)) \ + V(kWasmExportedFunctionDataSignatureTag, TAG(13)) \ + V(kWasmContinuationJmpbufTag, TAG(14)) \ + V(kWasmStackMemoryTag, TAG(15)) \ + V(kWasmIndirectFunctionTargetTag, TAG(16)) \ + /* Foreigns */ \ + V(kGenericForeignTag, TAG(20)) \ + V(kApiNamedPropertyQueryCallbackTag, TAG(21)) \ + V(kApiNamedPropertyGetterCallbackTag, TAG(22)) \ + V(kApiNamedPropertySetterCallbackTag, TAG(23)) \ + V(kApiNamedPropertyDescriptorCallbackTag, TAG(24)) \ + V(kApiNamedPropertyDefinerCallbackTag, TAG(25)) \ + V(kApiNamedPropertyDeleterCallbackTag, TAG(26)) \ + V(kApiIndexedPropertyQueryCallbackTag, TAG(27)) \ + V(kApiIndexedPropertyGetterCallbackTag, TAG(28)) \ + V(kApiIndexedPropertySetterCallbackTag, TAG(29)) \ + V(kApiIndexedPropertyDescriptorCallbackTag, TAG(30)) \ + V(kApiIndexedPropertyDefinerCallbackTag, TAG(31)) \ + V(kApiIndexedPropertyDeleterCallbackTag, TAG(32)) \ + V(kApiIndexedPropertyEnumeratorCallbackTag, TAG(33)) \ + V(kApiAccessCheckCallbackTag, TAG(34)) \ + V(kApiAbortScriptExecutionCallbackTag, TAG(35)) \ + V(kSyntheticModuleTag, TAG(36)) \ + V(kMicrotaskCallbackTag, TAG(37)) \ + V(kMicrotaskCallbackDataTag, TAG(38)) \ + V(kCFunctionTag, TAG(39)) \ + V(kCFunctionInfoTag, TAG(40)) \ + V(kMessageListenerTag, TAG(41)) \ + V(kWaiterQueueForeignTag, TAG(42)) \ + /* Managed */ \ + V(kFirstManagedResourceTag, TAG(50)) \ + V(kGenericManagedTag, TAG(50)) \ + V(kWasmWasmStreamingTag, TAG(51)) \ + V(kWasmFuncDataTag, TAG(52)) \ + V(kWasmManagedDataTag, TAG(53)) \ + V(kWasmNativeModuleTag, TAG(54)) \ + V(kIcuBreakIteratorTag, TAG(55)) \ + V(kIcuUnicodeStringTag, TAG(56)) \ + V(kIcuListFormatterTag, TAG(57)) \ + V(kIcuLocaleTag, TAG(58)) \ + V(kIcuSimpleDateFormatTag, TAG(59)) \ + V(kIcuDateIntervalFormatTag, TAG(60)) \ + V(kIcuRelativeDateTimeFormatterTag, TAG(61)) \ + V(kIcuLocalizedNumberFormatterTag, TAG(62)) \ + V(kIcuPluralRulesTag, TAG(63)) \ + V(kIcuCollatorTag, TAG(64)) \ + V(kDisplayNamesInternalTag, TAG(65)) \ + /* External resources whose lifetime is tied to */ \ + /* their entry in the external pointer table but */ \ + /* which are not referenced via a Managed */ \ + V(kArrayBufferExtensionTag, TAG(66)) \ + V(kLastManagedResourceTag, TAG(66)) \ // All external pointer tags. #define ALL_EXTERNAL_POINTER_TAGS(V) \ @@ -449,12 +623,18 @@ enum ExternalPointerTag : uint64_t { kExternalPointerNullTag = MAKE_TAG(1, 0b00000000), // External pointer tag that will match any external pointer. Use with care! kAnyExternalPointerTag = MAKE_TAG(1, 0b11111111), + // External pointer tag that will match any external pointer in a Foreign. + // Use with care! If desired, this could be made more fine-granular. + kAnyForeignTag = kAnyExternalPointerTag, // The free entry tag has all type bits set so every type check with a // different type fails. It also doesn't have the mark bit set as free // entries are (by definition) not alive. kExternalPointerFreeEntryTag = MAKE_TAG(0, 0b11111111), // Evacuation entries are used during external pointer table compaction. - kExternalPointerEvacuationEntryTag = MAKE_TAG(1, 0b11100111), + kExternalPointerEvacuationEntryTag = MAKE_TAG(1, 0b11111110), + // Tag for zapped/invalidated entries. Those are considered to no longer be + // in use and so have the marking bit cleared. + kExternalPointerZappedEntryTag = MAKE_TAG(0, 0b11111101), ALL_EXTERNAL_POINTER_TAGS(EXTERNAL_POINTER_TAG_ENUM) }; @@ -481,6 +661,15 @@ V8_INLINE static constexpr bool IsMaybeReadOnlyExternalPointerType( tag == kFunctionTemplateInfoCallbackTag; } +// True if the external pointer references an external object whose lifetime is +// tied to the entry in the external pointer table. +// In this case, the entry in the ExternalPointerTable always points to an +// object derived from ExternalPointerTable::ManagedResource. +V8_INLINE static constexpr bool IsManagedExternalPointerType( + ExternalPointerTag tag) { + return tag >= kFirstManagedResourceTag && tag <= kLastManagedResourceTag; +} + // Sanity checks. #define CHECK_SHARED_EXTERNAL_POINTER_TAGS(Tag, ...) \ static_assert(IsSharedExternalPointerType(Tag)); @@ -576,11 +765,11 @@ using CodePointerHandle = IndirectPointerHandle; // The size of the virtual memory reservation for the code pointer table. // As with the other tables, a maximum table size in combination with shifted // indices allows omitting bounds checks. -constexpr size_t kCodePointerTableReservationSize = 16 * MB; +constexpr size_t kCodePointerTableReservationSize = 128 * MB; // Code pointer handles are shifted by a different amount than indirect pointer // handles as the tables have a different maximum size. -constexpr uint32_t kCodePointerHandleShift = 12; +constexpr uint32_t kCodePointerHandleShift = 9; // A null handle always references an entry that contains nullptr. constexpr CodePointerHandle kNullCodePointerHandle = kNullIndirectPointerHandle; @@ -616,6 +805,29 @@ constexpr bool kAllCodeObjectsLiveInTrustedSpace = kRuntimeGeneratedCodeObjectsLiveInTrustedSpace && kBuiltinCodeObjectsLiveInTrustedSpace; +// +// JavaScript Dispatch Table +// +// A JSDispatchHandle represents a 32-bit index into a JSDispatchTable. +using JSDispatchHandle = uint32_t; + +constexpr JSDispatchHandle kNullJSDispatchHandle = 0; + +// The size of the virtual memory reservation for the JSDispatchTable. +// As with the other tables, a maximum table size in combination with shifted +// indices allows omitting bounds checks. +constexpr size_t kJSDispatchTableReservationSize = 128 * MB; +constexpr uint32_t kJSDispatchHandleShift = 9; + +// The maximum number of entries in a JSDispatchTable. +constexpr int kJSDispatchTableEntrySize = 16; +constexpr int kJSDispatchTableEntrySizeLog2 = 4; +constexpr size_t kMaxJSDispatchEntries = + kJSDispatchTableReservationSize / kJSDispatchTableEntrySize; +static_assert((1 << (32 - kJSDispatchHandleShift)) == kMaxJSDispatchEntries, + "kJSDispatchTableReservationSize and kJSDispatchEntryHandleShift " + "don't match"); + // {obj} must be the raw tagged pointer representation of a HeapObject // that's guaranteed to never be in ReadOnlySpace. V8_EXPORT internal::Isolate* IsolateFromNeverReadOnlySpaceObject(Address obj); @@ -647,6 +859,13 @@ class Internals { static const int kOddballKindOffset = 4 * kApiTaggedSize + kApiDoubleSize; static const int kJSObjectHeaderSize = 3 * kApiTaggedSize; +#ifdef V8_COMPRESS_POINTERS + static const int kJSAPIObjectWithEmbedderSlotsHeaderSize = + kJSObjectHeaderSize + kApiInt32Size; +#else // !V8_COMPRESS_POINTERS + static const int kJSAPIObjectWithEmbedderSlotsHeaderSize = + kJSObjectHeaderSize + kApiTaggedSize; +#endif // !V8_COMPRESS_POINTERS static const int kFixedArrayHeaderSize = 2 * kApiTaggedSize; static const int kEmbedderDataArrayHeaderSize = 2 * kApiTaggedSize; static const int kEmbedderDataSlotSize = kApiSystemPointerSize; @@ -676,6 +895,7 @@ class Internals { // ExternalPointerTable and TrustedPointerTable layout guarantees. static const int kExternalPointerTableBasePointerOffset = 0; static const int kExternalPointerTableSize = 2 * kApiSystemPointerSize; + static const int kExternalBufferTableSize = 2 * kApiSystemPointerSize; static const int kTrustedPointerTableSize = 2 * kApiSystemPointerSize; static const int kTrustedPointerTableBasePointerOffset = 0; @@ -719,16 +939,22 @@ class Internals { kIsolateEmbedderDataOffset + kNumIsolateDataSlots * kApiSystemPointerSize; static const int kIsolateSharedExternalPointerTableAddressOffset = kIsolateExternalPointerTableOffset + kExternalPointerTableSize; + static const int kIsolateCppHeapPointerTableOffset = + kIsolateSharedExternalPointerTableAddressOffset + kApiSystemPointerSize; #ifdef V8_ENABLE_SANDBOX static const int kIsolateTrustedCageBaseOffset = - kIsolateSharedExternalPointerTableAddressOffset + kApiSystemPointerSize; + kIsolateCppHeapPointerTableOffset + kExternalPointerTableSize; static const int kIsolateTrustedPointerTableOffset = kIsolateTrustedCageBaseOffset + kApiSystemPointerSize; - static const int kIsolateApiCallbackThunkArgumentOffset = + static const int kIsolateExternalBufferTableOffset = kIsolateTrustedPointerTableOffset + kTrustedPointerTableSize; + static const int kIsolateSharedExternalBufferTableAddressOffset = + kIsolateExternalBufferTableOffset + kExternalBufferTableSize; + static const int kIsolateApiCallbackThunkArgumentOffset = + kIsolateSharedExternalBufferTableAddressOffset + kApiSystemPointerSize; #else static const int kIsolateApiCallbackThunkArgumentOffset = - kIsolateSharedExternalPointerTableAddressOffset + kApiSystemPointerSize; + kIsolateCppHeapPointerTableOffset + kExternalPointerTableSize; #endif // V8_ENABLE_SANDBOX #else static const int kIsolateApiCallbackThunkArgumentOffset = @@ -736,13 +962,12 @@ class Internals { #endif // V8_COMPRESS_POINTERS static const int kContinuationPreservedEmbedderDataOffset = kIsolateApiCallbackThunkArgumentOffset + kApiSystemPointerSize; - - static const int kWasm64OOBOffsetAlignmentPaddingSize = 0; - static const int kWasm64OOBOffsetOffset = - kContinuationPreservedEmbedderDataOffset + kApiSystemPointerSize + - kWasm64OOBOffsetAlignmentPaddingSize; static const int kIsolateRootsOffset = - kWasm64OOBOffsetOffset + sizeof(int64_t); + kContinuationPreservedEmbedderDataOffset + kApiSystemPointerSize; + + // Assert scopes + static const int kDisallowGarbageCollectionAlign = alignof(uint32_t); + static const int kDisallowGarbageCollectionSize = sizeof(uint32_t); #if V8_STATIC_ROOTS_BOOL @@ -753,7 +978,7 @@ class Internals { V(TrueValue, 0xc9) \ V(FalseValue, 0xad) \ V(EmptyString, 0xa1) \ - V(TheHoleValue, 0x719) + V(TheHoleValue, 0x741) using Tagged_t = uint32_t; struct StaticReadOnlyRoot { @@ -802,8 +1027,8 @@ class Internals { // Constants used by PropertyCallbackInfo to check if we should throw when an // error occurs. - static const int kThrowOnError = 0; - static const int kDontThrow = 1; + static const int kDontThrow = 0; + static const int kThrowOnError = 1; static const int kInferShouldThrowMode = 2; // Soft limit for AdjustAmountofExternalAllocatedMemory. Trigger an @@ -836,14 +1061,36 @@ class Internals { return PlatformSmiTagging::SmiToInt(value); } + V8_INLINE static constexpr Address AddressToSmi(Address value) { + return (value << (kSmiTagSize + PlatformSmiTagging::kSmiShiftSize)) | + kSmiTag; + } + V8_INLINE static constexpr Address IntToSmi(int value) { - return internal::IntToSmi(value); + return AddressToSmi(static_cast
(value)); + } + + template >* = nullptr> + V8_INLINE static constexpr Address IntegralToSmi(T value) { + return AddressToSmi(static_cast
(value)); } - V8_INLINE static constexpr bool IsValidSmi(intptr_t value) { + template >* = nullptr> + V8_INLINE static constexpr bool IsValidSmi(T value) { return PlatformSmiTagging::IsValidSmi(value); } + template >* = nullptr> + static constexpr std::optional
TryIntegralToSmi(T value) { + if (V8_LIKELY(PlatformSmiTagging::IsValidSmi(value))) { + return {AddressToSmi(static_cast
(value))}; + } + return {}; + } + #if V8_STATIC_ROOTS_BOOL V8_INLINE static bool is_identical(Address obj, Tagged_t constant) { return static_cast(obj) == constant; @@ -1116,7 +1363,7 @@ class V8_EXPORT StrongRootAllocatorBase { protected: explicit StrongRootAllocatorBase(Heap* heap) : heap_(heap) {} - explicit StrongRootAllocatorBase(v8::Isolate* isolate); + explicit StrongRootAllocatorBase(Isolate* isolate); // Allocate/deallocate a range of n elements of type internal::Address. Address* allocate_impl(size_t n); @@ -1132,17 +1379,15 @@ class V8_EXPORT StrongRootAllocatorBase { // and internal::StrongRootAllocator> register the allocated range // as strong roots. template -class StrongRootAllocator : public StrongRootAllocatorBase, - private std::allocator { +class StrongRootAllocator : private std::allocator { public: using value_type = T; - explicit StrongRootAllocator(Heap* heap) : StrongRootAllocatorBase(heap) {} - explicit StrongRootAllocator(v8::Isolate* isolate) - : StrongRootAllocatorBase(isolate) {} + explicit StrongRootAllocator(Heap* heap) {} + explicit StrongRootAllocator(Isolate* isolate) {} + explicit StrongRootAllocator(v8::Isolate* isolate) {} template - StrongRootAllocator(const StrongRootAllocator& other) noexcept - : StrongRootAllocatorBase(other) {} + StrongRootAllocator(const StrongRootAllocator& other) noexcept {} using std::allocator::allocate; using std::allocator::deallocate; @@ -1383,14 +1628,17 @@ class HandleHelper final { if (rhs.IsEmpty()) return false; return lhs.ptr() == rhs.ptr(); } - - static V8_EXPORT bool IsOnStack(const void* ptr); - static V8_EXPORT void VerifyOnStack(const void* ptr); - static V8_EXPORT void VerifyOnMainThread(); }; V8_EXPORT void VerifyHandleIsNonEmpty(bool is_empty); +// These functions are here just to match friend declarations in +// XxxCallbackInfo classes allowing these functions to access the internals +// of the info objects. These functions are supposed to be called by debugger +// macros. +void PrintFunctionCallbackInfo(void* function_callback_info); +void PrintPropertyCallbackInfo(void* property_callback_info); + } // namespace internal } // namespace v8 diff --git a/deps/v8/include/v8-isolate.h b/deps/v8/include/v8-isolate.h index 585b513fac446a..17c107766b9045 100644 --- a/deps/v8/include/v8-isolate.h +++ b/deps/v8/include/v8-isolate.h @@ -17,6 +17,7 @@ #include "v8-data.h" // NOLINT(build/include_directory) #include "v8-debug.h" // NOLINT(build/include_directory) #include "v8-embedder-heap.h" // NOLINT(build/include_directory) +#include "v8-exception.h" // NOLINT(build/include_directory) #include "v8-function-callback.h" // NOLINT(build/include_directory) #include "v8-internal.h" // NOLINT(build/include_directory) #include "v8-local-handle.h" // NOLINT(build/include_directory) @@ -276,11 +277,6 @@ class V8_EXPORT Isolate { */ bool allow_atomics_wait = true; - /** - * Termination is postponed when there is no active SafeForTerminationScope. - */ - bool only_terminate_in_safe_scope = false; - /** * The following parameters describe the offsets for addressing type info * for wrapped API objects and are used by the fast C API @@ -389,21 +385,6 @@ class V8_EXPORT Isolate { friend class internal::ThreadLocalTop; }; - /** - * This scope allows terminations inside direct V8 API calls and forbid them - * inside any recursive API calls without explicit SafeForTerminationScope. - */ - class V8_EXPORT V8_NODISCARD SafeForTerminationScope { - public: - V8_DEPRECATE_SOON("All code should be safe for termination") - explicit SafeForTerminationScope(v8::Isolate* v8_isolate) {} - ~SafeForTerminationScope() {} - - // Prevent copying of Scope objects. - SafeForTerminationScope(const SafeForTerminationScope&) = delete; - SafeForTerminationScope& operator=(const SafeForTerminationScope&) = delete; - }; - /** * Types of garbage collections that can be requested via * RequestGarbageCollectionForTesting. @@ -563,6 +544,9 @@ class V8_EXPORT Isolate { kWasmExnRef = 138, kWasmTypedFuncRef = 139, kInvalidatedStringWrapperToPrimitiveProtector = 140, + kDocumentAllLegacyCall = 141, + kDocumentAllLegacyConstruct = 142, + kConsoleContext = 143, // If you add new values here, you'll also need to update Chromium's: // web_feature.mojom, use_counter_callback.cc, and enums.xml. V8 changes to @@ -580,6 +564,21 @@ class V8_EXPORT Isolate { kMessageWarning, }; + // The different priorities that an isolate can have. + enum class Priority { + // The isolate does not relate to content that is currently important + // to the user. Lowest priority. + kBestEffort, + + // The isolate contributes to content that is visible to the user, like a + // visible iframe that's not interacted directly with. High priority. + kUserVisible, + + // The isolate contributes to content that is of the utmost importance to + // the user, like visible content in the focused window. Highest priority. + kUserBlocking, + }; + using UseCounterCallback = void (*)(Isolate* isolate, UseCounterFeature feature); @@ -691,6 +690,11 @@ class V8_EXPORT Isolate { */ void SetPrepareStackTraceCallback(PrepareStackTraceCallback callback); + /** + * Get the stackTraceLimit property of Error. + */ + int GetStackTraceLimit(); + #if defined(V8_OS_WIN) /** * This specifies the callback called when an ETW tracing session starts. @@ -1273,6 +1277,15 @@ class V8_EXPORT Isolate { */ void SetPromiseRejectCallback(PromiseRejectCallback callback); + /** + * This is a part of experimental Api and might be changed without further + * notice. + * Do not use it. + * + * Set callback to notify about a new exception being thrown. + */ + void SetExceptionPropagationCallback(ExceptionPropagationCallback callback); + /** * Runs the default MicrotaskQueue until it gets empty and perform other * microtask checkpoint steps, such as calling ClearKeptObjects. Asserts that @@ -1362,24 +1375,6 @@ class V8_EXPORT Isolate { */ void SetAddCrashKeyCallback(AddCrashKeyCallback); - /** - * Optional notification that the embedder is idle. - * V8 uses the notification to perform garbage collection. - * This call can be used repeatedly if the embedder remains idle. - * Returns true if the embedder should stop calling IdleNotificationDeadline - * until real work has been done. This indicates that V8 has done - * as much cleanup as it will be able to do. - * - * The deadline_in_seconds argument specifies the deadline V8 has to finish - * garbage collection work. deadline_in_seconds is compared with - * MonotonicallyIncreasingTime() and should be based on the same timebase as - * that function. There is no guarantee that the actual work will be done - * within the time limit. - */ - V8_DEPRECATE_SOON( - "Use MemoryPressureNotification() to influence the GC schedule.") - bool IdleNotificationDeadline(double deadline_in_seconds); - /** * Optional notification that the system is running low on memory. * V8 uses these notifications to attempt to free memory. @@ -1401,14 +1396,22 @@ class V8_EXPORT Isolate { * Optional notification that the isolate switched to the foreground. * V8 uses these notifications to guide heuristics. */ + V8_DEPRECATE_SOON("Use SetPriority(Priority::kUserBlocking) instead") void IsolateInForegroundNotification(); /** * Optional notification that the isolate switched to the background. * V8 uses these notifications to guide heuristics. */ + V8_DEPRECATE_SOON("Use SetPriority(Priority::kBestEffort) instead") void IsolateInBackgroundNotification(); + /** + * Optional notification that the isolate changed `priority`. + * V8 uses the priority value to guide heuristics. + */ + void SetPriority(Priority priority); + /** * Optional notification to tell V8 the current performance requirements * of the embedder based on RAIL. @@ -1592,6 +1595,9 @@ class V8_EXPORT Isolate { * Register callback to control whether compile hints magic comments are * enabled. */ + V8_DEPRECATED( + "Will be removed, use ScriptCompiler::CompileOptions for enabling the " + "compile hints magic comments") void SetJavaScriptCompileHintsMagicEnabledCallback( JavaScriptCompileHintsMagicEnabledCallback callback); @@ -1656,7 +1662,7 @@ class V8_EXPORT Isolate { * heap. GC is not invoked prior to iterating, therefore there is no * guarantee that visited objects are still alive. */ - V8_DEPRECATE_SOON("Will be removed without replacement. crbug.com/v8/14172") + V8_DEPRECATED("Will be removed without replacement. crbug.com/v8/14172") void VisitExternalResources(ExternalResourceVisitor* visitor); /** diff --git a/deps/v8/include/v8-local-handle.h b/deps/v8/include/v8-local-handle.h index fd543ae3aaa4fa..98feeeba76d47a 100644 --- a/deps/v8/include/v8-local-handle.h +++ b/deps/v8/include/v8-local-handle.h @@ -51,8 +51,6 @@ class Isolate; class Object; template class PersistentValueMapBase; -template -class PersistentValueVector; class Primitive; class Private; template @@ -382,8 +380,6 @@ class V8_TRIVIAL_ABI Local : public LocalBase, friend class InternalEscapableScope; template friend class PersistentValueMapBase; - template - friend class PersistentValueVector; template friend class ReturnValue; template @@ -439,12 +435,12 @@ class V8_TRIVIAL_ABI LocalUnchecked : public Local { // In this case, the check is also enforced in the copy constructor and we // need to suppress it. LocalUnchecked(const LocalUnchecked& other) - : Local(other, Local::do_not_check) {} - LocalUnchecked& operator=(const LocalUnchecked&) = default; + : Local(other, Local::do_not_check) noexcept {} + LocalUnchecked& operator=(const LocalUnchecked&) noexcept = default; #endif // Implicit conversion from Local. - LocalUnchecked(const Local& other) // NOLINT(runtime/explicit) + LocalUnchecked(const Local& other) noexcept // NOLINT(runtime/explicit) : Local(other, Local::do_not_check) {} }; @@ -460,8 +456,10 @@ class StrongRootAllocator> : public StrongRootAllocatorBase { static_assert(sizeof(value_type) == sizeof(Address)); explicit StrongRootAllocator(Heap* heap) : StrongRootAllocatorBase(heap) {} - explicit StrongRootAllocator(v8::Isolate* isolate) + explicit StrongRootAllocator(Isolate* isolate) : StrongRootAllocatorBase(isolate) {} + explicit StrongRootAllocator(v8::Isolate* isolate) + : StrongRootAllocatorBase(reinterpret_cast(isolate)) {} template StrongRootAllocator(const StrongRootAllocator& other) noexcept : StrongRootAllocatorBase(other) {} @@ -560,6 +558,7 @@ class LocalVector { LocalVector& operator=(std::initializer_list> init) { backing_.clear(); + backing_.reserve(init.size()); backing_.insert(backing_.end(), init.begin(), init.end()); return *this; } diff --git a/deps/v8/include/v8-message.h b/deps/v8/include/v8-message.h index 8f49a06dfa8080..9f933358792f0d 100644 --- a/deps/v8/include/v8-message.h +++ b/deps/v8/include/v8-message.h @@ -61,27 +61,6 @@ class ScriptOriginOptions { */ class V8_EXPORT ScriptOrigin { public: - V8_DEPRECATE_SOON("Use constructor without the isolate.") - V8_INLINE ScriptOrigin(Isolate* isolate, Local resource_name, - int resource_line_offset = 0, - int resource_column_offset = 0, - bool resource_is_shared_cross_origin = false, - int script_id = -1, - Local source_map_url = Local(), - bool resource_is_opaque = false, bool is_wasm = false, - bool is_module = false, - Local host_defined_options = Local()) - : resource_name_(resource_name), - resource_line_offset_(resource_line_offset), - resource_column_offset_(resource_column_offset), - options_(resource_is_shared_cross_origin, resource_is_opaque, is_wasm, - is_module), - script_id_(script_id), - source_map_url_(source_map_url), - host_defined_options_(host_defined_options) { - VerifyHostDefinedOptions(); - } - V8_INLINE ScriptOrigin(Local resource_name, int resource_line_offset = 0, int resource_column_offset = 0, diff --git a/deps/v8/include/v8-metrics.h b/deps/v8/include/v8-metrics.h index 46bc4679c5c83f..9e77744bb29d68 100644 --- a/deps/v8/include/v8-metrics.h +++ b/deps/v8/include/v8-metrics.h @@ -55,6 +55,10 @@ struct GarbageCollectionFullCycle { double efficiency_cpp_in_bytes_per_us = -1.0; double main_thread_efficiency_in_bytes_per_us = -1.0; double main_thread_efficiency_cpp_in_bytes_per_us = -1.0; + double collection_weight_in_percent = -1.0; + double collection_weight_cpp_in_percent = -1.0; + double main_thread_collection_weight_in_percent = -1.0; + double main_thread_collection_weight_cpp_in_percent = -1.0; int64_t incremental_marking_start_stop_wall_clock_duration_in_us = -1; }; diff --git a/deps/v8/include/v8-microtask-queue.h b/deps/v8/include/v8-microtask-queue.h index 85d227fa3fdce6..135dfb06a3bdd1 100644 --- a/deps/v8/include/v8-microtask-queue.h +++ b/deps/v8/include/v8-microtask-queue.h @@ -118,11 +118,6 @@ class V8_EXPORT V8_NODISCARD MicrotasksScope { public: enum Type { kRunMicrotasks, kDoNotRunMicrotasks }; - V8_DEPRECATE_SOON( - "May be incorrect if context was created with non-default microtask " - "queue") - MicrotasksScope(Isolate* isolate, Type type); - MicrotasksScope(Local context, Type type); MicrotasksScope(Isolate* isolate, MicrotaskQueue* microtask_queue, Type type); ~MicrotasksScope(); diff --git a/deps/v8/include/v8-object.h b/deps/v8/include/v8-object.h index 6cdf53b19c7d05..d03b33acd7c83e 100644 --- a/deps/v8/include/v8-object.h +++ b/deps/v8/include/v8-object.h @@ -5,10 +5,12 @@ #ifndef INCLUDE_V8_OBJECT_H_ #define INCLUDE_V8_OBJECT_H_ +#include "v8-internal.h" // NOLINT(build/include_directory) #include "v8-local-handle.h" // NOLINT(build/include_directory) #include "v8-maybe.h" // NOLINT(build/include_directory) #include "v8-persistent-handle.h" // NOLINT(build/include_directory) #include "v8-primitive.h" // NOLINT(build/include_directory) +#include "v8-sandbox.h" // NOLINT(build/include_directory) #include "v8-traced-handle.h" // NOLINT(build/include_directory) #include "v8-value.h" // NOLINT(build/include_directory) #include "v8config.h" // NOLINT(build/include_directory) @@ -146,18 +148,13 @@ enum PropertyAttribute { }; /** - * Accessor[Getter|Setter] are used as callback functions when - * setting|getting a particular property. See Object and ObjectTemplate's - * method SetAccessor. + * Accessor[Getter|Setter] are used as callback functions when setting|getting + * a particular data property. See Object::SetNativeDataProperty and + * ObjectTemplate::SetNativeDataProperty methods. */ -using AccessorGetterCallback = - void (*)(Local property, const PropertyCallbackInfo& info); using AccessorNameGetterCallback = void (*)(Local property, const PropertyCallbackInfo& info); -using AccessorSetterCallback = void (*)(Local property, - Local value, - const PropertyCallbackInfo& info); using AccessorNameSetterCallback = void (*)(Local property, Local value, const PropertyCallbackInfo& info); @@ -170,9 +167,11 @@ using AccessorNameSetterCallback = * the kind of cross-context access that should be allowed. * */ -enum AccessControl { - DEFAULT = 0, -}; +enum V8_DEPRECATE_SOON( + "This enum is no longer used and will be removed in V8 12.9.") + AccessControl { + DEFAULT V8_ENUM_DEPRECATE_SOON("not used") = 0, + }; /** * Property filter bits. They can be or'ed to build a composite filter. @@ -239,6 +238,9 @@ class V8_EXPORT Object : public Value { */ V8_WARN_UNUSED_RESULT Maybe Set(Local context, Local key, Local value); + V8_WARN_UNUSED_RESULT Maybe Set(Local context, + Local key, Local value, + MaybeLocal receiver); V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index, Local value); @@ -294,6 +296,9 @@ class V8_EXPORT Object : public Value { V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context, Local key); + V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context, + Local key, + MaybeLocal receiver); V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context, uint32_t index); @@ -339,17 +344,10 @@ class V8_EXPORT Object : public Value { V8_WARN_UNUSED_RESULT Maybe Delete(Local context, uint32_t index); - V8_DEPRECATE_SOON("Use SetNativeDataProperty instead") - V8_WARN_UNUSED_RESULT Maybe SetAccessor( - Local context, Local name, - AccessorNameGetterCallback getter, - AccessorNameSetterCallback setter = nullptr, - MaybeLocal data = MaybeLocal(), - AccessControl deprecated_settings = DEFAULT, - PropertyAttribute attribute = None, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, - SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); - + /** + * Sets an accessor property like Template::SetAccessorProperty, but + * this method sets on this object directly. + */ void SetAccessorProperty(Local name, Local getter, Local setter = Local(), PropertyAttribute attributes = None); @@ -429,16 +427,41 @@ class V8_EXPORT Object : public Value { * be skipped by __proto__ and it does not consult the security * handler. */ + V8_DEPRECATE_SOON( + "V8 will stop providing access to hidden prototype (i.e. " + "JSGlobalObject). Use GetPrototypeV2() instead. " + "See http://crbug.com/333672197.") Local GetPrototype(); + /** + * Get the prototype object (same as getting __proto__ property). This does + * not consult the security handler. + * TODO(333672197): rename back to GetPrototype() once the old version goes + * through the deprecation process and is removed. + */ + Local GetPrototypeV2(); + /** * Set the prototype object. This does not skip objects marked to * be skipped by __proto__ and it does not consult the security * handler. */ + V8_DEPRECATE_SOON( + "V8 will stop providing access to hidden prototype (i.e. " + "JSGlobalObject). Use SetPrototypeV2() instead. " + "See http://crbug.com/333672197.") V8_WARN_UNUSED_RESULT Maybe SetPrototype(Local context, Local prototype); + /** + * Set the prototype object (same as setting __proto__ property). This does + * does not consult the security handler. + * TODO(333672197): rename back to SetPrototype() once the old version goes + * through the deprecation process and is removed. + */ + V8_WARN_UNUSED_RESULT Maybe SetPrototypeV2(Local context, + Local prototype); + /** * Finds an instance of the given function template in the prototype * chain. @@ -526,7 +549,72 @@ class V8_EXPORT Object : public Value { void* values[]); /** - * HasOwnProperty() is like JavaScript's Object.prototype.hasOwnProperty(). + * Unwraps a JS wrapper object. + * + * \param tag The tag for retrieving the wrappable instance. Must match the + * tag that has been used for a previous `Wrap()` operation. + * \param isolate The Isolate for the `wrapper` object. + * \param wrapper The JS wrapper object that should be unwrapped. + * \returns the C++ wrappable instance, or nullptr if the JS object has never + * been wrapped. + */ + template + static V8_INLINE T* Unwrap(v8::Isolate* isolate, + const v8::Local& wrapper); + template + static V8_INLINE T* Unwrap(v8::Isolate* isolate, + const PersistentBase& wrapper); + template + static V8_INLINE T* Unwrap(v8::Isolate* isolate, + const BasicTracedReference& wrapper); + + template + static V8_INLINE T* Unwrap(v8::Isolate* isolate, + const v8::Local& wrapper, + CppHeapPointerTagRange tag_range); + template + static V8_INLINE T* Unwrap(v8::Isolate* isolate, + const PersistentBase& wrapper, + CppHeapPointerTagRange tag_range); + template + static V8_INLINE T* Unwrap(v8::Isolate* isolate, + const BasicTracedReference& wrapper, + CppHeapPointerTagRange tag_range); + + /** + * Wraps a JS wrapper with a C++ instance. + * + * \param tag The pointer tag that should be used for storing this object. + * Future `Unwrap()` operations must provide a matching tag. + * \param isolate The Isolate for the `wrapper` object. + * \param wrapper The JS wrapper object. + * \param wrappable The C++ object instance that is wrapped by the JS object. + */ + template + static V8_INLINE void Wrap(v8::Isolate* isolate, + const v8::Local& wrapper, + void* wrappable); + template + static V8_INLINE void Wrap(v8::Isolate* isolate, + const PersistentBase& wrapper, + void* wrappable); + template + static V8_INLINE void Wrap(v8::Isolate* isolate, + const BasicTracedReference& wrapper, + void* wrappable); + static V8_INLINE void Wrap(v8::Isolate* isolate, + const v8::Local& wrapper, + void* wrappable, CppHeapPointerTag tag); + static V8_INLINE void Wrap(v8::Isolate* isolate, + const PersistentBase& wrapper, + void* wrappable, CppHeapPointerTag tag); + static V8_INLINE void Wrap(v8::Isolate* isolate, + const BasicTracedReference& wrapper, + void* wrappable, CppHeapPointerTag tag); + + /** + * HasOwnProperty() is like JavaScript's + * Object.prototype.hasOwnProperty(). * * See also v8::Object::Has() and v8::Object::HasRealNamedProperty(). */ @@ -610,12 +698,16 @@ class V8_EXPORT Object : public Value { /** * Returns the context in which the object was created. + * Prefer using version with Isolate parameter. */ + MaybeLocal GetCreationContext(v8::Isolate* isolate); MaybeLocal GetCreationContext(); /** - * Shortcut for GetCreationContext().ToLocalChecked(). + * Shortcut for GetCreationContext(...).ToLocalChecked(). + * Prefer using version with Isolate parameter. **/ + Local GetCreationContextChecked(v8::Isolate* isolate); Local GetCreationContextChecked(); /** Same as above, but works for Persistents */ @@ -634,7 +726,12 @@ class V8_EXPORT Object : public Value { * try to expand the embedder data attached to the context. * In case the Local is already available because of other reasons, * it's fine to keep using Context::GetAlignedPointerFromEmbedderData(). + * + * Prefer using version with Isolate parameter if you have an Isolate, + * otherwise use the other one. */ + void* GetAlignedPointerFromEmbedderDataInCreationContext(v8::Isolate* isolate, + int index); void* GetAlignedPointerFromEmbedderDataInCreationContext(int index); /** @@ -650,11 +747,15 @@ class V8_EXPORT Object : public Value { bool IsConstructor() const; /** - * True if this object can carry information relevant to the embedder in its - * embedder fields, false otherwise. This is generally true for objects - * constructed through function templates but also holds for other types where - * V8 automatically adds internal fields at compile time, such as e.g. - * v8::ArrayBuffer. + * Returns true if this object can be generally used to wrap object objects. + * This means that the object either follows the convention of using embedder + * fields to denote type/instance pointers or is using the Wrap()/Unwrap() + * APIs for the same purpose. Returns false otherwise. + * + * Note that there may be other objects that use embedder fields but are not + * used as API wrapper objects. E.g., v8::Promise may in certain configuration + * use embedder fields but promises are not generally supported as API + * wrappers. The method will return false in those cases. */ bool IsApiWrapper() const; @@ -729,6 +830,11 @@ class V8_EXPORT Object : public Value { bool IsCodeLike(Isolate* isolate) const; private: + static void* Unwrap(v8::Isolate* isolate, internal::Address wrapper_obj, + CppHeapPointerTagRange tag_range); + static void Wrap(v8::Isolate* isolate, internal::Address wrapper_obj, + CppHeapPointerTag tag, void* wrappable); + Object(); static void CheckCast(Value* obj); Local SlowGetInternalField(int index); @@ -747,7 +853,8 @@ Local Object::GetInternalField(int index) { // know where to find the internal fields and can return the value directly. int instance_type = I::GetInstanceType(obj); if (I::CanHaveInternalField(instance_type)) { - int offset = I::kJSObjectHeaderSize + (I::kEmbedderDataSlotSize * index); + int offset = I::kJSAPIObjectWithEmbedderSlotsHeaderSize + + (I::kEmbedderDataSlotSize * index); A value = I::ReadRawField(obj, offset); #ifdef V8_COMPRESS_POINTERS // We read the full pointer value and then decompress it in order to avoid @@ -773,7 +880,8 @@ void* Object::GetAlignedPointerFromInternalField(v8::Isolate* isolate, // know where to find the internal fields and can return the value directly. auto instance_type = I::GetInstanceType(obj); if (V8_LIKELY(I::CanHaveInternalField(instance_type))) { - int offset = I::kJSObjectHeaderSize + (I::kEmbedderDataSlotSize * index) + + int offset = I::kJSAPIObjectWithEmbedderSlotsHeaderSize + + (I::kEmbedderDataSlotSize * index) + I::kEmbedderDataSlotExternalPointerOffset; A value = I::ReadExternalPointerField( @@ -793,7 +901,8 @@ void* Object::GetAlignedPointerFromInternalField(int index) { // know where to find the internal fields and can return the value directly. auto instance_type = I::GetInstanceType(obj); if (V8_LIKELY(I::CanHaveInternalField(instance_type))) { - int offset = I::kJSObjectHeaderSize + (I::kEmbedderDataSlotSize * index) + + int offset = I::kJSAPIObjectWithEmbedderSlotsHeaderSize + + (I::kEmbedderDataSlotSize * index) + I::kEmbedderDataSlotExternalPointerOffset; Isolate* isolate = I::GetIsolateForSandbox(obj); A value = @@ -805,6 +914,142 @@ void* Object::GetAlignedPointerFromInternalField(int index) { return SlowGetAlignedPointerFromInternalField(index); } +// static +template +T* Object::Unwrap(v8::Isolate* isolate, const v8::Local& wrapper) { + CppHeapPointerTagRange tag_range(tag, tag); + auto obj = internal::ValueHelper::ValueAsAddress(*wrapper); +#if !defined(V8_ENABLE_CHECKS) + return internal::ReadCppHeapPointerField( + isolate, obj, internal::Internals::kJSObjectHeaderSize, tag_range); +#else // defined(V8_ENABLE_CHECKS) + return reinterpret_cast(Unwrap(isolate, obj, tag_range)); +#endif // defined(V8_ENABLE_CHECKS) +} + +// static +template +T* Object::Unwrap(v8::Isolate* isolate, const PersistentBase& wrapper) { + CppHeapPointerTagRange tag_range(tag, tag); + auto obj = + internal::ValueHelper::ValueAsAddress(wrapper.template value()); +#if !defined(V8_ENABLE_CHECKS) + return internal::ReadCppHeapPointerField( + isolate, obj, internal::Internals::kJSObjectHeaderSize, tag_range); +#else // defined(V8_ENABLE_CHECKS) + return reinterpret_cast(Unwrap(isolate, obj, tag_range)); +#endif // defined(V8_ENABLE_CHECKS) +} + +// static +template +T* Object::Unwrap(v8::Isolate* isolate, + const BasicTracedReference& wrapper) { + CppHeapPointerTagRange tag_range(tag, tag); + auto obj = + internal::ValueHelper::ValueAsAddress(wrapper.template value()); +#if !defined(V8_ENABLE_CHECKS) + return internal::ReadCppHeapPointerField( + isolate, obj, internal::Internals::kJSObjectHeaderSize, tag_range); +#else // defined(V8_ENABLE_CHECKS) + return reinterpret_cast(Unwrap(isolate, obj, tag_range)); +#endif // defined(V8_ENABLE_CHECKS) +} + +// static +template +T* Object::Unwrap(v8::Isolate* isolate, const v8::Local& wrapper, + CppHeapPointerTagRange tag_range) { + auto obj = internal::ValueHelper::ValueAsAddress(*wrapper); +#if !defined(V8_ENABLE_CHECKS) + return internal::ReadCppHeapPointerField( + isolate, obj, internal::Internals::kJSObjectHeaderSize, tag_range); +#else // defined(V8_ENABLE_CHECKS) + return reinterpret_cast(Unwrap(isolate, obj, tag_range)); +#endif // defined(V8_ENABLE_CHECKS) +} + +// static +template +T* Object::Unwrap(v8::Isolate* isolate, const PersistentBase& wrapper, + CppHeapPointerTagRange tag_range) { + auto obj = + internal::ValueHelper::ValueAsAddress(wrapper.template value()); +#if !defined(V8_ENABLE_CHECKS) + return internal::ReadCppHeapPointerField( + isolate, obj, internal::Internals::kJSObjectHeaderSize, tag_range); +#else // defined(V8_ENABLE_CHECKS) + + return reinterpret_cast(Unwrap(isolate, obj, tag_range)); +#endif // defined(V8_ENABLE_CHECKS) +} + +// static +template +T* Object::Unwrap(v8::Isolate* isolate, + const BasicTracedReference& wrapper, + CppHeapPointerTagRange tag_range) { + auto obj = + internal::ValueHelper::ValueAsAddress(wrapper.template value()); +#if !defined(V8_ENABLE_CHECKS) + return internal::ReadCppHeapPointerField( + isolate, obj, internal::Internals::kJSObjectHeaderSize, tag_range); +#else // defined(V8_ENABLE_CHECKS) + return reinterpret_cast(Unwrap(isolate, obj, tag_range)); +#endif // defined(V8_ENABLE_CHECKS) +} + +// static +template +void Object::Wrap(v8::Isolate* isolate, const v8::Local& wrapper, + void* wrappable) { + auto obj = internal::ValueHelper::ValueAsAddress(*wrapper); + Wrap(isolate, obj, tag, wrappable); +} + +// static +template +void Object::Wrap(v8::Isolate* isolate, const PersistentBase& wrapper, + void* wrappable) { + auto obj = + internal::ValueHelper::ValueAsAddress(wrapper.template value()); + Wrap(isolate, obj, tag, wrappable); +} + +// static +template +void Object::Wrap(v8::Isolate* isolate, + const BasicTracedReference& wrapper, + void* wrappable) { + auto obj = + internal::ValueHelper::ValueAsAddress(wrapper.template value()); + Wrap(isolate, obj, tag, wrappable); +} + +// static +void Object::Wrap(v8::Isolate* isolate, const v8::Local& wrapper, + void* wrappable, CppHeapPointerTag tag) { + auto obj = internal::ValueHelper::ValueAsAddress(*wrapper); + Wrap(isolate, obj, tag, wrappable); +} + +// static +void Object::Wrap(v8::Isolate* isolate, const PersistentBase& wrapper, + void* wrappable, CppHeapPointerTag tag) { + auto obj = + internal::ValueHelper::ValueAsAddress(wrapper.template value()); + Wrap(isolate, obj, tag, wrappable); +} + +// static +void Object::Wrap(v8::Isolate* isolate, + const BasicTracedReference& wrapper, void* wrappable, + CppHeapPointerTag tag) { + auto obj = + internal::ValueHelper::ValueAsAddress(wrapper.template value()); + Wrap(isolate, obj, tag, wrappable); +} + Private* Private::Cast(Data* data) { #ifdef V8_ENABLE_CHECKS CheckCast(data); diff --git a/deps/v8/include/v8-persistent-handle.h b/deps/v8/include/v8-persistent-handle.h index 9db5af5dddd557..3067cb775fc7a8 100644 --- a/deps/v8/include/v8-persistent-handle.h +++ b/deps/v8/include/v8-persistent-handle.h @@ -15,8 +15,6 @@ namespace v8 { class Isolate; template class PersistentValueMapBase; -template -class PersistentValueVector; template class Global; template @@ -204,8 +202,6 @@ class PersistentBase : public api_internal::IndirectHandleBase { friend class ReturnValue; template friend class PersistentValueMapBase; - template - friend class PersistentValueVector; friend class Object; friend class internal::ValueHelper; @@ -236,21 +232,6 @@ class NonCopyablePersistentTraits { } }; -/** - * Helper class traits to allow copying and assignment of Persistent. - * This will clone the contents of storage cell, but not any of the flags, etc. - */ -template -struct CopyablePersistentTraits { - using CopyablePersistent = Persistent>; - static const bool kResetInDestructor = true; - template - static V8_INLINE void Copy(const Persistent& source, - CopyablePersistent* dest) { - // do nothing, just allow copy - } -}; - /** * A PersistentBase which allows copy and assignment. * diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h index 313c0287bcf882..56bfd7274826c0 100644 --- a/deps/v8/include/v8-platform.h +++ b/deps/v8/include/v8-platform.h @@ -79,8 +79,10 @@ class TaskRunner { * * Embedders should override PostTaskImpl instead of this. */ - virtual void PostTask(std::unique_ptr task) { - PostTaskImpl(std::move(task), SourceLocation::Current()); + void PostTask( + std::unique_ptr task, + const SourceLocation& location = SourceLocation::Current()) { + PostTaskImpl(std::move(task), location); } /** @@ -100,8 +102,10 @@ class TaskRunner { * * Embedders should override PostNonNestableTaskImpl instead of this. */ - virtual void PostNonNestableTask(std::unique_ptr task) { - PostNonNestableTaskImpl(std::move(task), SourceLocation::Current()); + void PostNonNestableTask( + std::unique_ptr task, + const SourceLocation& location = SourceLocation::Current()) { + PostNonNestableTaskImpl(std::move(task), location); } /** @@ -111,10 +115,10 @@ class TaskRunner { * * Embedders should override PostDelayedTaskImpl instead of this. */ - virtual void PostDelayedTask(std::unique_ptr task, - double delay_in_seconds) { - PostDelayedTaskImpl(std::move(task), delay_in_seconds, - SourceLocation::Current()); + void PostDelayedTask( + std::unique_ptr task, double delay_in_seconds, + const SourceLocation& location = SourceLocation::Current()) { + PostDelayedTaskImpl(std::move(task), delay_in_seconds, location); } /** @@ -135,10 +139,10 @@ class TaskRunner { * * Embedders should override PostNonNestableDelayedTaskImpl instead of this. */ - virtual void PostNonNestableDelayedTask(std::unique_ptr task, - double delay_in_seconds) { - PostNonNestableDelayedTaskImpl(std::move(task), delay_in_seconds, - SourceLocation::Current()); + void PostNonNestableDelayedTask( + std::unique_ptr task, double delay_in_seconds, + const SourceLocation& location = SourceLocation::Current()) { + PostNonNestableDelayedTaskImpl(std::move(task), delay_in_seconds, location); } /** @@ -151,8 +155,10 @@ class TaskRunner { * * Embedders should override PostIdleTaskImpl instead of this. */ - virtual void PostIdleTask(std::unique_ptr task) { - PostIdleTaskImpl(std::move(task), SourceLocation::Current()); + void PostIdleTask( + std::unique_ptr task, + const SourceLocation& location = SourceLocation::Current()) { + PostIdleTaskImpl(std::move(task), location); } /** @@ -389,7 +395,7 @@ class TracingController { /** * Adds a trace event to the platform tracing system. These function calls are - * usually the result of a TRACE_* macro from trace_event_common.h when + * usually the result of a TRACE_* macro from trace-event-no-perfetto.h when * tracing and the category of the particular trace are enabled. It is not * advisable to call these functions on their own; they are really only meant * to be used by the trace macros. The returned handle can be used by diff --git a/deps/v8/include/v8-primitive.h b/deps/v8/include/v8-primitive.h index eb0a791cf73946..1adb9cbcb22515 100644 --- a/deps/v8/include/v8-primitive.h +++ b/deps/v8/include/v8-primitive.h @@ -223,6 +223,12 @@ class V8_EXPORT String : public Name { */ bool IsExternalOneByte() const; + /** + * Returns the internalized string. See `NewStringType::kInternalized` for + * details on internalized strings. + */ + Local InternalizeString(Isolate* isolate); + class V8_EXPORT ExternalStringResourceBase { public: virtual ~ExternalStringResourceBase() = default; @@ -507,10 +513,15 @@ class V8_EXPORT String : public Name { * (e.g. due to an exception in the toString() method of the object) * then the length() method returns 0 and the * operator returns * NULL. + * + * WARNING: This will unconditionally copy the contents of the JavaScript + * string, and should be avoided in situations where performance is a concern. + * Consider using WriteUtf8() instead. */ class V8_EXPORT Utf8Value { public: - Utf8Value(Isolate* isolate, Local obj); + Utf8Value(Isolate* isolate, Local obj, + WriteOptions options = REPLACE_INVALID_UTF8); ~Utf8Value(); char* operator*() { return str_; } const char* operator*() const { return str_; } @@ -527,12 +538,19 @@ class V8_EXPORT String : public Name { /** * Converts an object to a two-byte (UTF-16-encoded) string. + * * If conversion to a string fails (eg. due to an exception in the toString() * method of the object) then the length() method returns 0 and the * operator * returns NULL. + * + * WARNING: This will unconditionally copy the contents of the JavaScript + * string, and should be avoided in situations where performance is a concern. */ class V8_EXPORT Value { public: + V8_DEPRECATE_SOON( + "Prefer using String::ValueView if you can, or string->Write to a " + "buffer if you cannot.") Value(Isolate* isolate, Local obj); ~Value(); uint16_t* operator*() { return str_; } @@ -548,6 +566,55 @@ class V8_EXPORT String : public Name { int length_; }; + /** + * Returns a view onto a string's contents. + * + * WARNING: This does not copy the string's contents, and will therefore be + * invalidated if the GC can move the string while the ValueView is alive. It + * is therefore required that no GC or allocation can happen while there is an + * active ValueView. This requirement may be relaxed in the future. + * + * V8 strings are either encoded as one-byte or two-bytes per character. + */ + class V8_EXPORT ValueView { + public: + ValueView(Isolate* isolate, Local str); + ~ValueView(); + const uint8_t* data8() const { +#if V8_ENABLE_CHECKS + CheckOneByte(true); +#endif + return data8_; + } + const uint16_t* data16() const { +#if V8_ENABLE_CHECKS + CheckOneByte(false); +#endif + return data16_; + } + int length() const { return length_; } + bool is_one_byte() const { return is_one_byte_; } + + // Disallow copying and assigning. + ValueView(const ValueView&) = delete; + void operator=(const ValueView&) = delete; + + private: + void CheckOneByte(bool is_one_byte) const; + + Local flat_str_; + union { + const uint8_t* data8_; + const uint16_t* data16_; + }; + int length_; + bool is_one_byte_; + // Avoid exposing the internal DisallowGarbageCollection scope. + alignas(internal::Internals:: + kDisallowGarbageCollectionAlign) char no_gc_debug_scope_ + [internal::Internals::kDisallowGarbageCollectionSize]; + }; + private: void VerifyExternalStringResourceBase(ExternalStringResourceBase* v, Encoding encoding) const; diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h index 3ec0cd4bb31318..3451da26ba2d6b 100644 --- a/deps/v8/include/v8-profiler.h +++ b/deps/v8/include/v8-profiler.h @@ -899,9 +899,28 @@ class V8_EXPORT EmbedderGraph { /** * Returns a node corresponding to the given V8 value. Ownership is not * transferred. The result pointer is valid while the graph is alive. + * + * For now the variant that takes v8::Data is not marked as abstract for + * compatibility, but embedders who subclass EmbedderGraph are expected to + * implement it. Then in the implementation of the variant that takes + * v8::Value, they can simply forward the call to the one that takes + * v8::Local. */ virtual Node* V8Node(const v8::Local& value) = 0; + /** + * Returns a node corresponding to the given V8 value. Ownership is not + * transferred. The result pointer is valid while the graph is alive. + * + * For API compatibility, this default implementation just checks that the + * data is a v8::Value and forward it to the variant that takes v8::Value, + * which is currently required to be implemented. In the future we'll remove + * the v8::Value variant, and make this variant that takes v8::Data abstract + * instead. If the embedder subclasses v8::EmbedderGraph and also use + * v8::TracedReference, they must override this variant. + */ + virtual Node* V8Node(const v8::Local& value); + /** * Adds the given node to the graph and takes ownership of the node. * Returns a raw pointer to the node that is valid while the graph is alive. @@ -956,7 +975,7 @@ class V8_EXPORT HeapProfiler { /** * Callback function invoked during heap snapshot generation to retrieve - * the detachedness state of an object referenced by a TracedReference. + * the detachedness state of a JS object referenced by a TracedReference. * * The callback takes Local as parameter to allow the embedder to * unpack the TracedReference into a Local and reuse that Local for different @@ -1179,6 +1198,18 @@ class V8_EXPORT HeapProfiler { void SetGetDetachednessCallback(GetDetachednessCallback callback, void* data); + /** + * Returns whether the heap profiler is currently taking a snapshot. + */ + bool IsTakingSnapshot(); + + /** + * Allocates a copy of the provided string within the heap snapshot generator + * and returns a pointer to the copy. May only be called during heap snapshot + * generation. + */ + const char* CopyNameForHeapSnapshot(const char* name); + /** * Default value of persistent handle class ID. Must not be used to * define a class. Can be used to reset a class of a persistent diff --git a/deps/v8/include/v8-promise.h b/deps/v8/include/v8-promise.h index 9da8e4b4e86f9a..8c127c8122a2ec 100644 --- a/deps/v8/include/v8-promise.h +++ b/deps/v8/include/v8-promise.h @@ -14,7 +14,7 @@ namespace v8 { class Context; #ifndef V8_PROMISE_INTERNAL_FIELD_COUNT -// The number of required internal fields can be defined by embedder. +// Defined using gn arg `v8_promise_internal_field_count`. #define V8_PROMISE_INTERNAL_FIELD_COUNT 0 #endif @@ -115,7 +115,7 @@ class V8_EXPORT Promise : public Object { return static_cast(value); } - static const int kEmbedderFieldCount = V8_PROMISE_INTERNAL_FIELD_COUNT; + static constexpr int kEmbedderFieldCount = V8_PROMISE_INTERNAL_FIELD_COUNT; private: Promise(); diff --git a/deps/v8/include/v8-sandbox.h b/deps/v8/include/v8-sandbox.h new file mode 100644 index 00000000000000..6e93d4ae62167c --- /dev/null +++ b/deps/v8/include/v8-sandbox.h @@ -0,0 +1,173 @@ +// Copyright 2024 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef INCLUDE_V8_SANDBOX_H_ +#define INCLUDE_V8_SANDBOX_H_ + +#include + +#include "v8-internal.h" // NOLINT(build/include_directory) +#include "v8config.h" // NOLINT(build/include_directory) + +namespace v8 { + +/** + * A pointer tag used for wrapping and unwrapping `CppHeap` pointers as used + * with JS API wrapper objects that rely on `v8::Object::Wrap()` and + * `v8::Object::Unwrap()`. + * + * The CppHeapPointers use a range-based type checking scheme, where on access + * to a pointer, the actual type of the pointer is checked to be within a + * specified range of types. This allows supporting type hierarchies, where a + * type check for a supertype must succeed for any subtype. + * + * The tag is currently in practice limited to 15 bits since it needs to fit + * together with a marking bit into the unused parts of a pointer (the top 16 + * bits). + */ +enum class CppHeapPointerTag : uint16_t { + kFirstTag = 0, + kNullTag = 0, + + /** + * The lower type ids are reserved for the embedder to assign. For that, the + * main requirement is that all (transitive) child classes of a given parent + * class have type ids in the same range, and that there are no unrelated + * types in that range. For example, given the following type hierarchy: + * + * A F + * / \ + * B E + * / \ + * C D + * + * a potential type id assignment that satistifes these requirements is + * {C: 0, D: 1, B: 2, A: 3, E: 4, F: 5}. With that, the type check for type A + * would check for the range [0, 4], while the check for B would check range + * [0, 2], and for F it would simply check [5, 5]. + * + * In addition, there is an option for performance tweaks: if the size of the + * type range corresponding to a supertype is a power of two and starts at a + * power of two (e.g. [0x100, 0x13f]), then the compiler can often optimize + * the type check to use even fewer instructions (essentially replace a AND + + * SUB with a single AND). + */ + + kDefaultTag = 0x7000, + + kZappedEntryTag = 0x7ffd, + kEvacuationEntryTag = 0x7ffe, + kFreeEntryTag = 0x7fff, + // The tags are limited to 15 bits, so the last tag is 0x7fff. + kLastTag = 0x7fff, +}; + +// Convenience struct to represent tag ranges. This is used for type checks +// against supertypes, which cover a range of types (their subtypes). +// Both the lower- and the upper bound are inclusive. In other words, this +// struct represents the range [lower_bound, upper_bound]. +struct CppHeapPointerTagRange { + constexpr CppHeapPointerTagRange(CppHeapPointerTag lower, + CppHeapPointerTag upper) + : lower_bound(lower), upper_bound(upper) {} + CppHeapPointerTag lower_bound; + CppHeapPointerTag upper_bound; + + // Check whether the tag of the given CppHeapPointerTable entry is within + // this range. This method encodes implementation details of the + // CppHeapPointerTable, which is necessary as it is used by + // ReadCppHeapPointerField below. + // Returns true if the check is successful and the tag of the given entry is + // within this range, false otherwise. + bool CheckTagOf(uint64_t entry) { + // Note: the cast to uint32_t is important here. Otherwise, the uint16_t's + // would be promoted to int in the range check below, which would result in + // undefined behavior (signed integer undeflow) if the actual value is less + // than the lower bound. Then, the compiler would take advantage of the + // undefined behavior and turn the range check into a simple + // `actual_tag <= last_tag` comparison, which is incorrect. + uint32_t actual_tag = static_cast(entry); + // The actual_tag is shifted to the left by one and contains the marking + // bit in the LSB. To ignore that during the type check, simply add one to + // the (shifted) range. + constexpr int kTagShift = internal::kCppHeapPointerTagShift; + uint32_t first_tag = static_cast(lower_bound) << kTagShift; + uint32_t last_tag = (static_cast(upper_bound) << kTagShift) + 1; + return actual_tag >= first_tag && actual_tag <= last_tag; + } +}; + +constexpr CppHeapPointerTagRange kAnyCppHeapPointer( + CppHeapPointerTag::kFirstTag, CppHeapPointerTag::kLastTag); + +class SandboxHardwareSupport { + public: + /** + * Initialize sandbox hardware support. This needs to be called before + * creating any thread that might access sandbox memory since it sets up + * hardware permissions to the memory that will be inherited on clone. + */ + V8_EXPORT static void InitializeBeforeThreadCreation(); +}; + +namespace internal { + +#ifdef V8_COMPRESS_POINTERS +V8_INLINE static Address* GetCppHeapPointerTableBase(v8::Isolate* isolate) { + Address addr = reinterpret_cast
(isolate) + + Internals::kIsolateCppHeapPointerTableOffset + + Internals::kExternalPointerTableBasePointerOffset; + return *reinterpret_cast(addr); +} +#endif // V8_COMPRESS_POINTERS + +template +V8_INLINE static T* ReadCppHeapPointerField(v8::Isolate* isolate, + Address heap_object_ptr, int offset, + CppHeapPointerTagRange tag_range) { +#ifdef V8_COMPRESS_POINTERS + // See src/sandbox/cppheap-pointer-table-inl.h. Logic duplicated here so + // it can be inlined and doesn't require an additional call. + const CppHeapPointerHandle handle = + Internals::ReadRawField(heap_object_ptr, offset); + const uint32_t index = handle >> kExternalPointerIndexShift; + const Address* table = GetCppHeapPointerTableBase(isolate); + const std::atomic
* ptr = + reinterpret_cast*>(&table[index]); + Address entry = std::atomic_load_explicit(ptr, std::memory_order_relaxed); + + Address pointer = entry; + if (V8_LIKELY(tag_range.CheckTagOf(entry))) { + pointer = entry >> kCppHeapPointerPayloadShift; + } else { + // If the type check failed, we simply return nullptr here. That way: + // 1. The null handle always results in nullptr being returned here, which + // is a desired property. Otherwise, we would need an explicit check for + // the null handle above, and therefore an additional branch. This + // works because the 0th entry of the table always contains nullptr + // tagged with the null tag (i.e. an all-zeros entry). As such, + // regardless of whether the type check succeeds, the result will + // always be nullptr. + // 2. The returned pointer is guaranteed to crash even on platforms with + // top byte ignore (TBI), such as Arm64. The alternative would be to + // simply return the original entry with the left-shifted payload. + // However, due to TBI, an access to that may not always result in a + // crash (specifically, if the second most significant byte happens to + // be zero). In addition, there shouldn't be a difference on Arm64 + // between returning nullptr or the original entry, since it will + // simply compile to a `csel x0, x8, xzr, lo` instead of a + // `csel x0, x10, x8, lo` instruction. + pointer = 0; + } + return reinterpret_cast(pointer); +#else // !V8_COMPRESS_POINTERS + return reinterpret_cast( + Internals::ReadRawField
(heap_object_ptr, offset)); +#endif // !V8_COMPRESS_POINTERS +} + +} // namespace internal +} // namespace v8 + +#endif // INCLUDE_V8_SANDBOX_H_ diff --git a/deps/v8/include/v8-script.h b/deps/v8/include/v8-script.h index 75589863d9d1c7..f4c7412c5bf6e5 100644 --- a/deps/v8/include/v8-script.h +++ b/deps/v8/include/v8-script.h @@ -322,6 +322,14 @@ class V8_EXPORT Module : public Data { static void CheckCast(Data* obj); }; +class V8_EXPORT CompileHintsCollector : public Data { + public: + /** + * Returns the positions of lazy functions which were compiled and executed. + */ + std::vector GetCompileHints(Isolate* isolate) const; +}; + /** * A compiled JavaScript script, tied to a Context which was active when the * script was compiled. @@ -359,7 +367,15 @@ class V8_EXPORT Script : public Data { * If the script was compiled, returns the positions of lazy functions which * were eventually compiled and executed. */ + V8_DEPRECATE_SOON("Use GetCompileHintsCollector instead") std::vector GetProducedCompileHints() const; + + /** + * Get a compile hints collector object which we can use later for retrieving + * compile hints (= positions of lazy functions which were compiled and + * executed). + */ + Local GetCompileHintsCollector() const; }; enum class ScriptType { kClassic, kModule }; @@ -640,12 +656,33 @@ class V8_EXPORT ScriptCompiler { enum CompileOptions { kNoCompileOptions = 0, - kConsumeCodeCache, - kEagerCompile, - kProduceCompileHints, - kConsumeCompileHints + kConsumeCodeCache = 1 << 0, + kEagerCompile = 1 << 1, + kProduceCompileHints = 1 << 2, + kConsumeCompileHints = 1 << 3, + kFollowCompileHintsMagicComment = 1 << 4, }; + static inline bool CompileOptionsIsValid(CompileOptions compile_options) { + // kConsumeCodeCache is mutually exclusive with all other flag bits. + if ((compile_options & kConsumeCodeCache) && + compile_options != kConsumeCodeCache) { + return false; + } + // kEagerCompile is mutually exclusive with all other flag bits. + if ((compile_options & kEagerCompile) && compile_options != kEagerCompile) { + return false; + } + // We don't currently support producing and consuming compile hints at the + // same time. + constexpr int produce_and_consume = CompileOptions::kProduceCompileHints | + CompileOptions::kConsumeCompileHints; + if ((compile_options & produce_and_consume) == produce_and_consume) { + return false; + } + return true; + } + /** * The reason for which we are not requesting or providing a code cache. */ @@ -722,6 +759,8 @@ class V8_EXPORT ScriptCompiler { static ConsumeCodeCacheTask* StartConsumingCodeCache( Isolate* isolate, std::unique_ptr source); + static ConsumeCodeCacheTask* StartConsumingCodeCacheOnBackground( + Isolate* isolate, std::unique_ptr source); /** * Compiles a streamed script (bound to current context). @@ -787,15 +826,6 @@ class V8_EXPORT ScriptCompiler { * It is possible to specify multiple context extensions (obj in the above * example). */ - V8_DEPRECATED("Use CompileFunction") - static V8_WARN_UNUSED_RESULT MaybeLocal CompileFunctionInContext( - Local context, Source* source, size_t arguments_count, - Local arguments[], size_t context_extension_count, - Local context_extensions[], - CompileOptions options = kNoCompileOptions, - NoCacheReason no_cache_reason = kNoCacheNoReason, - Local* script_or_module_out = nullptr); - static V8_WARN_UNUSED_RESULT MaybeLocal CompileFunction( Local context, Source* source, size_t arguments_count = 0, Local arguments[] = nullptr, size_t context_extension_count = 0, diff --git a/deps/v8/include/v8-snapshot.h b/deps/v8/include/v8-snapshot.h index 9e5a53f134a82c..8c8390bab18f36 100644 --- a/deps/v8/include/v8-snapshot.h +++ b/deps/v8/include/v8-snapshot.h @@ -68,6 +68,22 @@ struct SerializeContextDataCallback { void* data; }; +/** + * Similar to `SerializeInternalFieldsCallback`, but is used exclusively to + * serialize API wrappers. The pointers for API wrappers always point into the + * CppHeap. + */ +struct SerializeAPIWrapperCallback { + using CallbackFunction = StartupData (*)(Local holder, + void* cpp_heap_pointer, void* data); + explicit SerializeAPIWrapperCallback(CallbackFunction function = nullptr, + void* data = nullptr) + : callback(function), data(data) {} + + CallbackFunction callback; + void* data; +}; + /** * Callback and supporting data used to implement embedder logic to deserialize * internal fields of v8::Objects. @@ -97,6 +113,17 @@ struct DeserializeContextDataCallback { void* data; }; +struct DeserializeAPIWrapperCallback { + using CallbackFunction = void (*)(Local holder, StartupData payload, + void* data); + explicit DeserializeAPIWrapperCallback(CallbackFunction function = nullptr, + void* data = nullptr) + : callback(function), data(data) {} + + CallbackFunction callback; + void* data; +}; + /** * Helper class to create a snapshot data blob. * @@ -187,13 +214,17 @@ class V8_EXPORT SnapshotCreator { * context embedder data set by * v8::Context::SetAlignedPointerInEmbedderData(). * + * \param api_wrapper_serializer An optional callback used to serialize API + * wrapper references set via `v8::Object::Wrap()`. */ void SetDefaultContext( Local context, SerializeInternalFieldsCallback internal_fields_serializer = SerializeInternalFieldsCallback(), SerializeContextDataCallback context_data_serializer = - SerializeContextDataCallback()); + SerializeContextDataCallback(), + SerializeAPIWrapperCallback api_wrapper_serializer = + SerializeAPIWrapperCallback()); /** * Add additional context to be included in the snapshot blob. @@ -204,12 +235,17 @@ class V8_EXPORT SnapshotCreator { * * \param context_data_serializer Similar to context_data_serializer * in SetDefaultContext() but only applies to the context being added. + * + * \param api_wrapper_serializer Similar to api_wrapper_serializer + * in SetDefaultContext() but only applies to the context being added. */ size_t AddContext(Local context, SerializeInternalFieldsCallback internal_fields_serializer = SerializeInternalFieldsCallback(), SerializeContextDataCallback context_data_serializer = - SerializeContextDataCallback()); + SerializeContextDataCallback(), + SerializeAPIWrapperCallback api_wrapper_serializer = + SerializeAPIWrapperCallback()); /** * Attach arbitrary V8::Data to the context snapshot, which can be retrieved diff --git a/deps/v8/include/v8-template.h b/deps/v8/include/v8-template.h index 6a0c898f4507d2..ba5ff7bff5ada9 100644 --- a/deps/v8/include/v8-template.h +++ b/deps/v8/include/v8-template.h @@ -60,6 +60,22 @@ class V8_EXPORT Template : public Data { V8_INLINE void Set(Isolate* isolate, const char* name, Local value, PropertyAttribute attributes = None); + /** + * Sets an "accessor property" on the object template, see + * https://tc39.es/ecma262/#sec-object-type. + * + * Whenever the property with the given name is accessed on objects + * created from this ObjectTemplate the getter and setter functions + * are called. + * + * \param name The name of the property for which an accessor is added. + * \param getter The callback to invoke when getting the property. + * \param setter The callback to invoke when setting the property. + * \param data A piece of data that will be passed to the getter and setter + * callbacks whenever they are invoked. + * \param attribute The attributes of the property for which an accessor + * is added. + */ void SetAccessorProperty( Local name, Local getter = Local(), @@ -67,12 +83,18 @@ class V8_EXPORT Template : public Data { PropertyAttribute attribute = None); /** + * Sets a "data property" on the object template, see + * https://tc39.es/ecma262/#sec-object-type. + * * Whenever the property with the given name is accessed on objects * created from this Template the getter and setter callbacks * are called instead of getting and setting the property directly * on the JavaScript object. + * Note that in case a property is written via a "child" object, the setter + * will not be called according to the JavaScript specification. See + * https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-set-p-v-receiver. * - * \param name The name of the property for which an accessor is added. + * \param name The name of the data property for which an accessor is added. * \param getter The callback to invoke when getting the property. * \param setter The callback to invoke when setting the property. * \param data A piece of data that will be passed to the getter and setter @@ -80,27 +102,6 @@ class V8_EXPORT Template : public Data { * \param attribute The attributes of the property for which an accessor * is added. */ - V8_DEPRECATE_SOON("Use SetNativeDataProperty without AccessControl instead") - void SetNativeDataProperty( - Local name, AccessorGetterCallback getter, - AccessorSetterCallback setter, Local data, - PropertyAttribute attribute, AccessControl settings, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, - SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); - V8_DEPRECATE_SOON("Use SetNativeDataProperty without AccessControl instead") - void SetNativeDataProperty( - Local name, AccessorNameGetterCallback getter, - AccessorNameSetterCallback setter, Local data, - PropertyAttribute attribute, AccessControl settings, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, - SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); - V8_DEPRECATE_SOON("Use SetNativeDataProperty with Local instead") - void SetNativeDataProperty( - Local name, AccessorGetterCallback getter, - AccessorSetterCallback setter = nullptr, - Local data = Local(), PropertyAttribute attribute = None, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, - SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); void SetNativeDataProperty( Local name, AccessorNameGetterCallback getter, AccessorNameSetterCallback setter = nullptr, @@ -142,7 +143,8 @@ enum class Intercepted : uint8_t { kNo = 0, kYes = 1 }; * Interceptor for get requests on an object. * * If the interceptor handles the request (i.e. the property should not be - * looked up beyond the interceptor) it should + * looked up beyond the interceptor or in case an exception was thrown) it + * should * - (optionally) use info.GetReturnValue().Set()` to set the return value * (by default the result is set to v8::Undefined), * - return `Intercepted::kYes`. @@ -194,7 +196,8 @@ using GenericNamedPropertyGetterCallback = * Interceptor for set requests on an object. * * If the interceptor handles the request (i.e. the property should not be - * looked up beyond the interceptor) it should return `Intercepted::kYes`. + * looked up beyond the interceptor or in case an exception was thrown) it + * should return `Intercepted::kYes`. * If the interceptor does not handle the request it must return * `Intercepted::kNo` and it must not produce side effects. * @@ -229,9 +232,10 @@ using GenericNamedPropertySetterCallback = * defineProperty(). * * If the interceptor handles the request (i.e. the property should not be - * looked up beyond the interceptor) it should - * - use `info.GetReturnValue().Set()` to set to an Integer value encoding - * a `v8::PropertyAttribute` bits, + * looked up beyond the interceptor or in case an exception was thrown) it + * should + * - (optionally) use `info.GetReturnValue().Set()` to set to an Integer + * value encoding a `v8::PropertyAttribute` bits, * - return `Intercepted::kYes`. * If the interceptor does not handle the request it must return * `Intercepted::kNo` and it must not produce side effects. @@ -263,9 +267,10 @@ using GenericNamedPropertyQueryCallback = * Interceptor for delete requests on an object. * * If the interceptor handles the request (i.e. the property should not be - * looked up beyond the interceptor) it should - * - use `info.GetReturnValue().Set()` to set to a Boolean value indicating - * whether the property deletion was successful or not, + * looked up beyond the interceptor or in case an exception was thrown) it + * should + * - (optionally) use `info.GetReturnValue().Set()` to set to a Boolean value + * indicating whether the property deletion was successful or not, * - return `Intercepted::kYes`. * If the interceptor does not handle the request it must return * `Intercepted::kNo` and it must not produce side effects. @@ -311,7 +316,8 @@ using GenericNamedPropertyEnumeratorCallback = NamedPropertyEnumeratorCallback; * Interceptor for defineProperty requests on an object. * * If the interceptor handles the request (i.e. the property should not be - * looked up beyond the interceptor) it should return `Intercepted::kYes`. + * looked up beyond the interceptor or in case an exception was thrown) it + * should return `Intercepted::kYes`. * If the interceptor does not handle the request it must return * `Intercepted::kNo` and it must not produce side effects. * @@ -344,10 +350,11 @@ using GenericNamedPropertyDefinerCallback = * Interceptor for getOwnPropertyDescriptor requests on an object. * * If the interceptor handles the request (i.e. the property should not be - * looked up beyond the interceptor) it should - * - use `info.GetReturnValue().Set()` to set the return value which must be - * object that can be converted to a PropertyDescriptor (for example, - * a value returned by `v8::Object::getOwnPropertyDescriptor`), + * looked up beyond the interceptor or in case an exception was thrown) it + * should + * - (optionally) use `info.GetReturnValue().Set()` to set the return value + * which must be object that can be converted to a PropertyDescriptor (for + * example, a value returned by `v8::Object::getOwnPropertyDescriptor`), * - return `Intercepted::kYes`. * If the interceptor does not handle the request it must return * `Intercepted::kNo` and it must not produce side effects. @@ -379,7 +386,7 @@ using GenericNamedPropertyDescriptorCallback = // removed. /** - * See `v8::GenericNamedPropertyGetterCallback`. + * See `v8::NamedPropertyGetterCallback`. */ using IndexedPropertyGetterCallbackV2 = Intercepted (*)(uint32_t index, const PropertyCallbackInfo& info); @@ -388,7 +395,7 @@ using IndexedPropertyGetterCallback = void (*)(uint32_t index, const PropertyCallbackInfo& info); /** - * See `v8::GenericNamedPropertySetterCallback`. + * See `v8::NamedPropertySetterCallback`. */ using IndexedPropertySetterCallbackV2 = Intercepted (*)( uint32_t index, Local value, const PropertyCallbackInfo& info); @@ -398,7 +405,7 @@ using IndexedPropertySetterCallback = const PropertyCallbackInfo& info); /** - * See `v8::GenericNamedPropertyQueryCallback`. + * See `v8::NamedPropertyQueryCallback`. */ using IndexedPropertyQueryCallbackV2 = Intercepted (*)(uint32_t index, const PropertyCallbackInfo& info); @@ -407,7 +414,7 @@ using IndexedPropertyQueryCallback = void (*)(uint32_t index, const PropertyCallbackInfo& info); /** - * See `v8::GenericNamedPropertyDeleterCallback`. + * See `v8::NamedPropertyDeleterCallback`. */ using IndexedPropertyDeleterCallbackV2 = Intercepted (*)(uint32_t index, const PropertyCallbackInfo& info); @@ -425,7 +432,7 @@ using IndexedPropertyEnumeratorCallback = void (*)(const PropertyCallbackInfo& info); /** - * See `v8::GenericNamedPropertyDefinerCallback`. + * See `v8::NamedPropertyDefinerCallback`. */ using IndexedPropertyDefinerCallbackV2 = Intercepted (*)(uint32_t index, const PropertyDescriptor& desc, @@ -436,7 +443,7 @@ using IndexedPropertyDefinerCallback = const PropertyCallbackInfo& info); /** - * See `v8::GenericNamedPropertyDescriptorCallback`. + * See `v8::NamedPropertyDescriptorCallback`. */ using IndexedPropertyDescriptorCallbackV2 = Intercepted (*)(uint32_t index, const PropertyCallbackInfo& info); @@ -489,8 +496,8 @@ enum class ConstructorBehavior { kThrow, kAllow }; * proto_t->Set(isolate, "proto_const", v8::Number::New(isolate, 2)); * * v8::Local instance_t = t->InstanceTemplate(); - * instance_t->SetAccessor( - String::NewFromUtf8Literal(isolate, "instance_accessor"), + * instance_t->SetNativeDataProperty( + * String::NewFromUtf8Literal(isolate, "instance_accessor"), * InstanceAccessorCallback); * instance_t->SetHandler( * NamedPropertyHandlerConfiguration(PropertyHandlerCallback)); @@ -752,34 +759,13 @@ struct NamedPropertyHandlerConfiguration { NamedPropertyDescriptorCallback descriptor, // Local data = Local(), PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) - : getter(reinterpret_cast(getter)), - setter(reinterpret_cast(setter)), - query(reinterpret_cast(query)), - deleter(reinterpret_cast(deleter)), - enumerator(enumerator), - definer(reinterpret_cast(definer)), - descriptor(reinterpret_cast(descriptor)), - data(data), - flags(WithNewSignatureFlag(flags)) {} - - // This variant will be deprecated soon. - NamedPropertyHandlerConfiguration( - GenericNamedPropertyGetterCallback getter, - GenericNamedPropertySetterCallback setter, - GenericNamedPropertyQueryCallback query, - GenericNamedPropertyDeleterCallback deleter, - GenericNamedPropertyEnumeratorCallback enumerator, - GenericNamedPropertyDefinerCallback definer, - GenericNamedPropertyDescriptorCallback descriptor, - Local data = Local(), - PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) - : getter(reinterpret_cast(getter)), - setter(reinterpret_cast(setter)), - query(reinterpret_cast(query)), - deleter(reinterpret_cast(deleter)), + : getter(getter), + setter(setter), + query(query), + deleter(deleter), enumerator(enumerator), - definer(reinterpret_cast(definer)), - descriptor(reinterpret_cast(descriptor)), + definer(definer), + descriptor(descriptor), data(data), flags(flags) {} @@ -791,29 +777,10 @@ struct NamedPropertyHandlerConfiguration { NamedPropertyEnumeratorCallback enumerator = nullptr, Local data = Local(), PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) - : getter(reinterpret_cast(getter)), - setter(reinterpret_cast(setter)), - query(reinterpret_cast(query)), - deleter(reinterpret_cast(deleter)), - enumerator(enumerator), - definer(nullptr), - descriptor(nullptr), - data(data), - flags(WithNewSignatureFlag(flags)) {} - - // This variant will be deprecated soon. - explicit NamedPropertyHandlerConfiguration( - GenericNamedPropertyGetterCallback getter, - GenericNamedPropertySetterCallback setter = nullptr, - GenericNamedPropertyQueryCallback query = nullptr, - GenericNamedPropertyDeleterCallback deleter = nullptr, - GenericNamedPropertyEnumeratorCallback enumerator = nullptr, - Local data = Local(), - PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) - : getter(reinterpret_cast(getter)), - setter(reinterpret_cast(setter)), - query(reinterpret_cast(query)), - deleter(reinterpret_cast(deleter)), + : getter(getter), + setter(setter), + query(query), + deleter(deleter), enumerator(enumerator), definer(nullptr), descriptor(nullptr), @@ -829,43 +796,23 @@ struct NamedPropertyHandlerConfiguration { NamedPropertyDefinerCallback definer, // Local data = Local(), PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) - : getter(reinterpret_cast(getter)), - setter(reinterpret_cast(setter)), + : getter(getter), + setter(setter), query(nullptr), - deleter(reinterpret_cast(deleter)), + deleter(deleter), enumerator(enumerator), - definer(reinterpret_cast(definer)), - descriptor(reinterpret_cast(descriptor)), - data(data), - flags(WithNewSignatureFlag(flags)) {} - - // This variant will be deprecated soon. - NamedPropertyHandlerConfiguration( - GenericNamedPropertyGetterCallback getter, - GenericNamedPropertySetterCallback setter, - GenericNamedPropertyDescriptorCallback descriptor, - GenericNamedPropertyDeleterCallback deleter, - GenericNamedPropertyEnumeratorCallback enumerator, - GenericNamedPropertyDefinerCallback definer, - Local data = Local(), - PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) - : getter(reinterpret_cast(getter)), - setter(reinterpret_cast(setter)), - query(nullptr), - deleter(reinterpret_cast(deleter)), - enumerator(enumerator), - definer(reinterpret_cast(definer)), - descriptor(reinterpret_cast(descriptor)), + definer(definer), + descriptor(descriptor), data(data), flags(flags) {} - void* getter; // [Generic]NamedPropertyGetterCallback - void* setter; // [Generic]NamedPropertySetterCallback - void* query; // [Generic]NamedPropertyQueryCallback - void* deleter; // [Generic]NamedPropertyDeleterCallback + NamedPropertyGetterCallback getter; + NamedPropertySetterCallback setter; + NamedPropertyQueryCallback query; + NamedPropertyDeleterCallback deleter; NamedPropertyEnumeratorCallback enumerator; - void* definer; // [Generic]NamedPropertyDefinerCallback - void* descriptor; // [Generic]NamedPropertyDescriptorCallback + NamedPropertyDefinerCallback definer; + NamedPropertyDescriptorCallback descriptor; Local data; PropertyHandlerFlags flags; }; @@ -891,34 +838,13 @@ struct IndexedPropertyHandlerConfiguration { IndexedPropertyDescriptorCallbackV2 descriptor, // Local data = Local(), PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) - : getter(reinterpret_cast(getter)), - setter(reinterpret_cast(setter)), - query(reinterpret_cast(query)), - deleter(reinterpret_cast(deleter)), - enumerator(enumerator), - definer(reinterpret_cast(definer)), - descriptor(reinterpret_cast(descriptor)), - data(data), - flags(WithNewSignatureFlag(flags)) {} - - // This variant will be deprecated soon. - IndexedPropertyHandlerConfiguration( - IndexedPropertyGetterCallback getter, // - IndexedPropertySetterCallback setter, // - IndexedPropertyQueryCallback query, // - IndexedPropertyDeleterCallback deleter, // - IndexedPropertyEnumeratorCallback enumerator, // - IndexedPropertyDefinerCallback definer, // - IndexedPropertyDescriptorCallback descriptor, // - Local data = Local(), - PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) - : getter(reinterpret_cast(getter)), - setter(reinterpret_cast(setter)), - query(reinterpret_cast(query)), - deleter(reinterpret_cast(deleter)), + : getter(getter), + setter(setter), + query(query), + deleter(deleter), enumerator(enumerator), - definer(reinterpret_cast(definer)), - descriptor(reinterpret_cast(descriptor)), + definer(definer), + descriptor(descriptor), data(data), flags(flags) {} @@ -930,29 +856,10 @@ struct IndexedPropertyHandlerConfiguration { IndexedPropertyEnumeratorCallback enumerator = nullptr, Local data = Local(), PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) - : getter(reinterpret_cast(getter)), - setter(reinterpret_cast(setter)), - query(reinterpret_cast(query)), - deleter(reinterpret_cast(deleter)), - enumerator(enumerator), - definer(nullptr), - descriptor(nullptr), - data(data), - flags(WithNewSignatureFlag(flags)) {} - - // This variant will be deprecated soon. - explicit IndexedPropertyHandlerConfiguration( - IndexedPropertyGetterCallback getter, - IndexedPropertySetterCallback setter = nullptr, - IndexedPropertyQueryCallback query = nullptr, - IndexedPropertyDeleterCallback deleter = nullptr, - IndexedPropertyEnumeratorCallback enumerator = nullptr, - Local data = Local(), - PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) - : getter(reinterpret_cast(getter)), - setter(reinterpret_cast(setter)), - query(reinterpret_cast(query)), - deleter(reinterpret_cast(deleter)), + : getter(getter), + setter(setter), + query(query), + deleter(deleter), enumerator(enumerator), definer(nullptr), descriptor(nullptr), @@ -968,43 +875,23 @@ struct IndexedPropertyHandlerConfiguration { IndexedPropertyDefinerCallbackV2 definer, Local data = Local(), PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) - : getter(reinterpret_cast(getter)), - setter(reinterpret_cast(setter)), - query(nullptr), - deleter(reinterpret_cast(deleter)), - enumerator(enumerator), - definer(reinterpret_cast(definer)), - descriptor(reinterpret_cast(descriptor)), - data(data), - flags(WithNewSignatureFlag(flags)) {} - - // This variant will be deprecated soon. - IndexedPropertyHandlerConfiguration( - IndexedPropertyGetterCallback getter, - IndexedPropertySetterCallback setter, - IndexedPropertyDescriptorCallback descriptor, - IndexedPropertyDeleterCallback deleter, - IndexedPropertyEnumeratorCallback enumerator, - IndexedPropertyDefinerCallback definer, - Local data = Local(), - PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) - : getter(reinterpret_cast(getter)), - setter(reinterpret_cast(setter)), + : getter(getter), + setter(setter), query(nullptr), - deleter(reinterpret_cast(deleter)), + deleter(deleter), enumerator(enumerator), - definer(reinterpret_cast(definer)), - descriptor(reinterpret_cast(descriptor)), + definer(definer), + descriptor(descriptor), data(data), flags(flags) {} - void* getter; // IndexedPropertyGetterCallback[V2] - void* setter; // IndexedPropertySetterCallback[V2] - void* query; // IndexedPropertyQueryCallback[V2] - void* deleter; // IndexedPropertyDeleterCallback[V2] + IndexedPropertyGetterCallbackV2 getter; + IndexedPropertySetterCallbackV2 setter; + IndexedPropertyQueryCallbackV2 query; + IndexedPropertyDeleterCallbackV2 deleter; IndexedPropertyEnumeratorCallback enumerator; - void* definer; // IndexedPropertyDefinerCallback[V2] - void* descriptor; // IndexedPropertyDescriptorCallback[V2] + IndexedPropertyDefinerCallbackV2 definer; + IndexedPropertyDescriptorCallbackV2 descriptor; Local data; PropertyHandlerFlags flags; }; @@ -1029,36 +916,6 @@ class V8_EXPORT ObjectTemplate : public Template { */ V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(Local context); - /** - * Sets an accessor on the object template. - * - * Whenever the property with the given name is accessed on objects - * created from this ObjectTemplate the getter and setter callbacks - * are called instead of getting and setting the property directly - * on the JavaScript object. - * - * \param name The name of the property for which an accessor is added. - * \param getter The callback to invoke when getting the property. - * \param setter The callback to invoke when setting the property. - * \param data A piece of data that will be passed to the getter and setter - * callbacks whenever they are invoked. - * \param attribute The attributes of the property for which an accessor - * is added. - */ - V8_DEPRECATE_SOON("Use SetAccessor with Local instead") - void SetAccessor( - Local name, AccessorGetterCallback getter, - AccessorSetterCallback setter = nullptr, - Local data = Local(), PropertyAttribute attribute = None, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, - SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); - void SetAccessor( - Local name, AccessorNameGetterCallback getter, - AccessorNameSetterCallback setter = nullptr, - Local data = Local(), PropertyAttribute attribute = None, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, - SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); - /** * Sets a named property handler on the object template. * @@ -1072,34 +929,6 @@ class V8_EXPORT ObjectTemplate : public Template { */ void SetHandler(const NamedPropertyHandlerConfiguration& configuration); - /** - * Sets an indexed property handler on the object template. - * - * Whenever an indexed property is accessed on objects created from - * this object template, the provided callback is invoked instead of - * accessing the property directly on the JavaScript object. - * - * \param getter The callback to invoke when getting a property. - * \param setter The callback to invoke when setting a property. - * \param query The callback to invoke to check if an object has a property. - * \param deleter The callback to invoke when deleting a property. - * \param enumerator The callback to invoke to enumerate all the indexed - * properties of an object. - * \param data A piece of data that will be passed to the callbacks - * whenever they are invoked. - */ - V8_DEPRECATE_SOON("Use SetHandler instead") - void SetIndexedPropertyHandler( - IndexedPropertyGetterCallback getter, - IndexedPropertySetterCallback setter = nullptr, - IndexedPropertyQueryCallback query = nullptr, - IndexedPropertyDeleterCallback deleter = nullptr, - IndexedPropertyEnumeratorCallback enumerator = nullptr, - Local data = Local()) { - SetHandler(IndexedPropertyHandlerConfiguration(getter, setter, query, - deleter, enumerator, data)); - } - /** * Sets an indexed property handler on the object template. * diff --git a/deps/v8/include/v8-traced-handle.h b/deps/v8/include/v8-traced-handle.h index c9fd357b871bf7..04752c4f2aeed0 100644 --- a/deps/v8/include/v8-traced-handle.h +++ b/deps/v8/include/v8-traced-handle.h @@ -62,11 +62,11 @@ class TracedReferenceBase : public api_internal::IndirectHandleBase { V8_INLINE void Reset(); /** - * Construct a Local from this handle. + * Construct a Local from this handle. */ - V8_INLINE Local Get(Isolate* isolate) const { - if (IsEmpty()) return Local(); - return Local::New(isolate, this->value()); + V8_INLINE Local Get(Isolate* isolate) const { + if (IsEmpty()) return Local(); + return Local::New(isolate, this->value()); } /** @@ -135,17 +135,6 @@ class BasicTracedReference : public TracedReferenceBase { const_cast&>(*this)); } - V8_DEPRECATE_SOON("Use Get to convert to Local instead") - V8_INLINE T* operator->() const { -#ifdef V8_ENABLE_CHECKS - CheckValue(); -#endif // V8_ENABLE_CHECKS - return this->template value(); - } - - V8_DEPRECATE_SOON("Use Get to convert to Local instead") - V8_INLINE T* operator*() const { return this->operator->(); } - private: /** * An empty BasicTracedReference without storage cell. diff --git a/deps/v8/include/v8-unwinder.h b/deps/v8/include/v8-unwinder.h index 8b71bb39b55f42..5771eb05a81ecf 100644 --- a/deps/v8/include/v8-unwinder.h +++ b/deps/v8/include/v8-unwinder.h @@ -42,7 +42,8 @@ enum StateTag : uint16_t { OTHER, EXTERNAL, ATOMICS_WAIT, - IDLE + IDLE, + LOGGING, }; // The output structure filled up by GetStackSample API function. diff --git a/deps/v8/include/v8-util.h b/deps/v8/include/v8-util.h index db6d1a2fe6befc..b7d53f14f75fe4 100644 --- a/deps/v8/include/v8-util.h +++ b/deps/v8/include/v8-util.h @@ -544,122 +544,6 @@ class StdGlobalValueMap : public GlobalValueMap { : GlobalValueMap(isolate) {} }; -class DefaultPersistentValueVectorTraits { - public: - typedef std::vector Impl; - - static void Append(Impl* impl, PersistentContainerValue value) { - impl->push_back(value); - } - static bool IsEmpty(const Impl* impl) { - return impl->empty(); - } - static size_t Size(const Impl* impl) { - return impl->size(); - } - static PersistentContainerValue Get(const Impl* impl, size_t i) { - return (i < impl->size()) ? impl->at(i) : kPersistentContainerNotFound; - } - static void ReserveCapacity(Impl* impl, size_t capacity) { - impl->reserve(capacity); - } - static void Clear(Impl* impl) { - impl->clear(); - } -}; - -/** - * A vector wrapper that safely stores Global values. - * C++11 embedders don't need this class, as they can use Global - * directly in std containers. - * - * This class relies on a backing vector implementation, whose type and methods - * are described by the Traits class. The backing map will handle values of type - * PersistentContainerValue, with all conversion into and out of V8 - * handles being transparently handled by this class. - */ -template -class V8_DEPRECATE_SOON("Use std::vector>.") PersistentValueVector { - public: - explicit PersistentValueVector(Isolate* isolate) : isolate_(isolate) { } - - ~PersistentValueVector() { - Clear(); - } - - /** - * Append a value to the vector. - */ - void Append(Local value) { - Global persistent(isolate_, value); - Traits::Append(&impl_, ClearAndLeak(&persistent)); - } - - /** - * Append a persistent's value to the vector. - */ - void Append(Global persistent) { - Traits::Append(&impl_, ClearAndLeak(&persistent)); - } - - /** - * Are there any values in the vector? - */ - bool IsEmpty() const { - return Traits::IsEmpty(&impl_); - } - - /** - * How many elements are in the vector? - */ - size_t Size() const { - return Traits::Size(&impl_); - } - - /** - * Retrieve the i-th value in the vector. - */ - Local Get(size_t index) const { - return Local::New(isolate_, internal::ValueHelper::SlotAsValue( - Traits::Get(&impl_, index))); - } - - /** - * Remove all elements from the vector. - */ - void Clear() { - size_t length = Traits::Size(&impl_); - for (size_t i = 0; i < length; i++) { - Global p; - p.slot() = reinterpret_cast(Traits::Get(&impl_, i)); - } - Traits::Clear(&impl_); - } - - /** - * Reserve capacity in the vector. - * (Efficiency gains depend on the backing implementation.) - */ - void ReserveCapacity(size_t capacity) { - Traits::ReserveCapacity(&impl_, capacity); - } - - private: - static PersistentContainerValue ClearAndLeak(Global* persistent) { - auto slot = persistent->slot(); - persistent->Clear(); - return reinterpret_cast(slot); - } - - static V* FromVal(PersistentContainerValue v) { - return internal::ValueHelper::SlotAsValue( - reinterpret_cast(v)); - } - - Isolate* isolate_; - typename Traits::Impl impl_; -}; - } // namespace v8 #endif // V8_UTIL_H diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index e665e9b67dfc98..e038daf0b24877 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -9,9 +9,9 @@ // NOTE these macros are used by some of the tool scripts and the build // system so their names cannot be changed without changing the scripts. #define V8_MAJOR_VERSION 12 -#define V8_MINOR_VERSION 4 -#define V8_BUILD_NUMBER 254 -#define V8_PATCH_LEVEL 21 +#define V8_MINOR_VERSION 8 +#define V8_BUILD_NUMBER 374 +#define V8_PATCH_LEVEL 13 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/include/v8-wasm.h b/deps/v8/include/v8-wasm.h index 71514615466eb3..f8e406c737e1cf 100644 --- a/deps/v8/include/v8-wasm.h +++ b/deps/v8/include/v8-wasm.h @@ -9,6 +9,7 @@ #include #include +#include "v8-internal.h" // NOLINT(build/include_directory) #include "v8-local-handle.h" // NOLINT(build/include_directory) #include "v8-memory-span.h" // NOLINT(build/include_directory) #include "v8-object.h" // NOLINT(build/include_directory) @@ -129,6 +130,8 @@ class V8_EXPORT WasmModuleObject : public Object { */ class V8_EXPORT WasmStreaming final { public: + static constexpr internal::ExternalPointerTag kManagedTag = + internal::kWasmWasmStreamingTag; class WasmStreamingImpl; explicit WasmStreaming(std::unique_ptr impl); diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h index e649d8cce7d03d..4a6f255b38a7e2 100644 --- a/deps/v8/include/v8config.h +++ b/deps/v8/include/v8config.h @@ -5,8 +5,16 @@ #ifndef V8CONFIG_H_ #define V8CONFIG_H_ +// gcc 10 defines __cplusplus to "an unspecified value strictly larger than +// 201703L" for its experimental -std=gnu++2a config. +// TODO(leszeks): Change to `__cplusplus <= 202002L` once we only support +// compilers with full C++20 support. +#if __cplusplus <= 201703L +#error "C++20 or later required." +#endif + #ifdef V8_GN_HEADER -#if __cplusplus >= 201703L && !__has_include("v8-gn.h") +#if !__has_include("v8-gn.h") #error Missing v8-gn.h. The configuration for v8 is missing from the include \ path. Add it with -I to the command line #endif @@ -23,6 +31,8 @@ path. Add it with -I to the command line # include #elif defined(__linux__) # include +#elif defined(__MVS__) +# include "zos-base.h" #endif @@ -83,6 +93,7 @@ path. Add it with -I to the command line // V8_OS_STARBOARD - Starboard (platform abstraction for Cobalt) // V8_OS_AIX - AIX // V8_OS_WIN - Microsoft Windows +// V8_OS_ZOS - z/OS #if defined(__ANDROID__) # define V8_OS_ANDROID 1 @@ -163,6 +174,11 @@ path. Add it with -I to the command line #elif defined(_WIN32) # define V8_OS_WIN 1 # define V8_OS_STRING "windows" + +#elif defined(__MVS__) +# define V8_OS_POSIX 1 +# define V8_OS_ZOS 1 +# define V8_OS_STRING "zos" #endif // ----------------------------------------------------------------------------- @@ -477,22 +493,32 @@ path. Add it with -I to the command line # define V8_INLINE inline #endif +#if V8_HAS_BUILTIN_ASSUME #ifdef DEBUG -// In debug mode, check assumptions instead of actually adding annotations. -# define V8_ASSUME DCHECK -#elif V8_HAS_BUILTIN_ASSUME +// In debug mode, check assumptions in addition to adding annotations. +// This helps GCC (and maybe other compilers) figure out that certain +// situations are unreachable. +# define V8_ASSUME(condition) \ + do { \ + DCHECK(condition); \ + __builtin_assume(condition); \ + } while (false) +#else // DEBUG # define V8_ASSUME __builtin_assume +#endif // DEBUG #elif V8_HAS_BUILTIN_UNREACHABLE # define V8_ASSUME(condition) \ do { \ + DCHECK(condition); \ if (!(condition)) __builtin_unreachable(); \ } while (false) #else # define V8_ASSUME USE #endif -// Prefer c++20 std::assume_aligned -#if __cplusplus >= 202002L && defined(__cpp_lib_assume_aligned) +// Prefer c++20 std::assume_aligned. Don't use it on MSVC though, because it's +// not happy with our large 4GB alignment values. +#if __cplusplus >= 202002L && defined(__cpp_lib_assume_aligned) && !V8_CC_MSVC # define V8_ASSUME_ALIGNED(ptr, alignment) \ std::assume_aligned<(alignment)>(ptr) #elif V8_HAS_BUILTIN_ASSUME_ALIGNED diff --git a/deps/v8/infra/builder_properties.pyl b/deps/v8/infra/builder_properties.pyl new file mode 100644 index 00000000000000..af627c5bef31d7 --- /dev/null +++ b/deps/v8/infra/builder_properties.pyl @@ -0,0 +1,23 @@ +# Copyright 2024 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Override builder properties in V8's CI. This can be useful if a configuration +# change is suspected to cause a regression, and should be aligned with a +# specific V8 commit. + +# A typical scenario is a performance bot change. The perf bot itself is defined +# on the recipe side and applied independent of the V8 revision. A regression +# might falsely suspect the first revision using the new bot. Using this file, +# the bot can be migrated in a three step approach: + +# 1. Add {'buildername': {'swarming_bot_ids': ['new-bot']}} to this file. + +# It might take a while till all relevant CI bots have processed this revision. +# Cherry-picks for branches might also be needed. + +# 2. Add the new bot to the recipe itself. +# 3. Remove the override in this file again to ensure there is a single +# configuration only. + +{} diff --git a/deps/v8/infra/mb/mb_config.pyl b/deps/v8/infra/mb/mb_config.pyl index a498d240e3fd83..838e65812faa3a 100644 --- a/deps/v8/infra/mb/mb_config.pyl +++ b/deps/v8/infra/mb/mb_config.pyl @@ -66,7 +66,6 @@ 'V8 Linux - verify csa - builder': 'release_x86_verify_csa', # Linux64. 'V8 Linux64 - builder': 'release_x64_gcmole', - 'V8 Linux64 - builder (goma cache silo)': 'release_x64', 'V8 Linux64 - builder (reclient)': 'release_x64_reclient', 'V8 Linux64 - builder (reclient compare)': 'release_x64_reclient', 'V8 Linux64 - official - builder': 'official_x64_on_release_branch', @@ -82,8 +81,8 @@ 'V8 Linux64 - verify csa - builder': 'release_x64_verify_csa', 'V8 Linux64 - no wasm - builder': 'release_x64_webassembly_disabled', # Windows. + 'V8 Win - arm64 - debug builder': 'debug_arm64', 'V8 Win32 - builder': 'release_x86_minimal_symbols', - 'V8 Win32 - builder (goma cache silo)': 'release_x86', 'V8 Win32 - builder (reclient)': 'release_x86_minimal_symbols_reclient', 'V8 Win32 - builder (reclient compare)': 'release_x86_minimal_symbols_reclient', 'V8 Win32 - debug builder': 'debug_x86_minimal_symbols', @@ -95,6 +94,7 @@ 'V8 Win64 - builder (reclient compare)': 'release_x64_minimal_symbols_reclient', 'V8 Win64 - dev image': 'release_x64_minimal_symbols', 'V8 Win64 - debug builder': 'debug_x64_minimal_symbols', + 'V8 Win64 - drumbrake - debug builder': 'debug_x64_drumbrake', 'V8 Win64 - msvc - builder': 'release_x64_msvc', # Mac. 'V8 Mac64 - builder': 'release_x64', @@ -128,9 +128,12 @@ 'V8 Linux64 - disable runtime call stats - builder': 'release_x64_disable_runtime_call_stats', 'V8 Linux64 - debug - single generation - builder': 'debug_x64_single_generation', 'V8 Linux64 - no pointer compression - builder': 'release_x64_no_pointer_compression', + 'V8 Linux64 - sticky mark bits - debug builder': 'debug_x64_sticky_mark_bits', 'V8 Linux64 css - debug builder': 'debug_x64_conservative_stack_scanning', 'V8 Linux64 gcc - builder': 'release_x64_gcc', + 'V8 Linux64 - jammy - gcc - builder': 'release_x64_gcc', 'V8 Linux64 gcc - debug builder': 'debug_x64_gcc', + 'V8 Linux64 - jammy - gcc - debug builder': 'debug_x64_gcc', 'V8 Linux64 gcc light - debug builder': 'debug_x64_gcc', 'V8 Fuchsia - builder': 'release_x64_fuchsia', 'V8 Fuchsia - debug builder': 'debug_x64_fuchsia', @@ -217,6 +220,7 @@ 'V8 Arm - builder': 'release_arm', 'V8 Arm - debug builder': 'debug_arm', 'V8 Android Arm - builder': 'release_android_arm', + 'V8 Android Arm - verify deterministic - debug': 'debug_android_arm_verify_deterministic', 'V8 Linux - arm - sim - builder': 'release_simulate_arm_gcmole', 'V8 Linux - arm - sim - debug builder': 'debug_simulate_arm', 'V8 Linux - arm - sim - lite - builder': 'release_simulate_arm_lite', @@ -243,6 +247,7 @@ }, 'tryserver.v8': { 'v8_android_arm_compile_rel': 'release_android_arm', + 'v8_android_arm_verify_deterministic_dbg': 'debug_android_arm_verify_deterministic', 'v8_android_arm64_compile_dbg': 'debug_android_arm64', 'v8_android_arm64_n5x_compile_rel': 'release_android_arm64', 'v8_android_arm64_d8_compile_rel': 'release_android_arm64', @@ -253,6 +258,7 @@ 'v8_linux_verify_csa_compile_rel': 'release_x86_verify_csa', 'v8_linux_nodcheck_compile_rel': 'release_x86_minimal_symbols', 'v8_linux_compile_dbg': 'debug_x86_trybot', + 'v8_linux_full_compile_dbg': 'full_debug_x86', 'v8_linux_noi18n_compile_dbg': 'debug_x86_no_i18n', 'v8_linux_noi18n_compile_rel': 'release_x86_no_i18n_trybot', 'v8_linux_gc_stress_compile_dbg': 'debug_x86_trybot', @@ -278,8 +284,10 @@ 'v8_linux64_gc_stress_custom_snapshot_compile_dbg': 'debug_x64_trybot_custom', 'v8_linux64_gc_stress_compile_dbg': 'debug_x64_trybot', 'v8_linux64_gcc_compile_dbg': 'debug_x64_gcc', + 'v8_linux64_jammy_gcc_compile_dbg': 'debug_x64_gcc', 'v8_linux64_gcc_light_compile_dbg': 'debug_x64_gcc', 'v8_linux64_gcc_compile_rel': 'release_x64_gcc', + 'v8_linux64_jammy_gcc_compile_rel': 'release_x64_gcc', 'v8_linux64_header_includes_dbg': 'debug_x64_header_includes', 'v8_linux64_minor_mc_compile_dbg': 'debug_x64_trybot', 'v8_linux64_fyi_compile_rel': 'release_x64_test_features_trybot', @@ -306,6 +314,7 @@ 'v8_linux_riscv32_compile_rel': 'release_simulate_riscv32', 'v8_linux64_riscv64_compile_rel': 'release_simulate_riscv64', 'v8_linux64_riscv64_pointer_compression_compile_rel': 'release_simulate_riscv64_pointer_compression', + 'v8_linux64_sticky_mark_bits_compile_dbg': 'debug_x64_sticky_mark_bits', 'v8_linux64_tsan_compile_rel': 'release_x64_tsan_minimal_symbols', 'v8_linux64_tsan_compile_dbg': 'debug_x64_tsan_minimal_symbols', 'v8_linux64_tsan_no_cm_compile_rel': 'release_x64_tsan_no_cm', @@ -314,8 +323,8 @@ 'v8_linux64_ubsan_compile_rel': 'release_x64_ubsan_minimal_symbols', 'v8_linux64_verify_builtins_rel': 'release_x64_verify_builtins', 'v8_linux64_verify_deterministic_rel': 'release_x64_verify_deterministic', - 'v8_odroid_arm_compile_rel': 'release_arm', 'v8_linux_torque_compare': 'torque_compare', + 'v8_win_arm64_compile_dbg': 'debug_arm64', # TODO(machenbach): Remove after switching to x64 on infra side. 'v8_win_compile_dbg': 'debug_x86_trybot', 'v8_win_compile_rel': 'release_x86_trybot', @@ -323,6 +332,7 @@ 'v8_win64_asan_compile_rel': 'release_x64_asan_no_lsan', 'v8_win64_msvc_light_compile_rel': 'release_x64_msvc', 'v8_win64_compile_dbg': 'debug_x64_minimal_symbols', + 'v8_win64_drumbrake_compile_dbg': 'debug_x64_drumbrake', 'v8_win64_msvc_compile_rel': 'release_x64_msvc', 'v8_win64_compile_rel': 'release_x64_trybot', 'v8_mac_arm64_compile_rel': 'release_arm64', @@ -349,6 +359,12 @@ 'v8_numfuzz_compile_rel': 'release_x64', 'v8_numfuzz_compile_dbg': 'debug_x64', 'v8_numfuzz_tsan_compile_rel': 'release_x64_tsan', + + # PGO + 'v8_linux_pgo_compile_rel' : 'builtins_profiling_x86', + 'v8_linux64_pgo_compile_rel' : 'builtins_profiling_x64', + 'v8_win_pgo_compile_rel' : 'builtins_profiling_x86', + 'v8_win64_pgo_compile_rel' : 'builtins_profiling_x64', }, }, @@ -491,6 +507,8 @@ 'release_bot', 'simulate_s390x'], # Debug configs for arm. + 'debug_android_arm_verify_deterministic': [ + 'debug_bot', 'arm', 'android', 'minimal_symbols', 'v8_verify_deterministic'], 'debug_android_arm64': [ 'debug_bot', 'arm64', 'android', 'minimal_symbols'], 'debug_arm': [ @@ -673,6 +691,8 @@ 'debug_bot', 'x64', 'clang_coverage'], 'debug_x64_custom': [ 'debug_bot', 'x64', 'v8_snapshot_custom'], + 'debug_x64_drumbrake': [ + 'debug_bot', 'x64', 'v8_enable_drumbrake'], 'debug_x64_external_code_space': [ 'debug_bot', 'x64', 'external_code_space'], 'debug_x64_fuchsia': [ @@ -693,6 +713,8 @@ 'debug_bot', 'x64', 'no_sandbox'], 'debug_x64_single_generation': [ 'debug_bot', 'x64', 'v8_enable_single_generation'], + 'debug_x64_sticky_mark_bits': [ + 'debug_bot', 'x64', 'v8_enable_sticky_mark_bits'], 'debug_x64_trybot': [ 'debug_trybot', 'x64'], 'debug_x64_dict_tracking_trybot': [ @@ -724,8 +746,6 @@ 'debug', 'x86', 'reclient', 'v8_enable_slow_dchecks', 'v8_full_debug'], # Release configs for x86. - 'release_x86': [ - 'release_bot', 'x86'], 'release_x86_asan_symbolized_verify_heap': [ 'release_bot', 'x86', 'asan', 'lsan', 'symbolized', 'v8_verify_heap'], @@ -889,7 +909,7 @@ }, 'ios_simulator': { - 'gn_args': 'target_cpu="x64" target_os="ios"', + 'gn_args': 'target_cpu="x64" target_os="ios" use_blink=true', }, 'lld': { @@ -907,12 +927,12 @@ 'msan': { 'mixins': ['v8_enable_test_features'], - 'gn_args': 'is_msan=true msan_track_origins=2 instrumented_libraries_release="focal"', + 'gn_args': 'is_msan=true msan_track_origins=2 instrumented_libraries_release="noble"', }, 'msan_no_origins': { 'mixins': ['v8_enable_test_features'], - 'gn_args': 'is_msan=true msan_track_origins=0 instrumented_libraries_release="focal"', + 'gn_args': 'is_msan=true msan_track_origins=0 instrumented_libraries_release="noble"', }, 'msvc': { @@ -1056,6 +1076,10 @@ 'gn_args': 'v8_enable_verify_heap=false', }, + 'v8_enable_drumbrake': { + 'gn_args': 'v8_enable_drumbrake=true', + }, + 'v8_enable_memory_corruption_api': { 'gn_args': 'v8_enable_memory_corruption_api=true', }, @@ -1101,6 +1125,9 @@ 'gn_args': 'v8_enable_single_generation=true ' 'v8_disable_write_barriers=true', }, + 'v8_enable_sticky_mark_bits': { + 'gn_args': 'v8_enable_sticky_mark_bits=true', + }, 'v8_enable_test_features': { 'gn_args': 'v8_enable_test_features=true', }, diff --git a/deps/v8/infra/testing/builders.pyl b/deps/v8/infra/testing/builders.pyl index 7655763cab411c..194928d35984e0 100644 --- a/deps/v8/infra/testing/builders.pyl +++ b/deps/v8/infra/testing/builders.pyl @@ -110,6 +110,14 @@ }, ], }, + 'v8_linux_full_dbg': { + 'swarming_dimensions': { + 'os': 'Ubuntu-22.04', + }, + 'tests': [ + {'name': 'v8testing', 'variant': 'default', 'shards': 6}, + ], + }, 'v8_linux_gc_stress_dbg': { 'swarming_dimensions' : { 'os': 'Ubuntu-22.04', @@ -546,6 +554,14 @@ {'name': 'v8testing'}, ], }, + 'v8_linux64_jammy_gcc_rel': { + 'swarming_dimensions' : { + 'os': 'Ubuntu-22.04', + }, + 'tests': [ + {'name': 'v8testing'}, + ], + }, 'v8_linux64_minor_mc_dbg': { 'swarming_dimensions' : { 'cpu': 'x86-64-avx2', @@ -649,6 +665,15 @@ {'name': 'v8testing', 'variant': 'default'}, ], }, + 'v8_linux64_sandbox_testing_rel': { + 'swarming_dimensions' : { + 'cpu': 'x86-64', + 'os': 'Ubuntu-22.04', + }, + 'tests': [ + {'name': 'mjsunit', 'variant': 'default'}, + ], + }, 'v8_linux64_single_generation_dbg': { 'swarming_dimensions' : { 'os': 'Ubuntu-22.04', @@ -657,6 +682,15 @@ {'name': 'v8testing', 'shards': 3}, ], }, + 'v8_linux64_sticky_mark_bits_dbg': { + 'swarming_dimensions' : { + 'os': 'Ubuntu-22.04', + 'cpu': 'x86-64', + }, + 'tests': [ + {'name': 'v8testing', 'shards': 3}, + ], + }, 'v8_linux64_rel': { 'swarming_dimensions' : { 'cpu': 'x86-64-avx2', @@ -733,6 +767,7 @@ {'name': 'v8testing', 'variant': 'extra', 'shards': 6}, {'name': 'v8testing', 'variant': 'slow_path', 'shards': 2}, {'name': 'v8testing', 'variant': 'stress_concurrent_allocation', 'shards': 2}, + {'name': 'v8testing', 'variant': 'minor_ms', 'shards': 2}, ], }, 'v8_linux64_tsan_dbg': { @@ -870,24 +905,6 @@ ], }, ############################################################################## - # Odroids with native arm - 'v8_odroid_arm_rel': { - 'swarming_dimensions' : { - 'cores': '8', - 'cpu': 'armv7l-32-Hardkernel_ODROID-XU4', - 'os': 'Ubuntu', - }, - 'swarming_task_attrs': { - # Use same prio as CI due to limited resources. - 'priority': 25, - }, - 'tests': [ - {'name': 'benchmarks'}, - {'name': 'optimize_for_size'}, - {'name': 'v8testing', 'shards': 2}, - ], - }, - ############################################################################## # Win32 'v8_win_dbg': { 'swarming_dimensions' : { @@ -928,11 +945,21 @@ 'tests': [ {'name': 'mozilla'}, {'name': 'test262', 'variant': 'default', 'shards': 4}, - {'name': 'v8testing', 'shards': 3}, - {'name': 'v8testing', 'variant': 'extra', 'shards': 2}, + {'name': 'v8testing', 'shards': 4}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 3}, {'name': 'v8testing', 'variant': 'minor_ms'}, ], }, + 'v8_win64_drumbrake_dbg': { + 'swarming_dimensions': { + 'cpu': 'x86-64', + 'os': 'Windows-10-19045', + }, + 'tests': [ + {'name': 'v8testing', 'shards': 4}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 3}, + ], + }, 'v8_win64_msvc_rel': { 'swarming_dimensions' : { 'cpu': 'x86-64', @@ -1620,6 +1647,14 @@ {'name': 'v8testing'}, ], }, + 'V8 Linux64 - jammy - gcc': { + 'swarming_dimensions' : { + 'os': 'Ubuntu-22.04', + }, + 'tests': [ + {'name': 'v8testing'}, + ], + }, 'V8 Linux64 - gc stress': { 'swarming_dimensions': { 'cpu': 'x86-64-avx2', @@ -1698,6 +1733,15 @@ {'name': 'v8testing', 'shards': 2}, ], }, + 'V8 Linux64 - sandbox testing': { + 'swarming_dimensions' : { + 'cpu': 'x86-64', + 'os': 'Ubuntu-22.04', + }, + 'tests': [ + {'name': 'mjsunit', 'variant': 'default'}, + ], + }, 'V8 Linux64 - shared': { 'swarming_dimensions' : { 'os': 'Ubuntu-22.04', @@ -1708,6 +1752,15 @@ {'name': 'v8testing'}, ], }, + 'V8 Linux64 - sticky mark bits - debug': { + 'swarming_dimensions' : { + 'os': 'Ubuntu-22.04', + 'cpu': 'x86-64', + }, + 'tests': [ + {'name': 'v8testing', 'shards': 3}, + ], + }, 'V8 Linux64 - verify csa': { 'swarming_dimensions' : { 'os': 'Ubuntu-22.04', @@ -1770,6 +1823,7 @@ {'name': 'v8testing', 'variant': 'extra', 'shards': 5}, {'name': 'v8testing', 'variant': 'slow_path', 'shards': 2}, {'name': 'v8testing', 'variant': 'stress_concurrent_allocation', 'shards': 2}, + {'name': 'v8testing', 'variant': 'minor_ms', 'shards': 2}, ], }, 'V8 Linux64 TSAN - debug': { @@ -2005,6 +2059,21 @@ {'name': 'v8testing', 'variant': 'minor_ms'}, ], }, + 'V8 Win64 - drumbrake - debug': { + 'swarming_dimensions': { + 'cpu': 'x86-64', + 'os': 'Windows-10-19045', + }, + 'swarming_task_attrs': { + 'expiration': 14400, + 'hard_timeout': 7200, + 'priority': 35, + }, + 'tests': [ + {'name': 'v8testing', 'shards': 4}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 3}, + ], + }, 'V8 Win64 - msvc': { 'swarming_dimensions': { 'os': 'Windows-10-19045', @@ -2045,83 +2114,6 @@ {'name': 'v8testing', 'variant': 'default', 'shards': 4}, ], }, - 'V8 Arm': { - 'swarming_dimensions': { - 'cores': '8', - 'cpu': 'armv7l-32-Hardkernel_ODROID-XU4', - 'os': 'Ubuntu', - }, - 'swarming_task_attrs': { - 'expiration': 21600, - 'hard_timeout': 5400, - }, - 'tests': [ - # Odroid. - { - 'name': 'benchmarks', - 'suffix': 'ODROID', - # Less parallelism to prevent OOMs in benchmarks. - 'test_args': ['-j2'], - }, - { - 'name': 'optimize_for_size', - 'suffix': 'ODROID', - }, - { - 'name': 'v8testing', - 'suffix': 'ODROID', - 'shards': 2, - }, - ], - }, - 'V8 Arm - debug': { - 'swarming_dimensions': { - 'cores': '8', - 'cpu': 'armv7l-32-Hardkernel_ODROID-XU4', - 'os': 'Ubuntu', - }, - 'swarming_task_attrs': { - 'expiration': 21600, - 'hard_timeout': 3600, - }, - 'tests': [ - # Odroid. - { - 'name': 'optimize_for_size', - 'suffix': 'ODROID', - 'variant': 'default', - 'test_args': ['--extra-flags=--verify-heap-skip-remembered-set'], - 'shards': 2, - }, - { - 'name': 'v8testing', - 'suffix': 'ODROID', - 'variant': 'default', - 'test_args': ['--extra-flags=--verify-heap-skip-remembered-set'], - 'shards': 3, - }, - ], - }, - 'V8 Arm GC Stress': { - 'swarming_dimensions': { - 'cores': '8', - 'cpu': 'armv7l-32-Hardkernel_ODROID-XU4', - 'os': 'Ubuntu', - }, - 'swarming_task_attrs': { - 'expiration': 21600, - 'hard_timeout': 7200, - }, - 'tests': [ - { - 'name': 'd8testing', - 'suffix': 'ODROID', - 'variant': 'default', - 'test_args': ['--gc-stress', '--extra-flags=--verify-heap-skip-remembered-set'], - 'shards': 3, - }, - ], - }, 'V8 Linux - arm - sim': { 'swarming_dimensions': { 'os': 'Ubuntu-22.04', @@ -2689,6 +2681,40 @@ }, ], }, + # PGO + 'v8_linux_pgo_rel' : { + 'swarming_dimensions' : { + 'os': 'Ubuntu-22.04', + }, + 'tests': [ + {'name': 'pgo_instrumentation'} + ], + }, + 'v8_linux64_pgo_rel' : { + 'swarming_dimensions' : { + 'os': 'Ubuntu-22.04', + }, + 'tests': [ + {'name': 'pgo_instrumentation'} + ], + }, + 'v8_win_pgo_rel' : { + 'swarming_dimensions' : { + 'cpu': 'x86-64', + 'os': 'Windows-10-19045', + }, + 'tests': [ + {'name': 'pgo_instrumentation'} + ], + }, + 'v8_win64_pgo_rel' : { + 'swarming_dimensions' : { + 'os': 'Windows-10-19045', + }, + 'tests': [ + {'name': 'pgo_instrumentation'} + ], + }, # Try perf bots 'v8_android_arm_perf_try': { 'tests': [ diff --git a/deps/v8/samples/process.cc b/deps/v8/samples/process.cc index d773e9b9d1870c..af57f39a073a62 100644 --- a/deps/v8/samples/process.cc +++ b/deps/v8/samples/process.cc @@ -150,9 +150,10 @@ class JsHttpRequestProcessor : public HttpRequestProcessor { const PropertyCallbackInfo& info); // Callbacks that access maps - static void MapGet(Local name, const PropertyCallbackInfo& info); - static void MapSet(Local name, Local value, - const PropertyCallbackInfo& info); + static v8::Intercepted MapGet(Local name, + const PropertyCallbackInfo& info); + static v8::Intercepted MapSet(Local name, Local value, + const PropertyCallbackInfo& info); // Utility methods for wrapping C++ objects as JavaScript objects, // and going back again. @@ -399,13 +400,12 @@ string ObjectToString(v8::Isolate* isolate, Local value) { return string(*utf8_value); } - -void JsHttpRequestProcessor::MapGet(Local name, - const PropertyCallbackInfo& info) { - if (name->IsSymbol()) return; +v8::Intercepted JsHttpRequestProcessor::MapGet( + Local name, const PropertyCallbackInfo& info) { + if (name->IsSymbol()) return v8::Intercepted::kNo; // Fetch the map wrapped by this object. - map* obj = UnwrapMap(info.Holder()); + map* obj = UnwrapMap(info.HolderV2()); // Convert the JavaScript string to a std::string. string key = ObjectToString(info.GetIsolate(), name.As()); @@ -414,7 +414,7 @@ void JsHttpRequestProcessor::MapGet(Local name, map::iterator iter = obj->find(key); // If the key is not present return an empty handle as signal - if (iter == obj->end()) return; + if (iter == obj->end()) return v8::Intercepted::kNo; // Otherwise fetch the value and wrap it in a JavaScript string const string& value = (*iter).second; @@ -422,15 +422,16 @@ void JsHttpRequestProcessor::MapGet(Local name, String::NewFromUtf8(info.GetIsolate(), value.c_str(), NewStringType::kNormal, static_cast(value.length())).ToLocalChecked()); + return v8::Intercepted::kYes; } - -void JsHttpRequestProcessor::MapSet(Local name, Local value_obj, - const PropertyCallbackInfo& info) { - if (name->IsSymbol()) return; +v8::Intercepted JsHttpRequestProcessor::MapSet( + Local name, Local value_obj, + const PropertyCallbackInfo& info) { + if (name->IsSymbol()) return v8::Intercepted::kNo; // Fetch the map wrapped by this object. - map* obj = UnwrapMap(info.Holder()); + map* obj = UnwrapMap(info.HolderV2()); // Convert the key and value to std::strings. string key = ObjectToString(info.GetIsolate(), name.As()); @@ -438,12 +439,9 @@ void JsHttpRequestProcessor::MapSet(Local name, Local value_obj, // Update the map. (*obj)[key] = value; - - // Return the value; any non-empty handle will work. - info.GetReturnValue().Set(value_obj); + return v8::Intercepted::kYes; } - Local JsHttpRequestProcessor::MakeMapTemplate( Isolate* isolate) { EscapableHandleScope handle_scope(isolate); @@ -510,7 +508,7 @@ HttpRequest* JsHttpRequestProcessor::UnwrapRequest(Local obj) { void JsHttpRequestProcessor::GetPath(Local name, const PropertyCallbackInfo& info) { // Extract the C++ request object from the JavaScript wrapper. - HttpRequest* request = UnwrapRequest(info.Holder()); + HttpRequest* request = UnwrapRequest(info.HolderV2()); // Fetch the path. const string& path = request->Path(); @@ -524,7 +522,7 @@ void JsHttpRequestProcessor::GetPath(Local name, void JsHttpRequestProcessor::GetReferrer( Local name, const PropertyCallbackInfo& info) { - HttpRequest* request = UnwrapRequest(info.Holder()); + HttpRequest* request = UnwrapRequest(info.HolderV2()); const string& path = request->Referrer(); info.GetReturnValue().Set( String::NewFromUtf8(info.GetIsolate(), path.c_str(), @@ -534,7 +532,7 @@ void JsHttpRequestProcessor::GetReferrer( void JsHttpRequestProcessor::GetHost(Local name, const PropertyCallbackInfo& info) { - HttpRequest* request = UnwrapRequest(info.Holder()); + HttpRequest* request = UnwrapRequest(info.HolderV2()); const string& path = request->Host(); info.GetReturnValue().Set( String::NewFromUtf8(info.GetIsolate(), path.c_str(), @@ -544,7 +542,7 @@ void JsHttpRequestProcessor::GetHost(Local name, void JsHttpRequestProcessor::GetUserAgent( Local name, const PropertyCallbackInfo& info) { - HttpRequest* request = UnwrapRequest(info.Holder()); + HttpRequest* request = UnwrapRequest(info.HolderV2()); const string& path = request->UserAgent(); info.GetReturnValue().Set( String::NewFromUtf8(info.GetIsolate(), path.c_str(), @@ -560,18 +558,20 @@ Local JsHttpRequestProcessor::MakeRequestTemplate( result->SetInternalFieldCount(1); // Add accessors for each of the fields of the request. - result->SetAccessor( + result->SetNativeDataProperty( String::NewFromUtf8Literal(isolate, "path", NewStringType::kInternalized), GetPath); - result->SetAccessor(String::NewFromUtf8Literal(isolate, "referrer", - NewStringType::kInternalized), - GetReferrer); - result->SetAccessor( + result->SetNativeDataProperty( + String::NewFromUtf8Literal(isolate, "referrer", + NewStringType::kInternalized), + GetReferrer); + result->SetNativeDataProperty( String::NewFromUtf8Literal(isolate, "host", NewStringType::kInternalized), GetHost); - result->SetAccessor(String::NewFromUtf8Literal(isolate, "userAgent", - NewStringType::kInternalized), - GetUserAgent); + result->SetNativeDataProperty( + String::NewFromUtf8Literal(isolate, "userAgent", + NewStringType::kInternalized), + GetUserAgent); // Again, return the result through the current handle scope. return handle_scope.Escape(result); diff --git a/deps/v8/src/DEPS b/deps/v8/src/DEPS index d9c58d01236454..8cd950b5d1f5ea 100644 --- a/deps/v8/src/DEPS +++ b/deps/v8/src/DEPS @@ -1,5 +1,4 @@ include_rules = [ - "+base/trace_event/common/trace_event_common.h", "+src", "-src/asmjs", "+src/asmjs/asm-js.h", @@ -38,9 +37,10 @@ include_rules = [ "+src/heap/local-heap-inl.h", "+src/heap/pretenuring-handler-inl.h", # TODO(v8:10496): Don't expose memory chunk outside of heap/. - "+src/heap/mutable-page.h", - "+src/heap/mutable-page-inl.h", + "+src/heap/mutable-page-metadata.h", + "+src/heap/mutable-page-metadata-inl.h", "+src/heap/memory-chunk.h", + "+src/heap/page-metadata-inl.h", "+src/heap/paged-spaces-inl.h", "+src/heap/parked-scope-inl.h", "+src/heap/parked-scope.h", @@ -55,7 +55,7 @@ include_rules = [ "+src/interpreter/bytecode-array-iterator.h", "+src/interpreter/bytecode-array-random-iterator.h", "+src/interpreter/bytecode-decoder.h", - "+src/interpreter/bytecode-flags.h", + "+src/interpreter/bytecode-flags-and-tokens.h", "+src/interpreter/bytecode-register.h", "+src/interpreter/bytecodes.h", "+src/interpreter/interpreter.h", @@ -69,6 +69,7 @@ include_rules = [ "+src/regexp/regexp-flags.h", "+src/regexp/regexp-stack.h", "+src/regexp/regexp-utils.h", + "+src/tracing/trace-event-no-perfetto.h", "-src/trap-handler", "+src/trap-handler/handler-inside-posix.h", "+src/trap-handler/handler-inside-win.h", diff --git a/deps/v8/src/api/OWNERS b/deps/v8/src/api/OWNERS index eb4a9242713213..aa5d9dd1fbd95b 100644 --- a/deps/v8/src/api/OWNERS +++ b/deps/v8/src/api/OWNERS @@ -4,7 +4,6 @@ ishell@chromium.org jkummerow@chromium.org leszeks@chromium.org mlippautz@chromium.org -mslekova@chromium.org verwaest@chromium.org # For v8-debug.h implementations. diff --git a/deps/v8/src/api/api-arguments-inl.h b/deps/v8/src/api/api-arguments-inl.h index de2648c8d60528..3ebc8a185f1237 100644 --- a/deps/v8/src/api/api-arguments-inl.h +++ b/deps/v8/src/api/api-arguments-inl.h @@ -17,16 +17,6 @@ namespace v8 { namespace internal { -#if DEBUG -bool IsApiCallResultType(Tagged obj) { - if (IsSmi(obj)) return true; - DCHECK(IsHeapObject(obj)); - return (IsString(obj) || IsSymbol(obj) || IsJSReceiver(obj) || - IsHeapNumber(obj) || IsBigInt(obj) || IsUndefined(obj) || - IsTrue(obj) || IsFalse(obj) || IsNull(obj)); -} -#endif // DEBUG - CustomArgumentsBase::CustomArgumentsBase(Isolate* isolate) : Relocatable(isolate) {} @@ -40,28 +30,12 @@ template Handle CustomArguments::GetReturnValue(Isolate* isolate) const { // Check the ReturnValue. FullObjectSlot slot = slot_at(kReturnValueIndex); - // Nothing was set, return empty handle as per previous behaviour. - Tagged raw_object = *slot; - if (IsTheHole(raw_object, isolate)) return Handle(); - DCHECK(IsApiCallResultType(raw_object)); - return Handle::cast(Handle(slot.location())); -} - -template -template -Handle CustomArguments::GetReturnValueNoHoleCheck( - Isolate* isolate) const { - // Check the ReturnValue. - FullObjectSlot slot = slot_at(kReturnValueIndex); - // TODO(ishell): remove the hole check once it's no longer possible to set - // return value to the hole. - CHECK(!IsTheHole(*slot, isolate)); - DCHECK(IsApiCallResultType(*slot)); - return Handle::cast(Handle(slot.location())); + DCHECK(Is(*slot)); + return Cast(Handle(slot.location())); } inline Tagged PropertyCallbackArguments::holder() const { - return JSObject::cast(*slot_at(T::kHolderIndex)); + return Cast(*slot_at(T::kHolderIndex)); } inline Tagged PropertyCallbackArguments::receiver() const { @@ -69,7 +43,7 @@ inline Tagged PropertyCallbackArguments::receiver() const { } inline Tagged FunctionCallbackArguments::holder() const { - return JSReceiver::cast(*slot_at(T::kHolderIndex)); + return Cast(*slot_at(T::kHolderIndex)); } #define DCHECK_NAME_COMPATIBLE(interceptor, name) \ @@ -78,39 +52,46 @@ inline Tagged FunctionCallbackArguments::holder() const { DCHECK_IMPLIES(IsSymbol(*name), interceptor->can_intercept_symbols()); #define PREPARE_CALLBACK_INFO_ACCESSOR(ISOLATE, F, API_RETURN_TYPE, \ - ACCESSOR_INFO, RECEIVER, ACCESSOR_KIND) \ + ACCESSOR_INFO, RECEIVER, ACCESSOR_KIND, \ + EXCEPTION_CONTEXT) \ if (ISOLATE->should_check_side_effects() && \ !ISOLATE->debug()->PerformSideEffectCheckForAccessor( \ ACCESSOR_INFO, RECEIVER, ACCESSOR_KIND)) { \ return {}; \ } \ - ExternalCallbackScope call_scope(ISOLATE, FUNCTION_ADDR(F)); \ - PropertyCallbackInfo callback_info(values_); - -#define PREPARE_CALLBACK_INFO_INTERCEPTOR(ISOLATE, F, API_RETURN_TYPE, \ - INTERCEPTOR_INFO) \ - if (ISOLATE->should_check_side_effects() && \ - !ISOLATE->debug()->PerformSideEffectCheckForInterceptor( \ - INTERCEPTOR_INFO)) { \ - return {}; \ - } \ - ExternalCallbackScope call_scope(ISOLATE, FUNCTION_ADDR(F)); \ - PropertyCallbackInfo callback_info(values_); - -Handle FunctionCallbackArguments::Call( - Tagged function) { + const PropertyCallbackInfo& callback_info = \ + GetPropertyCallbackInfo(); \ + ExternalCallbackScope call_scope(ISOLATE, FUNCTION_ADDR(F), \ + EXCEPTION_CONTEXT, &callback_info); + +#define PREPARE_CALLBACK_INFO_INTERCEPTOR(ISOLATE, F, API_RETURN_TYPE, \ + INTERCEPTOR_INFO, EXCEPTION_CONTEXT) \ + if (ISOLATE->should_check_side_effects() && \ + !ISOLATE->debug()->PerformSideEffectCheckForInterceptor( \ + INTERCEPTOR_INFO)) { \ + return {}; \ + } \ + const PropertyCallbackInfo& callback_info = \ + GetPropertyCallbackInfo(); \ + ExternalCallbackScope call_scope(ISOLATE, FUNCTION_ADDR(F), \ + EXCEPTION_CONTEXT, &callback_info); + +Handle FunctionCallbackArguments::CallOrConstruct( + Tagged function, bool is_construct) { Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kFunctionCallback); v8::FunctionCallback f = reinterpret_cast(function->callback(isolate)); - Handle receiver_check_unsupported; if (isolate->should_check_side_effects() && !isolate->debug()->PerformSideEffectCheckForCallback( handle(function, isolate))) { return {}; } - ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); FunctionCallbackInfo info(values_, argv_, argc_); + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f), + is_construct ? ExceptionContext::kConstructor + : ExceptionContext::kOperation, + &info); f(info); return GetReturnValue(isolate); } @@ -126,353 +107,333 @@ PropertyCallbackArguments::~PropertyCallbackArguments(){ #endif // DEBUG } +Maybe PropertyCallbackArguments::GetBooleanReturnValue( + v8::Intercepted intercepted, const char* callback_kind_for_error_message, + bool ignore_return_value) { + Isolate* isolate = this->isolate(); + if (isolate->has_exception()) { + // TODO(ishell, 328490288): fix Node.js which has Setter/Definer + // interceptor callbacks not returning v8::Intercepted::kYes on exceptions. + if ((false) && DEBUG_BOOL && (intercepted == v8::Intercepted::kNo)) { + FATAL( + "Check failed: %s interceptor callback has thrown an " + "exception but hasn't returned v8::Intercepted::kYes.", + callback_kind_for_error_message); + } + return Nothing(); + } + + if (intercepted == v8::Intercepted::kNo) { + // Not intercepted, there must be no side effects including exceptions. + DCHECK(!isolate->has_exception()); + return Just(InterceptorResult::kNotIntercepted); + } + DCHECK_EQ(intercepted, v8::Intercepted::kYes); + AcceptSideEffects(); + + if (ignore_return_value) return Just(InterceptorResult::kTrue); + + bool result = IsTrue(*GetReturnValue(isolate), isolate); + + // TODO(ishell, 348688196): ensure callbacks comply with this and + // enable the check. + if ((false) && DEBUG_BOOL && !result && ShouldThrowOnError()) { + FATAL( + "Check failed: %s interceptor callback hasn't thrown an " + "exception on failure as requested.", + callback_kind_for_error_message); + } + return Just(result ? InterceptorResult::kTrue : InterceptorResult::kFalse); +} + // ------------------------------------------------------------------------- // Named Interceptor callbacks. -Handle PropertyCallbackArguments::CallNamedEnumerator( +Handle PropertyCallbackArguments::CallNamedEnumerator( Handle interceptor) { DCHECK(interceptor->is_named()); RCS_SCOPE(isolate(), RuntimeCallCounterId::kNamedEnumeratorCallback); return CallPropertyEnumerator(interceptor); } +// TODO(ishell): return std::optional. Handle PropertyCallbackArguments::CallNamedQuery( Handle interceptor, Handle name) { DCHECK_NAME_COMPATIBLE(interceptor, name); Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedQueryCallback); - Handle receiver_check_unsupported; - if (interceptor->has_new_callbacks_signature()) { - NamedPropertyQueryCallback f = - ToCData(interceptor->query()); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Integer, interceptor); - auto intercepted = f(v8::Utils::ToLocal(name), callback_info); - if (intercepted == v8::Intercepted::kNo) return {}; - return GetReturnValueNoHoleCheck(isolate); - - } else { - GenericNamedPropertyQueryCallback f = - ToCData(interceptor->query()); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Integer, interceptor); - f(v8::Utils::ToLocal(name), callback_info); - return GetReturnValue(isolate); - } + slot_at(kPropertyKeyIndex).store(*name); + slot_at(kReturnValueIndex).store(Smi::FromInt(v8::None)); + NamedPropertyQueryCallback f = + ToCData( + interceptor->query()); + PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Integer, interceptor, + ExceptionContext::kNamedQuery); + v8::Intercepted intercepted = f(v8::Utils::ToLocal(name), callback_info); + if (intercepted == v8::Intercepted::kNo) return {}; + return GetReturnValue(isolate); } -Handle PropertyCallbackArguments::CallNamedGetter( +Handle PropertyCallbackArguments::CallNamedGetter( Handle interceptor, Handle name) { DCHECK_NAME_COMPATIBLE(interceptor, name); Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedGetterCallback); - if (interceptor->has_new_callbacks_signature()) { - NamedPropertyGetterCallback f = - ToCData(interceptor->getter()); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor); - auto intercepted = f(v8::Utils::ToLocal(name), callback_info); - if (intercepted == v8::Intercepted::kNo) return {}; - return GetReturnValueNoHoleCheck(isolate); - - } else { - GenericNamedPropertyGetterCallback f = - ToCData(interceptor->getter()); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor); - f(v8::Utils::ToLocal(name), callback_info); - return GetReturnValue(isolate); - } + slot_at(kPropertyKeyIndex).store(*name); + slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).undefined_value()); + NamedPropertyGetterCallback f = + ToCData( + interceptor->getter()); + PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor, + ExceptionContext::kNamedGetter); + v8::Intercepted intercepted = f(v8::Utils::ToLocal(name), callback_info); + if (intercepted == v8::Intercepted::kNo) return {}; + return GetReturnValue(isolate); } -Handle PropertyCallbackArguments::CallNamedDescriptor( +Handle PropertyCallbackArguments::CallNamedDescriptor( Handle interceptor, Handle name) { DCHECK_NAME_COMPATIBLE(interceptor, name); Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedDescriptorCallback); - if (interceptor->has_new_callbacks_signature()) { - NamedPropertyDescriptorCallback f = - ToCData(interceptor->descriptor()); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor); - auto intercepted = f(v8::Utils::ToLocal(name), callback_info); - if (intercepted == v8::Intercepted::kNo) return {}; - return GetReturnValueNoHoleCheck(isolate); - - } else { - GenericNamedPropertyDescriptorCallback f = - ToCData( - interceptor->descriptor()); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor); - f(v8::Utils::ToLocal(name), callback_info); - return GetReturnValue(isolate); - } + slot_at(kPropertyKeyIndex).store(*name); + slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).undefined_value()); + NamedPropertyDescriptorCallback f = + ToCData( + interceptor->descriptor()); + PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor, + ExceptionContext::kNamedDescriptor); + v8::Intercepted intercepted = f(v8::Utils::ToLocal(name), callback_info); + if (intercepted == v8::Intercepted::kNo) return {}; + return GetReturnValue(isolate); } -// TODO(ishell): just return v8::Intercepted. -Handle PropertyCallbackArguments::CallNamedSetter( - Handle interceptor, Handle name, +v8::Intercepted PropertyCallbackArguments::CallNamedSetter( + DirectHandle interceptor, Handle name, Handle value) { DCHECK_NAME_COMPATIBLE(interceptor, name); Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedSetterCallback); - if (interceptor->has_new_callbacks_signature()) { - NamedPropertySetterCallback f = - ToCData(interceptor->setter()); - Handle has_side_effects; - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, void, has_side_effects); - auto intercepted = - f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), callback_info); - if (intercepted == v8::Intercepted::kNo) return {}; - // Non-empty handle indicates that the request was intercepted. - return isolate->factory()->undefined_value(); - - } else { - GenericNamedPropertySetterCallback f = - ToCData(interceptor->setter()); - Handle has_side_effects; - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, has_side_effects); - f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), callback_info); - return GetReturnValue(isolate); - } + slot_at(kPropertyKeyIndex).store(*name); + slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).true_value()); + NamedPropertySetterCallback f = + ToCData( + interceptor->setter()); + Handle has_side_effects; + PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, void, has_side_effects, + ExceptionContext::kNamedSetter); + v8::Intercepted intercepted = + f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), callback_info); + return intercepted; } -// TODO(ishell): just return v8::Intercepted. -Handle PropertyCallbackArguments::CallNamedDefiner( - Handle interceptor, Handle name, +v8::Intercepted PropertyCallbackArguments::CallNamedDefiner( + DirectHandle interceptor, Handle name, const v8::PropertyDescriptor& desc) { DCHECK_NAME_COMPATIBLE(interceptor, name); Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedDefinerCallback); - if (interceptor->has_new_callbacks_signature()) { - NamedPropertyDefinerCallback f = - ToCData(interceptor->definer()); - Handle has_side_effects; - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, void, has_side_effects); - auto intercepted = f(v8::Utils::ToLocal(name), desc, callback_info); - if (intercepted == v8::Intercepted::kNo) return {}; - // Non-empty handle indicates that the request was intercepted. - return isolate->factory()->undefined_value(); - - } else { - GenericNamedPropertyDefinerCallback f = - ToCData(interceptor->definer()); - Handle has_side_effects; - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, has_side_effects); - f(v8::Utils::ToLocal(name), desc, callback_info); - return GetReturnValue(isolate); - } + slot_at(kPropertyKeyIndex).store(*name); + slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).true_value()); + NamedPropertyDefinerCallback f = + ToCData(interceptor->definer()); + Handle has_side_effects; + PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, void, has_side_effects, + ExceptionContext::kNamedDefiner); + v8::Intercepted intercepted = + f(v8::Utils::ToLocal(name), desc, callback_info); + return intercepted; } -// TODO(ishell): return Handle -Handle PropertyCallbackArguments::CallNamedDeleter( - Handle interceptor, Handle name) { +v8::Intercepted PropertyCallbackArguments::CallNamedDeleter( + DirectHandle interceptor, Handle name) { DCHECK_NAME_COMPATIBLE(interceptor, name); Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedDeleterCallback); - if (interceptor->has_new_callbacks_signature()) { - NamedPropertyDeleterCallback f = - ToCData(interceptor->deleter()); - Handle has_side_effects; - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Boolean, - has_side_effects); - auto intercepted = f(v8::Utils::ToLocal(name), callback_info); - if (intercepted == v8::Intercepted::kNo) return {}; - return GetReturnValue(isolate); - - } else { - GenericNamedPropertyDeleterCallback f = - ToCData(interceptor->deleter()); - Handle has_side_effects; - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Boolean, - has_side_effects); - f(v8::Utils::ToLocal(name), callback_info); - return GetReturnValue(isolate); - } + slot_at(kPropertyKeyIndex).store(*name); + slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).true_value()); + NamedPropertyDeleterCallback f = + ToCData(interceptor->deleter()); + Handle has_side_effects; + PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Boolean, has_side_effects, + ExceptionContext::kNamedDeleter); + v8::Intercepted intercepted = f(v8::Utils::ToLocal(name), callback_info); + return intercepted; } // ------------------------------------------------------------------------- // Indexed Interceptor callbacks. -Handle PropertyCallbackArguments::CallIndexedEnumerator( +Handle PropertyCallbackArguments::CallIndexedEnumerator( Handle interceptor) { DCHECK(!interceptor->is_named()); RCS_SCOPE(isolate(), RuntimeCallCounterId::kIndexedEnumeratorCallback); return CallPropertyEnumerator(interceptor); } +// TODO(ishell): return std::optional. Handle PropertyCallbackArguments::CallIndexedQuery( Handle interceptor, uint32_t index) { DCHECK(!interceptor->is_named()); Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kIndexedQueryCallback); - if (interceptor->has_new_callbacks_signature()) { - IndexedPropertyQueryCallbackV2 f = - ToCData(interceptor->query()); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Integer, interceptor); - auto intercepted = f(index, callback_info); - if (intercepted == v8::Intercepted::kNo) return {}; - return GetReturnValueNoHoleCheck(isolate); - - } else { - IndexedPropertyQueryCallback f = - ToCData(interceptor->query()); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Integer, interceptor); - f(index, callback_info); - return GetReturnValue(isolate); - } + index_ = index; + slot_at(kPropertyKeyIndex).store(Smi::zero()); // indexed callback marker + slot_at(kReturnValueIndex).store(Smi::FromInt(v8::None)); + IndexedPropertyQueryCallbackV2 f = + ToCData(interceptor->query()); + PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Integer, interceptor, + ExceptionContext::kIndexedQuery); + v8::Intercepted intercepted = f(index, callback_info); + if (intercepted == v8::Intercepted::kNo) return {}; + return GetReturnValue(isolate); } -Handle PropertyCallbackArguments::CallIndexedGetter( +Handle PropertyCallbackArguments::CallIndexedGetter( Handle interceptor, uint32_t index) { DCHECK(!interceptor->is_named()); - RCS_SCOPE(isolate(), RuntimeCallCounterId::kNamedGetterCallback); - if (interceptor->has_new_callbacks_signature()) { - IndexedPropertyGetterCallbackV2 f = - ToCData(interceptor->getter()); - Isolate* isolate = this->isolate(); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor); - auto intercepted = f(index, callback_info); - if (intercepted == v8::Intercepted::kNo) return {}; - return GetReturnValueNoHoleCheck(isolate); - - } else { - IndexedPropertyGetterCallback f = - ToCData(interceptor->getter()); - Isolate* isolate = this->isolate(); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor); - f(index, callback_info); - return GetReturnValue(isolate); - } + Isolate* isolate = this->isolate(); + RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedGetterCallback); + index_ = index; + slot_at(kPropertyKeyIndex).store(Smi::zero()); // indexed callback marker + slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).undefined_value()); + IndexedPropertyGetterCallbackV2 f = + ToCData(interceptor->getter()); + PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor, + ExceptionContext::kIndexedGetter); + v8::Intercepted intercepted = f(index, callback_info); + if (intercepted == v8::Intercepted::kNo) return {}; + return GetReturnValue(isolate); } -Handle PropertyCallbackArguments::CallIndexedDescriptor( +Handle PropertyCallbackArguments::CallIndexedDescriptor( Handle interceptor, uint32_t index) { DCHECK(!interceptor->is_named()); Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kIndexedDescriptorCallback); - if (interceptor->has_new_callbacks_signature()) { - IndexedPropertyDescriptorCallbackV2 f = - ToCData(interceptor->descriptor()); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor); - auto intercepted = f(index, callback_info); - if (intercepted == v8::Intercepted::kNo) return {}; - return GetReturnValueNoHoleCheck(isolate); - - } else { - IndexedPropertyDescriptorCallback f = - ToCData(interceptor->descriptor()); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor); - f(index, callback_info); - return GetReturnValue(isolate); - } + index_ = index; + slot_at(kPropertyKeyIndex).store(Smi::zero()); // indexed callback marker + slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).undefined_value()); + IndexedPropertyDescriptorCallbackV2 f = + ToCData( + interceptor->descriptor()); + PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor, + ExceptionContext::kIndexedDescriptor); + v8::Intercepted intercepted = f(index, callback_info); + if (intercepted == v8::Intercepted::kNo) return {}; + return GetReturnValue(isolate); } -// TODO(ishell): just return v8::Intercepted. -Handle PropertyCallbackArguments::CallIndexedSetter( - Handle interceptor, uint32_t index, Handle value) { +v8::Intercepted PropertyCallbackArguments::CallIndexedSetter( + DirectHandle interceptor, uint32_t index, + Handle value) { DCHECK(!interceptor->is_named()); Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kIndexedSetterCallback); - if (interceptor->has_new_callbacks_signature()) { - IndexedPropertySetterCallbackV2 f = - ToCData(interceptor->setter()); - Handle has_side_effects; - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, void, has_side_effects); - auto intercepted = f(index, v8::Utils::ToLocal(value), callback_info); - if (intercepted == v8::Intercepted::kNo) return {}; - // Non-empty handle indicates that the request was intercepted. - return isolate->factory()->undefined_value(); - - } else { - IndexedPropertySetterCallback f = - ToCData(interceptor->setter()); - Handle has_side_effects; - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, has_side_effects); - f(index, v8::Utils::ToLocal(value), callback_info); - return GetReturnValue(isolate); - } + index_ = index; + slot_at(kPropertyKeyIndex).store(Smi::zero()); // indexed callback marker + slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).true_value()); + IndexedPropertySetterCallbackV2 f = + ToCData(interceptor->setter()); + Handle has_side_effects; + PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, void, has_side_effects, + ExceptionContext::kIndexedSetter); + v8::Intercepted intercepted = + f(index, v8::Utils::ToLocal(value), callback_info); + return intercepted; } -// TODO(ishell): just return v8::Intercepted. -Handle PropertyCallbackArguments::CallIndexedDefiner( - Handle interceptor, uint32_t index, +v8::Intercepted PropertyCallbackArguments::CallIndexedDefiner( + DirectHandle interceptor, uint32_t index, const v8::PropertyDescriptor& desc) { DCHECK(!interceptor->is_named()); Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kIndexedDefinerCallback); - if (interceptor->has_new_callbacks_signature()) { - IndexedPropertyDefinerCallbackV2 f = - ToCData(interceptor->definer()); - Handle has_side_effects; - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, void, has_side_effects); - auto intercepted = f(index, desc, callback_info); - if (intercepted == v8::Intercepted::kNo) return {}; - // Non-empty handle indicates that the request was intercepted. - return isolate->factory()->undefined_value(); - - } else { - IndexedPropertyDefinerCallback f = - ToCData(interceptor->definer()); - Handle has_side_effects; - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, has_side_effects); - f(index, desc, callback_info); - return GetReturnValue(isolate); - } + index_ = index; + slot_at(kPropertyKeyIndex).store(Smi::zero()); // indexed callback marker + slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).true_value()); + IndexedPropertyDefinerCallbackV2 f = + ToCData(interceptor->definer()); + Handle has_side_effects; + PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, void, has_side_effects, + ExceptionContext::kIndexedDefiner); + v8::Intercepted intercepted = f(index, desc, callback_info); + return intercepted; } -// TODO(ishell): return Handle -Handle PropertyCallbackArguments::CallIndexedDeleter( +v8::Intercepted PropertyCallbackArguments::CallIndexedDeleter( Handle interceptor, uint32_t index) { DCHECK(!interceptor->is_named()); Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kIndexedDeleterCallback); - if (interceptor->has_new_callbacks_signature()) { - IndexedPropertyDeleterCallbackV2 f = - ToCData(interceptor->deleter()); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Boolean, interceptor); - auto intercepted = f(index, callback_info); - if (intercepted == v8::Intercepted::kNo) return {}; - return GetReturnValueNoHoleCheck(isolate); - - } else { - IndexedPropertyDeleterCallback f = - ToCData(interceptor->deleter()); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Boolean, interceptor); - f(index, callback_info); - return GetReturnValue(isolate); - } + index_ = index; + slot_at(kPropertyKeyIndex).store(Smi::zero()); // indexed callback marker + slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).true_value()); + IndexedPropertyDeleterCallbackV2 f = + ToCData(interceptor->deleter()); + PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Boolean, interceptor, + ExceptionContext::kIndexedDeleter); + v8::Intercepted intercepted = f(index, callback_info); + return intercepted; } -Handle PropertyCallbackArguments::CallPropertyEnumerator( +Handle PropertyCallbackArguments::CallPropertyEnumerator( Handle interceptor) { // Named and indexed enumerator callbacks have same signatures. static_assert(std::is_same::value); - IndexedPropertyEnumeratorCallback f = - v8::ToCData(interceptor->enumerator()); Isolate* isolate = this->isolate(); - PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Array, interceptor); + slot_at(kPropertyKeyIndex).store(Smi::zero()); // not relevant + // Enumerator callback's return value is initialized with undefined even + // though it's supposed to return v8::Array. + slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).undefined_value()); + // TODO(ishell): consider making it return v8::Intercepted to indicate + // whether the result was set or not. + IndexedPropertyEnumeratorCallback f = + v8::ToCData( + interceptor->enumerator()); + PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Array, interceptor, + ExceptionContext::kNamedEnumerator); f(callback_info); - return GetReturnValue(isolate); + Handle result = GetReturnValue(isolate); + DCHECK(IsUndefined(*result) || IsJSObject(*result)); + return Cast(result); } // ------------------------------------------------------------------------- // Accessors -Handle PropertyCallbackArguments::CallAccessorGetter( - Handle info, Handle name) { +Handle PropertyCallbackArguments::CallAccessorGetter( + DirectHandle info, Handle name) { Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kAccessorGetterCallback); // Unlike interceptor callbacks we know that the property exists, so // the callback is allowed to have side effects. AcceptSideEffects(); + slot_at(kPropertyKeyIndex).store(*name); + slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).undefined_value()); AccessorNameGetterCallback f = reinterpret_cast(info->getter(isolate)); PREPARE_CALLBACK_INFO_ACCESSOR(isolate, f, v8::Value, info, - handle(receiver(), isolate), ACCESSOR_GETTER); + handle(receiver(), isolate), ACCESSOR_GETTER, + ExceptionContext::kAttributeGet); f(v8::Utils::ToLocal(name), callback_info); - return GetReturnValue(isolate); + return GetReturnValue(isolate); } -Handle PropertyCallbackArguments::CallAccessorSetter( - Handle accessor_info, Handle name, +bool PropertyCallbackArguments::CallAccessorSetter( + DirectHandle accessor_info, Handle name, Handle value) { Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kAccessorSetterCallback); @@ -480,12 +441,37 @@ Handle PropertyCallbackArguments::CallAccessorSetter( // the callback is allowed to have side effects. AcceptSideEffects(); + slot_at(kPropertyKeyIndex).store(*name); + slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).true_value()); + // The actual type of setter callback is either + // v8::AccessorNameSetterCallback or + // i::Accesors::AccessorNameBooleanSetterCallback, depending on whether the + // AccessorInfo was created by the API or internally (see accessors.cc). + // Here we handle both cases using the AccessorNameSetterCallback signature + // and checking whether the returned result is set to default value + // (the undefined value). + // TODO(ishell, 348660658): update V8 Api to allow setter callbacks provide + // the result of [[Set]] operation according to JavaScript semantics. AccessorNameSetterCallback f = reinterpret_cast( accessor_info->setter(isolate)); PREPARE_CALLBACK_INFO_ACCESSOR(isolate, f, void, accessor_info, - handle(receiver(), isolate), ACCESSOR_SETTER); + handle(receiver(), isolate), ACCESSOR_SETTER, + ExceptionContext::kAttributeSet); f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), callback_info); - return GetReturnValue(isolate); + // Historically, in case of v8::AccessorNameSetterCallback it wasn't allowed + // to set the result and not setting the result was treated as successful + // execution. + // During interceptors Api refactoring it was temporarily allowed to call + // v8::ReturnValue::Set[NonEmpty](Local) and the result was just + // converted to v8::Boolean which was then treated as a result of [[Set]]. + // In case of AccessorNameBooleanSetterCallback, the result is always + // set to v8::Boolean or an exception is be thrown (in which case the + // result is ignored anyway). So, regardless of whether the signature was + // v8::AccessorNameSetterCallback or AccessorNameBooleanSetterCallback + // the result is guaranteed to be v8::Boolean value indicating success or + // failure. + Handle result = GetReturnValue(isolate); + return IsTrue(*result, isolate); } #undef PREPARE_CALLBACK_INFO_ACCESSOR diff --git a/deps/v8/src/api/api-arguments.cc b/deps/v8/src/api/api-arguments.cc index 289cd9f28b36f8..33d9d8fc7cc8f4 100644 --- a/deps/v8/src/api/api-arguments.cc +++ b/deps/v8/src/api/api-arguments.cc @@ -18,6 +18,13 @@ PropertyCallbackArguments::PropertyCallbackArguments( javascript_execution_counter_(isolate->javascript_execution_counter()) #endif // DEBUG { + if (DEBUG_BOOL) { + // Zap these fields to ensure that they are initialized by a subsequent + // CallXXX(..). + Tagged zap_value(kZapValue); + slot_at(T::kPropertyKeyIndex).store(zap_value); + slot_at(T::kReturnValueIndex).store(zap_value); + } slot_at(T::kThisIndex).store(self); slot_at(T::kHolderIndex).store(holder); slot_at(T::kDataIndex).store(data); @@ -28,32 +35,23 @@ PropertyCallbackArguments::PropertyCallbackArguments( value = should_throw.FromJust(); } slot_at(T::kShouldThrowOnErrorIndex).store(Smi::FromInt(value)); - // Here the hole is set as default value. - // It cannot escape into js as it's removed in Call below. - Tagged the_hole_value = ReadOnlyRoots(isolate).the_hole_value(); - slot_at(T::kReturnValueIndex).store(the_hole_value); - slot_at(T::kUnusedIndex).store(Smi::zero()); + slot_at(T::kHolderV2Index).store(Smi::zero()); DCHECK(IsHeapObject(*slot_at(T::kHolderIndex))); DCHECK(IsSmi(*slot_at(T::kIsolateIndex))); } FunctionCallbackArguments::FunctionCallbackArguments( - internal::Isolate* isolate, internal::Tagged data, - internal::Tagged holder, - internal::Tagged new_target, internal::Address* argv, + Isolate* isolate, Tagged target, + Tagged holder, Tagged new_target, Address* argv, int argc) : Super(isolate), argv_(argv), argc_(argc) { - slot_at(T::kDataIndex).store(data); + slot_at(T::kTargetIndex).store(target); slot_at(T::kHolderIndex).store(holder); slot_at(T::kNewTargetIndex).store(new_target); slot_at(T::kIsolateIndex) .store(Tagged(reinterpret_cast
(isolate))); - // Here the hole is set as default value. It's converted to and not - // directly exposed to js. - // TODO(cbruni): Remove and/or use custom sentinel value. - Tagged the_hole_value = ReadOnlyRoots(isolate).the_hole_value(); - slot_at(T::kReturnValueIndex).store(the_hole_value); - slot_at(T::kUnusedIndex).store(Smi::zero()); + slot_at(T::kReturnValueIndex).store(ReadOnlyRoots(isolate).undefined_value()); + slot_at(T::kContextIndex).store(isolate->context()); DCHECK(IsHeapObject(*slot_at(T::kHolderIndex))); DCHECK(IsSmi(*slot_at(T::kIsolateIndex))); } diff --git a/deps/v8/src/api/api-arguments.h b/deps/v8/src/api/api-arguments.h index 179559d8b251a0..22f583585edf6c 100644 --- a/deps/v8/src/api/api-arguments.h +++ b/deps/v8/src/api/api-arguments.h @@ -42,9 +42,6 @@ class CustomArguments : public CustomArgumentsBase { template Handle GetReturnValue(Isolate* isolate) const; - template - Handle GetReturnValueNoHoleCheck(Isolate* isolate) const; - inline Isolate* isolate() const { return reinterpret_cast((*slot_at(T::kIsolateIndex)).ptr()); } @@ -78,11 +75,18 @@ class PropertyCallbackArguments final static constexpr int kArgsLength = T::kArgsLength; static constexpr int kThisIndex = T::kThisIndex; static constexpr int kDataIndex = T::kDataIndex; - static constexpr int kUnusedIndex = T::kUnusedIndex; + static constexpr int kHolderV2Index = T::kHolderV2Index; static constexpr int kHolderIndex = T::kHolderIndex; static constexpr int kIsolateIndex = T::kIsolateIndex; static constexpr int kShouldThrowOnErrorIndex = T::kShouldThrowOnErrorIndex; - + static constexpr int kPropertyKeyIndex = T::kPropertyKeyIndex; + + // This constructor leaves kPropertyKeyIndex and kReturnValueIndex slots + // uninitialized in order to let them be initialized by the subsequent + // CallXXX(..) and avoid double initialization. As a consequence, there + // must be no GC call between this constructor and CallXXX(..). + // In debug mode these slots are zapped, so GC should be able to detect + // the misuse of this object. PropertyCallbackArguments(Isolate* isolate, Tagged data, Tagged self, Tagged holder, Maybe should_throw); @@ -96,52 +100,80 @@ class PropertyCallbackArguments final // ------------------------------------------------------------------------- // Accessor Callbacks - // Also used for AccessorSetterCallback. - inline Handle CallAccessorSetter(Handle info, - Handle name, - Handle value); - // Also used for AccessorGetterCallback, AccessorNameGetterCallback. - inline Handle CallAccessorGetter(Handle info, - Handle name); + + // Returns the result of [[Get]] operation or throws an exception. + // In case of exception empty handle is returned. + // TODO(ishell, 328490288): stop returning empty handles. + inline Handle CallAccessorGetter(DirectHandle info, + Handle name); + // Returns the result of [[Set]] operation or throws an exception. + V8_WARN_UNUSED_RESULT + inline bool CallAccessorSetter(DirectHandle info, + Handle name, Handle value); // ------------------------------------------------------------------------- // Named Interceptor Callbacks + + // Empty handle means that the request was not intercepted. + // Pending exception handling should be done by the caller. inline Handle CallNamedQuery(Handle interceptor, Handle name); - inline Handle CallNamedGetter(Handle interceptor, - Handle name); - inline Handle CallNamedSetter(Handle interceptor, - Handle name, - Handle value); - inline Handle CallNamedDefiner(Handle interceptor, - Handle name, - const v8::PropertyDescriptor& desc); - inline Handle CallNamedDeleter(Handle interceptor, - Handle name); - inline Handle CallNamedDescriptor(Handle interceptor, - Handle name); - inline Handle CallNamedEnumerator( + inline Handle CallNamedGetter(Handle interceptor, + Handle name); + + // Calls Setter/Definer/Deleter callback and returns whether the request + // was intercepted. + // Pending exception handling and interpretation of the result should be + // done by the caller using GetBooleanReturnValue(..). + inline v8::Intercepted CallNamedSetter( + DirectHandle interceptor, Handle name, + Handle value); + inline v8::Intercepted CallNamedDefiner( + DirectHandle interceptor, Handle name, + const v8::PropertyDescriptor& desc); + inline v8::Intercepted CallNamedDeleter( + DirectHandle interceptor, Handle name); + + // Empty handle means that the request was not intercepted. + // Pending exception handling should be done by the caller. + inline Handle CallNamedDescriptor(Handle interceptor, + Handle name); + // Returns JSArray-like object with property names or undefined. + inline Handle CallNamedEnumerator( Handle interceptor); // ------------------------------------------------------------------------- // Indexed Interceptor Callbacks + + // Empty handle means that the request was not intercepted. + // Pending exception handling should be done by the caller. inline Handle CallIndexedQuery(Handle interceptor, uint32_t index); - inline Handle CallIndexedGetter(Handle interceptor, - uint32_t index); - inline Handle CallIndexedSetter(Handle interceptor, - uint32_t index, Handle value); - inline Handle CallIndexedDefiner(Handle interceptor, - uint32_t index, - const v8::PropertyDescriptor& desc); - inline Handle CallIndexedDeleter(Handle interceptor, - uint32_t index); - inline Handle CallIndexedDescriptor( + inline Handle CallIndexedGetter(Handle interceptor, + uint32_t index); + + // Calls Setter/Definer/Deleter callback and returns whether the request + // was intercepted. + // Pending exception handling and interpretation of the result should be + // done by the caller using GetBooleanReturnValue(..). + inline v8::Intercepted CallIndexedSetter( + DirectHandle interceptor, uint32_t index, + Handle value); + inline v8::Intercepted CallIndexedDefiner( + DirectHandle interceptor, uint32_t index, + const v8::PropertyDescriptor& desc); + inline v8::Intercepted CallIndexedDeleter(Handle interceptor, + uint32_t index); + + // Empty handle means that the request was not intercepted. + // Pending exception handling should be done by the caller. + inline Handle CallIndexedDescriptor( Handle interceptor, uint32_t index); - inline Handle CallIndexedEnumerator( + // Returns JSArray-like object with property names or undefined. + inline Handle CallIndexedEnumerator( Handle interceptor); - // Accept potential JavaScript side effects that might occurr during life + // Accept potential JavaScript side effects that might occur during life // time of this object. inline void AcceptSideEffects() { #ifdef DEBUG @@ -149,21 +181,67 @@ class PropertyCallbackArguments final #endif // DEBUG } + // Converts the result of Setter/Definer/Deleter interceptor callback to + // Maybe. + // Currently, in certain scenarios the actual boolean result returned by + // the Setter/Definer operation is ignored and thus we don't need to process + // the actual return value. + inline Maybe GetBooleanReturnValue( + v8::Intercepted intercepted, const char* callback_kind_for_error_message, + bool ignore_return_value = false); + + // TODO(ishell): cleanup this hack by embedding the PropertyCallbackInfo + // into PropertyCallbackArguments object. + template + const v8::PropertyCallbackInfo& GetPropertyCallbackInfo() { + return *(reinterpret_cast*>(&values_[0])); + } + + // Forwards ShouldThrowOnError() request to the underlying + // v8::PropertyCallbackInfo<> object. + bool ShouldThrowOnError() { + return GetPropertyCallbackInfo().ShouldThrowOnError(); + } + + // Unofficial way of getting property key from v8::PropertyCallbackInfo. + template + static Tagged GetPropertyKey(const PropertyCallbackInfo& info) { + return Tagged(info.args_[kPropertyKeyIndex]); + } + template + static Handle GetPropertyKeyHandle( + const PropertyCallbackInfo& info) { + return Handle(&info.args_[kPropertyKeyIndex]); + } + + // Returns index value passed to CallIndexedXXX(). This works as long as + // all the calls to indexed interceptor callbacks are done via + // PropertyCallbackArguments. + template + static uint32_t GetPropertyIndex(const PropertyCallbackInfo& info) { + // Currently all indexed interceptor callbacks are called via + // PropertyCallbackArguments, so it's guaranteed that + // v8::PropertyCallbackInfo::args_ array IS the + // PropertyCallbackArguments::values_ array. As a result we can restore + // pointer to PropertyCallbackArguments object from the former. + Address ptr = reinterpret_cast
(&info.args_) - + offsetof(PropertyCallbackArguments, values_); + auto pca = reinterpret_cast(ptr); + return pca->index_; + } + private: - /* - * The following Call functions wrap the calling of all callbacks to handle - * calling either the old or the new style callbacks depending on which one - * has been registered. - * For old callbacks which return an empty handle, the ReturnValue is checked - * and used if it's been set to anything inside the callback. - * New style callbacks always use the return value. - */ - inline Handle CallPropertyEnumerator( + // Returns JSArray-like object with property names or undefined. + inline Handle CallPropertyEnumerator( Handle interceptor); inline Tagged holder() const; inline Tagged receiver() const; + // This field is used for propagating index value from CallIndexedXXX() + // to ExceptionPropagationCallback. + uint32_t index_ = kMaxUInt32; + #ifdef DEBUG // This stores current value of Isolate::javascript_execution_counter(). // It's used for detecting whether JavaScript code was executed between @@ -182,8 +260,8 @@ class FunctionCallbackArguments static constexpr int kHolderIndex = T::kHolderIndex; static constexpr int kIsolateIndex = T::kIsolateIndex; - static constexpr int kUnusedIndex = T::kUnusedIndex; - static constexpr int kDataIndex = T::kDataIndex; + static constexpr int kContextIndex = T::kContextIndex; + static constexpr int kTargetIndex = T::kTargetIndex; static constexpr int kNewTargetIndex = T::kNewTargetIndex; static_assert(T::kThisValuesIndex == BuiltinArguments::kReceiverArgsOffset); @@ -199,7 +277,8 @@ class FunctionCallbackArguments static_assert(T::kValuesOffset == offsetof(T, values_)); static_assert(T::kLengthOffset == offsetof(T, length_)); - FunctionCallbackArguments(Isolate* isolate, Tagged data, + FunctionCallbackArguments(Isolate* isolate, + Tagged target, Tagged holder, Tagged new_target, Address* argv, int argc); @@ -212,12 +291,20 @@ class FunctionCallbackArguments * and used if it's been set to anything inside the callback. * New style callbacks always use the return value. */ - inline Handle Call(Tagged function); + inline Handle CallOrConstruct(Tagged function, + bool is_construct); + + // Unofficial way of getting target FunctionTemplateInfo from + // v8::FunctionCallbackInfo. + template + static Tagged GetTarget(const FunctionCallbackInfo& info) { + return Tagged(info.implicit_args_[kTargetIndex]); + } private: inline Tagged holder() const; - internal::Address* argv_; + Address* argv_; int const argc_; }; diff --git a/deps/v8/src/api/api-inl.h b/deps/v8/src/api/api-inl.h index b8e60c48e651d8..c7be6489469700 100644 --- a/deps/v8/src/api/api-inl.h +++ b/deps/v8/src/api/api-inl.h @@ -17,37 +17,37 @@ namespace v8 { -template +template inline T ToCData(v8::internal::Tagged obj) { static_assert(sizeof(T) == sizeof(v8::internal::Address)); if (obj == v8::internal::Smi::zero()) return nullptr; return reinterpret_cast( - v8::internal::Foreign::cast(obj)->foreign_address()); + v8::internal::Cast(obj)->foreign_address()); } -template <> +template inline v8::internal::Address ToCData( v8::internal::Tagged obj) { if (obj == v8::internal::Smi::zero()) return v8::internal::kNullAddress; - return v8::internal::Foreign::cast(obj)->foreign_address(); + return v8::internal::Cast(obj)->foreign_address(); } -template -inline v8::internal::Handle FromCData( +template +inline v8::internal::Handle> FromCData( v8::internal::Isolate* isolate, T obj) { static_assert(sizeof(T) == sizeof(v8::internal::Address)); if (obj == nullptr) return handle(v8::internal::Smi::zero(), isolate); - return isolate->factory()->NewForeign( + return isolate->factory()->NewForeign( reinterpret_cast(obj)); } -template <> -inline v8::internal::Handle FromCData( +template +inline v8::internal::Handle> FromCData( v8::internal::Isolate* isolate, v8::internal::Address obj) { if (obj == v8::internal::kNullAddress) { return handle(v8::internal::Smi::zero(), isolate); } - return isolate->factory()->NewForeign(obj); + return isolate->factory()->NewForeign(obj); } template @@ -186,7 +186,7 @@ class V8_NODISCARD CallDepthScope { } ~CallDepthScope() { i::MicrotaskQueue* microtask_queue = - i::NativeContext::cast(isolate_->context())->microtask_queue(); + i::Cast(isolate_->context())->microtask_queue(); isolate_->thread_local_top()->DecrementCallDepth(this); // Clear the exception when exiting V8 to avoid memory leaks. @@ -271,7 +271,8 @@ template void CopySmiElementsToTypedBuffer(T* dst, uint32_t length, i::Tagged elements) { for (uint32_t i = 0; i < length; ++i) { - double value = i::Object::Number(elements->get(static_cast(i))); + double value = i::Object::NumberValue( + i::Cast(elements->get(static_cast(i)))); // TODO(mslekova): Avoid converting back-and-forth when possible, e.g // avoid int->double->int conversions to boost performance. dst[i] = i::ConvertDouble(value); @@ -313,11 +314,12 @@ bool CopyAndConvertArrayToCppBuffer(Local src, T* dst, i::Tagged elements = obj->elements(); switch (obj->GetElementsKind()) { case i::PACKED_SMI_ELEMENTS: - CopySmiElementsToTypedBuffer(dst, length, i::FixedArray::cast(elements)); + CopySmiElementsToTypedBuffer(dst, length, + i::Cast(elements)); return true; case i::PACKED_DOUBLE_ELEMENTS: CopyDoubleElementsToTypedBuffer(dst, length, - i::FixedDoubleArray::cast(elements)); + i::Cast(elements)); return true; default: return false; diff --git a/deps/v8/src/api/api-natives.cc b/deps/v8/src/api/api-natives.cc index e3ff723b53e38d..5e20b43cb4fb0a 100644 --- a/deps/v8/src/api/api-natives.cc +++ b/deps/v8/src/api/api-natives.cc @@ -5,6 +5,7 @@ #include "src/api/api-natives.h" #include "src/api/api-inl.h" +#include "src/common/globals.h" #include "src/common/message-template.h" #include "src/execution/isolate-inl.h" #include "src/execution/protectors-inl.h" @@ -58,10 +59,10 @@ MaybeHandle Instantiate( Isolate* isolate, Handle data, MaybeHandle maybe_name = MaybeHandle()) { if (IsFunctionTemplateInfo(*data)) { - return InstantiateFunction( - isolate, Handle::cast(data), maybe_name); + return InstantiateFunction(isolate, Cast(data), + maybe_name); } else if (IsObjectTemplateInfo(*data)) { - return InstantiateObject(isolate, Handle::cast(data), + return InstantiateObject(isolate, Cast(data), Handle(), false); } else { return data; @@ -75,33 +76,27 @@ MaybeHandle DefineAccessorProperty(Isolate* isolate, Handle setter, PropertyAttributes attributes) { DCHECK(!IsFunctionTemplateInfo(*getter) || - FunctionTemplateInfo::cast(*getter)->should_cache()); + Cast(*getter)->should_cache()); DCHECK(!IsFunctionTemplateInfo(*setter) || - FunctionTemplateInfo::cast(*setter)->should_cache()); + Cast(*setter)->should_cache()); if (IsFunctionTemplateInfo(*getter) && - FunctionTemplateInfo::cast(*getter)->BreakAtEntry(isolate)) { + Cast(*getter)->BreakAtEntry(isolate)) { ASSIGN_RETURN_ON_EXCEPTION( isolate, getter, - InstantiateFunction(isolate, - Handle::cast(getter)), - Object); - Handle trampoline = BUILTIN_CODE(isolate, DebugBreakTrampoline); - Handle::cast(getter)->set_code(*trampoline); + InstantiateFunction(isolate, Cast(getter))); + DirectHandle trampoline = BUILTIN_CODE(isolate, DebugBreakTrampoline); + Cast(getter)->set_code(*trampoline); } if (IsFunctionTemplateInfo(*setter) && - FunctionTemplateInfo::cast(*setter)->BreakAtEntry(isolate)) { + Cast(*setter)->BreakAtEntry(isolate)) { ASSIGN_RETURN_ON_EXCEPTION( isolate, setter, - InstantiateFunction(isolate, - Handle::cast(setter)), - Object); - Handle trampoline = BUILTIN_CODE(isolate, DebugBreakTrampoline); - Handle::cast(setter)->set_code(*trampoline); - } - RETURN_ON_EXCEPTION(isolate, - JSObject::DefineOwnAccessorIgnoreAttributes( - object, name, getter, setter, attributes), - Object); + InstantiateFunction(isolate, Cast(setter))); + DirectHandle trampoline = BUILTIN_CODE(isolate, DebugBreakTrampoline); + Cast(setter)->set_code(*trampoline); + } + RETURN_ON_EXCEPTION(isolate, JSObject::DefineOwnAccessorIgnoreAttributes( + object, name, getter, setter, attributes)); return object; } @@ -112,7 +107,7 @@ MaybeHandle DefineDataProperty(Isolate* isolate, PropertyAttributes attributes) { Handle value; ASSIGN_RETURN_ON_EXCEPTION(isolate, value, - Instantiate(isolate, prop_data, name), Object); + Instantiate(isolate, prop_data, name)); PropertyKey key(isolate, name); LookupIterator it(isolate, object, key, LookupIterator::OWN_SKIP_INTERCEPTOR); @@ -123,8 +118,7 @@ MaybeHandle DefineDataProperty(Isolate* isolate, if (it.IsFound()) { THROW_NEW_ERROR( isolate, - NewTypeError(MessageTemplate::kDuplicateTemplateProperty, name), - Object); + NewTypeError(MessageTemplate::kDuplicateTemplateProperty, name)); } #endif @@ -134,15 +128,15 @@ MaybeHandle DefineDataProperty(Isolate* isolate, return value; } -void DisableAccessChecks(Isolate* isolate, Handle object) { +void DisableAccessChecks(Isolate* isolate, DirectHandle object) { Handle old_map(object->map(), isolate); // Copy map so it won't interfere constructor's initial map. Handle new_map = Map::Copy(isolate, old_map, "DisableAccessChecks"); new_map->set_is_access_check_needed(false); - JSObject::MigrateToMap(isolate, Handle::cast(object), new_map); + JSObject::MigrateToMap(isolate, object, new_map); } -void EnableAccessChecks(Isolate* isolate, Handle object) { +void EnableAccessChecks(Isolate* isolate, DirectHandle object) { Handle old_map(object->map(), isolate); // Copy map so it won't interfere constructor's initial map. Handle new_map = Map::Copy(isolate, old_map, "EnableAccessChecks"); @@ -200,7 +194,7 @@ MaybeHandle ConfigureInstance(Isolate* isolate, Handle obj, while (!info.is_null()) { Tagged props = info->property_accessors(); if (!IsUndefined(props, isolate)) { - max_number_of_properties += ArrayList::cast(props)->length(); + max_number_of_properties += Cast(props)->length(); } info = info->GetParent(isolate); } @@ -226,8 +220,8 @@ MaybeHandle ConfigureInstance(Isolate* isolate, Handle obj, // Install accumulated accessors. for (int i = 0; i < valid_descriptors; i++) { - Handle accessor(AccessorInfo::cast(array->get(i)), isolate); - Handle name(Name::cast(accessor->name()), isolate); + Handle accessor(Cast(array->get(i)), isolate); + Handle name(Cast(accessor->name()), isolate); JSObject::SetAccessor(obj, name, accessor, accessor->initial_property_attributes()) .Assert(); @@ -236,36 +230,34 @@ MaybeHandle ConfigureInstance(Isolate* isolate, Handle obj, Tagged maybe_property_list = data->property_list(); if (IsUndefined(maybe_property_list, isolate)) return obj; - Handle properties(ArrayList::cast(maybe_property_list), isolate); + DirectHandle properties(Cast(maybe_property_list), + isolate); if (properties->length() == 0) return obj; int i = 0; for (int c = 0; c < data->number_of_properties(); c++) { - auto name = handle(Name::cast(properties->get(i++)), isolate); + auto name = handle(Cast(properties->get(i++)), isolate); Tagged bit = properties->get(i++); if (IsSmi(bit)) { - PropertyDetails details(Smi::cast(bit)); + PropertyDetails details(Cast(bit)); PropertyAttributes attributes = details.attributes(); PropertyKind kind = details.kind(); if (kind == PropertyKind::kData) { auto prop_data = handle(properties->get(i++), isolate); - RETURN_ON_EXCEPTION( - isolate, - DefineDataProperty(isolate, obj, name, prop_data, attributes), - JSObject); + RETURN_ON_EXCEPTION(isolate, DefineDataProperty(isolate, obj, name, + prop_data, attributes)); } else { auto getter = handle(properties->get(i++), isolate); auto setter = handle(properties->get(i++), isolate); - RETURN_ON_EXCEPTION(isolate, - DefineAccessorProperty(isolate, obj, name, getter, - setter, attributes), - JSObject); + RETURN_ON_EXCEPTION( + isolate, DefineAccessorProperty(isolate, obj, name, getter, setter, + attributes)); } } else { // Intrinsic data property --- Get appropriate value from the current // context. - PropertyDetails details(Smi::cast(properties->get(i++))); + PropertyDetails details(Cast(properties->get(i++))); PropertyAttributes attributes = details.attributes(); DCHECK_EQ(PropertyKind::kData, details.kind()); @@ -273,10 +265,8 @@ MaybeHandle ConfigureInstance(Isolate* isolate, Handle obj, static_cast(Smi::ToInt(properties->get(i++))); auto prop_data = handle(GetIntrinsic(isolate, intrinsic), isolate); - RETURN_ON_EXCEPTION( - isolate, - DefineDataProperty(isolate, obj, name, prop_data, attributes), - JSObject); + RETURN_ON_EXCEPTION(isolate, DefineDataProperty(isolate, obj, name, + prop_data, attributes)); } } return obj; @@ -287,7 +277,7 @@ bool IsSimpleInstantiation(Isolate* isolate, Tagged info, DisallowGarbageCollection no_gc; if (!IsJSFunction(new_target)) return false; - Tagged fun = JSFunction::cast(new_target); + Tagged fun = Cast(new_target); if (!fun->shared()->IsApiFunction()) return false; if (fun->shared()->api_func_data() != info->constructor()) return false; if (info->immutable_proto()) return false; @@ -303,7 +293,7 @@ MaybeHandle InstantiateObject(Isolate* isolate, bool should_cache = info->should_cache(); if (!new_target.is_null()) { if (IsSimpleInstantiation(isolate, *info, *new_target)) { - constructor = Handle::cast(new_target); + constructor = Cast(new_target); } else { // Disable caching for subclass instantiation. should_cache = false; @@ -328,27 +318,31 @@ MaybeHandle InstantiateObject(Isolate* isolate, // Enter a new scope. Recursion could otherwise create a lot of handles. HandleScope scope(isolate); Handle cons_templ( - FunctionTemplateInfo::cast(maybe_constructor_info), isolate); + Cast(maybe_constructor_info), isolate); Handle tmp_constructor; ASSIGN_RETURN_ON_EXCEPTION(isolate, tmp_constructor, - InstantiateFunction(isolate, cons_templ), - JSObject); + InstantiateFunction(isolate, cons_templ)); constructor = scope.CloseAndEscape(tmp_constructor); } if (new_target.is_null()) new_target = constructor; } + const auto new_js_object_type = + constructor->has_initial_map() && + IsJSApiWrapperObject(constructor->initial_map()) + ? NewJSObjectType::kAPIWrapper + : NewJSObjectType::kNoAPIWrapper; Handle object; ASSIGN_RETURN_ON_EXCEPTION( isolate, object, - JSObject::New(constructor, new_target, Handle::null()), - JSObject); + JSObject::New(constructor, new_target, Handle::null(), + new_js_object_type)); if (is_prototype) JSObject::OptimizeAsPrototype(object); - ASSIGN_RETURN_ON_EXCEPTION( - isolate, result, ConfigureInstance(isolate, object, info), JSObject); + ASSIGN_RETURN_ON_EXCEPTION(isolate, result, + ConfigureInstance(isolate, object, info)); if (info->immutable_proto()) { JSObject::SetImmutableProto(object); } @@ -376,16 +370,14 @@ MaybeHandle GetInstancePrototype(Isolate* isolate, Handle parent_instance; ASSIGN_RETURN_ON_EXCEPTION( isolate, parent_instance, - InstantiateFunction( - isolate, Handle::cast(function_template)), - JSFunction); + InstantiateFunction(isolate, + Cast(function_template))); Handle instance_prototype; // TODO(cbruni): decide what to do here. ASSIGN_RETURN_ON_EXCEPTION( isolate, instance_prototype, JSObject::GetProperty(isolate, parent_instance, - isolate->factory()->prototype_string()), - JSFunction); + isolate->factory()->prototype_string())); return scope.CloseAndEscape(instance_prototype); } } // namespace @@ -401,7 +393,7 @@ MaybeHandle InstantiateFunction( isolate, native_context, data->serial_number(), TemplateInfo::CachingMode::kUnlimited) .ToHandle(&result)) { - return Handle::cast(result); + return Cast(result); } } Handle prototype; @@ -411,29 +403,27 @@ MaybeHandle InstantiateFunction( Handle protoype_provider_templ( data->GetPrototypeProviderTemplate(), isolate); if (IsUndefined(*protoype_provider_templ, isolate)) { - prototype = isolate->factory()->NewJSObject(isolate->object_function()); + prototype = isolate->factory()->NewJSObject( + handle(native_context->object_function(), isolate)); } else { ASSIGN_RETURN_ON_EXCEPTION( isolate, prototype, - GetInstancePrototype(isolate, protoype_provider_templ), JSFunction); + GetInstancePrototype(isolate, protoype_provider_templ)); } } else { ASSIGN_RETURN_ON_EXCEPTION( isolate, prototype, - InstantiateObject(isolate, - Handle::cast(prototype_templ), - Handle(), true), - JSFunction); + InstantiateObject(isolate, Cast(prototype_templ), + Handle(), true)); } Handle parent(data->GetParentTemplate(), isolate); if (!IsUndefined(*parent, isolate)) { Handle parent_prototype; ASSIGN_RETURN_ON_EXCEPTION(isolate, parent_prototype, - GetInstancePrototype(isolate, parent), - JSFunction); + GetInstancePrototype(isolate, parent)); CHECK(IsHeapObject(*parent_prototype)); - JSObject::ForceSetPrototype(isolate, Handle::cast(prototype), - Handle::cast(parent_prototype)); + JSObject::ForceSetPrototype(isolate, Cast(prototype), + Cast(parent_prototype)); } } InstanceType function_type = JS_SPECIAL_API_OBJECT_TYPE; @@ -464,21 +454,21 @@ MaybeHandle InstantiateFunction( return function; } -void AddPropertyToPropertyList(Isolate* isolate, Handle templ, - int length, Handle* data) { +void AddPropertyToPropertyList(Isolate* isolate, + DirectHandle templ, int length, + Handle* data) { Tagged maybe_list = templ->property_list(); Handle list; if (IsUndefined(maybe_list, isolate)) { list = ArrayList::New(isolate, length, AllocationType::kOld); } else { - list = handle(ArrayList::cast(maybe_list), isolate); + list = handle(Cast(maybe_list), isolate); } templ->set_number_of_properties(templ->number_of_properties() + 1); for (int i = 0; i < length; i++) { - Handle value = - data[i].is_null() - ? Handle::cast(isolate->factory()->undefined_value()) - : data[i]; + DirectHandle value = + data[i].is_null() ? Cast(isolate->factory()->undefined_value()) + : data[i]; list = ArrayList::Add(isolate, list, value); } templ->set_property_list(*list); @@ -522,29 +512,32 @@ MaybeHandle ApiNatives::InstantiateObject( } MaybeHandle ApiNatives::InstantiateRemoteObject( - Handle data) { + DirectHandle data) { Isolate* isolate = data->GetIsolate(); InvokeScope invoke_scope(isolate); - Handle constructor( - FunctionTemplateInfo::cast(data->constructor()), isolate); - Handle object_map = isolate->factory()->NewContextlessMap( + DirectHandle constructor( + Cast(data->constructor()), isolate); + DirectHandle object_map = isolate->factory()->NewContextlessMap( JS_SPECIAL_API_OBJECT_TYPE, - JSObject::kHeaderSize + + JSSpecialObject::kHeaderSize + data->embedder_field_count() * kEmbedderDataSlotSize, TERMINAL_FAST_ELEMENTS_KIND); object_map->SetConstructor(*constructor); object_map->set_is_access_check_needed(true); object_map->set_may_have_interesting_properties(true); - Handle object = isolate->factory()->NewJSObjectFromMap(object_map); + Handle object = isolate->factory()->NewJSObjectFromMap( + object_map, AllocationType::kYoung, DirectHandle::null(), + NewJSObjectType::kAPIWrapper); JSObject::ForceSetPrototype(isolate, object, isolate->factory()->null_value()); return object; } -void ApiNatives::AddDataProperty(Isolate* isolate, Handle info, +void ApiNatives::AddDataProperty(Isolate* isolate, + DirectHandle info, Handle name, Handle value, PropertyAttributes attributes) { PropertyDetails details(PropertyKind::kData, attributes, @@ -554,7 +547,8 @@ void ApiNatives::AddDataProperty(Isolate* isolate, Handle info, AddPropertyToPropertyList(isolate, info, arraysize(data), data); } -void ApiNatives::AddDataProperty(Isolate* isolate, Handle info, +void ApiNatives::AddDataProperty(Isolate* isolate, + DirectHandle info, Handle name, v8::Intrinsic intrinsic, PropertyAttributes attributes) { auto value = handle(Smi::FromInt(intrinsic), isolate); @@ -567,7 +561,7 @@ void ApiNatives::AddDataProperty(Isolate* isolate, Handle info, } void ApiNatives::AddAccessorProperty(Isolate* isolate, - Handle info, + DirectHandle info, Handle name, Handle getter, Handle setter, @@ -582,14 +576,14 @@ void ApiNatives::AddAccessorProperty(Isolate* isolate, } void ApiNatives::AddNativeDataProperty(Isolate* isolate, - Handle info, - Handle property) { + DirectHandle info, + DirectHandle property) { Tagged maybe_list = info->property_accessors(); Handle list; if (IsUndefined(maybe_list, isolate)) { list = ArrayList::New(isolate, 1, AllocationType::kOld); } else { - list = handle(ArrayList::cast(maybe_list), isolate); + list = handle(Cast(maybe_list), isolate); } list = ArrayList::Add(isolate, list, property); info->set_property_accessors(*list); @@ -597,7 +591,7 @@ void ApiNatives::AddNativeDataProperty(Isolate* isolate, Handle ApiNatives::CreateApiFunction( Isolate* isolate, Handle native_context, - Handle obj, Handle prototype, + DirectHandle obj, Handle prototype, InstanceType type, MaybeHandle maybe_name) { RCS_SCOPE(isolate, RuntimeCallCounterId::kCreateApiFunction); Handle shared = @@ -628,7 +622,7 @@ Handle ApiNatives::CreateApiFunction( if (IsTheHole(*prototype, isolate)) { prototype = isolate->factory()->NewFunctionPrototype(result); } else if (IsUndefined(obj->GetPrototypeProviderTemplate(), isolate)) { - JSObject::AddProperty(isolate, Handle::cast(prototype), + JSObject::AddProperty(isolate, Cast(prototype), isolate->factory()->constructor_string(), result, DONT_ENUM); } @@ -636,8 +630,8 @@ Handle ApiNatives::CreateApiFunction( int embedder_field_count = 0; bool immutable_proto = false; if (!IsUndefined(obj->GetInstanceTemplate(), isolate)) { - Handle GetInstanceTemplate = Handle( - ObjectTemplateInfo::cast(obj->GetInstanceTemplate()), isolate); + DirectHandle GetInstanceTemplate( + Cast(obj->GetInstanceTemplate()), isolate); embedder_field_count = GetInstanceTemplate->embedder_field_count(); immutable_proto = GetInstanceTemplate->immutable_proto(); } @@ -688,8 +682,7 @@ Handle ApiNatives::CreateApiFunction( if (immutable_proto) map->set_is_immutable_proto(true); - JSFunction::SetInitialMap(isolate, result, map, - Handle::cast(prototype)); + JSFunction::SetInitialMap(isolate, result, map, Cast(prototype)); return result; } diff --git a/deps/v8/src/api/api-natives.h b/deps/v8/src/api/api-natives.h index fc11ca81691f7c..50f40e0b2d942f 100644 --- a/deps/v8/src/api/api-natives.h +++ b/deps/v8/src/api/api-natives.h @@ -43,29 +43,31 @@ class ApiNatives { Handle new_target = Handle()); V8_WARN_UNUSED_RESULT static MaybeHandle InstantiateRemoteObject( - Handle data); + DirectHandle data); static Handle CreateApiFunction( Isolate* isolate, Handle native_context, - Handle obj, Handle prototype, + DirectHandle obj, Handle prototype, InstanceType type, MaybeHandle name = MaybeHandle()); - static void AddDataProperty(Isolate* isolate, Handle info, + static void AddDataProperty(Isolate* isolate, DirectHandle info, Handle name, Handle value, PropertyAttributes attributes); - static void AddDataProperty(Isolate* isolate, Handle info, + static void AddDataProperty(Isolate* isolate, DirectHandle info, Handle name, v8::Intrinsic intrinsic, PropertyAttributes attributes); - static void AddAccessorProperty(Isolate* isolate, Handle info, + static void AddAccessorProperty(Isolate* isolate, + DirectHandle info, Handle name, Handle getter, Handle setter, PropertyAttributes attributes); - static void AddNativeDataProperty(Isolate* isolate, Handle info, - Handle property); + static void AddNativeDataProperty(Isolate* isolate, + DirectHandle info, + DirectHandle property); }; } // namespace internal diff --git a/deps/v8/src/api/api.cc b/deps/v8/src/api/api.cc index 28f0389258cc95..f8d3c5aa1231f4 100644 --- a/deps/v8/src/api/api.cc +++ b/deps/v8/src/api/api.cc @@ -12,6 +12,7 @@ #include // For move #include +#include "include/v8-array-buffer.h" #include "include/v8-callbacks.h" #include "include/v8-cppgc.h" #include "include/v8-date.h" @@ -28,6 +29,7 @@ #include "include/v8-unwinder-state.h" #include "include/v8-util.h" #include "include/v8-wasm.h" +#include "src/api/api-arguments.h" #include "src/api/api-inl.h" #include "src/api/api-natives.h" #include "src/base/functional.h" @@ -37,6 +39,7 @@ #include "src/base/platform/time.h" #include "src/base/safe_conversions.h" #include "src/base/utils/random-number-generator.h" +#include "src/base/vector.h" #include "src/builtins/accessors.h" #include "src/builtins/builtins-utils.h" #include "src/codegen/compilation-cache.h" @@ -77,6 +80,7 @@ #include "src/logging/tracing-flags.h" #include "src/numbers/conversions-inl.h" #include "src/objects/api-callbacks.h" +#include "src/objects/backing-store.h" #include "src/objects/contexts.h" #include "src/objects/embedder-data-array-inl.h" #include "src/objects/embedder-data-slot-inl.h" @@ -180,8 +184,8 @@ namespace v8 { static OOMErrorCallback g_oom_error_callback = nullptr; -static ScriptOrigin GetScriptOriginForScript(i::Isolate* i_isolate, - i::Handle script) { +static ScriptOrigin GetScriptOriginForScript( + i::Isolate* i_isolate, i::DirectHandle script) { i::DirectHandle scriptName(script->GetNameOrSourceURL(), i_isolate); i::DirectHandle source_map_url(script->source_mapping_url(), @@ -568,21 +572,25 @@ Isolate* SnapshotCreator::GetIsolate() { void SnapshotCreator::SetDefaultContext( Local context, SerializeInternalFieldsCallback internal_fields_serializer, - SerializeContextDataCallback context_data_serializer) { + SerializeContextDataCallback context_data_serializer, + SerializeAPIWrapperCallback api_wrapper_serializer) { impl_->SetDefaultContext( Utils::OpenHandle(*context), i::SerializeEmbedderFieldsCallback(internal_fields_serializer, - context_data_serializer)); + context_data_serializer, + api_wrapper_serializer)); } size_t SnapshotCreator::AddContext( Local context, SerializeInternalFieldsCallback internal_fields_serializer, - SerializeContextDataCallback context_data_serializer) { + SerializeContextDataCallback context_data_serializer, + SerializeAPIWrapperCallback api_wrapper_serializer) { return impl_->AddContext( Utils::OpenHandle(*context), i::SerializeEmbedderFieldsCallback(internal_fields_serializer, - context_data_serializer)); + context_data_serializer, + api_wrapper_serializer)); } size_t SnapshotCreator::AddData(i::Address object) { @@ -609,13 +617,16 @@ void V8::SetDcheckErrorHandler(DcheckErrorCallback that) { v8::base::SetDcheckFunction(that); } +void V8::SetFatalErrorHandler(V8FatalErrorCallback that) { + v8::base::SetFatalFunction(that); +} + void V8::SetFlagsFromString(const char* str) { SetFlagsFromString(str, strlen(str)); } void V8::SetFlagsFromString(const char* str, size_t length) { i::FlagList::SetFlagsFromString(str, length); - i::FlagList::EnforceFlagImplications(); } void V8::SetFlagsFromCommandLine(int* argc, char** argv, bool remove_flags) { @@ -726,7 +737,7 @@ void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory, namespace api_internal { void StackAllocated::VerifyOnStack() const { if (internal::StackAllocatedCheck::Get()) { - internal::HandleHelper::VerifyOnStack(this); + DCHECK(::heap::base::Stack::IsOnStack(this)); } } } // namespace api_internal @@ -760,22 +771,6 @@ void DisposeTracedReference(internal::Address* location) { TracedHandles::Destroy(location); } -// static -bool HandleHelper::IsOnStack(const void* ptr) { - return v8::base::Stack::GetCurrentStackPosition() <= ptr && - ptr <= v8::base::Stack::GetStackStartUnchecked(); -} - -// static -void HandleHelper::VerifyOnStack(const void* ptr) { DCHECK(IsOnStack(ptr)); } - -// static -void HandleHelper::VerifyOnMainThread() { - // The following verifies that we are on the main thread, as - // LocalHeap::Current is not set in that case. - DCHECK_NULL(LocalHeap::Current()); -} - #if V8_STATIC_ROOTS_BOOL // Check static root constants exposed in v8-internal.h. @@ -980,10 +975,10 @@ bool Data::IsValue() const { i::DisallowGarbageCollection no_gc; i::Tagged self = *Utils::OpenDirectHandle(this); if (i::IsSmi(self)) return true; - i::Tagged heap_object = i::HeapObject::cast(self); + i::Tagged heap_object = i::Cast(self); DCHECK(!IsTheHole(heap_object)); if (i::IsSymbol(heap_object)) { - return !i::Symbol::cast(heap_object)->is_private(); + return !i::Cast(heap_object)->is_private(); } return IsPrimitiveHeapObject(heap_object) || IsJSReceiver(heap_object); } @@ -1071,7 +1066,7 @@ static i::Handle EmbedderDataFor(Context* context, if (!ok) return i::Handle(); // TODO(ishell): remove cast once embedder_data slot has a proper type. i::Handle data( - i::EmbedderDataArray::cast(env->embedder_data()), i_isolate); + i::Cast(env->embedder_data()), i_isolate); if (index < data->length()) return data; if (!Utils::ApiCheck(can_grow && index < i::EmbedderDataArray::kMaxLength, location, "Index too large")) { @@ -1090,7 +1085,7 @@ uint32_t Context::GetNumberOfEmbedderDataFields() { "Not a native context"); // TODO(ishell): remove cast once embedder_data slot has a proper type. return static_cast( - i::EmbedderDataArray::cast(context->embedder_data())->length()); + i::Cast(context->embedder_data())->length()); } v8::Local Context::SlowGetEmbedderData(int index) { @@ -1133,10 +1128,10 @@ void* Context::SlowGetAlignedPointerFromEmbedderData(int index) { void Context::SetAlignedPointerInEmbedderData(int index, void* value) { const char* location = "v8::Context::SetAlignedPointerInEmbedderData()"; i::Isolate* i_isolate = Utils::OpenDirectHandle(this)->GetIsolate(); - i::Handle data = + i::DirectHandle data = EmbedderDataFor(this, index, true, location); - bool ok = - i::EmbedderDataSlot(*data, index).store_aligned_pointer(i_isolate, value); + bool ok = i::EmbedderDataSlot(*data, index) + .store_aligned_pointer(i_isolate, *data, value); Utils::ApiCheck(ok, location, "Pointer is not aligned"); DCHECK_EQ(value, GetAlignedPointerFromEmbedderData(index)); } @@ -1227,8 +1222,8 @@ void FunctionTemplate::SetPrototypeProviderTemplate( auto self = Utils::OpenHandle(this); i::Isolate* i_isolate = self->GetIsolateChecked(); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); - i::Handle result = - Utils::OpenHandle(*prototype_provider); + i::DirectHandle result = + Utils::OpenDirectHandle(*prototype_provider); Utils::ApiCheck(i::IsUndefined(self->GetPrototypeTemplate(), i_isolate), "v8::FunctionTemplate::SetPrototypeProviderTemplate", "Protoype must be undefined"); @@ -1389,10 +1384,11 @@ Local Signature::New(Isolate* v8_isolate, return Local::Cast(receiver); } -#define SET_FIELD_WRAPPED(i_isolate, obj, setter, cdata) \ - do { \ - i::Handle foreign = FromCData(i_isolate, cdata); \ - (obj)->setter(*foreign); \ +#define SET_FIELD_WRAPPED(i_isolate, obj, setter, cdata, tag) \ + do { \ + i::DirectHandle> foreign = \ + FromCData(i_isolate, cdata); \ + (obj)->setter(*foreign); \ } while (false) void FunctionTemplate::SetCallHandler( @@ -1416,19 +1412,20 @@ void FunctionTemplate::SetCallHandler( if (!c_function_overloads.empty()) { // Stores the data for a sequence of CFunction overloads into a single // FixedArray, as [address_0, signature_0, ... address_n-1, signature_n-1]. - i::Handle function_overloads = + i::DirectHandle function_overloads = i_isolate->factory()->NewFixedArray(static_cast( c_function_overloads.size() * i::FunctionTemplateInfo::kFunctionOverloadEntrySize)); int function_count = static_cast(c_function_overloads.size()); for (int i = 0; i < function_count; i++) { const CFunction& c_function = c_function_overloads.data()[i]; - i::Handle address = - FromCData(i_isolate, c_function.GetAddress()); + i::DirectHandle address = FromCData( + i_isolate, c_function.GetAddress()); function_overloads->set( i::FunctionTemplateInfo::kFunctionOverloadEntrySize * i, *address); - i::Handle signature = - FromCData(i_isolate, c_function.GetTypeInfo()); + i::DirectHandle signature = + FromCData(i_isolate, + c_function.GetTypeInfo()); function_overloads->set( i::FunctionTemplateInfo::kFunctionOverloadEntrySize * i + 1, *signature); @@ -1445,13 +1442,11 @@ i::Handle MakeAccessorInfo(i::Isolate* i_isolate, v8::Local name, Getter getter, Setter setter, v8::Local data, - bool is_special_data_property, bool replace_on_access) { i::Handle obj = i_isolate->factory()->NewAccessorInfo(); obj->set_getter(i_isolate, reinterpret_cast(getter)); - DCHECK_IMPLIES(replace_on_access, - is_special_data_property && setter == nullptr); - if (is_special_data_property && setter == nullptr) { + DCHECK_IMPLIES(replace_on_access, setter == nullptr); + if (setter == nullptr) { setter = reinterpret_cast(&i::Accessors::ReconfigureToDataProperty); } obj->set_setter(i_isolate, reinterpret_cast(setter)); @@ -1459,7 +1454,7 @@ i::Handle MakeAccessorInfo(i::Isolate* i_isolate, auto accessor_name = Utils::OpenHandle(*name); if (!IsUniqueName(*accessor_name)) { accessor_name = i_isolate->factory()->InternalizeString( - i::Handle::cast(accessor_name)); + i::Cast(accessor_name)); } i::DisallowGarbageCollection no_gc; i::Tagged raw_obj = *obj; @@ -1469,7 +1464,6 @@ i::Handle MakeAccessorInfo(i::Isolate* i_isolate, raw_obj->set_data(*Utils::OpenDirectHandle(*data)); } raw_obj->set_name(*accessor_name); - raw_obj->set_is_special_data_property(is_special_data_property); raw_obj->set_replace_on_access(replace_on_access); raw_obj->set_initial_property_attributes(i::NONE); return obj; @@ -1489,7 +1483,8 @@ Local FunctionTemplate::InstanceTemplate() { auto maybe_templ = constructor->GetInstanceTemplate(); if (!i::IsUndefined(maybe_templ, i_isolate)) { return Utils::ToLocal( - i::direct_handle(i::ObjectTemplateInfo::cast(maybe_templ), i_isolate), + i::direct_handle(i::Cast(maybe_templ), + i_isolate), i_isolate); } constexpr bool do_not_cache = false; @@ -1562,7 +1557,7 @@ i::Handle EnsureConstructor( Utils::OpenDirectHandle(object_template)->constructor(); if (!IsUndefined(obj, i_isolate)) { i::Tagged info = - i::FunctionTemplateInfo::cast(obj); + i::Cast(obj); return i::Handle(info, i_isolate); } Local templ = @@ -1577,17 +1572,15 @@ i::Handle EnsureConstructor( template void TemplateSetAccessor(Template* template_obj, v8::Local name, Getter getter, Setter setter, Data data, - PropertyAttribute attribute, - bool is_special_data_property, bool replace_on_access, + PropertyAttribute attribute, bool replace_on_access, SideEffectType getter_side_effect_type, SideEffectType setter_side_effect_type) { auto info = Utils::OpenHandle(template_obj); auto i_isolate = info->GetIsolateChecked(); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); i::HandleScope scope(i_isolate); - i::Handle accessor_info = - MakeAccessorInfo(i_isolate, name, getter, setter, data, - is_special_data_property, replace_on_access); + i::Handle accessor_info = MakeAccessorInfo( + i_isolate, name, getter, setter, data, replace_on_access); { i::DisallowGarbageCollection no_gc; i::Tagged raw = *accessor_info; @@ -1600,49 +1593,14 @@ void TemplateSetAccessor(Template* template_obj, v8::Local name, } } // namespace -void Template::SetNativeDataProperty(v8::Local name, - AccessorGetterCallback getter, - AccessorSetterCallback setter, - v8::Local data, - PropertyAttribute attribute, - v8::AccessControl settings, - SideEffectType getter_side_effect_type, - SideEffectType setter_side_effect_type) { - TemplateSetAccessor(this, name, getter, setter, data, attribute, true, false, - getter_side_effect_type, setter_side_effect_type); -} - void Template::SetNativeDataProperty(v8::Local name, AccessorNameGetterCallback getter, AccessorNameSetterCallback setter, v8::Local data, PropertyAttribute attribute, - v8::AccessControl settings, - SideEffectType getter_side_effect_type, - SideEffectType setter_side_effect_type) { - TemplateSetAccessor(this, name, getter, setter, data, attribute, true, false, - getter_side_effect_type, setter_side_effect_type); -} - -void Template::SetNativeDataProperty(v8::Local name, - AccessorGetterCallback getter, - AccessorSetterCallback setter, - v8::Local data, - PropertyAttribute attribute, SideEffectType getter_side_effect_type, SideEffectType setter_side_effect_type) { - TemplateSetAccessor(this, name, getter, setter, data, attribute, true, false, - getter_side_effect_type, setter_side_effect_type); -} - -void Template::SetNativeDataProperty(v8::Local name, - AccessorNameGetterCallback getter, - AccessorNameSetterCallback setter, - v8::Local data, - PropertyAttribute attribute, - SideEffectType getter_side_effect_type, - SideEffectType setter_side_effect_type) { - TemplateSetAccessor(this, name, getter, setter, data, attribute, true, false, + TemplateSetAccessor(this, name, getter, setter, data, attribute, false, getter_side_effect_type, setter_side_effect_type); } @@ -1652,10 +1610,9 @@ void Template::SetLazyDataProperty(v8::Local name, PropertyAttribute attribute, SideEffectType getter_side_effect_type, SideEffectType setter_side_effect_type) { - TemplateSetAccessor(this, name, getter, - static_cast(nullptr), data, - attribute, true, true, getter_side_effect_type, - setter_side_effect_type); + TemplateSetAccessor( + this, name, getter, static_cast(nullptr), + data, attribute, true, getter_side_effect_type, setter_side_effect_type); } void Template::SetIntrinsicDataProperty(Local name, Intrinsic intrinsic, @@ -1669,66 +1626,65 @@ void Template::SetIntrinsicDataProperty(Local name, Intrinsic intrinsic, static_cast(attribute)); } -void ObjectTemplate::SetAccessor(v8::Local name, - AccessorGetterCallback getter, - AccessorSetterCallback setter, - v8::Local data, - PropertyAttribute attribute, - SideEffectType getter_side_effect_type, - SideEffectType setter_side_effect_type) { - TemplateSetAccessor(this, name, getter, setter, data, attribute, - i::v8_flags.disable_old_api_accessors, false, - getter_side_effect_type, setter_side_effect_type); -} - -void ObjectTemplate::SetAccessor(v8::Local name, - AccessorNameGetterCallback getter, - AccessorNameSetterCallback setter, - v8::Local data, - PropertyAttribute attribute, - SideEffectType getter_side_effect_type, - SideEffectType setter_side_effect_type) { - TemplateSetAccessor(this, name, getter, setter, data, attribute, - i::v8_flags.disable_old_api_accessors, false, - getter_side_effect_type, setter_side_effect_type); -} - namespace { -template +enum class PropertyType { kNamed, kIndexed }; +template i::Handle CreateInterceptorInfo( i::Isolate* i_isolate, Getter getter, Setter setter, Query query, Descriptor descriptor, Deleter remover, Enumerator enumerator, Definer definer, Local data, base::Flags flags) { - auto obj = - i::Handle::cast(i_isolate->factory()->NewStruct( - i::INTERCEPTOR_INFO_TYPE, i::AllocationType::kOld)); + // TODO(saelo): instead of an in-sandbox struct with a lot of external + // pointers (with different tags), consider creating an object in trusted + // space instead. That way, only a single reference going out of the sandbox + // would be required. + auto obj = i::Cast(i_isolate->factory()->NewStruct( + i::INTERCEPTOR_INFO_TYPE, i::AllocationType::kOld)); obj->set_flags(0); - if (getter != nullptr) SET_FIELD_WRAPPED(i_isolate, obj, set_getter, getter); - if (setter != nullptr) SET_FIELD_WRAPPED(i_isolate, obj, set_setter, setter); - if (query != nullptr) SET_FIELD_WRAPPED(i_isolate, obj, set_query, query); +#define CALLBACK_TAG(NAME) \ + property_type == PropertyType::kNamed \ + ? internal::kApiNamedProperty##NAME##CallbackTag \ + : internal::kApiIndexedProperty##NAME##CallbackTag; + + if (getter != nullptr) { + constexpr internal::ExternalPointerTag tag = CALLBACK_TAG(Getter); + SET_FIELD_WRAPPED(i_isolate, obj, set_getter, getter, tag); + } + if (setter != nullptr) { + constexpr internal::ExternalPointerTag tag = CALLBACK_TAG(Setter); + SET_FIELD_WRAPPED(i_isolate, obj, set_setter, setter, tag); + } + if (query != nullptr) { + constexpr internal::ExternalPointerTag tag = CALLBACK_TAG(Query); + SET_FIELD_WRAPPED(i_isolate, obj, set_query, query, tag); + } if (descriptor != nullptr) { - SET_FIELD_WRAPPED(i_isolate, obj, set_descriptor, descriptor); + constexpr internal::ExternalPointerTag tag = CALLBACK_TAG(Descriptor); + SET_FIELD_WRAPPED(i_isolate, obj, set_descriptor, descriptor, tag); } if (remover != nullptr) { - SET_FIELD_WRAPPED(i_isolate, obj, set_deleter, remover); + constexpr internal::ExternalPointerTag tag = CALLBACK_TAG(Deleter); + SET_FIELD_WRAPPED(i_isolate, obj, set_deleter, remover, tag); } if (enumerator != nullptr) { - SET_FIELD_WRAPPED(i_isolate, obj, set_enumerator, enumerator); + SET_FIELD_WRAPPED(i_isolate, obj, set_enumerator, enumerator, + internal::kApiIndexedPropertyEnumeratorCallbackTag); } if (definer != nullptr) { - SET_FIELD_WRAPPED(i_isolate, obj, set_definer, definer); + constexpr internal::ExternalPointerTag tag = CALLBACK_TAG(Definer); + SET_FIELD_WRAPPED(i_isolate, obj, set_definer, definer, tag); } + +#undef CALLBACK_TAG + obj->set_can_intercept_symbols( !(flags & PropertyHandlerFlags::kOnlyInterceptStrings)); obj->set_non_masking(flags & PropertyHandlerFlags::kNonMasking); obj->set_has_no_side_effect(flags & PropertyHandlerFlags::kHasNoSideEffect); - obj->set_has_new_callbacks_signature( - flags & PropertyHandlerFlags::kInternalNewCallbacksSignatures); - if (data.IsEmpty()) { data = v8::Undefined(reinterpret_cast(i_isolate)); } @@ -1743,9 +1699,9 @@ i::Handle CreateNamedInterceptorInfo( Descriptor descriptor, Deleter remover, Enumerator enumerator, Definer definer, Local data, base::Flags flags) { - auto interceptor = - CreateInterceptorInfo(i_isolate, getter, setter, query, descriptor, - remover, enumerator, definer, data, flags); + auto interceptor = CreateInterceptorInfo( + i_isolate, getter, setter, query, descriptor, remover, enumerator, + definer, data, flags); interceptor->set_is_named(true); return interceptor; } @@ -1757,9 +1713,9 @@ i::Handle CreateIndexedInterceptorInfo( Descriptor descriptor, Deleter remover, Enumerator enumerator, Definer definer, Local data, base::Flags flags) { - auto interceptor = - CreateInterceptorInfo(i_isolate, getter, setter, query, descriptor, - remover, enumerator, definer, data, flags); + auto interceptor = CreateInterceptorInfo( + i_isolate, getter, setter, query, descriptor, remover, enumerator, + definer, data, flags); interceptor->set_is_named(false); return interceptor; } @@ -1809,11 +1765,12 @@ void ObjectTemplate::SetAccessCheckCallback(AccessCheckCallback callback, i::Handle struct_info = i_isolate->factory()->NewStruct( i::ACCESS_CHECK_INFO_TYPE, i::AllocationType::kOld); - auto info = i::Handle::cast(struct_info); + auto info = i::Cast(struct_info); - SET_FIELD_WRAPPED(i_isolate, info, set_callback, callback); - info->set_named_interceptor(i::Tagged()); - info->set_indexed_interceptor(i::Tagged()); + SET_FIELD_WRAPPED(i_isolate, info, set_callback, callback, + internal::kApiAccessCheckCallbackTag); + info->set_named_interceptor(i::Smi::zero()); + info->set_indexed_interceptor(i::Smi::zero()); if (data.IsEmpty()) { data = v8::Undefined(reinterpret_cast(i_isolate)); @@ -1838,9 +1795,10 @@ void ObjectTemplate::SetAccessCheckCallbackAndHandler( i::Handle struct_info = i_isolate->factory()->NewStruct( i::ACCESS_CHECK_INFO_TYPE, i::AllocationType::kOld); - auto info = i::Handle::cast(struct_info); + auto info = i::Cast(struct_info); - SET_FIELD_WRAPPED(i_isolate, info, set_callback, callback); + SET_FIELD_WRAPPED(i_isolate, info, set_callback, callback, + internal::kApiAccessCheckCallbackTag); auto named_interceptor = CreateNamedInterceptorInfo( i_isolate, named_handler.getter, named_handler.setter, named_handler.query, named_handler.descriptor, named_handler.deleter, @@ -2013,7 +1971,7 @@ int UnboundScript::GetId() const { DCHECK(!InReadOnlySpace(*function_info)); API_RCS_SCOPE(i::GetIsolateFromWritableObject(*function_info), UnboundScript, GetId); - return i::Script::cast(function_info->script())->id(); + return i::Cast(function_info->script())->id(); } int UnboundScript::GetLineNumber(int code_pos) { @@ -2025,7 +1983,7 @@ int UnboundScript::GetLineNumber(int code_pos) { i::Isolate* i_isolate = i::GetIsolateFromWritableObject(*obj); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); API_RCS_SCOPE(i_isolate, UnboundScript, GetLineNumber); - i::Handle script(i::Script::cast(obj->script()), i_isolate); + i::Handle script(i::Cast(obj->script()), i_isolate); return i::Script::GetLineNumber(script, code_pos); } else { return -1; @@ -2041,7 +1999,7 @@ int UnboundScript::GetColumnNumber(int code_pos) { i::Isolate* i_isolate = i::GetIsolateFromWritableObject(*obj); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); API_RCS_SCOPE(i_isolate, UnboundScript, GetColumnNumber); - i::Handle script(i::Script::cast(obj->script()), i_isolate); + i::Handle script(i::Cast(obj->script()), i_isolate); return i::Script::GetColumnNumber(script, code_pos); } else { return -1; @@ -2057,7 +2015,7 @@ Local UnboundScript::GetScriptName() { i::Isolate* i_isolate = i::GetIsolateFromWritableObject(*obj); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); API_RCS_SCOPE(i_isolate, UnboundScript, GetName); - i::Tagged name = i::Script::cast(obj->script())->name(); + i::Tagged name = i::Cast(obj->script())->name(); return Utils::ToLocal(i::direct_handle(name, i_isolate), i_isolate); } else { return Local(); @@ -2073,7 +2031,7 @@ Local UnboundScript::GetSourceURL() { i::Isolate* i_isolate = i::GetIsolateFromWritableObject(*obj); API_RCS_SCOPE(i_isolate, UnboundScript, GetSourceURL); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); - i::Tagged url = i::Script::cast(obj->script())->source_url(); + i::Tagged url = i::Cast(obj->script())->source_url(); return Utils::ToLocal(i::direct_handle(url, i_isolate), i_isolate); } else { return Local(); @@ -2090,7 +2048,7 @@ Local UnboundScript::GetSourceMappingURL() { API_RCS_SCOPE(i_isolate, UnboundScript, GetSourceMappingURL); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); i::Tagged url = - i::Script::cast(obj->script())->source_mapping_url(); + i::Cast(obj->script())->source_mapping_url(); return Utils::ToLocal(i::direct_handle(url, i_isolate), i_isolate); } else { return Local(); @@ -2106,7 +2064,7 @@ Local UnboundModuleScript::GetSourceURL() { i::Isolate* i_isolate = i::GetIsolateFromWritableObject(*obj); API_RCS_SCOPE(i_isolate, UnboundModuleScript, GetSourceURL); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); - i::Tagged url = i::Script::cast(obj->script())->source_url(); + i::Tagged url = i::Cast(obj->script())->source_url(); return Utils::ToLocal(i::direct_handle(url, i_isolate), i_isolate); } else { return Local(); @@ -2123,7 +2081,7 @@ Local UnboundModuleScript::GetSourceMappingURL() { API_RCS_SCOPE(i_isolate, UnboundModuleScript, GetSourceMappingURL); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); i::Tagged url = - i::Script::cast(obj->script())->source_mapping_url(); + i::Cast(obj->script())->source_mapping_url(); return Utils::ToLocal(i::direct_handle(url, i_isolate), i_isolate); } else { return Local(); @@ -2159,11 +2117,11 @@ MaybeLocal Script::Run(Local context, i::ETWJITInterface::MaybeSetHandlerNow(i_isolate); } #endif - auto fun = i::Handle::cast(Utils::OpenHandle(this)); + auto fun = i::Cast(Utils::OpenHandle(this)); i::Handle receiver = i_isolate->global_proxy(); // TODO(cbruni, chromium:1244145): Remove once migrated to the context. i::Handle options( - i::Script::cast(fun->shared()->script())->host_defined_options(), + i::Cast(fun->shared()->script())->host_defined_options(), i_isolate); Local result; has_exception = !ToLocal( @@ -2204,7 +2162,7 @@ Local Script::GetResourceName() { CHECK(IsScript(sfi->script())); i::Isolate* i_isolate = func->GetIsolate(); return ToApiHandle( - i::direct_handle(i::Script::cast(sfi->script())->name(), i_isolate), + i::direct_handle(i::Cast(sfi->script())->name(), i_isolate), i_isolate); } @@ -2214,12 +2172,44 @@ std::vector Script::GetProducedCompileHints() const { i::Isolate* i_isolate = func->GetIsolate(); i::Tagged sfi = func->shared(); CHECK(IsScript(sfi->script())); - i::Tagged script = i::Script::cast(sfi->script()); + i::Tagged script = i::Cast(sfi->script()); i::Tagged maybe_array_list = script->compiled_lazy_function_positions(); std::vector result; if (!IsUndefined(maybe_array_list, i_isolate)) { - i::Tagged array_list = i::ArrayList::cast(maybe_array_list); + i::Tagged array_list = + i::Cast(maybe_array_list); + result.reserve(array_list->length()); + for (int i = 0; i < array_list->length(); ++i) { + i::Tagged item = array_list->get(i); + CHECK(IsSmi(item)); + result.push_back(i::Smi::ToInt(item)); + } + } + return result; +} + +Local Script::GetCompileHintsCollector() const { + i::DisallowGarbageCollection no_gc; + auto func = Utils::OpenDirectHandle(this); + i::Isolate* i_isolate = func->GetIsolate(); + i::Tagged sfi = func->shared(); + CHECK(IsScript(sfi->script())); + i::Handle script(i::Cast(sfi->script()), i_isolate); + return ToApiHandle(script); +} + +std::vector CompileHintsCollector::GetCompileHints( + Isolate* v8_isolate) const { + i::DisallowGarbageCollection no_gc; + auto script = Utils::OpenDirectHandle(this); + i::Isolate* i_isolate = reinterpret_cast(v8_isolate); + i::Tagged maybe_array_list = + script->compiled_lazy_function_positions(); + std::vector result; + if (!IsUndefined(maybe_array_list, i_isolate)) { + i::Tagged array_list = + i::Cast(maybe_array_list); result.reserve(array_list->length()); for (int i = 0; i < array_list->length(); ++i) { i::Tagged item = array_list->get(i); @@ -2317,8 +2307,9 @@ Module::Status Module::GetStatus() const { case i::Module::kLinked: return kInstantiated; case i::Module::kEvaluating: - case i::Module::kEvaluatingAsync: return kEvaluating; + case i::Module::kEvaluatingAsync: + // TODO(syg): Expose kEvaluatingAsync in API as well. case i::Module::kEvaluated: return kEvaluated; case i::Module::kErrored: @@ -2348,10 +2339,9 @@ Local Module::GetModuleRequests() const { self->GetReadOnlyRoots().empty_fixed_array_handle()); } else { return ToApiHandle( - i::direct_handle(i::DirectHandle::cast(self) - ->info() - ->module_requests(), - i_isolate), + i::direct_handle( + i::Cast(self)->info()->module_requests(), + i_isolate), i_isolate); } } @@ -2364,8 +2354,8 @@ Location Module::SourceOffsetToLocation(int offset) const { Utils::ApiCheck( i::IsSourceTextModule(*self), "v8::Module::SourceOffsetToLocation", "v8::Module::SourceOffsetToLocation must be used on an SourceTextModule"); - i::Handle script( - i::DirectHandle::cast(self)->GetScript(), i_isolate); + i::Handle script(i::Cast(self)->GetScript(), + i_isolate); i::Script::PositionInfo info; i::Script::GetPositionInfo(script, offset, &info); return v8::Location(info.line, info.column); @@ -2391,9 +2381,9 @@ Local Module::GetUnboundModuleScript() { auto i_isolate = self->GetIsolate(); DCHECK_NO_SCRIPT_NO_EXCEPTION(i_isolate); return ToApiHandle( - i::direct_handle(i::DirectHandle::cast(self) - ->GetSharedFunctionInfo(), - i_isolate), + i::direct_handle( + i::Cast(self)->GetSharedFunctionInfo(), + i_isolate), i_isolate); } @@ -2402,7 +2392,7 @@ int Module::ScriptId() const { Utils::ApiCheck(i::IsSourceTextModule(self), "v8::Module::ScriptId", "v8::Module::ScriptId must be used on an SourceTextModule"); DCHECK_NO_SCRIPT_NO_EXCEPTION(self->GetIsolate()); - return i::SourceTextModule::cast(self)->GetScript()->id(); + return i::Cast(self)->GetScript()->id(); } bool Module::IsGraphAsync() const { @@ -2438,7 +2428,7 @@ Maybe Module::InstantiateModule(Local context, auto i_isolate = reinterpret_cast(context->GetIsolate()); ENTER_V8(i_isolate, context, Module, InstantiateModule, i::HandleScope); has_exception = !i::Module::Instantiate(i_isolate, Utils::OpenHandle(this), - context, callback, nullptr); + context, callback); RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool); return Just(true); } @@ -2470,11 +2460,12 @@ Local Module::CreateSyntheticModule( auto i_isolate = reinterpret_cast(v8_isolate); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); auto i_module_name = Utils::OpenHandle(*module_name); - i::Handle i_export_names = i_isolate->factory()->NewFixedArray( - static_cast(export_names.size())); + i::DirectHandle i_export_names = + i_isolate->factory()->NewFixedArray( + static_cast(export_names.size())); for (int i = 0; i < i_export_names->length(); ++i) { - i::Handle str = i_isolate->factory()->InternalizeString( - Utils::OpenHandle(*export_names[i])); + i::DirectHandle str = i_isolate->factory()->InternalizeString( + Utils::OpenDirectHandle(*export_names[i])); i_export_names->set(i, *str); } return v8::Utils::ToLocal( @@ -2496,7 +2487,7 @@ Maybe Module::SetSyntheticModuleExport(Isolate* v8_isolate, ENTER_V8_NO_SCRIPT(i_isolate, v8_isolate->GetCurrentContext(), Module, SetSyntheticModuleExport, i::HandleScope); has_exception = i::SyntheticModule::SetExport( - i_isolate, i::Handle::cast(self), + i_isolate, i::Cast(self), i_export_name, i_export_value) .IsNothing(); RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool); @@ -2513,8 +2504,9 @@ Module::GetStalledTopLevelAwaitMessages(Isolate* isolate) { "called on a SourceTextModule"); std::vector< std::tuple, i::Handle>> - stalled_awaits = i::DirectHandle::cast(self) - ->GetStalledTopLevelAwaitMessages(i_isolate); + stalled_awaits = + i::Cast(self)->GetStalledTopLevelAwaitMessages( + i_isolate); LocalVector modules(isolate); LocalVector messages(isolate); @@ -2572,7 +2564,7 @@ MaybeLocal ScriptCompiler::CompileUnboundInternal( source->host_defined_options, source->resource_options); i::MaybeHandle maybe_function_info; - if (options == kConsumeCodeCache) { + if (options & kConsumeCodeCache) { if (source->consume_cache_task) { // Take ownership of the internal deserialization task and clear it off // the consume task on the source. @@ -2597,7 +2589,7 @@ MaybeLocal ScriptCompiler::CompileUnboundInternal( &source->compilation_details); source->cached_data->rejected = cached_data->rejected(); } - } else if (options == kConsumeCompileHints) { + } else if (options & kConsumeCompileHints) { maybe_function_info = i::Compiler::GetSharedFunctionInfoForScriptWithCompileHints( i_isolate, str, script_details, source->compile_hint_callback, @@ -2645,10 +2637,9 @@ MaybeLocal