From 50930a0fa08297d0ce7e67fa6594fe47937b99ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 29 Aug 2021 14:20:49 +0200 Subject: [PATCH] deps: update V8 to 9.3.345.16 PR-URL: https://github.com/nodejs/node/pull/39469 Reviewed-By: Jiawen Geng Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- deps/v8/.bazelrc | 26 + deps/v8/.gitignore | 6 +- deps/v8/.mailmap | 14 + deps/v8/AUTHORS | 6 +- deps/v8/BUILD.bazel | 3052 +++++++++++++++++ deps/v8/BUILD.gn | 258 +- deps/v8/COMMON_OWNERS | 1 - deps/v8/DEPS | 201 +- deps/v8/OWNERS | 4 + deps/v8/WATCHLISTS | 11 +- deps/v8/WORKSPACE | 29 + deps/v8/bazel/BUILD.icu | 76 + deps/v8/bazel/BUILD.zlib | 52 + deps/v8/bazel/OWNERS | 5 + deps/v8/bazel/defs.bzl | 239 ++ deps/v8/bazel/generate-inspector-files.sh | 19 + deps/v8/gni/v8.gni | 4 + deps/v8/include/OWNERS | 1 - deps/v8/include/cppgc/allocation.h | 15 +- deps/v8/include/cppgc/heap-statistics.h | 56 +- deps/v8/include/cppgc/heap.h | 2 + .../v8/include/cppgc/internal/api-constants.h | 4 +- deps/v8/include/cppgc/internal/gc-info.h | 1 + deps/v8/include/cppgc/internal/name-trait.h | 4 +- .../include/cppgc/internal/pointer-policies.h | 8 +- .../v8/include/cppgc/internal/write-barrier.h | 6 + deps/v8/include/cppgc/macros.h | 2 +- deps/v8/include/cppgc/member.h | 16 +- deps/v8/include/cppgc/name-provider.h | 2 +- deps/v8/include/cppgc/persistent.h | 2 +- deps/v8/include/cppgc/platform.h | 2 + deps/v8/include/cppgc/source-location.h | 1 + deps/v8/include/js_protocol.pdl | 20 +- deps/v8/include/v8-fast-api-calls.h | 300 +- deps/v8/include/v8-inspector.h | 6 +- deps/v8/include/v8-internal.h | 1 + deps/v8/include/v8-metrics.h | 29 +- deps/v8/include/v8-version.h | 6 +- deps/v8/include/v8.h | 64 +- deps/v8/infra/mb/mb_config.pyl | 22 +- deps/v8/infra/testing/builders.pyl | 74 +- deps/v8/src/DEPS | 5 +- deps/v8/src/api/api-arguments-inl.h | 3 +- deps/v8/src/api/api-inl.h | 54 + deps/v8/src/api/api-natives.cc | 4 +- deps/v8/src/api/api.cc | 247 +- deps/v8/src/api/api.h | 4 + deps/v8/src/asmjs/asm-js.cc | 60 +- deps/v8/src/asmjs/asm-parser.cc | 23 +- deps/v8/src/asmjs/asm-parser.h | 18 +- deps/v8/src/asmjs/asm-scanner.cc | 28 +- deps/v8/src/asmjs/asm-scanner.h | 18 +- deps/v8/src/ast/ast-value-factory.cc | 31 +- deps/v8/src/ast/ast-value-factory.h | 17 +- deps/v8/src/ast/ast.cc | 26 +- deps/v8/src/ast/ast.h | 41 +- deps/v8/src/ast/modules.cc | 13 +- deps/v8/src/ast/prettyprinter.cc | 35 +- deps/v8/src/ast/scopes.cc | 43 +- deps/v8/src/base/atomic-utils.h | 14 +- deps/v8/src/base/atomicops.h | 4 - deps/v8/src/base/build_config.h | 6 + deps/v8/src/base/cpu.cc | 16 +- deps/v8/src/base/cpu.h | 3 + deps/v8/src/base/file-utils.cc | 4 +- deps/v8/src/base/flags.h | 2 +- deps/v8/src/base/hashmap.h | 2 +- deps/v8/src/base/macros.h | 23 +- deps/v8/src/base/memory.h | 4 +- deps/v8/src/{ => base}/numbers/bignum-dtoa.cc | 11 +- deps/v8/src/{ => base}/numbers/bignum-dtoa.h | 18 +- deps/v8/src/{ => base}/numbers/bignum.cc | 9 +- deps/v8/src/{ => base}/numbers/bignum.h | 14 +- .../src/{ => base}/numbers/cached-powers.cc | 8 +- .../v8/src/{ => base}/numbers/cached-powers.h | 12 +- deps/v8/src/{ => base}/numbers/diy-fp.cc | 6 +- deps/v8/src/{ => base}/numbers/diy-fp.h | 12 +- deps/v8/src/{ => base}/numbers/double.h | 12 +- deps/v8/src/{ => base}/numbers/dtoa.cc | 18 +- deps/v8/src/{ => base}/numbers/dtoa.h | 18 +- deps/v8/src/{ => base}/numbers/fast-dtoa.cc | 18 +- deps/v8/src/{ => base}/numbers/fast-dtoa.h | 18 +- deps/v8/src/{ => base}/numbers/fixed-dtoa.cc | 11 +- deps/v8/src/{ => base}/numbers/fixed-dtoa.h | 18 +- deps/v8/src/{ => base}/numbers/strtod.cc | 21 +- deps/v8/src/{ => base}/numbers/strtod.h | 14 +- deps/v8/src/base/page-allocator.cc | 2 +- deps/v8/src/base/platform/OWNERS | 1 - deps/v8/src/base/platform/platform-posix.cc | 18 +- .../src/base/platform/platform-starboard.cc | 67 +- deps/v8/src/base/platform/wrappers.h | 11 +- deps/v8/src/base/sanitizer/asan.h | 18 + deps/v8/src/base/small-vector.h | 8 +- deps/v8/src/base/strings.cc | 33 + deps/v8/src/base/strings.h | 51 + deps/v8/src/base/sys-info.cc | 10 + .../src/base/utils/random-number-generator.cc | 5 + deps/v8/src/{utils => base}/vector.h | 27 +- .../baseline/arm/baseline-assembler-arm-inl.h | 145 +- .../baseline/arm/baseline-compiler-arm-inl.h | 13 +- .../arm64/baseline-assembler-arm64-inl.h | 113 +- .../arm64/baseline-compiler-arm64-inl.h | 15 +- deps/v8/src/baseline/baseline-assembler-inl.h | 9 +- deps/v8/src/baseline/baseline-assembler.h | 56 +- .../src/baseline/baseline-batch-compiler.cc | 171 + .../v8/src/baseline/baseline-batch-compiler.h | 69 + deps/v8/src/baseline/baseline-compiler.cc | 653 ++-- deps/v8/src/baseline/baseline-compiler.h | 18 +- deps/v8/src/baseline/baseline-osr-inl.h | 38 - deps/v8/src/baseline/baseline.cc | 44 +- .../ia32/baseline-assembler-ia32-inl.h | 111 +- .../ia32/baseline-compiler-ia32-inl.h | 13 +- .../mips/baseline-assembler-mips-inl.h | 513 +++ .../mips/baseline-compiler-mips-inl.h | 77 + .../mips64/baseline-assembler-mips64-inl.h | 511 +++ .../mips64/baseline-compiler-mips64-inl.h | 77 + .../riscv64/baseline-assembler-riscv64-inl.h | 174 +- .../riscv64/baseline-compiler-riscv64-inl.h | 10 +- .../baseline/x64/baseline-assembler-x64-inl.h | 130 +- .../baseline/x64/baseline-compiler-x64-inl.h | 15 +- deps/v8/src/bigint/OWNERS | 1 + deps/v8/src/bigint/bigint-internal.cc | 68 +- deps/v8/src/bigint/bigint-internal.h | 62 +- deps/v8/src/bigint/bigint.h | 60 +- deps/v8/src/bigint/digit-arithmetic.h | 108 + deps/v8/src/bigint/div-burnikel.cc | 279 ++ deps/v8/src/bigint/div-helpers.cc | 68 + deps/v8/src/bigint/div-helpers.h | 82 + deps/v8/src/bigint/div-schoolbook.cc | 190 + deps/v8/src/bigint/mul-fft.cc | 790 +++++ deps/v8/src/bigint/mul-karatsuba.cc | 205 ++ deps/v8/src/bigint/mul-schoolbook.cc | 2 - deps/v8/src/bigint/mul-toom.cc | 223 ++ deps/v8/src/bigint/tostring.cc | 303 ++ deps/v8/src/bigint/util.h | 75 + deps/v8/src/bigint/vector-arithmetic.cc | 118 +- deps/v8/src/bigint/vector-arithmetic.h | 40 + deps/v8/src/builtins/accessors.cc | 7 +- deps/v8/src/builtins/arm/builtins-arm.cc | 198 +- deps/v8/src/builtins/arm64/builtins-arm64.cc | 253 +- deps/v8/src/builtins/base.tq | 8 + deps/v8/src/builtins/builtins-api.cc | 2 +- deps/v8/src/builtins/builtins-array-gen.cc | 48 +- deps/v8/src/builtins/builtins-array.cc | 9 +- deps/v8/src/builtins/builtins-arraybuffer.cc | 2 +- .../builtins/builtins-async-function-gen.cc | 18 +- deps/v8/src/builtins/builtins-async-gen.cc | 65 +- .../builtins/builtins-async-generator-gen.cc | 31 +- .../builtins/builtins-async-iterator-gen.cc | 12 +- deps/v8/src/builtins/builtins-call-gen.cc | 26 +- deps/v8/src/builtins/builtins-call-gen.h | 5 +- .../src/builtins/builtins-collections-gen.cc | 29 +- deps/v8/src/builtins/builtins-console.cc | 20 +- .../src/builtins/builtins-constructor-gen.cc | 25 +- deps/v8/src/builtins/builtins-date-gen.cc | 6 +- deps/v8/src/builtins/builtins-date.cc | 22 +- deps/v8/src/builtins/builtins-definitions.h | 34 +- deps/v8/src/builtins/builtins-function.cc | 2 +- .../v8/src/builtins/builtins-generator-gen.cc | 6 +- deps/v8/src/builtins/builtins-global-gen.cc | 4 +- deps/v8/src/builtins/builtins-handler-gen.cc | 30 +- deps/v8/src/builtins/builtins-ic-gen.cc | 10 + deps/v8/src/builtins/builtins-internal-gen.cc | 424 ++- deps/v8/src/builtins/builtins-intl-gen.cc | 4 +- deps/v8/src/builtins/builtins-intl.cc | 22 +- deps/v8/src/builtins/builtins-iterator-gen.cc | 18 +- deps/v8/src/builtins/builtins-lazy-gen.cc | 24 +- .../builtins/builtins-microtask-queue-gen.cc | 6 +- deps/v8/src/builtins/builtins-object-gen.cc | 34 +- deps/v8/src/builtins/builtins-object.cc | 4 +- deps/v8/src/builtins/builtins-reflect.cc | 2 +- deps/v8/src/builtins/builtins-regexp-gen.cc | 30 +- .../builtins-sharedarraybuffer-gen.cc | 1 + deps/v8/src/builtins/builtins-string-gen.cc | 34 +- deps/v8/src/builtins/builtins-string.cc | 26 +- deps/v8/src/builtins/builtins-trace.cc | 6 +- .../src/builtins/builtins-typed-array-gen.cc | 41 +- .../src/builtins/builtins-typed-array-gen.h | 3 + deps/v8/src/builtins/builtins-utils-gen.h | 2 +- deps/v8/src/builtins/builtins-utils.h | 1 + deps/v8/src/builtins/builtins.cc | 217 +- deps/v8/src/builtins/builtins.h | 141 +- deps/v8/src/builtins/cast.tq | 5 + .../src/builtins/constants-table-builder.cc | 2 +- deps/v8/src/builtins/finalization-registry.tq | 15 +- deps/v8/src/builtins/function.tq | 8 +- deps/v8/src/builtins/ia32/builtins-ia32.cc | 216 +- deps/v8/src/builtins/ic-dynamic-check-maps.tq | 8 + deps/v8/src/builtins/mips/builtins-mips.cc | 469 ++- .../v8/src/builtins/mips64/builtins-mips64.cc | 473 ++- deps/v8/src/builtins/object-fromentries.tq | 26 +- deps/v8/src/builtins/ppc/builtins-ppc.cc | 401 ++- deps/v8/src/builtins/promise-misc.tq | 2 + .../src/builtins/riscv64/builtins-riscv64.cc | 1175 ++++--- deps/v8/src/builtins/s390/builtins-s390.cc | 117 +- .../src/builtins/setup-builtins-internal.cc | 156 +- .../builtins/typed-array-createtypedarray.tq | 8 +- deps/v8/src/builtins/typed-array-from.tq | 10 +- deps/v8/src/builtins/typed-array.tq | 2 + deps/v8/src/builtins/wasm.tq | 84 +- deps/v8/src/builtins/x64/builtins-x64.cc | 308 +- deps/v8/src/codegen/aligned-slot-allocator.cc | 1 - deps/v8/src/codegen/arm/assembler-arm.cc | 57 +- deps/v8/src/codegen/arm/assembler-arm.h | 5 +- deps/v8/src/codegen/arm/cpu-arm.cc | 2 + .../arm/interface-descriptors-arm-inl.h | 27 +- .../v8/src/codegen/arm/macro-assembler-arm.cc | 368 +- deps/v8/src/codegen/arm/macro-assembler-arm.h | 72 +- deps/v8/src/codegen/arm64/assembler-arm64.cc | 23 +- deps/v8/src/codegen/arm64/assembler-arm64.h | 4 +- .../arm64/interface-descriptors-arm64-inl.h | 26 +- .../codegen/arm64/macro-assembler-arm64-inl.h | 4 +- .../codegen/arm64/macro-assembler-arm64.cc | 603 ++-- .../src/codegen/arm64/macro-assembler-arm64.h | 106 +- deps/v8/src/codegen/arm64/register-arm64.h | 2 - deps/v8/src/codegen/assembler.cc | 77 +- deps/v8/src/codegen/assembler.h | 76 +- deps/v8/src/codegen/bailout-reason.h | 1 + deps/v8/src/codegen/code-factory.cc | 217 +- deps/v8/src/codegen/code-factory.h | 14 +- deps/v8/src/codegen/code-stub-assembler.cc | 381 +- deps/v8/src/codegen/code-stub-assembler.h | 79 +- deps/v8/src/codegen/compiler.cc | 133 +- deps/v8/src/codegen/compiler.h | 4 + deps/v8/src/codegen/constant-pool.cc | 12 +- deps/v8/src/codegen/constant-pool.h | 8 +- .../src/codegen/external-reference-table.cc | 1 + deps/v8/src/codegen/external-reference.cc | 108 +- deps/v8/src/codegen/external-reference.h | 14 + deps/v8/src/codegen/handler-table.cc | 2 + deps/v8/src/codegen/handler-table.h | 4 - deps/v8/src/codegen/ia32/assembler-ia32-inl.h | 23 +- deps/v8/src/codegen/ia32/assembler-ia32.cc | 15 +- deps/v8/src/codegen/ia32/cpu-ia32.cc | 2 +- .../ia32/interface-descriptors-ia32-inl.h | 24 +- .../src/codegen/ia32/macro-assembler-ia32.cc | 413 ++- .../src/codegen/ia32/macro-assembler-ia32.h | 67 +- .../src/codegen/interface-descriptors-inl.h | 69 +- deps/v8/src/codegen/interface-descriptors.cc | 26 + deps/v8/src/codegen/interface-descriptors.h | 111 +- deps/v8/src/codegen/machine-type.cc | 1 - deps/v8/src/codegen/macro-assembler.h | 39 +- deps/v8/src/codegen/mips/assembler-mips.cc | 5 +- deps/v8/src/codegen/mips/assembler-mips.h | 11 + .../mips/interface-descriptors-mips-inl.h | 31 +- .../src/codegen/mips/macro-assembler-mips.cc | 278 +- .../src/codegen/mips/macro-assembler-mips.h | 91 +- .../v8/src/codegen/mips64/assembler-mips64.cc | 5 +- deps/v8/src/codegen/mips64/assembler-mips64.h | 11 + .../mips64/interface-descriptors-mips64-inl.h | 42 +- .../codegen/mips64/macro-assembler-mips64.cc | 291 +- .../codegen/mips64/macro-assembler-mips64.h | 84 +- .../src/codegen/optimized-compilation-info.cc | 11 +- .../src/codegen/optimized-compilation-info.h | 12 +- deps/v8/src/codegen/ppc/assembler-ppc.cc | 42 +- deps/v8/src/codegen/ppc/assembler-ppc.h | 44 +- deps/v8/src/codegen/ppc/constants-ppc.h | 31 +- .../ppc/interface-descriptors-ppc-inl.h | 27 +- .../v8/src/codegen/ppc/macro-assembler-ppc.cc | 1208 +++---- deps/v8/src/codegen/ppc/macro-assembler-ppc.h | 271 +- deps/v8/src/codegen/reloc-info.cc | 22 +- deps/v8/src/codegen/reloc-info.h | 6 +- .../codegen/riscv64/assembler-riscv64-inl.h | 78 +- .../src/codegen/riscv64/assembler-riscv64.cc | 134 +- .../src/codegen/riscv64/assembler-riscv64.h | 37 +- .../src/codegen/riscv64/constants-riscv64.h | 40 +- .../interface-descriptors-riscv64-inl.h | 27 +- .../riscv64/macro-assembler-riscv64.cc | 711 ++-- .../codegen/riscv64/macro-assembler-riscv64.h | 229 +- .../v8/src/codegen/riscv64/register-riscv64.h | 33 +- deps/v8/src/codegen/s390/assembler-s390.cc | 1 + .../s390/interface-descriptors-s390-inl.h | 27 +- .../src/codegen/s390/macro-assembler-s390.cc | 286 +- .../src/codegen/s390/macro-assembler-s390.h | 70 +- .../macro-assembler-shared-ia32-x64.h | 8 + deps/v8/src/codegen/source-position-table.cc | 21 +- deps/v8/src/codegen/source-position-table.h | 8 +- deps/v8/src/codegen/tnode.h | 1 + deps/v8/src/codegen/turbo-assembler.cc | 31 +- deps/v8/src/codegen/turbo-assembler.h | 54 +- deps/v8/src/codegen/x64/assembler-x64-inl.h | 33 +- deps/v8/src/codegen/x64/assembler-x64.cc | 15 +- deps/v8/src/codegen/x64/assembler-x64.h | 1 + .../x64/interface-descriptors-x64-inl.h | 53 +- .../v8/src/codegen/x64/macro-assembler-x64.cc | 627 ++-- deps/v8/src/codegen/x64/macro-assembler-x64.h | 119 +- deps/v8/src/common/assert-scope.cc | 89 +- deps/v8/src/common/assert-scope.h | 204 +- deps/v8/src/common/globals.h | 40 +- deps/v8/src/common/message-template.h | 9 +- .../compiler-dispatcher.cc | 2 + .../optimizing-compile-dispatcher.cc | 1 + deps/v8/src/compiler/access-info.cc | 15 +- deps/v8/src/compiler/allocation-builder-inl.h | 17 +- deps/v8/src/compiler/allocation-builder.h | 17 +- .../backend/arm/code-generator-arm.cc | 48 +- .../backend/arm/instruction-codes-arm.h | 1 + .../backend/arm/instruction-scheduler-arm.cc | 1 + .../backend/arm/instruction-selector-arm.cc | 48 +- .../backend/arm64/code-generator-arm64.cc | 86 +- .../backend/arm64/instruction-codes-arm64.h | 4 + .../arm64/instruction-scheduler-arm64.cc | 4 + .../arm64/instruction-selector-arm64.cc | 62 +- .../v8/src/compiler/backend/code-generator.cc | 41 +- deps/v8/src/compiler/backend/code-generator.h | 16 +- .../backend/ia32/code-generator-ia32.cc | 47 +- .../backend/ia32/instruction-selector-ia32.cc | 2 +- .../backend/instruction-selector-impl.h | 10 + .../compiler/backend/instruction-selector.cc | 96 +- .../compiler/backend/instruction-selector.h | 10 +- deps/v8/src/compiler/backend/instruction.cc | 31 +- deps/v8/src/compiler/backend/instruction.h | 20 +- .../backend/mid-tier-register-allocator.cc | 51 +- .../backend/mips/code-generator-mips.cc | 43 +- .../backend/mips/instruction-selector-mips.cc | 3 +- .../backend/mips64/code-generator-mips64.cc | 43 +- .../mips64/instruction-selector-mips64.cc | 5 +- .../v8/src/compiler/backend/move-optimizer.cc | 1 - .../backend/ppc/code-generator-ppc.cc | 441 ++- .../backend/ppc/instruction-codes-ppc.h | 6 +- .../backend/ppc/instruction-scheduler-ppc.cc | 6 +- .../backend/ppc/instruction-selector-ppc.cc | 87 +- .../compiler/backend/register-allocator.cc | 62 +- .../src/compiler/backend/register-allocator.h | 10 +- .../backend/riscv64/code-generator-riscv64.cc | 247 +- .../riscv64/instruction-codes-riscv64.h | 6 +- .../riscv64/instruction-scheduler-riscv64.cc | 7 +- .../riscv64/instruction-selector-riscv64.cc | 143 +- .../backend/s390/code-generator-s390.cc | 155 +- .../backend/s390/instruction-codes-s390.h | 2 + .../s390/instruction-scheduler-s390.cc | 2 + .../backend/s390/instruction-selector-s390.cc | 359 +- .../backend/x64/code-generator-x64.cc | 296 +- .../backend/x64/instruction-selector-x64.cc | 166 +- deps/v8/src/compiler/branch-elimination.cc | 64 +- deps/v8/src/compiler/branch-elimination.h | 24 +- deps/v8/src/compiler/bytecode-analysis.cc | 8 +- .../v8/src/compiler/bytecode-graph-builder.cc | 158 +- deps/v8/src/compiler/bytecode-graph-builder.h | 2 +- deps/v8/src/compiler/code-assembler.cc | 71 +- deps/v8/src/compiler/code-assembler.h | 30 +- .../src/compiler/common-operator-reducer.cc | 3 +- deps/v8/src/compiler/common-operator.cc | 25 +- deps/v8/src/compiler/common-operator.h | 41 +- .../src/compiler/compilation-dependencies.cc | 289 +- .../src/compiler/compilation-dependencies.h | 17 + deps/v8/src/compiler/compilation-dependency.h | 2 +- .../src/compiler/constant-folding-reducer.cc | 1 - deps/v8/src/compiler/dead-code-elimination.cc | 7 +- deps/v8/src/compiler/dead-code-elimination.h | 5 +- .../src/compiler/decompression-optimizer.cc | 17 +- .../src/compiler/effect-control-linearizer.cc | 430 ++- deps/v8/src/compiler/fast-api-calls.cc | 84 + deps/v8/src/compiler/fast-api-calls.h | 50 + deps/v8/src/compiler/frame-states.cc | 16 +- deps/v8/src/compiler/frame-states.h | 4 +- deps/v8/src/compiler/functional-list.h | 11 +- deps/v8/src/compiler/globals.h | 9 + deps/v8/src/compiler/graph-assembler.cc | 19 +- deps/v8/src/compiler/graph-assembler.h | 4 +- deps/v8/src/compiler/graph-visualizer.cc | 14 +- deps/v8/src/compiler/heap-refs.cc | 2354 +++++-------- deps/v8/src/compiler/heap-refs.h | 266 +- deps/v8/src/compiler/js-call-reducer.cc | 1296 ++++--- deps/v8/src/compiler/js-call-reducer.h | 23 +- .../src/compiler/js-context-specialization.cc | 7 +- deps/v8/src/compiler/js-create-lowering.cc | 216 +- deps/v8/src/compiler/js-create-lowering.h | 6 +- deps/v8/src/compiler/js-generic-lowering.cc | 160 +- deps/v8/src/compiler/js-generic-lowering.h | 10 +- deps/v8/src/compiler/js-heap-broker.cc | 61 +- deps/v8/src/compiler/js-heap-broker.h | 91 +- deps/v8/src/compiler/js-heap-copy-reducer.cc | 3 - deps/v8/src/compiler/js-inlining-heuristic.cc | 15 +- deps/v8/src/compiler/js-inlining-heuristic.h | 13 +- deps/v8/src/compiler/js-inlining.cc | 7 +- deps/v8/src/compiler/js-intrinsic-lowering.cc | 36 +- deps/v8/src/compiler/js-intrinsic-lowering.h | 1 - .../js-native-context-specialization.cc | 152 +- .../js-native-context-specialization.h | 20 +- deps/v8/src/compiler/js-operator.cc | 2 +- deps/v8/src/compiler/js-operator.h | 22 +- deps/v8/src/compiler/js-type-hint-lowering.cc | 21 +- deps/v8/src/compiler/js-typed-lowering.cc | 16 +- deps/v8/src/compiler/linkage.cc | 46 +- deps/v8/src/compiler/linkage.h | 22 +- deps/v8/src/compiler/loop-unrolling.h | 2 +- .../v8/src/compiler/machine-graph-verifier.cc | 3 - .../src/compiler/machine-operator-reducer.cc | 59 +- deps/v8/src/compiler/memory-optimizer.cc | 1 + deps/v8/src/compiler/node-matchers.h | 4 +- deps/v8/src/compiler/node-origin-table.h | 1 + deps/v8/src/compiler/node-properties.cc | 13 +- deps/v8/src/compiler/opcodes.h | 2 + deps/v8/src/compiler/operation-typer.cc | 1 + deps/v8/src/compiler/pipeline.cc | 382 ++- deps/v8/src/compiler/pipeline.h | 25 +- .../src/compiler/property-access-builder.cc | 21 +- .../v8/src/compiler/property-access-builder.h | 9 +- deps/v8/src/compiler/representation-change.cc | 6 +- deps/v8/src/compiler/schedule.cc | 16 +- .../serializer-for-background-compilation.cc | 389 +-- deps/v8/src/compiler/simplified-lowering.cc | 113 +- .../compiler/simplified-operator-reducer.cc | 1 - deps/v8/src/compiler/simplified-operator.cc | 52 +- deps/v8/src/compiler/simplified-operator.h | 44 +- .../src/compiler/store-store-elimination.cc | 6 +- .../v8/src/compiler/type-narrowing-reducer.cc | 3 - deps/v8/src/compiler/type-narrowing-reducer.h | 1 - deps/v8/src/compiler/typed-optimization.cc | 26 +- deps/v8/src/compiler/typed-optimization.h | 1 + deps/v8/src/compiler/typer.cc | 333 +- deps/v8/src/compiler/types.cc | 1 + deps/v8/src/compiler/verifier.cc | 33 +- deps/v8/src/compiler/wasm-compiler.cc | 688 ++-- deps/v8/src/compiler/wasm-compiler.h | 119 +- deps/v8/src/d8/OWNERS | 1 - deps/v8/src/d8/d8-platforms.cc | 16 +- deps/v8/src/d8/d8-posix.cc | 4 +- deps/v8/src/d8/d8-test.cc | 246 +- deps/v8/src/d8/d8.cc | 548 ++- deps/v8/src/d8/d8.h | 79 +- deps/v8/src/date/OWNERS | 1 - deps/v8/src/date/dateparser-inl.h | 2 +- deps/v8/src/date/dateparser.h | 10 +- deps/v8/src/debug/debug-evaluate.cc | 855 ++--- deps/v8/src/debug/debug-frames.cc | 10 +- deps/v8/src/debug/debug-interface.cc | 66 +- deps/v8/src/debug/debug-interface.h | 13 +- deps/v8/src/debug/debug-property-iterator.cc | 2 +- deps/v8/src/debug/debug-scopes.cc | 16 +- .../src/debug/debug-stack-trace-iterator.cc | 7 +- deps/v8/src/debug/debug-wasm-objects.cc | 100 +- deps/v8/src/debug/debug-wasm-objects.h | 5 + deps/v8/src/debug/debug.cc | 261 +- deps/v8/src/debug/debug.h | 21 +- .../v8/src/debug/wasm/gdb-server/transport.cc | 2 +- .../wasm/gdb-server/wasm-module-debug.cc | 14 +- deps/v8/src/deoptimizer/deoptimize-reason.h | 12 +- deps/v8/src/deoptimizer/deoptimizer.cc | 90 +- deps/v8/src/deoptimizer/deoptimizer.h | 9 +- .../deoptimizer/materialized-object-store.cc | 1 + deps/v8/src/deoptimizer/translated-state.cc | 11 +- deps/v8/src/diagnostics/arm/disasm-arm.cc | 250 +- deps/v8/src/diagnostics/arm64/disasm-arm64.cc | 16 +- deps/v8/src/diagnostics/arm64/disasm-arm64.h | 1 - deps/v8/src/diagnostics/code-tracer.h | 14 +- deps/v8/src/diagnostics/disasm.h | 6 +- deps/v8/src/diagnostics/disassembler.cc | 113 +- deps/v8/src/diagnostics/disassembler.h | 2 +- deps/v8/src/diagnostics/eh-frame.cc | 1 - deps/v8/src/diagnostics/gdb-jit.cc | 29 +- deps/v8/src/diagnostics/ia32/disasm-ia32.cc | 28 +- deps/v8/src/diagnostics/mips/disasm-mips.cc | 111 +- .../src/diagnostics/mips64/disasm-mips64.cc | 122 +- deps/v8/src/diagnostics/objects-debug.cc | 96 +- deps/v8/src/diagnostics/objects-printer.cc | 67 +- deps/v8/src/diagnostics/perf-jit.cc | 11 +- deps/v8/src/diagnostics/ppc/disasm-ppc.cc | 89 +- .../src/diagnostics/riscv64/disasm-riscv64.cc | 116 +- deps/v8/src/diagnostics/s390/disasm-s390.cc | 128 +- deps/v8/src/diagnostics/system-jit-win.cc | 23 +- .../src/diagnostics/unwinding-info-win64.cc | 39 +- deps/v8/src/diagnostics/x64/disasm-x64.cc | 30 +- deps/v8/src/diagnostics/x64/eh-frame-x64.cc | 2 - deps/v8/src/execution/arguments.cc | 6 +- deps/v8/src/execution/arguments.h | 2 +- deps/v8/src/execution/arm/simulator-arm.cc | 93 +- .../v8/src/execution/arm64/simulator-arm64.cc | 19 +- deps/v8/src/execution/arm64/simulator-arm64.h | 29 +- .../execution/arm64/simulator-logic-arm64.cc | 28 +- deps/v8/src/execution/execution.cc | 6 +- deps/v8/src/execution/execution.h | 2 +- deps/v8/src/execution/frames.cc | 67 +- deps/v8/src/execution/isolate-data.h | 19 +- deps/v8/src/execution/isolate-inl.h | 1 - deps/v8/src/execution/isolate.cc | 122 +- deps/v8/src/execution/isolate.h | 61 +- deps/v8/src/execution/messages.cc | 21 +- deps/v8/src/execution/messages.h | 3 +- deps/v8/src/execution/mips/simulator-mips.cc | 40 +- deps/v8/src/execution/mips/simulator-mips.h | 5 +- .../execution/mips64/frame-constants-mips64.h | 3 +- .../src/execution/mips64/simulator-mips64.cc | 304 +- .../src/execution/mips64/simulator-mips64.h | 3 +- deps/v8/src/execution/ppc/simulator-ppc.cc | 119 +- deps/v8/src/execution/ppc/simulator-ppc.h | 28 +- .../riscv64/frame-constants-riscv64.h | 2 +- .../execution/riscv64/simulator-riscv64.cc | 90 +- .../src/execution/riscv64/simulator-riscv64.h | 4 +- deps/v8/src/execution/runtime-profiler.cc | 67 +- deps/v8/src/execution/runtime-profiler.h | 1 - deps/v8/src/execution/s390/simulator-s390.cc | 22 +- deps/v8/src/execution/simulator.h | 10 +- deps/v8/src/execution/stack-guard.cc | 4 +- deps/v8/src/execution/thread-local-top.cc | 2 + .../src/extensions/cputracemark-extension.h | 6 +- .../externalize-string-extension.cc | 5 +- deps/v8/src/extensions/gc-extension.h | 6 +- .../ignition-statistics-extension.cc | 1 - .../vtunedomain-support-extension.h | 7 +- deps/v8/src/flags/flag-definitions.h | 179 +- deps/v8/src/flags/flags.cc | 4 +- deps/v8/src/flags/flags.h | 2 +- deps/v8/src/handles/OWNERS | 1 - deps/v8/src/handles/global-handles.cc | 1 + deps/v8/src/handles/handles.h | 1 - deps/v8/src/heap/OWNERS | 1 - deps/v8/src/heap/array-buffer-sweeper.cc | 1 + deps/v8/src/heap/base/stack.cc | 1 - deps/v8/src/heap/code-range.cc | 30 +- deps/v8/src/heap/code-range.h | 2 +- deps/v8/src/heap/collection-barrier.cc | 92 +- deps/v8/src/heap/collection-barrier.h | 28 +- deps/v8/src/heap/concurrent-allocator-inl.h | 1 + deps/v8/src/heap/concurrent-marking.cc | 2 +- deps/v8/src/heap/cppgc-js/cpp-heap.cc | 131 +- deps/v8/src/heap/cppgc-js/cpp-heap.h | 50 +- deps/v8/src/heap/cppgc-js/cpp-snapshot.cc | 246 +- deps/v8/src/heap/cppgc/allocation.cc | 3 +- deps/v8/src/heap/cppgc/compactor.cc | 13 +- deps/v8/src/heap/cppgc/concurrent-marker.cc | 14 + deps/v8/src/heap/cppgc/explicit-management.cc | 16 +- deps/v8/src/heap/cppgc/free-list.cc | 5 +- deps/v8/src/heap/cppgc/free-list.h | 4 +- deps/v8/src/heap/cppgc/garbage-collector.h | 2 + deps/v8/src/heap/cppgc/heap-base.cc | 24 +- deps/v8/src/heap/cppgc/heap-base.h | 15 +- deps/v8/src/heap/cppgc/heap-page.cc | 84 +- deps/v8/src/heap/cppgc/heap-page.h | 30 +- deps/v8/src/heap/cppgc/heap-space.h | 20 +- .../heap/cppgc/heap-statistics-collector.cc | 124 +- .../heap/cppgc/heap-statistics-collector.h | 19 +- deps/v8/src/heap/cppgc/heap-visitor.h | 56 +- deps/v8/src/heap/cppgc/heap.cc | 17 +- deps/v8/src/heap/cppgc/marker.cc | 11 + deps/v8/src/heap/cppgc/marker.h | 17 +- deps/v8/src/heap/cppgc/marking-state.h | 19 +- deps/v8/src/heap/cppgc/marking-verifier.cc | 18 +- deps/v8/src/heap/cppgc/marking-verifier.h | 2 +- deps/v8/src/heap/cppgc/marking-worklists.cc | 1 + deps/v8/src/heap/cppgc/marking-worklists.h | 6 + deps/v8/src/heap/cppgc/memory.h | 73 +- deps/v8/src/heap/cppgc/metric-recorder.h | 32 +- deps/v8/src/heap/cppgc/object-allocator.cc | 63 +- deps/v8/src/heap/cppgc/object-allocator.h | 20 +- deps/v8/src/heap/cppgc/object-poisoner.h | 13 +- deps/v8/src/heap/cppgc/pointer-policies.cc | 36 +- .../v8/src/heap/cppgc/prefinalizer-handler.cc | 4 +- deps/v8/src/heap/cppgc/prefinalizer-handler.h | 3 + deps/v8/src/heap/cppgc/process-heap.cc | 5 + deps/v8/src/heap/cppgc/stats-collector.cc | 88 +- deps/v8/src/heap/cppgc/stats-collector.h | 19 +- deps/v8/src/heap/cppgc/sweeper.cc | 285 +- deps/v8/src/heap/cppgc/sweeper.h | 7 + deps/v8/src/heap/cppgc/visitor.cc | 2 +- deps/v8/src/heap/cppgc/write-barrier.cc | 25 +- deps/v8/src/heap/factory-base-inl.h | 4 +- deps/v8/src/heap/factory-base.cc | 32 +- deps/v8/src/heap/factory-base.h | 16 +- deps/v8/src/heap/factory.cc | 403 ++- deps/v8/src/heap/factory.h | 78 +- deps/v8/src/heap/free-list.cc | 3 +- deps/v8/src/heap/gc-tracer.cc | 157 +- deps/v8/src/heap/gc-tracer.h | 11 + deps/v8/src/heap/heap-inl.h | 133 +- deps/v8/src/heap/heap-write-barrier-inl.h | 11 +- deps/v8/src/heap/heap-write-barrier.cc | 2 +- deps/v8/src/heap/heap-write-barrier.h | 1 + deps/v8/src/heap/heap.cc | 289 +- deps/v8/src/heap/heap.h | 103 +- deps/v8/src/heap/incremental-marking.cc | 8 + deps/v8/src/heap/incremental-marking.h | 2 + deps/v8/src/heap/large-spaces.cc | 9 +- deps/v8/src/heap/large-spaces.h | 12 + deps/v8/src/heap/local-allocator.h | 10 +- deps/v8/src/heap/local-factory.cc | 1 + deps/v8/src/heap/local-heap-inl.h | 2 +- deps/v8/src/heap/local-heap.cc | 28 +- deps/v8/src/heap/local-heap.h | 25 +- deps/v8/src/heap/mark-compact.cc | 77 +- deps/v8/src/heap/mark-compact.h | 4 +- deps/v8/src/heap/marking-visitor-inl.h | 6 +- deps/v8/src/heap/memory-measurement.cc | 3 +- deps/v8/src/heap/new-spaces-inl.h | 1 + deps/v8/src/heap/new-spaces.cc | 7 +- deps/v8/src/heap/new-spaces.h | 11 +- deps/v8/src/heap/object-stats.cc | 6 +- deps/v8/src/heap/objects-visiting-inl.h | 1 + deps/v8/src/heap/objects-visiting.cc | 30 +- deps/v8/src/heap/objects-visiting.h | 1 + deps/v8/src/heap/paged-spaces-inl.h | 1 - deps/v8/src/heap/paged-spaces.cc | 48 +- deps/v8/src/heap/paged-spaces.h | 86 +- deps/v8/src/heap/parked-scope.h | 65 +- deps/v8/src/heap/read-only-spaces.cc | 2 +- deps/v8/src/heap/remembered-set.h | 1 - deps/v8/src/heap/safepoint.cc | 17 +- deps/v8/src/heap/safepoint.h | 13 +- deps/v8/src/heap/scavenger-inl.h | 7 +- deps/v8/src/heap/scavenger.cc | 2 +- deps/v8/src/heap/setup-heap-internal.cc | 76 +- deps/v8/src/heap/spaces-inl.h | 1 - deps/v8/src/heap/spaces.cc | 13 +- deps/v8/src/heap/spaces.h | 7 + deps/v8/src/heap/sweeper.cc | 37 + deps/v8/src/heap/sweeper.h | 5 + deps/v8/src/heap/third-party/heap-api-stub.cc | 4 + deps/v8/src/heap/third-party/heap-api.h | 11 + deps/v8/src/ic/accessor-assembler.cc | 273 +- deps/v8/src/ic/accessor-assembler.h | 12 + deps/v8/src/ic/binary-op-assembler.cc | 37 +- deps/v8/src/ic/call-optimization.cc | 1 - deps/v8/src/ic/handler-configuration-inl.h | 104 +- deps/v8/src/ic/handler-configuration.cc | 52 +- deps/v8/src/ic/handler-configuration.h | 61 +- deps/v8/src/ic/handler-configuration.tq | 2 + deps/v8/src/ic/ic-inl.h | 2 +- deps/v8/src/ic/ic-stats.cc | 6 +- deps/v8/src/ic/ic.cc | 194 +- deps/v8/src/ic/ic.h | 2 + deps/v8/src/ic/stub-cache.cc | 6 +- deps/v8/src/ic/unary-op-assembler.cc | 2 +- deps/v8/src/init/OWNERS | 1 - deps/v8/src/init/bootstrapper.cc | 1439 ++++---- deps/v8/src/init/bootstrapper.h | 4 +- deps/v8/src/init/heap-symbols.h | 2 + deps/v8/src/init/setup-isolate.h | 3 +- deps/v8/src/init/v8.cc | 35 +- deps/v8/src/inspector/DEPS | 2 +- deps/v8/src/inspector/string-16.cc | 8 +- deps/v8/src/inspector/v8-console-message.cc | 37 +- deps/v8/src/inspector/v8-console-message.h | 2 + .../src/inspector/v8-debugger-agent-impl.cc | 15 +- .../v8/src/inspector/v8-debugger-agent-impl.h | 5 + deps/v8/src/inspector/v8-debugger-script.cc | 6 - deps/v8/src/inspector/v8-debugger.cc | 79 +- .../inspector/v8-heap-profiler-agent-impl.cc | 1 + deps/v8/src/inspector/v8-inspector-impl.cc | 67 +- deps/v8/src/inspector/v8-inspector-impl.h | 13 +- .../inspector/v8-inspector-session-impl.cc | 4 +- .../src/inspector/v8-inspector-session-impl.h | 2 +- .../src/inspector/v8-profiler-agent-impl.cc | 4 +- .../v8/src/inspector/v8-profiler-agent-impl.h | 2 +- .../v8/src/inspector/v8-runtime-agent-impl.cc | 34 +- deps/v8/src/inspector/v8-runtime-agent-impl.h | 2 +- deps/v8/src/inspector/v8-stack-trace-impl.cc | 5 + deps/v8/src/inspector/value-mirror.cc | 225 +- deps/v8/src/inspector/value-mirror.h | 16 +- .../src/interpreter/bytecode-array-builder.cc | 21 - .../src/interpreter/bytecode-array-builder.h | 13 - .../interpreter/bytecode-array-iterator.cc | 2 +- .../src/interpreter/bytecode-array-writer.cc | 1 - deps/v8/src/interpreter/bytecode-decoder.cc | 1 - deps/v8/src/interpreter/bytecode-generator.cc | 411 ++- deps/v8/src/interpreter/bytecode-generator.h | 5 - deps/v8/src/interpreter/bytecodes.cc | 1 - deps/v8/src/interpreter/bytecodes.h | 17 - .../src/interpreter/control-flow-builders.cc | 44 +- .../src/interpreter/control-flow-builders.h | 47 +- .../src/interpreter/interpreter-assembler.cc | 8 +- .../src/interpreter/interpreter-generator.cc | 98 +- .../src/interpreter/interpreter-generator.h | 5 +- .../interpreter-intrinsics-generator.cc | 138 +- .../src/interpreter/interpreter-intrinsics.h | 43 +- deps/v8/src/interpreter/interpreter.cc | 44 +- deps/v8/src/interpreter/interpreter.h | 12 +- deps/v8/src/json/json-parser.cc | 47 +- deps/v8/src/json/json-parser.h | 14 +- deps/v8/src/json/json-stringifier.cc | 27 +- deps/v8/src/libplatform/OWNERS | 1 - .../src/libplatform/tracing/trace-object.cc | 2 +- .../libplatform/tracing/tracing-controller.cc | 4 +- deps/v8/src/libsampler/sampler.cc | 2 +- deps/v8/src/logging/code-events.h | 4 +- deps/v8/src/logging/counters-definitions.h | 17 +- deps/v8/src/logging/counters.h | 13 +- deps/v8/src/logging/log-utils.cc | 10 +- deps/v8/src/logging/log-utils.h | 10 +- deps/v8/src/logging/log.cc | 50 +- deps/v8/src/logging/log.h | 4 +- deps/v8/src/logging/metrics.cc | 4 +- deps/v8/src/logging/metrics.h | 4 +- .../v8/src/logging/runtime-call-stats-scope.h | 39 + deps/v8/src/logging/runtime-call-stats.h | 32 +- deps/v8/src/numbers/conversions-inl.h | 41 +- deps/v8/src/numbers/conversions.cc | 208 +- deps/v8/src/numbers/conversions.h | 16 +- deps/v8/src/objects/allocation-site-inl.h | 12 +- deps/v8/src/objects/allocation-site.h | 14 +- deps/v8/src/objects/backing-store.cc | 20 +- deps/v8/src/objects/bigint.cc | 912 +---- deps/v8/src/objects/bigint.h | 2 +- deps/v8/src/objects/cell-inl.h | 4 - deps/v8/src/objects/cell.h | 2 - deps/v8/src/objects/code-inl.h | 177 +- deps/v8/src/objects/code.cc | 85 +- deps/v8/src/objects/code.h | 87 +- deps/v8/src/objects/contexts-inl.h | 27 +- deps/v8/src/objects/contexts.cc | 72 +- deps/v8/src/objects/contexts.h | 94 +- deps/v8/src/objects/data-handler.tq | 3 +- deps/v8/src/objects/dictionary-inl.h | 19 + deps/v8/src/objects/dictionary.h | 7 +- deps/v8/src/objects/elements-kind.cc | 6 +- deps/v8/src/objects/elements-kind.h | 16 + deps/v8/src/objects/elements.cc | 41 +- deps/v8/src/objects/feedback-cell-inl.h | 4 +- deps/v8/src/objects/feedback-vector-inl.h | 29 +- deps/v8/src/objects/feedback-vector.cc | 89 +- deps/v8/src/objects/feedback-vector.h | 4 +- deps/v8/src/objects/feedback-vector.tq | 3 +- deps/v8/src/objects/field-index-inl.h | 1 + deps/v8/src/objects/fixed-array-inl.h | 11 +- deps/v8/src/objects/fixed-array.h | 17 +- deps/v8/src/objects/function-kind.h | 3 + deps/v8/src/objects/hash-table-inl.h | 15 +- deps/v8/src/objects/hash-table.h | 8 + deps/v8/src/objects/heap-number-inl.h | 15 +- deps/v8/src/objects/heap-number.h | 7 +- deps/v8/src/objects/heap-number.tq | 4 +- deps/v8/src/objects/heap-object.h | 2 + deps/v8/src/objects/instance-type-inl.h | 7 +- deps/v8/src/objects/instance-type.h | 11 +- deps/v8/src/objects/intl-objects.cc | 48 +- deps/v8/src/objects/js-array-buffer.cc | 53 +- deps/v8/src/objects/js-date-time-format.cc | 21 +- deps/v8/src/objects/js-display-names-inl.h | 14 +- deps/v8/src/objects/js-display-names.cc | 405 +-- deps/v8/src/objects/js-display-names.h | 10 + deps/v8/src/objects/js-display-names.tq | 3 + deps/v8/src/objects/js-function-inl.h | 48 +- deps/v8/src/objects/js-function.cc | 93 +- deps/v8/src/objects/js-function.h | 18 +- deps/v8/src/objects/js-function.tq | 6 +- deps/v8/src/objects/js-list-format.cc | 2 - deps/v8/src/objects/js-locale.cc | 111 +- deps/v8/src/objects/js-objects-inl.h | 55 +- deps/v8/src/objects/js-objects.cc | 162 +- deps/v8/src/objects/js-objects.h | 26 +- deps/v8/src/objects/js-promise-inl.h | 1 + deps/v8/src/objects/js-promise.h | 4 + deps/v8/src/objects/js-promise.tq | 1 + deps/v8/src/objects/js-proxy-inl.h | 3 +- deps/v8/src/objects/js-proxy.h | 2 - deps/v8/src/objects/js-regexp-inl.h | 10 +- deps/v8/src/objects/js-regexp.cc | 17 +- deps/v8/src/objects/js-regexp.h | 1 + deps/v8/src/objects/js-weak-refs-inl.h | 4 + deps/v8/src/objects/js-weak-refs.h | 3 + deps/v8/src/objects/js-weak-refs.tq | 2 +- deps/v8/src/objects/literal-objects.cc | 27 +- deps/v8/src/objects/lookup-cache-inl.h | 4 +- deps/v8/src/objects/lookup-inl.h | 30 +- deps/v8/src/objects/lookup.cc | 194 +- deps/v8/src/objects/lookup.h | 73 +- deps/v8/src/objects/map-inl.h | 97 +- deps/v8/src/objects/map.cc | 34 +- deps/v8/src/objects/map.h | 10 +- deps/v8/src/objects/module-inl.h | 1 - deps/v8/src/objects/name.h | 2 +- deps/v8/src/objects/object-list-macros.h | 2 + deps/v8/src/objects/object-macros.h | 78 +- deps/v8/src/objects/object-type.cc | 55 + deps/v8/src/objects/object-type.h | 40 + .../objects/objects-body-descriptors-inl.h | 63 +- deps/v8/src/objects/objects-inl.h | 43 +- deps/v8/src/objects/objects.cc | 384 +-- deps/v8/src/objects/objects.h | 20 +- deps/v8/src/objects/oddball-inl.h | 1 - .../src/objects/osr-optimized-code-cache.cc | 19 +- deps/v8/src/objects/property-array-inl.h | 8 +- deps/v8/src/objects/property-details.h | 29 +- deps/v8/src/objects/property.cc | 21 + deps/v8/src/objects/prototype-info-inl.h | 9 +- deps/v8/src/objects/prototype-info.h | 3 + deps/v8/src/objects/scope-info.cc | 43 +- deps/v8/src/objects/scope-info.h | 16 +- .../v8/src/objects/shared-function-info-inl.h | 82 +- deps/v8/src/objects/shared-function-info.cc | 23 +- deps/v8/src/objects/shared-function-info.h | 30 +- deps/v8/src/objects/shared-function-info.tq | 10 +- deps/v8/src/objects/smi.h | 15 + deps/v8/src/objects/source-text-module.cc | 3 +- deps/v8/src/objects/stack-frame-info-inl.h | 20 + deps/v8/src/objects/stack-frame-info.cc | 13 +- deps/v8/src/objects/stack-frame-info.h | 2 + deps/v8/src/objects/string-inl.h | 114 +- deps/v8/src/objects/string-table.cc | 57 +- deps/v8/src/objects/string.cc | 129 +- deps/v8/src/objects/string.h | 85 +- deps/v8/src/objects/struct-inl.h | 8 + deps/v8/src/objects/struct.h | 3 + .../src/objects/swiss-name-dictionary-inl.h | 17 + deps/v8/src/objects/swiss-name-dictionary.cc | 1 + deps/v8/src/objects/swiss-name-dictionary.h | 3 + deps/v8/src/objects/tagged-field.h | 2 +- deps/v8/src/objects/template-objects.h | 1 + deps/v8/src/objects/templates-inl.h | 19 +- deps/v8/src/objects/templates.cc | 145 + deps/v8/src/objects/templates.h | 8 +- deps/v8/src/objects/templates.tq | 8 + deps/v8/src/objects/transitions-inl.h | 4 +- deps/v8/src/objects/transitions.cc | 1 - deps/v8/src/objects/transitions.h | 6 + deps/v8/src/objects/value-serializer.cc | 75 +- deps/v8/src/objects/value-serializer.h | 12 +- deps/v8/src/objects/visitors.cc | 1 - deps/v8/src/objects/visitors.h | 1 - deps/v8/src/parsing/literal-buffer.cc | 20 +- deps/v8/src/parsing/literal-buffer.h | 23 +- deps/v8/src/parsing/parse-info.cc | 20 +- deps/v8/src/parsing/parse-info.h | 12 +- deps/v8/src/parsing/parser-base.h | 29 +- deps/v8/src/parsing/parser.cc | 16 +- deps/v8/src/parsing/parser.h | 7 +- .../pending-compilation-error-handler.cc | 2 +- deps/v8/src/parsing/preparse-data-impl.h | 3 +- deps/v8/src/parsing/preparse-data.cc | 8 +- deps/v8/src/parsing/preparse-data.h | 6 +- deps/v8/src/parsing/preparser.cc | 5 +- deps/v8/src/parsing/preparser.h | 16 +- deps/v8/src/parsing/rewriter.cc | 1 + .../src/parsing/scanner-character-streams.cc | 21 +- deps/v8/src/parsing/scanner-inl.h | 11 +- deps/v8/src/parsing/scanner.cc | 64 +- deps/v8/src/parsing/scanner.h | 72 +- deps/v8/src/profiler/OWNERS | 2 - deps/v8/src/profiler/allocation-tracker.cc | 5 +- deps/v8/src/profiler/allocation-tracker.h | 4 +- deps/v8/src/profiler/cpu-profiler-inl.h | 8 +- deps/v8/src/profiler/cpu-profiler.cc | 59 +- deps/v8/src/profiler/cpu-profiler.h | 23 +- .../src/profiler/heap-snapshot-generator.cc | 67 +- deps/v8/src/profiler/profile-generator-inl.h | 3 +- deps/v8/src/profiler/profile-generator.cc | 79 +- deps/v8/src/profiler/profile-generator.h | 106 +- deps/v8/src/profiler/profiler-listener.cc | 84 +- deps/v8/src/profiler/profiler-listener.h | 14 +- deps/v8/src/profiler/strings-storage.cc | 11 +- deps/v8/src/profiler/symbolizer.cc | 8 +- .../regexp/arm/regexp-macro-assembler-arm.cc | 41 +- .../regexp/arm/regexp-macro-assembler-arm.h | 19 +- .../arm64/regexp-macro-assembler-arm64.cc | 45 +- .../arm64/regexp-macro-assembler-arm64.h | 24 +- .../experimental/experimental-bytecode.cc | 5 +- .../experimental/experimental-bytecode.h | 11 +- .../experimental/experimental-compiler.cc | 21 +- .../experimental/experimental-interpreter.cc | 45 +- .../experimental/experimental-interpreter.h | 2 +- .../src/regexp/experimental/experimental.cc | 10 +- deps/v8/src/regexp/gen-regexp-special-case.cc | 7 +- .../ia32/regexp-macro-assembler-ia32.cc | 37 +- .../regexp/ia32/regexp-macro-assembler-ia32.h | 18 +- .../mips/regexp-macro-assembler-mips.cc | 41 +- .../regexp/mips/regexp-macro-assembler-mips.h | 19 +- .../mips64/regexp-macro-assembler-mips64.cc | 43 +- .../mips64/regexp-macro-assembler-mips64.h | 19 +- .../regexp/ppc/regexp-macro-assembler-ppc.cc | 126 +- .../regexp/ppc/regexp-macro-assembler-ppc.h | 15 +- deps/v8/src/regexp/property-sequences.cc | 8 +- deps/v8/src/regexp/property-sequences.h | 7 +- deps/v8/src/regexp/regexp-ast.cc | 2 +- deps/v8/src/regexp/regexp-ast.h | 56 +- .../src/regexp/regexp-bytecode-generator.cc | 20 +- .../v8/src/regexp/regexp-bytecode-generator.h | 15 +- .../v8/src/regexp/regexp-bytecode-peephole.cc | 3 - deps/v8/src/regexp/regexp-bytecodes.h | 19 +- deps/v8/src/regexp/regexp-compiler-tonode.cc | 88 +- deps/v8/src/regexp/regexp-compiler.cc | 151 +- deps/v8/src/regexp/regexp-compiler.h | 7 +- deps/v8/src/regexp/regexp-dotprinter.cc | 11 +- deps/v8/src/regexp/regexp-interpreter.cc | 30 +- .../regexp/regexp-macro-assembler-tracer.cc | 40 +- .../regexp/regexp-macro-assembler-tracer.h | 15 +- deps/v8/src/regexp/regexp-macro-assembler.cc | 12 +- deps/v8/src/regexp/regexp-macro-assembler.h | 32 +- deps/v8/src/regexp/regexp-nodes.h | 11 +- deps/v8/src/regexp/regexp-parser.cc | 156 +- deps/v8/src/regexp/regexp-parser.h | 57 +- deps/v8/src/regexp/regexp-utils.cc | 4 +- deps/v8/src/regexp/regexp.cc | 23 +- .../riscv64/regexp-macro-assembler-riscv64.cc | 88 +- .../riscv64/regexp-macro-assembler-riscv64.h | 40 +- .../s390/regexp-macro-assembler-s390.cc | 15 +- .../regexp/s390/regexp-macro-assembler-s390.h | 15 +- .../regexp/x64/regexp-macro-assembler-x64.cc | 48 +- .../regexp/x64/regexp-macro-assembler-x64.h | 15 +- deps/v8/src/roots/OWNERS | 1 - deps/v8/src/roots/roots-inl.h | 3 +- deps/v8/src/roots/roots.h | 5 +- deps/v8/src/runtime/runtime-array.cc | 9 +- deps/v8/src/runtime/runtime-atomics.cc | 39 +- deps/v8/src/runtime/runtime-classes.cc | 108 +- deps/v8/src/runtime/runtime-compiler.cc | 7 +- deps/v8/src/runtime/runtime-debug.cc | 10 +- deps/v8/src/runtime/runtime-forin.cc | 2 +- deps/v8/src/runtime/runtime-function.cc | 2 +- deps/v8/src/runtime/runtime-internal.cc | 27 +- deps/v8/src/runtime/runtime-literals.cc | 50 +- deps/v8/src/runtime/runtime-object.cc | 42 +- deps/v8/src/runtime/runtime-promise.cc | 9 - deps/v8/src/runtime/runtime-proxy.cc | 4 +- deps/v8/src/runtime/runtime-regexp.cc | 55 +- deps/v8/src/runtime/runtime-scopes.cc | 4 +- deps/v8/src/runtime/runtime-strings.cc | 2 +- deps/v8/src/runtime/runtime-test-wasm.cc | 22 +- deps/v8/src/runtime/runtime-test.cc | 56 +- deps/v8/src/runtime/runtime-trace.cc | 7 +- deps/v8/src/runtime/runtime-wasm.cc | 70 +- deps/v8/src/runtime/runtime.cc | 4 +- deps/v8/src/runtime/runtime.h | 23 +- deps/v8/src/snapshot/code-serializer.cc | 5 +- deps/v8/src/snapshot/code-serializer.h | 6 +- deps/v8/src/snapshot/context-serializer.cc | 1 + deps/v8/src/snapshot/deserializer.cc | 32 +- deps/v8/src/snapshot/deserializer.h | 16 +- .../v8/src/snapshot/embedded/embedded-data.cc | 127 +- deps/v8/src/snapshot/embedded/embedded-data.h | 16 +- .../embedded/embedded-file-writer-interface.h | 2 +- .../snapshot/embedded/embedded-file-writer.cc | 68 +- .../snapshot/embedded/embedded-file-writer.h | 27 +- .../platform-embedded-file-writer-base.cc | 31 +- .../platform-embedded-file-writer-base.h | 1 + .../platform-embedded-file-writer-win.cc | 37 +- deps/v8/src/snapshot/mksnapshot.cc | 15 +- deps/v8/src/snapshot/read-only-serializer.cc | 4 +- deps/v8/src/snapshot/serializer.cc | 41 +- deps/v8/src/snapshot/serializer.h | 6 +- deps/v8/src/snapshot/snapshot-compression.cc | 2 +- deps/v8/src/snapshot/snapshot-compression.h | 4 +- deps/v8/src/snapshot/snapshot-data.cc | 4 +- deps/v8/src/snapshot/snapshot-data.h | 10 +- deps/v8/src/snapshot/snapshot-source-sink.h | 10 +- deps/v8/src/snapshot/snapshot-utils.cc | 2 +- deps/v8/src/snapshot/snapshot-utils.h | 5 +- deps/v8/src/snapshot/snapshot.cc | 66 +- deps/v8/src/snapshot/startup-serializer.cc | 27 +- deps/v8/src/strings/char-predicates-inl.h | 48 +- deps/v8/src/strings/char-predicates.cc | 6 +- deps/v8/src/strings/char-predicates.h | 55 +- deps/v8/src/strings/string-builder-inl.h | 12 +- deps/v8/src/strings/string-builder.cc | 13 +- deps/v8/src/strings/string-hasher-inl.h | 4 +- deps/v8/src/strings/string-hasher.h | 5 +- deps/v8/src/strings/string-search.h | 65 +- deps/v8/src/strings/string-stream.cc | 19 +- deps/v8/src/strings/string-stream.h | 22 +- deps/v8/src/strings/unicode-decoder.cc | 8 +- deps/v8/src/strings/unicode-decoder.h | 7 +- deps/v8/src/strings/uri.cc | 97 +- deps/v8/src/tasks/OWNERS | 1 - deps/v8/src/tasks/operations-barrier.cc | 2 +- deps/v8/src/tasks/operations-barrier.h | 4 +- deps/v8/src/torque/cpp-builder.cc | 153 + deps/v8/src/torque/cpp-builder.h | 239 ++ deps/v8/src/torque/csa-generator.cc | 6 +- deps/v8/src/torque/global-context.h | 11 +- deps/v8/src/torque/implementation-visitor.cc | 752 ++-- deps/v8/src/torque/implementation-visitor.h | 19 +- .../src/torque/ls/torque-language-server.cc | 1 - deps/v8/src/torque/torque-compiler.h | 3 + deps/v8/src/torque/torque-parser.cc | 1 + deps/v8/src/torque/torque.cc | 10 +- deps/v8/src/tracing/trace-event.h | 2 +- deps/v8/src/tracing/traced-value.cc | 10 +- .../src/trap-handler/handler-inside-posix.cc | 82 +- deps/v8/src/utils/allocation.cc | 9 +- deps/v8/src/utils/identity-map.cc | 5 +- deps/v8/src/utils/memcopy.cc | 10 +- deps/v8/src/utils/memcopy.h | 12 +- deps/v8/src/utils/ostreams.h | 3 +- deps/v8/src/utils/scoped-list.h | 11 +- deps/v8/src/utils/utils.cc | 101 +- deps/v8/src/utils/utils.h | 112 +- deps/v8/src/utils/version.cc | 13 +- deps/v8/src/utils/version.h | 9 +- .../wasm/baseline/arm/liftoff-assembler-arm.h | 52 +- .../baseline/arm64/liftoff-assembler-arm64.h | 117 +- .../baseline/ia32/liftoff-assembler-ia32.h | 39 +- .../v8/src/wasm/baseline/liftoff-assembler.cc | 113 +- deps/v8/src/wasm/baseline/liftoff-assembler.h | 95 +- deps/v8/src/wasm/baseline/liftoff-compiler.cc | 828 +++-- deps/v8/src/wasm/baseline/liftoff-compiler.h | 9 +- .../baseline/mips/liftoff-assembler-mips.h | 27 +- .../mips64/liftoff-assembler-mips64.h | 29 +- .../wasm/baseline/ppc/liftoff-assembler-ppc.h | 535 ++- .../riscv64/liftoff-assembler-riscv64.h | 92 +- .../baseline/s390/liftoff-assembler-s390.h | 85 +- .../wasm/baseline/x64/liftoff-assembler-x64.h | 40 +- deps/v8/src/wasm/c-api.cc | 234 +- deps/v8/src/wasm/code-space-access.cc | 74 + deps/v8/src/wasm/code-space-access.h | 85 +- deps/v8/src/wasm/compilation-environment.h | 45 +- deps/v8/src/wasm/decoder.h | 12 +- deps/v8/src/wasm/function-body-decoder-impl.h | 1911 ++++++----- deps/v8/src/wasm/function-body-decoder.cc | 25 +- deps/v8/src/wasm/function-body-decoder.h | 10 +- deps/v8/src/wasm/function-compiler.cc | 165 +- deps/v8/src/wasm/function-compiler.h | 47 +- deps/v8/src/wasm/graph-builder-interface.cc | 194 +- deps/v8/src/wasm/init-expr-interface.cc | 143 + deps/v8/src/wasm/init-expr-interface.h | 97 + deps/v8/src/wasm/leb-helper.h | 8 +- deps/v8/src/wasm/local-decl-encoder.cc | 2 +- deps/v8/src/wasm/memory-protection-key.cc | 11 +- deps/v8/src/wasm/memory-protection-key.h | 7 +- deps/v8/src/wasm/memory-tracing.cc | 16 +- deps/v8/src/wasm/module-compiler.cc | 596 ++-- deps/v8/src/wasm/module-compiler.h | 11 +- deps/v8/src/wasm/module-decoder.cc | 423 +-- deps/v8/src/wasm/module-decoder.h | 21 +- deps/v8/src/wasm/module-instantiate.cc | 688 ++-- deps/v8/src/wasm/streaming-decoder.cc | 87 +- deps/v8/src/wasm/streaming-decoder.h | 26 +- deps/v8/src/wasm/struct-types.h | 3 + deps/v8/src/wasm/sync-streaming-decoder.cc | 7 +- deps/v8/src/wasm/value-type.h | 16 + deps/v8/src/wasm/wasm-code-manager.cc | 453 +-- deps/v8/src/wasm/wasm-code-manager.h | 366 +- deps/v8/src/wasm/wasm-debug.cc | 83 +- deps/v8/src/wasm/wasm-debug.h | 8 +- deps/v8/src/wasm/wasm-engine.cc | 135 +- deps/v8/src/wasm/wasm-engine.h | 33 +- deps/v8/src/wasm/wasm-external-refs.cc | 4 +- deps/v8/src/wasm/wasm-feature-flags.h | 5 + deps/v8/src/wasm/wasm-import-wrapper-cache.cc | 12 +- deps/v8/src/wasm/wasm-import-wrapper-cache.h | 3 + deps/v8/src/wasm/wasm-init-expr.cc | 84 +- deps/v8/src/wasm/wasm-init-expr.h | 67 +- deps/v8/src/wasm/wasm-js.cc | 147 +- deps/v8/src/wasm/wasm-limits.h | 23 +- deps/v8/src/wasm/wasm-module-builder.cc | 85 +- deps/v8/src/wasm/wasm-module-builder.h | 44 +- deps/v8/src/wasm/wasm-module.cc | 19 +- deps/v8/src/wasm/wasm-module.h | 43 +- deps/v8/src/wasm/wasm-objects-inl.h | 322 +- deps/v8/src/wasm/wasm-objects.cc | 184 +- deps/v8/src/wasm/wasm-objects.h | 283 +- deps/v8/src/wasm/wasm-objects.tq | 56 +- deps/v8/src/wasm/wasm-opcodes-inl.h | 13 +- deps/v8/src/wasm/wasm-opcodes.h | 71 +- deps/v8/src/wasm/wasm-result.cc | 13 +- deps/v8/src/wasm/wasm-serialization.cc | 68 +- deps/v8/src/wasm/wasm-serialization.h | 8 +- deps/v8/src/wasm/wasm-value.h | 106 +- deps/v8/src/web-snapshot/OWNERS | 1 + deps/v8/src/web-snapshot/web-snapshot.cc | 416 ++- deps/v8/src/web-snapshot/web-snapshot.h | 48 +- deps/v8/src/zone/zone-handle-set.h | 4 +- deps/v8/src/zone/zone-list-inl.h | 8 +- deps/v8/src/zone/zone-list.h | 21 +- deps/v8/src/zone/zone-utils.h | 8 +- deps/v8/src/zone/zone.cc | 3 - deps/v8/test/BUILD.gn | 1 + deps/v8/test/benchmarks/benchmarks.status | 22 +- deps/v8/test/benchmarks/csuite/run-kraken.js | 4 +- .../csuite/sunspider-standalone-driver.js | 2 +- deps/v8/test/bigint/BUILD.gn | 29 + deps/v8/test/bigint/DEPS | 3 + deps/v8/test/bigint/bigint-shell.cc | 366 ++ deps/v8/test/bigint/bigint.status | 5 + deps/v8/test/bigint/testcfg.py | 63 + deps/v8/test/cctest/BUILD.gn | 5 +- deps/v8/test/cctest/cctest-utils.h | 1 + deps/v8/test/cctest/cctest.cc | 16 +- deps/v8/test/cctest/cctest.status | 119 +- deps/v8/test/cctest/collector.h | 34 +- .../cctest/compiler/code-assembler-tester.h | 4 +- .../v8/test/cctest/compiler/codegen-tester.cc | 2 +- deps/v8/test/cctest/compiler/codegen-tester.h | 3 +- .../test/cctest/compiler/serializer-tester.cc | 362 +- .../test/cctest/compiler/serializer-tester.h | 15 +- .../test-calls-with-arraylike-or-spread.cc | 131 + .../cctest/compiler/test-code-generator.cc | 16 +- .../cctest/compiler/test-js-constant-cache.cc | 22 +- .../test-js-context-specialization.cc | 14 +- deps/v8/test/cctest/compiler/test-linkage.cc | 10 +- .../cctest/compiler/test-multiple-return.cc | 13 +- .../test-run-bytecode-graph-builder.cc | 139 +- .../cctest/compiler/test-run-intrinsics.cc | 56 - .../test/cctest/compiler/test-run-jscalls.cc | 15 - .../test/cctest/compiler/test-run-machops.cc | 85 +- .../cctest/compiler/test-run-native-calls.cc | 2 +- .../cctest/compiler/test-run-variables.cc | 2 +- .../test/cctest/compiler/test-verify-type.cc | 1 - deps/v8/test/cctest/compiler/value-helper.h | 60 +- deps/v8/test/cctest/disasm-regex-helper.cc | 2 +- deps/v8/test/cctest/gay-fixed.cc | 6 +- deps/v8/test/cctest/gay-fixed.h | 6 +- deps/v8/test/cctest/gay-precision.cc | 5 +- deps/v8/test/cctest/gay-precision.h | 6 +- deps/v8/test/cctest/gay-shortest.cc | 5 +- deps/v8/test/cctest/gay-shortest.h | 8 +- deps/v8/test/cctest/heap/test-alloc.cc | 4 +- deps/v8/test/cctest/heap/test-compaction.cc | 2 +- deps/v8/test/cctest/heap/test-heap.cc | 477 ++- .../cctest/heap/test-memory-measurement.cc | 5 +- deps/v8/test/cctest/heap/test-shared-heap.cc | 149 +- deps/v8/test/cctest/heap/test-spaces.cc | 7 +- .../test/cctest/heap/test-weak-references.cc | 8 +- .../bytecode-expectations-printer.cc | 1 - .../bytecode-expectations-printer.h | 5 - ...FEWithoutOneshotOpt.golden => IIFE.golden} | 0 .../IIFEWithOneshotOpt.golden | 790 ----- .../PrivateAccessorAccess.golden | 8 +- .../PrivateMethodAccess.golden | 4 +- ...neShot.golden => PropertyLoadStore.golden} | 0 .../PropertyLoadStoreOneShot.golden | 377 -- .../StaticPrivateMethodAccess.golden | 20 +- .../generate-bytecode-expectations.cc | 11 - .../interpreter/source-position-matcher.cc | 2 - .../interpreter/test-bytecode-generator.cc | 268 +- .../test-interpreter-intrinsics.cc | 105 - .../cctest/interpreter/test-interpreter.cc | 29 +- .../cctest/libsampler/signals-and-mutexes.cc | 160 + deps/v8/test/cctest/parsing/test-preparser.cc | 7 +- .../cctest/parsing/test-scanner-streams.cc | 37 +- .../v8/test/cctest/test-accessor-assembler.cc | 3 +- deps/v8/test/cctest/test-api-accessors.cc | 1 - deps/v8/test/cctest/test-api-array-buffer.cc | 9 +- deps/v8/test/cctest/test-api-interceptors.cc | 31 + deps/v8/test/cctest/test-api-stack-traces.cc | 26 +- deps/v8/test/cctest/test-api-typed-array.cc | 78 +- deps/v8/test/cctest/test-api.cc | 345 +- deps/v8/test/cctest/test-api.h | 4 +- deps/v8/test/cctest/test-assembler-arm.cc | 73 +- deps/v8/test/cctest/test-assembler-ia32.cc | 8 +- deps/v8/test/cctest/test-assembler-riscv64.cc | 94 + deps/v8/test/cctest/test-assembler-x64.cc | 11 +- deps/v8/test/cctest/test-bignum-dtoa.cc | 12 +- deps/v8/test/cctest/test-bignum.cc | 9 +- .../test/cctest/test-code-stub-assembler.cc | 51 +- deps/v8/test/cctest/test-compiler.cc | 11 +- .../test-concurrent-script-context-table.cc | 2 +- deps/v8/test/cctest/test-concurrent-string.cc | 186 + deps/v8/test/cctest/test-cpu-profiler.cc | 142 +- deps/v8/test/cctest/test-debug.cc | 105 +- deps/v8/test/cctest/test-deoptimization.cc | 13 +- deps/v8/test/cctest/test-descriptor-array.cc | 2 +- deps/v8/test/cctest/test-disasm-arm.cc | 22 +- deps/v8/test/cctest/test-disasm-mips.cc | 2 +- deps/v8/test/cctest/test-disasm-mips64.cc | 2 +- deps/v8/test/cctest/test-disasm-ppc.cc | 2 +- deps/v8/test/cctest/test-disasm-riscv64.cc | 11 +- deps/v8/test/cctest/test-disasm-s390.cc | 2 +- deps/v8/test/cctest/test-diy-fp.cc | 9 +- deps/v8/test/cctest/test-double.cc | 11 +- deps/v8/test/cctest/test-dtoa.cc | 26 +- deps/v8/test/cctest/test-factory.cc | 4 +- deps/v8/test/cctest/test-fast-dtoa.cc | 13 +- deps/v8/test/cctest/test-feedback-vector.cc | 104 +- deps/v8/test/cctest/test-feedback-vector.h | 2 +- .../test/cctest/test-field-type-tracking.cc | 115 +- deps/v8/test/cctest/test-fixed-dtoa.cc | 11 +- .../test/cctest/test-func-name-inference.cc | 8 +- deps/v8/test/cctest/test-heap-profiler.cc | 109 +- deps/v8/test/cctest/test-identity-map.cc | 4 +- .../test-ignition-statistics-extension.cc | 129 + .../cctest/test-inobject-slack-tracking.cc | 2 +- deps/v8/test/cctest/test-js-to-wasm.cc | 5 +- deps/v8/test/cctest/test-js-weak-refs.cc | 12 +- deps/v8/test/cctest/test-log-stack-tracer.cc | 15 +- deps/v8/test/cctest/test-log.cc | 65 +- .../test/cctest/test-macro-assembler-arm.cc | 4 +- .../test/cctest/test-macro-assembler-arm64.cc | 4 +- .../test/cctest/test-macro-assembler-mips.cc | 4 +- .../cctest/test-macro-assembler-mips64.cc | 5 +- .../cctest/test-macro-assembler-riscv64.cc | 18 +- .../test/cctest/test-macro-assembler-x64.cc | 4 +- deps/v8/test/cctest/test-object.cc | 2 +- deps/v8/test/cctest/test-parsing.cc | 89 +- deps/v8/test/cctest/test-profile-generator.cc | 91 +- deps/v8/test/cctest/test-regexp.cc | 96 +- deps/v8/test/cctest/test-sampler-api.cc | 4 +- deps/v8/test/cctest/test-serialize.cc | 142 +- deps/v8/test/cctest/test-strings.cc | 78 +- deps/v8/test/cctest/test-strtod.cc | 22 +- .../cctest/test-swiss-name-dictionary-csa.cc | 6 +- deps/v8/test/cctest/test-transitions.cc | 4 +- deps/v8/test/cctest/test-types.cc | 7 +- .../test/cctest/test-unwinder-code-pages.cc | 8 +- deps/v8/test/cctest/test-utils.cc | 19 +- deps/v8/test/cctest/test-version.cc | 4 +- deps/v8/test/cctest/test-web-snapshots.cc | 96 +- deps/v8/test/cctest/wasm/test-c-wasm-entry.cc | 13 +- .../cctest/wasm/test-compilation-cache.cc | 40 +- deps/v8/test/cctest/wasm/test-gc.cc | 425 ++- deps/v8/test/cctest/wasm/test-grow-memory.cc | 2 +- .../cctest/wasm/test-jump-table-assembler.cc | 1 + .../cctest/wasm/test-liftoff-for-fuzzing.cc | 85 + .../cctest/wasm/test-liftoff-inspection.cc | 19 +- deps/v8/test/cctest/wasm/test-run-wasm-64.cc | 4 +- .../test/cctest/wasm/test-run-wasm-atomics.cc | 9 +- .../cctest/wasm/test-run-wasm-atomics64.cc | 9 +- .../cctest/wasm/test-run-wasm-bulk-memory.cc | 40 +- .../cctest/wasm/test-run-wasm-exceptions.cc | 144 +- deps/v8/test/cctest/wasm/test-run-wasm-js.cc | 2 +- .../cctest/wasm/test-run-wasm-memory64.cc | 5 +- .../test/cctest/wasm/test-run-wasm-module.cc | 21 +- .../cctest/wasm/test-run-wasm-relaxed-simd.cc | 16 +- .../cctest/wasm/test-run-wasm-simd-liftoff.cc | 16 +- .../v8/test/cctest/wasm/test-run-wasm-simd.cc | 274 +- .../cctest/wasm/test-run-wasm-wrappers.cc | 14 +- deps/v8/test/cctest/wasm/test-run-wasm.cc | 159 +- .../cctest/wasm/test-streaming-compilation.cc | 20 +- .../test/cctest/wasm/test-wasm-breakpoints.cc | 22 +- .../wasm/test-wasm-import-wrapper-cache.cc | 27 +- deps/v8/test/cctest/wasm/test-wasm-metrics.cc | 26 +- .../cctest/wasm/test-wasm-serialization.cc | 21 +- .../cctest/wasm/test-wasm-shared-engine.cc | 14 +- deps/v8/test/cctest/wasm/wasm-run-utils.cc | 85 +- deps/v8/test/cctest/wasm/wasm-run-utils.h | 49 +- deps/v8/test/cctest/wasm/wasm-simd-utils.cc | 54 +- deps/v8/test/common/flag-utils.h | 12 +- deps/v8/test/common/wasm/wasm-interpreter.cc | 147 +- deps/v8/test/common/wasm/wasm-macro-gen.h | 47 +- .../v8/test/common/wasm/wasm-module-runner.cc | 38 +- deps/v8/test/common/wasm/wasm-module-runner.h | 8 +- .../debug/debug-allscopes-on-debugger.js | 2 +- .../debugger/debug/debug-break-microtask.js | 2 +- .../test/debugger/debug/debug-break-native.js | 2 +- .../test/debugger/debug/debug-constructor.js | 2 +- .../debugger/debug/debug-multiple-var-decl.js | 2 +- .../test/debugger/debug/debug-return-value.js | 2 +- .../debug/debug-step-end-of-script.js | 2 +- .../debugger/debug/debug-step-into-json.js | 2 +- .../debugger/debug/debug-step-into-valueof.js | 2 +- .../debugger/debug/debug-step-microtask.js | 2 +- .../debug/debug-step-stub-callfunction.js | 2 +- .../debugger/debug/debug-step-turbofan.js | 2 +- deps/v8/test/debugger/debug/debug-step.js | 2 +- .../debug/debug-stepin-accessor-ic.js | 2 +- .../debugger/debug/debug-stepin-accessor.js | 2 +- .../debug-stepin-builtin-callback-opt.js | 2 +- .../debug/debug-stepin-builtin-callback.js | 2 +- .../debugger/debug/debug-stepin-builtin.js | 2 +- .../debug/debug-stepin-call-function-stub.js | 2 +- .../debug/debug-stepin-construct-call.js | 2 +- .../debug/debug-stepin-constructor.js | 2 +- .../debugger/debug/debug-stepin-foreach.js | 2 +- .../debug/debug-stepin-function-call.js | 2 +- .../debug-stepin-property-function-call.js | 2 +- .../debugger/debug/debug-stepnext-do-while.js | 2 +- .../debug/debug-stepout-scope-part1.js | 2 +- .../debug/debug-stepout-scope-part2.js | 2 +- .../debug/debug-stepout-scope-part3.js | 2 +- .../debug/debug-stepout-scope-part4.js | 2 +- .../debug/debug-stepout-scope-part5.js | 2 +- .../debug/debug-stepout-scope-part6.js | 2 +- .../debug/debug-stepout-scope-part7.js | 2 +- .../debug/debug-stepout-scope-part8.js | 2 +- .../es6/debug-break-default-constructor.js | 2 +- .../debug-evaluate-receiver-before-super.js | 2 +- .../es6/debug-promises/stepin-constructor.js | 2 +- .../es6/debug-promises/stepin-handler.js | 2 +- .../debug-step-destructuring-assignment.js | 4 +- .../es6/debug-step-destructuring-bind.js | 4 +- .../es6/debug-step-into-class-extends.js | 2 +- .../debug/es6/debug-step-into-constructor.js | 2 +- .../es6/debug-step-into-regexp-subclass.js | 2 +- .../es6/debug-stepin-collections-foreach.js | 2 +- .../es6/debug-stepin-default-parameters.js | 2 +- .../debug/es6/debug-stepin-generators.js | 2 +- .../debug/es6/debug-stepin-microtasks.js | 4 +- .../debug/es6/debug-stepin-proxies.js | 2 +- .../debug/es6/debug-stepin-string-template.js | 2 +- .../debugger/debug/es6/debug-stepnext-for.js | 2 +- .../debug/es6/debug-stepnext-generators.js | 4 +- .../debug/es6/regress/regress-468661.js | 2 +- .../es8/async-debug-step-abort-at-break.js | 8 +- .../es8/async-debug-step-continue-at-break.js | 6 +- .../debug/es8/async-debug-step-in-and-out.js | 4 +- .../debug/es8/async-debug-step-in-out-out.js | 4 +- .../debugger/debug/es8/async-debug-step-in.js | 12 +- .../debug/es8/async-debug-step-nested.js | 8 +- .../es8/async-debug-step-next-constant.js | 4 +- .../debug/es8/async-debug-step-next.js | 4 +- .../debug/es8/async-debug-step-out.js | 2 +- .../debug/ignition/debug-scope-on-return.js | 2 +- .../ignition/debug-step-prefix-bytecodes.js | 2 +- .../debug/ignition/elided-instruction.js | 2 +- .../debug/regress/debug-prepare-step-in.js | 2 +- .../debugger/debug/regress/regress-109195.js | 2 +- .../debugger/debug/regress/regress-147497.js | 2 +- .../debugger/debug/regress/regress-1639.js | 2 +- .../debugger/debug/regress/regress-269.js | 2 +- .../debug/regress/regress-crbug-119800.js | 2 +- .../debug/regress/regress-crbug-405922.js | 4 +- .../debug/regress/regress-crbug-409614.js | 2 +- .../debug/regress/regress-crbug-467180.js | 2 +- .../debug/regress/regress-crbug-568477-1.js | 2 +- .../debug/regress/regress-crbug-568477-2.js | 2 +- .../debug/regress/regress-crbug-568477-3.js | 2 +- .../debug/regress/regress-crbug-568477-4.js | 2 +- .../debug/regress/regress-crbug-621361.js | 2 +- .../test/debugger/debug/wasm/breakpoints.js | 2 +- .../debug-enabled-tier-down-wasm-streaming.js | 2 +- ...bled-tier-down-wasm-unsupported-liftoff.js | 2 +- .../wasm/debug-enabled-tier-down-wasm.js | 2 +- .../debug/wasm/debug-step-into-wasm.js | 4 +- .../debugger/debug/wasm/frame-inspection.js | 2 +- .../debugger/debug/wasm/stepping-from-js.js | 4 +- deps/v8/test/debugger/debugger.status | 14 +- deps/v8/test/debugger/regress/regress-5610.js | 6 +- .../test/debugger/regress/regress-5901-1.js | 2 +- deps/v8/test/debugger/regress/regress-6085.js | 2 +- .../debugger/regress/regress-crbug-1032042.js | 2 +- .../debugger/regress/regress-crbug-724858.js | 6 +- .../debugger/regress/regress-crbug-835973.js | 2 +- .../debugger/regress/regress-crbug-840288.js | 2 +- deps/v8/test/debugger/test-api.js | 8 +- .../wasm/gdb-server/test_files/test_basic.js | 2 +- .../wasm/gdb-server/test_files/test_float.js | 2 +- .../wasm/gdb-server/test_files/test_memory.js | 2 +- .../wasm/gdb-server/test_files/test_trap.js | 2 +- deps/v8/test/fuzzer/fuzzer-support.cc | 2 +- deps/v8/test/fuzzer/inspector-fuzzer.cc | 4 +- deps/v8/test/fuzzer/multi-return.cc | 6 +- deps/v8/test/fuzzer/parser.cc | 2 +- deps/v8/test/fuzzer/regexp.cc | 17 +- deps/v8/test/fuzzer/wasm-async.cc | 2 +- deps/v8/test/fuzzer/wasm-code.cc | 18 +- deps/v8/test/fuzzer/wasm-compile.cc | 239 +- deps/v8/test/fuzzer/wasm-fuzzer-common.cc | 294 +- deps/v8/test/fuzzer/wasm-fuzzer-common.h | 17 +- deps/v8/test/fuzzer/wasm.cc | 2 +- ...et-possible-breakpoints-main-expected.txt} | 0 ...er.js => get-possible-breakpoints-main.js} | 0 .../inspector/debugger/step-into-expected.txt | 25 + .../debugger/step-out-async-await.js | 2 +- .../stepping-async-generator-expected.txt | 32 + .../debugger/stepping-async-generator.js | 87 + .../debugger/stepping-generator-expected.txt | 32 + ...stepping-generator-parameters-expected.txt | 32 + .../debugger/stepping-generator-parameters.js | 86 + .../inspector/debugger/stepping-generator.js | 87 + .../wasm-evaluate-on-call-frame-expected.txt | 13 + .../debugger/wasm-evaluate-on-call-frame.js | 49 +- .../wasm-externref-global-expected.txt | 5 +- .../debugger/wasm-externref-global.js | 7 +- .../debugger/wasm-gc-breakpoints-expected.txt | 6 +- .../inspector/debugger/wasm-gc-breakpoints.js | 21 +- .../debugger/wasm-scope-info-expected.txt | 66 +- deps/v8/test/inspector/inspector-test.cc | 24 +- deps/v8/test/inspector/inspector.status | 22 +- deps/v8/test/inspector/isolate-data.cc | 9 +- deps/v8/test/inspector/isolate-data.h | 5 +- .../regress-crbug-1081162-expected.txt | 13 + .../regress/regress-crbug-1081162.js | 30 + .../regress-crbug-1222065-expected.txt | 13 + .../regress/regress-crbug-1222065.js | 46 + .../regress-crbug-1233401-expected.txt | 73 + .../regress/regress-crbug-1233401.js | 54 + ...-function-on-side-effect-free-expected.txt | 9 + .../call-function-on-side-effect-free.js | 31 + .../exception-thrown-metadata-expected.txt | 171 + .../runtime/exception-thrown-metadata.js | 13 + .../runtime/remote-object-expected.txt | 12 + .../test/inspector/runtime/remote-object.js | 5 + deps/v8/test/inspector/task-runner.cc | 1 - deps/v8/test/inspector/task-runner.h | 2 +- deps/v8/test/inspector/wasm-inspector-test.js | 24 + deps/v8/test/intl/assert.js | 9 + .../date-format/timezone-name-extended.js | 61 + deps/v8/test/intl/displaynames/calendar-v2.js | 20 + .../intl/displaynames/constructor-order-v2.js | 30 + .../test/intl/displaynames/constructor-v2.js | 21 + .../intl/displaynames/date-time-field-v2.js | 18 + .../intl/displaynames/resolved-options-v2.js | 58 + deps/v8/test/intl/intl.status | 7 + deps/v8/test/intl/locale/locale-calendars.js | 20 + deps/v8/test/intl/locale/locale-collations.js | 21 + .../intl/locale/locale-info-no-undefined.js | 30 + .../locale/locale-info-timezones-sorted.js | 27 + .../intl/locale/locale-numberingSystems.js | 20 + .../localematcher/bestfit-known-locales.js | 39 + .../localematcher/bestfit-macrolanguages.js | 56 + .../bestfit-supplemental-files.js | 46 + .../bestfit-supportedLocalesOf-subset.js | 38 + deps/v8/test/js-perf-test/Array/run.js | 32 +- .../test/js-perf-test/ArrayInOperator/run.js | 2 +- .../ArrayIndexOfIncludesPolymorphic/run.js | 4 +- .../run.js | 2 +- .../run.js | 2 +- .../run.js | 2 +- .../run.js | 2 +- .../run.js | 2 +- .../run.js | 2 +- .../run.js | 2 +- .../run.js | 2 +- .../run.js | 2 +- .../run.js | 2 +- .../run.js | 2 +- .../run.js | 2 +- .../js-perf-test/ArrayLiteralSpread/run.js | 2 +- deps/v8/test/js-perf-test/ArraySort/run.js | 4 +- .../ArraySort/sort-cmpfn-kindchange.js | 2 +- .../test/js-perf-test/ArraySort/sort-cmpfn.js | 2 +- .../js-perf-test/ArraySort/sort-lengths.js | 2 +- .../ArraySort/sort-megamorphic.js | 2 +- .../js-perf-test/ArraySort/sort-presorted.js | 2 +- deps/v8/test/js-perf-test/ArraySort/sort.js | 2 +- deps/v8/test/js-perf-test/AsyncAwait/run.js | 8 +- deps/v8/test/js-perf-test/BigInt/add.js | 2 +- deps/v8/test/js-perf-test/BigInt/as-uint-n.js | 2 +- deps/v8/test/js-perf-test/BigInt/run.js | 4 +- deps/v8/test/js-perf-test/BigInt/subtract.js | 2 +- .../test/js-perf-test/BytecodeHandlers/run.js | 4 +- deps/v8/test/js-perf-test/Classes/run.js | 8 +- deps/v8/test/js-perf-test/Closures/run.js | 4 +- deps/v8/test/js-perf-test/Collections/run.js | 12 +- deps/v8/test/js-perf-test/DataView/run.js | 4 +- deps/v8/test/js-perf-test/Dates/run.js | 4 +- deps/v8/test/js-perf-test/Exceptions/run.js | 4 +- deps/v8/test/js-perf-test/ForLoops/run.js | 4 +- deps/v8/test/js-perf-test/Generators/run.js | 4 +- deps/v8/test/js-perf-test/IC/run.js | 4 +- deps/v8/test/js-perf-test/Inspector/run.js | 6 +- .../InterpreterEntryTrampoline/run.js | 4 +- deps/v8/test/js-perf-test/Intl/run.js | 4 +- deps/v8/test/js-perf-test/Iterators/run.js | 4 +- deps/v8/test/js-perf-test/Keys/run.js | 4 +- deps/v8/test/js-perf-test/ManyClosures/run.js | 4 +- deps/v8/test/js-perf-test/Modules/run.js | 2 +- deps/v8/test/js-perf-test/Numbers/run.js | 8 +- deps/v8/test/js-perf-test/Object/run.js | 10 +- deps/v8/test/js-perf-test/ObjectFreeze/run.js | 14 +- .../js-perf-test/ObjectLiteralSpread/run.js | 2 +- deps/v8/test/js-perf-test/Operators/run.js | 4 +- deps/v8/test/js-perf-test/Parsing/run.js | 8 +- .../test/js-perf-test/PropertyQueries/run.js | 4 +- deps/v8/test/js-perf-test/Proxies/run.js | 4 +- deps/v8/test/js-perf-test/RegExp/base_exec.js | 2 +- .../v8/test/js-perf-test/RegExp/base_match.js | 2 +- .../test/js-perf-test/RegExp/base_replace.js | 2 +- .../test/js-perf-test/RegExp/base_search.js | 2 +- .../v8/test/js-perf-test/RegExp/base_split.js | 2 +- deps/v8/test/js-perf-test/RegExp/base_test.js | 2 +- deps/v8/test/js-perf-test/RegExp/ctor.js | 4 +- deps/v8/test/js-perf-test/RegExp/exec.js | 4 +- deps/v8/test/js-perf-test/RegExp/flags.js | 4 +- deps/v8/test/js-perf-test/RegExp/match.js | 4 +- deps/v8/test/js-perf-test/RegExp/replace.js | 4 +- deps/v8/test/js-perf-test/RegExp/run.js | 40 +- deps/v8/test/js-perf-test/RegExp/search.js | 4 +- deps/v8/test/js-perf-test/RegExp/slow_exec.js | 4 +- .../v8/test/js-perf-test/RegExp/slow_flags.js | 4 +- .../v8/test/js-perf-test/RegExp/slow_match.js | 4 +- .../test/js-perf-test/RegExp/slow_replace.js | 4 +- .../test/js-perf-test/RegExp/slow_search.js | 4 +- .../v8/test/js-perf-test/RegExp/slow_split.js | 4 +- deps/v8/test/js-perf-test/RegExp/slow_test.js | 4 +- deps/v8/test/js-perf-test/RegExp/split.js | 4 +- deps/v8/test/js-perf-test/RegExp/test.js | 4 +- .../test/js-perf-test/RestParameters/run.js | 4 +- deps/v8/test/js-perf-test/Scope/run.js | 4 +- deps/v8/test/js-perf-test/SixSpeed/run.js | 4 +- deps/v8/test/js-perf-test/SpreadCalls/run.js | 4 +- .../js-perf-test/SpreadCallsGeneral/run.js | 2 +- deps/v8/test/js-perf-test/StackTrace/run.js | 6 +- .../test/js-perf-test/StringIterators/run.js | 4 +- deps/v8/test/js-perf-test/Strings/run.js | 4 +- ...ompare-super-and-normal-property-access.js | 2 +- .../test/js-perf-test/SwitchStatements/run.js | 25 + .../SwitchStatements/switch_statement.js | 29 + deps/v8/test/js-perf-test/Templates/run.js | 4 +- deps/v8/test/js-perf-test/TurboFan/run.js | 4 +- .../js-perf-test/TypedArrays/join-bigint.js | 2 +- .../js-perf-test/TypedArrays/join-float.js | 2 +- .../test/js-perf-test/TypedArrays/join-int.js | 2 +- .../TypedArrays/join-sep-bigint.js | 2 +- .../TypedArrays/join-sep-float.js | 2 +- .../js-perf-test/TypedArrays/join-sep-int.js | 2 +- deps/v8/test/js-perf-test/TypedArrays/join.js | 2 +- deps/v8/test/js-perf-test/TypedArrays/run.js | 4 +- .../js-perf-test/TypedArrays/sort-bigint.js | 2 +- .../TypedArrays/sort-cmpfn-bigint.js | 2 +- .../TypedArrays/sort-cmpfn-float.js | 2 +- .../TypedArrays/sort-cmpfn-int.js | 2 +- .../js-perf-test/TypedArrays/sort-float.js | 2 +- .../test/js-perf-test/TypedArrays/sort-int.js | 2 +- deps/v8/test/js-perf-test/TypedArrays/sort.js | 2 +- ...estructuring-undefined-number-property.out | 6 +- .../message/fail/overwritten-builtins.out | 4 +- .../fail/undefined-keyed-computed-property.js | 6 + .../undefined-keyed-computed-property.out | 9 + .../fail/undefined-keyed-number-property.js | 6 + .../fail/undefined-keyed-number-property.out | 9 + .../fail/undefined-keyed-string-property.js | 6 + .../fail/undefined-keyed-string-property.out | 9 + .../message/fail/wasm-async-compile-fail.js | 2 +- .../fail/wasm-async-instantiate-fail.js | 2 +- .../message/fail/wasm-exception-rethrow.js | 2 +- .../test/message/fail/wasm-exception-throw.js | 2 +- .../test/message/fail/wasm-function-name.js | 2 +- .../fail/wasm-module-and-function-name.js | 2 +- deps/v8/test/message/fail/wasm-module-name.js | 2 +- deps/v8/test/message/fail/wasm-no-name.js | 2 +- .../fail/wasm-streaming-compile-fail.js | 2 +- .../fail/wasm-streaming-instantiate-fail.js | 2 +- .../message/fail/wasm-sync-compile-fail.js | 2 +- deps/v8/test/message/fail/wasm-trap.js | 2 +- .../mjsunit/fail/assert-in-promise-fail.js | 2 +- .../assert-promise-result-rejects-empty.js | 2 +- ...promise-result-rejects-with-throw-empty.js | 2 +- .../fail/assert-promise-result-rejects.js | 2 +- .../fail/assert-promise-result-resolves.js | 2 +- ...assert-promise-result-wasm-compile-fail.js | 4 +- .../message/mjsunit/fail/assert_not_same.js | 2 +- .../test/message/mjsunit/fail/assert_true.js | 2 +- .../success/assert-promise-result-rejects.js | 2 +- .../assert-promise-result-resolves-empty.js | 2 +- .../success/assert-promise-result-resolves.js | 2 +- .../test/message/wasm-finish-compilation.js | 2 +- .../test/message/wasm-function-name-async.js | 4 +- .../message/wasm-function-name-streaming.js | 2 +- .../wasm-module-and-function-name-async.js | 4 +- ...wasm-module-and-function-name-streaming.js | 2 +- .../v8/test/message/wasm-module-name-async.js | 4 +- .../message/wasm-module-name-streaming.js | 2 +- deps/v8/test/message/wasm-no-name-async.js | 4 +- .../v8/test/message/wasm-no-name-streaming.js | 2 +- deps/v8/test/message/wasm-trace-liftoff.js | 2 +- .../test/message/wasm-trace-memory-liftoff.js | 2 +- deps/v8/test/message/wasm-trace-memory.js | 2 +- deps/v8/test/message/wasm-trace-turbofan.js | 2 +- deps/v8/test/mjsunit/BUILD.gn | 1 + .../mjsunit/baseline/batch-compilation.js | 73 + .../v8/test/mjsunit/baseline/test-baseline.js | 3 - .../call-with-arraylike-or-spread-2.js | 41 + .../call-with-arraylike-or-spread-3.js | 52 + .../call-with-arraylike-or-spread-4.js | 65 + .../call-with-arraylike-or-spread-5.js | 55 + .../call-with-arraylike-or-spread-6.js | 55 + .../call-with-arraylike-or-spread-7.js | 67 + .../compiler/call-with-arraylike-or-spread.js | 742 ++++ .../concurrent-invalidate-transition-map.js | 2 +- .../test/mjsunit/compiler/fast-api-calls.js | 72 +- .../mjsunit/compiler/fast-api-sequences.js | 199 ++ .../test/mjsunit/compiler/regress-1198705.js | 24 + .../test/mjsunit/compiler/regress-1199345.js | 46 + .../test/mjsunit/compiler/regress-1200490.js | 49 + .../test/mjsunit/compiler/regress-1217562.js | 19 + .../test/mjsunit/compiler/regress-1224277.js | 16 + .../test/mjsunit/compiler/regress-1225607.js | 21 + .../test/mjsunit/compiler/regress-1226988.js | 21 + .../test/mjsunit/compiler/regress-1227324.js | 23 + deps/v8/test/mjsunit/compiler/regress-7121.js | 2 +- .../mjsunit/compiler/regress-crbug-1209558.js | 59 + .../mjsunit/compiler/regress-crbug-1211215.js | 40 + .../mjsunit/compiler/regress-crbug-1221812.js | 24 + .../mjsunit/compiler/regress-crbug-1223107.js | 8 + .../mjsunit/compiler/regress-crbug-1226264.js | 18 + .../mjsunit/compiler/regress-crbug-1227677.js | 195 ++ .../mjsunit/compiler/regress-crbug-1228233.js | 28 + .../mjsunit/compiler/regress-lazy-deopt.js | 2 +- deps/v8/test/mjsunit/compiler/verify-type.js | 14 + .../v8/test/mjsunit/const-field-tracking-2.js | 1 + .../constant-fold-control-instructions.js | 14 +- deps/v8/test/mjsunit/d8/d8-os.js | 4 + .../mjsunit/d8/d8-realm-explicit-scope.js | 13 + .../es6/computed-property-names-classes.js | 9 +- deps/v8/test/mjsunit/es6/function-name.js | 12 +- .../mjsunit/es6/promise-all-overflow-1.js | 2 +- .../mjsunit/es6/promise-all-overflow-2.js | 2 +- .../es6/promise-all-resolve-not-callable.js | 2 +- deps/v8/test/mjsunit/es6/promise-all.js | 2 +- ...promise-allsettled-resolve-not-callable.js | 2 +- .../es6/promise-race-resolve-not-callable.js | 2 +- deps/v8/test/mjsunit/es6/proxies-function.js | 21 - .../harmony/async-generators-resume-return.js | 2 +- .../harmony/async-generators-return.js | 2 +- .../mjsunit/harmony/async-generators-yield.js | 2 +- .../atomics-waitasync-1thread-2timeout.js | 2 +- ...ync-1thread-buffer-out-of-scope-timeout.js | 2 +- .../atomics-waitasync-1thread-timeout.js | 2 +- .../harmony/bigint/mod-special-cases.js | 8 + .../harmony/bigint/mul-special-cases.js | 10 + .../harmony/bigint/regress-fftmul-2.js | 23 + .../mjsunit/harmony/bigint/regress-fftmul.js | 12 + deps/v8/test/mjsunit/harmony/has-own.js | 51 + .../harmony/private-fields-special-object.js | 2 +- .../mjsunit/harmony/promise-any-overflow-1.js | 2 +- .../mjsunit/harmony/promise-any-overflow-2.js | 2 +- .../promise-any-resolve-not-callable.js | 2 +- deps/v8/test/mjsunit/harmony/promise-any.js | 2 +- .../harmony/promise-prototype-finally.js | 2 +- .../sharedarraybuffer-worker-gc-stress.js | 2 +- deps/v8/test/mjsunit/harmony/to-length.js | 20 - .../ignition/ignition-statistics-extension.js | 62 - deps/v8/test/mjsunit/math-min-max.js | 4 +- .../mjsunit/measure-memory-multiple-realms.js | 2 +- deps/v8/test/mjsunit/measure-memory.js | 2 +- deps/v8/test/mjsunit/migrations.js | 2 +- deps/v8/test/mjsunit/mjsunit.status | 133 +- deps/v8/test/mjsunit/promise-hooks.js | 8 - deps/v8/test/mjsunit/regress-crbug-1078825.js | 2 +- .../mjsunit/regress/asm/regress-1223839.js | 14 + .../test/mjsunit/regress/asm/regress-8505.js | 2 +- .../call-function-in-effect-context-deopt.js | 2 +- deps/v8/test/mjsunit/regress/regress-11810.js | 29 + .../test/mjsunit/regress/regress-1212244.js | 30 + .../test/mjsunit/regress/regress-1212404.js | 19 + .../test/mjsunit/regress/regress-1220974.js | 112 + .../test/mjsunit/regress/regress-1223733.js | 16 + .../test/mjsunit/regress/regress-1225300.js | 16 + .../test/mjsunit/regress/regress-1225561.js | 27 + .../test/mjsunit/regress/regress-1227568.js | 15 + deps/v8/test/mjsunit/regress/regress-3183.js | 2 +- deps/v8/test/mjsunit/regress/regress-8510.js | 2 +- deps/v8/test/mjsunit/regress/regress-995.js | 4 +- .../mjsunit/regress/regress-crbug-1195977.js | 32 + .../mjsunit/regress/regress-crbug-1197053.js | 17 + .../mjsunit/regress/regress-crbug-1201938.js | 11 + .../mjsunit/regress/regress-crbug-1209405.js | 20 + .../mjsunit/regress/regress-crbug-1224142.js | 20 + .../mjsunit/regress/regress-crbug-422858.js | 10 +- .../mjsunit/regress/regress-crbug-489597.js | 2 +- .../mjsunit/regress/regress-crbug-620253.js | 2 +- .../mjsunit/regress/regress-crbug-657478.js | 2 +- .../mjsunit/regress/regress-crbug-807096.js | 2 +- .../mjsunit/regress/regress-crbug-830565.js | 2 +- ...dition-change-during-branch-elimination.js | 2 +- .../mjsunit/regress/wasm/loop-stack-check.js | 2 +- .../mjsunit/regress/wasm/regress-02256.js | 2 +- .../regress/wasm/regress-10126-streaming.js | 2 +- .../mjsunit/regress/wasm/regress-10126.js | 2 +- .../mjsunit/regress/wasm/regress-1014798.js | 2 +- .../mjsunit/regress/wasm/regress-1016515.js | 2 +- .../mjsunit/regress/wasm/regress-1026680.js | 2 +- .../mjsunit/regress/wasm/regress-1027410.js | 2 +- .../mjsunit/regress/wasm/regress-1029642.js | 2 +- .../mjsunit/regress/wasm/regress-1032753.js | 2 +- .../mjsunit/regress/wasm/regress-1034394.js | 2 +- .../mjsunit/regress/wasm/regress-1045225.js | 2 +- .../mjsunit/regress/wasm/regress-1045737.js | 2 +- .../mjsunit/regress/wasm/regress-1046472.js | 2 +- .../mjsunit/regress/wasm/regress-1048241.js | 2 +- .../mjsunit/regress/wasm/regress-1051912.js | 2 +- .../mjsunit/regress/wasm/regress-1054466.js | 2 +- .../mjsunit/regress/wasm/regress-1065599.js | 2 +- .../mjsunit/regress/wasm/regress-1067621.js | 2 +- .../mjsunit/regress/wasm/regress-1070078.js | 2 +- .../mjsunit/regress/wasm/regress-10702.js | 2 +- .../mjsunit/regress/wasm/regress-1073553.js | 2 +- .../mjsunit/regress/wasm/regress-1074586-b.js | 2 +- .../mjsunit/regress/wasm/regress-1074586.js | 2 +- .../mjsunit/regress/wasm/regress-1075953.js | 2 +- .../mjsunit/regress/wasm/regress-1079449.js | 2 +- .../mjsunit/regress/wasm/regress-1080902.js | 2 +- .../mjsunit/regress/wasm/regress-1081030.js | 2 +- .../mjsunit/regress/wasm/regress-10831.js | 2 +- .../mjsunit/regress/wasm/regress-1084151.js | 2 +- .../mjsunit/regress/wasm/regress-10898.js | 2 +- .../mjsunit/regress/wasm/regress-1101304.js | 2 +- .../mjsunit/regress/wasm/regress-11024.js | 2 +- .../mjsunit/regress/wasm/regress-1111522.js | 2 +- .../mjsunit/regress/wasm/regress-1112124.js | 2 +- .../mjsunit/regress/wasm/regress-1114005.js | 2 +- .../mjsunit/regress/wasm/regress-1116019.js | 2 +- .../mjsunit/regress/wasm/regress-11206.js | 2 +- .../mjsunit/regress/wasm/regress-1124885.js | 2 +- .../mjsunit/regress/wasm/regress-1125951.js | 2 +- .../mjsunit/regress/wasm/regress-1132461.js | 2 +- .../mjsunit/regress/wasm/regress-11335.js | 2 +- .../mjsunit/regress/wasm/regress-1137582.js | 2 +- .../mjsunit/regress/wasm/regress-1137608.js | 2 +- .../mjsunit/regress/wasm/regress-1140549.js | 2 +- .../mjsunit/regress/wasm/regress-1145135.js | 2 +- .../mjsunit/regress/wasm/regress-1146861.js | 2 +- .../mjsunit/regress/wasm/regress-11472.js | 2 +- .../mjsunit/regress/wasm/regress-1152937.js | 2 +- .../mjsunit/regress/wasm/regress-1153442.js | 2 +- .../mjsunit/regress/wasm/regress-1161555.js | 2 +- .../mjsunit/regress/wasm/regress-1161654.js | 2 +- .../mjsunit/regress/wasm/regress-1161954.js | 2 +- .../mjsunit/regress/wasm/regress-1165966.js | 2 +- .../mjsunit/regress/wasm/regress-1168116.js | 2 +- .../mjsunit/regress/wasm/regress-1171788.js | 2 +- .../mjsunit/regress/wasm/regress-1179025.js | 2 +- .../mjsunit/regress/wasm/regress-1179065.js | 2 +- .../mjsunit/regress/wasm/regress-1179182.js | 2 +- .../mjsunit/regress/wasm/regress-1180690.js | 2 +- .../mjsunit/regress/wasm/regress-1184964.js | 2 +- .../mjsunit/regress/wasm/regress-1185464.js | 2 +- .../mjsunit/regress/wasm/regress-1187831.js | 2 +- .../mjsunit/regress/wasm/regress-1188825.js | 2 +- .../mjsunit/regress/wasm/regress-1188975.js | 2 +- .../mjsunit/regress/wasm/regress-1189454.js | 2 +- .../mjsunit/regress/wasm/regress-1196837.js | 2 +- .../mjsunit/regress/wasm/regress-1197393.js | 2 +- .../mjsunit/regress/wasm/regress-1199662.js | 2 +- .../mjsunit/regress/wasm/regress-1200231.js | 2 +- .../mjsunit/regress/wasm/regress-1201340.js | 2 +- .../mjsunit/regress/wasm/regress-1202736.js | 2 +- .../mjsunit/regress/wasm/regress-1207263.js | 22 + .../mjsunit/regress/wasm/regress-1215808.js | 10 + .../mjsunit/regress/wasm/regress-1220855.js | 19 + .../mjsunit/regress/wasm/regress-1231950.js | 18 + .../test/mjsunit/regress/wasm/regress-5531.js | 2 +- .../test/mjsunit/regress/wasm/regress-5800.js | 2 +- .../test/mjsunit/regress/wasm/regress-5860.js | 2 +- .../test/mjsunit/regress/wasm/regress-5884.js | 2 +- .../test/mjsunit/regress/wasm/regress-5888.js | 2 +- .../test/mjsunit/regress/wasm/regress-5911.js | 2 +- .../test/mjsunit/regress/wasm/regress-6054.js | 2 +- .../test/mjsunit/regress/wasm/regress-6164.js | 2 +- .../mjsunit/regress/wasm/regress-644682.js | 2 +- .../mjsunit/regress/wasm/regress-648079.js | 2 +- .../mjsunit/regress/wasm/regress-651961.js | 2 +- .../mjsunit/regress/wasm/regress-654377.js | 2 +- .../mjsunit/regress/wasm/regress-663994.js | 2 +- .../mjsunit/regress/wasm/regress-667745.js | 2 +- .../mjsunit/regress/wasm/regress-684858.js | 2 +- .../mjsunit/regress/wasm/regress-688876.js | 2 +- .../mjsunit/regress/wasm/regress-689450.js | 2 +- .../test/mjsunit/regress/wasm/regress-6931.js | 2 +- .../mjsunit/regress/wasm/regress-699485.js | 2 +- .../mjsunit/regress/wasm/regress-702460.js | 2 +- .../test/mjsunit/regress/wasm/regress-7033.js | 2 +- .../test/mjsunit/regress/wasm/regress-7035.js | 2 +- .../mjsunit/regress/wasm/regress-708714.js | 2 +- .../mjsunit/regress/wasm/regress-709684.js | 2 +- .../mjsunit/regress/wasm/regress-710844.js | 2 +- .../mjsunit/regress/wasm/regress-711203.js | 2 +- .../mjsunit/regress/wasm/regress-722445.js | 2 +- .../mjsunit/regress/wasm/regress-724846.js | 5 +- .../mjsunit/regress/wasm/regress-724851.js | 2 +- .../mjsunit/regress/wasm/regress-724972.js | 2 +- .../mjsunit/regress/wasm/regress-727222.js | 2 +- .../mjsunit/regress/wasm/regress-727560.js | 2 +- .../mjsunit/regress/wasm/regress-729991.js | 2 +- .../mjsunit/regress/wasm/regress-734246.js | 2 +- .../mjsunit/regress/wasm/regress-734345.js | 2 +- .../test/mjsunit/regress/wasm/regress-7353.js | 2 +- .../test/mjsunit/regress/wasm/regress-7364.js | 2 +- .../mjsunit/regress/wasm/regress-736584.js | 2 +- .../test/mjsunit/regress/wasm/regress-7366.js | 2 +- .../mjsunit/regress/wasm/regress-737069.js | 2 +- .../mjsunit/regress/wasm/regress-739768.js | 2 +- .../test/mjsunit/regress/wasm/regress-7422.js | 2 +- .../test/mjsunit/regress/wasm/regress-7499.js | 2 +- .../test/mjsunit/regress/wasm/regress-7508.js | 2 +- .../mjsunit/regress/wasm/regress-752423.js | 2 +- .../test/mjsunit/regress/wasm/regress-7565.js | 2 +- .../mjsunit/regress/wasm/regress-757217.js | 2 +- .../test/mjsunit/regress/wasm/regress-7579.js | 2 +- .../test/mjsunit/regress/wasm/regress-7582.js | 2 +- .../mjsunit/regress/wasm/regress-763439.js | 2 +- .../mjsunit/regress/wasm/regress-763697.js | 2 +- .../mjsunit/regress/wasm/regress-769637.js | 2 +- .../mjsunit/regress/wasm/regress-775366.js | 2 +- .../test/mjsunit/regress/wasm/regress-7785.js | 2 +- .../mjsunit/regress/wasm/regress-782280.js | 2 +- .../mjsunit/regress/wasm/regress-784050.js | 2 +- .../test/mjsunit/regress/wasm/regress-7914.js | 2 +- .../mjsunit/regress/wasm/regress-791810.js | 2 +- .../mjsunit/regress/wasm/regress-793551.js | 2 +- .../mjsunit/regress/wasm/regress-797846.js | 2 +- .../mjsunit/regress/wasm/regress-800756.js | 2 +- .../mjsunit/regress/wasm/regress-801785.js | 2 +- .../mjsunit/regress/wasm/regress-801850.js | 2 +- .../mjsunit/regress/wasm/regress-802244.js | 2 +- .../mjsunit/regress/wasm/regress-803427.js | 2 +- .../mjsunit/regress/wasm/regress-803788.js | 2 +- .../test/mjsunit/regress/wasm/regress-8059.js | 2 +- .../mjsunit/regress/wasm/regress-808012.js | 2 +- .../mjsunit/regress/wasm/regress-808848.js | 2 +- .../mjsunit/regress/wasm/regress-808980.js | 2 +- .../test/mjsunit/regress/wasm/regress-8094.js | 2 +- .../test/mjsunit/regress/wasm/regress-8095.js | 2 +- .../mjsunit/regress/wasm/regress-812005.js | 2 +- .../mjsunit/regress/wasm/regress-813440.js | 2 +- .../mjsunit/regress/wasm/regress-817380.js | 2 +- .../mjsunit/regress/wasm/regress-819869.js | 2 +- .../mjsunit/regress/wasm/regress-820802.js | 2 +- .../mjsunit/regress/wasm/regress-824681.js | 2 +- .../mjsunit/regress/wasm/regress-827806.js | 2 +- .../mjsunit/regress/wasm/regress-834619.js | 2 +- .../mjsunit/regress/wasm/regress-834693.js | 2 +- .../mjsunit/regress/wasm/regress-836141.js | 2 +- .../mjsunit/regress/wasm/regress-837417.js | 2 +- .../mjsunit/regress/wasm/regress-840757.js | 2 +- .../mjsunit/regress/wasm/regress-842501.js | 2 +- .../mjsunit/regress/wasm/regress-843563.js | 2 +- .../test/mjsunit/regress/wasm/regress-8533.js | 2 +- .../mjsunit/regress/wasm/regress-854011.js | 2 +- .../mjsunit/regress/wasm/regress-854050.js | 2 +- .../mjsunit/regress/wasm/regress-863810.js | 2 +- .../mjsunit/regress/wasm/regress-864509.js | 2 +- .../mjsunit/regress/wasm/regress-875556.js | 2 +- .../test/mjsunit/regress/wasm/regress-8846.js | 2 +- .../test/mjsunit/regress/wasm/regress-8896.js | 2 +- .../mjsunit/regress/wasm/regress-894307.js | 2 +- .../mjsunit/regress/wasm/regress-894374.js | 2 +- .../test/mjsunit/regress/wasm/regress-8947.js | 2 +- .../test/mjsunit/regress/wasm/regress-9017.js | 2 +- .../mjsunit/regress/wasm/regress-905815.js | 2 +- .../mjsunit/regress/wasm/regress-910824.js | 2 +- .../mjsunit/regress/wasm/regress-913804.js | 2 +- .../mjsunit/regress/wasm/regress-916869.js | 2 +- .../mjsunit/regress/wasm/regress-917412.js | 2 +- .../mjsunit/regress/wasm/regress-917588.js | 2 +- .../mjsunit/regress/wasm/regress-917588b.js | 2 +- .../mjsunit/regress/wasm/regress-918149.js | 2 +- .../mjsunit/regress/wasm/regress-918284.js | 2 +- .../mjsunit/regress/wasm/regress-918917.js | 2 +- .../mjsunit/regress/wasm/regress-919308.js | 2 +- .../mjsunit/regress/wasm/regress-919533.js | 2 +- .../test/mjsunit/regress/wasm/regress-9209.js | 2 +- .../mjsunit/regress/wasm/regress-922670.js | 2 +- .../mjsunit/regress/wasm/regress-922933.js | 2 +- .../mjsunit/regress/wasm/regress-924843.js | 2 +- .../mjsunit/regress/wasm/regress-924905.js | 2 +- .../mjsunit/regress/wasm/regress-925671.js | 2 +- .../mjsunit/regress/wasm/regress-935138.js | 2 +- .../test/mjsunit/regress/wasm/regress-9425.js | 2 +- .../test/mjsunit/regress/wasm/regress-9447.js | 2 +- .../mjsunit/regress/wasm/regress-946350.js | 2 +- .../mjsunit/regress/wasm/regress-948228.js | 2 +- .../mjsunit/regress/wasm/regress-952342.js | 2 +- .../mjsunit/regress/wasm/regress-956771.js | 2 +- .../mjsunit/regress/wasm/regress-956771b.js | 2 +- .../mjsunit/regress/wasm/regress-957405.js | 2 +- .../mjsunit/regress/wasm/regress-964607.js | 2 +- .../mjsunit/regress/wasm/regress-968078.js | 2 +- .../test/mjsunit/regress/wasm/regress-9759.js | 2 +- .../mjsunit/regress/wasm/regress-980007.js | 2 +- .../test/mjsunit/regress/wasm/regress-9832.js | 2 +- .../regress/wasm/regress-crbug-1168612.js | 2 +- .../regress/wasm/regress-crbug-772056.js | 2 +- .../mjsunit/regress/wasm/regress-ubsan.js | 2 +- .../mjsunit/regress/wasm/regress1192313.js | 2 +- deps/v8/test/mjsunit/smi-representation.js | 2 +- deps/v8/test/mjsunit/switch.js | 133 + .../tools/compiler-trace-flags-wasm.js | 2 +- deps/v8/test/mjsunit/tools/dumpcpp.mjs | 14 +- .../mjsunit/tools/{trace-ic.js => log-ic.js} | 5 +- deps/v8/test/mjsunit/tools/processor.mjs | 5 +- .../tools/tickprocessor-test-large.default | 73 +- .../mjsunit/tools/tickprocessor-test-large.js | 2 +- .../tickprocessor-test-large.log.symbols.json | 38 +- deps/v8/test/mjsunit/tools/tickprocessor.mjs | 264 +- deps/v8/test/mjsunit/tools/timeline.mjs | 154 +- deps/v8/test/mjsunit/track-fields.js | 2 +- .../typedarray-growablesharedarraybuffer.js | 200 ++ .../typedarray-resizablearraybuffer.js | 300 ++ deps/v8/test/mjsunit/wasm/adapter-frame.js | 2 +- deps/v8/test/mjsunit/wasm/add-getters.js | 2 +- deps/v8/test/mjsunit/wasm/anyfunc.js | 2 +- .../test/mjsunit/wasm/array-copy-benchmark.js | 109 + deps/v8/test/mjsunit/wasm/async-compile.js | 2 +- .../test/mjsunit/wasm/atomics-non-shared.js | 2 +- deps/v8/test/mjsunit/wasm/atomics-stress.js | 2 +- deps/v8/test/mjsunit/wasm/atomics.js | 2 +- deps/v8/test/mjsunit/wasm/atomics64-stress.js | 2 +- .../wasm/bigint-i64-to-imported-js-func.js | 2 +- deps/v8/test/mjsunit/wasm/bigint.js | 2 +- .../test/mjsunit/wasm/bounds-check-64bit.js | 2 +- .../mjsunit/wasm/bounds-check-turbofan.js | 2 +- deps/v8/test/mjsunit/wasm/bulk-memory.js | 2 +- deps/v8/test/mjsunit/wasm/call-ref.js | 2 +- deps/v8/test/mjsunit/wasm/calls.js | 2 +- .../mjsunit/wasm/code-space-exhaustion.js | 2 +- .../mjsunit/wasm/compare-exchange-stress.js | 2 +- .../mjsunit/wasm/compare-exchange64-stress.js | 2 +- .../compilation-hints-async-compilation.js | 2 +- .../mjsunit/wasm/compilation-hints-decoder.js | 2 +- .../mjsunit/wasm/compilation-hints-ignored.js | 2 +- .../wasm/compilation-hints-lazy-validation.js | 2 +- ...compilation-hints-streaming-compilation.js | 2 +- ...ilation-hints-streaming-lazy-validation.js | 2 +- .../compilation-hints-sync-compilation.js | 2 +- .../test/mjsunit/wasm/compilation-limits.js | 2 +- .../wasm/compiled-module-management.js | 2 +- .../wasm/compiled-module-serialization.js | 2 +- deps/v8/test/mjsunit/wasm/data-segments.js | 2 +- deps/v8/test/mjsunit/wasm/disallow-codegen.js | 2 +- deps/v8/test/mjsunit/wasm/divrem-trap.js | 2 +- .../wasm/element-segments-with-reftypes.js | 2 +- .../test/mjsunit/wasm/empirical_max_memory.js | 2 +- .../wasm/ensure-wasm-binaries-up-to-date.js | 2 +- deps/v8/test/mjsunit/wasm/errors.js | 16 +- deps/v8/test/mjsunit/wasm/exceptions-api.js | 59 + .../v8/test/mjsunit/wasm/exceptions-export.js | 26 +- .../test/mjsunit/wasm/exceptions-externref.js | 4 +- .../v8/test/mjsunit/wasm/exceptions-import.js | 2 +- .../test/mjsunit/wasm/exceptions-rethrow.js | 4 +- .../v8/test/mjsunit/wasm/exceptions-shared.js | 2 +- deps/v8/test/mjsunit/wasm/exceptions-simd.js | 4 +- deps/v8/test/mjsunit/wasm/exceptions.js | 81 +- deps/v8/test/mjsunit/wasm/export-global.js | 2 +- deps/v8/test/mjsunit/wasm/export-identity.js | 2 +- .../mjsunit/wasm/export-mutable-global.js | 2 +- deps/v8/test/mjsunit/wasm/export-table.js | 2 +- .../mjsunit/wasm/externref-globals-liftoff.js | 2 +- .../v8/test/mjsunit/wasm/externref-globals.js | 4 +- .../v8/test/mjsunit/wasm/externref-liftoff.js | 2 +- deps/v8/test/mjsunit/wasm/externref-table.js | 2 +- deps/v8/test/mjsunit/wasm/externref.js | 2 +- deps/v8/test/mjsunit/wasm/ffi-error.js | 2 +- deps/v8/test/mjsunit/wasm/ffi.js | 2 +- .../mjsunit/wasm/float-constant-folding.js | 2 +- deps/v8/test/mjsunit/wasm/function-names.js | 2 +- .../test/mjsunit/wasm/function-prototype.js | 2 +- deps/v8/test/mjsunit/wasm/futex.js | 20 +- deps/v8/test/mjsunit/wasm/gc-buffer.js | 2 +- deps/v8/test/mjsunit/wasm/gc-frame.js | 2 +- deps/v8/test/mjsunit/wasm/gc-stress.js | 2 +- deps/v8/test/mjsunit/wasm/generic-wrapper.js | 2 +- .../wasm/globals-import-export-identity.js | 2 +- deps/v8/test/mjsunit/wasm/globals.js | 19 +- .../v8/test/mjsunit/wasm/graceful_shutdown.js | 2 +- .../wasm/graceful_shutdown_during_tierup.js | 2 +- deps/v8/test/mjsunit/wasm/grow-huge-memory.js | 2 +- .../mjsunit/wasm/grow-memory-detaching.js | 2 +- .../mjsunit/wasm/grow-memory-in-branch.js | 2 +- .../test/mjsunit/wasm/grow-memory-in-call.js | 2 +- .../test/mjsunit/wasm/grow-memory-in-loop.js | 2 +- deps/v8/test/mjsunit/wasm/grow-memory.js | 2 +- .../test/mjsunit/wasm/grow-shared-memory.js | 2 +- deps/v8/test/mjsunit/wasm/huge-memory.js | 2 +- deps/v8/test/mjsunit/wasm/import-function.js | 2 +- deps/v8/test/mjsunit/wasm/import-memory.js | 2 +- .../mjsunit/wasm/import-mutable-global.js | 2 +- deps/v8/test/mjsunit/wasm/import-table.js | 2 +- .../mjsunit/wasm/imported-function-types.js | 2 +- .../wasm/indirect-call-non-zero-table.js | 2 +- deps/v8/test/mjsunit/wasm/indirect-calls.js | 2 +- .../mjsunit/wasm/indirect-sig-mismatch.js | 2 +- deps/v8/test/mjsunit/wasm/indirect-tables.js | 2 +- deps/v8/test/mjsunit/wasm/instance-gc.js | 2 +- .../mjsunit/wasm/instance-memory-gc-stress.js | 2 +- .../mjsunit/wasm/instantiate-module-basic.js | 2 +- .../mjsunit/wasm/instantiate-run-basic.js | 2 +- deps/v8/test/mjsunit/wasm/js-api.js | 2 +- deps/v8/test/mjsunit/wasm/large-offset.js | 2 +- deps/v8/test/mjsunit/wasm/lazy-compilation.js | 2 +- deps/v8/test/mjsunit/wasm/liftoff-debug.js | 45 + .../test/mjsunit/wasm/liftoff-simd-params.js | 2 +- .../test/mjsunit/wasm/liftoff-trap-handler.js | 2 +- deps/v8/test/mjsunit/wasm/liftoff.js | 2 +- deps/v8/test/mjsunit/wasm/loop-rotation.js | 2 +- deps/v8/test/mjsunit/wasm/loop-unrolling.js | 4 +- .../wasm/many-memories-no-trap-handler.js | 2 +- deps/v8/test/mjsunit/wasm/many-memories.js | 2 +- deps/v8/test/mjsunit/wasm/many-modules.js | 2 +- deps/v8/test/mjsunit/wasm/many-parameters.js | 2 +- .../test/mjsunit/wasm/memory-external-call.js | 2 +- .../wasm/memory-instance-validation.js | 2 +- deps/v8/test/mjsunit/wasm/memory-size.js | 2 +- deps/v8/test/mjsunit/wasm/memory.js | 2 +- deps/v8/test/mjsunit/wasm/memory64.js | 2 +- deps/v8/test/mjsunit/wasm/memory_1gb_oob.js | 2 +- deps/v8/test/mjsunit/wasm/memory_2gb_oob.js | 2 +- deps/v8/test/mjsunit/wasm/memory_4gb_oob.js | 2 +- deps/v8/test/mjsunit/wasm/module-memory.js | 2 +- .../wasm/multi-table-element-section.js | 2 +- deps/v8/test/mjsunit/wasm/multi-value-simd.js | 2 +- deps/v8/test/mjsunit/wasm/multi-value.js | 2 +- .../test/mjsunit/wasm/multiple-code-spaces.js | 2 +- deps/v8/test/mjsunit/wasm/names.js | 2 +- .../test/mjsunit/wasm/parallel_compilation.js | 2 +- deps/v8/test/mjsunit/wasm/params.js | 2 +- deps/v8/test/mjsunit/wasm/print-code.js | 2 +- deps/v8/test/mjsunit/wasm/receiver.js | 2 +- .../v8/test/mjsunit/wasm/reference-globals.js | 160 +- deps/v8/test/mjsunit/wasm/reference-tables.js | 2 +- deps/v8/test/mjsunit/wasm/return-calls.js | 2 +- .../mjsunit/wasm/serialize-lazy-module.js | 2 +- ...shared-memory-worker-explicit-gc-stress.js | 2 +- .../wasm/shared-memory-worker-gc-stress.js | 2 +- .../wasm/shared-memory-worker-stress.js | 2 +- deps/v8/test/mjsunit/wasm/shared-memory.js | 2 +- deps/v8/test/mjsunit/wasm/simd-call.js | 2 +- deps/v8/test/mjsunit/wasm/simd-errors.js | 2 +- deps/v8/test/mjsunit/wasm/simd-globals.js | 2 +- deps/v8/test/mjsunit/wasm/simd-i64x2-mul.js | 2 +- .../wasm/single-threaded-compilation.js | 2 +- deps/v8/test/mjsunit/wasm/stack.js | 2 +- deps/v8/test/mjsunit/wasm/stackwalk.js | 2 +- deps/v8/test/mjsunit/wasm/start-function.js | 2 +- deps/v8/test/mjsunit/wasm/streaming-api.js | 2 +- .../v8/test/mjsunit/wasm/streaming-compile.js | 2 +- .../mjsunit/wasm/streaming-error-position.js | 10 +- .../mjsunit/wasm/streaming-trap-location.js | 2 +- .../test/mjsunit/wasm/table-access-liftoff.js | 2 +- deps/v8/test/mjsunit/wasm/table-access.js | 2 +- .../test/mjsunit/wasm/table-copy-externref.js | 2 +- deps/v8/test/mjsunit/wasm/table-copy.js | 2 +- deps/v8/test/mjsunit/wasm/table-fill.js | 2 +- deps/v8/test/mjsunit/wasm/table-get.js | 2 +- .../test/mjsunit/wasm/table-grow-from-wasm.js | 2 +- deps/v8/test/mjsunit/wasm/table-grow.js | 2 +- deps/v8/test/mjsunit/wasm/table-limits.js | 2 +- deps/v8/test/mjsunit/wasm/table.js | 2 +- .../mjsunit/wasm/tagged-stack-parameters.js | 54 + .../mjsunit/wasm/test-wasm-module-builder.js | 2 +- .../test/mjsunit/wasm/tier-down-to-liftoff.js | 2 +- .../test/mjsunit/wasm/tier-up-testing-flag.js | 2 +- deps/v8/test/mjsunit/wasm/trap-location.js | 2 +- .../wasm/type-reflection-with-externref.js | 2 +- deps/v8/test/mjsunit/wasm/type-reflection.js | 2 +- deps/v8/test/mjsunit/wasm/typed-funcref.js | 2 +- .../test/mjsunit/wasm/unicode-validation.js | 2 +- deps/v8/test/mjsunit/wasm/unicode.js | 2 +- .../mjsunit/wasm/unreachable-validation.js | 18 +- deps/v8/test/mjsunit/wasm/unreachable.js | 2 +- .../mjsunit/wasm/user-properties-common.js | 2 +- .../wasm/user-properties-constructed.js | 2 +- .../mjsunit/wasm/user-properties-exported.js | 2 +- .../mjsunit/wasm/user-properties-module.js | 2 +- .../mjsunit/wasm/user-properties-reexport.js | 2 +- .../test/mjsunit/wasm/wasm-api-overloading.js | 2 +- .../mjsunit/wasm/wasm-array-js-interop.js | 89 + .../test/mjsunit/wasm/wasm-dynamic-tiering.js | 6 +- .../test/mjsunit/wasm/wasm-gc-js-roundtrip.js | 2 +- .../test/mjsunit/wasm/wasm-math-intrinsic.js | 2 +- .../test/mjsunit/wasm/wasm-module-builder.js | 89 +- .../mjsunit/wasm/wasm-struct-js-interop.js | 180 + deps/v8/test/mjsunit/wasm/worker-module.js | 2 +- .../test/mjsunit/web-snapshot/web-snapshot.js | 294 ++ deps/v8/test/mozilla/mozilla.status | 2 - deps/v8/test/test262/test262.status | 126 +- deps/v8/test/test262/testcfg.py | 2 + deps/v8/test/unittests/BUILD.gn | 2 +- .../unittests/base/address-region-unittest.cc | 2 +- .../test/unittests/base/logging-unittest.cc | 21 +- .../utils/random-number-generator-unittest.cc | 2 +- .../{utils => base}/vector-unittest.cc | 45 +- .../arm/instruction-selector-arm-unittest.cc | 66 + .../instruction-selector-arm64-unittest.cc | 315 +- .../backend/instruction-selector-unittest.cc | 4 +- .../dead-code-elimination-unittest.cc | 3 +- .../compiler/js-call-reducer-unittest.cc | 58 +- .../js-intrinsic-lowering-unittest.cc | 64 - .../compiler/linkage-tail-call-unittest.cc | 12 +- .../machine-operator-reducer-unittest.cc | 19 +- .../redundancy-elimination-unittest.cc | 2 +- .../instruction-selector-riscv64-unittest.cc | 16 + .../heap/cppgc/concurrent-sweeper-unittest.cc | 22 +- .../heap/cppgc/custom-spaces-unittest.cc | 18 +- .../cppgc/explicit-management-unittest.cc | 38 +- .../heap/cppgc/heap-growing-unittest.cc | 20 +- .../heap/cppgc/heap-page-unittest.cc | 54 +- .../heap-statistics-collector-unittest.cc | 69 +- .../heap/cppgc/metric-recorder-unittest.cc | 209 +- .../heap/cppgc/name-trait-unittest.cc | 2 +- .../heap/cppgc/prefinalizer-unittest.cc | 82 +- .../heap/cppgc/stats-collector-unittest.cc | 33 +- .../unittests/heap/cppgc/sweeper-unittest.cc | 41 +- deps/v8/test/unittests/heap/cppgc/tests.h | 10 + .../heap/cppgc/workloads-unittest.cc | 24 +- .../heap/cppgc/write-barrier-unittest.cc | 13 + .../heap/gc-idle-time-handler-unittest.cc | 4 +- .../unittests/heap/local-factory-unittest.cc | 36 +- .../v8/test/unittests/heap/spaces-unittest.cc | 4 +- .../heap/unified-heap-snapshot-unittest.cc | 6 +- .../unittests/heap/unified-heap-unittest.cc | 20 + .../test/unittests/heap/unmapper-unittest.cc | 2 + .../bytecode-array-builder-unittest.cc | 12 +- .../interpreter-assembler-unittest.cc | 1 - .../logging/runtime-call-stats-unittest.cc | 4 + .../unittests/numbers/conversions-unittest.cc | 62 + .../osr-optimized-code-cache-unittest.cc | 46 +- .../objects/value-serializer-unittest.cc | 4 +- .../unittests/strings/unicode-unittest.cc | 4 +- deps/v8/test/unittests/test-helpers.cc | 2 +- deps/v8/test/unittests/unittests.status | 19 + .../v8/test/unittests/utils/utils-unittest.cc | 51 +- .../wasm/function-body-decoder-unittest.cc | 258 +- .../wasm/module-decoder-memory64-unittest.cc | 2 +- .../unittests/wasm/module-decoder-unittest.cc | 439 ++- .../wasm/streaming-decoder-unittest.cc | 88 +- .../wasm/trap-handler-posix-unittest.cc | 5 +- .../wasm/trap-handler-win-unittest.cc | 4 +- .../wasm/trap-handler-x64-unittest.cc | 27 +- deps/v8/test/wasm-api-tests/callbacks.cc | 20 +- deps/v8/test/wasm-api-tests/finalize.cc | 8 +- deps/v8/test/wasm-api-tests/globals.cc | 80 +- deps/v8/test/wasm-api-tests/hostref.cc | 16 +- deps/v8/test/wasm-api-tests/memory.cc | 8 +- deps/v8/test/wasm-api-tests/multi-return.cc | 4 +- deps/v8/test/wasm-api-tests/reflect.cc | 8 +- .../wasm-api-tests/run-all-wasm-api-tests.cc | 6 +- deps/v8/test/wasm-api-tests/serialize.cc | 5 +- deps/v8/test/wasm-api-tests/startup-errors.cc | 2 +- deps/v8/test/wasm-api-tests/table.cc | 12 +- deps/v8/test/wasm-api-tests/threads.cc | 6 +- deps/v8/test/wasm-api-tests/traps.cc | 24 +- deps/v8/test/wasm-api-tests/wasm-api-test.h | 2 +- deps/v8/test/wasm-js/tests.tar.gz.sha1 | 2 +- .../v8/test/wasm-spec-tests/tests.tar.gz.sha1 | 2 +- .../wasm-spec-tests/wasm-spec-tests.status | 42 +- .../delete-getters-setters-expected.txt | 32 +- ...ture-elimination-for-non-cell-expected.txt | 2 +- ...when-both-proven-final-object-expected.txt | 100 +- ...ther-when-proven-final-object-expected.txt | 100 +- ...se-from-all-the-places-broken-expected.txt | 400 +-- ...when-both-proven-final-object-expected.txt | 100 +- ...ther-when-proven-final-object-expected.txt | 100 +- .../webkit/fast/js/arguments-expected.txt | 2 +- .../array-prototype-properties-expected.txt | 2 +- .../fast/js/basic-strict-mode-expected.txt | 8 +- .../fast/js/date-toisostring-expected.txt | 4 +- deps/v8/test/webkit/run-json-stringify.js | 4 +- deps/v8/test/webkit/webkit.status | 1 + .../testing/gtest/include/gtest/gtest_prod.h | 2 + deps/v8/third_party/google_benchmark/BUILD.gn | 1 + .../third_party/inspector_protocol/README.v8 | 2 +- .../crdtp/json_platform_v8.cc | 4 +- .../lib/base_string_adapter_cc.template | 55 +- deps/v8/third_party/jinja2/OWNERS | 2 +- deps/v8/third_party/jinja2/README.chromium | 5 +- deps/v8/third_party/jinja2/compiler.py | 4 +- deps/v8/third_party/jinja2/get_jinja2.sh | 13 +- ...iled-template-deterministic-for-pyth.patch | 39 + deps/v8/third_party/markupsafe/OWNERS | 2 +- deps/v8/third_party/zlib/BUILD.gn | 42 + deps/v8/third_party/zlib/OWNERS | 1 - .../zlib/contrib/minizip/miniunz.c | 13 +- .../zlib/contrib/minizip/minizip.c | 7 +- .../zlib/contrib/minizip/minizip.md | 9 + .../zlib/google/compression_utils_unittest.cc | 2 +- deps/v8/third_party/zlib/google/zip.cc | 153 +- deps/v8/third_party/zlib/google/zip.h | 57 +- .../third_party/zlib/google/zip_internal.cc | 2 +- deps/v8/third_party/zlib/google/zip_reader.cc | 2 +- .../zlib/google/zip_reader_unittest.cc | 6 +- .../third_party/zlib/google/zip_unittest.cc | 92 +- deps/v8/third_party/zlib/google/zip_writer.cc | 211 +- deps/v8/third_party/zlib/google/zip_writer.h | 73 +- .../0008-minizip-zip-unzip-tools.patch | 98 + deps/v8/tools/README.md | 25 + deps/v8/tools/arguments.mjs | 10 + deps/v8/tools/bazel/.gitignore | 1 + deps/v8/tools/bazel/bazel.sha1 | 1 + deps/v8/tools/callstats.html | 8 + deps/v8/tools/callstats_groups.py | 1 + .../js_fuzzer/test_data/mjsunit/test_load.js | 4 +- .../test_data/mjsunit/test_load_0.js | 6 +- .../test_data/mjsunit/test_load_1.js | 2 +- .../test_data/mjsunit/test_load_self.js | 2 +- .../test_data/spidermonkey/test/load.js | 2 +- deps/v8/tools/codemap.mjs | 4 +- deps/v8/tools/cppgc/gen_cmake.py | 4 + deps/v8/tools/dev/gm.py | 62 +- deps/v8/tools/dumpcpp-driver.mjs | 40 +- deps/v8/tools/dumpcpp.mjs | 6 +- deps/v8/tools/gcmole/bootstrap.sh | 34 +- deps/v8/tools/gdbinit | 6 +- deps/v8/tools/ic-processor-driver.mjs | 53 +- deps/v8/tools/lldb_commands.py | 19 +- deps/v8/tools/logreader.mjs | 39 +- .../msan/{blacklist.txt => ignorelist.txt} | 0 deps/v8/tools/node/README.md | 12 - deps/v8/tools/node/fetch_deps.py | 101 - deps/v8/tools/node/node_common.py | 54 - deps/v8/tools/package-lock.json | 1372 ++++++++ deps/v8/tools/package.json | 7 + deps/v8/tools/parse-processor-driver.mjs | 35 +- deps/v8/tools/parse-processor.mjs | 12 - deps/v8/tools/profile.mjs | 225 +- deps/v8/tools/run_perf.py | 3 +- deps/v8/tools/sourcemap.mjs | 2 +- deps/v8/tools/system-analyzer/app-model.mjs | 18 +- deps/v8/tools/system-analyzer/helper.mjs | 49 +- deps/v8/tools/system-analyzer/index.css | 54 +- deps/v8/tools/system-analyzer/index.html | 67 +- deps/v8/tools/system-analyzer/index.mjs | 191 +- deps/v8/tools/system-analyzer/log/api.mjs | 8 - deps/v8/tools/system-analyzer/log/code.mjs | 71 +- deps/v8/tools/system-analyzer/log/ic.mjs | 18 +- deps/v8/tools/system-analyzer/log/log.mjs | 25 +- deps/v8/tools/system-analyzer/log/map.mjs | 37 +- deps/v8/tools/system-analyzer/log/tick.mjs | 37 + deps/v8/tools/system-analyzer/log/timer.mjs | 56 + .../tools/system-analyzer/lws-middleware.js | 98 + deps/v8/tools/system-analyzer/processor.mjs | 211 +- deps/v8/tools/system-analyzer/timeline.mjs | 56 +- .../view/code-panel-template.html | 16 +- .../tools/system-analyzer/view/code-panel.mjs | 114 +- deps/v8/tools/system-analyzer/view/events.mjs | 4 +- deps/v8/tools/system-analyzer/view/helper.mjs | 172 +- .../tools/system-analyzer/view/list-panel.mjs | 22 +- .../view/log-file-reader-template.html | 10 +- .../system-analyzer/view/log-file-reader.mjs | 40 +- .../view/map-panel/map-details-template.html | 2 +- .../view/map-panel/map-details.mjs | 37 +- .../view/map-panel/map-transitions.mjs | 344 +- .../view/property-link-table-template.html | 39 + .../view/property-link-table.mjs | 122 + .../view/script-panel-template.html | 4 - .../system-analyzer/view/script-panel.mjs | 146 +- .../view/timeline-panel-template.html | 18 +- .../system-analyzer/view/timeline-panel.mjs | 12 +- .../view/timeline/timeline-track-base.mjs | 621 ++++ .../view/timeline/timeline-track-map.mjs | 138 + .../timeline/timeline-track-stacked-base.mjs | 144 + .../timeline/timeline-track-template.html | 128 +- .../view/timeline/timeline-track-tick.mjs | 201 ++ .../view/timeline/timeline-track-timer.mjs | 41 + .../view/timeline/timeline-track.mjs | 608 +--- .../view/tool-tip-template.html | 47 +- .../tools/system-analyzer/view/tool-tip.mjs | 41 +- deps/v8/tools/testrunner/base_runner.py | 19 +- .../v8/tools/testrunner/local/junit_output.py | 49 - deps/v8/tools/testrunner/local/statusfile.py | 5 +- deps/v8/tools/testrunner/local/utils.py | 12 + deps/v8/tools/testrunner/local/variants.py | 60 +- deps/v8/tools/testrunner/objects/testcase.py | 50 +- deps/v8/tools/testrunner/standard_runner.py | 8 + deps/v8/tools/testrunner/testproc/progress.py | 91 +- deps/v8/tools/testrunner/testproc/sequence.py | 59 + .../testrunner/testproc/sequence_unittest.py | 162 + deps/v8/tools/testrunner/testproc/variant.py | 7 +- deps/v8/tools/testrunner/trycatch_loader.js | 4 +- deps/v8/tools/tick-processor.html | 6 +- deps/v8/tools/tickprocessor-driver.mjs | 65 +- deps/v8/tools/tickprocessor.mjs | 1605 +++++---- .../tracing/proto-converter/proto-to-json.ts | 5 +- deps/v8/tools/turbolizer/src/code-view.ts | 33 +- .../tools/turbolizer/src/selection-broker.ts | 60 +- .../tools/turbolizer/src/selection-handler.ts | 7 + deps/v8/tools/turbolizer/src/selection.ts | 2 +- deps/v8/tools/turbolizer/src/sequence-view.ts | 6 + .../tools/turbolizer/src/source-resolver.ts | 19 +- deps/v8/tools/turbolizer/src/text-view.ts | 56 +- deps/v8/tools/unittests/run_tests_test.py | 23 +- .../unittests/testdata/testroot3/d8_mocked.py | 16 + .../testroot3/test/sweet/sweet.status | 15 + .../testdata/testroot3/test/sweet/testcfg.py | 36 + .../testdata/testroot3/v8_build_config.json | 29 + deps/v8/tools/v8heapconst.py | 600 ++-- deps/v8/tools/v8windbg/src/js-stack.cc | 39 +- 2236 files changed, 66632 insertions(+), 35958 deletions(-) create mode 100644 deps/v8/.bazelrc create mode 100644 deps/v8/.mailmap create mode 100644 deps/v8/BUILD.bazel create mode 100644 deps/v8/WORKSPACE create mode 100644 deps/v8/bazel/BUILD.icu create mode 100644 deps/v8/bazel/BUILD.zlib create mode 100644 deps/v8/bazel/OWNERS create mode 100644 deps/v8/bazel/defs.bzl create mode 100755 deps/v8/bazel/generate-inspector-files.sh rename deps/v8/src/{ => base}/numbers/bignum-dtoa.cc (99%) rename deps/v8/src/{ => base}/numbers/bignum-dtoa.h (86%) rename deps/v8/src/{ => base}/numbers/bignum.cc (99%) rename deps/v8/src/{ => base}/numbers/bignum.h (95%) rename deps/v8/src/{ => base}/numbers/cached-powers.cc (98%) rename deps/v8/src/{ => base}/numbers/cached-powers.h (87%) rename deps/v8/src/{ => base}/numbers/diy-fp.cc (92%) rename deps/v8/src/{ => base}/numbers/diy-fp.h (92%) rename deps/v8/src/{ => base}/numbers/double.h (97%) rename deps/v8/src/{ => base}/numbers/dtoa.cc (88%) rename deps/v8/src/{ => base}/numbers/dtoa.h (89%) rename deps/v8/src/{ => base}/numbers/fast-dtoa.cc (99%) rename deps/v8/src/{ => base}/numbers/fast-dtoa.h (84%) rename deps/v8/src/{ => base}/numbers/fixed-dtoa.cc (98%) rename deps/v8/src/{ => base}/numbers/fixed-dtoa.h (73%) rename deps/v8/src/{ => base}/numbers/strtod.cc (97%) rename deps/v8/src/{ => base}/numbers/strtod.h (59%) create mode 100644 deps/v8/src/base/strings.cc create mode 100644 deps/v8/src/base/strings.h rename deps/v8/src/{utils => base}/vector.h (95%) create mode 100644 deps/v8/src/baseline/baseline-batch-compiler.cc create mode 100644 deps/v8/src/baseline/baseline-batch-compiler.h delete mode 100644 deps/v8/src/baseline/baseline-osr-inl.h create mode 100644 deps/v8/src/baseline/mips/baseline-assembler-mips-inl.h create mode 100644 deps/v8/src/baseline/mips/baseline-compiler-mips-inl.h create mode 100644 deps/v8/src/baseline/mips64/baseline-assembler-mips64-inl.h create mode 100644 deps/v8/src/baseline/mips64/baseline-compiler-mips64-inl.h create mode 100644 deps/v8/src/bigint/div-burnikel.cc create mode 100644 deps/v8/src/bigint/div-helpers.cc create mode 100644 deps/v8/src/bigint/div-helpers.h create mode 100644 deps/v8/src/bigint/div-schoolbook.cc create mode 100644 deps/v8/src/bigint/mul-fft.cc create mode 100644 deps/v8/src/bigint/mul-karatsuba.cc create mode 100644 deps/v8/src/bigint/mul-toom.cc create mode 100644 deps/v8/src/bigint/tostring.cc create mode 100644 deps/v8/src/bigint/util.h create mode 100644 deps/v8/src/compiler/fast-api-calls.cc create mode 100644 deps/v8/src/compiler/fast-api-calls.h create mode 100644 deps/v8/src/logging/runtime-call-stats-scope.h create mode 100644 deps/v8/src/objects/object-type.cc create mode 100644 deps/v8/src/objects/object-type.h create mode 100644 deps/v8/src/objects/templates.cc create mode 100644 deps/v8/src/torque/cpp-builder.cc create mode 100644 deps/v8/src/torque/cpp-builder.h create mode 100644 deps/v8/src/wasm/code-space-access.cc create mode 100644 deps/v8/src/wasm/init-expr-interface.cc create mode 100644 deps/v8/src/wasm/init-expr-interface.h create mode 100644 deps/v8/test/bigint/BUILD.gn create mode 100644 deps/v8/test/bigint/DEPS create mode 100644 deps/v8/test/bigint/bigint-shell.cc create mode 100644 deps/v8/test/bigint/bigint.status create mode 100644 deps/v8/test/bigint/testcfg.py create mode 100644 deps/v8/test/cctest/compiler/test-calls-with-arraylike-or-spread.cc delete mode 100644 deps/v8/test/cctest/compiler/test-run-intrinsics.cc rename deps/v8/test/cctest/interpreter/bytecode_expectations/{IIFEWithoutOneshotOpt.golden => IIFE.golden} (100%) delete mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/IIFEWithOneshotOpt.golden rename deps/v8/test/cctest/interpreter/bytecode_expectations/{PropertyLoadStoreWithoutOneShot.golden => PropertyLoadStore.golden} (100%) delete mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyLoadStoreOneShot.golden create mode 100644 deps/v8/test/cctest/libsampler/signals-and-mutexes.cc create mode 100644 deps/v8/test/cctest/test-ignition-statistics-extension.cc create mode 100644 deps/v8/test/cctest/wasm/test-liftoff-for-fuzzing.cc rename deps/v8/test/inspector/debugger/{get-possible-breakpoints-master-expected.txt => get-possible-breakpoints-main-expected.txt} (100%) rename deps/v8/test/inspector/debugger/{get-possible-breakpoints-master.js => get-possible-breakpoints-main.js} (100%) create mode 100644 deps/v8/test/inspector/debugger/stepping-async-generator-expected.txt create mode 100644 deps/v8/test/inspector/debugger/stepping-async-generator.js create mode 100644 deps/v8/test/inspector/debugger/stepping-generator-expected.txt create mode 100644 deps/v8/test/inspector/debugger/stepping-generator-parameters-expected.txt create mode 100644 deps/v8/test/inspector/debugger/stepping-generator-parameters.js create mode 100644 deps/v8/test/inspector/debugger/stepping-generator.js create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1081162-expected.txt create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1081162.js create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1222065-expected.txt create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1222065.js create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1233401-expected.txt create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1233401.js create mode 100644 deps/v8/test/inspector/runtime/call-function-on-side-effect-free-expected.txt create mode 100644 deps/v8/test/inspector/runtime/call-function-on-side-effect-free.js create mode 100644 deps/v8/test/inspector/runtime/exception-thrown-metadata-expected.txt create mode 100644 deps/v8/test/inspector/runtime/exception-thrown-metadata.js create mode 100644 deps/v8/test/intl/date-format/timezone-name-extended.js create mode 100644 deps/v8/test/intl/displaynames/calendar-v2.js create mode 100644 deps/v8/test/intl/displaynames/constructor-order-v2.js create mode 100644 deps/v8/test/intl/displaynames/constructor-v2.js create mode 100644 deps/v8/test/intl/displaynames/date-time-field-v2.js create mode 100644 deps/v8/test/intl/displaynames/resolved-options-v2.js create mode 100644 deps/v8/test/intl/locale/locale-calendars.js create mode 100644 deps/v8/test/intl/locale/locale-collations.js create mode 100644 deps/v8/test/intl/locale/locale-info-no-undefined.js create mode 100644 deps/v8/test/intl/locale/locale-info-timezones-sorted.js create mode 100644 deps/v8/test/intl/locale/locale-numberingSystems.js create mode 100644 deps/v8/test/intl/localematcher/bestfit-known-locales.js create mode 100644 deps/v8/test/intl/localematcher/bestfit-macrolanguages.js create mode 100644 deps/v8/test/intl/localematcher/bestfit-supplemental-files.js create mode 100644 deps/v8/test/intl/localematcher/bestfit-supportedLocalesOf-subset.js create mode 100644 deps/v8/test/js-perf-test/SwitchStatements/run.js create mode 100644 deps/v8/test/js-perf-test/SwitchStatements/switch_statement.js create mode 100644 deps/v8/test/message/fail/undefined-keyed-computed-property.js create mode 100644 deps/v8/test/message/fail/undefined-keyed-computed-property.out create mode 100644 deps/v8/test/message/fail/undefined-keyed-number-property.js create mode 100644 deps/v8/test/message/fail/undefined-keyed-number-property.out create mode 100644 deps/v8/test/message/fail/undefined-keyed-string-property.js create mode 100644 deps/v8/test/message/fail/undefined-keyed-string-property.out create mode 100644 deps/v8/test/mjsunit/baseline/batch-compilation.js create mode 100644 deps/v8/test/mjsunit/compiler/call-with-arraylike-or-spread-2.js create mode 100644 deps/v8/test/mjsunit/compiler/call-with-arraylike-or-spread-3.js create mode 100644 deps/v8/test/mjsunit/compiler/call-with-arraylike-or-spread-4.js create mode 100644 deps/v8/test/mjsunit/compiler/call-with-arraylike-or-spread-5.js create mode 100644 deps/v8/test/mjsunit/compiler/call-with-arraylike-or-spread-6.js create mode 100644 deps/v8/test/mjsunit/compiler/call-with-arraylike-or-spread-7.js create mode 100644 deps/v8/test/mjsunit/compiler/call-with-arraylike-or-spread.js create mode 100644 deps/v8/test/mjsunit/compiler/fast-api-sequences.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-1198705.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-1199345.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-1200490.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-1217562.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-1224277.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-1225607.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-1226988.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-1227324.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-crbug-1209558.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-crbug-1211215.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-crbug-1221812.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-crbug-1223107.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-crbug-1226264.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-crbug-1227677.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-crbug-1228233.js create mode 100644 deps/v8/test/mjsunit/compiler/verify-type.js create mode 100644 deps/v8/test/mjsunit/d8/d8-realm-explicit-scope.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/mod-special-cases.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/mul-special-cases.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/regress-fftmul-2.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/regress-fftmul.js create mode 100644 deps/v8/test/mjsunit/harmony/has-own.js delete mode 100644 deps/v8/test/mjsunit/ignition/ignition-statistics-extension.js create mode 100644 deps/v8/test/mjsunit/regress/asm/regress-1223839.js create mode 100644 deps/v8/test/mjsunit/regress/regress-11810.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1212244.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1212404.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1220974.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1223733.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1225300.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1225561.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1227568.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1195977.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1197053.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1201938.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1209405.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1224142.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-1207263.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-1215808.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-1220855.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-1231950.js rename deps/v8/test/mjsunit/tools/{trace-ic.js => log-ic.js} (91%) create mode 100644 deps/v8/test/mjsunit/wasm/array-copy-benchmark.js create mode 100644 deps/v8/test/mjsunit/wasm/exceptions-api.js create mode 100644 deps/v8/test/mjsunit/wasm/liftoff-debug.js create mode 100644 deps/v8/test/mjsunit/wasm/tagged-stack-parameters.js create mode 100644 deps/v8/test/mjsunit/wasm/wasm-array-js-interop.js create mode 100644 deps/v8/test/mjsunit/wasm/wasm-struct-js-interop.js create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot.js rename deps/v8/test/unittests/{utils => base}/vector-unittest.cc (69%) create mode 100644 deps/v8/third_party/jinja2/patches/0001-jinja2-make-compiled-template-deterministic-for-pyth.patch create mode 100644 deps/v8/third_party/zlib/contrib/minizip/minizip.md create mode 100644 deps/v8/third_party/zlib/patches/0008-minizip-zip-unzip-tools.patch create mode 100644 deps/v8/tools/README.md create mode 100644 deps/v8/tools/bazel/.gitignore create mode 100644 deps/v8/tools/bazel/bazel.sha1 rename deps/v8/tools/msan/{blacklist.txt => ignorelist.txt} (100%) delete mode 100644 deps/v8/tools/node/README.md delete mode 100755 deps/v8/tools/node/fetch_deps.py delete mode 100755 deps/v8/tools/node/node_common.py create mode 100644 deps/v8/tools/package-lock.json create mode 100644 deps/v8/tools/package.json create mode 100644 deps/v8/tools/system-analyzer/log/tick.mjs create mode 100644 deps/v8/tools/system-analyzer/log/timer.mjs create mode 100644 deps/v8/tools/system-analyzer/lws-middleware.js create mode 100644 deps/v8/tools/system-analyzer/view/property-link-table-template.html create mode 100644 deps/v8/tools/system-analyzer/view/property-link-table.mjs create mode 100644 deps/v8/tools/system-analyzer/view/timeline/timeline-track-base.mjs create mode 100644 deps/v8/tools/system-analyzer/view/timeline/timeline-track-map.mjs create mode 100644 deps/v8/tools/system-analyzer/view/timeline/timeline-track-stacked-base.mjs create mode 100644 deps/v8/tools/system-analyzer/view/timeline/timeline-track-tick.mjs create mode 100644 deps/v8/tools/system-analyzer/view/timeline/timeline-track-timer.mjs delete mode 100644 deps/v8/tools/testrunner/local/junit_output.py create mode 100644 deps/v8/tools/testrunner/testproc/sequence.py create mode 100644 deps/v8/tools/testrunner/testproc/sequence_unittest.py create mode 100644 deps/v8/tools/unittests/testdata/testroot3/d8_mocked.py create mode 100644 deps/v8/tools/unittests/testdata/testroot3/test/sweet/sweet.status create mode 100644 deps/v8/tools/unittests/testdata/testroot3/test/sweet/testcfg.py create mode 100644 deps/v8/tools/unittests/testdata/testroot3/v8_build_config.json diff --git a/deps/v8/.bazelrc b/deps/v8/.bazelrc new file mode 100644 index 00000000000000..e0127628ca93aa --- /dev/null +++ b/deps/v8/.bazelrc @@ -0,0 +1,26 @@ +# 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. + +# V8 bazel port only supports clang +build --action_env=BAZEL_COMPILER=clang +build --action_env=CC=clang +build --action_env=CXX=clang++ +build --action_env=PATH + +# V8 debug config +build:debug --compilation_mode=dbg +build:debug --config=v8_enable_debugging_features +build:debug --//:v8_enable_fast_mksnapshot +build:debug --//:v8_enable_backtrace + +# v8_enable_debugging_features flags +build:v8_enable_debugging_features --//:v8_enable_verify_heap +build:v8_enable_debugging_features --//:v8_enable_object_print +build:v8_enable_debugging_features --//:v8_enable_disassembler +build:v8_enable_debugging_features --//:v8_enable_trace_maps +build:v8_enable_debugging_features --//:v8_enable_test_features +build:v8_enable_debugging_features --//:v8_enable_v8_checks +build:v8_enable_debugging_features --//:v8_code_comments +build:v8_enable_debugging_features --//:v8_enable_debug_code +build:v8_enable_debugging_features --//:v8_enable_snapshot_native_code_counters diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index b340100517a5a4..315f3ae0be65ad 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -51,6 +51,7 @@ /test/benchmarks/data /test/fuzzer/wasm_corpus /test/fuzzer/wasm_corpus.tar.gz +!/test/mjsunit/tools/*.log /test/mozilla/data /test/test262/data /test/test262/harness @@ -111,7 +112,10 @@ turbo*.cfg turbo*.dot turbo*.json v8.ignition_dispatches_table.json - +bazel-bin +bazel-out +bazel-testlogs +bazel-v8 !/third_party/jinja2 !/third_party/markupsafe !/third_party/zlib diff --git a/deps/v8/.mailmap b/deps/v8/.mailmap new file mode 100644 index 00000000000000..7f2e3b9e5e9098 --- /dev/null +++ b/deps/v8/.mailmap @@ -0,0 +1,14 @@ +# 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. + +# People change their names or email addresses for many reasons. This +# list makes sure people’s preferences are respected when using Git +# commands such as `git log` or `git blame`. +# +# See https://git-scm.com/docs/gitmailmap for more information. +# +# Please keep the list sorted. + +Clemens Backes Clemens Hammacher +Timothy Gu diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index 8b0d38adfc4f04..d9eb05985c555c 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -86,7 +86,6 @@ Daniel Andersson Daniel Bevenius Daniel Dromboski Daniel James -Darshan Sen David Carlier David Manouchehri Deepak Mohan @@ -127,6 +126,7 @@ Jay Freeman James Pike James M Snell Javad Amiri +Jesper van den Ende Ji Qiu Jianghua Yang Jiawen Geng @@ -164,6 +164,7 @@ Michael Lutz Michael Mclaughlin Michael Smith Michaël Zasso +Mihir Shah Mike Gilbert Mike Pennisi Mikhail Gusarov @@ -213,6 +214,7 @@ Seo Sanghyeon Shawn Anastasio Shawn Presser Stefan Penner +Stephan Hartmann Stephen Belanger Sylvestre Ledru Taketoshi Aono @@ -229,6 +231,7 @@ Victor Costan Vlad Burlik Vladimir Krivosheev Vladimir Shutoff +Wael Almattar Wei Wu Wenlu Wang Wenyu Zhao @@ -247,6 +250,7 @@ Yuri Iozzelli Zac Hansen Zeynep Cankara Zhao Jiazhong +Zheng Liu Zhongping Wang 柳荣一 Tianping Yang diff --git a/deps/v8/BUILD.bazel b/deps/v8/BUILD.bazel new file mode 100644 index 00000000000000..e0d5ce713852ca --- /dev/null +++ b/deps/v8/BUILD.bazel @@ -0,0 +1,3052 @@ +# 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. + +load("@bazel_skylib//lib:selects.bzl", "selects") +load( + "@v8//:bazel/defs.bzl", + "v8_binary", + "v8_config", + "v8_custom_config", + "v8_raw_flag", + "v8_flag", + "v8_int", + "v8_string", + "v8_library", + "v8_torque", + "v8_mksnapshot", +) + +# ================================================= +# Configuration settings +# ================================================= + +config_setting( + name = "is_debug", + values = { + "compilation_mode": "dbg", + }, +) + +config_setting( + name = "is_k8", + values = {"cpu": "k8"}, +) + +config_setting( + name = "is_darwin", + values = {"cpu": "darwin"}, +) + +selects.config_setting_group( + name = "is_x64", + match_any = [":is_k8", ":is_darwin"], +) + +config_setting( + name = "is_arm64", + values = { + "host_cpu": "k8", + "cpu": "arm", + }, +) + +config_setting( + name = "is_ia32", + values = { + "host_cpu": "k8", + "cpu": "x86", + }, +) + +config_setting( + name = "is_arm", + values = { + "host_cpu": "k8", + "cpu": "armeabi-v7a", + }, +) + +selects.config_setting_group( + name = "is_32bits", + match_any = [":is_ia32", ":is_arm"], +) + +config_setting( + name = "is_linux", + constraint_values = ["@platforms//os:linux"], +) + +config_setting( + name = "is_android", + constraint_values = ["@platforms//os:android"], +) + +config_setting( + name = "is_macos", + constraint_values = ["@platforms//os:macos"], +) + +selects.config_setting_group( + name = "is_posix", + match_any = [":is_linux", ":is_android", ":is_macos"], +) + +config_setting( + name = "is_linux_x64", + constraint_values = ["@platforms//os:linux"], + values = {"cpu": "k8"}, +) + +config_setting( + name = "is_macos_x64", + constraint_values = ["@platforms//os:macos"], + values = {"cpu": "darwin"}, +) + +selects.config_setting_group( + name = "is_linux_x64_or_macos_x64", + match_any = [":is_linux_x64", ":is_macos_x64"], +) + +config_setting( + name = "is_android_x86", + constraint_values = ["@platforms//os:android"], + values = {"cpu": "x86"}, +) + +# ================================================= +# Flags +# ================================================= + +# V8 GN flags not currently supported: +# v8_custom_deps +# v8_embed_script +# v8_embedder_string +# v8_promise_internal_field_count +# v8_enable_vtunejit +# v8_enable_vtunetracemark +# v8_enable_fast_torque +# v8_win64_unwinding_info +# v8_enable_31bit_smis_on_64bit_arch +# v8_enable_trace_unoptimized +# v8_enable_trace_ignition +# v8_enable_trace_baseline_exec +# v8_enable_trace_feedback_updates +# v8_enable_atomic_object_field_writes +# v8_enable_atomic_marking_state +# v8_enable_concurrent_marking +# v8_enable_ignition_dispatch_counting +# v8_enable_builtins_profiling +# v8_enable_builtins_profiling_verbose +# v8_builtins_profiling_log_file +# v8_enable_short_builtin_calls +# v8_enable_external_code_space +# v8_postmortem_support +# v8_use_siphash +# v8_no_inline +# v8_os_page_size +# v8_can_use_fpu_instructions +# v8_use_mips_abi_hardfloat +# v8_enable_gdbjit +# v8_untrusted_code_mitigations +# v8_enable_minor_mc +# v8_check_header_includes +# v8_enable_shared_ro_heap +# v8_enable_lazy_source_positions +# v8_enable_third_party_heap +# v8_third_party_heap_files +# v8_disable_write_barriers +# v8_enable_unconditional_write_barriers +# v8_enable_single_generation +# v8_enable_regexp_interpreter_threaded_dispatch +# v8_verify_torque_generation_invariance +# v8_enable_snapshot_compression +# v8_control_flow_integrity +# cppgc_enable_object_names +# cppgc_enable_caged_heap +# cppgc_enable_verify_live_bytes +# cppgc_enable_check_assignments_in_prefinalizers +# cppgc_enable_young_generation +# v8_enable_zone_compression +# v8_enable_heap_sandbox +# v8_enable_precise_zone_stats +# v8_enable_swiss_name_dictionary +# v8_generate_external_defines_header +# v8_dict_property_const_tracking +# v8_enable_map_packing +# v8_allow_javascript_in_promise_hooks +# v8_enable_allocation_folding +# v8_allocation_site_tracking + +v8_string(name = "v8_root", default = ".") + +v8_flag(name = "v8_android_log_stdout") +v8_flag(name = "v8_annotate_torque_ir") + +v8_flag(name = "v8_code_comments") + +v8_flag(name = "v8_deprecation_warnings", default = True) +v8_flag(name = "v8_imminent_deprecation_warnings", default = True) + +v8_flag(name = "v8_enable_backtrace") +v8_flag(name = "v8_enable_debug_code") +v8_flag(name = "v8_enable_disassembler") +v8_flag(name = "v8_enable_handle_zapping", default = True) +v8_flag(name = "v8_enable_hugepage") +v8_flag(name = "v8_enable_fast_mksnapshot") +v8_flag(name = "v8_enable_future") +v8_flag(name = "v8_enable_i18n_support", default = True) +v8_flag(name = "v8_enable_lazy_source_positions", default = True) +v8_flag(name = "v8_enable_minor_mc", default = True) +v8_flag(name = "v8_enable_object_print") +v8_flag(name = "v8_enable_slow_dchecks") +v8_flag(name = "v8_enable_snapshot_code_comments") +v8_flag(name = "v8_enable_snapshot_native_code_counters") +v8_flag(name = "v8_enable_trace_maps") +v8_flag(name = "v8_enable_v8_checks") +v8_flag(name = "v8_enable_verify_csa") +v8_flag(name = "v8_enable_verify_heap") +v8_flag(name = "v8_enable_verify_predictable") +v8_flag(name = "v8_enable_test_features") +v8_flag(name = "v8_enable_webassembly", default = True) + +v8_int(name = "v8_typed_array_max_size_in_heap", default = 64) + +# Pointer compression, true by default if x64 or arm64. +v8_raw_flag(name = "v8_enable_pointer_compression") +selects.config_setting_group( + name = "is_v8_enable_pointer_compression", + match_any = [ ":raw_v8_enable_pointer_compression", ":is_x64", ":is_arm64" ], +) +# Pointer cage, true by default if v8_enable_pointer_compression. +v8_flag(name = "v8_enable_pointer_compression_shared_cage", default = True) +# Enable shared cage if v8_enable_pointer_compression +# and v8_enable_pointer_compression_shared_cage. +selects.config_setting_group( + name = "enable_pointer_compression_shared_cage", + match_all = [ + ":is_v8_enable_pointer_compression", + ":is_v8_enable_pointer_compression_shared_cage", + ], +) +# Enable isolated cage if v8_enable_pointer_compression and +# NOT v8_enable_pointer_compression_shared_cage. +selects.config_setting_group( + name = "enable_pointer_compression_isolated_cage", + match_all = [ + ":is_v8_enable_pointer_compression", + ":is_not_v8_enable_pointer_compression_shared_cage", + ], +) + +# Enable -rdynamic. +selects.config_setting_group( + name = "should_add_rdynamic", + match_all = [ ":is_linux", ":is_v8_enable_backtrace" ], +) + +v8_custom_config(name = "default") + +v8_config( + name = "define_flags", + conditional_defines = { + "v8_android_log_stdout": "V8_ANDROID_LOG_STDOUT", + "v8_code_comments": "V8_CODE_COMMENTS", + "v8_deprecation_warnings": "V8_DEPRECATION_WARNINGS", + "v8_imminent_deprecation_warnings": "V8_IMMINENT_DEPRECATION_WARNINGS", + "v8_enable_debug_code": "V8_ENABLE_DEBUG_CODE", + "v8_enable_disassembler": "ENABLE_DISASSEMBLER", + "v8_enable_handle_zapping": "ENABLE_HANDLE_ZAPPING", + "v8_enable_hugepage": "ENABLE_HUGEPAGE", + "v8_enable_future": "V8_ENABLE_FUTURE", + "v8_enable_i18n_support": "V8_INTL_SUPPORT", + "v8_enable_lazy_source_positions": "V8_ENABLE_LAZY_SOURCE_POSITIONS", + "v8_enable_minor_mc": "ENABLE_MINOR_MC", + "v8_enable_object_print": "OBJECT_PRINT", + "v8_enable_slow_dchecks": "ENABLE_SLOW_DCHECKS", + "v8_enable_snapshot_native_code_counters": + "V8_SNAPSHOT_NATIVE_CODE_COUNTERS", + "v8_enable_trace_maps": "V8_TRACE_MAPS", + "v8_enable_v8_checks": "V8_ENABLE_CHECKS", + "v8_enable_verify_csa": "ENABLE_VERIFY_CSA", + "v8_enable_verify_heap": "VERIFY_HEAP", + "v8_enable_verify_predictable": "VERIFY_PREDICTABLE", + "v8_enable_webassembly": "V8_ENABLE_WEBASSEMBLY", + }, + defines = [ + "GOOGLE3", + "CHROMIUM_ZLIB_NO_CHROMECONF", + "V8_ADVANCED_BIGINT_ALGORITHMS", + "V8_CONCURRENT_MARKING", + ] + select({ + ":is_debug": [ "DEBUG" ], + "//conditions:default": [], + }) + select({ + ":is_ia32": [ "V8_TARGET_ARCH_IA32" ], + ":is_x64": [ "V8_TARGET_ARCH_X64" ], + ":is_arm": [ + "V8_TARGET_ARCH_ARM", + "CAN_USE_ARMV7_INSTRUCTIONS", + "CAN_USE_VFP3_INSTRUCTIONS", + ], + ":is_arm64": [ "V8_TARGET_ARCH_ARM64" ], + }) + select({ + ":is_android": [ + "V8_HAVE_TARGET_OS", + "V8_TARGET_OS_ANDROID", + ], + ":is_linux": [ + "V8_HAVE_TARGET_OS", + "V8_TARGET_OS_LINUX", + ], + ":is_macos": [ + "V8_HAVE_TARGET_OS", + "V8_TARGET_OS_MACOSX", + ], + }) + select({ + ":is_android_x86": [ "DISABLE_UNTRUSTED_CODE_MITIGATIONS" ], + "//conditions:default": [], + }) + select({ + ":is_v8_enable_pointer_compression": [ + "V8_COMPRESS_POINTERS", + "V8_31BIT_SMIS_ON_64BIT_ARCH", + ], + "//conditions:default": [], + }) + select({ + ":enable_pointer_compression_shared_cage": [ + "V8_COMPRESS_POINTERS_IN_SHARED_CAGE" + ], + ":enable_pointer_compression_isolated_cage": [ + "V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE" + ], + "//conditions:default": [], + }) + select({ + ":is_v8_enable_test_features": [ + "V8_ENABLE_ALLOCATION_TIMEOUT", + "V8_ENABLE_FORCE_SLOW_PATH", + "V8_ENABLE_DOUBLE_CONST_STORE_CHECK", + ], + "//conditions:default": [], + }), + deps = [ ":default" ], +) + +# ================================================= +# File group rules +# ================================================= + +filegroup( + name = "v8_config_headers_files", + srcs = [ + "include/v8-platform.h", + "include/v8config.h", + ], +) + +filegroup( + name = "v8_version_files", + srcs = [ + "include/v8-value-serializer-version.h", + "include/v8-version-string.h", + "include/v8-version.h", + ], +) + +filegroup( + name = "cppgc_headers_files", + srcs = [ + "include/cppgc/allocation.h", + "include/cppgc/common.h", + "include/cppgc/custom-space.h", + "include/cppgc/default-platform.h", + "include/cppgc/ephemeron-pair.h", + "include/cppgc/explicit-management.h", + "include/cppgc/garbage-collected.h", + "include/cppgc/heap-consistency.h", + "include/cppgc/heap-state.h", + "include/cppgc/heap-statistics.h", + "include/cppgc/heap.h", + "include/cppgc/internal/api-constants.h", + "include/cppgc/internal/atomic-entry-flag.h", + "include/cppgc/internal/caged-heap-local-data.h", + "include/cppgc/internal/compiler-specific.h", + "include/cppgc/internal/finalizer-trait.h", + "include/cppgc/internal/gc-info.h", + "include/cppgc/internal/logging.h", + "include/cppgc/internal/name-trait.h", + "include/cppgc/internal/persistent-node.h", + "include/cppgc/internal/pointer-policies.h", + "include/cppgc/internal/prefinalizer-handler.h", + "include/cppgc/internal/write-barrier.h", + "include/cppgc/liveness-broker.h", + "include/cppgc/macros.h", + "include/cppgc/member.h", + "include/cppgc/name-provider.h", + "include/cppgc/object-size-trait.h", + "include/cppgc/persistent.h", + "include/cppgc/platform.h", + "include/cppgc/prefinalizer.h", + "include/cppgc/process-heap-statistics.h", + "include/cppgc/sentinel-pointer.h", + "include/cppgc/source-location.h", + "include/cppgc/trace-trait.h", + "include/cppgc/type-traits.h", + "include/cppgc/visitor.h", + ] +) + +filegroup( + name = "v8_headers_files", + srcs = [ + ":cppgc_headers_files", + ":v8_version_files", + "include/v8-cppgc.h", + "include/v8-fast-api-calls.h", + "include/v8-internal.h", + "include/v8-profiler.h", + "include/v8-util.h", + "include/v8.h", + ], +) + +filegroup( + name = "v8_flags", + srcs = [ + "src/flags/flag-definitions.h", + "src/flags/flags.h", + ] + select({ + "is_v8_enable_webassembly": [ "src/wasm/wasm-feature-flags.h" ], + "//conditions:default": [], + }), +) + +filegroup( + name = "v8_shared_internal_headers", + srcs = [ + "src/common/globals.h", + "testing/gtest/include/gtest/gtest_prod.h", + ] + select({ + "is_v8_enable_webassembly": [ + "src/wasm/wasm-constants.h", + "src/wasm/wasm-limits.h", + ], + "//conditions:default": [], + }), +) + +filegroup( + name = "v8_libbase_files", + srcs = [ + ":v8_flags", + ":v8_config_headers_files", + ":v8_headers_files", + "src/base/vlq.h", + "src/base/address-region.h", + "src/base/atomic-utils.h", + "src/base/atomicops.h", + "src/base/atomicops_internals_atomicword_compat.h", + "src/base/base-export.h", + "src/base/bit-field.h", + "src/base/bits-iterator.h", + "src/base/bits.cc", + "src/base/bits.h", + "src/base/bounded-page-allocator.cc", + "src/base/bounded-page-allocator.h", + "src/base/bounds.h", + "src/base/build_config.h", + "src/base/compiler-specific.h", + "src/base/cpu.cc", + "src/base/cpu.h", + "src/base/debug/stack_trace.cc", + "src/base/debug/stack_trace.h", + "src/base/division-by-constant.cc", + "src/base/division-by-constant.h", + "src/base/enum-set.h", + "src/base/export-template.h", + "src/base/file-utils.cc", + "src/base/file-utils.h", + "src/base/flags.h", + "src/base/free_deleter.h", + "src/base/functional.cc", + "src/base/functional.h", + "src/base/hashmap-entry.h", + "src/base/hashmap.h", + "src/base/ieee754.cc", + "src/base/ieee754.h", + "src/base/immediate-crash.h", + "src/base/iterator.h", + "src/base/lazy-instance.h", + "src/base/logging.cc", + "src/base/logging.h", + "src/base/macros.h", + "src/base/memory.h", + "src/base/numbers/bignum-dtoa.cc", + "src/base/numbers/bignum-dtoa.h", + "src/base/numbers/bignum.cc", + "src/base/numbers/bignum.h", + "src/base/numbers/cached-powers.cc", + "src/base/numbers/cached-powers.h", + "src/base/numbers/diy-fp.cc", + "src/base/numbers/diy-fp.h", + "src/base/numbers/double.h", + "src/base/numbers/dtoa.cc", + "src/base/numbers/dtoa.h", + "src/base/numbers/fast-dtoa.cc", + "src/base/numbers/fast-dtoa.h", + "src/base/numbers/fixed-dtoa.cc", + "src/base/numbers/fixed-dtoa.h", + "src/base/numbers/strtod.cc", + "src/base/numbers/strtod.h", + "src/base/once.cc", + "src/base/once.h", + "src/base/optional.h", + "src/base/overflowing-math.h", + "src/base/page-allocator.cc", + "src/base/page-allocator.h", + "src/base/platform/condition-variable.cc", + "src/base/platform/condition-variable.h", + "src/base/platform/elapsed-timer.h", + "src/base/platform/mutex.cc", + "src/base/platform/mutex.h", + "src/base/platform/platform.h", + "src/base/platform/semaphore.cc", + "src/base/platform/semaphore.h", + "src/base/platform/time.cc", + "src/base/platform/time.h", + "src/base/platform/wrappers.h", + "src/base/region-allocator.cc", + "src/base/region-allocator.h", + "src/base/ring-buffer.h", + "src/base/safe_conversions.h", + "src/base/safe_conversions_arm_impl.h", + "src/base/safe_conversions_impl.h", + "src/base/small-vector.h", + "src/base/strings.cc", + "src/base/strings.h", + "src/base/sys-info.cc", + "src/base/sys-info.h", + "src/base/template-utils.h", + "src/base/timezone-cache.h", + "src/base/threaded-list.h", + "src/base/type-traits.h", + "src/base/utils/random-number-generator.cc", + "src/base/utils/random-number-generator.h", + "src/base/vector.h", + "src/base/v8-fallthrough.h", + "src/base/vlq-base64.cc", + "src/base/vlq-base64.h", + ] + select({ + ":is_posix": [ + "src/base/platform/platform-posix.cc", + "src/base/platform/platform-posix.h", + "src/base/platform/platform-posix-time.cc", + "src/base/platform/platform-posix-time.h", + ], + "//conditions:default": [], + }) + select({ + ":is_linux": [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-linux.cc", + ], + "is_android": [ + "src/base/debug/stack_trace_android.cc", + "src/base/platform/platform-linux.cc", + ], + "is_macos": [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-macos.cc", + ], + }), +) + +filegroup( + name = "v8_libplatform_files", + srcs = [ + "base/trace_event/common/trace_event_common.h", + "include/libplatform/libplatform.h", + "include/libplatform/libplatform-export.h", + "include/libplatform/v8-tracing.h", + "src/libplatform/default-foreground-task-runner.cc", + "src/libplatform/default-foreground-task-runner.h", + "src/libplatform/default-job.cc", + "src/libplatform/default-job.h", + "src/libplatform/default-platform.cc", + "src/libplatform/default-platform.h", + "src/libplatform/default-worker-threads-task-runner.cc", + "src/libplatform/default-worker-threads-task-runner.h", + "src/libplatform/delayed-task-queue.cc", + "src/libplatform/delayed-task-queue.h", + "src/libplatform/task-queue.cc", + "src/libplatform/task-queue.h", + "src/libplatform/tracing/recorder.h", + "src/libplatform/tracing/trace-buffer.cc", + "src/libplatform/tracing/trace-buffer.h", + "src/libplatform/tracing/trace-config.cc", + "src/libplatform/tracing/trace-object.cc", + "src/libplatform/tracing/trace-writer.cc", + "src/libplatform/tracing/trace-writer.h", + "src/libplatform/tracing/tracing-controller.cc", + "src/libplatform/worker-thread.cc", + "src/libplatform/worker-thread.h", + ], +) + +filegroup( + name = "v8_libsampler_files", + srcs = [ + "src/libsampler/sampler.cc", + "src/libsampler/sampler.h", + ], +) + +filegroup( + name = "torque_runtime_support_files", + srcs = [ "src/torque/runtime-support.h" ], +) + +filegroup( + name = "torque_files", + srcs = [ + "src/builtins/aggregate-error.tq", + "src/builtins/array-at.tq", + "src/builtins/array-copywithin.tq", + "src/builtins/array-every.tq", + "src/builtins/array-filter.tq", + "src/builtins/array-find.tq", + "src/builtins/array-findindex.tq", + "src/builtins/array-foreach.tq", + "src/builtins/array-from.tq", + "src/builtins/array-isarray.tq", + "src/builtins/array-join.tq", + "src/builtins/array-lastindexof.tq", + "src/builtins/array-map.tq", + "src/builtins/array-of.tq", + "src/builtins/array-reduce-right.tq", + "src/builtins/array-reduce.tq", + "src/builtins/array-reverse.tq", + "src/builtins/array-shift.tq", + "src/builtins/array-slice.tq", + "src/builtins/array-some.tq", + "src/builtins/array-splice.tq", + "src/builtins/array-unshift.tq", + "src/builtins/array.tq", + "src/builtins/arraybuffer.tq", + "src/builtins/base.tq", + "src/builtins/boolean.tq", + "src/builtins/builtins-bigint.tq", + "src/builtins/builtins-string.tq", + "src/builtins/cast.tq", + "src/builtins/collections.tq", + "src/builtins/constructor.tq", + "src/builtins/conversion.tq", + "src/builtins/convert.tq", + "src/builtins/console.tq", + "src/builtins/data-view.tq", + "src/builtins/finalization-registry.tq", + "src/builtins/frames.tq", + "src/builtins/frame-arguments.tq", + "src/builtins/function.tq", + "src/builtins/growable-fixed-array.tq", + "src/builtins/ic-callable.tq", + "src/builtins/ic-dynamic-check-maps.tq", + "src/builtins/ic.tq", + "src/builtins/internal-coverage.tq", + "src/builtins/internal.tq", + "src/builtins/iterator.tq", + "src/builtins/math.tq", + "src/builtins/number.tq", + "src/builtins/object-fromentries.tq", + "src/builtins/object.tq", + "src/builtins/promise-abstract-operations.tq", + "src/builtins/promise-all.tq", + "src/builtins/promise-all-element-closure.tq", + "src/builtins/promise-any.tq", + "src/builtins/promise-constructor.tq", + "src/builtins/promise-finally.tq", + "src/builtins/promise-misc.tq", + "src/builtins/promise-race.tq", + "src/builtins/promise-reaction-job.tq", + "src/builtins/promise-resolve.tq", + "src/builtins/promise-then.tq", + "src/builtins/promise-jobs.tq", + "src/builtins/proxy-constructor.tq", + "src/builtins/proxy-delete-property.tq", + "src/builtins/proxy-get-property.tq", + "src/builtins/proxy-get-prototype-of.tq", + "src/builtins/proxy-has-property.tq", + "src/builtins/proxy-is-extensible.tq", + "src/builtins/proxy-prevent-extensions.tq", + "src/builtins/proxy-revocable.tq", + "src/builtins/proxy-revoke.tq", + "src/builtins/proxy-set-property.tq", + "src/builtins/proxy-set-prototype-of.tq", + "src/builtins/proxy.tq", + "src/builtins/reflect.tq", + "src/builtins/regexp-exec.tq", + "src/builtins/regexp-match-all.tq", + "src/builtins/regexp-match.tq", + "src/builtins/regexp-replace.tq", + "src/builtins/regexp-search.tq", + "src/builtins/regexp-source.tq", + "src/builtins/regexp-split.tq", + "src/builtins/regexp-test.tq", + "src/builtins/regexp.tq", + "src/builtins/string-at.tq", + "src/builtins/string-endswith.tq", + "src/builtins/string-html.tq", + "src/builtins/string-includes.tq", + "src/builtins/string-indexof.tq", + "src/builtins/string-iterator.tq", + "src/builtins/string-match-search.tq", + "src/builtins/string-pad.tq", + "src/builtins/string-repeat.tq", + "src/builtins/string-replaceall.tq", + "src/builtins/string-slice.tq", + "src/builtins/string-startswith.tq", + "src/builtins/string-substr.tq", + "src/builtins/string-substring.tq", + "src/builtins/string-trim.tq", + "src/builtins/symbol.tq", + "src/builtins/torque-internal.tq", + "src/builtins/typed-array-at.tq", + "src/builtins/typed-array-createtypedarray.tq", + "src/builtins/typed-array-every.tq", + "src/builtins/typed-array-entries.tq", + "src/builtins/typed-array-filter.tq", + "src/builtins/typed-array-find.tq", + "src/builtins/typed-array-findindex.tq", + "src/builtins/typed-array-foreach.tq", + "src/builtins/typed-array-from.tq", + "src/builtins/typed-array-keys.tq", + "src/builtins/typed-array-of.tq", + "src/builtins/typed-array-reduce.tq", + "src/builtins/typed-array-reduceright.tq", + "src/builtins/typed-array-set.tq", + "src/builtins/typed-array-slice.tq", + "src/builtins/typed-array-some.tq", + "src/builtins/typed-array-sort.tq", + "src/builtins/typed-array-subarray.tq", + "src/builtins/typed-array-values.tq", + "src/builtins/typed-array.tq", + "src/builtins/weak-ref.tq", + "src/ic/handler-configuration.tq", + "src/objects/allocation-site.tq", + "src/objects/api-callbacks.tq", + "src/objects/arguments.tq", + "src/objects/bigint.tq", + "src/objects/cell.tq", + "src/objects/code.tq", + "src/objects/contexts.tq", + "src/objects/data-handler.tq", + "src/objects/debug-objects.tq", + "src/objects/descriptor-array.tq", + "src/objects/embedder-data-array.tq", + "src/objects/feedback-cell.tq", + "src/objects/feedback-vector.tq", + "src/objects/fixed-array.tq", + "src/objects/foreign.tq", + "src/objects/free-space.tq", + "src/objects/heap-number.tq", + "src/objects/heap-object.tq", + "src/objects/js-array-buffer.tq", + "src/objects/js-array.tq", + "src/objects/js-collection-iterator.tq", + "src/objects/js-collection.tq", + "src/objects/js-function.tq", + "src/objects/js-generator.tq", + "src/objects/js-objects.tq", + "src/objects/js-promise.tq", + "src/objects/js-proxy.tq", + "src/objects/js-regexp-string-iterator.tq", + "src/objects/js-regexp.tq", + "src/objects/js-weak-refs.tq", + "src/objects/literal-objects.tq", + "src/objects/map.tq", + "src/objects/megadom-handler.tq", + "src/objects/microtask.tq", + "src/objects/module.tq", + "src/objects/name.tq", + "src/objects/oddball.tq", + "src/objects/ordered-hash-table.tq", + "src/objects/primitive-heap-object.tq", + "src/objects/promise.tq", + "src/objects/property-array.tq", + "src/objects/property-cell.tq", + "src/objects/property-descriptor-object.tq", + "src/objects/prototype-info.tq", + "src/objects/regexp-match-info.tq", + "src/objects/scope-info.tq", + "src/objects/script.tq", + "src/objects/shared-function-info.tq", + "src/objects/source-text-module.tq", + "src/objects/stack-frame-info.tq", + "src/objects/string.tq", + "src/objects/struct.tq", + "src/objects/swiss-hash-table-helpers.tq", + "src/objects/swiss-name-dictionary.tq", + "src/objects/synthetic-module.tq", + "src/objects/template-objects.tq", + "src/objects/templates.tq", + "src/objects/torque-defined-classes.tq", + "test/torque/test-torque.tq", + "third_party/v8/builtins/array-sort.tq", + ] + select({ + ":is_v8_enable_webassembly": [ + "src/builtins/wasm.tq", + "src/debug/debug-wasm-objects.tq", + "src/wasm/wasm-objects.tq", + ], + "//conditions:default": [], + }) + select({ + ":is_v8_enable_i18n_support": [ + "src/objects/intl-objects.tq", + "src/objects/js-break-iterator.tq", + "src/objects/js-collator.tq", + "src/objects/js-date-time-format.tq", + "src/objects/js-display-names.tq", + "src/objects/js-list-format.tq", + "src/objects/js-locale.tq", + "src/objects/js-number-format.tq", + "src/objects/js-plural-rules.tq", + "src/objects/js-relative-time-format.tq", + "src/objects/js-segment-iterator.tq", + "src/objects/js-segmenter.tq", + "src/objects/js-segments.tq", + ], + "//conditions:default": [], + }) +) + +filegroup( + name = "torque_base_files", + srcs = [ + "src/torque/ast.h", + "src/torque/cc-generator.cc", + "src/torque/cc-generator.h", + "src/torque/cfg.cc", + "src/torque/cfg.h", + "src/torque/class-debug-reader-generator.cc", + "src/torque/constants.h", + "src/torque/contextual.h", + "src/torque/cpp-builder.cc", + "src/torque/cpp-builder.h", + "src/torque/csa-generator.cc", + "src/torque/csa-generator.h", + "src/torque/declarable.cc", + "src/torque/declarable.h", + "src/torque/declaration-visitor.cc", + "src/torque/declaration-visitor.h", + "src/torque/declarations.cc", + "src/torque/declarations.h", + "src/torque/earley-parser.cc", + "src/torque/earley-parser.h", + "src/torque/global-context.cc", + "src/torque/global-context.h", + "src/torque/implementation-visitor.cc", + "src/torque/implementation-visitor.h", + "src/torque/instance-type-generator.cc", + "src/torque/instructions.cc", + "src/torque/instructions.h", + "src/torque/parameter-difference.h", + "src/torque/server-data.cc", + "src/torque/server-data.h", + "src/torque/source-positions.cc", + "src/torque/source-positions.h", + "src/torque/torque-code-generator.cc", + "src/torque/torque-code-generator.h", + "src/torque/torque-compiler.cc", + "src/torque/torque-compiler.h", + "src/torque/torque-parser.cc", + "src/torque/torque-parser.h", + "src/torque/type-inference.cc", + "src/torque/type-inference.h", + "src/torque/type-oracle.cc", + "src/torque/type-oracle.h", + "src/torque/type-visitor.cc", + "src/torque/type-visitor.h", + "src/torque/types.cc", + "src/torque/types.h", + "src/torque/utils.cc", + "src/torque/utils.h", + ], +) + +filegroup( + name = "v8_base_without_compiler_files", + srcs = [ + ":cppgc_base_files", + ":v8_cppgc_shared_files", + ":v8_bigint", + ":generated_bytecode_builtins_list", + "base/trace_event/common/trace_event_common.h", + "include/cppgc/common.h", + "include/v8-inspector-protocol.h", + "include/v8-inspector.h", + "include/v8-metrics.h", + "include/v8-unwinder-state.h", + "include/v8-wasm-trap-handler-posix.h", + "src/api/api-arguments-inl.h", + "src/api/api-arguments.cc", + "src/api/api-arguments.h", + "src/api/api-inl.h", + "src/api/api-macros.h", + "src/api/api-macros-undef.h", + "src/api/api-natives.cc", + "src/api/api-natives.h", + "src/api/api.cc", + "src/api/api.h", + "src/ast/ast-function-literal-id-reindexer.cc", + "src/ast/ast-function-literal-id-reindexer.h", + "src/ast/ast-source-ranges.h", + "src/ast/ast-traversal-visitor.h", + "src/ast/ast-value-factory.cc", + "src/ast/ast-value-factory.h", + "src/ast/ast.cc", + "src/ast/ast.h", + "src/ast/modules.cc", + "src/ast/modules.h", + "src/ast/prettyprinter.cc", + "src/ast/prettyprinter.h", + "src/ast/scopes.cc", + "src/ast/scopes.h", + "src/ast/source-range-ast-visitor.cc", + "src/ast/source-range-ast-visitor.h", + "src/ast/variables.cc", + "src/ast/variables.h", + "src/baseline/baseline-assembler-inl.h", + "src/baseline/baseline-assembler.h", + "src/baseline/baseline-compiler.cc", + "src/baseline/baseline-compiler.h", + "src/baseline/baseline.cc", + "src/baseline/baseline.h", + "src/baseline/baseline-batch-compiler.h", + "src/baseline/baseline-batch-compiler.cc", + "src/baseline/bytecode-offset-iterator.h", + "src/baseline/bytecode-offset-iterator.cc", + "src/builtins/accessors.cc", + "src/builtins/accessors.h", + "src/builtins/builtins-api.cc", + "src/builtins/builtins-array.cc", + "src/builtins/builtins-arraybuffer.cc", + "src/builtins/builtins-async-module.cc", + "src/builtins/builtins-bigint.cc", + "src/builtins/builtins-callsite.cc", + "src/builtins/builtins-collections.cc", + "src/builtins/builtins-console.cc", + "src/builtins/builtins-constructor.h", + "src/builtins/builtins-dataview.cc", + "src/builtins/builtins-date.cc", + "src/builtins/builtins-definitions.h", + "src/builtins/builtins-descriptors.h", + "src/builtins/builtins-error.cc", + "src/builtins/builtins-function.cc", + "src/builtins/builtins-global.cc", + "src/builtins/builtins-internal.cc", + "src/builtins/builtins-json.cc", + "src/builtins/builtins-number.cc", + "src/builtins/builtins-object.cc", + "src/builtins/builtins-promise.h", + "src/builtins/builtins-reflect.cc", + "src/builtins/builtins-regexp.cc", + "src/builtins/builtins-sharedarraybuffer.cc", + "src/builtins/builtins-string.cc", + "src/builtins/builtins-symbol.cc", + "src/builtins/builtins-trace.cc", + "src/builtins/builtins-typed-array.cc", + "src/builtins/builtins-utils-inl.h", + "src/builtins/builtins-utils.h", + "src/builtins/builtins-weak-refs.cc", + "src/builtins/builtins.cc", + "src/builtins/builtins.h", + "src/builtins/constants-table-builder.cc", + "src/builtins/constants-table-builder.h", + "src/builtins/profile-data-reader.h", + "src/codegen/aligned-slot-allocator.h", + "src/codegen/aligned-slot-allocator.cc", + "src/codegen/assembler-arch.h", + "src/codegen/assembler-inl.h", + "src/codegen/assembler.cc", + "src/codegen/assembler.h", + "src/codegen/bailout-reason.cc", + "src/codegen/bailout-reason.h", + "src/codegen/callable.h", + "src/codegen/code-comments.cc", + "src/codegen/code-comments.h", + "src/codegen/code-desc.cc", + "src/codegen/code-desc.h", + "src/codegen/code-factory.cc", + "src/codegen/code-factory.h", + "src/codegen/code-reference.cc", + "src/codegen/code-reference.h", + "src/codegen/compilation-cache.cc", + "src/codegen/compilation-cache.h", + "src/codegen/compiler.cc", + "src/codegen/compiler.h", + "src/codegen/constant-pool.cc", + "src/codegen/constant-pool.h", + "src/codegen/constants-arch.h", + "src/codegen/cpu-features.h", + "src/codegen/external-reference-encoder.cc", + "src/codegen/external-reference-encoder.h", + "src/codegen/external-reference-table.cc", + "src/codegen/external-reference-table.h", + "src/codegen/external-reference.cc", + "src/codegen/external-reference.h", + "src/codegen/flush-instruction-cache.cc", + "src/codegen/flush-instruction-cache.h", + "src/codegen/handler-table.cc", + "src/codegen/handler-table.h", + "src/codegen/interface-descriptors.cc", + "src/codegen/interface-descriptors-inl.h", + "src/codegen/interface-descriptors.h", + "src/codegen/label.h", + "src/codegen/machine-type.cc", + "src/codegen/machine-type.h", + "src/codegen/macro-assembler-inl.h", + "src/codegen/macro-assembler.h", + "src/codegen/optimized-compilation-info.cc", + "src/codegen/optimized-compilation-info.h", + "src/codegen/pending-optimization-table.cc", + "src/codegen/pending-optimization-table.h", + "src/codegen/register-arch.h", + "src/codegen/register-configuration.cc", + "src/codegen/register-configuration.h", + "src/codegen/register.h", + "src/codegen/reglist.h", + "src/codegen/reloc-info.cc", + "src/codegen/reloc-info.h", + "src/codegen/safepoint-table.cc", + "src/codegen/safepoint-table.h", + "src/codegen/signature.h", + "src/codegen/source-position-table.cc", + "src/codegen/source-position-table.h", + "src/codegen/source-position.cc", + "src/codegen/source-position.h", + "src/codegen/string-constants.cc", + "src/codegen/string-constants.h", + "src/codegen/tick-counter.cc", + "src/codegen/tick-counter.h", + "src/codegen/tnode.cc", + "src/codegen/tnode.h", + "src/codegen/turbo-assembler.cc", + "src/codegen/turbo-assembler.h", + "src/codegen/unoptimized-compilation-info.cc", + "src/codegen/unoptimized-compilation-info.h", + "src/common/assert-scope.cc", + "src/common/assert-scope.h", + "src/common/checks.h", + "src/common/external-pointer-inl.h", + "src/common/external-pointer.h", + "src/common/message-template.h", + "src/common/ptr-compr-inl.h", + "src/common/ptr-compr.h", + "src/compiler-dispatcher/compiler-dispatcher.cc", + "src/compiler-dispatcher/compiler-dispatcher.h", + "src/compiler-dispatcher/optimizing-compile-dispatcher.cc", + "src/compiler-dispatcher/optimizing-compile-dispatcher.h", + "src/date/date.cc", + "src/date/date.h", + "src/date/dateparser-inl.h", + "src/date/dateparser.cc", + "src/date/dateparser.h", + "src/debug/debug-coverage.cc", + "src/debug/debug-coverage.h", + "src/debug/debug-evaluate.cc", + "src/debug/debug-evaluate.h", + "src/debug/debug-frames.cc", + "src/debug/debug-frames.h", + "src/debug/debug-interface.cc", + "src/debug/debug-interface.h", + "src/debug/debug-property-iterator.cc", + "src/debug/debug-property-iterator.h", + "src/debug/debug-scope-iterator.cc", + "src/debug/debug-scope-iterator.h", + "src/debug/debug-scopes.cc", + "src/debug/debug-scopes.h", + "src/debug/debug-stack-trace-iterator.cc", + "src/debug/debug-stack-trace-iterator.h", + "src/debug/debug-type-profile.cc", + "src/debug/debug-type-profile.h", + "src/debug/debug.cc", + "src/debug/debug.h", + "src/debug/interface-types.h", + "src/debug/liveedit.cc", + "src/debug/liveedit.h", + "src/deoptimizer/deoptimize-reason.cc", + "src/deoptimizer/deoptimize-reason.h", + "src/deoptimizer/deoptimized-frame-info.cc", + "src/deoptimizer/deoptimized-frame-info.h", + "src/deoptimizer/deoptimizer.cc", + "src/deoptimizer/deoptimizer.h", + "src/deoptimizer/frame-description.h", + "src/deoptimizer/materialized-object-store.cc", + "src/deoptimizer/materialized-object-store.h", + "src/deoptimizer/translated-state.cc", + "src/deoptimizer/translated-state.h", + "src/deoptimizer/translation-array.cc", + "src/deoptimizer/translation-array.h", + "src/deoptimizer/translation-opcode.h", + "src/diagnostics/basic-block-profiler.cc", + "src/diagnostics/basic-block-profiler.h", + "src/diagnostics/code-tracer.h", + "src/diagnostics/compilation-statistics.cc", + "src/diagnostics/compilation-statistics.h", + "src/diagnostics/disasm.h", + "src/diagnostics/disassembler.cc", + "src/diagnostics/disassembler.h", + "src/diagnostics/eh-frame.cc", + "src/diagnostics/eh-frame.h", + "src/diagnostics/gdb-jit.cc", + "src/diagnostics/gdb-jit.h", + "src/diagnostics/objects-debug.cc", + "src/diagnostics/objects-printer.cc", + "src/diagnostics/perf-jit.cc", + "src/diagnostics/perf-jit.h", + "src/diagnostics/unwinder.cc", + "src/diagnostics/unwinder.h", + "src/execution/arguments-inl.h", + "src/execution/arguments.cc", + "src/execution/arguments.h", + "src/execution/execution.cc", + "src/execution/execution.h", + "src/execution/external-pointer-table.cc", + "src/execution/external-pointer-table.h", + "src/execution/frame-constants.h", + "src/execution/frames-inl.h", + "src/execution/frames.cc", + "src/execution/frames.h", + "src/execution/futex-emulation.cc", + "src/execution/futex-emulation.h", + "src/execution/interrupts-scope.cc", + "src/execution/interrupts-scope.h", + "src/execution/isolate-data.h", + "src/execution/isolate-inl.h", + "src/execution/isolate-utils.h", + "src/execution/isolate-utils-inl.h", + "src/snapshot/embedded/platform-embedded-file-writer-base.h", + "src/snapshot/embedded/embedded-file-writer.h", + "src/execution/isolate.cc", + "src/execution/isolate.h", + "src/execution/local-isolate-inl.h", + "src/execution/local-isolate.cc", + "src/execution/local-isolate.h", + "src/execution/messages.cc", + "src/execution/messages.h", + "src/execution/microtask-queue.cc", + "src/execution/microtask-queue.h", + "src/execution/pointer-authentication.h", + "src/execution/protectors-inl.h", + "src/execution/protectors.cc", + "src/execution/protectors.h", + "src/execution/runtime-profiler.cc", + "src/execution/runtime-profiler.h", + "src/execution/shared-mutex-guard-if-off-thread.h", + "src/execution/simulator-base.cc", + "src/execution/simulator-base.h", + "src/execution/simulator.h", + "src/execution/stack-guard.cc", + "src/execution/stack-guard.h", + "src/execution/thread-id.cc", + "src/execution/thread-id.h", + "src/execution/thread-local-top.cc", + "src/execution/thread-local-top.h", + "src/execution/v8threads.cc", + "src/execution/v8threads.h", + "src/execution/vm-state-inl.h", + "src/execution/vm-state.h", + "src/extensions/cputracemark-extension.cc", + "src/extensions/cputracemark-extension.h", + "src/extensions/externalize-string-extension.cc", + "src/extensions/externalize-string-extension.h", + "src/extensions/gc-extension.cc", + "src/extensions/gc-extension.h", + "src/extensions/ignition-statistics-extension.cc", + "src/extensions/ignition-statistics-extension.h", + "src/extensions/statistics-extension.cc", + "src/extensions/statistics-extension.h", + "src/extensions/trigger-failure-extension.cc", + "src/extensions/trigger-failure-extension.h", + "src/flags/flag-definitions.h", + "src/flags/flags.cc", + "src/flags/flags.h", + "src/handles/global-handles.cc", + "src/handles/global-handles.h", + "src/handles/handles-inl.h", + "src/handles/handles.cc", + "src/handles/handles.h", + "src/handles/local-handles-inl.h", + "src/handles/local-handles.cc", + "src/handles/local-handles.h", + "src/handles/maybe-handles-inl.h", + "src/handles/maybe-handles.h", + "src/handles/persistent-handles.cc", + "src/handles/persistent-handles.h", + "src/heap/allocation-observer.cc", + "src/heap/allocation-observer.h", + "src/heap/allocation-stats.h", + "src/heap/array-buffer-sweeper.cc", + "src/heap/array-buffer-sweeper.h", + "src/heap/barrier.h", + "src/heap/base-space.cc", + "src/heap/base-space.h", + "src/heap/basic-memory-chunk.cc", + "src/heap/basic-memory-chunk.h", + "src/heap/code-object-registry.cc", + "src/heap/code-object-registry.h", + "src/heap/code-range.h", + "src/heap/code-range.cc", + "src/heap/code-stats.cc", + "src/heap/code-stats.h", + "src/heap/collection-barrier.cc", + "src/heap/collection-barrier.h", + "src/heap/combined-heap.cc", + "src/heap/combined-heap.h", + "src/heap/concurrent-allocator-inl.h", + "src/heap/concurrent-allocator.cc", + "src/heap/concurrent-allocator.h", + "src/heap/concurrent-marking.cc", + "src/heap/concurrent-marking.h", + "src/heap/cppgc-js/cpp-heap.cc", + "src/heap/cppgc-js/cpp-heap.h", + "src/heap/cppgc-js/cpp-snapshot.cc", + "src/heap/cppgc-js/cpp-snapshot.h", + "src/heap/cppgc-js/unified-heap-marking-state.h", + "src/heap/cppgc-js/unified-heap-marking-verifier.cc", + "src/heap/cppgc-js/unified-heap-marking-verifier.h", + "src/heap/cppgc-js/unified-heap-marking-visitor.cc", + "src/heap/cppgc-js/unified-heap-marking-visitor.h", + "src/heap/embedder-tracing.cc", + "src/heap/embedder-tracing.h", + "src/heap/factory-base.cc", + "src/heap/factory-base.h", + "src/heap/factory-base-inl.h", + "src/heap/factory-inl.h", + "src/heap/factory.cc", + "src/heap/factory.h", + "src/heap/finalization-registry-cleanup-task.cc", + "src/heap/finalization-registry-cleanup-task.h", + "src/heap/free-list-inl.h", + "src/heap/free-list.cc", + "src/heap/free-list.h", + "src/heap/gc-idle-time-handler.cc", + "src/heap/gc-idle-time-handler.h", + "src/heap/gc-tracer.cc", + "src/heap/gc-tracer.h", + "src/heap/heap-controller.cc", + "src/heap/heap-controller.h", + "src/heap/heap-inl.h", + "src/heap/heap-write-barrier-inl.h", + "src/heap/heap-write-barrier.cc", + "src/heap/heap-write-barrier.h", + "src/heap/heap.cc", + "src/heap/heap.h", + "src/heap/incremental-marking-inl.h", + "src/heap/incremental-marking-job.cc", + "src/heap/incremental-marking-job.h", + "src/heap/incremental-marking.cc", + "src/heap/incremental-marking.h", + "src/heap/index-generator.cc", + "src/heap/index-generator.h", + "src/heap/invalidated-slots-inl.h", + "src/heap/invalidated-slots.cc", + "src/heap/invalidated-slots.h", + "src/heap/large-spaces.cc", + "src/heap/large-spaces.h", + "src/heap/list.h", + "src/heap/local-allocator-inl.h", + "src/heap/local-allocator.h", + "src/heap/local-factory.cc", + "src/heap/local-factory.h", + "src/heap/local-factory-inl.h", + "src/heap/local-heap-inl.h", + "src/heap/local-heap.cc", + "src/heap/local-heap.h", + "src/heap/mark-compact-inl.h", + "src/heap/mark-compact.cc", + "src/heap/mark-compact.h", + "src/heap/marking-barrier.cc", + "src/heap/marking-barrier.h", + "src/heap/marking-barrier-inl.h", + "src/heap/marking-visitor-inl.h", + "src/heap/marking-visitor.h", + "src/heap/marking-worklist-inl.h", + "src/heap/marking-worklist.cc", + "src/heap/marking-worklist.h", + "src/heap/marking.cc", + "src/heap/marking.h", + "src/heap/memory-allocator.cc", + "src/heap/memory-allocator.h", + "src/heap/memory-chunk-inl.h", + "src/heap/memory-chunk-layout.cc", + "src/heap/memory-chunk-layout.h", + "src/heap/memory-chunk.cc", + "src/heap/memory-chunk.h", + "src/heap/memory-measurement-inl.h", + "src/heap/memory-measurement.cc", + "src/heap/memory-measurement.h", + "src/heap/memory-reducer.cc", + "src/heap/memory-reducer.h", + "src/heap/new-spaces-inl.h", + "src/heap/new-spaces.cc", + "src/heap/new-spaces.h", + "src/heap/object-stats.cc", + "src/heap/object-stats.h", + "src/heap/objects-visiting-inl.h", + "src/heap/objects-visiting.cc", + "src/heap/objects-visiting.h", + "src/heap/paged-spaces-inl.h", + "src/heap/paged-spaces.cc", + "src/heap/paged-spaces.h", + "src/heap/parallel-work-item.h", + "src/heap/parked-scope.h", + "src/heap/read-only-heap-inl.h", + "src/heap/read-only-heap.cc", + "src/heap/read-only-heap.h", + "src/heap/read-only-spaces.cc", + "src/heap/read-only-spaces.h", + "src/heap/remembered-set-inl.h", + "src/heap/remembered-set.h", + "src/heap/safepoint.cc", + "src/heap/safepoint.h", + "src/heap/scavenge-job.cc", + "src/heap/scavenge-job.h", + "src/heap/scavenger-inl.h", + "src/heap/scavenger.cc", + "src/heap/scavenger.h", + "src/heap/slot-set.cc", + "src/heap/slot-set.h", + "src/heap/spaces-inl.h", + "src/heap/spaces.cc", + "src/heap/spaces.h", + "src/heap/stress-marking-observer.cc", + "src/heap/stress-marking-observer.h", + "src/heap/stress-scavenge-observer.cc", + "src/heap/stress-scavenge-observer.h", + "src/heap/sweeper.cc", + "src/heap/sweeper.h", + "src/heap/weak-object-worklists.cc", + "src/heap/weak-object-worklists.h", + "src/heap/worklist.h", + "src/ic/call-optimization.cc", + "src/ic/call-optimization.h", + "src/ic/handler-configuration-inl.h", + "src/ic/handler-configuration.cc", + "src/ic/handler-configuration.h", + "src/ic/ic-inl.h", + "src/ic/ic-stats.cc", + "src/ic/ic-stats.h", + "src/ic/ic.cc", + "src/ic/ic.h", + "src/ic/stub-cache.cc", + "src/ic/stub-cache.h", + "src/init/bootstrapper.cc", + "src/init/bootstrapper.h", + "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/setup-isolate.h", + "src/init/startup-data-util.cc", + "src/init/startup-data-util.h", + "src/init/v8.cc", + "src/init/v8.h", + "src/interpreter/block-coverage-builder.h", + "src/interpreter/bytecode-array-builder.cc", + "src/interpreter/bytecode-array-builder.h", + "src/interpreter/bytecode-array-iterator.cc", + "src/interpreter/bytecode-array-iterator.h", + "src/interpreter/bytecode-array-random-iterator.cc", + "src/interpreter/bytecode-array-random-iterator.h", + "src/interpreter/bytecode-array-writer.cc", + "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-generator.cc", + "src/interpreter/bytecode-generator.h", + "src/interpreter/bytecode-jump-table.h", + "src/interpreter/bytecode-label.cc", + "src/interpreter/bytecode-label.h", + "src/interpreter/bytecode-node.cc", + "src/interpreter/bytecode-node.h", + "src/interpreter/bytecode-operands.cc", + "src/interpreter/bytecode-operands.h", + "src/interpreter/bytecode-register-allocator.h", + "src/interpreter/bytecode-register-optimizer.cc", + "src/interpreter/bytecode-register-optimizer.h", + "src/interpreter/bytecode-register.cc", + "src/interpreter/bytecode-register.h", + "src/interpreter/bytecode-source-info.cc", + "src/interpreter/bytecode-source-info.h", + "src/interpreter/bytecode-traits.h", + "src/interpreter/bytecodes.cc", + "src/interpreter/bytecodes.h", + "src/interpreter/constant-array-builder.cc", + "src/interpreter/constant-array-builder.h", + "src/interpreter/control-flow-builders.cc", + "src/interpreter/control-flow-builders.h", + "src/interpreter/handler-table-builder.cc", + "src/interpreter/handler-table-builder.h", + "src/interpreter/interpreter-generator.h", + "src/interpreter/interpreter-intrinsics.cc", + "src/interpreter/interpreter-intrinsics.h", + "src/interpreter/interpreter.cc", + "src/interpreter/interpreter.h", + "src/json/json-parser.cc", + "src/json/json-parser.h", + "src/json/json-stringifier.cc", + "src/json/json-stringifier.h", + "src/logging/code-events.h", + "src/logging/counters-definitions.h", + "src/logging/counters.cc", + "src/logging/counters.h", + "src/logging/local-logger.cc", + "src/logging/local-logger.h", + "src/logging/log-inl.h", + "src/logging/log-utils.cc", + "src/logging/log-utils.h", + "src/logging/log.cc", + "src/logging/log.h", + "src/logging/metrics.cc", + "src/logging/metrics.h", + "src/logging/tracing-flags.cc", + "src/logging/tracing-flags.h", + "src/logging/runtime-call-stats.h", + "src/logging/runtime-call-stats-scope.h", + "src/numbers/conversions-inl.h", + "src/numbers/conversions.cc", + "src/numbers/conversions.h", + "src/numbers/hash-seed-inl.h", + "src/numbers/math-random.cc", + "src/numbers/math-random.h", + "src/objects/all-objects-inl.h", + "src/objects/allocation-site-inl.h", + "src/objects/allocation-site-scopes-inl.h", + "src/objects/allocation-site-scopes.h", + "src/objects/allocation-site.h", + "src/objects/api-callbacks-inl.h", + "src/objects/api-callbacks.h", + "src/objects/arguments-inl.h", + "src/objects/arguments.h", + "src/objects/backing-store.cc", + "src/objects/backing-store.h", + "src/objects/bigint-inl.h", + "src/objects/bigint.cc", + "src/objects/bigint.h", + "src/objects/cell-inl.h", + "src/objects/cell.h", + "src/objects/code-inl.h", + "src/objects/code-kind.cc", + "src/objects/code-kind.h", + "src/objects/code.cc", + "src/objects/code.h", + "src/objects/compilation-cache-table-inl.h", + "src/objects/compilation-cache-table.cc", + "src/objects/compilation-cache-table.h", + "src/objects/compressed-slots-inl.h", + "src/objects/compressed-slots.h", + "src/objects/contexts-inl.h", + "src/objects/contexts.cc", + "src/objects/contexts.h", + "src/objects/data-handler-inl.h", + "src/objects/data-handler.h", + "src/objects/debug-objects-inl.h", + "src/objects/debug-objects.cc", + "src/objects/debug-objects.h", + "src/objects/descriptor-array-inl.h", + "src/objects/descriptor-array.h", + "src/objects/dictionary-inl.h", + "src/objects/dictionary.h", + "src/objects/elements-inl.h", + "src/objects/elements-kind.cc", + "src/objects/elements-kind.h", + "src/objects/elements.cc", + "src/objects/elements.h", + "src/objects/embedder-data-array-inl.h", + "src/objects/embedder-data-array.cc", + "src/objects/embedder-data-array.h", + "src/objects/embedder-data-slot-inl.h", + "src/objects/embedder-data-slot.h", + "src/objects/feedback-cell-inl.h", + "src/objects/feedback-cell.h", + "src/objects/feedback-vector-inl.h", + "src/objects/feedback-vector.cc", + "src/objects/feedback-vector.h", + "src/objects/field-index-inl.h", + "src/objects/field-index.h", + "src/objects/field-type.cc", + "src/objects/field-type.h", + "src/objects/fixed-array-inl.h", + "src/objects/fixed-array.h", + "src/objects/foreign-inl.h", + "src/objects/foreign.h", + "src/objects/free-space-inl.h", + "src/objects/free-space.h", + "src/objects/function-kind.h", + "src/objects/function-syntax-kind.h", + "src/objects/hash-table-inl.h", + "src/objects/hash-table.h", + "src/objects/heap-number-inl.h", + "src/objects/heap-number.h", + "src/objects/heap-object-inl.h", + "src/objects/heap-object.h", + "src/objects/instance-type-inl.h", + "src/objects/instance-type.h", + "src/objects/internal-index.h", + "src/objects/js-array-buffer-inl.h", + "src/objects/js-array-buffer.cc", + "src/objects/js-array-buffer.h", + "src/objects/js-array-inl.h", + "src/objects/js-array.h", + "src/objects/js-collection-inl.h", + "src/objects/js-collection-iterator.h", + "src/objects/js-collection-iterator-inl.h", + "src/objects/js-collection.h", + "src/objects/js-function-inl.h", + "src/objects/js-function.cc", + "src/objects/js-function.h", + "src/objects/js-generator-inl.h", + "src/objects/js-generator.h", + "src/objects/js-objects-inl.h", + "src/objects/js-objects.cc", + "src/objects/js-objects.h", + "src/objects/js-promise-inl.h", + "src/objects/js-promise.h", + "src/objects/js-proxy-inl.h", + "src/objects/js-proxy.h", + "src/objects/js-regexp-inl.h", + "src/objects/js-regexp-string-iterator-inl.h", + "src/objects/js-regexp-string-iterator.h", + "src/objects/js-regexp.cc", + "src/objects/js-regexp.h", + "src/objects/js-weak-refs.h", + "src/objects/js-weak-refs-inl.h", + "src/objects/keys.cc", + "src/objects/keys.h", + "src/objects/literal-objects-inl.h", + "src/objects/literal-objects.cc", + "src/objects/literal-objects.h", + "src/objects/lookup-cache-inl.h", + "src/objects/lookup-cache.cc", + "src/objects/lookup-cache.h", + "src/objects/lookup-inl.h", + "src/objects/lookup.cc", + "src/objects/lookup.h", + "src/objects/managed.cc", + "src/objects/managed.h", + "src/objects/map-inl.h", + "src/objects/map-updater.cc", + "src/objects/map-updater.h", + "src/objects/map.cc", + "src/objects/map.h", + "src/objects/maybe-object-inl.h", + "src/objects/maybe-object.h", + "src/objects/megadom-handler-inl.h", + "src/objects/megadom-handler.h", + "src/objects/microtask-inl.h", + "src/objects/microtask.h", + "src/objects/module-inl.h", + "src/objects/module.cc", + "src/objects/module.h", + "src/objects/name-inl.h", + "src/objects/name.h", + "src/objects/object-list-macros.h", + "src/objects/object-macros-undef.h", + "src/objects/object-macros.h", + "src/objects/object-type.cc", + "src/objects/object-type.h", + "src/objects/objects-body-descriptors-inl.h", + "src/objects/objects-body-descriptors.h", + "src/objects/objects-inl.h", + "src/objects/objects.cc", + "src/objects/objects.h", + "src/objects/objects-definitions.h", + "src/objects/oddball-inl.h", + "src/objects/oddball.h", + "src/objects/ordered-hash-table-inl.h", + "src/objects/ordered-hash-table.cc", + "src/objects/ordered-hash-table.h", + "src/objects/osr-optimized-code-cache-inl.h", + "src/objects/osr-optimized-code-cache.cc", + "src/objects/osr-optimized-code-cache.h", + "src/objects/primitive-heap-object-inl.h", + "src/objects/primitive-heap-object.h", + "src/objects/promise-inl.h", + "src/objects/promise.h", + "src/objects/property-array-inl.h", + "src/objects/property-array.h", + "src/objects/property-cell-inl.h", + "src/objects/property-cell.h", + "src/objects/property-descriptor-object-inl.h", + "src/objects/property-descriptor-object.h", + "src/objects/property-descriptor.cc", + "src/objects/property-descriptor.h", + "src/objects/property-details.h", + "src/objects/property.cc", + "src/objects/property.h", + "src/objects/prototype-info-inl.h", + "src/objects/prototype-info.h", + "src/objects/prototype.h", + "src/objects/prototype-inl.h", + "src/objects/regexp-match-info.h", + "src/objects/scope-info-inl.h", + "src/objects/scope-info.cc", + "src/objects/scope-info.h", + "src/objects/script-inl.h", + "src/objects/script.h", + "src/objects/shared-function-info-inl.h", + "src/objects/shared-function-info.cc", + "src/objects/shared-function-info.h", + "src/objects/slots-atomic-inl.h", + "src/objects/slots-inl.h", + "src/objects/slots.h", + "src/objects/smi-inl.h", + "src/objects/smi.h", + "src/objects/source-text-module.cc", + "src/objects/source-text-module.h", + "src/objects/source-text-module-inl.h", + "src/objects/stack-frame-info-inl.h", + "src/objects/stack-frame-info.cc", + "src/objects/stack-frame-info.h", + "src/objects/string-comparator.cc", + "src/objects/string-comparator.h", + "src/objects/string-inl.h", + "src/objects/string-set-inl.h", + "src/objects/string-set.h", + "src/objects/string-table-inl.h", + "src/objects/string-table.cc", + "src/objects/string-table.h", + "src/objects/string.cc", + "src/objects/string.h", + "src/objects/struct-inl.h", + "src/objects/struct.h", + "src/objects/swiss-hash-table-helpers.h", + "src/objects/swiss-name-dictionary-inl.h", + "src/objects/swiss-name-dictionary.cc", + "src/objects/swiss-name-dictionary.h", + "src/objects/synthetic-module-inl.h", + "src/objects/synthetic-module.cc", + "src/objects/synthetic-module.h", + "src/objects/tagged-field-inl.h", + "src/objects/tagged-field.h", + "src/objects/tagged-impl-inl.h", + "src/objects/tagged-impl.cc", + "src/objects/tagged-impl.h", + "src/objects/tagged-index.h", + "src/objects/tagged-value-inl.h", + "src/objects/tagged-value.h", + "src/objects/template-objects-inl.h", + "src/objects/template-objects.cc", + "src/objects/template-objects.h", + "src/objects/templates-inl.h", + "src/objects/templates.cc", + "src/objects/templates.h", + "src/objects/torque-defined-classes-inl.h", + "src/objects/torque-defined-classes.h", + "src/objects/transitions-inl.h", + "src/objects/transitions.cc", + "src/objects/transitions.h", + "src/objects/type-hints.cc", + "src/objects/type-hints.h", + "src/objects/value-serializer.cc", + "src/objects/value-serializer.h", + "src/objects/visitors.cc", + "src/objects/visitors.h", + "src/parsing/expression-scope.h", + "src/parsing/func-name-inferrer.cc", + "src/parsing/func-name-inferrer.h", + "src/parsing/import-assertions.cc", + "src/parsing/import-assertions.h", + "src/parsing/keywords-gen.h", + "src/parsing/literal-buffer.cc", + "src/parsing/literal-buffer.h", + "src/parsing/parse-info.cc", + "src/parsing/parse-info.h", + "src/parsing/parser-base.h", + "src/parsing/parser.cc", + "src/parsing/parser.h", + "src/parsing/parsing.cc", + "src/parsing/parsing.h", + "src/parsing/pending-compilation-error-handler.cc", + "src/parsing/pending-compilation-error-handler.h", + "src/parsing/preparse-data-impl.h", + "src/parsing/preparse-data.cc", + "src/parsing/preparse-data.h", + "src/parsing/preparser-logger.h", + "src/parsing/preparser.cc", + "src/parsing/preparser.h", + "src/parsing/rewriter.cc", + "src/parsing/rewriter.h", + "src/parsing/scanner-character-streams.cc", + "src/parsing/scanner-character-streams.h", + "src/parsing/scanner.cc", + "src/parsing/scanner.h", + "src/parsing/scanner-inl.h", + "src/parsing/token.cc", + "src/parsing/token.h", + "src/profiler/allocation-tracker.cc", + "src/profiler/allocation-tracker.h", + "src/profiler/circular-queue-inl.h", + "src/profiler/circular-queue.h", + "src/profiler/cpu-profiler-inl.h", + "src/profiler/cpu-profiler.cc", + "src/profiler/cpu-profiler.h", + "src/profiler/heap-profiler.cc", + "src/profiler/heap-profiler.h", + "src/profiler/heap-snapshot-generator-inl.h", + "src/profiler/heap-snapshot-generator.cc", + "src/profiler/heap-snapshot-generator.h", + "src/profiler/profile-generator-inl.h", + "src/profiler/profile-generator.cc", + "src/profiler/profile-generator.h", + "src/profiler/profiler-listener.cc", + "src/profiler/profiler-listener.h", + "src/profiler/profiler-stats.cc", + "src/profiler/profiler-stats.h", + "src/profiler/sampling-heap-profiler.cc", + "src/profiler/sampling-heap-profiler.h", + "src/profiler/strings-storage.cc", + "src/profiler/strings-storage.h", + "src/profiler/symbolizer.cc", + "src/profiler/symbolizer.h", + "src/profiler/tick-sample.cc", + "src/profiler/tick-sample.h", + "src/profiler/tracing-cpu-profiler.cc", + "src/profiler/tracing-cpu-profiler.h", + "src/profiler/weak-code-registry.h", + "src/profiler/weak-code-registry.cc", + "src/regexp/experimental/experimental-bytecode.cc", + "src/regexp/experimental/experimental-bytecode.h", + "src/regexp/experimental/experimental-compiler.cc", + "src/regexp/experimental/experimental-compiler.h", + "src/regexp/experimental/experimental-interpreter.cc", + "src/regexp/experimental/experimental-interpreter.h", + "src/regexp/experimental/experimental.cc", + "src/regexp/experimental/experimental.h", + "src/regexp/property-sequences.cc", + "src/regexp/property-sequences.h", + "src/regexp/regexp-ast.cc", + "src/regexp/regexp-ast.h", + "src/regexp/regexp-bytecode-generator-inl.h", + "src/regexp/regexp-bytecode-generator.cc", + "src/regexp/regexp-bytecode-generator.h", + "src/regexp/regexp-bytecode-peephole.cc", + "src/regexp/regexp-bytecode-peephole.h", + "src/regexp/regexp-bytecodes.cc", + "src/regexp/regexp-bytecodes.h", + "src/regexp/regexp-compiler-tonode.cc", + "src/regexp/regexp-compiler.cc", + "src/regexp/regexp-compiler.h", + "src/regexp/regexp-dotprinter.cc", + "src/regexp/regexp-dotprinter.h", + "src/regexp/regexp-error.cc", + "src/regexp/regexp-error.h", + "src/regexp/regexp-interpreter.cc", + "src/regexp/regexp-interpreter.h", + "src/regexp/regexp-macro-assembler-arch.h", + "src/regexp/regexp-macro-assembler-tracer.cc", + "src/regexp/regexp-macro-assembler-tracer.h", + "src/regexp/regexp-macro-assembler.cc", + "src/regexp/regexp-macro-assembler.h", + "src/regexp/regexp-nodes.h", + "src/regexp/regexp-parser.cc", + "src/regexp/regexp-parser.h", + "src/regexp/regexp-stack.cc", + "src/regexp/regexp-stack.h", + "src/regexp/regexp-utils.cc", + "src/regexp/regexp-utils.h", + "src/regexp/regexp.cc", + "src/regexp/regexp.h", + "src/regexp/special-case.h", + "src/roots/roots-inl.h", + "src/roots/roots.cc", + "src/roots/roots.h", + "src/runtime/runtime-array.cc", + "src/runtime/runtime-atomics.cc", + "src/runtime/runtime-bigint.cc", + "src/runtime/runtime-classes.cc", + "src/runtime/runtime-collections.cc", + "src/runtime/runtime-compiler.cc", + "src/runtime/runtime-date.cc", + "src/runtime/runtime-debug.cc", + "src/runtime/runtime-forin.cc", + "src/runtime/runtime-function.cc", + "src/runtime/runtime-futex.cc", + "src/runtime/runtime-generator.cc", + "src/runtime/runtime-internal.cc", + "src/runtime/runtime-literals.cc", + "src/runtime/runtime-module.cc", + "src/runtime/runtime-numbers.cc", + "src/runtime/runtime-object.cc", + "src/runtime/runtime-operators.cc", + "src/runtime/runtime-promise.cc", + "src/runtime/runtime-proxy.cc", + "src/runtime/runtime-regexp.cc", + "src/runtime/runtime-scopes.cc", + "src/runtime/runtime-strings.cc", + "src/runtime/runtime-symbol.cc", + "src/runtime/runtime-test.cc", + "src/runtime/runtime-trace.cc", + "src/runtime/runtime-typedarray.cc", + "src/runtime/runtime-utils.h", + "src/runtime/runtime-weak-refs.cc", + "src/runtime/runtime.cc", + "src/runtime/runtime.h", + "src/base/sanitizer/asan.h", + "src/base/sanitizer/lsan-page-allocator.cc", + "src/base/sanitizer/lsan-page-allocator.h", + "src/base/sanitizer/msan.h", + "src/snapshot/code-serializer.cc", + "src/snapshot/code-serializer.h", + "src/snapshot/context-deserializer.cc", + "src/snapshot/context-deserializer.h", + "src/snapshot/context-serializer.cc", + "src/snapshot/context-serializer.h", + "src/snapshot/deserializer.cc", + "src/snapshot/deserializer.h", + "src/snapshot/embedded/embedded-data.cc", + "src/snapshot/embedded/embedded-data.h", + "src/snapshot/embedded/embedded-file-writer-interface.h", + "src/snapshot/object-deserializer.cc", + "src/snapshot/object-deserializer.h", + "src/snapshot/read-only-deserializer.cc", + "src/snapshot/read-only-deserializer.h", + "src/snapshot/read-only-serializer.cc", + "src/snapshot/read-only-serializer.h", + "src/snapshot/references.h", + "src/snapshot/roots-serializer.cc", + "src/snapshot/roots-serializer.h", + "src/snapshot/serializer-deserializer.cc", + "src/snapshot/serializer-deserializer.h", + "src/snapshot/serializer.cc", + "src/snapshot/serializer.h", + "src/snapshot/snapshot-compression.cc", + "src/snapshot/snapshot-compression.h", + "src/snapshot/snapshot-data.cc", + "src/snapshot/snapshot-data.h", + "src/snapshot/snapshot-source-sink.cc", + "src/snapshot/snapshot-source-sink.h", + "src/snapshot/snapshot-utils.cc", + "src/snapshot/snapshot-utils.h", + "src/snapshot/snapshot.cc", + "src/snapshot/snapshot.h", + "src/snapshot/startup-deserializer.cc", + "src/snapshot/startup-deserializer.h", + "src/snapshot/startup-serializer.cc", + "src/snapshot/startup-serializer.h", + "src/strings/char-predicates-inl.h", + "src/strings/char-predicates.h", + "src/strings/string-builder-inl.h", + "src/strings/string-builder.cc", + "src/strings/string-case.cc", + "src/strings/string-case.h", + "src/strings/string-hasher-inl.h", + "src/strings/string-hasher.h", + "src/strings/string-search.h", + "src/strings/string-stream.cc", + "src/strings/string-stream.h", + "src/strings/unicode-decoder.cc", + "src/strings/unicode-decoder.h", + "src/strings/unicode-inl.h", + "src/strings/unicode.cc", + "src/strings/unicode.h", + "src/strings/uri.cc", + "src/strings/uri.h", + "src/tasks/cancelable-task.cc", + "src/tasks/cancelable-task.h", + "src/tasks/operations-barrier.cc", + "src/tasks/operations-barrier.h", + "src/tasks/task-utils.cc", + "src/tasks/task-utils.h", + "src/torque/runtime-macro-shims.h", + "src/third_party/siphash/halfsiphash.cc", + "src/third_party/siphash/halfsiphash.h", + "src/third_party/utf8-decoder/utf8-decoder.h", + "src/tracing/trace-event.cc", + "src/tracing/trace-event.h", + "src/tracing/traced-value.cc", + "src/tracing/traced-value.h", + "src/tracing/tracing-category-observer.cc", + "src/tracing/tracing-category-observer.h", + "src/trap-handler/handler-inside.cc", + "src/trap-handler/handler-inside-posix.h", + "src/trap-handler/handler-outside.cc", + "src/trap-handler/handler-shared.cc", + "src/trap-handler/trap-handler-internal.h", + "src/trap-handler/trap-handler.h", + "src/utils/address-map.cc", + "src/utils/address-map.h", + "src/utils/allocation.cc", + "src/utils/allocation.h", + "src/utils/bit-vector.cc", + "src/utils/bit-vector.h", + "src/utils/boxed-float.h", + "src/utils/detachable-vector.cc", + "src/utils/detachable-vector.h", + "src/utils/identity-map.cc", + "src/utils/identity-map.h", + "src/utils/locked-queue-inl.h", + "src/utils/locked-queue.h", + "src/utils/memcopy.cc", + "src/utils/memcopy.h", + "src/utils/ostreams.cc", + "src/utils/ostreams.h", + "src/utils/pointer-with-payload.h", + "src/utils/scoped-list.h", + "src/utils/utils-inl.h", + "src/utils/utils.cc", + "src/utils/utils.h", + "src/utils/version.cc", + "src/utils/version.h", + "src/web-snapshot/web-snapshot.h", + "src/web-snapshot/web-snapshot.cc", + "src/zone/accounting-allocator.cc", + "src/zone/accounting-allocator.h", + "src/zone/compressed-zone-ptr.h", + "src/zone/type-stats.cc", + "src/zone/type-stats.h", + "src/zone/zone-allocator.h", + "src/zone/zone-chunk-list.h", + "src/zone/zone-compression.h", + "src/zone/zone-containers.h", + "src/zone/zone-handle-set.h", + "src/zone/zone-hashmap.h", + "src/zone/zone-list-inl.h", + "src/zone/zone-list.h", + "src/zone/zone-segment.cc", + "src/zone/zone-segment.h", + "src/zone/zone-type-traits.h", + "src/zone/zone-utils.h", + "src/zone/zone.cc", + "src/zone/zone.h", + "src/asmjs/asm-js.h", + "src/execution/pointer-authentication-dummy.h", + "src/heap/third-party/heap-api.h", + "src/heap/third-party/heap-api-stub.cc", + ] + select({ + ":is_ia32": [ + "src/baseline/ia32/baseline-assembler-ia32-inl.h", + "src/baseline/ia32/baseline-compiler-ia32-inl.h", + "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h", + "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc", + "src/codegen/ia32/cpu-ia32.cc", + "src/codegen/ia32/assembler-ia32-inl.h", + "src/codegen/ia32/assembler-ia32.cc", + "src/codegen/ia32/assembler-ia32.h", + "src/codegen/ia32/constants-ia32.h", + "src/codegen/ia32/interface-descriptors-ia32-inl.h", + "src/codegen/ia32/sse-instr.h", + "src/codegen/ia32/macro-assembler-ia32.cc", + "src/codegen/ia32/macro-assembler-ia32.h", + "src/codegen/ia32/register-ia32.h", + "src/compiler/backend/ia32/code-generator-ia32.cc", + "src/compiler/backend/ia32/instruction-codes-ia32.h", + "src/compiler/backend/ia32/instruction-scheduler-ia32.cc", + "src/compiler/backend/ia32/instruction-selector-ia32.cc", + "src/deoptimizer/ia32/deoptimizer-ia32.cc", + "src/diagnostics/ia32/disasm-ia32.cc", + "src/diagnostics/ia32/unwinder-ia32.cc", + "src/execution/ia32/frame-constants-ia32.cc", + "src/execution/ia32/frame-constants-ia32.h", + "src/regexp/ia32/regexp-macro-assembler-ia32.cc", + "src/regexp/ia32/regexp-macro-assembler-ia32.h", + "src/third_party/valgrind/valgrind.h", + "src/wasm/baseline/ia32/liftoff-assembler-ia32.h", + ], + ":is_x64": [ + "src/baseline/x64/baseline-assembler-x64-inl.h", + "src/baseline/x64/baseline-compiler-x64-inl.h", + "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h", + "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc", + "src/codegen/x64/cpu-x64.cc", + "src/codegen/x64/assembler-x64-inl.h", + "src/codegen/x64/assembler-x64.cc", + "src/codegen/x64/assembler-x64.h", + "src/codegen/x64/constants-x64.h", + "src/codegen/x64/fma-instr.h", + "src/codegen/x64/interface-descriptors-x64-inl.h", + "src/codegen/x64/sse-instr.h", + "src/codegen/x64/macro-assembler-x64.cc", + "src/codegen/x64/macro-assembler-x64.h", + "src/codegen/x64/register-x64.h", + "src/compiler/backend/x64/code-generator-x64.cc", + "src/compiler/backend/x64/instruction-codes-x64.h", + "src/compiler/backend/x64/instruction-scheduler-x64.cc", + "src/compiler/backend/x64/instruction-selector-x64.cc", + "src/compiler/backend/x64/unwinding-info-writer-x64.cc", + "src/compiler/backend/x64/unwinding-info-writer-x64.h", + "src/deoptimizer/x64/deoptimizer-x64.cc", + "src/diagnostics/x64/disasm-x64.cc", + "src/diagnostics/x64/eh-frame-x64.cc", + "src/diagnostics/x64/unwinder-x64.cc", + "src/execution/x64/frame-constants-x64.cc", + "src/execution/x64/frame-constants-x64.h", + "src/regexp/x64/regexp-macro-assembler-x64.cc", + "src/regexp/x64/regexp-macro-assembler-x64.h", + "src/third_party/valgrind/valgrind.h", + "src/wasm/baseline/x64/liftoff-assembler-x64.h", + ], + "is_arm": [ + "src/baseline/arm/baseline-assembler-arm-inl.h", + "src/baseline/arm/baseline-compiler-arm-inl.h", + "src/codegen/arm/assembler-arm-inl.h", + "src/codegen/arm/assembler-arm.cc", + "src/codegen/arm/assembler-arm.h", + "src/codegen/arm/constants-arm.cc", + "src/codegen/arm/constants-arm.h", + "src/codegen/arm/cpu-arm.cc", + "src/codegen/arm/interface-descriptors-arm-inl.h", + "src/codegen/arm/macro-assembler-arm.cc", + "src/codegen/arm/macro-assembler-arm.h", + "src/codegen/arm/register-arm.h", + "src/compiler/backend/arm/code-generator-arm.cc", + "src/compiler/backend/arm/instruction-codes-arm.h", + "src/compiler/backend/arm/instruction-scheduler-arm.cc", + "src/compiler/backend/arm/instruction-selector-arm.cc", + "src/compiler/backend/arm/unwinding-info-writer-arm.cc", + "src/compiler/backend/arm/unwinding-info-writer-arm.h", + "src/deoptimizer/arm/deoptimizer-arm.cc", + "src/diagnostics/arm/disasm-arm.cc", + "src/diagnostics/arm/eh-frame-arm.cc", + "src/diagnostics/arm/unwinder-arm.cc", + "src/execution/arm/frame-constants-arm.cc", + "src/execution/arm/frame-constants-arm.h", + "src/execution/arm/simulator-arm.cc", + "src/execution/arm/simulator-arm.h", + "src/regexp/arm/regexp-macro-assembler-arm.cc", + "src/regexp/arm/regexp-macro-assembler-arm.h", + "src/wasm/baseline/arm/liftoff-assembler-arm.h", + ], + ":is_arm64": [ + "src/baseline/arm64/baseline-assembler-arm64-inl.h", + "src/baseline/arm64/baseline-compiler-arm64-inl.h", + "src/codegen/arm64/assembler-arm64-inl.h", + "src/codegen/arm64/assembler-arm64.cc", + "src/codegen/arm64/assembler-arm64.h", + "src/codegen/arm64/constants-arm64.h", + "src/codegen/arm64/cpu-arm64.cc", + "src/codegen/arm64/decoder-arm64-inl.h", + "src/codegen/arm64/decoder-arm64.cc", + "src/codegen/arm64/decoder-arm64.h", + "src/codegen/arm64/interface-descriptors-arm64-inl.h", + "src/codegen/arm64/instructions-arm64-constants.cc", + "src/codegen/arm64/instructions-arm64.cc", + "src/codegen/arm64/instructions-arm64.h", + "src/codegen/arm64/macro-assembler-arm64-inl.h", + "src/codegen/arm64/macro-assembler-arm64.cc", + "src/codegen/arm64/macro-assembler-arm64.h", + "src/codegen/arm64/register-arm64.cc", + "src/codegen/arm64/register-arm64.h", + "src/codegen/arm64/utils-arm64.cc", + "src/codegen/arm64/utils-arm64.h", + "src/compiler/backend/arm64/code-generator-arm64.cc", + "src/compiler/backend/arm64/instruction-codes-arm64.h", + "src/compiler/backend/arm64/instruction-scheduler-arm64.cc", + "src/compiler/backend/arm64/instruction-selector-arm64.cc", + "src/compiler/backend/arm64/unwinding-info-writer-arm64.cc", + "src/compiler/backend/arm64/unwinding-info-writer-arm64.h", + "src/deoptimizer/arm64/deoptimizer-arm64.cc", + "src/diagnostics/arm64/disasm-arm64.cc", + "src/diagnostics/arm64/disasm-arm64.h", + "src/diagnostics/arm64/eh-frame-arm64.cc", + "src/diagnostics/arm64/unwinder-arm64.cc", + "src/execution/arm64/frame-constants-arm64.cc", + "src/execution/arm64/frame-constants-arm64.h", + "src/execution/arm64/pointer-auth-arm64.cc", + "src/execution/arm64/simulator-arm64.cc", + "src/execution/arm64/simulator-arm64.h", + "src/execution/arm64/simulator-logic-arm64.cc", + "src/regexp/arm64/regexp-macro-assembler-arm64.cc", + "src/regexp/arm64/regexp-macro-assembler-arm64.h", + "src/wasm/baseline/arm64/liftoff-assembler-arm64.h", + ], + }) + select({ + ":is_linux_x64_or_macos_x64": [ + "src/trap-handler/handler-inside-posix.cc", + "src/trap-handler/handler-outside-posix.cc", + ], + "//conditions:default": [], + }) + select({ + ":is_v8_enable_webassembly": [ + "src/asmjs/asm-js.cc", + "src/asmjs/asm-names.h", + "src/asmjs/asm-parser.cc", + "src/asmjs/asm-parser.h", + "src/asmjs/asm-scanner.cc", + "src/asmjs/asm-scanner.h", + "src/asmjs/asm-types.cc", + "src/asmjs/asm-types.h", + "src/compiler/int64-lowering.h", + "src/compiler/wasm-compiler.h", + "src/debug/debug-wasm-objects.cc", + "src/debug/debug-wasm-objects.h", + "src/debug/debug-wasm-objects-inl.h", + "src/runtime/runtime-test-wasm.cc", + "src/runtime/runtime-wasm.cc", + "src/wasm/baseline/liftoff-assembler.cc", + "src/wasm/baseline/liftoff-assembler-defs.h", + "src/wasm/baseline/liftoff-assembler.h", + "src/wasm/baseline/liftoff-compiler.cc", + "src/wasm/baseline/liftoff-compiler.h", + "src/wasm/baseline/liftoff-register.h", + "src/wasm/branch-hint-map.h", + "src/wasm/code-space-access.cc", + "src/wasm/code-space-access.h", + "src/wasm/compilation-environment.h", + "src/wasm/decoder.h", + "src/wasm/function-body-decoder.cc", + "src/wasm/function-body-decoder.h", + "src/wasm/function-body-decoder-impl.h", + "src/wasm/function-compiler.cc", + "src/wasm/function-compiler.h", + "src/wasm/graph-builder-interface.cc", + "src/wasm/graph-builder-interface.h", + "src/wasm/init-expr-interface.cc", + "src/wasm/init-expr-interface.h", + "src/wasm/jump-table-assembler.cc", + "src/wasm/jump-table-assembler.h", + "src/wasm/leb-helper.h", + "src/wasm/local-decl-encoder.cc", + "src/wasm/local-decl-encoder.h", + "src/wasm/memory-protection-key.cc", + "src/wasm/memory-protection-key.h", + "src/wasm/memory-tracing.cc", + "src/wasm/memory-tracing.h", + "src/wasm/module-compiler.cc", + "src/wasm/module-compiler.h", + "src/wasm/module-decoder.cc", + "src/wasm/module-decoder.h", + "src/wasm/module-instantiate.cc", + "src/wasm/module-instantiate.h", + "src/wasm/object-access.h", + "src/wasm/signature-map.cc", + "src/wasm/signature-map.h", + "src/wasm/simd-shuffle.cc", + "src/wasm/simd-shuffle.h", + "src/wasm/streaming-decoder.cc", + "src/wasm/streaming-decoder.h", + "src/wasm/struct-types.h", + "src/wasm/sync-streaming-decoder.cc", + "src/wasm/value-type.cc", + "src/wasm/value-type.h", + "src/wasm/wasm-arguments.h", + "src/wasm/wasm-code-manager.cc", + "src/wasm/wasm-code-manager.h", + "src/wasm/wasm-debug.cc", + "src/wasm/wasm-debug.h", + "src/wasm/wasm-engine.cc", + "src/wasm/wasm-engine.h", + "src/wasm/wasm-external-refs.cc", + "src/wasm/wasm-external-refs.h", + "src/wasm/wasm-features.cc", + "src/wasm/wasm-features.h", + "src/wasm/wasm-import-wrapper-cache.cc", + "src/wasm/wasm-import-wrapper-cache.h", + "src/wasm/wasm-init-expr.cc", + "src/wasm/wasm-init-expr.h", + "src/wasm/wasm-js.cc", + "src/wasm/wasm-js.h", + "src/wasm/wasm-linkage.h", + "src/wasm/wasm-module-builder.cc", + "src/wasm/wasm-module-builder.h", + "src/wasm/wasm-module.cc", + "src/wasm/wasm-module.h", + "src/wasm/wasm-module-sourcemap.cc", + "src/wasm/wasm-module-sourcemap.h", + "src/wasm/wasm-objects.cc", + "src/wasm/wasm-objects.h", + "src/wasm/wasm-objects-inl.h", + "src/wasm/wasm-opcodes.cc", + "src/wasm/wasm-opcodes.h", + "src/wasm/wasm-opcodes-inl.h", + "src/wasm/wasm-result.cc", + "src/wasm/wasm-result.h", + "src/wasm/wasm-serialization.cc", + "src/wasm/wasm-serialization.h", + "src/wasm/wasm-subtyping.cc", + "src/wasm/wasm-subtyping.h", + "src/wasm/wasm-tier.h", + "src/wasm/wasm-value.h", + ], + "//conditions:default": [], + }) + select({ + ":is_v8_enable_i18n_support": [ + "src/builtins/builtins-intl.cc", + "src/builtins/builtins-intl-gen.cc", + "src/objects/intl-objects.cc", + "src/objects/intl-objects.h", + "src/objects/js-break-iterator.cc", + "src/objects/js-break-iterator.h", + "src/objects/js-break-iterator-inl.h", + "src/objects/js-collator.cc", + "src/objects/js-collator.h", + "src/objects/js-collator-inl.h", + "src/objects/js-date-time-format.cc", + "src/objects/js-date-time-format.h", + "src/objects/js-date-time-format-inl.h", + "src/objects/js-display-names.cc", + "src/objects/js-display-names.h", + "src/objects/js-display-names-inl.h", + "src/objects/js-list-format.cc", + "src/objects/js-list-format.h", + "src/objects/js-list-format-inl.h", + "src/objects/js-locale.cc", + "src/objects/js-locale.h", + "src/objects/js-locale-inl.h", + "src/objects/js-number-format.cc", + "src/objects/js-number-format.h", + "src/objects/js-number-format-inl.h", + "src/objects/js-plural-rules.cc", + "src/objects/js-plural-rules.h", + "src/objects/js-plural-rules-inl.h", + "src/objects/js-relative-time-format.cc", + "src/objects/js-relative-time-format.h", + "src/objects/js-relative-time-format-inl.h", + "src/objects/js-segmenter.cc", + "src/objects/js-segmenter.h", + "src/objects/js-segmenter-inl.h", + "src/objects/js-segment-iterator.cc", + "src/objects/js-segment-iterator.h", + "src/objects/js-segment-iterator-inl.h", + "src/objects/js-segments.cc", + "src/objects/js-segments.h", + "src/objects/js-segments-inl.h", + "src/runtime/runtime-intl.cc", + "src/strings/char-predicates.cc", + ], + "//conditions:default": [], + }), +) + +filegroup( + name = "v8_compiler_files", + srcs = [ + "src/builtins/profile-data-reader.h", + "src/compiler/access-builder.cc", + "src/compiler/access-builder.h", + "src/compiler/access-info.cc", + "src/compiler/access-info.h", + "src/compiler/add-type-assertions-reducer.cc", + "src/compiler/add-type-assertions-reducer.h", + "src/compiler/all-nodes.cc", + "src/compiler/all-nodes.h", + "src/compiler/allocation-builder.h", + "src/compiler/allocation-builder-inl.h", + "src/compiler/backend/code-generator.cc", + "src/compiler/backend/code-generator.h", + "src/compiler/backend/code-generator-impl.h", + "src/compiler/backend/frame-elider.cc", + "src/compiler/backend/frame-elider.h", + "src/compiler/backend/gap-resolver.cc", + "src/compiler/backend/gap-resolver.h", + "src/compiler/backend/instruction.cc", + "src/compiler/backend/instruction.h", + "src/compiler/backend/instruction-codes.h", + "src/compiler/backend/instruction-scheduler.cc", + "src/compiler/backend/instruction-scheduler.h", + "src/compiler/backend/instruction-selector.cc", + "src/compiler/backend/instruction-selector.h", + "src/compiler/backend/instruction-selector-impl.h", + "src/compiler/backend/jump-threading.cc", + "src/compiler/backend/jump-threading.h", + "src/compiler/backend/mid-tier-register-allocator.cc", + "src/compiler/backend/mid-tier-register-allocator.h", + "src/compiler/backend/move-optimizer.cc", + "src/compiler/backend/move-optimizer.h", + "src/compiler/backend/register-allocation.h", + "src/compiler/backend/register-allocator.cc", + "src/compiler/backend/register-allocator.h", + "src/compiler/backend/register-allocator-verifier.cc", + "src/compiler/backend/register-allocator-verifier.h", + "src/compiler/backend/spill-placer.cc", + "src/compiler/backend/spill-placer.h", + "src/compiler/backend/unwinding-info-writer.h", + "src/compiler/basic-block-instrumentor.cc", + "src/compiler/basic-block-instrumentor.h", + "src/compiler/branch-elimination.cc", + "src/compiler/branch-elimination.h", + "src/compiler/bytecode-analysis.cc", + "src/compiler/bytecode-analysis.h", + "src/compiler/bytecode-graph-builder.cc", + "src/compiler/bytecode-graph-builder.h", + "src/compiler/bytecode-liveness-map.cc", + "src/compiler/bytecode-liveness-map.h", + "src/compiler/c-linkage.cc", + "src/compiler/checkpoint-elimination.cc", + "src/compiler/checkpoint-elimination.h", + "src/compiler/code-assembler.cc", + "src/compiler/code-assembler.h", + "src/compiler/common-node-cache.cc", + "src/compiler/common-node-cache.h", + "src/compiler/common-operator.cc", + "src/compiler/common-operator.h", + "src/compiler/common-operator-reducer.cc", + "src/compiler/common-operator-reducer.h", + "src/compiler/compilation-dependencies.cc", + "src/compiler/compilation-dependencies.h", + "src/compiler/compilation-dependency.h", + "src/compiler/compiler-source-position-table.cc", + "src/compiler/compiler-source-position-table.h", + "src/compiler/constant-folding-reducer.cc", + "src/compiler/constant-folding-reducer.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/csa-load-elimination.cc", + "src/compiler/csa-load-elimination.h", + "src/compiler/dead-code-elimination.cc", + "src/compiler/dead-code-elimination.h", + "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", + "src/compiler/escape-analysis-reducer.h", + "src/compiler/fast-api-calls.cc", + "src/compiler/fast-api-calls.h", + "src/compiler/feedback-source.cc", + "src/compiler/feedback-source.h", + "src/compiler/frame.cc", + "src/compiler/frame.h", + "src/compiler/frame-states.cc", + "src/compiler/frame-states.h", + "src/compiler/functional-list.h", + "src/compiler/globals.h", + "src/compiler/graph.cc", + "src/compiler/graph.h", + "src/compiler/graph-assembler.cc", + "src/compiler/graph-assembler.h", + "src/compiler/graph-reducer.cc", + "src/compiler/graph-reducer.h", + "src/compiler/graph-trimmer.cc", + "src/compiler/graph-trimmer.h", + "src/compiler/graph-visualizer.cc", + "src/compiler/graph-visualizer.h", + "src/compiler/graph-zone-traits.h", + "src/compiler/heap-refs.cc", + "src/compiler/heap-refs.h", + "src/compiler/js-call-reducer.cc", + "src/compiler/js-call-reducer.h", + "src/compiler/js-context-specialization.cc", + "src/compiler/js-context-specialization.h", + "src/compiler/js-create-lowering.cc", + "src/compiler/js-create-lowering.h", + "src/compiler/js-generic-lowering.cc", + "src/compiler/js-generic-lowering.h", + "src/compiler/js-graph.cc", + "src/compiler/js-graph.h", + "src/compiler/js-heap-broker.cc", + "src/compiler/js-heap-broker.h", + "src/compiler/js-heap-copy-reducer.cc", + "src/compiler/js-heap-copy-reducer.h", + "src/compiler/js-inlining.cc", + "src/compiler/js-inlining.h", + "src/compiler/js-inlining-heuristic.cc", + "src/compiler/js-inlining-heuristic.h", + "src/compiler/js-intrinsic-lowering.cc", + "src/compiler/js-intrinsic-lowering.h", + "src/compiler/js-native-context-specialization.cc", + "src/compiler/js-native-context-specialization.h", + "src/compiler/js-operator.cc", + "src/compiler/js-operator.h", + "src/compiler/js-type-hint-lowering.cc", + "src/compiler/js-type-hint-lowering.h", + "src/compiler/js-typed-lowering.cc", + "src/compiler/js-typed-lowering.h", + "src/compiler/linkage.cc", + "src/compiler/linkage.h", + "src/compiler/load-elimination.cc", + "src/compiler/load-elimination.h", + "src/compiler/loop-analysis.cc", + "src/compiler/loop-analysis.h", + "src/compiler/loop-peeling.cc", + "src/compiler/loop-peeling.h", + "src/compiler/loop-unrolling.cc", + "src/compiler/loop-unrolling.h", + "src/compiler/loop-variable-optimizer.cc", + "src/compiler/loop-variable-optimizer.h", + "src/compiler/machine-graph.cc", + "src/compiler/machine-graph.h", + "src/compiler/machine-graph-verifier.cc", + "src/compiler/machine-graph-verifier.h", + "src/compiler/machine-operator.cc", + "src/compiler/machine-operator.h", + "src/compiler/machine-operator-reducer.cc", + "src/compiler/machine-operator-reducer.h", + "src/compiler/map-inference.cc", + "src/compiler/map-inference.h", + "src/compiler/memory-lowering.cc", + "src/compiler/memory-lowering.h", + "src/compiler/memory-optimizer.cc", + "src/compiler/memory-optimizer.h", + "src/compiler/node.cc", + "src/compiler/node.h", + "src/compiler/node-aux-data.h", + "src/compiler/node-cache.h", + "src/compiler/node-marker.cc", + "src/compiler/node-marker.h", + "src/compiler/node-matchers.cc", + "src/compiler/node-matchers.h", + "src/compiler/node-observer.cc", + "src/compiler/node-observer.h", + "src/compiler/node-origin-table.cc", + "src/compiler/node-origin-table.h", + "src/compiler/node-properties.cc", + "src/compiler/node-properties.h", + "src/compiler/opcodes.cc", + "src/compiler/opcodes.h", + "src/compiler/operation-typer.cc", + "src/compiler/operation-typer.h", + "src/compiler/operator.cc", + "src/compiler/operator.h", + "src/compiler/operator-properties.cc", + "src/compiler/operator-properties.h", + "src/compiler/osr.cc", + "src/compiler/osr.h", + "src/compiler/per-isolate-compiler-cache.h", + "src/compiler/persistent-map.h", + "src/compiler/pipeline.cc", + "src/compiler/pipeline.h", + "src/compiler/pipeline-statistics.cc", + "src/compiler/pipeline-statistics.h", + "src/compiler/processed-feedback.h", + "src/compiler/property-access-builder.cc", + "src/compiler/property-access-builder.h", + "src/compiler/raw-machine-assembler.cc", + "src/compiler/raw-machine-assembler.h", + "src/compiler/redundancy-elimination.cc", + "src/compiler/redundancy-elimination.h", + "src/compiler/refs-map.cc", + "src/compiler/refs-map.h", + "src/compiler/representation-change.cc", + "src/compiler/representation-change.h", + "src/compiler/schedule.cc", + "src/compiler/schedule.h", + "src/compiler/scheduler.cc", + "src/compiler/scheduler.h", + "src/compiler/select-lowering.cc", + "src/compiler/select-lowering.h", + "src/compiler/serializer-for-background-compilation.cc", + "src/compiler/serializer-for-background-compilation.h", + "src/compiler/serializer-hints.h", + "src/compiler/simplified-lowering.cc", + "src/compiler/simplified-lowering.h", + "src/compiler/simplified-operator.cc", + "src/compiler/simplified-operator.h", + "src/compiler/simplified-operator-reducer.cc", + "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/type-cache.cc", + "src/compiler/type-cache.h", + "src/compiler/type-narrowing-reducer.cc", + "src/compiler/type-narrowing-reducer.h", + "src/compiler/typed-optimization.cc", + "src/compiler/typed-optimization.h", + "src/compiler/typer.cc", + "src/compiler/typer.h", + "src/compiler/types.cc", + "src/compiler/types.h", + "src/compiler/value-numbering-reducer.cc", + "src/compiler/value-numbering-reducer.h", + "src/compiler/verifier.cc", + "src/compiler/verifier.h", + "src/compiler/write-barrier-kind.h", + "src/compiler/zone-stats.cc", + "src/compiler/zone-stats.h", + ] + select({ + ":is_v8_enable_webassembly": [ + "src/compiler/int64-lowering.cc", + "src/compiler/wasm-compiler.cc", + ], + "//conditions:default": [], + }), +) + + + +filegroup( + name = "v8_initializers_files", + srcs = [ + "src/builtins/builtins-array-gen.cc", + "src/builtins/builtins-array-gen.h", + "src/builtins/builtins-async-function-gen.cc", + "src/builtins/builtins-async-gen.cc", + "src/builtins/builtins-async-gen.h", + "src/builtins/builtins-async-generator-gen.cc", + "src/builtins/builtins-async-iterator-gen.cc", + "src/builtins/builtins-bigint-gen.cc", + "src/builtins/builtins-bigint-gen.h", + "src/builtins/builtins-call-gen.cc", + "src/builtins/builtins-call-gen.h", + "src/builtins/builtins-collections-gen.cc", + "src/builtins/builtins-collections-gen.h", + "src/builtins/builtins-constructor-gen.cc", + "src/builtins/builtins-constructor-gen.h", + "src/builtins/builtins-constructor.h", + "src/builtins/builtins-conversion-gen.cc", + "src/builtins/builtins-data-view-gen.h", + "src/builtins/builtins-date-gen.cc", + "src/builtins/builtins-generator-gen.cc", + "src/builtins/builtins-global-gen.cc", + "src/builtins/builtins-handler-gen.cc", + "src/builtins/builtins-ic-gen.cc", + "src/builtins/builtins-internal-gen.cc", + "src/builtins/builtins-interpreter-gen.cc", + "src/builtins/builtins-iterator-gen.cc", + "src/builtins/builtins-iterator-gen.h", + "src/builtins/builtins-lazy-gen.cc", + "src/builtins/builtins-lazy-gen.h", + "src/builtins/builtins-microtask-queue-gen.cc", + "src/builtins/builtins-number-gen.cc", + "src/builtins/builtins-object-gen.cc", + "src/builtins/builtins-promise-gen.cc", + "src/builtins/builtins-promise-gen.h", + "src/builtins/builtins-proxy-gen.cc", + "src/builtins/builtins-proxy-gen.h", + "src/builtins/builtins-regexp-gen.cc", + "src/builtins/builtins-regexp-gen.h", + "src/builtins/builtins-sharedarraybuffer-gen.cc", + "src/builtins/builtins-string-gen.cc", + "src/builtins/builtins-string-gen.h", + "src/builtins/builtins-typed-array-gen.cc", + "src/builtins/builtins-typed-array-gen.h", + "src/builtins/builtins-utils-gen.h", + "src/builtins/growable-fixed-array-gen.cc", + "src/builtins/growable-fixed-array-gen.h", + "src/builtins/profile-data-reader.cc", + "src/builtins/profile-data-reader.h", + "src/builtins/setup-builtins-internal.cc", + "src/builtins/torque-csa-header-includes.h", + "src/codegen/code-stub-assembler.cc", + "src/codegen/code-stub-assembler.h", + "src/heap/setup-heap-internal.cc", + "src/ic/accessor-assembler.cc", + "src/ic/accessor-assembler.h", + "src/ic/binary-op-assembler.cc", + "src/ic/binary-op-assembler.h", + "src/ic/keyed-store-generic.cc", + "src/ic/keyed-store-generic.h", + "src/ic/unary-op-assembler.cc", + "src/ic/unary-op-assembler.h", + "src/interpreter/interpreter-assembler.cc", + "src/interpreter/interpreter-assembler.h", + "src/interpreter/interpreter-generator.cc", + "src/interpreter/interpreter-generator.h", + "src/interpreter/interpreter-intrinsics-generator.cc", + "src/interpreter/interpreter-intrinsics-generator.h", + ] + select({ + ":is_ia32": ["src/builtins/ia32/builtins-ia32.cc"], + ":is_x64": ["src/builtins/x64/builtins-x64.cc"], + ":is_arm" : ["src/builtins/arm/builtins-arm.cc"], + ":is_arm64": ["src/builtins/arm64/builtins-arm64.cc"], + }) + select({ + ":is_v8_enable_webassembly": [ + "src/builtins/builtins-wasm-gen.cc", + "src/builtins/builtins-wasm-gen.h", + ], + "//conditions:default": [], + }), +) + +filegroup( + name = "cppgc_base_files", + srcs = [ + "src/heap/cppgc/allocation.cc", + "src/heap/cppgc/compaction-worklists.cc", + "src/heap/cppgc/compaction-worklists.h", + "src/heap/cppgc/compactor.cc", + "src/heap/cppgc/compactor.h", + "src/heap/cppgc/concurrent-marker.cc", + "src/heap/cppgc/concurrent-marker.h", + "src/heap/cppgc/default-platform.cc", + "src/heap/cppgc/explicit-management.cc", + "src/heap/cppgc/free-list.cc", + "src/heap/cppgc/free-list.h", + "src/heap/cppgc/garbage-collector.h", + "src/heap/cppgc/gc-info.cc", + "src/heap/cppgc/gc-info-table.cc", + "src/heap/cppgc/gc-info-table.h", + "src/heap/cppgc/gc-invoker.cc", + "src/heap/cppgc/gc-invoker.h", + "src/heap/cppgc/heap.cc", + "src/heap/cppgc/heap.h", + "src/heap/cppgc/heap-base.cc", + "src/heap/cppgc/heap-base.h", + "src/heap/cppgc/heap-consistency.cc", + "src/heap/cppgc/heap-growing.cc", + "src/heap/cppgc/heap-growing.h", + "src/heap/cppgc/heap-object-header.cc", + "src/heap/cppgc/heap-object-header.h", + "src/heap/cppgc/heap-page.cc", + "src/heap/cppgc/heap-page.h", + "src/heap/cppgc/heap-space.cc", + "src/heap/cppgc/heap-space.h", + "src/heap/cppgc/heap-state.cc", + "src/heap/cppgc/heap-statistics-collector.cc", + "src/heap/cppgc/heap-statistics-collector.h", + "src/heap/cppgc/heap-visitor.h", + "src/heap/cppgc/incremental-marking-schedule.cc", + "src/heap/cppgc/incremental-marking-schedule.h", + "src/heap/cppgc/liveness-broker.cc", + "src/heap/cppgc/liveness-broker.h", + "src/heap/cppgc/logging.cc", + "src/heap/cppgc/marker.cc", + "src/heap/cppgc/marker.h", + "src/heap/cppgc/marking-state.cc", + "src/heap/cppgc/marking-state.h", + "src/heap/cppgc/marking-verifier.cc", + "src/heap/cppgc/marking-verifier.h", + "src/heap/cppgc/marking-visitor.cc", + "src/heap/cppgc/marking-visitor.h", + "src/heap/cppgc/marking-worklists.cc", + "src/heap/cppgc/marking-worklists.h", + "src/heap/cppgc/memory.h", + "src/heap/cppgc/metric-recorder.h", + "src/heap/cppgc/name-trait.cc", + "src/heap/cppgc/object-allocator.cc", + "src/heap/cppgc/object-allocator.h", + "src/heap/cppgc/object-poisoner.h", + "src/heap/cppgc/object-size-trait.cc", + "src/heap/cppgc/object-start-bitmap.h", + "src/heap/cppgc/object-view.h", + "src/heap/cppgc/page-memory.cc", + "src/heap/cppgc/page-memory.h", + "src/heap/cppgc/persistent-node.cc", + "src/heap/cppgc/platform.cc", + "src/heap/cppgc/pointer-policies.cc", + "src/heap/cppgc/prefinalizer-handler.cc", + "src/heap/cppgc/prefinalizer-handler.h", + "src/heap/cppgc/process-heap.cc", + "src/heap/cppgc/process-heap.h", + "src/heap/cppgc/process-heap-statistics.cc", + "src/heap/cppgc/process-heap-statistics.h", + "src/heap/cppgc/raw-heap.cc", + "src/heap/cppgc/raw-heap.h", + "src/heap/cppgc/source-location.cc", + "src/heap/cppgc/stats-collector.cc", + "src/heap/cppgc/stats-collector.h", + "src/heap/cppgc/sweeper.cc", + "src/heap/cppgc/sweeper.h", + "src/heap/cppgc/task-handle.h", + "src/heap/cppgc/trace-event.h", + "src/heap/cppgc/trace-trait.cc", + "src/heap/cppgc/virtual-memory.cc", + "src/heap/cppgc/virtual-memory.h", + "src/heap/cppgc/visitor.cc", + "src/heap/cppgc/visitor.h", + "src/heap/cppgc/write-barrier.cc", + "src/heap/cppgc/write-barrier.h", + ], +) + +filegroup( + name = "v8_cppgc_shared_files", + srcs = [ + "src/heap/base/stack.cc", + "src/heap/base/stack.h", + "src/heap/base/worklist.cc", + "src/heap/base/worklist.h", + "src/heap/cppgc/globals.h", + ] + select({ + ":is_ia32": ["src/heap/base/asm/ia32/push_registers_asm.cc"], + ":is_x64": ["src/heap/base/asm/x64/push_registers_asm.cc"], + ":is_arm" : ["src/heap/base/asm/arm/push_registers_asm.cc"], + ":is_arm64": ["src/heap/base/asm/arm64/push_registers_asm.cc"], + }), +) + +filegroup( + name = "v8_bigint", + srcs = [ + "src/bigint/bigint-internal.cc", + "src/bigint/bigint-internal.h", + "src/bigint/bigint.h", + "src/bigint/digit-arithmetic.h", + "src/bigint/div-burnikel.cc", + "src/bigint/div-helpers.cc", + "src/bigint/div-helpers.h", + "src/bigint/div-schoolbook.cc", + "src/bigint/mul-fft.cc", + "src/bigint/mul-karatsuba.cc", + "src/bigint/mul-schoolbook.cc", + "src/bigint/mul-toom.cc", + "src/bigint/tostring.cc", + "src/bigint/util.h", + "src/bigint/vector-arithmetic.cc", + "src/bigint/vector-arithmetic.h", + ], +) + +filegroup( + name = "mksnapshot_files", + srcs = [ + "src/snapshot/embedded/embedded-empty.cc", + "src/snapshot/embedded/embedded-file-writer.cc", + "src/snapshot/embedded/embedded-file-writer.h", + "src/snapshot/embedded/platform-embedded-file-writer-aix.cc", + "src/snapshot/embedded/platform-embedded-file-writer-aix.h", + "src/snapshot/embedded/platform-embedded-file-writer-base.cc", + "src/snapshot/embedded/platform-embedded-file-writer-base.h", + "src/snapshot/embedded/platform-embedded-file-writer-generic.cc", + "src/snapshot/embedded/platform-embedded-file-writer-generic.h", + "src/snapshot/embedded/platform-embedded-file-writer-mac.cc", + "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/mksnapshot.cc", + "src/snapshot/snapshot-empty.cc", + "src/init/setup-isolate-full.cc", + ] +) + +filegroup( + name = "v8_inspector_files", + srcs = [ + "src/inspector/custom-preview.cc", + "src/inspector/custom-preview.h", + "src/inspector/injected-script.cc", + "src/inspector/injected-script.h", + "src/inspector/inspected-context.cc", + "src/inspector/inspected-context.h", + "src/inspector/remote-object-id.cc", + "src/inspector/remote-object-id.h", + "src/inspector/search-util.cc", + "src/inspector/search-util.h", + "src/inspector/string-16.cc", + "src/inspector/string-16.h", + "src/inspector/string-util.cc", + "src/inspector/string-util.h", + "src/inspector/test-interface.cc", + "src/inspector/test-interface.h", + "src/inspector/v8-console.cc", + "src/inspector/v8-console.h", + "src/inspector/v8-console-agent-impl.cc", + "src/inspector/v8-console-agent-impl.h", + "src/inspector/v8-console-message.cc", + "src/inspector/v8-console-message.h", + "src/inspector/v8-debugger.cc", + "src/inspector/v8-debugger.h", + "src/inspector/v8-debugger-agent-impl.cc", + "src/inspector/v8-debugger-agent-impl.h", + "src/inspector/v8-debugger-script.cc", + "src/inspector/v8-debugger-script.h", + "src/inspector/v8-heap-profiler-agent-impl.cc", + "src/inspector/v8-heap-profiler-agent-impl.h", + "src/inspector/v8-inspector-impl.cc", + "src/inspector/v8-inspector-impl.h", + "src/inspector/v8-inspector-session-impl.cc", + "src/inspector/v8-inspector-session-impl.h", + "src/inspector/v8-profiler-agent-impl.cc", + "src/inspector/v8-profiler-agent-impl.h", + "src/inspector/v8-regex.cc", + "src/inspector/v8-regex.h", + "src/inspector/v8-runtime-agent-impl.cc", + "src/inspector/v8-runtime-agent-impl.h", + "src/inspector/v8-schema-agent-impl.cc", + "src/inspector/v8-schema-agent-impl.h", + "src/inspector/v8-stack-trace-impl.cc", + "src/inspector/v8-stack-trace-impl.h", + "src/inspector/v8-string-conversions.cc", + "src/inspector/v8-string-conversions.h", + "src/inspector/v8-value-utils.cc", + "src/inspector/v8-value-utils.h", + "src/inspector/v8-debugger-id.h", + "src/inspector/v8-debugger-id.cc", + "src/inspector/value-mirror.cc", + "src/inspector/value-mirror.h", + ":crdtp_platform_files", + ":generated_inspector_files", + ], +) + +filegroup( + name = "crdtp_platform_files", + srcs = [ + "third_party/inspector_protocol/crdtp/json_platform.h", + "third_party/inspector_protocol/crdtp/json_platform_v8.cc", + ":crdtp_files", + ], +) + +filegroup( + name = "crdtp_files", + srcs = [ + "third_party/inspector_protocol/crdtp/cbor.cc", + "third_party/inspector_protocol/crdtp/cbor.h", + "third_party/inspector_protocol/crdtp/maybe.h", + "third_party/inspector_protocol/crdtp/dispatch.cc", + "third_party/inspector_protocol/crdtp/dispatch.h", + "third_party/inspector_protocol/crdtp/error_support.cc", + "third_party/inspector_protocol/crdtp/error_support.h", + "third_party/inspector_protocol/crdtp/export.h", + "third_party/inspector_protocol/crdtp/find_by_first.h", + "third_party/inspector_protocol/crdtp/frontend_channel.h", + "third_party/inspector_protocol/crdtp/glue.h", + "third_party/inspector_protocol/crdtp/protocol_core.h", + "third_party/inspector_protocol/crdtp/protocol_core.cc", + "third_party/inspector_protocol/crdtp/json.cc", + "third_party/inspector_protocol/crdtp/json.h", + "third_party/inspector_protocol/crdtp/parser_handler.h", + "third_party/inspector_protocol/crdtp/serializable.cc", + "third_party/inspector_protocol/crdtp/serializable.h", + "third_party/inspector_protocol/crdtp/serializer_traits.h", + "third_party/inspector_protocol/crdtp/span.cc", + "third_party/inspector_protocol/crdtp/span.h", + "third_party/inspector_protocol/crdtp/status.cc", + "third_party/inspector_protocol/crdtp/status.h", + ], +) + +filegroup( + name = "snapshot_files", + srcs = [ + "src/init/setup-isolate-deserialize.cc", + # TODO(victorgomes): Create a flag to select pregenerated snapshots. + ":generated_snapshot_files", + ] +) + +filegroup( + name = "wee8_files", + srcs = [ + "src/wasm/c-api.cc", + "src/wasm/c-api.h", + "third_party/wasm-api/wasm.h", + "third_party/wasm-api/wasm.hh", + ] +) + +# ================================================= +# Generated files +# ================================================= + +# TODO(victorgomes): Add support to tools/debug_helper, +# which needs class-debug-readers and debug-macros. +v8_torque( + name = "generated_torque_files", + srcs = [":torque_files"], + extras = [ + "bit-fields.h", + "builtin-definitions.h", + # "class-debug-readers.cc", + # "class-debug-readers.h", + "class-forward-declarations.h", + "class-verifiers.cc", + "class-verifiers.h", + "csa-types.h", + # "debug-macros.cc", + # "debug-macros.h", + "enum-verifiers.cc", + "exported-macros-assembler.cc", + "exported-macros-assembler.h", + "factory.cc", + "factory.inc", + "field-offsets.h", + "instance-types.h", + "interface-descriptors.inc", + "objects-body-descriptors-inl.inc", + "objects-printer.cc", + ], + args = select({ + ":is_v8_annotate_torque_ir": [ "-annotate-ir" ], + "//conditions:default": [], + }) + select({ + ":is_32bits": [ "-m32" ], + "//conditions:default": [], + }), +) + +genrule( + name = "generated_inspector_files", + srcs = [ "include/js_protocol.pdl" ], + outs = [ + "include/inspector/Debugger.h", + "include/inspector/Runtime.h", + "include/inspector/Schema.h", + "src/inspector/protocol/Forward.h", + "src/inspector/protocol/Protocol.cpp", + "src/inspector/protocol/Protocol.h", + "src/inspector/protocol/Console.cpp", + "src/inspector/protocol/Console.h", + "src/inspector/protocol/Debugger.cpp", + "src/inspector/protocol/Debugger.h", + "src/inspector/protocol/HeapProfiler.cpp", + "src/inspector/protocol/HeapProfiler.h", + "src/inspector/protocol/Profiler.cpp", + "src/inspector/protocol/Profiler.h", + "src/inspector/protocol/Runtime.cpp", + "src/inspector/protocol/Runtime.h", + "src/inspector/protocol/Schema.cpp", + "src/inspector/protocol/Schema.h", + ], + message = "Generating inspector files", + cmd = "bazel/generate-inspector-files.sh $(@D)", + local = 1, +) + +genrule( + name = "generated_bytecode_builtins_list", + srcs = [], + outs = ["builtins-generated/bytecodes-builtins-list.h"], + cmd = "$(location :bytecode_builtins_list_generator) $@", + tools = [":bytecode_builtins_list_generator"], +) + +genrule( + name = "generated_regexp_special_case", + srcs = [], + outs = ["src/regexp/special-case.cc"], + cmd = "$(location :regexp_special_case_generator) $@", + tools = [":regexp_special_case_generator"], +) + +v8_mksnapshot( + name = "generated_snapshot_files", + args = select({ + ":is_v8_enable_verify_heap": [ "--verify-heap" ], + "//conditions:default": [], + }) + select({ + ":is_v8_enable_fast_mksnapshot": [ + "--no-turbo-rewrite-far-jumps", + "--no-turbo-verify-allocation", + ], + "//conditions:default": [], + }) + select({ + ":is_v8_enable_snapshot_code_comments": [ "--code-comments" ], + "//conditions:default": [], + }) + select({ + ":is_v8_enable_snapshot_native_code_counters": [ + "--native-code-counters" + ], + "//conditions:default": [ "--no-native-code-counters" ], + }) +) + +# ================================================= +# Libraries rules +# ================================================= + +v8_library( + name = "v8_libbase", + srcs = [ + ":v8_shared_internal_headers", + ":v8_libbase_files", + ], +) + +v8_library( + name = "v8_libshared", + srcs = [ + ":generated_torque_files", + ":torque_runtime_support_files", + ":v8_base_without_compiler_files", + ":v8_compiler_files", + ":v8_initializers_files", + ":v8_libplatform_files", + ":v8_libsampler_files", + ":v8_shared_internal_headers", + ] + select({ + ":is_v8_enable_i18n_support": [ ":generated_regexp_special_case" ], + "//conditions:default": [], + }), + deps = [ + ":v8_libbase", + "@zlib", + ] + select({ + ":is_v8_enable_i18n_support": [ "@icu" ], + "//conditions:default": [], + }), +) + +v8_library( + name = "v8", + srcs = [ + ":snapshot_files", + ":v8_inspector_files", + ], + deps = [ ":v8_libshared" ], +) + +# TODO(victorgomes): Check if v8_enable_webassembly is true. +v8_library( + name = "wee8", + srcs = [ ":wee8_files" ], + deps = [ ":v8" ], +) + +# ================================================= +# Binary rules +# ================================================= + +v8_binary( + name = "bytecode_builtins_list_generator", + srcs = [ + "src/builtins/generate-bytecodes-builtins-list.cc", + "src/interpreter/bytecode-operands.cc", + "src/interpreter/bytecode-operands.h", + "src/interpreter/bytecode-traits.h", + "src/interpreter/bytecodes.cc", + "src/interpreter/bytecodes.h", + ], + deps = [ "v8_libbase" ], +) + +v8_binary( + name = "regexp_special_case_generator", + srcs = [ + ":v8_shared_internal_headers", + ":v8_libbase_files", + "src/regexp/special-case.h", + "src/regexp/gen-regexp-special-case.cc", + ], + deps = [ "@icu" ], +) + +v8_binary( + name = "torque", + srcs = [ + ":torque_base_files", + "src/torque/torque.cc", + ], + copts = [ "-fexceptions" ], + features = [ "-use_header_modules" ], + deps = [ "v8_libbase" ], +) + +v8_binary( + name = "mksnapshot", + srcs = [ ":mksnapshot_files" ], + deps = [ ":v8_libshared" ], + linkopts = select({ + "is_android": [ "-llog" ], + "//conditions:default": [], + }), +) + +v8_binary( + name = "d8", + srcs = [ + "src/d8/async-hooks-wrapper.cc", + "src/d8/async-hooks-wrapper.h", + "src/d8/d8.cc", + "src/d8/d8.h", + "src/d8/d8-console.cc", + "src/d8/d8-console.h", + "src/d8/d8-js.cc", + "src/d8/d8-platforms.cc", + "src/d8/d8-platforms.h", + "src/d8/d8-posix.cc", + "src/d8/d8-test.cc", + ], + deps = [ ":v8" ], +) diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 5e3045bfdc1d80..17bab98e8faba5 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -79,6 +79,9 @@ declare_args() { # Sets -dENABLE_VTUNE_TRACEMARK. v8_enable_vtunetracemark = false + # Sets -dENABLE_HUGEPAGE + v8_enable_hugepage = false + # Sets -dENABLE_HANDLE_ZAPPING. v8_enable_handle_zapping = is_debug @@ -150,6 +153,15 @@ declare_args() { # v8_enable_concurrent_marking_state. See the default setting code below. v8_enable_concurrent_marking = true + # Sets -dV8_IGNITION_DISPATCH_COUNTING. + # Enables counting frequencies of bytecode dispatches. After building in this + # configuration, subsequent runs of d8 can output frequencies for each pair + # of (current, next) bytecode instructions executed if you specify + # --trace-ignition-dispatches-output-file, or can generate a JS object with + # those frequencies if you run with --expose-ignition-statistics and call the + # extension function getIgnitionDispatchCounters(). + v8_enable_ignition_dispatch_counting = false + # Runs mksnapshot with --turbo-profiling. After building in this # configuration, any subsequent run of d8 will output information about usage # of basic blocks in builtins. @@ -184,6 +196,11 @@ declare_args() { # Sets -dV8_SHORT_BUILTIN_CALLS v8_enable_short_builtin_calls = "" + # Enable support for external code range relative to the pointer compression + # cage. + # Sets -dV8_EXTERNAL_CODE_SPACE + v8_enable_external_code_space = "" + # With post mortem support enabled, metadata is embedded into libv8 that # describes various parameters of the VM for use by debuggers. See # tools/gen-postmortem-metadata.py for details. @@ -213,11 +230,8 @@ declare_args() { # Enable mitigations for executing untrusted code. # Disabled by default on ia32 due to conflicting requirements with embedded - # builtins. Enabled by default on Android since it doesn't support - # site-isolation in Chrome and on simulator builds which test code generation - # on these platforms. - v8_untrusted_code_mitigations = - v8_current_cpu != "x86" && (is_android || target_is_simulator) + # builtins. + v8_untrusted_code_mitigations = false # Enable minor mark compact. v8_enable_minor_mc = true @@ -283,6 +297,10 @@ declare_args() { # TODO(v8:11785): Enable by default when running with the verifier. cppgc_enable_verify_live_bytes = false + # Enable assignment checks for Members/Persistents during prefinalizer invocations. + # TODO(v8:11749): Enable by default after fixing any existing issues in Blink. + cppgc_enable_check_assignments_in_prefinalizers = false + # Enable young generation in cppgc. cppgc_enable_young_generation = false @@ -317,6 +335,13 @@ declare_args() { # Allow for JS promise hooks (instead of just C++). v8_allow_javascript_in_promise_hooks = false + + # Enable allocation folding globally (sets -dV8_ALLOCATION_FOLDING). + # When it's disabled, the --turbo-allocation-folding runtime flag will be ignored. + v8_enable_allocation_folding = true + + # Enable global allocation site tracking. + v8_allocation_site_tracking = true } # Derived defaults. @@ -371,6 +396,9 @@ if (v8_enable_short_builtin_calls == "") { v8_enable_short_builtin_calls = v8_current_cpu == "x64" || (!is_android && v8_current_cpu == "arm64") } +if (v8_enable_external_code_space == "") { + v8_enable_external_code_space = false +} if (v8_enable_single_generation == "") { v8_enable_single_generation = v8_disable_write_barriers } @@ -386,6 +414,10 @@ if (v8_enable_third_party_heap) { v8_enable_shared_ro_heap = false v8_enable_pointer_compression = false v8_enable_pointer_compression_shared_cage = false + v8_enable_allocation_folding = false +} +if (v8_enable_single_generation) { + v8_allocation_site_tracking = false } assert(!v8_enable_concurrent_marking || v8_enable_atomic_object_field_writes, "Concurrent marking requires atomic object field writes.") @@ -448,13 +480,17 @@ assert(!v8_use_multi_snapshots || !v8_control_flow_integrity, assert(!v8_enable_heap_sandbox || v8_enable_pointer_compression, "V8 Heap Sandbox requires pointer compression") +assert(!v8_enable_heap_sandbox || !v8_enable_external_code_space, + "V8 Heap Sandbox is not compatible with external code space YET") + 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_shared_cage || v8_current_cpu == "x64" || - v8_current_cpu == "arm64", - "Sharing a pointer compression cage is only supported on x64 and arm64") +assert( + !v8_enable_pointer_compression_shared_cage || v8_current_cpu == "x64" || + v8_current_cpu == "arm64" || v8_current_cpu == "riscv64", + "Sharing a pointer compression cage is only supported on x64,arm64 and riscv64") assert(!v8_enable_unconditional_write_barriers || !v8_disable_write_barriers, "Write barriers can't be both enabled and disabled") @@ -605,6 +641,7 @@ external_v8_defines = [ "V8_NO_ARGUMENTS_ADAPTOR", "V8_USE_PERFETTO", "V8_MAP_PACKING", + "V8_IS_TSAN", ] enabled_external_v8_defines = [] @@ -641,6 +678,9 @@ if (v8_use_perfetto) { if (v8_enable_map_packing) { enabled_external_v8_defines += [ "V8_MAP_PACKING" ] } +if (is_tsan) { + enabled_external_v8_defines += [ "V8_IS_TSAN" ] +} disabled_external_v8_defines = external_v8_defines - enabled_external_v8_defines @@ -711,6 +751,10 @@ config("features") { defines += [ "CPPGC_VERIFY_LIVE_BYTES" ] } + if (cppgc_enable_check_assignments_in_prefinalizers) { + defines += [ "CPPGC_CHECK_ASSIGNMENTS_IN_PREFINALIZERS" ] + } + if (v8_embedder_string != "") { defines += [ "V8_EMBEDDER_STRING=\"$v8_embedder_string\"" ] } @@ -743,6 +787,9 @@ config("features") { if (v8_enable_vtunetracemark) { defines += [ "ENABLE_VTUNE_TRACEMARK" ] } + if (v8_enable_hugepage) { + defines += [ "ENABLE_HUGEPAGE" ] + } if (v8_enable_minor_mc) { defines += [ "ENABLE_MINOR_MC" ] } @@ -805,6 +852,9 @@ config("features") { if (v8_enable_atomic_marking_state) { defines += [ "V8_ATOMIC_MARKING_STATE" ] } + if (v8_enable_ignition_dispatch_counting) { + defines += [ "V8_IGNITION_DISPATCH_COUNTING" ] + } if (v8_enable_lazy_source_positions) { defines += [ "V8_ENABLE_LAZY_SOURCE_POSITIONS" ] } @@ -841,6 +891,9 @@ config("features") { if (v8_enable_short_builtin_calls) { defines += [ "V8_SHORT_BUILTIN_CALLS" ] } + if (v8_enable_external_code_space) { + defines += [ "V8_EXTERNAL_CODE_SPACE" ] + } if (v8_enable_swiss_name_dictionary) { defines += [ "V8_ENABLE_SWISS_NAME_DICTIONARY" ] } @@ -859,6 +912,12 @@ config("features") { if (v8_allow_javascript_in_promise_hooks) { defines += [ "V8_ALLOW_JAVASCRIPT_IN_PROMISE_HOOKS" ] } + if (v8_enable_allocation_folding) { + defines += [ "V8_ALLOCATION_FOLDING" ] + } + if (v8_allocation_site_tracking) { + defines += [ "V8_ALLOCATION_SITE_TRACKING" ] + } } config("toolchain") { @@ -2350,8 +2409,8 @@ v8_header_set("v8_internal_headers") { "src/ast/variables.h", "src/baseline/baseline-assembler-inl.h", "src/baseline/baseline-assembler.h", + "src/baseline/baseline-batch-compiler.h", "src/baseline/baseline-compiler.h", - "src/baseline/baseline-osr-inl.h", "src/baseline/baseline.h", "src/baseline/bytecode-offset-iterator.h", "src/builtins/accessors.h", @@ -2458,6 +2517,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/effect-control-linearizer.h", "src/compiler/escape-analysis-reducer.h", "src/compiler/escape-analysis.h", + "src/compiler/fast-api-calls.h", "src/compiler/feedback-source.h", "src/compiler/frame-states.h", "src/compiler/frame.h", @@ -2753,21 +2813,13 @@ v8_header_set("v8_internal_headers") { "src/logging/log-utils.h", "src/logging/log.h", "src/logging/metrics.h", + "src/logging/runtime-call-stats-scope.h", "src/logging/runtime-call-stats.h", "src/logging/tracing-flags.h", - "src/numbers/bignum-dtoa.h", - "src/numbers/bignum.h", - "src/numbers/cached-powers.h", "src/numbers/conversions-inl.h", "src/numbers/conversions.h", - "src/numbers/diy-fp.h", - "src/numbers/double.h", - "src/numbers/dtoa.h", - "src/numbers/fast-dtoa.h", - "src/numbers/fixed-dtoa.h", "src/numbers/hash-seed-inl.h", "src/numbers/math-random.h", - "src/numbers/strtod.h", "src/objects/all-objects-inl.h", "src/objects/allocation-site-inl.h", "src/objects/allocation-site-scopes-inl.h", @@ -2879,6 +2931,7 @@ v8_header_set("v8_internal_headers") { "src/objects/object-list-macros.h", "src/objects/object-macros-undef.h", "src/objects/object-macros.h", + "src/objects/object-type.h", "src/objects/objects-body-descriptors-inl.h", "src/objects/objects-body-descriptors.h", "src/objects/objects-inl.h", @@ -3057,8 +3110,6 @@ v8_header_set("v8_internal_headers") { "src/tracing/trace-event.h", "src/tracing/traced-value.h", "src/tracing/tracing-category-observer.h", - "src/trap-handler/trap-handler-internal.h", - "src/trap-handler/trap-handler.h", "src/utils/address-map.h", "src/utils/allocation.h", "src/utils/bit-vector.h", @@ -3073,7 +3124,6 @@ v8_header_set("v8_internal_headers") { "src/utils/scoped-list.h", "src/utils/utils-inl.h", "src/utils/utils.h", - "src/utils/vector.h", "src/utils/version.h", "src/zone/accounting-allocator.h", "src/zone/compressed-zone-ptr.h", @@ -3106,6 +3156,8 @@ v8_header_set("v8_internal_headers") { "src/compiler/wasm-compiler.h", "src/debug/debug-wasm-objects-inl.h", "src/debug/debug-wasm-objects.h", + "src/trap-handler/trap-handler-internal.h", + "src/trap-handler/trap-handler.h", "src/wasm/baseline/liftoff-assembler-defs.h", "src/wasm/baseline/liftoff-assembler.h", "src/wasm/baseline/liftoff-compiler.h", @@ -3117,6 +3169,7 @@ v8_header_set("v8_internal_headers") { "src/wasm/function-body-decoder.h", "src/wasm/function-compiler.h", "src/wasm/graph-builder-interface.h", + "src/wasm/init-expr-interface.h", "src/wasm/jump-table-assembler.h", "src/wasm/leb-helper.h", "src/wasm/local-decl-encoder.h", @@ -3156,6 +3209,12 @@ v8_header_set("v8_internal_headers") { ] } + if (!v8_enable_third_party_heap) { + sources += filter_include(v8_third_party_heap_files, [ "*.h" ]) + } else { + sources += [ "src/heap/third-party/heap-api.h" ] + } + if (v8_enable_i18n_support) { sources += [ "src/objects/intl-objects.h", @@ -3248,16 +3307,19 @@ v8_header_set("v8_internal_headers") { "src/wasm/baseline/x64/liftoff-assembler-x64.h", ] - # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both - # based on Darwin and thus POSIX-compliant to a similar degree. - if (is_linux || is_chromeos || is_mac || is_ios || target_os == "freebsd") { - sources += [ "src/trap-handler/handler-inside-posix.h" ] - } if (is_win) { - sources += [ - "src/diagnostics/unwinding-info-win64.h", - "src/trap-handler/handler-inside-win.h", - ] + sources += [ "src/diagnostics/unwinding-info-win64.h" ] + } + + if (v8_enable_webassembly) { + # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both + # based on Darwin and thus POSIX-compliant to a similar degree. + if (is_linux || is_chromeos || is_mac || is_ios || + target_os == "freebsd") { + sources += [ "src/trap-handler/handler-inside-posix.h" ] + } else if (is_win) { + sources += [ "src/trap-handler/handler-inside-win.h" ] + } } } else if (v8_current_cpu == "arm") { sources += [ ### gcmole(arch:arm) ### @@ -3302,7 +3364,7 @@ v8_header_set("v8_internal_headers") { if (v8_control_flow_integrity) { sources += [ "src/execution/arm64/pointer-authentication-arm64.h" ] } - if (current_cpu == "arm64" && is_mac) { + if (v8_enable_webassembly && current_cpu == "arm64" && is_mac) { sources += [ "src/trap-handler/handler-inside-posix.h" ] } if (is_win) { @@ -3456,6 +3518,7 @@ v8_compiler_sources = [ "src/compiler/effect-control-linearizer.cc", "src/compiler/escape-analysis-reducer.cc", "src/compiler/escape-analysis.cc", + "src/compiler/fast-api-calls.cc", "src/compiler/feedback-source.cc", "src/compiler/frame-states.cc", "src/compiler/frame.cc", @@ -3630,6 +3693,7 @@ v8_source_set("v8_base_without_compiler") { "src/ast/scopes.cc", "src/ast/source-range-ast-visitor.cc", "src/ast/variables.cc", + "src/baseline/baseline-batch-compiler.cc", "src/baseline/baseline-compiler.cc", "src/baseline/baseline.cc", "src/baseline/bytecode-offset-iterator.cc", @@ -3845,16 +3909,8 @@ v8_source_set("v8_base_without_compiler") { "src/logging/metrics.cc", "src/logging/runtime-call-stats.cc", "src/logging/tracing-flags.cc", - "src/numbers/bignum-dtoa.cc", - "src/numbers/bignum.cc", - "src/numbers/cached-powers.cc", "src/numbers/conversions.cc", - "src/numbers/diy-fp.cc", - "src/numbers/dtoa.cc", - "src/numbers/fast-dtoa.cc", - "src/numbers/fixed-dtoa.cc", "src/numbers/math-random.cc", - "src/numbers/strtod.cc", "src/objects/backing-store.cc", "src/objects/bigint.cc", "src/objects/code-kind.cc", @@ -3892,6 +3948,7 @@ v8_source_set("v8_base_without_compiler") { "src/objects/map-updater.cc", "src/objects/map.cc", "src/objects/module.cc", + "src/objects/object-type.cc", "src/objects/objects.cc", "src/objects/ordered-hash-table.cc", "src/objects/osr-optimized-code-cache.cc", @@ -3908,6 +3965,7 @@ v8_source_set("v8_base_without_compiler") { "src/objects/synthetic-module.cc", "src/objects/tagged-impl.cc", "src/objects/template-objects.cc", + "src/objects/templates.cc", "src/objects/transitions.cc", "src/objects/type-hints.cc", "src/objects/value-serializer.cc", @@ -4021,9 +4079,6 @@ v8_source_set("v8_base_without_compiler") { "src/tracing/trace-event.cc", "src/tracing/traced-value.cc", "src/tracing/tracing-category-observer.cc", - "src/trap-handler/handler-inside.cc", - "src/trap-handler/handler-outside.cc", - "src/trap-handler/handler-shared.cc", "src/utils/address-map.cc", "src/utils/allocation.cc", "src/utils/bit-vector.cc", @@ -4050,11 +4105,16 @@ v8_source_set("v8_base_without_compiler") { "src/debug/debug-wasm-objects.cc", "src/runtime/runtime-test-wasm.cc", "src/runtime/runtime-wasm.cc", + "src/trap-handler/handler-inside.cc", + "src/trap-handler/handler-outside.cc", + "src/trap-handler/handler-shared.cc", "src/wasm/baseline/liftoff-assembler.cc", "src/wasm/baseline/liftoff-compiler.cc", + "src/wasm/code-space-access.cc", "src/wasm/function-body-decoder.cc", "src/wasm/function-compiler.cc", "src/wasm/graph-builder-interface.cc", + "src/wasm/init-expr-interface.cc", "src/wasm/jump-table-assembler.cc", "src/wasm/local-decl-encoder.cc", "src/wasm/memory-protection-key.cc", @@ -4088,12 +4148,9 @@ v8_source_set("v8_base_without_compiler") { } if (v8_enable_third_party_heap) { - sources += v8_third_party_heap_files + sources += filter_exclude(v8_third_party_heap_files, [ "*.h" ]) } else { - sources += [ - "src/heap/third-party/heap-api-stub.cc", - "src/heap/third-party/heap-api.h", - ] + sources += [ "src/heap/third-party/heap-api-stub.cc" ] } if (v8_enable_conservative_stack_scanning) { @@ -4146,20 +4203,25 @@ v8_source_set("v8_base_without_compiler") { "src/regexp/x64/regexp-macro-assembler-x64.cc", ] - # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both - # based on Darwin and thus POSIX-compliant to a similar degree. - if (is_linux || is_chromeos || is_mac || is_ios || target_os == "freebsd") { - sources += [ - "src/trap-handler/handler-inside-posix.cc", - "src/trap-handler/handler-outside-posix.cc", - ] - } if (is_win) { - sources += [ - "src/diagnostics/unwinding-info-win64.cc", - "src/trap-handler/handler-inside-win.cc", - "src/trap-handler/handler-outside-win.cc", - ] + sources += [ "src/diagnostics/unwinding-info-win64.cc" ] + } + + if (v8_enable_webassembly) { + # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both + # based on Darwin and thus POSIX-compliant to a similar degree. + if (is_linux || is_chromeos || is_mac || is_ios || + target_os == "freebsd") { + sources += [ + "src/trap-handler/handler-inside-posix.cc", + "src/trap-handler/handler-outside-posix.cc", + ] + } else if (is_win) { + sources += [ + "src/trap-handler/handler-inside-win.cc", + "src/trap-handler/handler-outside-win.cc", + ] + } } } else if (v8_current_cpu == "arm") { sources += [ ### gcmole(arch:arm) ### @@ -4203,7 +4265,7 @@ v8_source_set("v8_base_without_compiler") { "src/execution/arm64/simulator-logic-arm64.cc", "src/regexp/arm64/regexp-macro-assembler-arm64.cc", ] - if (current_cpu == "arm64" && is_mac) { + if (v8_enable_webassembly && current_cpu == "arm64" && is_mac) { sources += [ "src/trap-handler/handler-inside-posix.cc", "src/trap-handler/handler-outside-posix.cc", @@ -4447,6 +4509,8 @@ v8_source_set("torque_base") { "src/torque/class-debug-reader-generator.cc", "src/torque/constants.h", "src/torque/contextual.h", + "src/torque/cpp-builder.cc", + "src/torque/cpp-builder.h", "src/torque/csa-generator.cc", "src/torque/csa-generator.h", "src/torque/declarable.cc", @@ -4597,6 +4661,23 @@ v8_component("v8_libbase") { "src/base/logging.h", "src/base/macros.h", "src/base/memory.h", + "src/base/numbers/bignum-dtoa.cc", + "src/base/numbers/bignum-dtoa.h", + "src/base/numbers/bignum.cc", + "src/base/numbers/bignum.h", + "src/base/numbers/cached-powers.cc", + "src/base/numbers/cached-powers.h", + "src/base/numbers/diy-fp.cc", + "src/base/numbers/diy-fp.h", + "src/base/numbers/double.h", + "src/base/numbers/dtoa.cc", + "src/base/numbers/dtoa.h", + "src/base/numbers/fast-dtoa.cc", + "src/base/numbers/fast-dtoa.h", + "src/base/numbers/fixed-dtoa.cc", + "src/base/numbers/fixed-dtoa.h", + "src/base/numbers/strtod.cc", + "src/base/numbers/strtod.h", "src/base/once.cc", "src/base/once.h", "src/base/optional.h", @@ -4626,6 +4707,8 @@ v8_component("v8_libbase") { "src/base/sanitizer/lsan.h", "src/base/sanitizer/msan.h", "src/base/small-vector.h", + "src/base/strings.cc", + "src/base/strings.h", "src/base/sys-info.cc", "src/base/sys-info.h", "src/base/template-utils.h", @@ -4633,6 +4716,7 @@ v8_component("v8_libbase") { "src/base/type-traits.h", "src/base/utils/random-number-generator.cc", "src/base/utils/random-number-generator.h", + "src/base/vector.h", "src/base/vlq-base64.cc", "src/base/vlq-base64.h", "src/base/vlq.h", @@ -4869,11 +4953,27 @@ v8_source_set("v8_bigint") { "src/bigint/bigint-internal.h", "src/bigint/bigint.h", "src/bigint/digit-arithmetic.h", + "src/bigint/div-burnikel.cc", + "src/bigint/div-helpers.cc", + "src/bigint/div-helpers.h", + "src/bigint/div-schoolbook.cc", + "src/bigint/mul-karatsuba.cc", "src/bigint/mul-schoolbook.cc", + "src/bigint/tostring.cc", + "src/bigint/util.h", "src/bigint/vector-arithmetic.cc", "src/bigint/vector-arithmetic.h", ] + if (v8_advanced_bigint_algorithms) { + sources += [ + "src/bigint/mul-fft.cc", + "src/bigint/mul-toom.cc", + ] + + defines = [ "V8_ADVANCED_BIGINT_ALGORITHMS" ] + } + configs = [ ":internal_config" ] } @@ -4962,6 +5062,10 @@ v8_header_set("cppgc_headers") { "include/cppgc/process-heap-statistics.h", "include/cppgc/sentinel-pointer.h", "include/cppgc/source-location.h", + + # TODO(v8:11952): Remove the testing header here once depending on both, + # //v8:v8 and //v8:v8_for_testing does not result in ODR violations. + "include/cppgc/testing.h", "include/cppgc/trace-trait.h", "include/cppgc/type-traits.h", "include/cppgc/visitor.h", @@ -5058,6 +5162,10 @@ v8_source_set("cppgc_base") { "src/heap/cppgc/sweeper.cc", "src/heap/cppgc/sweeper.h", "src/heap/cppgc/task-handle.h", + + # TODO(v8:11952): Remove the testing header here once depending on both, + # //v8:v8 and //v8:v8_for_testing does not result in ODR violations. + "src/heap/cppgc/testing.cc", "src/heap/cppgc/trace-event.h", "src/heap/cppgc/trace-trait.cc", "src/heap/cppgc/virtual-memory.cc", @@ -5094,22 +5202,6 @@ v8_source_set("cppgc_base") { } } -v8_source_set("cppgc_base_for_testing") { - visibility = [ ":*" ] - - sources = [ - "include/cppgc/testing.h", - "src/heap/cppgc/testing.cc", - ] - - configs = [ - ":internal_config", - ":cppgc_base_config", - ] - - public_deps = [ ":cppgc_base" ] -} - if (v8_check_header_includes) { # This file will be generated by tools/generate-header-include-checks.py # if the "check_v8_header_includes" gclient variable is set. @@ -5491,7 +5583,6 @@ if (is_component_build) { sources = [ "src/utils/v8dll-main.cc" ] public_deps = [ - ":cppgc_base_for_testing", ":torque_base", ":torque_ls_base", ":v8_base", @@ -5520,10 +5611,7 @@ if (is_component_build) { v8_component("cppgc_for_testing") { testonly = true - public_deps = [ - ":cppgc_base", - ":cppgc_base_for_testing", - ] + public_deps = [ ":cppgc_base" ] configs = [] public_configs = [ ":external_config" ] @@ -5552,7 +5640,6 @@ if (is_component_build) { testonly = true public_deps = [ - ":cppgc_base_for_testing", ":torque_base", ":torque_ls_base", ":v8_base", @@ -5577,10 +5664,7 @@ if (is_component_build) { group("cppgc_for_testing") { testonly = true - public_deps = [ - ":cppgc_base", - ":cppgc_base_for_testing", - ] + public_deps = [ ":cppgc_base" ] public_configs = [ ":external_config" ] } diff --git a/deps/v8/COMMON_OWNERS b/deps/v8/COMMON_OWNERS index 8072df037bf0c5..69222f9843c3d6 100644 --- a/deps/v8/COMMON_OWNERS +++ b/deps/v8/COMMON_OWNERS @@ -35,7 +35,6 @@ solanes@chromium.org syg@chromium.org szuend@chromium.org thibaudm@chromium.org -ulan@chromium.org vahl@chromium.org verwaest@chromium.org victorgomes@chromium.org diff --git a/deps/v8/DEPS b/deps/v8/DEPS index d3de2c5ddc9eaf..b1e297b106f44c 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -41,13 +41,18 @@ vars = { 'android_url': 'https://android.googlesource.com', 'download_gcmole': False, 'download_jsfunfuzz': False, + 'download_prebuilt_bazel': False, 'check_v8_header_includes': False, + 'checkout_reclient': False, + + # reclient CIPD package version + 'reclient_version': 're_client_version:0.33.0.3e223d5', # GN CIPD package version. - 'gn_version': 'git_revision:39a87c0b36310bdf06b692c098f199a0d97fc810', + 'gn_version': 'git_revision:24e2f7df92641de0351a96096fb2c490b2436bb8', # luci-go CIPD package version. - 'luci_go': 'git_revision:22d464e2f8f3bd2bd33f69fe819326d63f881008', + 'luci_go': 'git_revision:8b8a9a6040ca6debd30694a71a99a1eac97d72fd', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_build-tools_version @@ -84,16 +89,12 @@ vars = { } deps = { + 'base/trace_event/common': + Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + 'd5bb24e5d9802c8c917fcaa4375d5239a586c168', 'build': - Var('chromium_url') + '/chromium/src/build.git' + '@' + '4036cf1b17581f5668b487a25e252d56e0321a7f', - 'third_party/depot_tools': - Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '6b0a611c2c692684f94c0c3629f793feebd16b39', - 'third_party/icu': - Var('chromium_url') + '/chromium/deps/icu.git' + '@' + 'f022e298b4f4a782486bb6d5ce6589c998b51fe2', - 'third_party/instrumented_libraries': - Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + '4ae2535e8e894c3cd81d46aacdaf151b5df30709', + Var('chromium_url') + '/chromium/src/build.git' + '@' + '2d999384c270a340f592cce0a0fb3f8f94c15290', 'buildtools': - Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '20b1d0fc13ebaa263a1248f08814f523a86e6bed', + Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '2500c1d8f3a20a66a7cbafe3f69079a2edb742dd', 'buildtools/clang_format/script': Var('chromium_url') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + '99803d74e35962f63a775f29477882afd4d57d94', 'buildtools/linux64': { @@ -117,11 +118,11 @@ deps = { 'condition': 'host_os == "mac"', }, 'buildtools/third_party/libc++/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '8fa87946779682841e21e2da977eccfb6cb3bded', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '79a2e924d96e2fc1e4b937c42efd08898fa472d7', 'buildtools/third_party/libc++abi/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '767de317f97343db64af048e3d198ab8b10fee5d', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '6803464b0f46df0a51862347d39e0791b59cf568', 'buildtools/third_party/libunwind/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + '7846d256355e40273f7cc192c8f5893e8665a1f9', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'a5feaf61658af4453e282142a76aeb6f9c045311', 'buildtools/win': { 'packages': [ { @@ -132,14 +133,50 @@ deps = { 'dep_type': 'cipd', 'condition': 'host_os == "win"', }, - 'base/trace_event/common': - Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + 'd5bb24e5d9802c8c917fcaa4375d5239a586c168', + 'buildtools/reclient': { + 'packages': [ + { + 'package': 'infra/rbe/client/${{platform}}', + 'version': Var('reclient_version'), + } + ], + 'dep_type': 'cipd', + 'condition': '(host_os == "linux" or host_os == "win") and checkout_reclient', + }, + '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' + '@' + 'ebb6c34fa5dd76a6bea01c54ed7b182596492176', + 'test/test262/harness': + Var('chromium_url') + '/external/github.com/test262-utils/test262-harness-py.git' + '@' + '278bcfaed0dcaa13936831fb1769d15e7c1e3b2b', + 'third_party/aemu-linux-x64': { + 'packages': [ + { + 'package': 'fuchsia/third_party/aemu/linux-amd64', + 'version': 'm4sM10idq7LeFHXpoLKLBtaOZsQzuj63Usa3Cl9af1YC' + }, + ], + 'condition': 'host_os == "linux" and checkout_fuchsia', + 'dep_type': 'cipd', + }, + 'third_party/aemu-mac-x64': { + 'packages': [ + { + 'package': 'fuchsia/third_party/aemu/mac-amd64', + 'version': 'T9bWxf8aUC5TwCFgPxpuW29Mfy-7Z9xCfXB9QO8MfU0C' + }, + ], + 'condition': 'host_os == "mac" and checkout_fuchsia', + 'dep_type': 'cipd', + }, 'third_party/android_ndk': { 'url': Var('chromium_url') + '/android_ndk.git' + '@' + '401019bf85744311b26c88ced255cd53401af8b7', 'condition': 'checkout_android', }, 'third_party/android_platform': { - 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + 'fdaa5e5b9f6384c3011ca8479d672e47528f743f', + 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + 'b291e88d8e3e6774d6d46151e11dc3189ddeeb09', 'condition': 'checkout_android', }, 'third_party/android_sdk/public': { @@ -181,36 +218,46 @@ deps = { 'dep_type': 'cipd', }, 'third_party/catapult': { - 'url': Var('chromium_url') + '/catapult.git' + '@' + 'c1e1d559b46476584ec0eb1d83bd7f43fa5a1b36', + 'url': Var('chromium_url') + '/catapult.git' + '@' + '2814ff3716a8512518bee705a0f91425ce06b27b', 'condition': 'checkout_android', }, 'third_party/colorama/src': { 'url': Var('chromium_url') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', 'condition': 'checkout_android', }, + 'third_party/depot_tools': + Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + 'a806594b95a39141fdbf1f359087a44ffb2deaaf', 'third_party/fuchsia-sdk': { - 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-sdk.git' + '@' + 'efa46583d89ea8c97523281d9f52a0d96472114d', + 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-sdk.git' + '@' + '18896843130c33372c455c153ad07d2217bd2085', 'condition': 'checkout_fuchsia', }, - 'third_party/googletest/src': - Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + '23ef29555ef4789f555f1ba8c51b4c52975f0907', 'third_party/google_benchmark/src': { - 'url': Var('chromium_url') + '/external/github.com/google/benchmark.git' + '@' + '7d0d9061d83b663ce05d9de5da3d5865a3845b79', + 'url': Var('chromium_url') + '/external/github.com/google/benchmark.git' + '@' + 'e451e50e9b8af453f076dec10bd6890847f1624e', + }, + 'third_party/googletest/src': + Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + '4ec4cd23f486bf70efcc5d2caa40f24368f752e3', + 'third_party/icu': + Var('chromium_url') + '/chromium/deps/icu.git' + '@' + 'b9dfc58bf9b02ea0365509244aca13841322feb0', + 'third_party/instrumented_libraries': + Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + '4ae2535e8e894c3cd81d46aacdaf151b5df30709', + 'third_party/ittapi': { + # Force checkout ittapi libraries to pass v8 header includes check on + # bots that has check_v8_header_includes enabled. + 'url': Var('chromium_url') + '/external/github.com/intel/ittapi' + '@' + 'b4ae0122ba749163096058b4f1bb065bf4a7de94', + 'condition': "checkout_ittapi or check_v8_header_includes", }, 'third_party/jinja2': - Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + '11b6b3e5971d760bd2d310f77643f55a818a6d25', + Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + '7c54c1f227727e0c4c1d3dc19dd71cd601a2db95', + 'third_party/jsoncpp/source': + Var('chromium_url') + '/external/github.com/open-source-parsers/jsoncpp.git'+ '@' + '9059f5cad030ba11d37818847443a53918c327b1', + 'third_party/logdog/logdog': + Var('chromium_url') + '/infra/luci/luci-py/client/libs/logdog' + '@' + '794d09a24c10401953880c253d0c7e267234ab75', 'third_party/markupsafe': - Var('chromium_url') + '/chromium/src/third_party/markupsafe.git' + '@' + '0944e71f4b2cb9a871bcbe353f95e889b64a611a', - 'tools/swarming_client': - Var('chromium_url') + '/infra/luci/client-py.git' + '@' + 'a32a1607f6093d338f756c7e7c7b4333b0c50c9c', - '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' + '@' + '6d353a4436747e2de8820efac27ae5ef7e601b60', - 'test/test262/harness': - Var('chromium_url') + '/external/github.com/test262-utils/test262-harness-py.git' + '@' + '278bcfaed0dcaa13936831fb1769d15e7c1e3b2b', + Var('chromium_url') + '/chromium/src/third_party/markupsafe.git' + '@' + '1b882ef6372b58bfd55a3285f37ed801be9137cd', + 'third_party/perfetto': + Var('android_url') + '/platform/external/perfetto.git' + '@' + 'aa4385bc5997ecad4c633885e1b331b1115012fb', + 'third_party/protobuf': + Var('chromium_url') + '/external/github.com/google/protobuf'+ '@' + '6a59a2ad1f61d9696092f79b6d74368b4d7970a3', 'third_party/qemu-linux-x64': { 'packages': [ { @@ -231,28 +278,24 @@ deps = { 'condition': 'host_os == "mac" and checkout_fuchsia', 'dep_type': 'cipd', }, - 'third_party/aemu-linux-x64': { - 'packages': [ - { - 'package': 'fuchsia/third_party/aemu/linux-amd64', - 'version': '-Sz2gSN_5yVSHDlitjxUlmZpHuz-F2kFDW6TnmggCZoC' - }, - ], - 'condition': 'host_os == "linux" and checkout_fuchsia', - 'dep_type': 'cipd', - }, - 'third_party/aemu-mac-x64': { - 'packages': [ - { - 'package': 'fuchsia/third_party/aemu/mac-amd64', - 'version': 'T9bWxf8aUC5TwCFgPxpuW29Mfy-7Z9xCfXB9QO8MfU0C' - }, - ], - 'condition': 'host_os == "mac" and checkout_fuchsia', - 'dep_type': 'cipd', + 'third_party/requests': { + 'url': Var('chromium_url') + '/external/github.com/kennethreitz/requests.git' + '@' + '2c2138e811487b13020eb331482fb991fd399d4e', + 'condition': 'checkout_android', }, + 'third_party/zlib': + Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + 'dfbc590f5855bc2765256a743cad0abc56330a30', 'tools/clang': - Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + 'a38f01b956e091d5e698d2af484c81cd4e9a2a2d', + Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '9d0a403e85d25b5b0d3016a342d4b83b12941fd5', + 'tools/clang/dsymutil': { + 'packages': [ + { + 'package': 'chromium/llvm-build-tools/dsymutil', + 'version': 'M56jPzDv1620Rnm__jTMYS62Zi8rxHVq7yw0qeBFEgkC', + } + ], + 'condition': 'checkout_mac', + 'dep_type': 'cipd', + }, 'tools/luci-go': { 'packages': [ { @@ -271,34 +314,8 @@ deps = { 'condition': 'host_cpu != "s390" and host_os != "aix"', 'dep_type': 'cipd', }, - 'tools/clang/dsymutil': { - 'packages': [ - { - 'package': 'chromium/llvm-build-tools/dsymutil', - 'version': 'M56jPzDv1620Rnm__jTMYS62Zi8rxHVq7yw0qeBFEgkC', - } - ], - 'condition': 'checkout_mac', - 'dep_type': 'cipd', - }, - 'third_party/perfetto': - Var('android_url') + '/platform/external/perfetto.git' + '@' + 'aa4385bc5997ecad4c633885e1b331b1115012fb', - 'third_party/protobuf': - Var('chromium_url') + '/external/github.com/google/protobuf'+ '@' + '6a59a2ad1f61d9696092f79b6d74368b4d7970a3', - 'third_party/zlib': - Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + '5b8d433953beb2a75a755ba321a3076b95f7cdb9', - 'third_party/jsoncpp/source': - Var('chromium_url') + '/external/github.com/open-source-parsers/jsoncpp.git'+ '@' + '9059f5cad030ba11d37818847443a53918c327b1', - 'third_party/ittapi': { - # Force checkout ittapi libraries to pass v8 header includes check on - # bots that has check_v8_header_includes enabled. - 'url': Var('chromium_url') + '/external/github.com/intel/ittapi' + '@' + 'b4ae0122ba749163096058b4f1bb065bf4a7de94', - 'condition': "checkout_ittapi or check_v8_header_includes", - }, - 'third_party/requests': { - 'url': Var('chromium_url') + '/external/github.com/kennethreitz/requests.git' + '@' + '2c2138e811487b13020eb331482fb991fd399d4e', - 'condition': 'checkout_android', - }, + 'tools/swarming_client': + Var('chromium_url') + '/infra/luci/client-py.git' + '@' + 'a32a1607f6093d338f756c7e7c7b4333b0c50c9c', } include_rules = [ @@ -340,6 +357,17 @@ hooks = [ 'tools/get_landmines.py', ], }, + { + 'name': 'bazel', + 'pattern': '.', + 'condition': 'download_prebuilt_bazel', + 'action': [ 'download_from_google_storage', + '--bucket', 'chromium-v8-prebuilt-bazel/linux', + '--no_resume', + '-s', 'tools/bazel/bazel.sha1', + '--platform=linux*', + ], + }, # Pull clang-format binaries using checked-in hashes. { 'name': 'clang_format_win', @@ -538,17 +566,6 @@ hooks = [ '--boot-images={checkout_fuchsia_boot_images}', ], }, - { - # Mac doesn't use lld so it's not included in the default clang bundle - # there. However, lld is need in Fuchsia cross builds, so - # download it there. - # Should run after the clang hook. - 'name': 'lld/mac', - 'pattern': '.', - 'condition': 'host_os == "mac" and checkout_fuchsia', - 'action': ['python', 'tools/clang/scripts/update.py', - '--package=lld_mac'], - }, { # Mac does not have llvm-objdump, download it for cross builds in Fuchsia. 'name': 'llvm-objdump', diff --git a/deps/v8/OWNERS b/deps/v8/OWNERS index 2ad1949b515935..6f0ac017208f5c 100644 --- a/deps/v8/OWNERS +++ b/deps/v8/OWNERS @@ -10,9 +10,13 @@ per-file .git-blame-ignore-revs=file:INFRA_OWNERS per-file .gitattributes=file:INFRA_OWNERS per-file .gitignore=file:INFRA_OWNERS per-file .gn=file:INFRA_OWNERS +per-file .mailmap=file:COMMON_OWNERS per-file .vpython=file:INFRA_OWNERS per-file .ycm_extra_conf.py=file:INFRA_OWNERS +per-file .bazelrc=file:COMMON_OWNERS +per-file BUILD.bazel=file:COMMON_OWNERS per-file BUILD.gn=file:COMMON_OWNERS +per-file WORKSPACE=file:COMMON_OWNERS per-file DEPS=file:INFRA_OWNERS # For Test262 rolls. per-file DEPS=mathias@chromium.org diff --git a/deps/v8/WATCHLISTS b/deps/v8/WATCHLISTS index c54f15ad797078..f691d88e921606 100644 --- a/deps/v8/WATCHLISTS +++ b/deps/v8/WATCHLISTS @@ -97,7 +97,13 @@ }, 'regexp': { 'filepath': 'src/.*regexp', - } + }, + 'bazel': { + 'filepath': 'BUILD.gn' \ + '|BUILD.bazel' \ + '|WORKSPACE' \ + '|bazel/' + }, }, 'WATCHLISTS': { @@ -156,5 +162,8 @@ 'jgruber+watch@chromium.org', 'pthier+watch@chromium.org' ], + 'bazel' : [ + 'victorgomes+watch@chromium.org' + ], }, } diff --git a/deps/v8/WORKSPACE b/deps/v8/WORKSPACE new file mode 100644 index 00000000000000..289902f68d857f --- /dev/null +++ b/deps/v8/WORKSPACE @@ -0,0 +1,29 @@ +# 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. + +workspace(name = "v8") + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +http_archive( + name = "bazel_skylib", + urls = [ + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", + ], + sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c", +) +load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") +bazel_skylib_workspace() + +new_local_repository( + name = "zlib", + path = "third_party/zlib", + build_file = "bazel/BUILD.zlib", +) + +new_local_repository( + name = "icu", + path = "third_party/icu", + build_file = "bazel/BUILD.icu", +) diff --git a/deps/v8/bazel/BUILD.icu b/deps/v8/bazel/BUILD.icu new file mode 100644 index 00000000000000..fd651d513ddf89 --- /dev/null +++ b/deps/v8/bazel/BUILD.icu @@ -0,0 +1,76 @@ +# 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. + +filegroup( + name = "icudata", + srcs = [ "common/icudtl.dat" ] +) + +cc_library( + name = "icuuc", + srcs = glob([ + "source/common/**/*.h", + "source/common/**/*.cpp" + ]), + defines = [ + "U_COMMON_IMPLEMENTATION", + "U_ICUDATAENTRY_IN_COMMON", + "HAVE_DLOPEN=0", + "UCONFIG_ONLY_HTML_CONVERSION=1", + "U_CHARSET_IS_UTF8=1", + "U_USING_ICU_NAMESPACE=0", + "U_ENABLE_DYLOAD=0", + "USE_CHROMIUM_ICU=1", + "U_ENABLE_TRACING=1", + "U_ENABLE_RESOURCE_TRACING=0", + "UNISTR_FROM_STRING_EXPLICIT=", + "UNISTR_FROM_CHAR_EXPLICIT=", + "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE", + ], + copts = [ + "-Wno-unused-function", + "-Wno-parentheses", + "-Wno-unused-function", + "-Wno-unused-variable", + "-Wno-deprecated-declarations", + ], + includes = [ + "source/common", + "source/i18n", + ], + tags = ["requires-rtti"], + data = [ ":icudata" ], + alwayslink = 1, +) + +cc_library( + name = "icui18n", + srcs = glob([ + "source/i18n/**/*.h", + "source/i18n/**/*.cpp" + ]), + defines = [ + "U_I18N_IMPLEMENTATION", + ], + deps = [ ":icuuc" ], + alwayslink = 1, +) + +cc_library( + name = "icu", + hdrs = glob([ + "source/common/unicode/*.h", + "source/i18n/unicode/*.h", + ]), + srcs = [ + "source/stubdata/stubdata.cpp", + ], + include_prefix = "third_party/icu", + deps = [ + ":icuuc", + ":icui18n" + ], + visibility = ["//visibility:public"], + alwayslink = 1, +) diff --git a/deps/v8/bazel/BUILD.zlib b/deps/v8/bazel/BUILD.zlib new file mode 100644 index 00000000000000..0c97b325a34c51 --- /dev/null +++ b/deps/v8/bazel/BUILD.zlib @@ -0,0 +1,52 @@ +# 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 = "zlib", + srcs = [ + "adler32.c", + "chromeconf.h", + "compress.c", + "contrib/optimizations/insert_string.h", + "cpu_features.c", + "cpu_features.h", + "crc32.c", + "crc32.h", + "deflate.c", + "deflate.h", + "gzclose.c", + "gzguts.h", + "gzlib.c", + "gzread.c", + "gzwrite.c", + "infback.c", + "inffast.c", + "inffast.h", + "inffixed.h", + "inflate.c", + "inflate.h", + "inftrees.c", + "inftrees.h", + "trees.c", + "trees.h", + "uncompr.c", + "zconf.h", + "zlib.h", + "zutil.c", + "zutil.h", + "google/compression_utils_portable.h", + "google/compression_utils_portable.cc", + ], + hdrs = [ + "zlib.h", + "google/compression_utils_portable.h", + ], + include_prefix = "third_party/zlib", + defines = [ + "CHROMIUM_ZLIB_NO_CHROMECONF", + "HAVE_HIDDEN", + "CPU_NO_SIMD", + ], + visibility = ["//visibility:public"], +) diff --git a/deps/v8/bazel/OWNERS b/deps/v8/bazel/OWNERS new file mode 100644 index 00000000000000..8636f621c416b4 --- /dev/null +++ b/deps/v8/bazel/OWNERS @@ -0,0 +1,5 @@ +# Google3 V8 owners +ahaas@chromium.org +cbruni@chromium.org +delphick@chromium.org +victorgomes@chromium.org diff --git a/deps/v8/bazel/defs.bzl b/deps/v8/bazel/defs.bzl new file mode 100644 index 00000000000000..fbd1830ecb1e35 --- /dev/null +++ b/deps/v8/bazel/defs.bzl @@ -0,0 +1,239 @@ +# 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. + +FlagInfo = provider(fields = ["value"]) + +def _options_impl(ctx): + return FlagInfo(value = ctx.build_setting_value) + +_create_option_flag = rule( + implementation = _options_impl, + build_setting = config.bool(flag = True), +) + +_create_option_string = rule( + implementation = _options_impl, + build_setting = config.string(flag = True), +) + +_create_option_int = rule( + implementation = _options_impl, + build_setting = config.int(flag = True), +) + +def v8_raw_flag(name, default = False): + _create_option_flag(name = name, build_setting_default = default) + native.config_setting(name = "raw_" + name, flag_values = {name: "True"}) + +def v8_flag(name, default = False): + _create_option_flag(name = name, build_setting_default = default) + native.config_setting(name = "is_" + name, flag_values = {name: "True"}) + native.config_setting(name = "is_not_" + name, flag_values = {name: "False"}) + +def v8_string(name, default = ""): + _create_option_string(name = name, build_setting_default = default) + +def v8_int(name, default = 0): + _create_option_int(name = name, build_setting_default = default) + +def _custom_config_impl(ctx): + defs = [] + defs.append("V8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=" + + str(ctx.attr._v8_typed_array_max_size_in_heap[FlagInfo].value)) + context = cc_common.create_compilation_context(defines = depset(defs)) + return [CcInfo(compilation_context = context)] + +v8_custom_config = rule( + implementation = _custom_config_impl, + attrs = { + "_v8_typed_array_max_size_in_heap": + attr.label(default = ":v8_typed_array_max_size_in_heap"), + } +) + +def _config_impl(ctx): + hdrs = [] + # Add headers + for h in ctx.attr.hdrs: + hdrs += h[DefaultInfo].files.to_list() + defs = [] + # Add conditional_defines + for f, d in ctx.attr.conditional_defines.items(): + if f[FlagInfo].value: + defs.append(d) + # Add defines + for d in ctx.attr.defines: + defs.append(d) + context = cc_common.create_compilation_context( + defines = depset( + defs, + transitive = [dep[CcInfo].compilation_context.defines for dep in ctx.attr.deps], + ), + headers = depset( + hdrs, + transitive = [dep[CcInfo].compilation_context.headers for dep in ctx.attr.deps], + ), + ) + return [CcInfo(compilation_context = context)] + +v8_config = rule( + implementation = _config_impl, + attrs = { + "conditional_defines": attr.label_keyed_string_dict(), + "defines": attr.string_list(), + "deps": attr.label_list(), + "hdrs": attr.label_list(allow_files = True), + }, +) + +def _default_args(configs): + return struct( + deps = configs + [":define_flags"], + copts = [ + "-fPIC", + "-Werror", + "-Wextra", + "-Wno-builtin-assume-aligned-alignment", + "-Wno-unused-parameter", + "-Wno-implicit-int-float-conversion", + "-Wno-deprecated-copy", + "-Wno-non-virtual-dtor", + "-std=c++17", + "-isystem .", + ], + includes = ["include"], + linkopts = [ + "-pthread" + ] + select({ + ":is_macos": [], + "//conditions:default": [ "-Wl,--no-as-needed -ldl" ], + }) + select({ + ":should_add_rdynamic": [ "-rdynamic" ], + "//conditions:default": [], + }), + ) + +def v8_binary( + name, + srcs, + configs = [], + deps = [], + includes = [], + copts = [], + linkopts = [], + **kwargs): + default = _default_args(configs) + native.cc_binary( + name = name, + srcs = srcs, + deps = deps + default.deps, + includes = includes + default.includes, + copts = copts + default.copts, + linkopts = linkopts + default.linkopts, + **kwargs + ) + +def v8_library( + name, + srcs, + configs = [], + deps = [], + includes = [], + copts = [], + linkopts = [], + **kwargs): + default = _default_args(configs) + native.cc_library( + name = name, + srcs = srcs, + deps = deps + default.deps, + includes = includes + default.includes, + copts = copts + default.copts, + linkopts = linkopts + default.linkopts, + alwayslink = 1, + **kwargs + ) + +def _torque_impl(ctx): + v8root = ctx.attr.v8root[FlagInfo].value + # Arguments + args = [] + args += ctx.attr.args + args.append("-o") + args.append(ctx.bin_dir.path + "/torque-generated") + args.append("-strip-v8-root") + args.append("-v8-root") + args.append(v8root) + # Sources + args += [f.path for f in ctx.files.srcs] + # Generate/declare output files + outs = [] + for src in ctx.files.srcs: + root, period, ext = src.path.rpartition(".") + # Strip v8root + if root[:len(v8root)] == v8root: + root = root[len(v8root):] + file = "torque-generated/" + root + outs.append(ctx.actions.declare_file(file + "-tq-csa.cc")) + outs.append(ctx.actions.declare_file(file + "-tq-csa.h")) + outs.append(ctx.actions.declare_file(file + "-tq-inl.inc")) + outs.append(ctx.actions.declare_file(file + "-tq.inc")) + outs.append(ctx.actions.declare_file(file + "-tq.cc")) + outs += [ctx.actions.declare_file("torque-generated/" + f) for f in ctx.attr.extras] + ctx.actions.run( + outputs = outs, + inputs = ctx.files.srcs, + arguments = args, + executable = ctx.executable.tool, + progress_message = "Generating Torque files", + ) + return [DefaultInfo(files = depset(outs))] + +v8_torque = rule( + implementation = _torque_impl, + attrs = { + "srcs": attr.label_list(allow_files = True, mandatory = True), + "extras": attr.string_list(), + "tool": attr.label( + default = ":torque", + allow_files = True, + executable = True, + cfg = "host", + ), + "args": attr.string_list(), + "v8root": attr.label(default = ":v8_root"), + }, +) + +def _mksnapshot(ctx): + outs = [ + ctx.actions.declare_file("snapshot.cc"), + ctx.actions.declare_file("embedded.S"), + ] + ctx.actions.run( + outputs = outs, + inputs = [], + arguments = [ + "--embedded_variant=Default", + "--startup_src", outs[0].path, + "--embedded_src", outs[1].path, + ] + ctx.attr.args, + executable = ctx.executable.tool, + progress_message = "Running mksnapshot" + ) + return [DefaultInfo(files = depset(outs))] + + +v8_mksnapshot = rule( + implementation = _mksnapshot, + attrs = { + "args": attr.string_list(), + "tool": attr.label( + default = ":mksnapshot", + allow_files = True, + executable = True, + cfg = "host", + ), + } +) diff --git a/deps/v8/bazel/generate-inspector-files.sh b/deps/v8/bazel/generate-inspector-files.sh new file mode 100755 index 00000000000000..7fd4ab2a564a4e --- /dev/null +++ b/deps/v8/bazel/generate-inspector-files.sh @@ -0,0 +1,19 @@ +# 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. + +BAZEL_OUT=$1 + +# Create a default GN output folder +gn gen out/inspector + +# Generate inspector files +autoninja -C out/inspector src/inspector:inspector + +# Create directories in bazel output folder +mkdir -p $BAZEL_OUT/include/inspector +mkdir -p $BAZEL_OUT/src/inspector/protocol + +# Copy generated files to bazel output folder +cp out/inspector/gen/include/inspector/* $BAZEL_OUT/include/inspector/ +cp out/inspector/gen/src/inspector/protocol/* $BAZEL_OUT/src/inspector/protocol/ diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index 8741e86c087069..a3346517978b32 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -87,6 +87,10 @@ declare_args() { v8_enable_google_benchmark = false cppgc_is_standalone = false + + # Enable advanced BigInt algorithms, costing about 10-30 KB binary size + # depending on platform. Disabled on Android to save binary size. + v8_advanced_bigint_algorithms = !is_android } if (v8_use_external_startup_data == "") { diff --git a/deps/v8/include/OWNERS b/deps/v8/include/OWNERS index 7d538da1aa6642..d85849d52a1219 100644 --- a/deps/v8/include/OWNERS +++ b/deps/v8/include/OWNERS @@ -2,7 +2,6 @@ adamk@chromium.org cbruni@chromium.org leszeks@chromium.org mlippautz@chromium.org -ulan@chromium.org verwaest@chromium.org yangguo@chromium.org diff --git a/deps/v8/include/cppgc/allocation.h b/deps/v8/include/cppgc/allocation.h index 7a803cf2cc43b3..b06d9d70206409 100644 --- a/deps/v8/include/cppgc/allocation.h +++ b/deps/v8/include/cppgc/allocation.h @@ -5,25 +5,20 @@ #ifndef INCLUDE_CPPGC_ALLOCATION_H_ #define INCLUDE_CPPGC_ALLOCATION_H_ -#include - #include +#include +#include +#include #include #include "cppgc/custom-space.h" -#include "cppgc/garbage-collected.h" #include "cppgc/internal/api-constants.h" #include "cppgc/internal/gc-info.h" +#include "cppgc/type-traits.h" +#include "v8config.h" // NOLINT(build/include_directory) namespace cppgc { -template -class MakeGarbageCollectedTraitBase; - -namespace internal { -class ObjectAllocator; -} // namespace internal - /** * AllocationHandle is used to allocate garbage-collected objects. */ diff --git a/deps/v8/include/cppgc/heap-statistics.h b/deps/v8/include/cppgc/heap-statistics.h index 2fe6e1ae58abbb..8e626596e5b07b 100644 --- a/deps/v8/include/cppgc/heap-statistics.h +++ b/deps/v8/include/cppgc/heap-statistics.h @@ -5,7 +5,8 @@ #ifndef INCLUDE_CPPGC_HEAP_STATISTICS_H_ #define INCLUDE_CPPGC_HEAP_STATISTICS_H_ -#include +#include +#include #include #include @@ -30,19 +31,17 @@ struct HeapStatistics final { }; /** - * Statistics of object types. For each type the statistics record its name, - * how many objects of that type were allocated, and the overall size used by - * these objects. + * Object statistics for a single type. */ - struct ObjectStatistics { - /** Number of distinct types in the heap. */ - size_t num_types = 0; - /** Name of each type in the heap. */ - std::vector type_name; - /** Number of allocated objects per each type. */ - std::vector type_count; - /** Overall size of allocated objects per each type. */ - std::vector type_bytes; + struct ObjectStatsEntry { + /** + * Number of allocated bytes. + */ + size_t allocated_bytes; + /** + * Number of allocated objects. + */ + size_t object_count; }; /** @@ -50,10 +49,15 @@ struct HeapStatistics final { * allocated memory size and overall used memory size for the page. */ struct PageStatistics { - /** Overall amount of memory allocated for the page. */ - size_t physical_size_bytes = 0; + /** Overall committed amount of memory for the page. */ + size_t committed_size_bytes = 0; + /** Resident amount of memory held by the page. */ + size_t resident_size_bytes = 0; /** Amount of memory actually used on the page. */ size_t used_size_bytes = 0; + /** Statistics for object allocated on the page. Filled only when + * NameProvider::HideInternalNames() is false. */ + std::vector object_statistics; }; /** @@ -80,29 +84,35 @@ struct HeapStatistics final { struct SpaceStatistics { /** The space name */ std::string name; - /** Overall amount of memory allocated for the space. */ - size_t physical_size_bytes = 0; + /** Overall committed amount of memory for the heap. */ + size_t committed_size_bytes = 0; + /** Resident amount of memory held by the heap. */ + size_t resident_size_bytes = 0; /** Amount of memory actually used on the space. */ size_t used_size_bytes = 0; /** Statistics for each of the pages in the space. */ std::vector page_stats; /** Statistics for the freelist of the space. */ FreeListStatistics free_list_stats; - /** Statistics for object allocated on the space. Filled only when - * NameProvider::HideInternalNames() is false. */ - ObjectStatistics object_stats; }; - /** Overall amount of memory allocated for the heap. */ - size_t physical_size_bytes = 0; + /** Overall committed amount of memory for the heap. */ + size_t committed_size_bytes = 0; + /** Resident amount of memory help by the heap. */ + size_t resident_size_bytes = 0; /** Amount of memory actually used on the heap. */ size_t used_size_bytes = 0; /** Detail level of this HeapStatistics. */ DetailLevel detail_level; /** Statistics for each of the spaces in the heap. Filled only when - * detail_level is kDetailed. */ + * `detail_level` is `DetailLevel::kDetailed`. */ std::vector space_stats; + + /** + * Vector of `cppgc::GarbageCollected` type names. + */ + std::vector type_names; }; } // namespace cppgc diff --git a/deps/v8/include/cppgc/heap.h b/deps/v8/include/cppgc/heap.h index fd0512f1f18e16..136c4fb44d08ab 100644 --- a/deps/v8/include/cppgc/heap.h +++ b/deps/v8/include/cppgc/heap.h @@ -5,6 +5,8 @@ #ifndef INCLUDE_CPPGC_HEAP_H_ #define INCLUDE_CPPGC_HEAP_H_ +#include +#include #include #include diff --git a/deps/v8/include/cppgc/internal/api-constants.h b/deps/v8/include/cppgc/internal/api-constants.h index a70f00710c8b8a..7253a47089352c 100644 --- a/deps/v8/include/cppgc/internal/api-constants.h +++ b/deps/v8/include/cppgc/internal/api-constants.h @@ -5,8 +5,8 @@ #ifndef INCLUDE_CPPGC_INTERNAL_API_CONSTANTS_H_ #define INCLUDE_CPPGC_INTERNAL_API_CONSTANTS_H_ -#include -#include +#include +#include #include "v8config.h" // NOLINT(build/include_directory) diff --git a/deps/v8/include/cppgc/internal/gc-info.h b/deps/v8/include/cppgc/internal/gc-info.h index b9074b1ad5d1b9..0830b194909fb8 100644 --- a/deps/v8/include/cppgc/internal/gc-info.h +++ b/deps/v8/include/cppgc/internal/gc-info.h @@ -7,6 +7,7 @@ #include #include +#include #include "cppgc/internal/finalizer-trait.h" #include "cppgc/internal/name-trait.h" diff --git a/deps/v8/include/cppgc/internal/name-trait.h b/deps/v8/include/cppgc/internal/name-trait.h index ae99d41c0d76f9..2e2da1eab4a225 100644 --- a/deps/v8/include/cppgc/internal/name-trait.h +++ b/deps/v8/include/cppgc/internal/name-trait.h @@ -73,7 +73,7 @@ class NameTrait final : public NameTraitBase { private: static HeapObjectName GetNameFor(const NameProvider* name_provider) { - return {name_provider->GetName(), false}; + return {name_provider->GetHumanReadableName(), false}; } static HeapObjectName GetNameFor(...) { @@ -91,7 +91,7 @@ class NameTrait final : public NameTraitBase { static const HeapObjectName leaky_name = GetNameFromTypeSignature(PRETTY_FUNCTION_VALUE); - return leaky_name; + return {leaky_name, false}; #undef PRETTY_FUNCTION_VALUE diff --git a/deps/v8/include/cppgc/internal/pointer-policies.h b/deps/v8/include/cppgc/internal/pointer-policies.h index e09b86199f46b3..cdf0bb693d6996 100644 --- a/deps/v8/include/cppgc/internal/pointer-policies.h +++ b/deps/v8/include/cppgc/internal/pointer-policies.h @@ -82,7 +82,7 @@ class V8_EXPORT EnabledCheckingPolicy { class DisabledCheckingPolicy { protected: - void CheckPointer(const void* raw) {} + void CheckPointer(const void*) {} }; #if V8_ENABLE_CHECKS @@ -92,6 +92,10 @@ using DefaultPersistentCheckingPolicy = EnabledCheckingPolicy; using DefaultMemberCheckingPolicy = DisabledCheckingPolicy; using DefaultPersistentCheckingPolicy = DisabledCheckingPolicy; #endif +// For CT(W)P neither marking information (for value), nor objectstart bitmap +// (for slot) are guaranteed to be present because there's no synchonization +// between heaps after marking. +using DefaultCrossThreadPersistentCheckingPolicy = DisabledCheckingPolicy; class KeepLocationPolicy { public: @@ -154,7 +158,7 @@ struct WeakCrossThreadPersistentPolicy { // Forward declarations setting up the default policies. template + typename CheckingPolicy = DefaultCrossThreadPersistentCheckingPolicy> class BasicCrossThreadPersistent; template +#include + #include "cppgc/heap-state.h" #include "cppgc/internal/api-constants.h" #include "cppgc/internal/atomic-entry-flag.h" @@ -22,8 +25,11 @@ class HeapHandle; namespace internal { +#if defined(CPPGC_CAGED_HEAP) class WriteBarrierTypeForCagedHeapPolicy; +#else // !CPPGC_CAGED_HEAP class WriteBarrierTypeForNonCagedHeapPolicy; +#endif // !CPPGC_CAGED_HEAP class V8_EXPORT WriteBarrier final { public: diff --git a/deps/v8/include/cppgc/macros.h b/deps/v8/include/cppgc/macros.h index 70ab44c65759f1..030f397e3df15c 100644 --- a/deps/v8/include/cppgc/macros.h +++ b/deps/v8/include/cppgc/macros.h @@ -5,7 +5,7 @@ #ifndef INCLUDE_CPPGC_MACROS_H_ #define INCLUDE_CPPGC_MACROS_H_ -#include +#include #include "cppgc/internal/compiler-specific.h" diff --git a/deps/v8/include/cppgc/member.h b/deps/v8/include/cppgc/member.h index 16aed060226ea3..d0bf414c69d7f5 100644 --- a/deps/v8/include/cppgc/member.h +++ b/deps/v8/include/cppgc/member.h @@ -226,20 +226,20 @@ class BasicMember final : private MemberBase, private CheckingPolicy { template -bool operator==( - BasicMember member1, - BasicMember - member2) { +bool operator==(const BasicMember& member1, + const BasicMember& member2) { return member1.Get() == member2.Get(); } template -bool operator!=( - BasicMember member1, - BasicMember - member2) { +bool operator!=(const BasicMember& member1, + const BasicMember& member2) { return !(member1 == member2); } diff --git a/deps/v8/include/cppgc/name-provider.h b/deps/v8/include/cppgc/name-provider.h index 8b70b8ea5ee89a..224dd4b5d678ec 100644 --- a/deps/v8/include/cppgc/name-provider.h +++ b/deps/v8/include/cppgc/name-provider.h @@ -57,7 +57,7 @@ class V8_EXPORT NameProvider { * * @returns a human readable name for the object. */ - virtual const char* GetName() const = 0; + virtual const char* GetHumanReadableName() const = 0; }; } // namespace cppgc diff --git a/deps/v8/include/cppgc/persistent.h b/deps/v8/include/cppgc/persistent.h index 22cda7c6e8fcb7..03b5e5b06b5e28 100644 --- a/deps/v8/include/cppgc/persistent.h +++ b/deps/v8/include/cppgc/persistent.h @@ -141,7 +141,7 @@ class BasicPersistent final : public PersistentBase, } // Move assignment. - BasicPersistent& operator=(BasicPersistent&& other) { + BasicPersistent& operator=(BasicPersistent&& other) noexcept { if (this == &other) return *this; Clear(); PersistentBase::operator=(std::move(other)); diff --git a/deps/v8/include/cppgc/platform.h b/deps/v8/include/cppgc/platform.h index 0d7377668cf258..2d933d620dc011 100644 --- a/deps/v8/include/cppgc/platform.h +++ b/deps/v8/include/cppgc/platform.h @@ -5,6 +5,8 @@ #ifndef INCLUDE_CPPGC_PLATFORM_H_ #define INCLUDE_CPPGC_PLATFORM_H_ +#include + #include "v8-platform.h" // NOLINT(build/include_directory) #include "v8config.h" // NOLINT(build/include_directory) diff --git a/deps/v8/include/cppgc/source-location.h b/deps/v8/include/cppgc/source-location.h index 29d69b0a1372e6..da5a5ede520138 100644 --- a/deps/v8/include/cppgc/source-location.h +++ b/deps/v8/include/cppgc/source-location.h @@ -5,6 +5,7 @@ #ifndef INCLUDE_CPPGC_SOURCE_LOCATION_H_ #define INCLUDE_CPPGC_SOURCE_LOCATION_H_ +#include #include #include "v8config.h" // NOLINT(build/include_directory) diff --git a/deps/v8/include/js_protocol.pdl b/deps/v8/include/js_protocol.pdl index 9c0483ae7059c2..63baa3da13b843 100644 --- a/deps/v8/include/js_protocol.pdl +++ b/deps/v8/include/js_protocol.pdl @@ -175,7 +175,7 @@ domain Debugger command enable parameters # The maximum size in bytes of collected scripts (not referenced by other heap objects) - # the debugger can hold. Puts no limit if paramter is omitted. + # the debugger can hold. Puts no limit if parameter is omitted. experimental optional number maxScriptsCacheSize returns # Unique identifier of the debugger. @@ -714,7 +714,7 @@ experimental domain HeapProfiler parameters # If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. optional boolean reportProgress - # If true, a raw snapshot without artifical roots will be generated + # If true, a raw snapshot without artificial roots will be generated optional boolean treatGlobalObjectsAsRoots # If true, numerical values are included in the snapshot optional boolean captureNumericValue @@ -972,13 +972,13 @@ domain Profiler # Reports coverage delta since the last poll (either from an event like this, or from # `takePreciseCoverage` for the current isolate. May only be sent if precise code # coverage has been started. This event can be trigged by the embedder to, for example, - # trigger collection of coverage data immediatelly at a certain point in time. + # trigger collection of coverage data immediately at a certain point in time. experimental event preciseCoverageDeltaUpdate parameters # Monotonically increasing time (in seconds) when the coverage update was taken in the backend. number timestamp # Identifier for distinguishing coverage events. - string occassion + string occasion # Coverage data for the current isolate. array of ScriptCoverage result @@ -1225,7 +1225,7 @@ domain Runtime string origin # Human readable name describing given context. string name - # A system-unique execution context identifier. Unlike the id, this is unique accross + # A system-unique execution context identifier. Unlike the id, this is unique across # multiple processes, so can be reliably used to identify specific context while backend # performs a cross-process navigation. experimental string uniqueId @@ -1254,6 +1254,10 @@ domain Runtime optional RemoteObject exception # Identifier of the context where exception happened. optional ExecutionContextId executionContextId + # Dictionary with entries of meta data that the client associated + # with this exception, such as information about associated network + # requests, etc. + experimental optional object exceptionMetaData # Number of milliseconds since epoch. type Timestamp extends number @@ -1343,6 +1347,8 @@ domain Runtime # Symbolic group name that can be used to release multiple objects. If objectGroup is not # specified and objectId is, objectGroup will be inherited from object. optional string objectGroup + # Whether to throw an exception if side effect cannot be ruled out during evaluation. + experimental optional boolean throwOnSideEffect returns # Call result. RemoteObject result @@ -1422,9 +1428,9 @@ domain Runtime # evaluation and allows unsafe-eval. Defaults to true. experimental optional boolean allowUnsafeEvalBlockedByCSP # An alternative way to specify the execution context to evaluate in. - # Compared to contextId that may be reused accross processes, this is guaranteed to be + # Compared to contextId that may be reused across processes, this is guaranteed to be # system-unique, so it can be used to prevent accidental evaluation of the expression - # in context different than intended (e.g. as a result of navigation accross process + # in context different than intended (e.g. as a result of navigation across process # boundaries). # This is mutually exclusive with `contextId`. experimental optional string uniqueContextId diff --git a/deps/v8/include/v8-fast-api-calls.h b/deps/v8/include/v8-fast-api-calls.h index cda1959c866548..7568ac9f3029b7 100644 --- a/deps/v8/include/v8-fast-api-calls.h +++ b/deps/v8/include/v8-fast-api-calls.h @@ -156,6 +156,7 @@ * - float64_t * Currently supported argument types: * - pointer to an embedder type + * - JavaScript array of primitive types * - bool * - int32_t * - uint32_t @@ -176,8 +177,43 @@ * passes NaN values as-is, i.e. doesn't normalize them. * * To be supported types: - * - arrays of C types + * - TypedArrays and ArrayBuffers * - arrays of embedder types + * + * + * The API offers a limited support for function overloads: + * + * \code + * void FastMethod_2Args(int param, bool another_param); + * void FastMethod_3Args(int param, bool another_param, int third_param); + * + * v8::CFunction fast_method_2args_c_func = + * MakeV8CFunction(FastMethod_2Args); + * v8::CFunction fast_method_3args_c_func = + * MakeV8CFunction(FastMethod_3Args); + * const v8::CFunction fast_method_overloads[] = {fast_method_2args_c_func, + * fast_method_3args_c_func}; + * Local method_template = + * v8::FunctionTemplate::NewWithCFunctionOverloads( + * isolate, SlowCallback, data, signature, length, + * constructor_behavior, side_effect_type, + * {fast_method_overloads, 2}); + * \endcode + * + * In this example a single FunctionTemplate is associated to multiple C++ + * functions. The overload resolution is currently only based on the number of + * arguments passed in a call. For example, if this method_template is + * registered with a wrapper JS object as described above, a call with two + * arguments: + * obj.method(42, true); + * will result in a fast call to FastMethod_2Args, while a call with three or + * more arguments: + * obj.method(42, true, 11); + * will result in a fast call to FastMethod_3Args. Instead a call with less than + * two arguments, like: + * obj.method(42); + * would not result in a fast call but would fall back to executing the + * associated SlowCallback. */ #ifndef INCLUDE_V8_FAST_API_CALLS_H_ @@ -217,22 +253,73 @@ class CTypeInfo { // than any valid Type enum. static constexpr Type kCallbackOptionsType = Type(255); + enum class SequenceType : uint8_t { + kScalar, + kIsSequence, // sequence + kIsTypedArray, // TypedArray of T or any ArrayBufferView if T + // is void + kIsArrayBuffer // ArrayBuffer + }; + enum class Flags : uint8_t { kNone = 0, + kAllowSharedBit = 1 << 0, // Must be an ArrayBuffer or TypedArray + kEnforceRangeBit = 1 << 1, // T must be integral + kClampBit = 1 << 2, // T must be integral + kIsRestrictedBit = 1 << 3, // T must be float or double }; - explicit constexpr CTypeInfo(Type type, Flags flags = Flags::kNone) - : type_(type), flags_(flags) {} + explicit constexpr CTypeInfo( + Type type, SequenceType sequence_type = SequenceType::kScalar, + Flags flags = Flags::kNone) + : type_(type), sequence_type_(sequence_type), flags_(flags) {} constexpr Type GetType() const { return type_; } - + constexpr SequenceType GetSequenceType() const { return sequence_type_; } constexpr Flags GetFlags() const { return flags_; } + static constexpr bool IsIntegralType(Type type) { + return type == Type::kInt32 || type == Type::kUint32 || + type == Type::kInt64 || type == Type::kUint64; + } + + static constexpr bool IsFloatingPointType(Type type) { + return type == Type::kFloat32 || type == Type::kFloat64; + } + + static constexpr bool IsPrimitive(Type type) { + return IsIntegralType(type) || IsFloatingPointType(type) || + type == Type::kBool; + } + private: Type type_; + SequenceType sequence_type_; Flags flags_; }; +template +struct FastApiTypedArray { + T* data; // should include the typed array offset applied + size_t length; // length in number of elements +}; + +// Any TypedArray. It uses kTypedArrayBit with base type void +// Overloaded args of ArrayBufferView and TypedArray are not supported +// (for now) because the generic “any” ArrayBufferView doesn’t have its +// own instance type. It could be supported if we specify that +// TypedArray always has precedence over the generic ArrayBufferView, +// but this complicates overload resolution. +struct FastApiArrayBufferView { + void* data; + size_t byte_length; +}; + +struct FastApiArrayBuffer { + void* data; + size_t byte_length; +}; + class V8_EXPORT CFunctionInfo { public: // Construct a struct to hold a CFunction's type information. @@ -284,6 +371,42 @@ class V8_EXPORT CFunction { const void* GetAddress() const { return address_; } const CFunctionInfo* GetTypeInfo() const { return type_info_; } + enum class OverloadResolution { kImpossible, kAtRuntime, kAtCompileTime }; + + // Returns whether an overload between this and the given CFunction can + // be resolved at runtime by the RTTI available for the arguments or at + // compile time for functions with different number of arguments. + OverloadResolution GetOverloadResolution(const CFunction* other) { + // Runtime overload resolution can only deal with functions with the + // same number of arguments. Functions with different arity are handled + // by compile time overload resolution though. + if (ArgumentCount() != other->ArgumentCount()) { + return OverloadResolution::kAtCompileTime; + } + + // The functions can only differ by a single argument position. + int diff_index = -1; + for (unsigned int i = 0; i < ArgumentCount(); ++i) { + if (ArgumentInfo(i).GetSequenceType() != + other->ArgumentInfo(i).GetSequenceType()) { + if (diff_index >= 0) { + return OverloadResolution::kImpossible; + } + diff_index = i; + + // We only support overload resolution between sequence types. + if (ArgumentInfo(i).GetSequenceType() == + CTypeInfo::SequenceType::kScalar || + other->ArgumentInfo(i).GetSequenceType() == + CTypeInfo::SequenceType::kScalar) { + return OverloadResolution::kImpossible; + } + } + } + + return OverloadResolution::kAtRuntime; + } + template static CFunction Make(F* func) { return ArgUnwrap::Make(func); @@ -314,7 +437,7 @@ class V8_EXPORT CFunction { }; }; -struct ApiObject { +struct V8_DEPRECATE_SOON("Use v8::Local instead.") ApiObject { uintptr_t address; }; @@ -412,28 +535,91 @@ struct TypeInfoHelper { } \ \ static constexpr CTypeInfo::Type Type() { return CTypeInfo::Type::Enum; } \ + static constexpr CTypeInfo::SequenceType SequenceType() { \ + return CTypeInfo::SequenceType::kScalar; \ + } \ }; -#define BASIC_C_TYPES(V) \ - V(void, kVoid) \ - V(bool, kBool) \ - V(int32_t, kInt32) \ - V(uint32_t, kUint32) \ - V(int64_t, kInt64) \ - V(uint64_t, kUint64) \ - V(float, kFloat32) \ - V(double, kFloat64) \ - V(ApiObject, kApiObject) \ - V(v8::Local, kV8Value) \ - V(v8::Local, kV8Value) +template +struct CTypeInfoTraits {}; + +#define DEFINE_TYPE_INFO_TRAITS(CType, Enum) \ + template <> \ + struct CTypeInfoTraits { \ + using ctype = CType; \ + }; + +#define PRIMITIVE_C_TYPES(V) \ + V(bool, kBool) \ + V(int32_t, kInt32) \ + V(uint32_t, kUint32) \ + V(int64_t, kInt64) \ + V(uint64_t, kUint64) \ + V(float, kFloat32) \ + V(double, kFloat64) + +// Same as above, but includes deprecated types for compatibility. +#define ALL_C_TYPES(V) \ + PRIMITIVE_C_TYPES(V) \ + V(void, kVoid) \ + V(v8::Local, kV8Value) \ + V(v8::Local, kV8Value) \ + V(ApiObject, kApiObject) // ApiObject was a temporary solution to wrap the pointer to the v8::Value. // Please use v8::Local in new code for the arguments and // v8::Local for the receiver, as ApiObject will be deprecated. -BASIC_C_TYPES(SPECIALIZE_GET_TYPE_INFO_HELPER_FOR) +ALL_C_TYPES(SPECIALIZE_GET_TYPE_INFO_HELPER_FOR) +PRIMITIVE_C_TYPES(DEFINE_TYPE_INFO_TRAITS) -#undef BASIC_C_TYPES +#undef PRIMITIVE_C_TYPES +#undef ALL_C_TYPES + +#define SPECIALIZE_GET_TYPE_INFO_HELPER_FOR_TA(T, Enum) \ + template <> \ + struct TypeInfoHelper> { \ + static constexpr CTypeInfo::Flags Flags() { \ + return CTypeInfo::Flags::kNone; \ + } \ + \ + static constexpr CTypeInfo::Type Type() { return CTypeInfo::Type::Enum; } \ + static constexpr CTypeInfo::SequenceType SequenceType() { \ + return CTypeInfo::SequenceType::kIsTypedArray; \ + } \ + }; + +#define TYPED_ARRAY_C_TYPES(V) \ + V(int32_t, kInt32) \ + V(uint32_t, kUint32) \ + V(int64_t, kInt64) \ + V(uint64_t, kUint64) \ + V(float, kFloat32) \ + V(double, kFloat64) + +TYPED_ARRAY_C_TYPES(SPECIALIZE_GET_TYPE_INFO_HELPER_FOR_TA) + +#undef TYPED_ARRAY_C_TYPES + +template <> +struct TypeInfoHelper> { + static constexpr CTypeInfo::Flags Flags() { return CTypeInfo::Flags::kNone; } + + static constexpr CTypeInfo::Type Type() { return CTypeInfo::Type::kVoid; } + static constexpr CTypeInfo::SequenceType SequenceType() { + return CTypeInfo::SequenceType::kIsSequence; + } +}; + +template <> +struct TypeInfoHelper> { + static constexpr CTypeInfo::Flags Flags() { return CTypeInfo::Flags::kNone; } + + static constexpr CTypeInfo::Type Type() { return CTypeInfo::Type::kUint32; } + static constexpr CTypeInfo::SequenceType SequenceType() { + return CTypeInfo::SequenceType::kIsTypedArray; + } +}; template <> struct TypeInfoHelper { @@ -442,26 +628,63 @@ struct TypeInfoHelper { static constexpr CTypeInfo::Type Type() { return CTypeInfo::kCallbackOptionsType; } + static constexpr CTypeInfo::SequenceType SequenceType() { + return CTypeInfo::SequenceType::kScalar; + } }; +#define STATIC_ASSERT_IMPLIES(COND, ASSERTION, MSG) \ + static_assert(((COND) == 0) || (ASSERTION), MSG) + template class CTypeInfoBuilder { public: using BaseType = T; static constexpr CTypeInfo Build() { - // Get the flags and merge in any additional flags. - uint8_t flags = uint8_t(TypeInfoHelper::Flags()); - int unused[] = {0, (flags |= uint8_t(Flags), 0)...}; - // With C++17, we could use a "..." fold expression over a parameter pack. - // Since we're still using C++14, we have to evaluate an OR expresion while - // constructing an unused list of 0's. This applies the binary operator - // for each value in Flags. - (void)unused; + constexpr CTypeInfo::Flags kFlags = + MergeFlags(TypeInfoHelper::Flags(), Flags...); + constexpr CTypeInfo::Type kType = TypeInfoHelper::Type(); + constexpr CTypeInfo::SequenceType kSequenceType = + TypeInfoHelper::SequenceType(); + + STATIC_ASSERT_IMPLIES( + uint8_t(kFlags) & uint8_t(CTypeInfo::Flags::kAllowSharedBit), + (kSequenceType == CTypeInfo::SequenceType::kIsTypedArray || + kSequenceType == CTypeInfo::SequenceType::kIsArrayBuffer), + "kAllowSharedBit is only allowed for TypedArrays and ArrayBuffers."); + STATIC_ASSERT_IMPLIES( + uint8_t(kFlags) & uint8_t(CTypeInfo::Flags::kEnforceRangeBit), + CTypeInfo::IsIntegralType(kType), + "kEnforceRangeBit is only allowed for integral types."); + STATIC_ASSERT_IMPLIES( + uint8_t(kFlags) & uint8_t(CTypeInfo::Flags::kClampBit), + CTypeInfo::IsIntegralType(kType), + "kClampBit is only allowed for integral types."); + STATIC_ASSERT_IMPLIES( + uint8_t(kFlags) & uint8_t(CTypeInfo::Flags::kIsRestrictedBit), + CTypeInfo::IsFloatingPointType(kType), + "kIsRestrictedBit is only allowed for floating point types."); + STATIC_ASSERT_IMPLIES(kSequenceType == CTypeInfo::SequenceType::kIsSequence, + kType == CTypeInfo::Type::kVoid, + "Sequences are only supported from void type."); + STATIC_ASSERT_IMPLIES( + kSequenceType == CTypeInfo::SequenceType::kIsTypedArray, + CTypeInfo::IsPrimitive(kType) || kType == CTypeInfo::Type::kVoid, + "TypedArrays are only supported from primitive types or void."); // Return the same type with the merged flags. - return CTypeInfo(TypeInfoHelper::Type(), CTypeInfo::Flags(flags)); + return CTypeInfo(TypeInfoHelper::Type(), + TypeInfoHelper::SequenceType(), kFlags); + } + + private: + template + static constexpr CTypeInfo::Flags MergeFlags(CTypeInfo::Flags flags, + Rest... rest) { + return CTypeInfo::Flags(uint8_t(flags) | uint8_t(MergeFlags(rest...))); } + static constexpr CTypeInfo::Flags MergeFlags() { return CTypeInfo::Flags(0); } }; template @@ -513,8 +736,9 @@ class CFunctionBuilderWithFunction { Flags...>; }; - // Return a copy of the CFunctionBuilder, but merges the Flags on ArgBuilder - // index N with the new Flags passed in the template parameter pack. + // Return a copy of the CFunctionBuilder, but merges the Flags on + // ArgBuilder index N with the new Flags passed in the template parameter + // pack. template constexpr auto ArgImpl(std::index_sequence) { return CFunctionBuilderWithFunction< @@ -546,6 +770,22 @@ CFunction CFunction::ArgUnwrap::Make(R (*func)(Args...)) { using CFunctionBuilder = internal::CFunctionBuilder; +/** + * Copies the contents of this JavaScript array to a C++ buffer with + * a given max_length. A CTypeInfo is passed as an argument, + * instructing different rules for conversion (e.g. restricted float/double). + * The element type T of the destination array must match the C type + * corresponding to the CTypeInfo (specified by CTypeInfoTraits). + * If the array length is larger than max_length or the array is of + * unsupported type, the operation will fail, returning false. Generally, an + * array which contains objects, undefined, null or anything not convertible + * to the requested destination type, is considered unsupported. The operation + * returns true on success. `type_info` will be used for conversions. + */ +template +bool CopyAndConvertArrayToCppBuffer(Local src, T* dst, + uint32_t max_length); + } // namespace v8 #endif // INCLUDE_V8_FAST_API_CALLS_H_ diff --git a/deps/v8/include/v8-inspector.h b/deps/v8/include/v8-inspector.h index 852b39d7252295..0c19104a3774ab 100644 --- a/deps/v8/include/v8-inspector.h +++ b/deps/v8/include/v8-inspector.h @@ -170,7 +170,7 @@ class V8_EXPORT V8InspectorSession { v8::Local*, std::unique_ptr* objectGroup) = 0; virtual void releaseObjectGroup(StringView) = 0; - virtual void triggerPreciseCoverageDeltaUpdate(StringView occassion) = 0; + virtual void triggerPreciseCoverageDeltaUpdate(StringView occasion) = 0; }; class V8_EXPORT V8InspectorClient { @@ -301,6 +301,10 @@ class V8_EXPORT V8Inspector { int scriptId) = 0; virtual void exceptionRevoked(v8::Local, unsigned exceptionId, StringView message) = 0; + virtual bool associateExceptionData(v8::Local, + v8::Local exception, + v8::Local key, + v8::Local value) = 0; // Connection. class V8_EXPORT Channel { diff --git a/deps/v8/include/v8-internal.h b/deps/v8/include/v8-internal.h index f289149d8d06e2..1826dd6fca2eb3 100644 --- a/deps/v8/include/v8-internal.h +++ b/deps/v8/include/v8-internal.h @@ -146,6 +146,7 @@ enum ExternalPointerTag : uint64_t { kForeignForeignAddressTag = 0x01f7000000000000, // 0b000000111110111 kNativeContextMicrotaskQueueTag = 0x01fb000000000000, // 0b000000111111011 kEmbedderDataSlotPayloadTag = 0x01fd000000000000, // 0b000000111111101 + kCodeEntryPointTag = 0x01fe000000000000, // 0b000000111111110 }; constexpr uint64_t kExternalPointerTagMask = 0xffff000000000000; diff --git a/deps/v8/include/v8-metrics.h b/deps/v8/include/v8-metrics.h index 2404cc0a4c30d4..a6eea6a8645d0c 100644 --- a/deps/v8/include/v8-metrics.h +++ b/deps/v8/include/v8-metrics.h @@ -50,11 +50,19 @@ struct GarbageCollectionFullMainThreadIncrementalMark { int64_t cpp_wall_clock_duration_in_us = -1; }; +struct GarbageCollectionFullMainThreadBatchedIncrementalMark { + std::vector events; +}; + struct GarbageCollectionFullMainThreadIncrementalSweep { int64_t wall_clock_duration_in_us = -1; int64_t cpp_wall_clock_duration_in_us = -1; }; +struct GarbageCollectionFullMainThreadBatchedIncrementalSweep { + std::vector events; +}; + struct GarbageCollectionYoungCycle { int64_t total_wall_clock_duration_in_us = -1; int64_t main_thread_wall_clock_duration_in_us = -1; @@ -70,6 +78,7 @@ struct WasmModuleDecoded { size_t module_size_in_bytes = 0; size_t function_count = 0; int64_t wall_clock_duration_in_us = -1; + int64_t cpu_duration_in_us = -1; }; struct WasmModuleCompiled { @@ -82,6 +91,7 @@ struct WasmModuleCompiled { size_t code_size_in_bytes = 0; size_t liftoff_bailout_count = 0; int64_t wall_clock_duration_in_us = -1; + int64_t cpu_duration_in_us = -1; }; struct WasmModuleInstantiated { @@ -95,20 +105,23 @@ struct WasmModuleTieredUp { bool lazy = false; size_t code_size_in_bytes = 0; int64_t wall_clock_duration_in_us = -1; + int64_t cpu_duration_in_us = -1; }; struct WasmModulesPerIsolate { size_t count = 0; }; -#define V8_MAIN_THREAD_METRICS_EVENTS(V) \ - V(GarbageCollectionFullCycle) \ - V(GarbageCollectionFullMainThreadIncrementalMark) \ - V(GarbageCollectionFullMainThreadIncrementalSweep) \ - V(GarbageCollectionYoungCycle) \ - V(WasmModuleDecoded) \ - V(WasmModuleCompiled) \ - V(WasmModuleInstantiated) \ +#define V8_MAIN_THREAD_METRICS_EVENTS(V) \ + V(GarbageCollectionFullCycle) \ + V(GarbageCollectionFullMainThreadIncrementalMark) \ + V(GarbageCollectionFullMainThreadBatchedIncrementalMark) \ + V(GarbageCollectionFullMainThreadIncrementalSweep) \ + V(GarbageCollectionFullMainThreadBatchedIncrementalSweep) \ + V(GarbageCollectionYoungCycle) \ + V(WasmModuleDecoded) \ + V(WasmModuleCompiled) \ + V(WasmModuleInstantiated) \ V(WasmModuleTieredUp) #define V8_THREAD_SAFE_METRICS_EVENTS(V) V(WasmModulesPerIsolate) diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 1cf4d7e28448ce..213d8805b86087 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 9 -#define V8_MINOR_VERSION 2 -#define V8_BUILD_NUMBER 230 -#define V8_PATCH_LEVEL 21 +#define V8_MINOR_VERSION 3 +#define V8_BUILD_NUMBER 345 +#define V8_PATCH_LEVEL 16 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 464ced97679881..28ee5e6b673ce8 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -50,6 +50,7 @@ class CFunction; class CallHandlerHelper; class Context; class CppHeap; +class CTypeInfo; class Data; class Date; class EscapableHandleScope; @@ -885,6 +886,8 @@ class TracedReferenceBase { std::memory_order_relaxed); } + V8_EXPORT void CheckValue() const; + // val_ points to a GlobalHandles node. internal::Address* val_ = nullptr; @@ -926,8 +929,18 @@ class BasicTracedReference : public TracedReferenceBase { const_cast&>(*this)); } - T* operator->() const { return reinterpret_cast(val_); } - T* operator*() const { return reinterpret_cast(val_); } + T* operator->() const { +#ifdef V8_ENABLE_CHECKS + CheckValue(); +#endif // V8_ENABLE_CHECKS + return reinterpret_cast(val_); + } + T* operator*() const { +#ifdef V8_ENABLE_CHECKS + CheckValue(); +#endif // V8_ENABLE_CHECKS + return reinterpret_cast(val_); + } private: enum DestructionMode { kWithDestructor, kWithoutDestructor }; @@ -1427,9 +1440,7 @@ class ScriptOriginOptions { */ class ScriptOrigin { public: -#if defined(_MSC_VER) && _MSC_VER >= 1910 /* Disable on VS2015 */ V8_DEPRECATE_SOON("Use constructor with primitive C++ types") -#endif V8_INLINE explicit ScriptOrigin( Local resource_name, Local resource_line_offset, Local resource_column_offset, @@ -1440,9 +1451,7 @@ class ScriptOrigin { Local is_wasm = Local(), Local is_module = Local(), Local host_defined_options = Local()); -#if defined(_MSC_VER) && _MSC_VER >= 1910 /* Disable on VS2015 */ V8_DEPRECATE_SOON("Use constructor that takes an isolate") -#endif V8_INLINE explicit ScriptOrigin( Local resource_name, int resource_line_offset = 0, int resource_column_offset = 0, @@ -1653,7 +1662,7 @@ class V8_EXPORT Module : public Data { */ int GetIdentityHash() const; - using ResolveCallback = + using ResolveCallback V8_DEPRECATE_SOON("Use ResolveModuleCallback") = MaybeLocal (*)(Local context, Local specifier, Local referrer); using ResolveModuleCallback = MaybeLocal (*)( @@ -1944,11 +1953,9 @@ class V8_EXPORT ScriptCompiler { public: enum Encoding { ONE_BYTE, TWO_BYTE, UTF8, WINDOWS_1252 }; -#if defined(_MSC_VER) && _MSC_VER >= 1910 /* Disable on VS2015 */ V8_DEPRECATED( "This class takes ownership of source_stream, so use the constructor " "taking a unique_ptr to make these semantics clearer") -#endif StreamedSource(ExternalSourceStream* source_stream, Encoding encoding); StreamedSource(std::unique_ptr source_stream, Encoding encoding); @@ -4425,6 +4432,7 @@ class V8_EXPORT Array : public Object { static Local New(Isolate* isolate, Local* elements, size_t length); V8_INLINE static Array* Cast(Value* obj); + private: Array(); static void CheckCast(Value* obj); @@ -4900,6 +4908,12 @@ class V8_EXPORT Promise : public Object { */ void MarkAsHandled(); + /** + * Marks this promise as silent to prevent pausing the debugger when the + * promise is rejected. + */ + void MarkAsSilent(); + V8_INLINE static Promise* Cast(Value* obj); static const int kEmbedderFieldCount = V8_PROMISE_INTERNAL_FIELD_COUNT; @@ -6073,7 +6087,8 @@ class V8_EXPORT Template : public Data { PropertyAttribute attributes = None); void SetPrivate(Local name, Local value, PropertyAttribute attributes = None); - V8_INLINE void Set(Isolate* isolate, const char* name, Local value); + V8_INLINE void Set(Isolate* isolate, const char* name, Local value, + PropertyAttribute attributes = None); void SetAccessorProperty( Local name, @@ -6503,7 +6518,9 @@ class V8_EXPORT FunctionTemplate : public Template { Local signature = Local(), int length = 0, ConstructorBehavior behavior = ConstructorBehavior::kAllow, SideEffectType side_effect_type = SideEffectType::kHasSideEffect, - const CFunction* c_function = nullptr); + const CFunction* c_function = nullptr, uint8_t instance_type = 0, + uint8_t allowed_receiver_range_start = 0, + uint8_t allowed_receiver_range_end = 0); /** Creates a function template for multiple overloaded fast API calls.*/ static Local NewWithCFunctionOverloads( @@ -7299,7 +7316,8 @@ using CallCompletedCallback = void (*)(Isolate*); * fails (e.g. due to stack overflow), the embedder must propagate * that exception by returning an empty MaybeLocal. */ -using HostImportModuleDynamicallyCallback = +using HostImportModuleDynamicallyCallback V8_DEPRECATE_SOON( + "Use HostImportModuleDynamicallyWithImportAssertionsCallback instead") = MaybeLocal (*)(Local context, Local referrer, Local specifier); @@ -8547,7 +8565,7 @@ class V8_EXPORT Isolate { kDateToLocaleTimeString = 68, kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, kAttemptOverrideReadOnlyOnPrototypeStrict = 70, - kOptimizedFunctionWithOneShotBytecode = 71, + kOptimizedFunctionWithOneShotBytecode = 71, // Unused. kRegExpMatchIsTrueishOnNonJSRegExp = 72, kRegExpMatchIsFalseishOnJSRegExp = 73, kDateGetTimezoneOffset = 74, // Unused. @@ -8649,6 +8667,14 @@ class V8_EXPORT Isolate { */ static Isolate* GetCurrent(); + /** + * Returns the entered isolate for the current thread or NULL in + * case there is no current isolate. + * + * No checks are performed by this method. + */ + static Isolate* TryGetCurrent(); + /** * Clears the set of objects held strongly by the heap. This set of * objects are originally built when a WeakRef is created or @@ -8715,6 +8741,13 @@ class V8_EXPORT Isolate { */ void MemoryPressureNotification(MemoryPressureLevel level); + /** + * Drop non-essential caches. Should only be called from testing code. + * The method can potentially block for a long time and does not necessarily + * trigger GC. + */ + void ClearCachesForTesting(); + /** * Methods below this point require holding a lock (using Locker) in * a multi-threaded environment. @@ -11585,10 +11618,11 @@ Local Boolean::New(Isolate* isolate, bool value) { return value ? True(isolate) : False(isolate); } -void Template::Set(Isolate* isolate, const char* name, Local value) { +void Template::Set(Isolate* isolate, const char* name, Local value, + PropertyAttribute attributes) { Set(String::NewFromUtf8(isolate, name, NewStringType::kInternalized) .ToLocalChecked(), - value); + value, attributes); } FunctionTemplate* FunctionTemplate::Cast(Data* data) { diff --git a/deps/v8/infra/mb/mb_config.pyl b/deps/v8/infra/mb/mb_config.pyl index 9c0c933cda7d12..aaeda39f1c73b5 100644 --- a/deps/v8/infra/mb/mb_config.pyl +++ b/deps/v8/infra/mb/mb_config.pyl @@ -62,8 +62,10 @@ 'V8 Linux - verify csa': 'release_x86_verify_csa', # Linux64. 'V8 Linux64 - builder': 'release_x64', + 'V8 Linux64 - builder (reclient)': 'release_x64_reclient', 'V8 Linux64 - debug builder': 'debug_x64', 'V8 Linux64 - dict tracking - debug - builder': 'debug_x64_dict_tracking_trybot', + 'V8 Linux64 - external code space - debug - builder': 'debug_x64_external_code_space', 'V8 Linux64 - custom snapshot - debug builder': 'debug_x64_custom', 'V8 Linux64 - heap sandbox - debug - builder': 'debug_x64_heap_sandbox', 'V8 Linux64 - internal snapshot': 'release_x64_internal', @@ -213,6 +215,7 @@ 'release_simulate_arm64_pointer_compression', 'v8_linux64_dbg_ng': 'debug_x64_trybot', 'v8_linux64_dict_tracking_dbg_ng': 'debug_x64_dict_tracking_trybot', + 'v8_linux64_external_code_space_dbg_ng': 'debug_x64_external_code_space', 'v8_linux64_gc_stress_custom_snapshot_dbg_ng': 'debug_x64_trybot_custom', 'v8_linux64_gcc_compile_dbg': 'debug_x64_gcc', 'v8_linux64_gcov_coverage': 'release_x64_gcc_coverage', @@ -475,8 +478,7 @@ 'release_bot', 'x64', 'cfi_clusterfuzz'], 'release_x64_fuzzilli': [ 'release_bot', 'x64', 'dcheck_always_on', 'v8_enable_slow_dchecks', - 'v8_verify_heap', 'v8_verify_csa', 'v8_enable_verify_predictable', - 'fuzzilli'], + 'v8_verify_heap', 'v8_verify_csa', 'fuzzilli'], 'release_x64_msvc': [ 'release_bot_no_goma', 'x64', 'minimal_symbols', 'msvc'], 'release_x64_correctness_fuzzer' : [ @@ -499,6 +501,8 @@ 'v8_disable_pointer_compression'], 'release_x64_pointer_compression_without_dchecks': [ 'release_bot', 'x64', 'v8_disable_pointer_compression'], + 'release_x64_reclient': [ + 'release_bot_reclient', 'x64'], 'release_x64_trybot': [ 'release_trybot', 'x64'], 'release_x64_test_features_trybot': [ @@ -537,6 +541,8 @@ 'x64', 'asan'], 'debug_x64_custom': [ 'debug_bot', 'x64', 'v8_snapshot_custom'], + 'debug_x64_external_code_space': [ + 'debug_bot', 'x64', 'external_code_space'], 'debug_x64_fuchsia': [ 'debug_bot', 'x64', 'fuchsia'], 'debug_x64_gcc': [ @@ -692,6 +698,10 @@ 'gn_args': 'chrome_pgo_phase=0', }, + 'external_code_space': { + 'gn_args': 'v8_enable_external_code_space=true', + }, + 'fuchsia': { 'gn_args': 'target_os="fuchsia"', }, @@ -764,6 +774,10 @@ 'gn_args': 'v8_use_perfetto=true', }, + 'reclient': { + 'gn_args': 'use_rbe=true', + }, + 'release': { 'gn_args': 'is_debug=false', }, @@ -776,6 +790,10 @@ 'mixins': ['release', 'static', 'no_goma'], }, + 'release_bot_reclient': { + 'mixins': ['release', 'static', 'no_goma', 'reclient'], + }, + 'release_trybot': { 'mixins': ['release_bot', 'minimal_symbols', 'dcheck_always_on'], }, diff --git a/deps/v8/infra/testing/builders.pyl b/deps/v8/infra/testing/builders.pyl index 8fe8872ed9b0fa..d40e4ed9e7a167 100644 --- a/deps/v8/infra/testing/builders.pyl +++ b/deps/v8/infra/testing/builders.pyl @@ -77,7 +77,7 @@ {'name': 'mozilla'}, {'name': 'mozilla', 'variant': 'extra'}, {'name': 'test262', 'variant': 'default', 'shards': 2}, - {'name': 'test262', 'variant': 'extra', 'shards': 3}, + {'name': 'test262', 'variant': 'extra', 'shards': 5}, {'name': 'v8testing', 'shards': 3}, {'name': 'v8testing', 'variant': 'extra', 'shards': 2}, # Noavx. @@ -347,7 +347,7 @@ {'name': 'mozilla'}, {'name': 'mozilla', 'variant': 'extra'}, {'name': 'test262', 'variant': 'default'}, - {'name': 'test262', 'variant': 'extra', 'shards': 3}, + {'name': 'test262', 'variant': 'extra', 'shards': 5}, {'name': 'v8testing', 'shards': 3}, {'name': 'v8testing', 'variant': 'extra', 'shards': 3}, {'name': 'v8testing', 'variant': 'minor_mc'}, @@ -366,6 +366,15 @@ {'name': 'v8testing', 'shards': 3}, ], }, + 'v8_linux64_external_code_space_dbg_ng_triggered': { + 'swarming_dimensions' : { + 'cpu': 'x86-64-avx2', + 'os': 'Ubuntu-18.04', + }, + 'tests': [ + {'name': 'v8testing', 'shards': 3}, + ], + }, 'v8_linux64_fuzzilli_ng_triggered': { 'swarming_dimensions' : { 'os': 'Ubuntu-18.04', @@ -504,13 +513,13 @@ 'os': 'Ubuntu-18.04', }, 'tests': [ - {'name': 'benchmarks'}, - {'name': 'mozilla'}, - {'name': 'test262', 'variant': 'default', 'shards': 3}, - {'name': 'v8testing', 'shards': 5}, - {'name': 'v8testing', 'variant': 'extra', 'shards': 3}, - {'name': 'v8testing', 'variant': 'slow_path'}, - {'name': 'v8testing', 'variant': 'stress_concurrent_allocation'}, + {'name': 'benchmarks', 'shards': 2}, + {'name': 'mozilla', 'shards': 2}, + {'name': 'test262', 'variant': 'default', 'shards': 5}, + {'name': 'v8testing', 'shards': 6}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 5}, + {'name': 'v8testing', 'variant': 'slow_path', 'shards': 2}, + {'name': 'v8testing', 'variant': 'stress_concurrent_allocation', 'shards': 2}, ], }, 'v8_linux64_tsan_no_cm_rel_ng_triggered': { @@ -528,7 +537,7 @@ 'test_args': ['--extra-flags=--future'], 'shards': 6, }, - {'name': 'v8testing', 'variant': 'stress_concurrent_inlining'}, + {'name': 'v8testing', 'variant': 'stress_concurrent_inlining', 'shards': 2}, ], }, 'v8_linux64_tsan_isolates_rel_ng_triggered': { @@ -752,7 +761,7 @@ 'swarming_dimensions' : { 'cpu': 'arm64', 'os': 'Mac-11', - 'pool': 'chromium.tests.mac-arm64', + 'pool': 'chromium.tests', }, 'tests': [ {'name': 'v8testing'}, @@ -762,7 +771,7 @@ 'swarming_dimensions' : { 'cpu': 'arm64', 'os': 'Mac-11', - 'pool': 'chromium.tests.mac-arm64', + 'pool': 'chromium.tests', }, 'tests': [ {'name': 'v8testing'}, @@ -772,7 +781,7 @@ 'swarming_dimensions' : { 'cpu': 'arm64', 'os': 'Mac-11', - 'pool': 'chromium.tests.mac-arm64', + 'pool': 'chromium.tests', }, 'tests': [ {'name': 'v8testing'}, @@ -935,7 +944,7 @@ {'name': 'optimize_for_size'}, {'name': 'test262', 'shards': 6}, {'name': 'test262', 'variant': 'code_serializer', 'shards': 2}, - {'name': 'test262', 'variant': 'extra', 'shards': 3}, + {'name': 'test262', 'variant': 'extra', 'shards': 5}, {'name': 'v8testing', 'shards': 3}, { 'name': 'v8testing', @@ -1023,7 +1032,7 @@ 'os': 'Ubuntu-18.04', }, 'tests': [ - {'name': 'v8testing', 'variant': 'default', 'shards': 4}, + {'name': 'v8testing', 'variant': 'default', 'shards': 6}, ], }, 'V8 Linux - gc stress': { @@ -1168,7 +1177,7 @@ {'name': 'mozilla', 'variant': 'extra'}, {'name': 'optimize_for_size'}, {'name': 'test262', 'shards': 5}, - {'name': 'test262', 'variant': 'extra', 'shards': 3}, + {'name': 'test262', 'variant': 'extra', 'shards': 5}, {'name': 'v8testing', 'shards': 2}, {'name': 'v8testing', 'variant': 'extra', 'shards': 2}, {'name': 'v8testing', 'variant': 'minor_mc'}, @@ -1252,6 +1261,15 @@ {'name': 'v8testing', 'shards': 3}, ], }, + 'V8 Linux64 - external code space - debug': { + 'swarming_dimensions' : { + 'cpu': 'x86-64-avx2', + 'os': 'Ubuntu-18.04', + }, + 'tests': [ + {'name': 'v8testing', 'shards': 3}, + ], + }, 'V8 Linux64 - fyi': { 'swarming_dimensions' : { 'os': 'Ubuntu-18.04', @@ -1350,13 +1368,13 @@ 'os': 'Ubuntu-18.04', }, 'tests': [ - {'name': 'benchmarks'}, - {'name': 'mozilla'}, - {'name': 'test262', 'variant': 'default', 'shards': 3}, - {'name': 'v8testing', 'shards': 5}, - {'name': 'v8testing', 'variant': 'extra', 'shards': 3}, - {'name': 'v8testing', 'variant': 'slow_path', 'shards': 1}, - {'name': 'v8testing', 'variant': 'stress_concurrent_allocation', 'shards': 1}, + {'name': 'benchmarks', 'shards': 2}, + {'name': 'mozilla', 'shards': 2}, + {'name': 'test262', 'variant': 'default', 'shards': 5}, + {'name': 'v8testing', 'shards': 6}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 5}, + {'name': 'v8testing', 'variant': 'slow_path', 'shards': 2}, + {'name': 'v8testing', 'variant': 'stress_concurrent_allocation', 'shards': 2}, ], }, 'V8 Linux64 TSAN - stress-incremental-marking': { @@ -1372,16 +1390,18 @@ { 'name': 'benchmarks', 'test_args': ['--extra-flags=--stress-incremental-marking'], + 'shards': 2, }, { 'name': 'mozilla', 'test_args': ['--extra-flags=--stress-incremental-marking'], + 'shards': 2, }, { 'name': 'test262', 'variant': 'default', 'test_args': ['--extra-flags=--stress-incremental-marking'], - 'shards': 4, + 'shards': 5, }, { 'name': 'v8testing', @@ -1413,7 +1433,7 @@ 'test_args': ['--extra-flags=--future'], 'shards': 6, }, - {'name': 'v8testing', 'variant': 'stress_concurrent_inlining'}, + {'name': 'v8testing', 'variant': 'stress_concurrent_inlining', 'shards': 2}, ], }, 'V8 Linux64 UBSan': { @@ -1473,7 +1493,7 @@ 'swarming_dimensions' : { 'os': 'Mac-11', 'cpu': 'arm64', - 'pool': 'chromium.tests.mac-arm64', + 'pool': 'chromium.tests', }, 'swarming_task_attrs': { 'expiration': 14400, @@ -1489,7 +1509,7 @@ 'swarming_dimensions' : { 'os': 'Mac-11', 'cpu': 'arm64', - 'pool': 'chromium.tests.mac-arm64', + 'pool': 'chromium.tests', }, 'swarming_task_attrs': { 'expiration': 14400, diff --git a/deps/v8/src/DEPS b/deps/v8/src/DEPS index 3c5dca663f61e2..0a5e3b8480b84c 100644 --- a/deps/v8/src/DEPS +++ b/deps/v8/src/DEPS @@ -5,7 +5,7 @@ include_rules = [ "+src/asmjs/asm-js.h", "-src/baseline", "+src/baseline/baseline.h", - "+src/baseline/baseline-osr-inl.h", + "+src/baseline/baseline-batch-compiler.h", "+src/baseline/bytecode-offset-iterator.h", "-src/bigint", "+src/bigint/bigint.h", @@ -72,6 +72,9 @@ specific_include_rules = { "+include/libplatform/v8-tracing.h", "+perfetto/tracing.h" ], + "d8-platforms\.cc": [ + "+include/libplatform/libplatform.h", + ], "builtins-trace\.cc": [ "+protos/perfetto", ], diff --git a/deps/v8/src/api/api-arguments-inl.h b/deps/v8/src/api/api-arguments-inl.h index 4edd0dad29d9da..f6825e592225ec 100644 --- a/deps/v8/src/api/api-arguments-inl.h +++ b/deps/v8/src/api/api-arguments-inl.h @@ -6,11 +6,10 @@ #define V8_API_API_ARGUMENTS_INL_H_ #include "src/api/api-arguments.h" - #include "src/api/api-inl.h" #include "src/debug/debug.h" #include "src/execution/vm-state-inl.h" -#include "src/logging/counters.h" +#include "src/logging/runtime-call-stats-scope.h" #include "src/objects/api-callbacks.h" #include "src/objects/slots-inl.h" #include "src/tracing/trace-event.h" diff --git a/deps/v8/src/api/api-inl.h b/deps/v8/src/api/api-inl.h index 84b9b288bb09e3..9bd266395e18f6 100644 --- a/deps/v8/src/api/api-inl.h +++ b/deps/v8/src/api/api-inl.h @@ -5,10 +5,12 @@ #ifndef V8_API_API_INL_H_ #define V8_API_API_INL_H_ +#include "include/v8-fast-api-calls.h" #include "src/api/api.h" #include "src/execution/interrupts-scope.h" #include "src/execution/microtask-queue.h" #include "src/handles/handles-inl.h" +#include "src/heap/heap-inl.h" #include "src/objects/foreign-inl.h" #include "src/objects/js-weak-refs.h" #include "src/objects/objects-inl.h" @@ -239,6 +241,58 @@ inline bool IsExecutionTerminatingCheck(i::Isolate* isolate) { return false; } +template +void CopySmiElementsToTypedBuffer(T* dst, uint32_t length, + i::FixedArray elements) { + for (uint32_t i = 0; i < length; ++i) { + double value = elements.get(static_cast(i)).Number(); + // TODO(mslekova): Avoid converting back-and-forth when possible, e.g + // avoid int->double->int conversions to boost performance. + dst[i] = i::ConvertDouble(value); + } +} + +template +void CopyDoubleElementsToTypedBuffer(T* dst, uint32_t length, + i::FixedDoubleArray elements) { + for (uint32_t i = 0; i < length; ++i) { + double value = elements.get_scalar(static_cast(i)); + // TODO(mslekova): There are certain cases, e.g. double->double, in which + // we could do a memcpy directly. + dst[i] = i::ConvertDouble(value); + } +} + +template +bool CopyAndConvertArrayToCppBuffer(Local src, T* dst, + uint32_t max_length) { + static_assert( + std::is_same< + T, typename i::CTypeInfoTraitsGetType()>::ctype>::value, + "Type mismatch between the expected CTypeInfo::Type and the destination " + "array"); + + uint32_t length = src->Length(); + if (length > max_length) { + return false; + } + + i::DisallowGarbageCollection no_gc; + i::JSArray obj = *reinterpret_cast(*src); + + i::FixedArrayBase elements = obj.elements(); + if (obj.HasSmiElements()) { + CopySmiElementsToTypedBuffer(dst, length, i::FixedArray::cast(elements)); + return true; + } else if (obj.HasDoubleElements()) { + CopyDoubleElementsToTypedBuffer(dst, length, + i::FixedDoubleArray::cast(elements)); + return true; + } else { + return false; + } +} + namespace internal { Handle HandleScopeImplementer::LastEnteredContext() { diff --git a/deps/v8/src/api/api-natives.cc b/deps/v8/src/api/api-natives.cc index 46d54f6f5872ae..985f5956a82e6b 100644 --- a/deps/v8/src/api/api-natives.cc +++ b/deps/v8/src/api/api-natives.cc @@ -7,6 +7,8 @@ #include "src/api/api-inl.h" #include "src/common/message-template.h" #include "src/execution/isolate-inl.h" +#include "src/heap/heap-inl.h" +#include "src/logging/runtime-call-stats-scope.h" #include "src/objects/api-callbacks.h" #include "src/objects/hash-table-inl.h" #include "src/objects/lookup.h" @@ -109,7 +111,7 @@ MaybeHandle DefineDataProperty(Isolate* isolate, ASSIGN_RETURN_ON_EXCEPTION(isolate, value, Instantiate(isolate, prop_data, name), Object); - LookupIterator::Key key(isolate, name); + PropertyKey key(isolate, name); LookupIterator it(isolate, object, key, LookupIterator::OWN_SKIP_INTERCEPTOR); #ifdef DEBUG diff --git a/deps/v8/src/api/api.cc b/deps/v8/src/api/api.cc index 9d1e53d3bb69c6..84295e5cde0b28 100644 --- a/deps/v8/src/api/api.cc +++ b/deps/v8/src/api/api.cc @@ -25,6 +25,7 @@ #include "src/base/platform/time.h" #include "src/base/safe_conversions.h" #include "src/base/utils/random-number-generator.h" +#include "src/baseline/baseline-batch-compiler.h" #include "src/builtins/accessors.h" #include "src/builtins/builtins-utils.h" #include "src/codegen/compiler.h" @@ -58,6 +59,7 @@ #include "src/json/json-stringifier.h" #include "src/logging/counters.h" #include "src/logging/metrics.h" +#include "src/logging/runtime-call-stats-scope.h" #include "src/logging/tracing-flags.h" #include "src/numbers/conversions-inl.h" #include "src/objects/api-callbacks.h" @@ -107,11 +109,11 @@ #include "src/strings/string-hasher.h" #include "src/strings/unicode-inl.h" #include "src/tracing/trace-event.h" -#include "src/trap-handler/trap-handler.h" #include "src/utils/detachable-vector.h" #include "src/utils/version.h" #if V8_ENABLE_WEBASSEMBLY +#include "src/trap-handler/trap-handler.h" #include "src/wasm/streaming-decoder.h" #include "src/wasm/value-type.h" #include "src/wasm/wasm-engine.h" @@ -409,6 +411,8 @@ SnapshotCreator::SnapshotCreator(Isolate* isolate, internal_isolate->InitWithoutSnapshot(); } data_ = data; + // Disable batch compilation during snapshot creation. + internal_isolate->baseline_batch_compiler()->set_enabled(false); } SnapshotCreator::SnapshotCreator(const intptr_t* external_references, @@ -1218,7 +1222,9 @@ static Local FunctionTemplateNew( bool do_not_cache, v8::Local cached_property_name = v8::Local(), SideEffectType side_effect_type = SideEffectType::kHasSideEffect, - const MemorySpan& c_function_overloads = {}) { + const MemorySpan& c_function_overloads = {}, + uint8_t instance_type = 0, uint8_t allowed_receiver_range_start = 0, + uint8_t allowed_receiver_range_end = 0) { i::Handle struct_obj = isolate->factory()->NewStruct( i::FUNCTION_TEMPLATE_INFO_TYPE, i::AllocationType::kOld); i::Handle obj = @@ -1240,6 +1246,9 @@ static Local FunctionTemplateNew( ? i::ReadOnlyRoots(isolate).the_hole_value() : *Utils::OpenHandle(*cached_property_name)); if (behavior == ConstructorBehavior::kThrow) raw.set_remove_prototype(true); + raw.SetInstanceType(instance_type); + raw.set_allowed_receiver_range_start(allowed_receiver_range_start); + raw.set_allowed_receiver_range_end(allowed_receiver_range_end); } if (callback != nullptr) { Utils::ToLocal(obj)->SetCallHandler(callback, data, side_effect_type, @@ -1251,7 +1260,9 @@ static Local FunctionTemplateNew( Local FunctionTemplate::New( Isolate* isolate, FunctionCallback callback, v8::Local data, v8::Local signature, int length, ConstructorBehavior behavior, - SideEffectType side_effect_type, const CFunction* c_function) { + SideEffectType side_effect_type, const CFunction* c_function, + uint8_t instance_type, uint8_t allowed_receiver_range_start, + uint8_t allowed_receiver_range_end) { i::Isolate* i_isolate = reinterpret_cast(isolate); // Changes to the environment cannot be captured in the snapshot. Expect no // function templates when the isolate is created for serialization. @@ -1261,7 +1272,8 @@ Local FunctionTemplate::New( i_isolate, callback, data, signature, length, behavior, false, Local(), side_effect_type, c_function ? MemorySpan{c_function, 1} - : MemorySpan{}); + : MemorySpan{}, + instance_type, allowed_receiver_range_start, allowed_receiver_range_end); } Local FunctionTemplate::NewWithCFunctionOverloads( @@ -1269,6 +1281,15 @@ Local FunctionTemplate::NewWithCFunctionOverloads( v8::Local signature, int length, ConstructorBehavior behavior, SideEffectType side_effect_type, const MemorySpan& c_function_overloads) { + // TODO(mslekova): Once runtime overload resolution between sequences is + // supported, check that if (c_function_overloads.size() == 2), then + // c_function_overloads.data()[0]. + // CanResolveOverload(c_function_overloads.data()[1]). We won't support + // the case where the size is greater than 2 for runtime resolution, until + // we've added support for ArrayBuffers and ArrayBufferViews. OTOH the + // overloads list might contain more than 2 functions with different arity, + // the resolution between which is available at compile time. + i::Isolate* i_isolate = reinterpret_cast(isolate); LOG_API(i_isolate, FunctionTemplate, New); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); @@ -3234,7 +3255,8 @@ ValueDeserializer::Delegate::GetSharedArrayBufferFromId(Isolate* v8_isolate, } struct ValueDeserializer::PrivateData { - PrivateData(i::Isolate* i, i::Vector data, Delegate* delegate) + PrivateData(i::Isolate* i, base::Vector data, + Delegate* delegate) : isolate(i), deserializer(i, data, delegate) {} i::Isolate* isolate; i::ValueDeserializer deserializer; @@ -3251,10 +3273,11 @@ ValueDeserializer::ValueDeserializer(Isolate* isolate, const uint8_t* data, if (base::IsValueInRangeForNumericType(size)) { private_ = new PrivateData( reinterpret_cast(isolate), - i::Vector(data, static_cast(size)), delegate); + base::Vector(data, static_cast(size)), delegate); } else { - private_ = new PrivateData(reinterpret_cast(isolate), - i::Vector(nullptr, 0), nullptr); + private_ = + new PrivateData(reinterpret_cast(isolate), + base::Vector(nullptr, 0), nullptr); private_->has_aborted = true; } } @@ -4099,7 +4122,7 @@ Maybe v8::Object::CreateDataProperty(v8::Local context, i::Handle key_obj = Utils::OpenHandle(*key); i::Handle value_obj = Utils::OpenHandle(*value); - i::LookupIterator::Key lookup_key(isolate, key_obj); + i::PropertyKey lookup_key(isolate, key_obj); i::LookupIterator it(isolate, self, lookup_key, i::LookupIterator::OWN); if (self->IsJSProxy()) { ENTER_V8(isolate, context, Object, CreateDataProperty, Nothing(), @@ -4775,7 +4798,7 @@ MaybeLocal v8::Object::GetRealNamedPropertyInPrototypeChain( if (iter.IsAtEnd()) return MaybeLocal(); i::Handle proto = i::PrototypeIterator::GetCurrent(iter); - i::LookupIterator::Key lookup_key(isolate, key_obj); + i::PropertyKey lookup_key(isolate, key_obj); i::LookupIterator it(isolate, self, lookup_key, proto, i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); Local result; @@ -4799,7 +4822,7 @@ v8::Object::GetRealNamedPropertyAttributesInPrototypeChain( if (iter.IsAtEnd()) return Nothing(); i::Handle proto = i::PrototypeIterator::GetCurrent(iter); - i::LookupIterator::Key lookup_key(isolate, key_obj); + i::PropertyKey lookup_key(isolate, key_obj); i::LookupIterator it(isolate, self, lookup_key, proto, i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); Maybe result = @@ -4816,7 +4839,7 @@ MaybeLocal v8::Object::GetRealNamedProperty(Local context, PREPARE_FOR_EXECUTION(context, Object, GetRealNamedProperty, Value); i::Handle self = Utils::OpenHandle(this); i::Handle key_obj = Utils::OpenHandle(*key); - i::LookupIterator::Key lookup_key(isolate, key_obj); + i::PropertyKey lookup_key(isolate, key_obj); i::LookupIterator it(isolate, self, lookup_key, self, i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); Local result; @@ -4833,7 +4856,7 @@ Maybe v8::Object::GetRealNamedPropertyAttributes( Nothing(), i::HandleScope); i::Handle self = Utils::OpenHandle(this); i::Handle key_obj = Utils::OpenHandle(*key); - i::LookupIterator::Key lookup_key(isolate, key_obj); + i::PropertyKey lookup_key(isolate, key_obj); i::LookupIterator it(isolate, self, lookup_key, self, i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); auto result = i::JSReceiver::GetPropertyAttributes(&it); @@ -5330,7 +5353,7 @@ namespace { // units until the buffer capacity is reached, would be exceeded by the next // unit, or all code units have been written out. template -static int WriteUtf8Impl(i::Vector string, char* write_start, +static int WriteUtf8Impl(base::Vector string, char* write_start, int write_capacity, int options, int* utf16_chars_read_out) { bool write_null = !(options & v8::String::NO_NULL_TERMINATION); @@ -5362,7 +5385,7 @@ static int WriteUtf8Impl(i::Vector string, char* write_start, for (int i = read_index; i < up_to; i++) char_mask |= read_start[i]; if ((char_mask & 0x80) == 0) { int copy_length = up_to - read_index; - base::Memcpy(current_write, read_start + read_index, copy_length); + memcpy(current_write, read_start + read_index, copy_length); current_write += copy_length; read_index = up_to; } else { @@ -5841,8 +5864,9 @@ bool TryHandleWebAssemblyTrapPosix(int sig_code, siginfo_t* info, // code rather than the wasm code, so the trap handler cannot find the landing // pad and lets the process crash. Therefore, only enable trap handlers if // the host and target arch are the same. -#if (V8_TARGET_ARCH_X64 && !V8_OS_ANDROID) || \ - (V8_HOST_ARCH_ARM64 && V8_TARGET_ARCH_ARM64 && V8_OS_MACOSX) +#if V8_ENABLE_WEBASSEMBLY && \ + ((V8_TARGET_ARCH_X64 && !V8_OS_ANDROID) || \ + (V8_HOST_ARCH_ARM64 && V8_TARGET_ARCH_ARM64 && V8_OS_MACOSX)) return i::trap_handler::TryHandleSignal(sig_code, info, context); #else return false; @@ -5857,15 +5881,20 @@ bool V8::TryHandleSignal(int signum, void* info, void* context) { #if V8_OS_WIN bool TryHandleWebAssemblyTrapWindows(EXCEPTION_POINTERS* exception) { -#if V8_TARGET_ARCH_X64 +#if V8_ENABLE_WEBASSEMBLY && V8_TARGET_ARCH_X64 return i::trap_handler::TryHandleWasmTrap(exception); -#endif +#else return false; +#endif } #endif bool V8::EnableWebAssemblyTrapHandler(bool use_v8_signal_handler) { +#if V8_ENABLE_WEBASSEMBLY return v8::internal::trap_handler::EnableTrapHandler(use_v8_signal_handler); +#else + return false; +#endif } #if defined(V8_OS_WIN) @@ -6104,7 +6133,7 @@ Local NewContext( // TODO(jkummerow): This is for crbug.com/713699. Remove it if it doesn't // fail. // Sanity-check that the isolate is initialized and usable. - CHECK(isolate->builtins()->builtin(i::Builtins::kIllegal).IsCode()); + CHECK(isolate->builtins()->code(i::Builtin::kIllegal).IsCode()); TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.NewContext"); LOG_API(isolate, Context, New); @@ -6210,7 +6239,7 @@ v8::Local Context::Global() { i::Handle context = Utils::OpenHandle(this); i::Isolate* isolate = context->GetIsolate(); i::Handle global(context->global_proxy(), isolate); - // TODO(dcarney): This should always return the global proxy + // TODO(chromium:324812): This should always return the global proxy // but can't presently as calls to GetProtoype will return the wrong result. if (i::Handle::cast(global)->IsDetachedFrom( context->global_object())) { @@ -6506,7 +6535,7 @@ inline int StringLength(const uint16_t* string) { V8_WARN_UNUSED_RESULT inline i::MaybeHandle NewString(i::Factory* factory, NewStringType type, - i::Vector string) { + base::Vector string) { if (type == NewStringType::kInternalized) { return factory->InternalizeUtf8String(string); } @@ -6516,7 +6545,7 @@ inline i::MaybeHandle NewString(i::Factory* factory, V8_WARN_UNUSED_RESULT inline i::MaybeHandle NewString(i::Factory* factory, NewStringType type, - i::Vector string) { + base::Vector string) { if (type == NewStringType::kInternalized) { return factory->InternalizeString(string); } @@ -6524,9 +6553,9 @@ inline i::MaybeHandle NewString(i::Factory* factory, } V8_WARN_UNUSED_RESULT -inline i::MaybeHandle NewString(i::Factory* factory, - NewStringType type, - i::Vector string) { +inline i::MaybeHandle NewString( + i::Factory* factory, NewStringType type, + base::Vector string) { if (type == NewStringType::kInternalized) { return factory->InternalizeString(string); } @@ -6552,7 +6581,7 @@ STATIC_ASSERT(v8::String::kMaxLength == i::String::kMaxLength); if (length < 0) length = StringLength(data); \ i::Handle handle_result = \ NewString(i_isolate->factory(), type, \ - i::Vector(data, length)) \ + base::Vector(data, length)) \ .ToHandleChecked(); \ result = Utils::ToLocal(handle_result); \ } @@ -6565,7 +6594,7 @@ Local String::NewFromUtf8Literal(Isolate* isolate, const char* literal, LOG_API(i_isolate, String, NewFromUtf8Literal); i::Handle handle_result = NewString(i_isolate->factory(), type, - i::Vector(literal, length)) + base::Vector(literal, length)) .ToHandleChecked(); return Utils::ToLocal(handle_result); } @@ -7003,7 +7032,7 @@ MaybeLocal v8::RegExp::NewWithBacktrackLimit( Local v8::RegExp::GetSource() const { i::Handle obj = Utils::OpenHandle(this); return Utils::ToLocal( - i::Handle(obj->Pattern(), obj->GetIsolate())); + i::Handle(obj->EscapedPattern(), obj->GetIsolate())); } // Assert that the static flags cast in GetFlags is valid. @@ -7453,6 +7482,11 @@ void Promise::MarkAsHandled() { js_promise->set_has_handler(true); } +void Promise::MarkAsSilent() { + i::Handle js_promise = Utils::OpenHandle(this); + js_promise->set_is_silent(true); +} + Local Proxy::GetTarget() { i::Handle self = Utils::OpenHandle(this); i::Handle target(self->target(), self->GetIsolate()); @@ -7511,7 +7545,7 @@ OwnedBuffer CompiledWasmModule::Serialize() { MemorySpan CompiledWasmModule::GetWireBytesRef() { #if V8_ENABLE_WEBASSEMBLY - i::Vector bytes_vec = native_module_->wire_bytes(); + base::Vector bytes_vec = native_module_->wire_bytes(); return {bytes_vec.begin(), bytes_vec.size()}; #else UNREACHABLE(); @@ -7548,9 +7582,9 @@ MaybeLocal WasmModuleObject::FromCompiledModule( #if V8_ENABLE_WEBASSEMBLY i::Isolate* i_isolate = reinterpret_cast(isolate); i::Handle module_object = - i_isolate->wasm_engine()->ImportNativeModule( + i::wasm::GetWasmEngine()->ImportNativeModule( i_isolate, compiled_module.native_module_, - i::VectorOf(compiled_module.source_url())); + base::VectorOf(compiled_module.source_url())); return Local::Cast( Utils::ToLocal(i::Handle::cast(module_object))); #else @@ -7579,7 +7613,7 @@ void* v8::ArrayBuffer::Allocator::Reallocate(void* data, size_t old_length, reinterpret_cast(AllocateUninitialized(new_length)); if (new_data == nullptr) return nullptr; size_t bytes_to_copy = std::min(old_length, new_length); - base::Memcpy(new_data, data, bytes_to_copy); + memcpy(new_data, data, bytes_to_copy); if (new_length > bytes_to_copy) { memset(new_data + bytes_to_copy, 0, new_length - bytes_to_copy); } @@ -7713,7 +7747,7 @@ size_t v8::ArrayBufferView::CopyContents(void* dest, size_t byte_length) { isolate); source = reinterpret_cast(typed_array->DataPtr()); } - base::Memcpy(dest, source + byte_offset, bytes_to_copy); + memcpy(dest, source + byte_offset, bytes_to_copy); } return bytes_to_copy; } @@ -8209,7 +8243,7 @@ void Isolate::RequestInterrupt(InterruptCallback callback, void* data) { bool Isolate::HasPendingBackgroundTasks() { #if V8_ENABLE_WEBASSEMBLY i::Isolate* isolate = reinterpret_cast(this); - return isolate->wasm_engine()->HasRunningCompileJob(isolate); + return i::wasm::GetWasmEngine()->HasRunningCompileJob(isolate); #else return false; #endif // V8_ENABLE_WEBASSEMBLY @@ -8236,6 +8270,11 @@ Isolate* Isolate::GetCurrent() { return reinterpret_cast(isolate); } +Isolate* Isolate::TryGetCurrent() { + i::Isolate* isolate = i::Isolate::TryGetCurrent(); + return reinterpret_cast(isolate); +} + // static Isolate* Isolate::Allocate() { return reinterpret_cast(i::Isolate::New()); @@ -8264,23 +8303,6 @@ void Isolate::Initialize(Isolate* isolate, } else { i_isolate->set_snapshot_blob(i::Snapshot::DefaultSnapshotBlob()); } - auto code_event_handler = params.code_event_handler; -#ifdef ENABLE_GDB_JIT_INTERFACE - if (code_event_handler == nullptr && i::FLAG_gdbjit) { - code_event_handler = i::GDBJITInterface::EventHandler; - } -#endif // ENABLE_GDB_JIT_INTERFACE -#if defined(V8_OS_WIN) && defined(V8_ENABLE_SYSTEM_INSTRUMENTATION) - if (code_event_handler == nullptr && i::FLAG_enable_system_instrumentation) { - code_event_handler = i::ETWJITInterface::EventHandler; - } -#endif // defined(V8_OS_WIN) - - if (code_event_handler) { - i_isolate->InitializeLoggingAndCounters(); - i_isolate->logger()->SetCodeEventHandler(kJitCodeEventDefault, - code_event_handler); - } if (params.counter_lookup_callback) { isolate->SetCounterFunction(params.counter_lookup_callback); } @@ -8305,22 +8327,40 @@ void Isolate::Initialize(Isolate* isolate, } // TODO(jochen): Once we got rid of Isolate::Current(), we can remove this. Isolate::Scope isolate_scope(isolate); + if (i_isolate->snapshot_blob() == nullptr) { + FATAL( + "V8 snapshot blob was not set during initialization. This can mean " + "that the snapshot blob file is corrupted or missing."); + } if (!i::Snapshot::Initialize(i_isolate)) { // If snapshot data was provided and we failed to deserialize it must // have been corrupted. - if (i_isolate->snapshot_blob() != nullptr) { - FATAL( - "Failed to deserialize the V8 snapshot blob. This can mean that the " - "snapshot blob file is corrupted or missing."); + FATAL( + "Failed to deserialize the V8 snapshot blob. This can mean that the " + "snapshot blob file is corrupted or missing."); + } + + { + // Set up code event handlers. Needs to be after i::Snapshot::Initialize + // because that is where we add the isolate to WasmEngine. + auto code_event_handler = params.code_event_handler; +#ifdef ENABLE_GDB_JIT_INTERFACE + if (code_event_handler == nullptr && i::FLAG_gdbjit) { + code_event_handler = i::GDBJITInterface::EventHandler; } - base::ElapsedTimer timer; - if (i::FLAG_profile_deserialization) timer.Start(); - i_isolate->InitWithoutSnapshot(); - if (i::FLAG_profile_deserialization) { - double ms = timer.Elapsed().InMillisecondsF(); - i::PrintF("[Initializing isolate from scratch took %0.3f ms]\n", ms); +#endif // ENABLE_GDB_JIT_INTERFACE +#if defined(V8_OS_WIN) && defined(V8_ENABLE_SYSTEM_INSTRUMENTATION) + if (code_event_handler == nullptr && + i::FLAG_enable_system_instrumentation) { + code_event_handler = i::ETWJITInterface::EventHandler; + } +#endif // defined(V8_OS_WIN) + + if (code_event_handler) { + isolate->SetJitCodeEventHandler(kJitCodeEventDefault, code_event_handler); } } + i_isolate->set_only_terminate_in_safe_scope( params.only_terminate_in_safe_scope); i_isolate->set_embedder_wrapper_type_index( @@ -8534,7 +8574,12 @@ void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) { heap_statistics->malloced_memory_ = isolate->allocator()->GetCurrentMemoryUsage() + isolate->string_table()->GetCurrentMemoryUsage(); - heap_statistics->external_memory_ = isolate->heap()->backing_store_bytes(); + // On 32-bit systems backing_store_bytes() might overflow size_t temporarily + // due to concurrent array buffer sweeping. + heap_statistics->external_memory_ = + isolate->heap()->backing_store_bytes() < SIZE_MAX + ? static_cast(isolate->heap()->backing_store_bytes()) + : SIZE_MAX; heap_statistics->peak_malloced_memory_ = isolate->allocator()->GetMaxMemoryUsage(); heap_statistics->number_of_native_contexts_ = heap->NumberOfNativeContexts(); @@ -8544,9 +8589,9 @@ void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) { #if V8_ENABLE_WEBASSEMBLY heap_statistics->malloced_memory_ += - isolate->wasm_engine()->allocator()->GetCurrentMemoryUsage(); + i::wasm::GetWasmEngine()->allocator()->GetCurrentMemoryUsage(); heap_statistics->peak_malloced_memory_ += - isolate->wasm_engine()->allocator()->GetMaxMemoryUsage(); + i::wasm::GetWasmEngine()->allocator()->GetMaxMemoryUsage(); #endif // V8_ENABLE_WEBASSEMBLY } @@ -8824,7 +8869,7 @@ void Isolate::SetAddHistogramSampleFunction( void Isolate::SetMetricsRecorder( const std::shared_ptr& metrics_recorder) { i::Isolate* isolate = reinterpret_cast(this); - isolate->metrics_recorder()->SetRecorder(isolate, metrics_recorder); + isolate->metrics_recorder()->SetEmbedderRecorder(isolate, metrics_recorder); } void Isolate::SetAddCrashKeyCallback(AddCrashKeyCallback callback) { @@ -8860,7 +8905,7 @@ int Isolate::ContextDisposedNotification(bool dependant_context) { // of that context. // A handle scope for the native context. i::HandleScope handle_scope(isolate); - isolate->wasm_engine()->DeleteCompileJobsOnContext( + i::wasm::GetWasmEngine()->DeleteCompileJobsOnContext( isolate->native_context()); } } @@ -8888,6 +8933,12 @@ void Isolate::MemoryPressureNotification(MemoryPressureLevel level) { isolate->heap()->MemoryPressureNotification(level, on_isolate_thread); } +void Isolate::ClearCachesForTesting() { + i::Isolate* isolate = reinterpret_cast(this); + isolate->AbortConcurrentOptimization(i::BlockingBehavior::kBlock); + isolate->ClearSerializerData(); +} + void Isolate::EnableMemorySavingsMode() { i::Isolate* isolate = reinterpret_cast(this); isolate->EnableMemorySavingsMode(); @@ -8951,10 +9002,10 @@ JSEntryStubs Isolate::GetJSEntryStubs() { JSEntryStubs entry_stubs; i::Isolate* isolate = reinterpret_cast(this); - std::array, 3> stubs = { - {{i::Builtins::kJSEntry, &entry_stubs.js_entry_stub}, - {i::Builtins::kJSConstructEntry, &entry_stubs.js_construct_entry_stub}, - {i::Builtins::kJSRunMicrotasksEntry, + std::array, 3> stubs = { + {{i::Builtin::kJSEntry, &entry_stubs.js_entry_stub}, + {i::Builtin::kJSConstructEntry, &entry_stubs.js_construct_entry_stub}, + {i::Builtin::kJSRunMicrotasksEntry, &entry_stubs.js_run_microtasks_entry_stub}}}; for (auto& pair : stubs) { i::Code js_entry = isolate->heap()->builtin(pair.first); @@ -9633,8 +9684,6 @@ const char* CodeEvent::GetCodeEventTypeName(CodeEventType code_event_type) { } // The execution should never pass here UNREACHABLE(); - // NOTE(mmarchini): Workaround to fix a compiler failure on GCC 4.9 - return "Unknown"; } CodeEventHandler::CodeEventHandler(Isolate* isolate) { @@ -9683,7 +9732,6 @@ Local HeapGraphEdge::GetName() const { default: UNREACHABLE(); } - return v8::Undefined(reinterpret_cast(isolate)); } const HeapGraphNode* HeapGraphEdge::GetFromNode() const { @@ -9957,6 +10005,14 @@ void EmbedderHeapTracer::ResetHandleInNonTracingGC( UNREACHABLE(); } +void TracedReferenceBase::CheckValue() const { +#ifdef V8_HOST_ARCH_64_BIT + if (!val_) return; + + CHECK_NE(internal::kGlobalHandleZapValue, *reinterpret_cast(val_)); +#endif // V8_HOST_ARCH_64_BIT +} + CFunction::CFunction(const void* address, const CFunctionInfo* type_info) : address_(address), type_info_(type_info) { CHECK_NOT_NULL(address_); @@ -10217,6 +10273,49 @@ void InvokeFinalizationRegistryCleanupFromTask( } } +template <> +EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) +int32_t ConvertDouble(double d) { + return internal::DoubleToInt32(d); +} + +template <> +EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) +uint32_t ConvertDouble(double d) { + return internal::DoubleToUint32(d); +} + +template <> +EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) +float ConvertDouble(double d) { + return internal::DoubleToFloat32(d); +} + +template <> +EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) +double ConvertDouble(double d) { + return d; +} + +template <> +EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) +int64_t ConvertDouble(double d) { + return internal::DoubleToWebIDLInt64(d); +} + +template <> +EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) +uint64_t ConvertDouble(double d) { + return internal::DoubleToWebIDLUint64(d); +} + +template <> +EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) +bool ConvertDouble(double d) { + // Implements https://tc39.es/ecma262/#sec-toboolean. + return !std::isnan(d) && d != 0; +} + // Undefine macros for jumbo build. #undef SET_FIELD_WRAPPED #undef NEW_STRING diff --git a/deps/v8/src/api/api.h b/deps/v8/src/api/api.h index efb25c0e01b163..7d2a0c3e9cfb95 100644 --- a/deps/v8/src/api/api.h +++ b/deps/v8/src/api/api.h @@ -536,6 +536,10 @@ void InvokeFinalizationRegistryCleanupFromTask( Handle finalization_registry, Handle callback); +template +EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) +T ConvertDouble(double d); + } // namespace internal } // namespace v8 diff --git a/deps/v8/src/asmjs/asm-js.cc b/deps/v8/src/asmjs/asm-js.cc index 2aecd86b692447..28b44bf088b1e7 100644 --- a/deps/v8/src/asmjs/asm-js.cc +++ b/deps/v8/src/asmjs/asm-js.cc @@ -9,6 +9,7 @@ #include "src/ast/ast.h" #include "src/base/optional.h" #include "src/base/platform/elapsed-timer.h" +#include "src/base/vector.h" #include "src/codegen/compiler.h" #include "src/codegen/unoptimized-compilation-info.h" #include "src/common/assert-scope.h" @@ -23,8 +24,6 @@ #include "src/parsing/parse-info.h" #include "src/parsing/scanner-character-streams.h" #include "src/parsing/scanner.h" -#include "src/utils/vector.h" - #include "src/wasm/wasm-engine.h" #include "src/wasm/wasm-js.h" #include "src/wasm/wasm-limits.h" @@ -42,7 +41,7 @@ namespace { Handle StdlibMathMember(Isolate* isolate, Handle stdlib, Handle name) { Handle math_name( - isolate->factory()->InternalizeString(StaticCharVector("Math"))); + isolate->factory()->InternalizeString(base::StaticCharVector("Math"))); Handle math = JSReceiver::GetDataProperty(stdlib, math_name); if (!math->IsJSReceiver()) return isolate->factory()->undefined_value(); Handle math_receiver = Handle::cast(math); @@ -68,40 +67,40 @@ bool AreStdlibMembersValid(Isolate* isolate, Handle stdlib, #define STDLIB_MATH_FUNC(fname, FName, ignore1, ignore2) \ if (members.contains(wasm::AsmJsParser::StandardMember::kMath##FName)) { \ members.Remove(wasm::AsmJsParser::StandardMember::kMath##FName); \ - Handle name( \ - isolate->factory()->InternalizeString(StaticCharVector(#fname))); \ + Handle name(isolate->factory()->InternalizeString( \ + base::StaticCharVector(#fname))); \ Handle value = StdlibMathMember(isolate, stdlib, name); \ if (!value->IsJSFunction()) return false; \ SharedFunctionInfo shared = Handle::cast(value)->shared(); \ if (!shared.HasBuiltinId() || \ - shared.builtin_id() != Builtins::kMath##FName) { \ + shared.builtin_id() != Builtin::kMath##FName) { \ return false; \ } \ DCHECK_EQ(shared.GetCode(), \ - isolate->builtins()->builtin(Builtins::kMath##FName)); \ + isolate->builtins()->code(Builtin::kMath##FName)); \ } STDLIB_MATH_FUNCTION_LIST(STDLIB_MATH_FUNC) #undef STDLIB_MATH_FUNC #define STDLIB_MATH_CONST(cname, const_value) \ if (members.contains(wasm::AsmJsParser::StandardMember::kMath##cname)) { \ members.Remove(wasm::AsmJsParser::StandardMember::kMath##cname); \ - Handle name( \ - isolate->factory()->InternalizeString(StaticCharVector(#cname))); \ + Handle name(isolate->factory()->InternalizeString( \ + base::StaticCharVector(#cname))); \ Handle value = StdlibMathMember(isolate, stdlib, name); \ if (!value->IsNumber() || value->Number() != const_value) return false; \ } STDLIB_MATH_VALUE_LIST(STDLIB_MATH_CONST) #undef STDLIB_MATH_CONST -#define STDLIB_ARRAY_TYPE(fname, FName) \ - if (members.contains(wasm::AsmJsParser::StandardMember::k##FName)) { \ - members.Remove(wasm::AsmJsParser::StandardMember::k##FName); \ - *is_typed_array = true; \ - Handle name( \ - isolate->factory()->InternalizeString(StaticCharVector(#FName))); \ - Handle value = JSReceiver::GetDataProperty(stdlib, name); \ - if (!value->IsJSFunction()) return false; \ - Handle func = Handle::cast(value); \ - if (!func.is_identical_to(isolate->fname())) return false; \ +#define STDLIB_ARRAY_TYPE(fname, FName) \ + if (members.contains(wasm::AsmJsParser::StandardMember::k##FName)) { \ + members.Remove(wasm::AsmJsParser::StandardMember::k##FName); \ + *is_typed_array = true; \ + Handle name(isolate->factory()->InternalizeString( \ + base::StaticCharVector(#FName))); \ + Handle value = JSReceiver::GetDataProperty(stdlib, name); \ + if (!value->IsJSFunction()) return false; \ + Handle func = Handle::cast(value); \ + if (!func.is_identical_to(isolate->fname())) return false; \ } STDLIB_ARRAY_TYPE(int8_array_fun, Int8Array) STDLIB_ARRAY_TYPE(uint8_array_fun, Uint8Array) @@ -117,7 +116,7 @@ bool AreStdlibMembersValid(Isolate* isolate, Handle stdlib, return true; } -void Report(Handle +
@@ -19,6 +31,8 @@

Code Panel

+

Properties

+

Disassembly


     

Source Code

diff --git a/deps/v8/tools/system-analyzer/view/code-panel.mjs b/deps/v8/tools/system-analyzer/view/code-panel.mjs index 34e4ad300e441e..793b31cde7db15 100644 --- a/deps/v8/tools/system-analyzer/view/code-panel.mjs +++ b/deps/v8/tools/system-analyzer/view/code-panel.mjs @@ -1,11 +1,14 @@ // Copyright 2020 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 {IcLogEntry} from '../log/ic.mjs'; -import {MapLogEntry} from '../log/map.mjs'; +import {SelectRelatedEvent} from './events.mjs'; +import {CollapsableElement, DOM, formatBytes, formatMicroSeconds} from './helper.mjs'; -import {FocusEvent, SelectionEvent, ToolTipEvent} from './events.mjs'; -import {CollapsableElement, delay, DOM, formatBytes, formatMicroSeconds} from './helper.mjs'; +const kRegisters = ['rsp', 'rbp', 'rax', 'rbx', 'rcx', 'rdx', 'rsi', 'rdi']; +// Add Interpreter and x64 registers +for (let i = 0; i < 14; i++) { + kRegisters.push(`r${i}`); +} DOM.defineCustomElement('view/code-panel', (templateText) => @@ -16,6 +19,11 @@ DOM.defineCustomElement('view/code-panel', constructor() { super(templateText); + this._codeSelectNode = this.$('#codeSelect'); + this._disassemblyNode = this.$('#disassembly'); + this._sourceNode = this.$('#sourceCode'); + this._registerSelector = new RegisterSelector(this._disassemblyNode); + this._codeSelectNode.onchange = this._handleSelectCode.bind(this); this.$('#selectedRelatedButton').onclick = this._handleSelectRelated.bind(this) @@ -34,27 +42,52 @@ DOM.defineCustomElement('view/code-panel', set entry(entry) { this._entry = entry; + if (entry !== undefined) { + this.$('#properties').propertyDict = { + '__this__': entry, + functionName: entry.functionName, + size: formatBytes(entry.size), + creationTime: formatMicroSeconds(entry.time / 1000), + sourcePosition: entry.sourcePosition, + script: entry.script, + type: entry.type, + kind: entry.kindName, + variants: entry.variants.length > 1 ? entry.variants : undefined, + }; + } else { + this.$('#properties').propertyDict = {}; + } this.requestUpdate(); } - get _disassemblyNode() { - return this.$('#disassembly'); - } - - get _sourceNode() { - return this.$('#sourceCode'); - } - - get _codeSelectNode() { - return this.$('#codeSelect'); - } - _update() { this._updateSelect(); - this._disassemblyNode.innerText = this._entry?.disassemble ?? ''; + this._formatDisassembly(); this._sourceNode.innerText = this._entry?.source ?? ''; } + _formatDisassembly() { + if (!this._entry?.code) { + this._disassemblyNode.innerText = ''; + return; + } + const rawCode = this._entry?.code; + try { + this._disassemblyNode.innerText = rawCode; + let formattedCode = this._disassemblyNode.innerHTML; + for (let register of kRegisters) { + const button = `${register}` + formattedCode = formattedCode.replaceAll(register, button); + } + // Let's replace the base-address since it doesn't add any value. + // TODO + this._disassemblyNode.innerHTML = formattedCode; + } catch (e) { + console.error(e); + this._disassemblyNode.innerText = rawCode; + } + } + _updateSelect() { const select = this._codeSelectNode; if (select.data === this._selectedEntries) return; @@ -64,13 +97,19 @@ DOM.defineCustomElement('view/code-panel', this._selectedEntries.slice().sort((a, b) => a.time - b.time); for (const code of this._selectedEntries) { const option = DOM.element('option'); - option.text = - `${code.name}(...) t=${formatMicroSeconds(code.time)} size=${ - formatBytes(code.size)} script=${code.script?.toString()}`; + option.text = this._entrySummary(code); option.data = code; select.add(option); } } + _entrySummary(code) { + if (code.isBuiltinKind) { + return `${code.functionName}(...) t=${ + formatMicroSeconds(code.time)} size=${formatBytes(code.size)}`; + } + return `${code.functionName}(...) t=${formatMicroSeconds(code.time)} size=${ + formatBytes(code.size)} script=${code.script?.toString()}`; + } _handleSelectCode() { this.entry = this._codeSelectNode.selectedOptions[0].data; @@ -80,4 +119,37 @@ DOM.defineCustomElement('view/code-panel', if (!this._entry) return; this.dispatchEvent(new SelectRelatedEvent(this._entry)); } -}); \ No newline at end of file +}); + +class RegisterSelector { + _currentRegister; + constructor(node) { + this._node = node; + this._node.onmousemove = this._handleDisassemblyMouseMove.bind(this); + } + + _handleDisassemblyMouseMove(event) { + const target = event.target; + if (!target.classList.contains('register')) { + this._clear(); + return; + }; + this._select(target.innerText); + } + + _clear() { + if (this._currentRegister == undefined) return; + for (let node of this._node.querySelectorAll('.register')) { + node.classList.remove('selected'); + } + } + + _select(register) { + if (register == this._currentRegister) return; + this._clear(); + this._currentRegister = register; + for (let node of this._node.querySelectorAll(`.register.${register}`)) { + node.classList.add('selected'); + } + } +} \ No newline at end of file diff --git a/deps/v8/tools/system-analyzer/view/events.mjs b/deps/v8/tools/system-analyzer/view/events.mjs index 4204973f8f2027..f91fd6ffe82e58 100644 --- a/deps/v8/tools/system-analyzer/view/events.mjs +++ b/deps/v8/tools/system-analyzer/view/events.mjs @@ -76,10 +76,10 @@ export class ToolTipEvent extends AppEvent { constructor(content, positionOrTargetNode) { super(ToolTipEvent.name); - this._content = content; - if (!positionOrTargetNode && !node) { + if (!positionOrTargetNode) { throw Error('Either provide a valid position or targetNode'); } + this._content = content; this._positionOrTargetNode = positionOrTargetNode; } diff --git a/deps/v8/tools/system-analyzer/view/helper.mjs b/deps/v8/tools/system-analyzer/view/helper.mjs index 44da06ced4dfdc..a3d250091d7788 100644 --- a/deps/v8/tools/system-analyzer/view/helper.mjs +++ b/deps/v8/tools/system-analyzer/view/helper.mjs @@ -17,6 +17,7 @@ export class CSSColor { this._cache.set(name, color); return color; } + static reset() { this._cache.clear(); } @@ -82,7 +83,7 @@ export class CSSColor { return this.list[index % this.list.length]; } - static darken(hexColorString, amount = -40) { + static darken(hexColorString, amount = -50) { if (hexColorString[0] !== '#') { throw new Error(`Unsupported color: ${hexColorString}`); } @@ -122,13 +123,45 @@ export class CSSColor { } export class DOM { - static element(type, classes) { + static element(type, options) { const node = document.createElement(type); - if (classes === undefined) return node; + if (options !== undefined) { + if (typeof options === 'string') { + // Old behaviour: options = class string + node.className = options; + } else if (Array.isArray(options)) { + // Old behaviour: options = class array + DOM.addClasses(node, options); + } else { + // New behaviour: options = attribute dict + for (const [key, value] of Object.entries(options)) { + if (key == 'className') { + node.className = value; + } else if (key == 'classList') { + node.classList = value; + } else if (key == 'textContent') { + node.textContent = value; + } else if (key == 'children') { + for (const child of value) { + node.appendChild(child); + } + } else { + node.setAttribute(key, value); + } + } + } + } + return node; + } + + static addClasses(node, classes) { + const classList = node.classList; if (typeof classes === 'string') { - node.className = classes; + classList.add(classes); } else { - classes.forEach(cls => node.classList.add(cls)); + for (let i = 0; i < classes.length; i++) { + classList.add(classes[i]); + } } return node; } @@ -137,20 +170,27 @@ export class DOM { return document.createTextNode(string); } - static div(classes) { - return this.element('div', classes); + static button(label, clickHandler) { + const button = DOM.element('button'); + button.innerText = label; + button.onclick = clickHandler; + return button; + } + + static div(options) { + return this.element('div', options); } - static span(classes) { - return this.element('span', classes); + static span(options) { + return this.element('span', options); } - static table(classes) { - return this.element('table', classes); + static table(options) { + return this.element('table', options); } - static tbody(classes) { - return this.element('tbody', classes); + static tbody(options) { + return this.element('tbody', options); } static td(textOrNode, className) { @@ -174,8 +214,17 @@ export class DOM { range.deleteContents(); } - static defineCustomElement(path, generator) { - let name = path.substring(path.lastIndexOf('/') + 1, path.length); + static defineCustomElement( + path, nameOrGenerator, maybeGenerator = undefined) { + let generator = nameOrGenerator; + let name = nameOrGenerator; + if (typeof nameOrGenerator == 'function') { + console.assert(maybeGenerator === undefined); + name = path.substring(path.lastIndexOf('/') + 1, path.length); + } else { + console.assert(typeof nameOrGenerator == 'string'); + generator = maybeGenerator; + } path = path + '-template.html'; fetch(path) .then(stream => stream.text()) @@ -185,6 +234,27 @@ export class DOM { } } +const SVGNamespace = 'http://www.w3.org/2000/svg'; +export class SVG { + static element(type, classes) { + const node = document.createElementNS(SVGNamespace, type); + if (classes !== undefined) DOM.addClasses(node, classes); + return node; + } + + static svg(classes) { + return this.element('svg', classes); + } + + static rect(classes) { + return this.element('rect', classes); + } + + static g(classes) { + return this.element('g', classes); + } +} + export function $(id) { return document.querySelector(id) } @@ -233,31 +303,42 @@ export class CollapsableElement extends V8CustomElement { constructor(templateText) { super(templateText); this._hasPendingUpdate = false; - this._closer.onclick = _ => this.tryUpdateOnVisibilityChange(); + this._closer.onclick = _ => this._requestUpdateIfVisible(); } get _closer() { return this.$('#closer'); } - _contentIsVisible() { + get _contentIsVisible() { return !this._closer.checked; } + hide() { + if (this._contentIsVisible) { + this._closer.checked = true; + this._requestUpdateIfVisible(); + } + this.scrollIntoView(); + } + + show() { + if (!this._contentIsVisible) { + this._closer.checked = false; + this._requestUpdateIfVisible(); + } + this.scrollIntoView(); + } + requestUpdate(useAnimation = false) { // A pending update will be resolved later, no need to try again. if (this._hasPendingUpdate) return; this._hasPendingUpdate = true; - this.requestUpdateIfVisible(useAnimation); - } - - tryUpdateOnVisibilityChange() { - if (!this._hasPendingUpdate) return; - this.requestUpdateIfVisible(true); + this._requestUpdateIfVisible(useAnimation); } - requestUpdateIfVisible(useAnimation) { - if (!this._contentIsVisible()) return; + _requestUpdateIfVisible(useAnimation = true) { + if (!this._contentIsVisible) return; return super.requestUpdate(useAnimation); } @@ -267,6 +348,43 @@ export class CollapsableElement extends V8CustomElement { } } +export class ExpandableText { + constructor(node, string, limit = 200) { + this._node = node; + this._string = string; + this._delta = limit / 2; + this._start = 0; + this._end = string.length; + this._button = this._createExpandButton(); + this.expand(); + } + + _createExpandButton() { + const button = DOM.element('button'); + button.innerText = '...'; + button.onclick = (e) => { + e.stopImmediatePropagation(); + this.expand() + }; + return button; + } + + expand() { + DOM.removeAllChildren(this._node); + this._start = this._start + this._delta; + this._end = this._end - this._delta; + if (this._start >= this._end) { + this._node.innerText = this._string; + this._button.onclick = undefined; + return; + } + this._node.appendChild(DOM.text(this._string.substring(0, this._start))); + this._node.appendChild(this._button); + this._node.appendChild( + DOM.text(this._string.substring(this._end, this._string.length))); + } +} + export class Chunked { constructor(iterable, limit) { this._iterator = iterable[Symbol.iterator](); @@ -340,8 +458,8 @@ export function gradientStopsFromGroups( const stops = []; for (let group of groups) { const color = colorFn(group.key); - increment += group.count; - let height = (increment / totalLength * kMaxHeight) | 0; + increment += group.length; + const height = (increment / totalLength * kMaxHeight) | 0; stops.push(`${color} ${lastHeight}${kUnit} ${height}${kUnit}`) lastHeight = height; } diff --git a/deps/v8/tools/system-analyzer/view/list-panel.mjs b/deps/v8/tools/system-analyzer/view/list-panel.mjs index bc3b2f89d58392..495aaae0591197 100644 --- a/deps/v8/tools/system-analyzer/view/list-panel.mjs +++ b/deps/v8/tools/system-analyzer/view/list-panel.mjs @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {Script, SourcePosition} from '../../profile.mjs'; -import {LogEntry} from '../log/log.mjs'; +import {App} from '../index.mjs' import {FocusEvent, ToolTipEvent} from './events.mjs'; import {groupBy, LazyTable} from './helper.mjs'; @@ -128,8 +127,7 @@ DOM.defineCustomElement('view/list-panel', _logEntryMouseOverHandler(e) { const group = e.currentTarget.group; - this.dispatchEvent( - new ToolTipEvent(group.key.toStringLong(), e.currentTarget)); + this.dispatchEvent(new ToolTipEvent(group.key, e.currentTarget)); } _handleDetailsClick(event) { @@ -178,7 +176,7 @@ DOM.defineCustomElement('view/list-panel', _render(groups, table) { let last; new LazyTable(table, groups, group => { - if (last && last.count < group.count) { + if (last && last.count < group.length) { console.log(last, group); } last = group; @@ -187,9 +185,9 @@ DOM.defineCustomElement('view/list-panel', const details = tr.appendChild(DOM.td('', 'toggle')); details.onclick = this._detailsClickHandler; tr.appendChild(DOM.td(`${group.percent.toFixed(2)}%`, 'percentage')); - tr.appendChild(DOM.td(group.count, 'count')); - const valueTd = tr.appendChild(DOM.td(`${group.key}`, 'key')); - if (this._isClickable(group.key)) { + tr.appendChild(DOM.td(group.length, 'count')); + const valueTd = tr.appendChild(DOM.td(group.key?.toString(), 'key')); + if (App.isClickable(group.key)) { tr.onclick = this._logEntryClickHandler; tr.onmouseover = this._logEntryMouseOverHandler; valueTd.classList.add('clickable'); @@ -197,12 +195,4 @@ DOM.defineCustomElement('view/list-panel', return tr; }, 10); } - - _isClickable(object) { - if (typeof object !== 'object') return false; - if (object instanceof LogEntry) return true; - if (object instanceof SourcePosition) return true; - if (object instanceof Script) return true; - return false; - } }); diff --git a/deps/v8/tools/system-analyzer/view/log-file-reader-template.html b/deps/v8/tools/system-analyzer/view/log-file-reader-template.html index 478e08129c70fd..68403300e30b8f 100644 --- a/deps/v8/tools/system-analyzer/view/log-file-reader-template.html +++ b/deps/v8/tools/system-analyzer/view/log-file-reader-template.html @@ -14,15 +14,14 @@ transition: all 0.5s ease-in-out; background-color: var(--surface-color); } - + #fileReader:hover { background-color: var(--primary-color); color: var(--on-primary-color); } .done #fileReader{ - height: 20px; - line-height: 20px; + display: none; } .fail #fileReader { @@ -51,6 +50,7 @@ height: 100%; background-color: var(--file-reader-background-color); } + #spinner { position: absolute; width: 100px; @@ -64,6 +64,10 @@ animation: spin 1s ease-in-out infinite; } + #label { + user-select: none; + } + @keyframes spin { 0% { transform: rotate(0deg); diff --git a/deps/v8/tools/system-analyzer/view/log-file-reader.mjs b/deps/v8/tools/system-analyzer/view/log-file-reader.mjs index fd935f2f836353..5edb90d2fca567 100644 --- a/deps/v8/tools/system-analyzer/view/log-file-reader.mjs +++ b/deps/v8/tools/system-analyzer/view/log-file-reader.mjs @@ -1,6 +1,7 @@ // Copyright 2020 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 {delay} from '../helper.mjs'; import {DOM, V8CustomElement} from './helper.mjs'; DOM.defineCustomElement('view/log-file-reader', @@ -65,20 +66,45 @@ DOM.defineCustomElement('view/log-file-reader', } this.fileReader.blur(); this.root.className = 'loading'; - const reader = new FileReader(); - reader.onload = (e) => this.handleFileLoad(e, file); // Delay the loading a bit to allow for CSS animations to happen. - setTimeout(() => reader.readAsText(file), 0); + window.requestAnimationFrame(() => this.asyncReadFile(file)); } - handleFileLoad(e, file) { - const chunk = e.target.result; + async asyncReadFile(file) { + const decoder = globalThis.TextDecoderStream; + if (decoder) { + await this._streamFile(file, decoder); + } else { + await this._readFullFile(file); + } this._updateLabel(`Finished loading '${file.name}'.`); - this.dispatchEvent(new CustomEvent('fileuploadend', { + this.dispatchEvent( + new CustomEvent('fileuploadend', {bubbles: true, composed: true})); + this.root.className = 'done'; + } + + async _readFullFile(file) { + const text = await file.text(); + this._handleFileChunk(text) + } + + async _streamFile(file, decoder) { + const stream = file.stream().pipeThrough(new decoder()); + const reader = stream.getReader(); + let chunk, readerDone; + do { + const readResult = await reader.read(); + chunk = readResult.value; + readerDone = readResult.done; + if (chunk) this._handleFileChunk(chunk); + } while (!readerDone); + } + + _handleFileChunk(chunk) { + this.dispatchEvent(new CustomEvent('fileuploadchunk', { bubbles: true, composed: true, detail: chunk, })); - this.root.className = 'done'; } }); diff --git a/deps/v8/tools/system-analyzer/view/map-panel/map-details-template.html b/deps/v8/tools/system-analyzer/view/map-panel/map-details-template.html index b109d4c8ac7bbb..83cdd059ac113b 100644 --- a/deps/v8/tools/system-analyzer/view/map-panel/map-details-template.html +++ b/deps/v8/tools/system-analyzer/view/map-panel/map-details-template.html @@ -15,5 +15,5 @@ white-space: pre; } -
+
diff --git a/deps/v8/tools/system-analyzer/view/map-panel/map-details.mjs b/deps/v8/tools/system-analyzer/view/map-panel/map-details.mjs index a8ea27e2e4e147..505c24cf8d352f 100644 --- a/deps/v8/tools/system-analyzer/view/map-panel/map-details.mjs +++ b/deps/v8/tools/system-analyzer/view/map-panel/map-details.mjs @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import {FocusEvent} from '../events.mjs'; +import {ExpandableText} from '../helper.mjs'; import {DOM, V8CustomElement} from '../helper.mjs'; DOM.defineCustomElement( @@ -11,15 +12,14 @@ DOM.defineCustomElement( constructor() { super(templateText); - this._filePositionNode.onclick = e => this._handleFilePositionClick(e); } get _mapDetails() { return this.$('#mapDetails'); } - get _filePositionNode() { - return this.$('#filePositionNode'); + get _mapProperties() { + return this.$('#mapProperties'); } set map(map) { @@ -29,19 +29,32 @@ DOM.defineCustomElement( } _update() { - let details = ''; - let clickableDetails = ''; + this._mapProperties.innerText = ''; if (this._map) { - clickableDetails = `ID: ${this._map.id}`; - clickableDetails += `\nSource location: ${this._map.filePosition}`; - details = this._map.description; + let clickableDetailsTable = DOM.table('properties'); + + { + const row = clickableDetailsTable.insertRow(); + row.insertCell().innerText = 'ID'; + row.insertCell().innerText = `${this._map.id}`; + } + { + const row = clickableDetailsTable.insertRow(); + row.insertCell().innerText = 'Source location'; + const sourceLocation = row.insertCell(); + new ExpandableText(sourceLocation, `${this._map.sourcePosition}`); + sourceLocation.className = 'clickable'; + sourceLocation.onclick = e => this._handleSourcePositionClick(e); + } + + this._mapProperties.appendChild(clickableDetailsTable); + this._mapDetails.innerText = this._map.description; + } else { + this._mapDetails.innerText = ''; } - this._filePositionNode.innerText = clickableDetails; - this._filePositionNode.classList.add('clickable'); - this._mapDetails.innerText = details; } - _handleFilePositionClick(event) { + _handleSourcePositionClick(event) { this.dispatchEvent(new FocusEvent(this._map.sourcePosition)); } }); diff --git a/deps/v8/tools/system-analyzer/view/map-panel/map-transitions.mjs b/deps/v8/tools/system-analyzer/view/map-panel/map-transitions.mjs index fbe78f91563ce7..95d6b0371f6cd8 100644 --- a/deps/v8/tools/system-analyzer/view/map-panel/map-transitions.mjs +++ b/deps/v8/tools/system-analyzer/view/map-panel/map-transitions.mjs @@ -5,177 +5,177 @@ import {FocusEvent, SelectRelatedEvent, ToolTipEvent} from '../events.mjs'; import {CSSColor} from '../helper.mjs'; import {DOM, V8CustomElement} from '../helper.mjs'; -DOM.defineCustomElement( - './view/map-panel/map-transitions', - (templateText) => class MapTransitions extends V8CustomElement { - _timeline; - _map; - _edgeToColor = new Map(); - _selectedLogEntries; - _displayedMapsInTree; - _toggleSubtreeHandler = this._handleToggleSubtree.bind(this); - _mapClickHandler = this._handleMapClick.bind(this); - _mapDoubleClickHandler = this._handleMapDoubleClick.bind(this); - _mouseoverMapHandler = this._handleMouseoverMap.bind(this); - - constructor() { - super(templateText); - this.currentNode = this.transitionView; - } - - get transitionView() { - return this.$('#transitionView'); - } - - set timeline(timeline) { - this._timeline = timeline; - this._edgeToColor.clear(); - timeline.getBreakdown().forEach(breakdown => { - this._edgeToColor.set(breakdown.key, CSSColor.at(breakdown.id)); - }); - } - - set selectedLogEntries(list) { - this._selectedLogEntries = list; - this.requestUpdate(); - } - - _update() { - this.transitionView.style.display = 'none'; - DOM.removeAllChildren(this.transitionView); - if (this._selectedLogEntries.length == 0) return; - this._displayedMapsInTree = new Set(); - // Limit view to 200 maps for performance reasons. - this._selectedLogEntries.slice(0, 200).forEach( - (map) => this._addMapAndParentTransitions(map)); - this._displayedMapsInTree = undefined; - this.transitionView.style.display = ''; - } - - _addMapAndParentTransitions(map) { - if (map === undefined) return; - if (this._displayedMapsInTree.has(map)) return; - this._displayedMapsInTree.add(map); - this.currentNode = this.transitionView; - let parents = map.getParents(); - if (parents.length > 0) { - this._addTransitionTo(parents.pop()); - parents.reverse().forEach((each) => this._addTransitionTo(each)); - } - let mapNode = this._addSubtransitions(map); - // Mark and show the selected map. - mapNode.classList.add('selected'); - if (this.selectedMap == map) { - setTimeout( - () => mapNode.scrollIntoView({ - behavior: 'smooth', - block: 'nearest', - inline: 'nearest', - }), - 1); - } - } - - _addSubtransitions(map) { - let mapNode = this._addTransitionTo(map); - // Draw outgoing linear transition line. - let current = map; - while (current.children.length == 1) { - current = current.children[0].to; - this._addTransitionTo(current); - } - return mapNode; - } - - _addTransitionEdge(map) { - let classes = ['transitionEdge']; - let edge = DOM.div(classes); - edge.style.backgroundColor = this._edgeToColor.get(map.edge.type); - let labelNode = DOM.div('transitionLabel'); - labelNode.innerText = map.edge.toString(); - edge.appendChild(labelNode); - return edge; - } - - _addTransitionTo(map) { - // transition[ transitions[ transition[...], transition[...], ...]]; - this._displayedMapsInTree?.add(map); - let transition = DOM.div('transition'); - if (map.isDeprecated()) transition.classList.add('deprecated'); - if (map.edge) { - transition.appendChild(this._addTransitionEdge(map)); - } - let mapNode = this._addMapNode(map); - transition.appendChild(mapNode); - - let subtree = DOM.div('transitions'); - transition.appendChild(subtree); - - this.currentNode.appendChild(transition); - this.currentNode = subtree; - - return mapNode; - } - - _addMapNode(map) { - let node = DOM.div('map'); - if (map.edge) - node.style.backgroundColor = this._edgeToColor.get(map.edge.type); - node.map = map; - node.onclick = this._mapClickHandler - node.ondblclick = this._mapDoubleClickHandler - node.onmouseover = this._mouseoverMapHandler - if (map.children.length > 1) { - node.innerText = map.children.length; - const showSubtree = DOM.div('showSubtransitions'); - showSubtree.onclick = this._toggleSubtreeHandler - node.appendChild(showSubtree); - } - else if (map.children.length == 0) { - node.innerHTML = '●'; - } - this.currentNode.appendChild(node); - return node; - } - - _handleMapClick(event) { - const map = event.currentTarget.map; - this.dispatchEvent(new FocusEvent(map)); - } - - _handleMapDoubleClick(event) { - this.dispatchEvent(new SelectRelatedEvent(event.currentTarget.map)); - } - - _handleMouseoverMap(event) { - this.dispatchEvent(new ToolTipEvent( - event.currentTarget.map.toStringLong(), event.currentTarget)); - } - - _handleToggleSubtree(event) { - event.preventDefault(); - const node = event.currentTarget.parentElement; - let map = node.map; - event.target.classList.toggle('opened'); - let transitionsNode = node.parentElement.querySelector('.transitions'); - let subtransitionNodes = transitionsNode.children; - if (subtransitionNodes.length <= 1) { - // Add subtransitions except the one that's already shown. - let visibleTransitionMap = subtransitionNodes.length == 1 ? - transitionsNode.querySelector('.map').map : - undefined; - map.children.forEach((edge) => { - if (edge.to != visibleTransitionMap) { - this.currentNode = transitionsNode; - this._addSubtransitions(edge.to); - } - }); - } else { - // remove all but the first (currently selected) subtransition - for (let i = subtransitionNodes.length - 1; i > 0; i--) { - transitionsNode.removeChild(subtransitionNodes[i]); - } +DOM.defineCustomElement('./view/map-panel/map-transitions', + (templateText) => + class MapTransitions extends V8CustomElement { + _timeline; + _map; + _edgeToColor = new Map(); + _selectedLogEntries; + _displayedMapsInTree; + _toggleSubtreeHandler = this._handleToggleSubtree.bind(this); + _mapClickHandler = this._handleMapClick.bind(this); + _mapDoubleClickHandler = this._handleMapDoubleClick.bind(this); + _mouseoverMapHandler = this._handleMouseoverMap.bind(this); + + constructor() { + super(templateText); + this.currentNode = this.transitionView; + } + + get transitionView() { + return this.$('#transitionView'); + } + + set timeline(timeline) { + this._timeline = timeline; + this._edgeToColor.clear(); + timeline.getBreakdown().forEach(breakdown => { + this._edgeToColor.set(breakdown.key, CSSColor.at(breakdown.id)); + }); + } + + set selectedLogEntries(list) { + this._selectedLogEntries = list; + this.requestUpdate(); + } + + _update() { + this.transitionView.style.display = 'none'; + DOM.removeAllChildren(this.transitionView); + if (this._selectedLogEntries.length == 0) return; + this._displayedMapsInTree = new Set(); + // Limit view to 200 maps for performance reasons. + this._selectedLogEntries.slice(0, 200).forEach( + (map) => this._addMapAndParentTransitions(map)); + this._displayedMapsInTree = undefined; + this.transitionView.style.display = ''; + } + + _addMapAndParentTransitions(map) { + if (map === undefined) return; + if (this._displayedMapsInTree.has(map)) return; + this._displayedMapsInTree.add(map); + this.currentNode = this.transitionView; + let parents = map.getParents(); + if (parents.length > 0) { + this._addTransitionTo(parents.pop()); + parents.reverse().forEach((each) => this._addTransitionTo(each)); + } + let mapNode = this._addSubtransitions(map); + // Mark and show the selected map. + mapNode.classList.add('selected'); + if (this.selectedMap == map) { + setTimeout( + () => mapNode.scrollIntoView({ + behavior: 'smooth', + block: 'nearest', + inline: 'nearest', + }), + 1); + } + } + + _addSubtransitions(map) { + let mapNode = this._addTransitionTo(map); + // Draw outgoing linear transition line. + let current = map; + while (current.children.length == 1) { + current = current.children[0].to; + this._addTransitionTo(current); + } + return mapNode; + } + + _addTransitionEdge(map) { + let classes = ['transitionEdge']; + let edge = DOM.div(classes); + edge.style.backgroundColor = this._edgeToColor.get(map.edge.type); + let labelNode = DOM.div('transitionLabel'); + labelNode.innerText = map.edge.toString(); + edge.appendChild(labelNode); + return edge; + } + + _addTransitionTo(map) { + // transition[ transitions[ transition[...], transition[...], ...]]; + this._displayedMapsInTree?.add(map); + let transition = DOM.div('transition'); + if (map.isDeprecated()) transition.classList.add('deprecated'); + if (map.edge) { + transition.appendChild(this._addTransitionEdge(map)); + } + let mapNode = this._addMapNode(map); + transition.appendChild(mapNode); + + let subtree = DOM.div('transitions'); + transition.appendChild(subtree); + + this.currentNode.appendChild(transition); + this.currentNode = subtree; + + return mapNode; + } + + _addMapNode(map) { + let node = DOM.div('map'); + if (map.edge) + node.style.backgroundColor = this._edgeToColor.get(map.edge.type); + node.map = map; + node.onclick = this._mapClickHandler + node.ondblclick = this._mapDoubleClickHandler + node.onmouseover = this._mouseoverMapHandler + if (map.children.length > 1) { + node.innerText = map.children.length; + const showSubtree = DOM.div('showSubtransitions'); + showSubtree.onclick = this._toggleSubtreeHandler + node.appendChild(showSubtree); + } + else if (map.children.length == 0) { + node.innerHTML = '●'; + } + this.currentNode.appendChild(node); + return node; + } + + _handleMapClick(event) { + const map = event.currentTarget.map; + this.dispatchEvent(new FocusEvent(map)); + } + + _handleMapDoubleClick(event) { + this.dispatchEvent(new SelectRelatedEvent(event.currentTarget.map)); + } + + _handleMouseoverMap(event) { + this.dispatchEvent( + new ToolTipEvent(event.currentTarget.map, event.currentTarget)); + } + + _handleToggleSubtree(event) { + event.stopImmediatePropagation(); + const node = event.currentTarget.parentElement; + const map = node.map; + event.target.classList.toggle('opened'); + const transitionsNode = node.parentElement.querySelector('.transitions'); + const subtransitionNodes = transitionsNode.children; + if (subtransitionNodes.length <= 1) { + // Add subtransitions except the one that's already shown. + let visibleTransitionMap = subtransitionNodes.length == 1 ? + transitionsNode.querySelector('.map').map : + undefined; + map.children.forEach((edge) => { + if (edge.to != visibleTransitionMap) { + this.currentNode = transitionsNode; + this._addSubtransitions(edge.to); } - return false; + }); + } else { + // remove all but the first (currently selected) subtransition + for (let i = subtransitionNodes.length - 1; i > 0; i--) { + transitionsNode.removeChild(subtransitionNodes[i]); } - }); + } + return false; + } +}); diff --git a/deps/v8/tools/system-analyzer/view/property-link-table-template.html b/deps/v8/tools/system-analyzer/view/property-link-table-template.html new file mode 100644 index 00000000000000..85f2cdc178caae --- /dev/null +++ b/deps/v8/tools/system-analyzer/view/property-link-table-template.html @@ -0,0 +1,39 @@ + + + + + + + +
+
+
\ No newline at end of file diff --git a/deps/v8/tools/system-analyzer/view/property-link-table.mjs b/deps/v8/tools/system-analyzer/view/property-link-table.mjs new file mode 100644 index 00000000000000..d2e2dce60bdb92 --- /dev/null +++ b/deps/v8/tools/system-analyzer/view/property-link-table.mjs @@ -0,0 +1,122 @@ +// 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. + +import {App} from '../index.mjs' +import {FocusEvent} from './events.mjs'; +import {DOM, ExpandableText, V8CustomElement} from './helper.mjs'; + +DOM.defineCustomElement( + 'view/property-link-table', + template => class PropertyLinkTable extends V8CustomElement { + _instance; + _propertyDict; + _instanceLinkButtons = false; + _logEntryClickHandler = this._handleLogEntryClick.bind(this); + _logEntryRelatedHandler = this._handleLogEntryRelated.bind(this); + _arrayValueSelectHandler = this._handleArrayValueSelect.bind(this); + + constructor() { + super(template); + } + + set instanceLinkButtons(newValue) { + this._instanceLinkButtons = newValue; + } + + set propertyDict(propertyDict) { + if (this._propertyDict === propertyDict) return; + this._propertyDict = propertyDict; + this.requestUpdate(); + } + + _update() { + this._fragment = new DocumentFragment(); + this._table = DOM.table('properties'); + for (let key in this._propertyDict) { + const value = this._propertyDict[key]; + this._addKeyValue(key, value); + } + this._addFooter(); + this._fragment.appendChild(this._table); + + const newContent = DOM.div(); + newContent.appendChild(this._fragment); + this.$('#content').replaceWith(newContent); + newContent.id = 'content'; + this._fragment = undefined; + } + + _addKeyValue(key, value) { + if (key == 'title') { + this._addTitle(value); + return; + } + if (key == '__this__') { + this._instance = value; + return; + } + const row = this._table.insertRow(); + row.insertCell().innerText = key; + const cell = row.insertCell(); + if (value == undefined) return; + if (Array.isArray(value)) { + cell.appendChild(this._addArrayValue(value)); + return; + } + if (App.isClickable(value)) { + cell.className = 'clickable'; + cell.onclick = this._logEntryClickHandler; + cell.data = value; + } + new ExpandableText(cell, value.toString()); + } + + _addArrayValue(array) { + if (array.length == 0) { + return DOM.text('empty'); + } else if (array.length > 200) { + return DOM.text(`${array.length} items`); + } + const select = DOM.element('select'); + select.onchange = this._arrayValueSelectHandler; + for (let value of array) { + const option = DOM.element('option'); + option.innerText = value.toString(); + option.data = value; + select.add(option); + } + return select; + } + + _addTitle(value) { + const title = DOM.element('h3'); + title.innerText = value; + this._fragment.appendChild(title); + } + + _addFooter() { + if (this._instance === undefined) return; + if (!this._instanceLinkButtons) return; + const td = this._table.createTFoot().insertRow().insertCell(); + td.colSpan = 2; + let showButton = + td.appendChild(DOM.button('Show', this._logEntryClickHandler)); + showButton.data = this._instance; + let showRelatedButton = td.appendChild( + DOM.button('Show Related', this._logEntryRelatedClickHandler)); + showRelatedButton.data = this._instance; + } + + _handleArrayValueSelect(event) { + const logEntry = event.currentTarget.selectedOptions[0].data; + this.dispatchEvent(new FocusEvent(logEntry)); + } + _handleLogEntryClick(event) { + this.dispatchEvent(new FocusEvent(event.currentTarget.data)); + } + + _handleLogEntryRelated(event) { + this.dispatchEvent(new SelectRelatedEvent(event.currentTarget.data)); + } + }); diff --git a/deps/v8/tools/system-analyzer/view/script-panel-template.html b/deps/v8/tools/system-analyzer/view/script-panel-template.html index ab5c3f95f35279..de3150366a5f6b 100644 --- a/deps/v8/tools/system-analyzer/view/script-panel-template.html +++ b/deps/v8/tools/system-analyzer/view/script-panel-template.html @@ -10,10 +10,6 @@ font-family: Consolas, monospace; } - .scriptNode:before { - counter-reset: sourceLineCounter; - } - .scriptNode span { counter-increment: sourceLineCounter 1; text-indent: -3.5em; diff --git a/deps/v8/tools/system-analyzer/view/script-panel.mjs b/deps/v8/tools/system-analyzer/view/script-panel.mjs index 6f5befcc16073b..23b4c03ec5b145 100644 --- a/deps/v8/tools/system-analyzer/view/script-panel.mjs +++ b/deps/v8/tools/system-analyzer/view/script-panel.mjs @@ -1,17 +1,21 @@ // Copyright 2020 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 {groupBy} from '../helper.mjs'; +import {defer, groupBy} from '../helper.mjs'; import {App} from '../index.mjs' import {SelectRelatedEvent, ToolTipEvent} from './events.mjs'; import {CollapsableElement, CSSColor, delay, DOM, formatBytes, gradientStopsFromGroups} from './helper.mjs'; +// A source mapping proxy for source maps that don't have CORS headers. +// TODO(leszeks): Make this configurable. +const sourceMapFetchPrefix = 'http://localhost:8080/'; + DOM.defineCustomElement('view/script-panel', (templateText) => class SourcePanel extends CollapsableElement { _selectedSourcePositions = []; - _sourcePositionsToMarkNodes = []; + _sourcePositionsToMarkNodesPromise = Promise.resolve([]); _scripts = []; _script; @@ -34,8 +38,13 @@ DOM.defineCustomElement('view/script-panel', set script(script) { if (this._script === script) return; this._script = script; - this._renderSourcePanel(); - this._updateScriptDropdownSelection(); + script.ensureSourceMapCalculated(sourceMapFetchPrefix); + this._sourcePositionsToMarkNodesPromise = defer(); + this.requestUpdate(); + } + + set focusedSourcePositions(sourcePositions) { + this.selectedSourcePositions = sourcePositions; } set selectedSourcePositions(sourcePositions) { @@ -45,10 +54,6 @@ DOM.defineCustomElement('view/script-panel', this._focusSelectedMarkers(); } - set focusedSourcePositions(sourcePositions) { - this.selectedSourcePositions = sourcePositions; - } - set scripts(scripts) { this._scripts = scripts; this._initializeScriptDropdown(); @@ -58,8 +63,13 @@ DOM.defineCustomElement('view/script-panel', return this.$('#script-dropdown'); } + _update() { + this._renderSourcePanel(); + this._updateScriptDropdownSelection(); + } + _initializeScriptDropdown() { - this._scripts.sort((a, b) => a.name.localeCompare(b.name)); + this._scripts.sort((a, b) => a.name?.localeCompare(b.name) ?? 0); let select = this.scriptDropdown; select.options.length = 0; for (const script of this._scripts) { @@ -70,6 +80,7 @@ DOM.defineCustomElement('view/script-panel', select.add(option); } } + _updateScriptDropdownSelection() { this.scriptDropdown.selectedIndex = this._script ? this._scripts.indexOf(this._script) : -1; @@ -77,15 +88,19 @@ DOM.defineCustomElement('view/script-panel', async _renderSourcePanel() { let scriptNode; - if (this._script) { + const script = this._script; + if (script) { await delay(1); + if (script != this._script) return; const builder = new LineBuilder(this, this._script); - scriptNode = builder.createScriptNode(); - this._sourcePositionsToMarkNodes = builder.sourcePositionToMarkers; + scriptNode = await builder.createScriptNode(this._script.startLine); + if (script != this._script) return; + this._sourcePositionsToMarkNodesPromise.resolve( + builder.sourcePositionToMarkers); } else { scriptNode = DOM.div(); this._selectedMarkNodes = undefined; - this._sourcePositionsToMarkNodes = new Map(); + this._sourcePositionsToMarkNodesPromise.resolve(new Map()); } const oldScriptNode = this.script.childNodes[1]; this.script.replaceChild(scriptNode, oldScriptNode); @@ -93,22 +108,24 @@ DOM.defineCustomElement('view/script-panel', async _focusSelectedMarkers() { await delay(100); + const sourcePositionsToMarkNodes = + await this._sourcePositionsToMarkNodesPromise; // Remove all marked nodes. - for (let markNode of this._sourcePositionsToMarkNodes.values()) { + for (let markNode of sourcePositionsToMarkNodes.values()) { markNode.className = ''; } for (let sourcePosition of this._selectedSourcePositions) { if (sourcePosition.script !== this._script) continue; - this._sourcePositionsToMarkNodes.get(sourcePosition).className = 'marked'; + sourcePositionsToMarkNodes.get(sourcePosition).className = 'marked'; } - this._scrollToFirstSourcePosition() + this._scrollToFirstSourcePosition(sourcePositionsToMarkNodes) } - _scrollToFirstSourcePosition() { + _scrollToFirstSourcePosition(sourcePositionsToMarkNodes) { const sourcePosition = this._selectedSourcePositions.find( each => each.script === this._script); if (!sourcePosition) return; - const markNode = this._sourcePositionsToMarkNodes.get(sourcePosition); + const markNode = sourcePositionsToMarkNodes.get(sourcePosition); markNode.scrollIntoView( {behavior: 'auto', block: 'center', inline: 'center'}); } @@ -130,19 +147,59 @@ DOM.defineCustomElement('view/script-panel', } handleSourcePositionMouseOver(e) { - const entries = e.target.sourcePosition.entries; + const sourcePosition = e.target.sourcePosition; + const entries = sourcePosition.entries; let text = groupBy(entries, each => each.constructor, true) .map(group => { - let text = `${group.key.name}: ${group.count}\n` + let text = `${group.key.name}: ${group.length}\n` text += groupBy(group.entries, each => each.type, true) .map(group => { - return ` - ${group.key}: ${group.count}`; + return ` - ${group.key}: ${group.length}`; }) .join('\n'); return text; }) .join('\n'); - this.dispatchEvent(new ToolTipEvent(text, e.target)); + + let sourceMapContent; + switch (this._script.sourceMapState) { + case 'loaded': { + const originalPosition = sourcePosition.originalPosition; + if (originalPosition.source === null) { + sourceMapContent = + DOM.element('i', {textContent: 'no source mapping for location'}); + } else { + sourceMapContent = DOM.element('a', { + href: `${originalPosition.source}`, + target: '_blank', + textContent: `${originalPosition.source}:${originalPosition.line}:${ + originalPosition.column}` + }); + } + break; + } + case 'loading': + sourceMapContent = + DOM.element('i', {textContent: 'source map still loading...'}); + break; + case 'failed': + sourceMapContent = + DOM.element('i', {textContent: 'source map failed to load'}); + break; + case 'none': + sourceMapContent = DOM.element('i', {textContent: 'no source map'}); + break; + default: + break; + } + + const toolTipContent = DOM.div({ + children: [ + DOM.element('pre', {className: 'textContent', textContent: text}), + sourceMapContent + ] + }); + this.dispatchEvent(new ToolTipEvent(toolTipContent, e.target)); } }); @@ -180,9 +237,9 @@ class SourcePositionIterator { } } -function* lineIterator(source) { +function* lineIterator(source, startLine) { let current = 0; - let line = 1; + let line = startLine; while (current < source.length) { const next = source.indexOf('\n', current); if (next === -1) break; @@ -209,37 +266,42 @@ class LineBuilder { _script; _clickHandler; _mouseoverHandler; - _sourcePositions; _sourcePositionToMarkers = new Map(); constructor(panel, script) { this._script = script; this._clickHandler = panel.handleSourcePositionClick.bind(panel); this._mouseoverHandler = panel.handleSourcePositionMouseOver.bind(panel); - // TODO: sort on script finalization. - script.sourcePositions.sort((a, b) => { - if (a.line === b.line) return a.column - b.column; - return a.line - b.line; - }); - this._sourcePositions = new SourcePositionIterator(script.sourcePositions); } get sourcePositionToMarkers() { return this._sourcePositionToMarkers; } - createScriptNode() { + async createScriptNode(startLine) { const scriptNode = DOM.div('scriptNode'); - for (let [lineIndex, line] of lineIterator(this._script.source)) { - scriptNode.appendChild(this._createLineNode(lineIndex, line)); + + // TODO: sort on script finalization. + this._script.sourcePositions.sort((a, b) => { + if (a.line === b.line) return a.column - b.column; + return a.line - b.line; + }); + + const sourcePositionsIterator = + new SourcePositionIterator(this._script.sourcePositions); + scriptNode.style.counterReset = `sourceLineCounter ${startLine - 1}`; + for (let [lineIndex, line] of lineIterator( + this._script.source, startLine)) { + scriptNode.appendChild( + this._createLineNode(sourcePositionsIterator, lineIndex, line)); } return scriptNode; } - _createLineNode(lineIndex, line) { + _createLineNode(sourcePositionsIterator, lineIndex, line) { const lineNode = DOM.span(); let columnIndex = 0; - for (const sourcePosition of this._sourcePositions.forLine(lineIndex)) { + for (const sourcePosition of sourcePositionsIterator.forLine(lineIndex)) { const nextColumnIndex = sourcePosition.column - 1; lineNode.appendChild(document.createTextNode( line.substring(columnIndex, nextColumnIndex))); @@ -263,10 +325,14 @@ class LineBuilder { marker.onmouseover = this._mouseoverHandler; const entries = sourcePosition.entries; - const stops = gradientStopsFromGroups( - entries.length, '%', groupBy(entries, entry => entry.constructor), - type => LineBuilder.colorMap.get(type)); - marker.style.backgroundImage = `linear-gradient(0deg,${stops.join(',')})` + const groups = groupBy(entries, entry => entry.constructor); + if (groups.length > 1) { + const stops = gradientStopsFromGroups( + entries.length, '%', groups, type => LineBuilder.colorMap.get(type)); + marker.style.backgroundImage = `linear-gradient(0deg,${stops.join(',')})` + } else { + marker.style.backgroundColor = LineBuilder.colorMap.get(groups[0].key) + } return marker; } diff --git a/deps/v8/tools/system-analyzer/view/timeline-panel-template.html b/deps/v8/tools/system-analyzer/view/timeline-panel-template.html index da0ce26380907c..6367e7e1aba3f8 100644 --- a/deps/v8/tools/system-analyzer/view/timeline-panel-template.html +++ b/deps/v8/tools/system-analyzer/view/timeline-panel-template.html @@ -18,10 +18,26 @@ width: 30px; background-color: var(--border-color); } + .titleButtons { + float: right; + } + .titleButtons button { + border-radius: 20px; + width: 20px; + height: 20px; + font-weight: bold; + line-height: 11px; + }
-

Timeline Panel

+

+ Timeline Panel +
+ + +
+

diff --git a/deps/v8/tools/system-analyzer/view/timeline-panel.mjs b/deps/v8/tools/system-analyzer/view/timeline-panel.mjs index 331db401e96db9..35d8f028931974 100644 --- a/deps/v8/tools/system-analyzer/view/timeline-panel.mjs +++ b/deps/v8/tools/system-analyzer/view/timeline-panel.mjs @@ -3,6 +3,9 @@ // found in the LICENSE file. import './timeline/timeline-track.mjs'; +import './timeline/timeline-track-map.mjs'; +import './timeline/timeline-track-tick.mjs'; +import './timeline/timeline-track-timer.mjs'; import {SynchronizeSelectionEvent} from './events.mjs'; import {DOM, V8CustomElement} from './helper.mjs'; @@ -16,11 +19,15 @@ DOM.defineCustomElement( this.addEventListener( SynchronizeSelectionEvent.name, e => this.handleSelectionSyncronization(e)); + this.$('#zoomIn').onclick = () => this.nofChunks *= 1.5; + this.$('#zoomOut').onclick = () => this.nofChunks /= 1.5; } set nofChunks(count) { + const time = this.currentTime for (const track of this.timelineTracks) { track.nofChunks = count; + track.currentTime = time; } } @@ -28,13 +35,16 @@ DOM.defineCustomElement( return this.timelineTracks[0].nofChunks; } + get currentTime() { + return this.timelineTracks[0].currentTime; + } + get timelineTracks() { return this.$('slot').assignedNodes().filter( node => node.nodeType === Node.ELEMENT_NODE); } handleTrackScroll(event) { - // TODO(zcankara) add forEachTrack helper method for (const track of this.timelineTracks) { track.scrollLeft = event.detail; } diff --git a/deps/v8/tools/system-analyzer/view/timeline/timeline-track-base.mjs b/deps/v8/tools/system-analyzer/view/timeline/timeline-track-base.mjs new file mode 100644 index 00000000000000..4faa8fc3aa8702 --- /dev/null +++ b/deps/v8/tools/system-analyzer/view/timeline/timeline-track-base.mjs @@ -0,0 +1,621 @@ +// Copyright 2020 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 {delay} from '../../helper.mjs'; +import {kChunkHeight, kChunkVisualWidth, kChunkWidth} from '../../log/map.mjs'; +import {SelectionEvent, SelectTimeEvent, SynchronizeSelectionEvent, ToolTipEvent,} from '../events.mjs'; +import {CSSColor, DOM, formatDurationMicros, SVG, V8CustomElement} from '../helper.mjs'; + +export const kTimelineHeight = 200; + +export class TimelineTrackBase extends V8CustomElement { + _timeline; + _nofChunks = 500; + _chunks = []; + _selectedEntry; + _focusedEntry; + _timeToPixel; + _timeStartPixelOffset; + _legend; + _lastContentWidth = 0; + + _cachedTimelineBoundingClientRect; + _cachedTimelineScrollLeft; + + constructor(templateText) { + super(templateText); + this._selectionHandler = new SelectionHandler(this); + this._legend = new Legend(this.$('#legendTable')); + this._legend.onFilter = (type) => this._handleFilterTimeline(); + + this.timelineChunks = this.$('#timelineChunks'); + this.timelineSamples = this.$('#timelineSamples'); + this.timelineNode = this.$('#timeline'); + this.toolTipTargetNode = this.$('#toolTipTarget'); + this.hitPanelNode = this.$('#hitPanel'); + this.timelineAnnotationsNode = this.$('#timelineAnnotations'); + this.timelineMarkersNode = this.$('#timelineMarkers'); + this._scalableContentNode = this.$('#scalableContent'); + + this.timelineNode.addEventListener( + 'scroll', e => this._handleTimelineScroll(e)); + this.hitPanelNode.onclick = this._handleClick.bind(this); + this.hitPanelNode.ondblclick = this._handleDoubleClick.bind(this); + this.hitPanelNode.onmousemove = this._handleMouseMove.bind(this); + window.addEventListener('resize', () => this._resetCachedDimensions()); + this.isLocked = false; + } + + static get observedAttributes() { + return ['title']; + } + + attributeChangedCallback(name, oldValue, newValue) { + if (name == 'title') { + this.$('#title').innerHTML = newValue; + } + } + + _handleFilterTimeline(type) { + this._updateChunks(); + } + + set data(timeline) { + this._timeline = timeline; + this._legend.timeline = timeline; + this.$('.content').style.display = timeline.isEmpty() ? 'none' : 'relative'; + this._updateChunks(); + } + + set timeSelection(selection) { + this._selectionHandler.timeSelection = selection; + this.updateSelection(); + } + + updateSelection() { + this._selectionHandler.update(); + this._legend.update(); + } + + get _timelineBoundingClientRect() { + if (this._cachedTimelineBoundingClientRect === undefined) { + this._cachedTimelineBoundingClientRect = + this.timelineNode.getBoundingClientRect(); + } + return this._cachedTimelineBoundingClientRect; + } + + get _timelineScrollLeft() { + if (this._cachedTimelineScrollLeft === undefined) { + this._cachedTimelineScrollLeft = this.timelineNode.scrollLeft; + } + return this._cachedTimelineScrollLeft; + } + + _resetCachedDimensions() { + this._cachedTimelineBoundingClientRect = undefined; + this._cachedTimelineScrollLeft = undefined; + } + + // Maps the clicked x position to the x position on timeline + positionOnTimeline(pagePosX) { + let rect = this._timelineBoundingClientRect; + let posClickedX = pagePosX - rect.left + this._timelineScrollLeft; + return posClickedX; + } + + positionToTime(pagePosX) { + return this.relativePositionToTime(this.positionOnTimeline(pagePosX)); + } + + relativePositionToTime(timelineRelativeX) { + const timelineAbsoluteX = timelineRelativeX + this._timeStartPixelOffset; + return (timelineAbsoluteX / this._timeToPixel) | 0; + } + + timeToPosition(time) { + let relativePosX = time * this._timeToPixel; + relativePosX -= this._timeStartPixelOffset; + return relativePosX; + } + + set nofChunks(count) { + this._nofChunks = count | 0; + this._updateChunks(); + } + + get nofChunks() { + return this._nofChunks; + } + + _updateChunks() { + this._chunks = undefined; + this._updateDimensions(); + this.requestUpdate(); + } + + get chunks() { + return this._chunks; + } + + set selectedEntry(value) { + this._selectedEntry = value; + this.drawAnnotations(value); + } + + get selectedEntry() { + return this._selectedEntry; + } + + set scrollLeft(offset) { + this.timelineNode.scrollLeft = offset; + this._cachedTimelineScrollLeft = offset; + } + + handleEntryTypeDoubleClick(e) { + this.dispatchEvent(new SelectionEvent(e.target.parentNode.entries)); + } + + timelineIndicatorMove(offset) { + this.timelineNode.scrollLeft += offset; + this._cachedTimelineScrollLeft = undefined; + } + + _handleTimelineScroll(e) { + let scrollLeft = e.currentTarget.scrollLeft; + this._cachedTimelineScrollLeft = scrollLeft; + this.dispatchEvent(new CustomEvent( + 'scrolltrack', {bubbles: true, composed: true, detail: scrollLeft})); + } + + _updateDimensions() { + const centerOffset = this._timelineBoundingClientRect.width / 2; + const time = + this.relativePositionToTime(this._timelineScrollLeft + centerOffset); + const start = this._timeline.startTime; + const width = this._nofChunks * kChunkWidth; + this._lastContentWidth = parseInt(this.timelineMarkersNode.style.width); + this._timeToPixel = width / this._timeline.duration(); + this._timeStartPixelOffset = start * this._timeToPixel; + this.timelineChunks.style.width = `${width}px`; + this.timelineMarkersNode.style.width = `${width}px`; + this.timelineAnnotationsNode.style.width = `${width}px`; + this.hitPanelNode.style.width = `${width}px`; + this._drawMarkers(); + this._selectionHandler.update(); + this._scaleContent(width); + this._cachedTimelineScrollLeft = this.timelineNode.scrollLeft = + this.timeToPosition(time) - centerOffset; + } + + _scaleContent(currentWidth) { + if (!this._lastContentWidth) return; + const ratio = currentWidth / this._lastContentWidth; + this._scalableContentNode.style.transform = `scale(${ratio}, 1)`; + } + + _adjustHeight(height) { + const dataHeight = Math.max(height, 200); + const viewHeight = Math.min(dataHeight, 400); + this.style.setProperty('--data-height', dataHeight + 'px'); + this.style.setProperty('--view-height', viewHeight + 'px'); + this.timelineNode.style.overflowY = + (height > kTimelineHeight) ? 'scroll' : 'hidden'; + } + + _update() { + this._legend.update(); + this._drawContent(); + this._drawAnnotations(this.selectedEntry); + this._resetCachedDimensions(); + } + + async _drawContent() { + await delay(5); + if (this._timeline.isEmpty()) return; + if (this.chunks?.length != this.nofChunks) { + this._chunks = + this._timeline.chunks(this.nofChunks, this._legend.filterPredicate); + console.assert(this._chunks.length == this._nofChunks); + } + const chunks = this.chunks; + const max = chunks.max(each => each.size()); + let buffer = ''; + for (let i = 0; i < chunks.length; i++) { + const chunk = chunks[i]; + const height = (chunk.size() / max * kChunkHeight); + chunk.height = height; + if (chunk.isEmpty()) continue; + buffer += ''; + buffer += this._drawChunk(i, chunk); + buffer += '' + } + this._scalableContentNode.innerHTML = buffer; + this._scalableContentNode.style.transform = 'scale(1, 1)'; + } + + _drawChunk(chunkIndex, chunk) { + const groups = chunk.getBreakdown(event => event.type); + let buffer = ''; + const kHeight = chunk.height; + let lastHeight = kTimelineHeight; + for (let i = 0; i < groups.length; i++) { + const group = groups[i]; + if (group.length == 0) break; + const height = (group.length / chunk.size() * kHeight) | 0; + lastHeight -= height; + const color = this._legend.colorForType(group.key); + buffer += `` + } + return buffer; + } + + _drawMarkers() { + // Put a time marker roughly every 20 chunks. + const expected = this._timeline.duration() / this._nofChunks * 20; + let interval = (10 ** Math.floor(Math.log10(expected))); + let correction = Math.log10(expected / interval); + correction = (correction < 0.33) ? 1 : (correction < 0.75) ? 2.5 : 5; + interval *= correction; + + const start = this._timeline.startTime; + let time = start; + let buffer = ''; + while (time < this._timeline.endTime) { + const delta = time - start; + const text = `${(delta / 1000) | 0} ms`; + const x = (delta * this._timeToPixel) | 0; + buffer += `${text}` + buffer += + `` + time += interval; + } + this.timelineMarkersNode.innerHTML = buffer; + } + + _drawAnnotations(logEntry, time) { + if (!this._focusedEntry) return; + this._drawEntryMark(this._focusedEntry); + } + + _drawEntryMark(entry) { + const [x, y] = this._positionForEntry(entry); + const color = this._legend.colorForType(entry.type); + const mark = + ``; + this.timelineAnnotationsNode.innerHTML = mark; + } + + _handleUnlockedMouseEvent(event) { + this._focusedEntry = this._getEntryForEvent(event); + if (!this._focusedEntry) return false; + this._updateToolTip(event); + const time = this.positionToTime(event.pageX); + this._drawAnnotations(this._focusedEntry, time); + } + + _updateToolTip(event) { + if (!this._focusedEntry) return false; + this.dispatchEvent( + new ToolTipEvent(this._focusedEntry, this.toolTipTargetNode)); + event.stopImmediatePropagation(); + } + + _handleClick(event) { + if (event.button !== 0) return; + if (event.target === this.timelineChunks) return; + this.isLocked = !this.isLocked; + // Do this unconditionally since we want the tooltip to be update to the + // latest locked state. + this._handleUnlockedMouseEvent(event); + return false; + } + + _handleDoubleClick(event) { + if (event.button !== 0) return; + this._selectionHandler.clearSelection(); + const time = this.positionToTime(event.pageX); + const chunk = this._getChunkForEvent(event) + if (!chunk) return; + event.stopImmediatePropagation(); + this.dispatchEvent(new SelectTimeEvent(chunk.start, chunk.end)); + return false; + } + + _handleMouseMove(event) { + if (event.button !== 0) return; + if (this._selectionHandler.isSelecting) return false; + if (this.isLocked && this._focusedEntry) { + this._updateToolTip(event); + return false; + } + this._handleUnlockedMouseEvent(event); + } + + _getChunkForEvent(event) { + const time = this.positionToTime(event.pageX); + return this._chunkForTime(time); + } + + _chunkForTime(time) { + const chunkIndex = ((time - this._timeline.startTime) / + this._timeline.duration() * this._nofChunks) | + 0; + return this.chunks[chunkIndex]; + } + + _positionForEntry(entry) { + const chunk = this._chunkForTime(entry.time); + if (chunk === undefined) return [-1, -1]; + const xFrom = (chunk.index * kChunkWidth + kChunkVisualWidth / 2) | 0; + const yFrom = kTimelineHeight - chunk.yOffset(entry) | 0; + return [xFrom, yFrom]; + } + + _getEntryForEvent(event) { + const chunk = this._getChunkForEvent(event); + if (chunk?.isEmpty() ?? true) return false; + const relativeIndex = Math.round( + (kTimelineHeight - event.layerY) / chunk.height * (chunk.size() - 1)); + if (relativeIndex > chunk.size()) return false; + const logEntry = chunk.at(relativeIndex); + const style = this.toolTipTargetNode.style; + style.left = `${chunk.index * kChunkWidth}px`; + style.top = `${kTimelineHeight - chunk.height}px`; + style.height = `${chunk.height}px`; + style.width = `${kChunkVisualWidth}px`; + return logEntry; + } +}; + +class SelectionHandler { + // TODO turn into static field once Safari supports it. + static get SELECTION_OFFSET() { + return 10 + }; + + _timeSelection = {start: -1, end: Infinity}; + _selectionOriginTime = -1; + + constructor(timeline) { + this._timeline = timeline; + this._timelineNode.addEventListener( + 'mousedown', e => this._handleTimeSelectionMouseDown(e)); + this._timelineNode.addEventListener( + 'mouseup', e => this._handleTimeSelectionMouseUp(e)); + this._timelineNode.addEventListener( + 'mousemove', e => this._handleTimeSelectionMouseMove(e)); + } + + update() { + if (!this.hasSelection) { + this._selectionNode.style.display = 'none'; + return; + } + this._selectionNode.style.display = 'inherit'; + const startPosition = this.timeToPosition(this._timeSelection.start); + const endPosition = this.timeToPosition(this._timeSelection.end); + this._leftHandleNode.style.left = startPosition + 'px'; + this._rightHandleNode.style.left = endPosition + 'px'; + const delta = endPosition - startPosition; + const selectionNode = this._selectionBackgroundNode; + selectionNode.style.left = startPosition + 'px'; + selectionNode.style.width = delta + 'px'; + } + + set timeSelection(selection) { + this._timeSelection.start = selection.start; + this._timeSelection.end = selection.end; + } + + clearSelection() { + this._timeline.dispatchEvent(new SelectTimeEvent()); + } + + timeToPosition(posX) { + return this._timeline.timeToPosition(posX); + } + + positionToTime(posX) { + return this._timeline.positionToTime(posX); + } + + get isSelecting() { + return this._selectionOriginTime >= 0; + } + + get hasSelection() { + return this._timeSelection.start >= 0 && + this._timeSelection.end != Infinity; + } + + get _timelineNode() { + return this._timeline.$('#timeline'); + } + + get _selectionNode() { + return this._timeline.$('#selection'); + } + + get _selectionBackgroundNode() { + return this._timeline.$('#selectionBackground'); + } + + get _leftHandleNode() { + return this._timeline.$('#leftHandle'); + } + + get _rightHandleNode() { + return this._timeline.$('#rightHandle'); + } + + get _leftHandlePosX() { + return this._leftHandleNode.getBoundingClientRect().x; + } + + get _rightHandlePosX() { + return this._rightHandleNode.getBoundingClientRect().x; + } + + _isOnLeftHandle(posX) { + return Math.abs(this._leftHandlePosX - posX) <= + SelectionHandler.SELECTION_OFFSET; + } + + _isOnRightHandle(posX) { + return Math.abs(this._rightHandlePosX - posX) <= + SelectionHandler.SELECTION_OFFSET; + } + + _handleTimeSelectionMouseDown(event) { + if (event.button !== 0) return; + let xPosition = event.clientX + // Update origin time in case we click on a handle. + if (this._isOnLeftHandle(xPosition)) { + xPosition = this._rightHandlePosX; + } + else if (this._isOnRightHandle(xPosition)) { + xPosition = this._leftHandlePosX; + } + this._selectionOriginTime = this.positionToTime(xPosition); + } + + _handleTimeSelectionMouseMove(event) { + if (event.button !== 0) return; + if (!this.isSelecting) return; + const currentTime = this.positionToTime(event.clientX); + this._timeline.dispatchEvent(new SynchronizeSelectionEvent( + Math.min(this._selectionOriginTime, currentTime), + Math.max(this._selectionOriginTime, currentTime))); + } + + _handleTimeSelectionMouseUp(event) { + if (event.button !== 0) return; + this._selectionOriginTime = -1; + if (this._timeSelection.start === -1) return; + const delta = this._timeSelection.end - this._timeSelection.start; + if (delta <= 1 || isNaN(delta)) return; + this._timeline.dispatchEvent(new SelectTimeEvent( + this._timeSelection.start, this._timeSelection.end)); + } +} + +class Legend { + _timeline; + _typesFilters = new Map(); + _typeClickHandler = this._handleTypeClick.bind(this); + _filterPredicate = this.filter.bind(this); + onFilter = () => {}; + + constructor(table) { + this._table = table; + this._enableDuration = false; + } + + set timeline(timeline) { + this._timeline = timeline; + const groups = timeline.getBreakdown(); + this._typesFilters = new Map(groups.map(each => [each.key, true])); + this._colors = + new Map(groups.map(each => [each.key, CSSColor.at(each.id)])); + } + + get selection() { + return this._timeline.selectionOrSelf; + } + + get filterPredicate() { + for (let visible of this._typesFilters.values()) { + if (!visible) return this._filterPredicate; + } + return undefined; + } + + colorForType(type) { + let color = this._colors.get(type); + if (color === undefined) { + color = CSSColor.at(this._colors.size); + this._colors.set(type, color); + } + return color; + } + + filter(logEntry) { + return this._typesFilters.get(logEntry.type); + } + + update() { + const tbody = DOM.tbody(); + const missingTypes = new Set(this._typesFilters.keys()); + this._checkDurationField(); + this.selection.getBreakdown(undefined, this._enableDuration) + .forEach(group => { + tbody.appendChild(this._addTypeRow(group)); + missingTypes.delete(group.key); + }); + missingTypes.forEach(key => tbody.appendChild(this._row('', key, 0, '0%'))); + if (this._timeline.selection) { + tbody.appendChild( + this._row('', 'Selection', this.selection.length, '100%')); + } + tbody.appendChild(this._row('', 'All', this._timeline.length, '')); + this._table.tBodies[0].replaceWith(tbody); + } + + _checkDurationField() { + if (this._enableDuration) return; + const example = this.selection.at(0); + if (!example || !('duration' in example)) return; + this._enableDuration = true; + this._table.tHead.appendChild(DOM.td('Duration')); + this._table.tHead.appendChild(DOM.td('')); + } + + _row(colorNode, type, count, countPercent, duration, durationPercent) { + const row = DOM.tr(); + row.appendChild(DOM.td(colorNode)); + const typeCell = row.appendChild(DOM.td(type)); + typeCell.setAttribute('title', type); + row.appendChild(DOM.td(count.toString())); + row.appendChild(DOM.td(countPercent)); + if (this._enableDuration) { + row.appendChild(DOM.td(formatDurationMicros(duration ?? 0))); + row.appendChild(DOM.td(durationPercent ?? '0%')); + } + return row + } + + _addTypeRow(group) { + const color = this.colorForType(group.key); + const colorDiv = DOM.div('colorbox'); + if (this._typesFilters.get(group.key)) { + colorDiv.style.backgroundColor = color; + } else { + colorDiv.style.borderColor = color; + colorDiv.style.backgroundColor = CSSColor.backgroundImage; + } + let duration = 0; + if (this._enableDuration) { + const entries = group.entries; + for (let i = 0; i < entries.length; i++) { + duration += entries[i].duration; + } + } + let countPercent = + `${(group.length / this.selection.length * 100).toFixed(1)}%`; + const row = this._row( + colorDiv, group.key, group.length, countPercent, duration, ''); + row.className = 'clickable'; + row.onclick = this._typeClickHandler; + row.data = group.key; + return row; + } + + _handleTypeClick(e) { + const type = e.currentTarget.data; + this._typesFilters.set(type, !this._typesFilters.get(type)); + this.onFilter(type); + } +} diff --git a/deps/v8/tools/system-analyzer/view/timeline/timeline-track-map.mjs b/deps/v8/tools/system-analyzer/view/timeline/timeline-track-map.mjs new file mode 100644 index 00000000000000..639acc03123bb7 --- /dev/null +++ b/deps/v8/tools/system-analyzer/view/timeline/timeline-track-map.mjs @@ -0,0 +1,138 @@ +// 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. + +import {kChunkVisualWidth, MapLogEntry} from '../../log/map.mjs'; +import {CSSColor, DOM} from '../helper.mjs'; + +import {TimelineTrackBase} from './timeline-track-base.mjs' + +DOM.defineCustomElement('view/timeline/timeline-track', 'timeline-track-map', + (templateText) => + class TimelineTrackMap extends TimelineTrackBase { + constructor() { + super(templateText); + } + + getMapStyle(map) { + return map.edge && map.edge.from ? CSSColor.onBackgroundColor : + CSSColor.onPrimaryColor; + } + + markMap(map) { + const [x, y] = map.position(this.chunks); + const strokeColor = this.getMapStyle(map); + return `` + } + + markSelectedMap(map) { + const [x, y] = map.position(this.chunks); + const strokeColor = this.getMapStyle(map); + return `` + } + + _drawAnnotations(logEntry, time) { + if (!(logEntry instanceof MapLogEntry)) return; + if (!logEntry.edge) { + this.timelineAnnotationsNode.innerHTML = ''; + return; + } + // Draw the trace of maps in reverse order to make sure the outgoing + // transitions of previous maps aren't drawn over. + const kOpaque = 1.0; + let stack = []; + let current = logEntry; + while (current !== undefined) { + stack.push(current); + current = current.parent; + } + + // Draw outgoing refs as fuzzy background. Skip the last map entry. + let buffer = ''; + let nofEdges = 0; + const kMaxOutgoingEdges = 100; + for (let i = stack.length - 2; i >= 0; i--) { + const map = stack[i].parent; + nofEdges += map.children.length; + if (nofEdges > kMaxOutgoingEdges) break; + buffer += this.drawOutgoingEdges(map, 0.4, 1); + } + + // Draw main connection. + let labelOffset = 15; + let xPrev = 0; + for (let i = stack.length - 1; i >= 0; i--) { + let map = stack[i]; + if (map.edge) { + const [xTo, data] = this.drawEdge(map.edge, kOpaque, labelOffset); + buffer += data; + if (xTo == xPrev) { + labelOffset += 10; + } else { + labelOffset = 15 + } + xPrev = xTo; + } + buffer += this.markMap(map); + } + + buffer += this.drawOutgoingEdges(logEntry, 0.9, 3); + // Mark selected map + buffer += this.markSelectedMap(logEntry); + this.timelineAnnotationsNode.innerHTML = buffer; + } + + drawEdge(edge, opacity, labelOffset = 20) { + let buffer = ''; + if (!edge.from || !edge.to) return [-1, buffer]; + const [xFrom, yFrom] = edge.from.position(this.chunks); + const [xTo, yTo] = edge.to.position(this.chunks); + const sameChunk = xTo == xFrom; + if (sameChunk) labelOffset += 10; + const color = this._legend.colorForType(edge.type); + const offsetX = 20; + const midX = xFrom + (xTo - xFrom) / 2; + const midY = (yFrom + yTo) / 2 - 100; + if (!sameChunk) { + if (opacity == 1.0) { + buffer += `` + } + buffer += `` + } else { + if (opacity == 1.0) { + buffer += ``; + } + buffer += ``; + } + if (opacity == 1.0) { + const centerX = sameChunk ? xTo : ((xFrom / 2 + midX + xTo / 2) / 2) | 0; + const centerY = sameChunk ? yTo : ((yFrom / 2 + midY + yTo / 2) / 2) | 0; + const centerYTo = centerY - labelOffset; + buffer += ``; + buffer += `${ + edge.toString()}`; + } + return [xTo, buffer]; + } + + drawOutgoingEdges(map, opacity = 1.0, max = 10, depth = 0) { + let buffer = ''; + if (!map || depth >= max) return buffer; + const limit = Math.min(map.children.length, 100) + for (let i = 0; i < limit; i++) { + const edge = map.children[i]; + const [xTo, data] = this.drawEdge(edge, opacity); + buffer += data; + buffer += this.drawOutgoingEdges(edge.to, opacity * 0.5, max, depth + 1); + } + return buffer; + } +}) \ No newline at end of file diff --git a/deps/v8/tools/system-analyzer/view/timeline/timeline-track-stacked-base.mjs b/deps/v8/tools/system-analyzer/view/timeline/timeline-track-stacked-base.mjs new file mode 100644 index 00000000000000..24b389b95965d5 --- /dev/null +++ b/deps/v8/tools/system-analyzer/view/timeline/timeline-track-stacked-base.mjs @@ -0,0 +1,144 @@ +// 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. + +import {delay} from '../../helper.mjs'; +import {Timeline} from '../../timeline.mjs'; +import {SelectTimeEvent} from '../events.mjs'; +import {CSSColor, DOM, SVG} from '../helper.mjs'; + +import {TimelineTrackBase} from './timeline-track-base.mjs' + +const kItemHeight = 8; + +export class TimelineTrackStackedBase extends TimelineTrackBase { + _originalContentWidth = 0; + _drawableItems = new Timeline(); + + _updateChunks() { + // We don't need to update the chunks here. + this._updateDimensions(); + this.requestUpdate(); + } + + set data(timeline) { + super.data = timeline; + this._contentWidth = 0; + this._prepareDrawableItems(); + } + + _handleDoubleClick(event) { + if (event.button !== 0) return; + this._selectionHandler.clearSelection(); + const item = this._getDrawableItemForEvent(event); + if (item === undefined) return; + event.stopImmediatePropagation(); + this.dispatchEvent(new SelectTimeEvent(item.startTime, item.endTime)); + return false; + } + + _getStackDepthForEvent(event) { + return Math.floor(event.layerY / kItemHeight) - 1; + } + + _getDrawableItemForEvent(event) { + const depth = this._getStackDepthForEvent(event); + const time = this.positionToTime(event.pageX); + const index = this._drawableItems.find(time); + for (let i = index - 1; i > 0; i--) { + const item = this._drawableItems.at(i); + if (item.depth != depth) continue; + if (item.endTime < time) continue; + return item; + } + return undefined; + } + + _drawableItemToLogEntry(item) { + return item; + } + + _getEntryForEvent(event) { + const item = this._getDrawableItemForEvent(event); + const logEntry = this._drawableItemToLogEntry(item); + if (item === undefined) return undefined; + const style = this.toolTipTargetNode.style; + style.left = `${event.layerX}px`; + style.top = `${(item.depth + 1) * kItemHeight}px`; + style.height = `${kItemHeight}px` + return logEntry; + } + + _prepareDrawableItems() { + // Subclass responsibility. + } + + _adjustStackDepth(maxDepth) { + // Account for empty top line + maxDepth++; + this._adjustHeight(maxDepth * kItemHeight); + } + + _scaleContent(currentWidth) { + if (this._originalContentWidth == 0) return; + // Instead of repainting just scale the content. + const ratio = currentWidth / this._originalContentWidth; + this._scalableContentNode.style.transform = `scale(${ratio}, 1)`; + this.style.setProperty('--txt-scale', `scale(${1 / ratio}, 1)`); + } + + async _drawContent() { + if (this._originalContentWidth > 0) return; + this._originalContentWidth = parseInt(this.timelineMarkersNode.style.width); + this._scalableContentNode.innerHTML = ''; + let buffer = ''; + const add = async () => { + const svg = SVG.svg(); + svg.innerHTML = buffer; + this._scalableContentNode.appendChild(svg); + buffer = ''; + await delay(50); + }; + const items = this._drawableItems.values; + for (let i = 0; i < items.length; i++) { + if ((i % 3000) == 0) await add(); + buffer += this._drawItem(items[i], i); + } + add(); + } + + _drawItem(item, i, outline = false) { + const x = this.timeToPosition(item.time); + const y = (item.depth + 1) * kItemHeight; + let width = item.duration * this._timeToPixel; + if (outline) { + return ``; + } + let color = this._legend.colorForType(item.type); + if (i % 2 == 1) { + color = CSSColor.darken(color, 20); + } + return ``; + } + + _drawItemText(item) { + const type = item.type; + const kHeight = 9; + const x = this.timeToPosition(item.time); + const y = item.depth * (kHeight + 1); + let width = item.duration * this._timeToPixel; + width -= width * 0.1; + + let buffer = ''; + if (width < 15 || type == 'Other') return buffer; + const rawName = item.entry.getName(); + if (rawName.length == 0) return buffer; + const kChartWidth = 5; + const maxChars = Math.floor(width / kChartWidth) + const text = rawName.substr(0, maxChars); + buffer += `${text}` + return buffer; + } +} \ No newline at end of file diff --git a/deps/v8/tools/system-analyzer/view/timeline/timeline-track-template.html b/deps/v8/tools/system-analyzer/view/timeline/timeline-track-template.html index bcab2d53490595..911476360656d2 100644 --- a/deps/v8/tools/system-analyzer/view/timeline/timeline-track-template.html +++ b/deps/v8/tools/system-analyzer/view/timeline/timeline-track-template.html @@ -6,61 +6,37 @@ +
@@ -180,23 +206,29 @@

-
+
-
Frequency
-
- + + + + + +
+ +
+ - + diff --git a/deps/v8/tools/system-analyzer/view/timeline/timeline-track-tick.mjs b/deps/v8/tools/system-analyzer/view/timeline/timeline-track-tick.mjs new file mode 100644 index 00000000000000..502504beb485f4 --- /dev/null +++ b/deps/v8/tools/system-analyzer/view/timeline/timeline-track-tick.mjs @@ -0,0 +1,201 @@ +// 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. + +import {delay} from '../../helper.mjs'; +import {TickLogEntry} from '../../log/tick.mjs'; +import {Timeline} from '../../timeline.mjs'; +import {DOM, SVG} from '../helper.mjs'; + +import {TimelineTrackStackedBase} from './timeline-track-stacked-base.mjs' + +class Flame { + constructor(time, logEntry, depth) { + this._time = time; + this._logEntry = logEntry; + this.depth = depth; + this._duration = -1; + this.parent = undefined; + this.children = []; + } + + static add(time, logEntry, stack, flames) { + const depth = stack.length; + const newFlame = new Flame(time, logEntry, depth) + if (depth > 0) { + const parent = stack[depth - 1]; + newFlame.parent = parent; + parent.children.push(newFlame); + } + flames.push(newFlame); + stack.push(newFlame); + } + + stop(time) { + if (this._duration !== -1) throw new Error('Already stopped'); + this._duration = time - this._time + } + + get time() { + return this._time; + } + + get logEntry() { + return this._logEntry; + } + + get startTime() { + return this._time; + } + + get endTime() { + return this._time + this._duration; + } + + get duration() { + return this._duration; + } + + get type() { + return TickLogEntry.extractCodeEntryType(this._logEntry?.entry); + } +} + +DOM.defineCustomElement( + 'view/timeline/timeline-track', 'timeline-track-tick', + (templateText) => class TimelineTrackTick extends TimelineTrackStackedBase { + constructor() { + super(templateText); + this._annotations = new Annotations(this); + } + + _prepareDrawableItems() { + const tmpFlames = []; + // flameStack = [bottom, ..., top]; + const flameStack = []; + const ticks = this._timeline.values; + let maxDepth = 0; + + for (let tickIndex = 0; tickIndex < ticks.length; tickIndex++) { + const tick = ticks[tickIndex]; + const tickStack = tick.stack; + maxDepth = Math.max(maxDepth, tickStack.length); + // tick.stack = [top, .... , bottom]; + for (let stackIndex = tickStack.length - 1; stackIndex >= 0; + stackIndex--) { + const codeEntry = tickStack[stackIndex]; + // codeEntry is either a CodeEntry or a raw pc. + const logEntry = codeEntry?.logEntry; + const flameStackIndex = tickStack.length - stackIndex - 1; + if (flameStackIndex < flameStack.length) { + if (flameStack[flameStackIndex].logEntry === logEntry) continue; + for (let k = flameStackIndex; k < flameStack.length; k++) { + flameStack[k].stop(tick.time); + } + flameStack.length = flameStackIndex; + } + Flame.add(tick.time, logEntry, flameStack, tmpFlames); + } + if (tickStack.length < flameStack.length) { + for (let k = tickStack.length; k < flameStack.length; k++) { + flameStack[k].stop(tick.time); + } + flameStack.length = tickStack.length; + } + } + const lastTime = ticks[ticks.length - 1].time; + for (let k = 0; k < flameStack.length; k++) { + flameStack[k].stop(lastTime); + } + this._drawableItems = new Timeline(Flame, tmpFlames); + this._annotations.flames = this._drawableItems; + this._adjustStackDepth(maxDepth); + } + + _drawAnnotations(logEntry, time) { + if (time === undefined) { + time = this.relativePositionToTime(this._timelineScrollLeft); + } + this._annotations.update(logEntry, time); + } + + _drawableItemToLogEntry(flame) { + const logEntry = flame?.logEntry; + if (logEntry === undefined || typeof logEntry == 'number') + return undefined; + return logEntry; + } + }) + +class Annotations { + _flames; + _logEntry; + _buffer; + + constructor(track) { + this._track = track; + } + + set flames(flames) { + this._flames = flames; + } + + get _node() { + return this._track.timelineAnnotationsNode; + } + + async update(logEntry, time) { + if (this._logEntry == logEntry) return; + this._logEntry = logEntry; + this._node.innerHTML = ''; + if (logEntry === undefined) return; + this._buffer = ''; + const start = this._flames.find(time); + let offset = 0; + // Draw annotations gradually outwards starting form the given time. + let deadline = performance.now() + 500; + for (let range = 0; range < this._flames.length; range += 10000) { + this._markFlames(start - range, start - offset); + this._markFlames(start + offset, start + range); + offset = range; + if ((navigator?.scheduling?.isInputPending({includeContinuous: true}) ?? + false) || + performance.now() >= deadline) { + // Yield if we have to handle an input event, or we're out of time. + await delay(50); + // Abort if we started another update asynchronously. + if (this._logEntry != logEntry) return; + + deadline = performance.now() + 500; + } + this._drawBuffer(); + } + this._drawBuffer(); + } + + _markFlames(start, end) { + const rawFlames = this._flames.values; + if (start < 0) start = 0; + if (end > rawFlames.length) end = rawFlames.length; + const logEntry = this._logEntry; + // Also compare against the function, if any. + const func = logEntry.entry?.func; + for (let i = start; i < end; i++) { + const flame = rawFlames[i]; + if (!flame.entry) continue; + if (flame.entry.logEntry !== logEntry && + (!func || flame.entry.func !== func)) { + continue; + } + this._buffer += this._track.drawFlame(flame, i, true); + } + } + + _drawBuffer() { + if (this._buffer.length == 0) return; + const svg = SVG.svg(); + svg.innerHTML = this._buffer; + this._node.appendChild(svg); + this._buffer = ''; + } +} \ No newline at end of file diff --git a/deps/v8/tools/system-analyzer/view/timeline/timeline-track-timer.mjs b/deps/v8/tools/system-analyzer/view/timeline/timeline-track-timer.mjs new file mode 100644 index 00000000000000..62ee07aff7d2d7 --- /dev/null +++ b/deps/v8/tools/system-analyzer/view/timeline/timeline-track-timer.mjs @@ -0,0 +1,41 @@ +// 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. + +import {CSSColor, DOM, SVG, V8CustomElement} from '../helper.mjs'; + +import {TimelineTrackBase} from './timeline-track-base.mjs' +import {TimelineTrackStackedBase} from './timeline-track-stacked-base.mjs' + +DOM.defineCustomElement( + 'view/timeline/timeline-track', 'timeline-track-timer', + (templateText) => + class TimelineTrackTimer extends TimelineTrackStackedBase { + constructor() { + super(templateText); + } + + _prepareDrawableItems() { + const stack = []; + let maxDepth = 0; + for (let i = 0; i < this._timeline.length; i++) { + const timer = this._timeline.at(i); + let insertDepth = -1; + for (let depth = 0; depth < stack.length; depth++) { + const pendingTimer = stack[depth]; + if (pendingTimer === undefined) { + if (insertDepth === -1) insertDepth = depth; + } else if (pendingTimer.endTime <= timer.startTime) { + stack[depth] == undefined; + if (insertDepth === -1) insertDepth = depth; + } + } + if (insertDepth === -1) insertDepth = stack.length; + stack[insertDepth] = timer; + timer.depth = insertDepth; + maxDepth = Math.max(maxDepth, insertDepth); + } + this._drawableItems = this._timeline; + this._adjustStackDepth(maxDepth++); + } + }); \ No newline at end of file diff --git a/deps/v8/tools/system-analyzer/view/timeline/timeline-track.mjs b/deps/v8/tools/system-analyzer/view/timeline/timeline-track.mjs index 6f05b772d81c1b..8952afc182f2af 100644 --- a/deps/v8/tools/system-analyzer/view/timeline/timeline-track.mjs +++ b/deps/v8/tools/system-analyzer/view/timeline/timeline-track.mjs @@ -1,605 +1,15 @@ -// Copyright 2020 the V8 project authors. All rights reserved. +// 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. -import {kChunkHeight, kChunkWidth} from '../../log/map.mjs'; -import {MapLogEntry} from '../../log/map.mjs'; -import {FocusEvent, SelectionEvent, SelectTimeEvent, SynchronizeSelectionEvent, ToolTipEvent,} from '../events.mjs'; -import {CSSColor, DOM, gradientStopsFromGroups, V8CustomElement} from '../helper.mjs'; +import {CSSColor, DOM, SVG, V8CustomElement} from '../helper.mjs'; -DOM.defineCustomElement('view/timeline/timeline-track', - (templateText) => - class TimelineTrack extends V8CustomElement { - _timeline; - _nofChunks = 400; - _chunks; - _selectedEntry; - _timeToPixel; - _timeStartOffset; - _legend; +import {TimelineTrackBase} from './timeline-track-base.mjs' - _chunkMouseMoveHandler = this._handleChunkMouseMove.bind(this); - _chunkClickHandler = this._handleChunkClick.bind(this); - _chunkDoubleClickHandler = this._handleChunkDoubleClick.bind(this); - - constructor() { - super(templateText); - this._selectionHandler = new SelectionHandler(this); - this._legend = new Legend(this.$('#legendTable')); - this._legend.onFilter = (type) => this._handleFilterTimeline(); - this.timelineNode.addEventListener( - 'scroll', e => this._handleTimelineScroll(e)); - this.timelineNode.ondblclick = (e) => - this._selectionHandler.clearSelection(); - this.isLocked = false; - } - - static get observedAttributes() { - return ['title']; - } - - attributeChangedCallback(name, oldValue, newValue) { - if (name == 'title') { - this.$('#title').innerHTML = newValue; - } - } - - _handleFilterTimeline(type) { - this._updateChunks(); - } - - set data(timeline) { - this._timeline = timeline; - this._legend.timeline = timeline; - this.$('.content').style.display = timeline.isEmpty() ? 'none' : 'relative'; - this._updateChunks(); - } - - set timeSelection(selection) { - this._selectionHandler.timeSelection = selection; - this.updateSelection(); - } - - updateSelection() { - this._selectionHandler.update(); - this._legend.update(); - } - - // Maps the clicked x position to the x position on timeline canvas - positionOnTimeline(posX) { - let rect = this.timelineNode.getBoundingClientRect(); - let posClickedX = posX - rect.left + this.timelineNode.scrollLeft; - return posClickedX; - } - - positionToTime(posX) { - let posTimelineX = this.positionOnTimeline(posX) + this._timeStartOffset; - return posTimelineX / this._timeToPixel; - } - - timeToPosition(time) { - let posX = time * this._timeToPixel; - posX -= this._timeStartOffset; - return posX; - } - - get timelineCanvas() { - return this.$('#timelineCanvas'); - } - - get timelineChunks() { - return this.$('#timelineChunks'); - } - - get timelineNode() { - return this.$('#timeline'); - } - - _update() { - this._updateTimeline(); - this._legend.update(); - } - - set nofChunks(count) { - this._nofChunks = count; - this._updateChunks(); - } - - get nofChunks() { - return this._nofChunks; - } - - _updateChunks() { - this._chunks = - this._timeline.chunks(this.nofChunks, this._legend.filterPredicate); - this.requestUpdate(); - } - - get chunks() { - return this._chunks; - } - - set selectedEntry(value) { - this._selectedEntry = value; - if (value.edge) this.redraw(); - } - - get selectedEntry() { - return this._selectedEntry; - } - - set scrollLeft(offset) { - this.timelineNode.scrollLeft = offset; - } - - handleEntryTypeDoubleClick(e) { - this.dispatchEvent(new SelectionEvent(e.target.parentNode.entries)); - } - - timelineIndicatorMove(offset) { - this.timelineNode.scrollLeft += offset; - } - - _handleTimelineScroll(e) { - let horizontal = e.currentTarget.scrollLeft; - this.dispatchEvent(new CustomEvent( - 'scrolltrack', {bubbles: true, composed: true, detail: horizontal})); - } - - _createBackgroundImage(chunk) { - const stops = gradientStopsFromGroups( - chunk.length, chunk.height, chunk.getBreakdown(event => event.type), - type => this._legend.colorForType(type)); - return `linear-gradient(0deg,${stops.join(',')})`; - } - - _updateTimeline() { - const reusableNodes = Array.from(this.timelineChunks.childNodes).reverse(); - let fragment = new DocumentFragment(); - let chunks = this.chunks; - let max = chunks.max(each => each.size()); - let start = this._timeline.startTime; - let end = this._timeline.endTime; - let duration = end - start; - this._timeToPixel = chunks.length * kChunkWidth / duration; - this._timeStartOffset = start * this._timeToPixel; - for (let i = 0; i < chunks.length; i++) { - let chunk = chunks[i]; - let height = (chunk.size() / max * kChunkHeight); - chunk.height = height; - if (chunk.isEmpty()) continue; - let node = reusableNodes[reusableNodes.length - 1]; - let reusedNode = false; - if (node?.className == 'chunk') { - reusableNodes.pop(); - reusedNode = true; - } else { - node = DOM.div('chunk'); - node.onmousemove = this._chunkMouseMoveHandler; - node.onclick = this._chunkClickHandler; - node.ondblclick = this._chunkDoubleClickHandler; - } - const style = node.style; - style.left = `${i * kChunkWidth}px`; - style.height = `${height | 0}px`; - style.backgroundImage = this._createBackgroundImage(chunk); - node.chunk = chunk; - if (!reusedNode) fragment.appendChild(node); - } - - // Put a time marker roughly every 20 chunks. - let expected = duration / chunks.length * 20; - let interval = (10 ** Math.floor(Math.log10(expected))); - let correction = Math.log10(expected / interval); - correction = (correction < 0.33) ? 1 : (correction < 0.75) ? 2.5 : 5; - interval *= correction; - - let time = start; - while (time < end) { - let timeNode = DOM.div('timestamp'); - timeNode.innerText = `${((time - start) / 1000) | 0} ms`; - timeNode.style.left = `${((time - start) * this._timeToPixel) | 0}px`; - fragment.appendChild(timeNode); - time += interval; - } - - // Remove superfluos nodes lazily, for Chrome this is a very expensive - // operation. - if (reusableNodes.length > 0) { - for (const node of reusableNodes) { - node.style.display = 'none'; +DOM.defineCustomElement( + 'view/timeline/timeline-track', + (templateText) => class TimelineTrack extends TimelineTrackBase { + constructor() { + super(templateText); } - setTimeout(() => { - const range = document.createRange(); - const first = reusableNodes[reusableNodes.length - 1]; - const last = reusableNodes[0]; - range.setStartBefore(first); - range.setEndAfter(last); - range.deleteContents(); - }, 100); - } - this.timelineChunks.appendChild(fragment); - this.redraw(); - } - - _handleChunkMouseMove(event) { - if (this.isLocked) return false; - if (this._selectionHandler.isSelecting) return false; - let chunk = event.target.chunk; - if (!chunk) return; - if (chunk.isEmpty()) return; - // topmost map (at chunk.height) == map #0. - let relativeIndex = Math.round( - event.layerY / event.target.offsetHeight * (chunk.size() - 1)); - let logEntry = chunk.at(relativeIndex); - this.dispatchEvent(new FocusEvent(logEntry)); - this.dispatchEvent(new ToolTipEvent(logEntry.toStringLong(), event.target)); - } - - _handleChunkClick(event) { - this.isLocked = !this.isLocked; - } - - _handleChunkDoubleClick(event) { - let chunk = event.target.chunk; - if (!chunk) return; - event.stopPropagation(); - this.dispatchEvent(new SelectTimeEvent(chunk.start, chunk.end)); - } - - redraw() { - window.requestAnimationFrame(() => this._redraw()); - } - - _redraw() { - if (!(this._timeline.at(0) instanceof MapLogEntry)) return; - let canvas = this.timelineCanvas; - let width = (this.chunks.length + 1) * kChunkWidth; - if (width > 32767) width = 32767; - canvas.width = width; - canvas.height = kChunkHeight; - let ctx = canvas.getContext('2d'); - ctx.clearRect(0, 0, canvas.width, kChunkHeight); - if (!this.selectedEntry || !this.selectedEntry.edge) return; - this.drawEdges(ctx); - } - - setMapStyle(map, ctx) { - ctx.fillStyle = map.edge && map.edge.from ? CSSColor.onBackgroundColor : - CSSColor.onPrimaryColor; - } - - setEdgeStyle(edge, ctx) { - let color = this._legend.colorForType(edge.type); - ctx.strokeStyle = color; - ctx.fillStyle = color; - } - - markMap(ctx, map) { - let [x, y] = map.position(this.chunks); - ctx.beginPath(); - this.setMapStyle(map, ctx); - ctx.arc(x, y, 3, 0, 2 * Math.PI); - ctx.fill(); - ctx.beginPath(); - ctx.fillStyle = CSSColor.onBackgroundColor; - ctx.arc(x, y, 2, 0, 2 * Math.PI); - ctx.fill(); - } - - markSelectedMap(ctx, map) { - let [x, y] = map.position(this.chunks); - ctx.beginPath(); - this.setMapStyle(map, ctx); - ctx.arc(x, y, 6, 0, 2 * Math.PI); - ctx.strokeStyle = CSSColor.onBackgroundColor; - ctx.stroke(); - } - - drawEdges(ctx) { - // Draw the trace of maps in reverse order to make sure the outgoing - // transitions of previous maps aren't drawn over. - const kMaxOutgoingEdges = 100; - let nofEdges = 0; - let stack = []; - let current = this.selectedEntry; - while (current && nofEdges < kMaxOutgoingEdges) { - nofEdges += current.children.length; - stack.push(current); - current = current.parent(); - } - ctx.save(); - this.drawOutgoingEdges(ctx, this.selectedEntry, 3); - ctx.restore(); - - let labelOffset = 15; - let xPrev = 0; - while (current = stack.pop()) { - if (current.edge) { - this.setEdgeStyle(current.edge, ctx); - let [xTo, yTo] = this.drawEdge(ctx, current.edge, true, labelOffset); - if (xTo == xPrev) { - labelOffset += 8; - } else { - labelOffset = 15 - } - xPrev = xTo; - } - this.markMap(ctx, current); - current = current.parent(); - ctx.save(); - // this.drawOutgoingEdges(ctx, current, 1); - ctx.restore(); - } - // Mark selected map - this.markSelectedMap(ctx, this.selectedEntry); - } - - drawEdge(ctx, edge, showLabel = true, labelOffset = 20) { - if (!edge.from || !edge.to) return [-1, -1]; - let [xFrom, yFrom] = edge.from.position(this.chunks); - let [xTo, yTo] = edge.to.position(this.chunks); - let sameChunk = xTo == xFrom; - if (sameChunk) labelOffset += 8; - - ctx.beginPath(); - ctx.moveTo(xFrom, yFrom); - let offsetX = 20; - let offsetY = 20; - let midX = xFrom + (xTo - xFrom) / 2; - let midY = (yFrom + yTo) / 2 - 100; - if (!sameChunk) { - ctx.quadraticCurveTo(midX, midY, xTo, yTo); - } else { - ctx.lineTo(xTo, yTo); - } - if (!showLabel) { - ctx.stroke(); - } else { - let centerX, centerY; - if (!sameChunk) { - centerX = (xFrom / 2 + midX + xTo / 2) / 2; - centerY = (yFrom / 2 + midY + yTo / 2) / 2; - } else { - centerX = xTo; - centerY = yTo; - } - ctx.moveTo(centerX, centerY); - ctx.lineTo(centerX + offsetX, centerY - labelOffset); - ctx.stroke(); - ctx.textAlign = 'left'; - ctx.fillStyle = this._legend.colorForType(edge.type); - ctx.fillText( - edge.toString(), centerX + offsetX + 2, centerY - labelOffset); - } - return [xTo, yTo]; - } - - drawOutgoingEdges(ctx, map, max = 10, depth = 0) { - if (!map) return; - if (depth >= max) return; - ctx.globalAlpha = 0.5 - depth * (0.3 / max); - ctx.strokeStyle = CSSColor.timelineBackgroundColor; - const limit = Math.min(map.children.length, 100) - for (let i = 0; i < limit; i++) { - let edge = map.children[i]; - this.drawEdge(ctx, edge, true); - this.drawOutgoingEdges(ctx, edge.to, max, depth + 1); - } - } -}); - -class SelectionHandler { - // TODO turn into static field once Safari supports it. - static get SELECTION_OFFSET() { - return 10 - }; - - _timeSelection = {start: -1, end: Infinity}; - _selectionOriginTime = -1; - - constructor(timeline) { - this._timeline = timeline; - this._timelineNode.addEventListener( - 'mousedown', e => this._handleTimeSelectionMouseDown(e)); - this._timelineNode.addEventListener( - 'mouseup', e => this._handleTimeSelectionMouseUp(e)); - this._timelineNode.addEventListener( - 'mousemove', e => this._handleTimeSelectionMouseMove(e)); - } - - update() { - if (!this.hasSelection) { - this._selectionNode.style.display = 'none'; - return; - } - this._selectionNode.style.display = 'inherit'; - const startPosition = this.timeToPosition(this._timeSelection.start); - const endPosition = this.timeToPosition(this._timeSelection.end); - this._leftHandleNode.style.left = startPosition + 'px'; - this._rightHandleNode.style.left = endPosition + 'px'; - const delta = endPosition - startPosition; - const selectionNode = this._selectionBackgroundNode; - selectionNode.style.left = startPosition + 'px'; - selectionNode.style.width = delta + 'px'; - } - - set timeSelection(selection) { - this._timeSelection.start = selection.start; - this._timeSelection.end = selection.end; - } - - clearSelection() { - this._timeline.dispatchEvent(new SelectTimeEvent()); - } - - timeToPosition(posX) { - return this._timeline.timeToPosition(posX); - } - - positionToTime(posX) { - return this._timeline.positionToTime(posX); - } - - get isSelecting() { - return this._selectionOriginTime >= 0; - } - - get hasSelection() { - return this._timeSelection.start >= 0 && - this._timeSelection.end != Infinity; - } - - get _timelineNode() { - return this._timeline.$('#timeline'); - } - - get _selectionNode() { - return this._timeline.$('#selection'); - } - - get _selectionBackgroundNode() { - return this._timeline.$('#selectionBackground'); - } - - get _leftHandleNode() { - return this._timeline.$('#leftHandle'); - } - - get _rightHandleNode() { - return this._timeline.$('#rightHandle'); - } - - get _leftHandlePosX() { - return this._leftHandleNode.getBoundingClientRect().x; - } - - get _rightHandlePosX() { - return this._rightHandleNode.getBoundingClientRect().x; - } - - _isOnLeftHandle(posX) { - return Math.abs(this._leftHandlePosX - posX) <= - SelectionHandler.SELECTION_OFFSET; - } - - _isOnRightHandle(posX) { - return Math.abs(this._rightHandlePosX - posX) <= - SelectionHandler.SELECTION_OFFSET; - } - - _handleTimeSelectionMouseDown(e) { - let xPosition = e.clientX - // Update origin time in case we click on a handle. - if (this._isOnLeftHandle(xPosition)) { - xPosition = this._rightHandlePosX; - } - else if (this._isOnRightHandle(xPosition)) { - xPosition = this._leftHandlePosX; - } - this._selectionOriginTime = this.positionToTime(xPosition); - } - - _handleTimeSelectionMouseMove(e) { - if (!this.isSelecting) return; - const currentTime = this.positionToTime(e.clientX); - this._timeline.dispatchEvent(new SynchronizeSelectionEvent( - Math.min(this._selectionOriginTime, currentTime), - Math.max(this._selectionOriginTime, currentTime))); - } - - _handleTimeSelectionMouseUp(e) { - this._selectionOriginTime = -1; - const delta = this._timeSelection.end - this._timeSelection.start; - if (delta <= 1 || isNaN(delta)) return; - this._timeline.dispatchEvent(new SelectTimeEvent( - this._timeSelection.start, this._timeSelection.end)); - } -} - -class Legend { - _timeline; - _typesFilters = new Map(); - _typeClickHandler = this._handleTypeClick.bind(this); - _filterPredicate = this.filter.bind(this); - onFilter = () => {}; - - constructor(table) { - this._table = table; - } - - set timeline(timeline) { - this._timeline = timeline; - const groups = timeline.getBreakdown(); - this._typesFilters = new Map(groups.map(each => [each.key, true])); - this._colors = - new Map(groups.map(each => [each.key, CSSColor.at(each.id)])); - } - - get selection() { - return this._timeline.selectionOrSelf; - } - - get filterPredicate() { - for (let visible of this._typesFilters.values()) { - if (!visible) return this._filterPredicate; - } - return undefined; - } - - colorForType(type) { - return this._colors.get(type); - } - - filter(logEntry) { - return this._typesFilters.get(logEntry.type); - } - - update() { - const tbody = DOM.tbody(); - const missingTypes = new Set(this._typesFilters.keys()); - this.selection.getBreakdown().forEach(group => { - tbody.appendChild(this._addTypeRow(group)); - missingTypes.delete(group.key); - }); - missingTypes.forEach(key => tbody.appendChild(this._row('', key, 0, '0%'))); - if (this._timeline.selection) { - tbody.appendChild( - this._row('', 'Selection', this.selection.length, '100%')); - } - tbody.appendChild(this._row('', 'All', this._timeline.length, '')); - this._table.tBodies[0].replaceWith(tbody); - } - - _row(color, type, count, percent) { - const row = DOM.tr(); - row.appendChild(DOM.td(color)); - row.appendChild(DOM.td(type)); - row.appendChild(DOM.td(count.toString())); - row.appendChild(DOM.td(percent)); - return row - } - - _addTypeRow(group) { - const color = this.colorForType(group.key); - const colorDiv = DOM.div('colorbox'); - if (this._typesFilters.get(group.key)) { - colorDiv.style.backgroundColor = color; - } else { - colorDiv.style.borderColor = color; - colorDiv.style.backgroundColor = CSSColor.backgroundImage; - } - let percent = `${(group.count / this.selection.length * 100).toFixed(1)}%`; - const row = this._row(colorDiv, group.key, group.count, percent); - row.className = 'clickable'; - row.onclick = this._typeClickHandler; - row.data = group.key; - return row; - } - - _handleTypeClick(e) { - const type = e.currentTarget.data; - this._typesFilters.set(type, !this._typesFilters.get(type)); - this.onFilter(type); - } -} \ No newline at end of file + }) \ No newline at end of file diff --git a/deps/v8/tools/system-analyzer/view/tool-tip-template.html b/deps/v8/tools/system-analyzer/view/tool-tip-template.html index dc56997825f6de..78fcca920a3cb7 100644 --- a/deps/v8/tools/system-analyzer/view/tool-tip-template.html +++ b/deps/v8/tools/system-analyzer/view/tool-tip-template.html @@ -11,14 +11,21 @@ } #content { - background-color: var(--surface-color); + background-color: rgba(var(--surface-color-rgb), 0.8); border: 3px var(--primary-color) solid; border-radius: 10px; + padding: 10px; + width: auto; min-width: 100px; + max-width: 400px; min-height: 100px; - padding: 10px; + max-height: 400px; + overflow: auto; box-shadow: 0px 0px 10px rgba(0,0,0,0.5); - width: auto; + } + + #content > h3 { + margin-top: 0; } .textContent { @@ -32,9 +39,10 @@ #body { display: none; position: absolute; + z-index: 99999; --tip-offset: 10px; --tip-width: 10px; - --tip-height: 15px; + --tip-height: 40px; } #body.top { @@ -50,33 +58,56 @@ left: calc(var(--tip-offset) * -1 - var(--tip-width)); } - .tip { + .tip, .tipThin { width: 0; height: 0; border-style: solid; position: absolute; - border-width: var(--tip-height) var(--tip-width) 0 var(--tip-width); border-color: var(--primary-color) transparent transparent transparent; pointer-events: none; } - + .tip { + border-width: var(--tip-width) var(--tip-width) 0 var(--tip-width); + } + .tipThin { + border-width: var(--tip-height) 4px 2px 4px; + bottom: -30px; + left: -4px; + } + /* Tip positioning modifiers */ .top > .tip { + bottom: calc(var(--tip-width) * -1); + } + .top > .tipThin { bottom: calc(var(--tip-height) * -1); } .bottom > .tip { + top: calc(var(--tip-width) * -1); + transform: scaleY(-1); + } + .bottom > .tipThin { top: calc(var(--tip-height) * -1); transform: scaleY(-1); } .left > .tip { right: var(--tip-offset); } + .left > .tipThin { + right: var(--tip-offset); + } .right > .tip { left: var(--tip-offset); } + .right > .tipThin { + left: var(--tip-offset); + }
+ +
+
+
-
diff --git a/deps/v8/tools/system-analyzer/view/tool-tip.mjs b/deps/v8/tools/system-analyzer/view/tool-tip.mjs index a01ee1bdbf6d38..5be98ae2147a84 100644 --- a/deps/v8/tools/system-analyzer/view/tool-tip.mjs +++ b/deps/v8/tools/system-analyzer/view/tool-tip.mjs @@ -9,6 +9,7 @@ DOM.defineCustomElement( _targetNode; _content; _isHidden = true; + constructor() { super(templateText); this._intersectionObserver = new IntersectionObserver((entries) => { @@ -19,7 +20,15 @@ DOM.defineCustomElement( this.requestUpdate(true); } }); - document.addEventListener('click', (e) => this.hide()); + document.addEventListener('click', (event) => { + // Only hide the tooltip if we click anywhere outside of it. + let target = event.target; + while (target) { + if (target == this) return; + target = target.parentNode; + } + this.hide() + }); } _update() { @@ -28,9 +37,7 @@ DOM.defineCustomElement( rect.x += rect.width / 2; let atRight = this._useRight(rect.x); let atBottom = this._useBottom(rect.y); - if (atBottom) { - rect.y += rect.height; - } + if (atBottom) rect.y += rect.height; this._setPosition(rect, atRight, atBottom); this.requestUpdate(true); } @@ -46,10 +53,11 @@ DOM.defineCustomElement( set targetNode(targetNode) { this._intersectionObserver.disconnect(); this._targetNode = targetNode; - if (targetNode) { + if (targetNode === undefined) return; + if (!(targetNode instanceof SVGElement)) { this._intersectionObserver.observe(targetNode); - this.requestUpdate(true); } + this.requestUpdate(true); } set position(position) { @@ -82,14 +90,27 @@ DOM.defineCustomElement( if (typeof content === 'string') { this.contentNode.innerHTML = content; this.contentNode.className = 'textContent'; + } else if (content?.nodeType && content?.nodeName) { + this._setContentNode(content); } else { - const newContent = DOM.div(); - newContent.appendChild(content); - this.contentNode.replaceWith(newContent); - newContent.id = 'content'; + if (this.contentNode.firstChild?.localName == 'property-link-table') { + this.contentNode.firstChild.propertyDict = content; + } else { + const node = DOM.element('property-link-table'); + node.instanceLinkButtons = true; + node.propertyDict = content; + this._setContentNode(node); + } } } + _setContentNode(content) { + const newContent = DOM.div(); + newContent.appendChild(content); + this.contentNode.replaceWith(newContent); + newContent.id = 'content'; + } + hide() { this._isHidden = true; this.bodyNode.style.display = 'none'; diff --git a/deps/v8/tools/testrunner/base_runner.py b/deps/v8/tools/testrunner/base_runner.py index 739a109a0c5346..009893a23a2ceb 100644 --- a/deps/v8/tools/testrunner/base_runner.py +++ b/deps/v8/tools/testrunner/base_runner.py @@ -284,6 +284,11 @@ def execute(self, sys_args=None): # this less cryptic by printing it ourselves. print(' '.join(sys.argv)) + # TODO(machenbach): Print used Python version until we have switched to + # Python3 everywhere. + print('Running with:') + print(sys.version) + # Kill stray processes from previous tasks on swarming. util.kill_processes_linux() @@ -365,9 +370,6 @@ def _add_parser_default_options(self, parser): help="Path to a file for storing json results.") parser.add_option('--slow-tests-cutoff', type="int", default=100, help='Collect N slowest tests') - parser.add_option("--junitout", help="File name of the JUnit output") - parser.add_option("--junittestsuite", default="v8tests", - help="The testsuite name in the JUnit output file") parser.add_option("--exit-after-n-failures", type="int", default=100, help="Exit after the first N failures instead of " "running all tests. Pass 0 to disable this feature.") @@ -661,6 +663,12 @@ def _get_statusfile_variables(self, options): self.build_config.arch == 'mipsel': no_simd_hardware = not simd_mips + # S390 hosts without VEF1 do not support Simd. + if self.build_config.arch == 's390x' and \ + not self.build_config.simulator_run and \ + not utils.IsS390SimdSupported(): + no_simd_hardware = True + # Ppc64 processors earlier than POWER9 do not support Simd instructions if self.build_config.arch == 'ppc64' and \ not self.build_config.simulator_run and \ @@ -738,7 +746,7 @@ def _timeout_scalefactor(self, options): if self.build_config.predictable: factor *= 4 if self.build_config.tsan: - factor *= 1.5 + factor *= 2 if self.build_config.use_sanitizer: factor *= 1.5 if self.build_config.is_full_debug: @@ -801,9 +809,6 @@ def _get_shard_info(self, options): def _create_progress_indicators(self, test_count, options): procs = [PROGRESS_INDICATORS[options.progress]()] - if options.junitout: - procs.append(progress.JUnitTestProgressIndicator(options.junitout, - options.junittestsuite)) if options.json_test_results: procs.append(progress.JsonTestProgressIndicator(self.framework_name)) diff --git a/deps/v8/tools/testrunner/local/junit_output.py b/deps/v8/tools/testrunner/local/junit_output.py deleted file mode 100644 index 52f31ec422a69b..00000000000000 --- a/deps/v8/tools/testrunner/local/junit_output.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2013 the V8 project authors. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import xml.etree.ElementTree as xml - - -class JUnitTestOutput: - def __init__(self, test_suite_name): - self.root = xml.Element("testsuite") - self.root.attrib["name"] = test_suite_name - - def HasRunTest(self, test_name, test_cmd, test_duration, test_failure): - testCaseElement = xml.Element("testcase") - testCaseElement.attrib["name"] = test_name - testCaseElement.attrib["cmd"] = test_cmd - testCaseElement.attrib["time"] = str(round(test_duration, 3)) - if len(test_failure): - failureElement = xml.Element("failure") - failureElement.text = test_failure - testCaseElement.append(failureElement) - self.root.append(testCaseElement) - - def FinishAndWrite(self, f): - xml.ElementTree(self.root).write(f, "UTF-8") diff --git a/deps/v8/tools/testrunner/local/statusfile.py b/deps/v8/tools/testrunner/local/statusfile.py index b6f97cd5641935..48b92869599a5e 100644 --- a/deps/v8/tools/testrunner/local/statusfile.py +++ b/deps/v8/tools/testrunner/local/statusfile.py @@ -46,6 +46,7 @@ FAIL_SLOPPY = "FAIL_SLOPPY" # Modifiers +HEAVY = "HEAVY" SKIP = "SKIP" SLOW = "SLOW" NO_VARIANTS = "NO_VARIANTS" @@ -54,8 +55,8 @@ ALWAYS = "ALWAYS" KEYWORDS = {} -for key in [SKIP, FAIL, PASS, CRASH, SLOW, FAIL_OK, NO_VARIANTS, FAIL_SLOPPY, - ALWAYS, FAIL_PHASE_ONLY]: +for key in [SKIP, FAIL, PASS, CRASH, HEAVY, SLOW, FAIL_OK, NO_VARIANTS, + FAIL_SLOPPY, ALWAYS, FAIL_PHASE_ONLY]: KEYWORDS[key] = key # Support arches, modes to be written as keywords instead of strings. diff --git a/deps/v8/tools/testrunner/local/utils.py b/deps/v8/tools/testrunner/local/utils.py index 94429a9fde9e45..05d1ef7d5e94f6 100644 --- a/deps/v8/tools/testrunner/local/utils.py +++ b/deps/v8/tools/testrunner/local/utils.py @@ -97,6 +97,18 @@ def GuessOS(): return None +# Check if Vector Enhancement Facility 1 is available on the +# host S390 machine. This facility is required for supporting Simd on V8. +def IsS390SimdSupported(): + import subprocess + cpuinfo = subprocess.check_output("cat /proc/cpuinfo", shell=True) + cpuinfo_list = cpuinfo.strip().decode("utf-8").splitlines() + facilities = "".join(x for x in cpuinfo_list if x.startswith("facilities")) + facilities_list = facilities.split(" ") + # Having bit 135 set indicates VEF1 is available. + return "135" in facilities_list + + # Returns power processor version, taking compatibility mode into account. # (Power9 running in Power8 compatibility mode returns 8) # Only useful if arch is ppc64 diff --git a/deps/v8/tools/testrunner/local/variants.py b/deps/v8/tools/testrunner/local/variants.py index e214de05404d74..1d39f6951ddfd5 100644 --- a/deps/v8/tools/testrunner/local/variants.py +++ b/deps/v8/tools/testrunner/local/variants.py @@ -16,7 +16,7 @@ "concurrent_inlining": [["--concurrent-inlining"]], "jitless": [["--jitless"]], "sparkplug": [["--sparkplug"]], - "always_sparkplug": [[ "--always-sparkplug" ]], + "always_sparkplug": [[ "--always-sparkplug", "--sparkplug"]], "minor_mc": [["--minor-mc"]], "no_lfa": [["--no-lazy-feedback-allocation"]], # No optimization means disable all optimizations. OptimizeFunctionOnNextCall @@ -30,7 +30,8 @@ "stress": [["--stress-opt", "--no-liftoff", "--stress-lazy-source-positions", "--no-wasm-generic-wrapper"]], "stress_concurrent_allocation": [["--stress-concurrent-allocation"]], - "stress_concurrent_inlining": [["--stress-concurrent-inlining"]], + "stress_concurrent_inlining": [["--stress-concurrent-inlining", + "--concurrent-inlining"]], "stress_js_bg_compile_wasm_code_gc": [["--stress-background-compile", "--stress-wasm-code-gc"]], "stress_incremental_marking": [["--stress-incremental-marking"]], @@ -40,7 +41,7 @@ "trusted": [["--no-untrusted-code-mitigations"]], "no_wasm_traps": [["--no-wasm-trap-handler"]], "turboprop": [["--turboprop"]], - "turboprop_as_toptier": [["--turboprop-as-toptier"]], + "turboprop_as_toptier": [["--turboprop-as-toptier", "--turboprop"]], "instruction_scheduling": [["--turbo-instruction-scheduling"]], "stress_instruction_scheduling": [["--turbo-stress-instruction-scheduling"]], "top_level_await": [["--harmony-top-level-await"]], @@ -51,33 +52,26 @@ # variant. This depends on the flags specified in ALL_VARIANT_FLAGS and on the # implications defined in flag-definitions.h. INCOMPATIBLE_FLAGS_PER_VARIANT = { - "assert_types": ["--no-assert-types"], "jitless": ["--opt", "--always-opt", "--liftoff", "--track-field-types", "--validate-asm", "--sparkplug", "--always-sparkplug"], - "no_wasm_traps": ["--wasm-trap-handler"], - "nooptimization": ["--opt", "--always-opt", "--no-liftoff", - "--wasm-tier-up"], + "nooptimization": ["--always-opt"], "slow_path": ["--no-force-slow-path"], "stress_concurrent_allocation": ["--single-threaded-gc", "--predictable"], - "stress_concurrent_inlining": ["--single-threaded", "--predictable", - "--no-concurrent-inlining"], - "concurrent_inlining": ["--no-concurrent-inlining"], - "stress_incremental_marking": ["--no-stress-incremental-marking"], - "stress_js_bg_compile_wasm_code_gc": ["--no-stress-background-compile"], - "stress": ["--no-stress-opt", "--always-opt", "--no-always-opt", "--liftoff", + "stress_concurrent_inlining": ["--single-threaded", "--predictable"], + # The fast API tests initialize an embedder object that never needs to be + # serialized to the snapshot, so we don't have a + # SerializeInternalFieldsCallback for it, so they are incompatible with + # stress_snapshot. + "stress_snapshot": [["--turbo-fast-api-calls"]], + "stress": ["--always-opt", "--no-always-opt", "--max-inlined-bytecode-size=*", "--max-inlined-bytecode-size-cumulative=*", "--stress-inline", - "--wasm-generic-wrapper"], - "sparkplug": ["--jitless", "--no-sparkplug" ], - "always_sparkplug": ["--jitless", "--no-sparkplug", "--no-always-sparkplug"], - "turboprop": ["--interrupt-budget=*", "--no-turboprop"], - "turboprop_as_toptier": ["--interrupt-budget=*", "--no-turboprop", - "--no-turboprop-as-toptier"], + "--liftoff-only"], + "sparkplug": ["--jitless"], + "always_sparkplug": ["--jitless"], "code_serializer": ["--cache=after-execute", "--cache=full-code-cache", "--cache=none"], - "no_local_heaps": ["--concurrent-inlining", "--turboprop"], - "experimental_regexp": ["--no-enable-experimental-regexp-engine", - "--no-default-to-experimental-regexp-engine"], + "experimental_regexp": ["--no-enable-experimental-regexp-engine"], # There is a negative implication: --perf-prof disables # --wasm-write-protect-code-memory. "wasm_write_protect_code": ["--perf-prof"], @@ -89,12 +83,13 @@ # The conflicts might be directly contradictory flags or be caused by the # implications defined in flag-definitions.h. INCOMPATIBLE_FLAGS_PER_BUILD_VARIABLE = { - "lite_mode": ["--no-lazy-feedback-allocation", "--max-semi-space-size=*"] + "lite_mode": ["--no-lazy-feedback-allocation", "--max-semi-space-size=*", + "--stress-concurrent-inlining"] + INCOMPATIBLE_FLAGS_PER_VARIANT["jitless"], - "predictable": ["--liftoff", "--parallel-compile-tasks", + "predictable": ["--parallel-compile-tasks", "--concurrent-recompilation", - "--wasm-num-compilation-tasks=*", - "--stress-concurrent-allocation"], + "--stress-concurrent-allocation", + "--stress-concurrent-inlining"], } # Flags that lead to a contradiction when a certain extra-flag is present. @@ -103,20 +98,13 @@ # The conflicts might be directly contradictory flags or be caused by the # implications defined in flag-definitions.h. INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG = { - "--concurrent-inlining": - INCOMPATIBLE_FLAGS_PER_VARIANT["concurrent_inlining"], - "--concurrent-recompilation": ["--no-concurrent-recompilation", "--predictable"], - "--enable-armv8": ["--no-enable-armv8"], + "--concurrent-recompilation": ["--predictable"], "--gc-interval=*": ["--gc-interval=*"], - "--no-enable-sse3": ["--enable-sse3"], - "--no-enable-ssse3": ["--enable-ssse3"], - "--no-enable-sse4-1": ["--enable-sse4-1"], "--optimize-for-size": ["--max-semi-space-size=*"], - "--stress_concurrent_allocation": ["--single-threaded-gc", "--predictable"], + "--stress_concurrent_allocation": + INCOMPATIBLE_FLAGS_PER_VARIANT["stress_concurrent_allocation"], "--stress-concurrent-inlining": INCOMPATIBLE_FLAGS_PER_VARIANT["stress_concurrent_inlining"], - "--stress-flush-bytecode": ["--no-stress-flush-bytecode"], - "--stress-incremental-marking": INCOMPATIBLE_FLAGS_PER_VARIANT["stress_incremental_marking"], } SLOW_VARIANTS = set([ diff --git a/deps/v8/tools/testrunner/objects/testcase.py b/deps/v8/tools/testrunner/objects/testcase.py index e037f996797256..a1f1754b22a47c 100644 --- a/deps/v8/tools/testrunner/objects/testcase.py +++ b/deps/v8/tools/testrunner/objects/testcase.py @@ -34,6 +34,7 @@ from ..local import command from ..local import statusfile from ..local import utils +from ..local.variants import ALL_VARIANT_FLAGS from ..local.variants import INCOMPATIBLE_FLAGS_PER_VARIANT from ..local.variants import INCOMPATIBLE_FLAGS_PER_BUILD_VARIABLE from ..local.variants import INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG @@ -46,8 +47,9 @@ RESOURCES_PATTERN = re.compile(r"//\s+Resources:(.*)") # Pattern to auto-detect files to push on Android for statements like: # load("path/to/file.js") +# d8.file.execute("path/to/file.js") LOAD_PATTERN = re.compile( - r"(?:load|readbuffer|read)\((?:'|\")([^'\"]+)(?:'|\")\)") + r"(?:execute|load|readbuffer|read)\((?:'|\")([^'\"]+)(?:'|\")\)") # Pattern to auto-detect files to push on Android for statements like: # import foobar from "path/to/file.js" # import {foo, bar} from "path/to/file.js" @@ -166,9 +168,30 @@ def allow_timeouts(self): @property def expected_outcomes(self): + def is_flag(maybe_flag): + return maybe_flag.startswith("--") # Best-effort heuristic. + + # Filter to flags, e.g.: ["--foo", "3", "--bar"] -> ["--foo", "--bar"]. + def filter_flags(normalized_flags): + return [f for f in normalized_flags if is_flag(f)]; + def normalize_flag(flag): return flag.replace("_", "-").replace("--no-", "--no") + def normalize_flags(flags): + return [normalize_flag(flag) for flag in filter_flags(flags)] + + # Note this can get it wrong if the flag name starts with the characters + # "--no" where "no" is part of the flag name, e.g. "--nobodys-perfect". + # In that case the negation "--bodys-perfect" would be returned. This is + # a weakness we accept and hope to never run into. + def negate_flag(normalized_flag): + return ("--" + normalized_flag[4:] if normalized_flag.startswith("--no") + else "--no" + normalized_flag[2:]) + + def negate_flags(normalized_flags): + return [negate_flag(flag) for flag in normalized_flags] + def has_flag(conflicting_flag, flags): conflicting_flag = normalize_flag(conflicting_flag) if conflicting_flag in flags: @@ -191,18 +214,31 @@ def check_flags(incompatible_flags, actual_flags, rule): file_specific_flags = (self._get_source_flags() + self._get_suite_flags() + self._get_statusfile_flags()) - file_specific_flags = [normalize_flag(flag) for flag in file_specific_flags] - extra_flags = [normalize_flag(flag) for flag in self._get_extra_flags()] - + file_specific_flags = normalize_flags(file_specific_flags) + extra_flags = normalize_flags(self._get_extra_flags()) + + # Contradiction: flags contains both a flag --foo and its negation + # --no-foo. + if self.variant in ALL_VARIANT_FLAGS: + for flags in ALL_VARIANT_FLAGS[self.variant]: + all_flags = (file_specific_flags + extra_flags + + normalize_flags(flags)) + check_flags(negate_flags(all_flags), all_flags, "Flag negations") + + # Contradiction: flags specified through the "Flags:" annotation are + # incompatible with the variant. if self.variant in INCOMPATIBLE_FLAGS_PER_VARIANT: check_flags(INCOMPATIBLE_FLAGS_PER_VARIANT[self.variant], file_specific_flags, "INCOMPATIBLE_FLAGS_PER_VARIANT[\""+self.variant+"\"]") + # Contradiction: flags specified through the "Flags:" annotation are + # incompatible with the build. for variable, incompatible_flags in INCOMPATIBLE_FLAGS_PER_BUILD_VARIABLE.items(): if self.suite.statusfile.variables[variable]: check_flags(incompatible_flags, file_specific_flags, "INCOMPATIBLE_FLAGS_PER_BUILD_VARIABLE[\""+variable+"\"]") + # Contradiction: flags passed through --extra-flags are incompatible. for extra_flag, incompatible_flags in INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG.items(): if has_flag(extra_flag, extra_flags): check_flags(incompatible_flags, file_specific_flags, @@ -214,9 +250,13 @@ def do_skip(self): return (statusfile.SKIP in self._statusfile_outcomes and not self.suite.test_config.run_skipped) + @property + def is_heavy(self): + return statusfile.HEAVY in self._statusfile_outcomes + @property def is_slow(self): - return statusfile.SLOW in self._statusfile_outcomes + return self.is_heavy or statusfile.SLOW in self._statusfile_outcomes @property def is_fail_ok(self): diff --git a/deps/v8/tools/testrunner/standard_runner.py b/deps/v8/tools/testrunner/standard_runner.py index 94c25766824b79..5b901b8a530cfb 100755 --- a/deps/v8/tools/testrunner/standard_runner.py +++ b/deps/v8/tools/testrunner/standard_runner.py @@ -25,6 +25,7 @@ from testrunner.testproc.filter import StatusFileFilterProc, NameFilterProc from testrunner.testproc.loader import LoadProc from testrunner.testproc.seed import SeedProc +from testrunner.testproc.sequence import SequenceProc from testrunner.testproc.variant import VariantProc @@ -122,6 +123,8 @@ def _add_parser_options(self, parser): 'generation.') # Extra features. + parser.add_option('--max-heavy-tests', default=1, type='int', + help='Maximum number of heavy tests run in parallel') parser.add_option('--time', help='Print timing information after running', default=False, action='store_true') @@ -282,6 +285,10 @@ def _get_statusfile_variables(self, options): }) return variables + def _create_sequence_proc(self, options): + """Create processor for sequencing heavy tests on swarming.""" + return SequenceProc(options.max_heavy_tests) if options.swarming else None + def _do_execute(self, tests, args, options): jobs = options.j @@ -306,6 +313,7 @@ def _do_execute(self, tests, args, options): self._create_predictable_filter(), self._create_shard_proc(options), self._create_seed_proc(options), + self._create_sequence_proc(options), sigproc, ] + indicators + [ results, diff --git a/deps/v8/tools/testrunner/testproc/progress.py b/deps/v8/tools/testrunner/testproc/progress.py index 634ef7c2f2e3c0..c102cddec17f64 100644 --- a/deps/v8/tools/testrunner/testproc/progress.py +++ b/deps/v8/tools/testrunner/testproc/progress.py @@ -15,18 +15,15 @@ from . import base from . import util -from ..local import junit_output -def print_failure_header(test): +def print_failure_header(test, is_flaky=False): + text = [str(test)] if test.output_proc.negative: - negative_marker = '[negative] ' - else: - negative_marker = '' - print("=== %(label)s %(negative)s===" % { - 'label': test, - 'negative': negative_marker, - }) + text.append('[negative]') + if is_flaky: + text.append('(flaky)') + print('=== %s ===' % ' '.join(text)) class ResultsTracker(base.TestProcObserver): @@ -75,13 +72,18 @@ def __init__(self): def _on_result_for(self, test, result): # TODO(majeski): Support for dummy/grouped results if result.has_unexpected_output: - self._failed.append((test, result)) + self._failed.append((test, result, False)) + elif result.is_rerun: + # Print only the first result of a flaky failure that was rerun. + self._failed.append((test, result.results[0], True)) def finished(self): crashed = 0 + flaky = 0 print() - for test, result in self._failed: - print_failure_header(test) + for test, result, is_flaky in self._failed: + flaky += int(is_flaky) + print_failure_header(test, is_flaky=is_flaky) if result.output.stderr: print("--- stderr ---") print(result.output.stderr.strip()) @@ -102,9 +104,11 @@ def finished(self): else: print() print("===") - print("=== %i tests failed" % len(self._failed)) + print("=== %d tests failed" % len(self._failed)) + if flaky > 0: + print("=== %d tests were flaky" % flaky) if crashed > 0: - print("=== %i tests CRASHED" % crashed) + print("=== %d tests CRASHED" % crashed) print("===") @@ -130,6 +134,17 @@ def print(self, prefix, test): print('%s: %ss' % (prefix, test)) sys.stdout.flush() + +def format_result_status(result): + if result.has_unexpected_output: + if result.output.HasCrashed(): + return 'CRASH' + else: + return 'FAIL' + else: + return 'PASS' + + class VerboseProgressIndicator(SimpleProgressIndicator): def __init__(self): super(VerboseProgressIndicator, self).__init__() @@ -142,13 +157,10 @@ def _print(self, text): def _message(self, test, result): # TODO(majeski): Support for dummy/grouped results - if result.has_unexpected_output: - if result.output.HasCrashed(): - outcome = 'CRASH' - else: - outcome = 'FAIL' + if result.is_rerun: + outcome = ' '.join(format_result_status(r) for r in result.results) else: - outcome = 'pass' + outcome = format_result_status(result) return '%s %s: %s' % ( test, test.variant or 'default', outcome) @@ -349,45 +361,6 @@ def _clear_line(self, last_length): print(("\r" + (" " * last_length) + "\r"), end='') -class JUnitTestProgressIndicator(ProgressIndicator): - def __init__(self, junitout, junittestsuite): - super(JUnitTestProgressIndicator, self).__init__() - self._requirement = base.DROP_PASS_STDOUT - - self.outputter = junit_output.JUnitTestOutput(junittestsuite) - if junitout: - self.outfile = open(junitout, "w") - else: - self.outfile = sys.stdout - - def _on_result_for(self, test, result): - # TODO(majeski): Support for dummy/grouped results - fail_text = "" - output = result.output - if result.has_unexpected_output: - stdout = output.stdout.strip() - if len(stdout): - fail_text += "stdout:\n%s\n" % stdout - stderr = output.stderr.strip() - if len(stderr): - fail_text += "stderr:\n%s\n" % stderr - fail_text += "Command: %s" % result.cmd.to_string() - if output.HasCrashed(): - fail_text += "exit code: %d\n--- CRASHED ---" % output.exit_code - if output.HasTimedOut(): - fail_text += "--- TIMEOUT ---" - self.outputter.HasRunTest( - test_name=str(test), - test_cmd=result.cmd.to_string(relative=True), - test_duration=output.duration, - test_failure=fail_text) - - def finished(self): - self.outputter.FinishAndWrite(self.outfile) - if self.outfile != sys.stdout: - self.outfile.close() - - class JsonTestProgressIndicator(ProgressIndicator): def __init__(self, framework_name): super(JsonTestProgressIndicator, self).__init__() diff --git a/deps/v8/tools/testrunner/testproc/sequence.py b/deps/v8/tools/testrunner/testproc/sequence.py new file mode 100644 index 00000000000000..4509a4abf998ec --- /dev/null +++ b/deps/v8/tools/testrunner/testproc/sequence.py @@ -0,0 +1,59 @@ +# 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. + +from collections import deque + +from . import base + + +class SequenceProc(base.TestProc): + """Processor ensuring heavy tests are sent sequentially into the execution + pipeline. + + The class keeps track of the number of tests in the pipeline marked heavy + and permits only a configurable amount. An excess amount is queued and sent + as soon as other heavy tests return. + """ + def __init__(self, max_heavy): + """Initialize the processor. + + Args: + max_heavy: The maximum number of heavy tests that will be sent further + down the pipeline simultaneously. + """ + super(SequenceProc, self).__init__() + assert max_heavy > 0 + self.max_heavy = max_heavy + self.n_heavy = 0 + self.buffer = deque() + + def next_test(self, test): + if test.is_heavy: + if self.n_heavy < self.max_heavy: + # Enough space to send more heavy tests. Check if the test is not + # filtered otherwise. + used = self._send_test(test) + if used: + self.n_heavy += 1 + return used + else: + # Too many tests in the pipeline. Buffer the test and indicate that + # this test didn't end up in the execution queue (i.e. test loader + # will try to send more tests). + self.buffer.append(test) + return False + else: + return self._send_test(test) + + def result_for(self, test, result): + if test.is_heavy: + # A heavy test finished computing. Try to send one from the buffer. + self.n_heavy -= 1 + while self.buffer: + next_test = self.buffer.popleft() + if self._send_test(next_test): + self.n_heavy += 1 + break + + self._send_result(test, result) diff --git a/deps/v8/tools/testrunner/testproc/sequence_unittest.py b/deps/v8/tools/testrunner/testproc/sequence_unittest.py new file mode 100644 index 00000000000000..8a0edc36bbcb68 --- /dev/null +++ b/deps/v8/tools/testrunner/testproc/sequence_unittest.py @@ -0,0 +1,162 @@ +#!/usr/bin/env python +# 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. + +""" +Test integrating the sequence processor into a simple test pipeline. +""" + +import os +import sys +import unittest + +# Needed because the test runner contains relative imports. +TOOLS_PATH = os.path.dirname(os.path.dirname(os.path.dirname( + os.path.abspath(__file__)))) +sys.path.append(TOOLS_PATH) + +from testrunner.testproc import base +from testrunner.testproc.loader import LoadProc +from testrunner.testproc.sequence import SequenceProc + + +class FakeExecutionProc(base.TestProc): + """Simulates the pipeline sink consuming and running the tests. + + Test execution is simulated for each test by calling run(). + """ + def __init__(self): + super(FakeExecutionProc, self).__init__() + self.tests = [] + + def next_test(self, test): + self.tests.append(test) + return True + + def run(self): + test = self.tests.pop() + self._send_result(test, test.n) + + +class FakeResultObserver(base.TestProcObserver): + """Observer to track all results sent back through the pipeline.""" + def __init__(self): + super(FakeResultObserver, self).__init__() + self.tests = set([]) + + def _on_result_for(self, test, result): + self.tests.add(test.n) + + +class FakeTest(object): + """Simple test representation to differentiate light/heavy tests.""" + def __init__(self, n, is_heavy): + self.n = n + self.is_heavy = is_heavy + self.keep_output = False + + +class TestSequenceProc(unittest.TestCase): + def _test(self, tests, batch_size, max_heavy): + # Set up a simple processing pipeline: + # Loader -> observe results -> sequencer -> execution. + loader = LoadProc(iter(tests)) + results = FakeResultObserver() + sequence_proc = SequenceProc(max_heavy) + execution = FakeExecutionProc() + loader.connect_to(results) + results.connect_to(sequence_proc) + sequence_proc.connect_to(execution) + + # Fill the execution queue (with the number of tests potentially + # executed in parallel). + loader.load_initial_tests(batch_size) + + # Simulate the execution test by test. + while execution.tests: + # Assert the invariant of maximum heavy tests executed simultaneously. + self.assertLessEqual( + sum(int(test.is_heavy) for test in execution.tests), max_heavy) + + # As in the real pipeline, running a test and returning its result + # will add another test into the pipeline. + execution.run() + + # Ensure that all tests are processed and deliver results. + self.assertEqual(set(test.n for test in tests), results.tests) + + def test_wrong_usage(self): + self.assertRaises(lambda: SequenceProc(0)) + + def test_no_tests(self): + self._test([], 1, 1) + + def test_large_batch_light(self): + self._test([ + FakeTest(0, False), + FakeTest(1, False), + FakeTest(2, False), + ], 4, 1) + + def test_small_batch_light(self): + self._test([ + FakeTest(0, False), + FakeTest(1, False), + FakeTest(2, False), + ], 2, 1) + + def test_large_batch_heavy(self): + self._test([ + FakeTest(0, True), + FakeTest(1, True), + FakeTest(2, True), + ], 4, 1) + + def test_small_batch_heavy(self): + self._test([ + FakeTest(0, True), + FakeTest(1, True), + FakeTest(2, True), + ], 2, 1) + + def test_large_batch_mixed(self): + self._test([ + FakeTest(0, True), + FakeTest(1, False), + FakeTest(2, True), + FakeTest(3, False), + ], 4, 1) + + def test_small_batch_mixed(self): + self._test([ + FakeTest(0, True), + FakeTest(1, False), + FakeTest(2, True), + FakeTest(3, False), + ], 2, 1) + + def test_large_batch_more_heavy(self): + self._test([ + FakeTest(0, True), + FakeTest(1, True), + FakeTest(2, True), + FakeTest(3, False), + FakeTest(4, True), + FakeTest(5, True), + FakeTest(6, False), + ], 4, 2) + + def test_small_batch_more_heavy(self): + self._test([ + FakeTest(0, True), + FakeTest(1, True), + FakeTest(2, True), + FakeTest(3, False), + FakeTest(4, True), + FakeTest(5, True), + FakeTest(6, False), + ], 2, 2) + +if __name__ == '__main__': + unittest.main() diff --git a/deps/v8/tools/testrunner/testproc/variant.py b/deps/v8/tools/testrunner/testproc/variant.py index 0164ad88452b47..be3484fb0fef68 100644 --- a/deps/v8/tools/testrunner/testproc/variant.py +++ b/deps/v8/tools/testrunner/testproc/variant.py @@ -42,8 +42,11 @@ def _next_test(self, test): return self._try_send_new_subtest(test, gen) def _result_for(self, test, subtest, result): - gen = self._next_variant[test.procid] - if not self._try_send_new_subtest(test, gen): + # The generator might have been removed after cycling through all subtests + # below. If some of the subtests are heavy, they get buffered and return + # their results later. + gen = self._next_variant.get(test.procid) + if not gen or not self._try_send_new_subtest(test, gen): self._send_result(test, None) def _try_send_new_subtest(self, test, variants_gen): diff --git a/deps/v8/tools/testrunner/trycatch_loader.js b/deps/v8/tools/testrunner/trycatch_loader.js index 737c8e45dbe202..28e2ba217e628f 100644 --- a/deps/v8/tools/testrunner/trycatch_loader.js +++ b/deps/v8/tools/testrunner/trycatch_loader.js @@ -19,7 +19,7 @@ var tests = arguments.slice(separator + 1) var preambleString = "" for (let jstest of preamble) { - preambleString += "load(\"" + jstest + "\");" + preambleString += "d8.file.execute(\"" + jstest + "\");" } for (let jstest of tests) { @@ -30,7 +30,7 @@ for (let jstest of tests) { (function () { let realm = Realm.create(); try { - Realm.eval(realm, preambleString + "load(\"" + jstest + "\");"); + Realm.eval(realm, preambleString + "d8.file.execute(\"" + jstest + "\");"); } catch (err) { // ignore all errors } diff --git a/deps/v8/tools/tick-processor.html b/deps/v8/tools/tick-processor.html index ecb794ec949c5b..97aaa2df5f5612 100644 --- a/deps/v8/tools/tick-processor.html +++ b/deps/v8/tools/tick-processor.html @@ -44,7 +44,7 @@
Type CountPercent