From 9a9cff170fb516c83756c6983c58a084b0e2693b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 21 Sep 2022 13:28:42 +0200 Subject: [PATCH 01/27] deps: update V8 to 10.7.193.13 --- deps/v8/.gitignore | 1 + deps/v8/.gn | 9 +- deps/v8/.mailmap | 2 + deps/v8/.vpython3 | 5 + deps/v8/AUTHORS | 7 + deps/v8/BUILD.bazel | 186 +- deps/v8/BUILD.gn | 753 +- deps/v8/DEPS | 166 +- deps/v8/ENG_REVIEW_OWNERS | 1 + deps/v8/INFRA_OWNERS | 5 +- deps/v8/LICENSE | 3 +- deps/v8/OWNERS | 17 +- deps/v8/PRESUBMIT.py | 14 +- deps/v8/WATCHLISTS | 2 + deps/v8/WORKSPACE | 16 - .../trace_event/common/trace_event_common.h | 25 +- deps/v8/bazel/BUILD.zlib | 69 - deps/v8/bazel/config/BUILD.bazel | 8 + deps/v8/bazel/defs.bzl | 1 - deps/v8/gni/OWNERS | 4 +- deps/v8/gni/proto_library.gni | 15 +- deps/v8/gni/protoc.py | 2 +- deps/v8/gni/release_branch_toggle.gni | 2 +- deps/v8/gni/snapshot_toolchain.gni | 8 +- deps/v8/gni/v8.cml | 21 + deps/v8/gni/v8.cmx | 52 - deps/v8/gni/v8.gni | 21 +- deps/v8/include/cppgc/common.h | 1 - .../include/cppgc/cross-thread-persistent.h | 15 +- deps/v8/include/cppgc/heap-consistency.h | 49 +- deps/v8/include/cppgc/heap-handle.h | 41 + deps/v8/include/cppgc/heap-statistics.h | 4 +- deps/v8/include/cppgc/heap.h | 10 +- .../v8/include/cppgc/internal/api-constants.h | 12 +- .../include/cppgc/internal/base-page-handle.h | 45 + .../cppgc/internal/caged-heap-local-data.h | 48 +- deps/v8/include/cppgc/internal/caged-heap.h | 61 + deps/v8/include/cppgc/internal/gc-info.h | 1 - .../include/cppgc/internal/member-storage.h | 236 + deps/v8/include/cppgc/internal/name-trait.h | 27 +- .../include/cppgc/internal/persistent-node.h | 24 +- .../include/cppgc/internal/pointer-policies.h | 35 +- .../v8/include/cppgc/internal/write-barrier.h | 226 +- deps/v8/include/cppgc/liveness-broker.h | 15 +- deps/v8/include/cppgc/member.h | 446 +- deps/v8/include/cppgc/name-provider.h | 8 +- deps/v8/include/cppgc/persistent.h | 14 +- deps/v8/include/cppgc/platform.h | 4 +- deps/v8/include/cppgc/sentinel-pointer.h | 2 +- deps/v8/include/cppgc/trace-trait.h | 4 + deps/v8/include/cppgc/type-traits.h | 9 + deps/v8/include/cppgc/visitor.h | 146 +- deps/v8/include/js_protocol.pdl | 113 +- deps/v8/include/v8-callbacks.h | 24 +- deps/v8/include/v8-context.h | 20 +- deps/v8/include/v8-cppgc.h | 15 +- deps/v8/include/v8-date.h | 5 + deps/v8/include/v8-embedder-heap.h | 11 +- deps/v8/include/v8-exception.h | 2 +- deps/v8/include/v8-fast-api-calls.h | 57 +- deps/v8/include/v8-function.h | 8 + deps/v8/include/v8-initialization.h | 72 +- deps/v8/include/v8-inspector.h | 20 +- deps/v8/include/v8-internal.h | 435 +- deps/v8/include/v8-isolate.h | 68 +- deps/v8/include/v8-local-handle.h | 10 +- deps/v8/include/v8-locker.h | 11 - deps/v8/include/v8-maybe.h | 25 +- deps/v8/include/v8-message.h | 6 +- deps/v8/include/v8-metrics.h | 58 +- deps/v8/include/v8-microtask-queue.h | 2 +- deps/v8/include/v8-object.h | 23 +- deps/v8/include/v8-persistent-handle.h | 4 +- deps/v8/include/v8-platform.h | 69 +- deps/v8/include/v8-primitive.h | 16 +- deps/v8/include/v8-profiler.h | 98 +- deps/v8/include/v8-regexp.h | 3 +- deps/v8/include/v8-script.h | 58 +- deps/v8/include/v8-template.h | 89 +- deps/v8/include/v8-unwinder-state.h | 8 +- deps/v8/include/v8-util.h | 6 +- deps/v8/include/v8-value-serializer.h | 69 +- deps/v8/include/v8-version.h | 6 +- deps/v8/include/v8-wasm.h | 67 +- deps/v8/include/v8-weak-callback-info.h | 7 - deps/v8/include/v8config.h | 260 +- deps/v8/infra/mb/PRESUBMIT.py | 2 +- deps/v8/infra/mb/gn_isolate_map.pyl | 2 +- deps/v8/infra/mb/mb_config.pyl | 146 +- deps/v8/infra/testing/builders.pyl | 302 +- deps/v8/samples/hello-world.cc | 6 - deps/v8/samples/process.cc | 6 - deps/v8/samples/shell.cc | 8 +- deps/v8/src/DEPS | 8 +- deps/v8/src/api/api-arguments-inl.h | 26 +- deps/v8/src/api/api-arguments.cc | 10 +- deps/v8/src/api/api-arguments.h | 33 +- deps/v8/src/api/api-inl.h | 19 +- deps/v8/src/api/api-macros-undef.h | 4 +- deps/v8/src/api/api-macros.h | 143 +- deps/v8/src/api/api-natives.cc | 3 - deps/v8/src/api/api-natives.h | 1 - deps/v8/src/api/api.cc | 4090 ++-- deps/v8/src/api/api.h | 13 +- deps/v8/src/asmjs/asm-js.cc | 2 +- deps/v8/src/asmjs/asm-scanner.h | 1 - deps/v8/src/asmjs/asm-types.cc | 3 - deps/v8/src/asmjs/asm-types.h | 1 - .../ast/ast-function-literal-id-reindexer.cc | 1 - .../ast/ast-function-literal-id-reindexer.h | 1 - deps/v8/src/ast/ast-source-ranges.h | 2 +- deps/v8/src/ast/ast-traversal-visitor.h | 1 + deps/v8/src/ast/ast-value-factory.cc | 4 - deps/v8/src/ast/ast-value-factory.h | 3 +- deps/v8/src/ast/ast.cc | 23 +- deps/v8/src/ast/ast.h | 18 +- deps/v8/src/ast/modules.cc | 21 +- deps/v8/src/ast/prettyprinter.cc | 5 +- deps/v8/src/ast/prettyprinter.h | 2 +- deps/v8/src/ast/scopes.cc | 17 +- deps/v8/src/ast/scopes.h | 4 +- deps/v8/src/ast/variables.cc | 1 - deps/v8/src/ast/variables.h | 1 - deps/v8/src/base/address-region.h | 21 +- deps/v8/src/base/atomic-utils.h | 32 +- deps/v8/src/base/atomicops.h | 15 +- .../atomicops_internals_atomicword_compat.h | 89 - deps/v8/src/base/bit-field.h | 15 +- deps/v8/src/base/bits-iterator.h | 2 +- deps/v8/src/base/bits.cc | 16 +- deps/v8/src/base/bits.h | 26 +- deps/v8/src/base/bounded-page-allocator.cc | 52 +- deps/v8/src/base/bounded-page-allocator.h | 25 +- deps/v8/src/base/bounds.h | 2 +- deps/v8/src/base/build_config.h | 228 +- deps/v8/src/base/compiler-specific.h | 8 +- deps/v8/src/base/container-utils.h | 92 + deps/v8/src/base/cpu.cc | 68 +- deps/v8/src/base/division-by-constant.cc | 4 +- .../base/emulated-virtual-address-subspace.cc | 7 +- .../base/emulated-virtual-address-subspace.h | 3 + deps/v8/src/base/file-utils.cc | 1 - deps/v8/src/base/free_deleter.h | 2 +- deps/v8/src/base/functional.cc | 110 - deps/v8/src/base/functional.h | 142 +- deps/v8/src/base/hashmap-entry.h | 4 +- deps/v8/src/base/hashmap.h | 6 +- deps/v8/src/base/ieee754.cc | 56 +- deps/v8/src/base/iterator.h | 37 +- deps/v8/src/base/macros.h | 34 +- deps/v8/src/base/memory.h | 1 - deps/v8/src/base/numbers/cached-powers.cc | 1 + deps/v8/src/base/numbers/cached-powers.h | 1 - deps/v8/src/base/numbers/diy-fp.h | 1 - deps/v8/src/base/numbers/double.h | 8 +- deps/v8/src/base/numbers/strtod.cc | 2 +- deps/v8/src/base/page-allocator.cc | 7 +- deps/v8/src/base/page-allocator.h | 3 + .../v8/src/base/platform/condition-variable.h | 2 +- .../platform}/memory-protection-key.cc | 136 +- .../src/base/platform/memory-protection-key.h | 95 + deps/v8/src/base/platform/memory.h | 160 + deps/v8/src/base/platform/mutex.cc | 36 +- deps/v8/src/base/platform/mutex.h | 26 +- deps/v8/src/base/platform/platform-cygwin.cc | 5 + deps/v8/src/base/platform/platform-fuchsia.cc | 28 +- deps/v8/src/base/platform/platform-linux.cc | 301 +- deps/v8/src/base/platform/platform-linux.h | 42 + deps/v8/src/base/platform/platform-posix.cc | 170 +- deps/v8/src/base/platform/platform-posix.h | 5 + .../src/base/platform/platform-starboard.cc | 5 + deps/v8/src/base/platform/platform-win32.cc | 76 +- deps/v8/src/base/platform/platform.h | 53 +- deps/v8/src/base/platform/semaphore.h | 3 +- deps/v8/src/base/platform/time.cc | 22 + deps/v8/src/base/platform/time.h | 12 +- deps/v8/src/base/platform/wrappers.h | 63 +- deps/v8/src/base/platform/yield-processor.h | 17 +- .../src/base/sanitizer/lsan-page-allocator.h | 9 + .../sanitizer/lsan-virtual-address-space.h | 5 + deps/v8/src/base/small-vector.h | 26 +- deps/v8/src/base/string-format.h | 181 + deps/v8/src/base/threaded-list.h | 58 +- .../src/base/utils/random-number-generator.cc | 4 +- .../src/base/utils/random-number-generator.h | 2 +- deps/v8/src/base/vector.h | 50 +- .../virtual-address-space-page-allocator.cc | 6 + .../virtual-address-space-page-allocator.h | 3 + deps/v8/src/base/virtual-address-space.cc | 21 +- deps/v8/src/base/virtual-address-space.h | 6 + .../baseline/arm/baseline-assembler-arm-inl.h | 117 +- .../baseline/arm/baseline-compiler-arm-inl.h | 7 +- .../arm64/baseline-assembler-arm64-inl.h | 151 +- .../arm64/baseline-compiler-arm64-inl.h | 7 +- deps/v8/src/baseline/baseline-assembler-inl.h | 23 +- deps/v8/src/baseline/baseline-assembler.h | 44 +- .../src/baseline/baseline-batch-compiler.cc | 145 +- .../v8/src/baseline/baseline-batch-compiler.h | 6 +- deps/v8/src/baseline/baseline-compiler.cc | 270 +- deps/v8/src/baseline/baseline-compiler.h | 35 +- deps/v8/src/baseline/baseline.cc | 8 +- .../src/baseline/bytecode-offset-iterator.h | 3 +- .../ia32/baseline-assembler-ia32-inl.h | 109 +- .../ia32/baseline-compiler-ia32-inl.h | 7 +- .../loong64/baseline-assembler-loong64-inl.h | 112 +- .../loong64/baseline-compiler-loong64-inl.h | 5 + .../mips/baseline-assembler-mips-inl.h | 526 - .../mips/baseline-compiler-mips-inl.h | 78 - .../mips64/baseline-assembler-mips64-inl.h | 112 +- .../mips64/baseline-compiler-mips64-inl.h | 5 + .../baseline/ppc/baseline-assembler-ppc-inl.h | 291 +- .../baseline/ppc/baseline-compiler-ppc-inl.h | 82 +- .../baseline-assembler-riscv-inl.h} | 154 +- .../baseline-compiler-riscv-inl.h} | 32 +- .../s390/baseline-assembler-s390-inl.h | 175 +- .../s390/baseline-compiler-s390-inl.h | 7 +- .../baseline/x64/baseline-assembler-x64-inl.h | 234 +- .../baseline/x64/baseline-compiler-x64-inl.h | 7 +- deps/v8/src/bigint/mul-fft.cc | 1 - deps/v8/src/bigint/tostring.cc | 3 +- deps/v8/src/builtins/accessors.cc | 75 +- deps/v8/src/builtins/accessors.h | 20 +- deps/v8/src/builtins/arm/builtins-arm.cc | 520 +- deps/v8/src/builtins/arm64/builtins-arm64.cc | 2176 +- deps/v8/src/builtins/array-at.tq | 36 +- deps/v8/src/builtins/array-copywithin.tq | 17 +- deps/v8/src/builtins/array-from.tq | 4 +- deps/v8/src/builtins/array-splice.tq | 92 +- deps/v8/src/builtins/array-to-reversed.tq | 102 + deps/v8/src/builtins/array-to-sorted.tq | 131 + deps/v8/src/builtins/array-to-spliced.tq | 238 + deps/v8/src/builtins/array-with.tq | 89 + deps/v8/src/builtins/base.tq | 71 +- deps/v8/src/builtins/builtins-api.cc | 139 +- deps/v8/src/builtins/builtins-array-gen.cc | 200 +- deps/v8/src/builtins/builtins-array-gen.h | 2 + deps/v8/src/builtins/builtins-array.cc | 72 +- deps/v8/src/builtins/builtins-arraybuffer.cc | 175 +- deps/v8/src/builtins/builtins-async-gen.cc | 2 +- deps/v8/src/builtins/builtins-async-gen.h | 1 + .../builtins/builtins-async-generator-gen.cc | 82 +- deps/v8/src/builtins/builtins-async-module.cc | 16 +- .../builtins-atomics-synchronization.cc | 183 + deps/v8/src/builtins/builtins-bigint-gen.h | 69 +- deps/v8/src/builtins/builtins-bigint.tq | 204 + deps/v8/src/builtins/builtins-call-gen.cc | 20 +- deps/v8/src/builtins/builtins-callsite.cc | 6 + .../src/builtins/builtins-collections-gen.cc | 101 +- deps/v8/src/builtins/builtins-console.cc | 2 +- .../src/builtins/builtins-constructor-gen.cc | 20 +- deps/v8/src/builtins/builtins-constructor.h | 7 +- deps/v8/src/builtins/builtins-dataview.cc | 55 +- deps/v8/src/builtins/builtins-date.cc | 42 +- deps/v8/src/builtins/builtins-definitions.h | 163 +- deps/v8/src/builtins/builtins-error.cc | 4 +- deps/v8/src/builtins/builtins-handler-gen.cc | 11 +- deps/v8/src/builtins/builtins-ic-gen.cc | 24 + deps/v8/src/builtins/builtins-internal-gen.cc | 298 +- .../src/builtins/builtins-interpreter-gen.cc | 11 + deps/v8/src/builtins/builtins-intl-gen.cc | 2 +- deps/v8/src/builtins/builtins-intl.cc | 117 +- deps/v8/src/builtins/builtins-iterator-gen.cc | 183 +- deps/v8/src/builtins/builtins-iterator-gen.h | 10 + deps/v8/src/builtins/builtins-lazy-gen.cc | 63 +- .../builtins/builtins-microtask-queue-gen.cc | 1 + deps/v8/src/builtins/builtins-object-gen.cc | 13 + deps/v8/src/builtins/builtins-object.cc | 11 +- deps/v8/src/builtins/builtins-reflect.cc | 2 +- deps/v8/src/builtins/builtins-regexp-gen.cc | 19 +- ...lm-gen.cc => builtins-shadow-realm-gen.cc} | 178 + ...dow-realms.cc => builtins-shadow-realm.cc} | 10 +- deps/v8/src/builtins/builtins-shared-array.cc | 42 + .../builtins-sharedarraybuffer-gen.cc | 254 +- .../builtins/builtins-sharedarraybuffer.cc | 8 +- deps/v8/src/builtins/builtins-string-gen.cc | 56 +- deps/v8/src/builtins/builtins-struct.cc | 31 +- deps/v8/src/builtins/builtins-temporal-gen.cc | 216 +- deps/v8/src/builtins/builtins-temporal.cc | 672 +- deps/v8/src/builtins/builtins-trace.cc | 12 +- .../src/builtins/builtins-typed-array-gen.cc | 34 +- deps/v8/src/builtins/builtins-utils-inl.h | 5 +- deps/v8/src/builtins/builtins-utils.h | 7 +- .../v8/src/builtins/builtins-web-snapshots.cc | 119 + deps/v8/src/builtins/builtins.cc | 108 +- deps/v8/src/builtins/builtins.h | 66 +- deps/v8/src/builtins/data-view.tq | 5 +- deps/v8/src/builtins/ia32/builtins-ia32.cc | 545 +- deps/v8/src/builtins/ic-callable.tq | 2 +- deps/v8/src/builtins/iterator.tq | 4 +- .../src/builtins/loong64/builtins-loong64.cc | 511 +- deps/v8/src/builtins/mips/builtins-mips.cc | 4213 ---- .../v8/src/builtins/mips64/builtins-mips64.cc | 517 +- deps/v8/src/builtins/number.tq | 17 +- deps/v8/src/builtins/ppc/builtins-ppc.cc | 621 +- deps/v8/src/builtins/profile-data-reader.cc | 56 +- deps/v8/src/builtins/profile-data-reader.h | 30 +- deps/v8/src/builtins/regexp.tq | 12 +- .../builtins-riscv.cc} | 995 +- deps/v8/src/builtins/s390/builtins-s390.cc | 519 +- .../src/builtins/setup-builtins-internal.cc | 23 +- deps/v8/src/builtins/string-slice.tq | 4 +- deps/v8/src/builtins/string-substr.tq | 2 +- deps/v8/src/builtins/torque-internal.tq | 11 + .../builtins/typed-array-createtypedarray.tq | 40 +- deps/v8/src/builtins/typed-array-from.tq | 4 +- deps/v8/src/builtins/typed-array-set.tq | 3 +- deps/v8/src/builtins/typed-array-slice.tq | 4 +- deps/v8/src/builtins/typed-array-subarray.tq | 65 +- .../src/builtins/typed-array-to-reversed.tq | 43 + deps/v8/src/builtins/typed-array-with.tq | 94 + deps/v8/src/builtins/typed-array.tq | 2 +- deps/v8/src/builtins/wasm.tq | 628 +- deps/v8/src/builtins/x64/builtins-x64.cc | 1005 +- deps/v8/src/codegen/arm/assembler-arm-inl.h | 9 +- deps/v8/src/codegen/arm/assembler-arm.cc | 125 +- deps/v8/src/codegen/arm/assembler-arm.h | 45 +- deps/v8/src/codegen/arm/constants-arm.h | 471 +- .../arm/interface-descriptors-arm-inl.h | 5 +- .../v8/src/codegen/arm/macro-assembler-arm.cc | 618 +- deps/v8/src/codegen/arm/macro-assembler-arm.h | 84 +- deps/v8/src/codegen/arm/register-arm.h | 6 +- .../src/codegen/arm64/assembler-arm64-inl.h | 73 +- deps/v8/src/codegen/arm64/assembler-arm64.cc | 86 +- deps/v8/src/codegen/arm64/assembler-arm64.h | 47 +- deps/v8/src/codegen/arm64/constants-arm64.h | 3530 +-- deps/v8/src/codegen/arm64/cpu-arm64.cc | 1 + deps/v8/src/codegen/arm64/decoder-arm64-inl.h | 3 +- .../arm64/instructions-arm64-constants.cc | 26 +- .../v8/src/codegen/arm64/instructions-arm64.h | 4 +- .../arm64/interface-descriptors-arm64-inl.h | 5 +- .../codegen/arm64/macro-assembler-arm64-inl.h | 50 +- .../codegen/arm64/macro-assembler-arm64.cc | 920 +- .../src/codegen/arm64/macro-assembler-arm64.h | 123 +- deps/v8/src/codegen/arm64/register-arm64.h | 2 +- deps/v8/src/codegen/arm64/utils-arm64.cc | 17 +- deps/v8/src/codegen/arm64/utils-arm64.h | 14 +- deps/v8/src/codegen/assembler-arch.h | 6 +- deps/v8/src/codegen/assembler-inl.h | 6 +- deps/v8/src/codegen/assembler.cc | 33 +- deps/v8/src/codegen/assembler.h | 112 +- deps/v8/src/codegen/background-merge-task.h | 89 + deps/v8/src/codegen/bailout-reason.h | 166 +- deps/v8/src/codegen/code-reference.cc | 56 +- deps/v8/src/codegen/code-reference.h | 36 +- deps/v8/src/codegen/code-stub-assembler.cc | 728 +- deps/v8/src/codegen/code-stub-assembler.h | 179 +- deps/v8/src/codegen/compilation-cache.cc | 296 +- deps/v8/src/codegen/compilation-cache.h | 122 +- deps/v8/src/codegen/compiler.cc | 1152 +- deps/v8/src/codegen/compiler.h | 65 +- deps/v8/src/codegen/constant-pool.cc | 4 +- deps/v8/src/codegen/constant-pool.h | 6 +- deps/v8/src/codegen/constants-arch.h | 6 +- deps/v8/src/codegen/cpu-features.h | 8 +- .../src/codegen/external-reference-encoder.cc | 2 +- .../src/codegen/external-reference-encoder.h | 2 + .../src/codegen/external-reference-table.cc | 10 +- .../v8/src/codegen/external-reference-table.h | 7 +- deps/v8/src/codegen/external-reference.cc | 102 +- deps/v8/src/codegen/external-reference.h | 76 +- .../v8/src/codegen/flush-instruction-cache.cc | 2 +- deps/v8/src/codegen/handler-table.cc | 6 + deps/v8/src/codegen/handler-table.h | 5 + deps/v8/src/codegen/ia32/assembler-ia32-inl.h | 15 +- deps/v8/src/codegen/ia32/assembler-ia32.cc | 62 +- deps/v8/src/codegen/ia32/assembler-ia32.h | 33 +- .../ia32/interface-descriptors-ia32-inl.h | 13 +- .../src/codegen/ia32/macro-assembler-ia32.cc | 437 +- .../src/codegen/ia32/macro-assembler-ia32.h | 95 +- deps/v8/src/codegen/ia32/reglist-ia32.h | 3 + deps/v8/src/codegen/ia32/sse-instr.h | 1 + .../src/codegen/interface-descriptors-inl.h | 42 +- deps/v8/src/codegen/interface-descriptors.cc | 2 +- deps/v8/src/codegen/interface-descriptors.h | 125 +- .../codegen/loong64/assembler-loong64-inl.h | 10 +- .../src/codegen/loong64/assembler-loong64.cc | 55 +- .../src/codegen/loong64/assembler-loong64.h | 46 +- .../src/codegen/loong64/constants-loong64.h | 11 +- .../interface-descriptors-loong64-inl.h | 5 +- .../loong64/macro-assembler-loong64.cc | 545 +- .../codegen/loong64/macro-assembler-loong64.h | 94 +- .../v8/src/codegen/loong64/register-loong64.h | 3 +- deps/v8/src/codegen/machine-type.cc | 2 + deps/v8/src/codegen/machine-type.h | 41 +- deps/v8/src/codegen/macro-assembler.h | 21 +- deps/v8/src/codegen/maglev-safepoint-table.cc | 248 + deps/v8/src/codegen/maglev-safepoint-table.h | 241 + deps/v8/src/codegen/mips/assembler-mips-inl.h | 353 - deps/v8/src/codegen/mips/assembler-mips.cc | 3853 ---- deps/v8/src/codegen/mips/assembler-mips.h | 1924 -- deps/v8/src/codegen/mips/constants-mips.cc | 144 - deps/v8/src/codegen/mips/constants-mips.h | 1924 -- deps/v8/src/codegen/mips/cpu-mips.cc | 45 - .../mips/interface-descriptors-mips-inl.h | 315 - .../src/codegen/mips/macro-assembler-mips.cc | 5638 ----- .../src/codegen/mips/macro-assembler-mips.h | 1202 -- deps/v8/src/codegen/mips/register-mips.h | 299 - deps/v8/src/codegen/mips/reglist-mips.h | 48 - .../src/codegen/mips64/assembler-mips64-inl.h | 13 +- .../v8/src/codegen/mips64/assembler-mips64.cc | 38 +- deps/v8/src/codegen/mips64/assembler-mips64.h | 24 +- deps/v8/src/codegen/mips64/constants-mips64.h | 8 +- .../mips64/interface-descriptors-mips64-inl.h | 5 +- .../codegen/mips64/macro-assembler-mips64.cc | 524 +- .../codegen/mips64/macro-assembler-mips64.h | 94 +- .../src/codegen/optimized-compilation-info.cc | 30 +- .../src/codegen/optimized-compilation-info.h | 8 +- .../src/codegen/pending-optimization-table.cc | 8 +- deps/v8/src/codegen/ppc/assembler-ppc-inl.h | 19 +- deps/v8/src/codegen/ppc/assembler-ppc.cc | 122 +- deps/v8/src/codegen/ppc/assembler-ppc.h | 40 +- deps/v8/src/codegen/ppc/constants-ppc.h | 3 +- .../ppc/interface-descriptors-ppc-inl.h | 20 +- .../v8/src/codegen/ppc/macro-assembler-ppc.cc | 1221 +- deps/v8/src/codegen/ppc/macro-assembler-ppc.h | 265 +- deps/v8/src/codegen/ppc/register-ppc.h | 97 +- deps/v8/src/codegen/ppc/reglist-ppc.h | 5 +- deps/v8/src/codegen/register-arch.h | 6 +- deps/v8/src/codegen/register-base.h | 14 +- deps/v8/src/codegen/register-configuration.cc | 71 +- deps/v8/src/codegen/register-configuration.h | 22 +- deps/v8/src/codegen/register.h | 5 +- deps/v8/src/codegen/reglist-base.h | 2 +- deps/v8/src/codegen/reglist.h | 13 +- deps/v8/src/codegen/reloc-info.cc | 54 +- deps/v8/src/codegen/reloc-info.h | 38 +- .../assembler-riscv-inl.h} | 75 +- deps/v8/src/codegen/riscv/assembler-riscv.cc | 1911 ++ deps/v8/src/codegen/riscv/assembler-riscv.h | 847 + .../src/codegen/riscv/base-assembler-riscv.cc | 492 + .../src/codegen/riscv/base-assembler-riscv.h | 192 + .../base-constants-riscv.cc} | 113 +- .../base-constants-riscv.h} | 1005 +- deps/v8/src/codegen/riscv/base-riscv-i.cc | 330 + deps/v8/src/codegen/riscv/base-riscv-i.h | 212 + deps/v8/src/codegen/riscv/constant-riscv-a.h | 43 + deps/v8/src/codegen/riscv/constant-riscv-c.h | 62 + deps/v8/src/codegen/riscv/constant-riscv-d.h | 55 + deps/v8/src/codegen/riscv/constant-riscv-f.h | 51 + deps/v8/src/codegen/riscv/constant-riscv-i.h | 73 + deps/v8/src/codegen/riscv/constant-riscv-m.h | 34 + deps/v8/src/codegen/riscv/constant-riscv-v.h | 493 + .../src/codegen/riscv/constant-riscv-zicsr.h | 30 + .../codegen/riscv/constant-riscv-zifencei.h | 15 + deps/v8/src/codegen/riscv/constants-riscv.h | 20 + .../cpu-riscv64.cc => riscv/cpu-riscv.cc} | 4 - .../v8/src/codegen/riscv/extension-riscv-a.cc | 121 + deps/v8/src/codegen/riscv/extension-riscv-a.h | 45 + .../v8/src/codegen/riscv/extension-riscv-c.cc | 276 + deps/v8/src/codegen/riscv/extension-riscv-c.h | 76 + .../v8/src/codegen/riscv/extension-riscv-d.cc | 165 + deps/v8/src/codegen/riscv/extension-riscv-d.h | 67 + .../v8/src/codegen/riscv/extension-riscv-f.cc | 156 + deps/v8/src/codegen/riscv/extension-riscv-f.h | 65 + .../v8/src/codegen/riscv/extension-riscv-m.cc | 66 + deps/v8/src/codegen/riscv/extension-riscv-m.h | 36 + .../v8/src/codegen/riscv/extension-riscv-v.cc | 889 + deps/v8/src/codegen/riscv/extension-riscv-v.h | 485 + .../codegen/riscv/extension-riscv-zicsr.cc | 44 + .../src/codegen/riscv/extension-riscv-zicsr.h | 56 + .../codegen/riscv/extension-riscv-zifencei.cc | 16 + .../codegen/riscv/extension-riscv-zifencei.h | 19 + .../interface-descriptors-riscv-inl.h} | 15 +- .../macro-assembler-riscv.cc} | 2149 +- .../macro-assembler-riscv.h} | 438 +- .../register-riscv.h} | 11 +- .../reglist-riscv.h} | 7 +- .../src/codegen/riscv64/assembler-riscv64.cc | 4095 ---- .../src/codegen/riscv64/assembler-riscv64.h | 1829 -- deps/v8/src/codegen/s390/assembler-s390-inl.h | 11 +- deps/v8/src/codegen/s390/assembler-s390.cc | 40 +- deps/v8/src/codegen/s390/assembler-s390.h | 26 +- .../s390/interface-descriptors-s390-inl.h | 5 +- .../src/codegen/s390/macro-assembler-s390.cc | 451 +- .../src/codegen/s390/macro-assembler-s390.h | 99 +- deps/v8/src/codegen/safepoint-table-base.h | 85 + deps/v8/src/codegen/safepoint-table.cc | 35 +- deps/v8/src/codegen/safepoint-table.h | 76 +- .../macro-assembler-shared-ia32-x64.cc | 15 + .../macro-assembler-shared-ia32-x64.h | 2 + deps/v8/src/codegen/signature.h | 2 +- deps/v8/src/codegen/source-position.h | 12 +- deps/v8/src/codegen/tick-counter.cc | 11 - deps/v8/src/codegen/tick-counter.h | 14 +- deps/v8/src/codegen/tnode.h | 7 +- deps/v8/src/codegen/turbo-assembler.cc | 3 +- deps/v8/src/codegen/turbo-assembler.h | 11 +- deps/v8/src/codegen/x64/assembler-x64-inl.h | 32 +- deps/v8/src/codegen/x64/assembler-x64.cc | 200 +- deps/v8/src/codegen/x64/assembler-x64.h | 94 +- .../x64/interface-descriptors-x64-inl.h | 7 +- .../v8/src/codegen/x64/macro-assembler-x64.cc | 815 +- deps/v8/src/codegen/x64/macro-assembler-x64.h | 153 +- deps/v8/src/codegen/x64/register-x64.h | 21 +- deps/v8/src/codegen/x64/sse-instr.h | 1 + deps/v8/src/common/allow-deprecated.h | 37 - deps/v8/src/common/checks.h | 13 +- deps/v8/src/common/code-memory-access-inl.h | 109 + deps/v8/src/common/code-memory-access.cc | 103 + deps/v8/src/common/code-memory-access.h | 169 + deps/v8/src/common/globals.h | 268 +- deps/v8/src/common/message-template.h | 68 +- .../lazy-compile-dispatcher.cc | 12 +- .../lazy-compile-dispatcher.h | 4 +- .../optimizing-compile-dispatcher.cc | 16 +- .../optimizing-compile-dispatcher.h | 4 +- deps/v8/src/compiler/OWNERS | 1 + deps/v8/src/compiler/access-builder.cc | 419 +- deps/v8/src/compiler/access-builder.h | 4 + deps/v8/src/compiler/access-info.cc | 27 +- .../compiler/add-type-assertions-reducer.cc | 2 +- .../compiler/add-type-assertions-reducer.h | 1 - deps/v8/src/compiler/allocation-builder-inl.h | 3 +- .../backend/arm/code-generator-arm.cc | 189 +- .../backend/arm/instruction-codes-arm.h | 2 - .../backend/arm/instruction-scheduler-arm.cc | 2 - .../backend/arm/instruction-selector-arm.cc | 14 +- .../backend/arm64/code-generator-arm64.cc | 253 +- .../backend/arm64/instruction-codes-arm64.h | 11 +- .../arm64/instruction-scheduler-arm64.cc | 6 +- .../arm64/instruction-selector-arm64.cc | 332 +- .../compiler/backend/code-generator-impl.h | 8 +- .../v8/src/compiler/backend/code-generator.cc | 64 +- deps/v8/src/compiler/backend/code-generator.h | 57 +- deps/v8/src/compiler/backend/gap-resolver.cc | 206 +- deps/v8/src/compiler/backend/gap-resolver.h | 17 + .../backend/ia32/code-generator-ia32.cc | 125 +- .../backend/ia32/instruction-codes-ia32.h | 4 +- .../ia32/instruction-scheduler-ia32.cc | 4 +- .../backend/ia32/instruction-selector-ia32.cc | 34 +- .../src/compiler/backend/instruction-codes.h | 106 +- .../backend/instruction-selector-impl.h | 13 +- .../compiler/backend/instruction-selector.cc | 138 +- .../compiler/backend/instruction-selector.h | 12 +- deps/v8/src/compiler/backend/instruction.cc | 25 +- deps/v8/src/compiler/backend/instruction.h | 76 +- .../backend/loong64/code-generator-loong64.cc | 262 +- .../loong64/instruction-codes-loong64.h | 725 +- .../loong64/instruction-selector-loong64.cc | 205 +- .../backend/mid-tier-register-allocator.cc | 495 +- .../backend/mid-tier-register-allocator.h | 4 +- .../backend/mips/code-generator-mips.cc | 4455 ---- .../backend/mips/instruction-codes-mips.h | 402 - .../mips/instruction-scheduler-mips.cc | 1806 -- .../backend/mips/instruction-selector-mips.cc | 2566 --- .../backend/mips64/code-generator-mips64.cc | 224 +- .../backend/mips64/instruction-codes-mips64.h | 2 - .../mips64/instruction-scheduler-mips64.cc | 2 - .../mips64/instruction-selector-mips64.cc | 67 +- .../backend/ppc/code-generator-ppc.cc | 1149 +- .../backend/ppc/instruction-codes-ppc.h | 2 - .../backend/ppc/instruction-scheduler-ppc.cc | 2 - .../backend/ppc/instruction-selector-ppc.cc | 207 +- .../compiler/backend/register-allocation.h | 2 + .../compiler/backend/register-allocator.cc | 43 +- .../src/compiler/backend/register-allocator.h | 35 +- .../code-generator-riscv.cc} | 800 +- .../backend/riscv/instruction-codes-riscv.h | 462 + .../instruction-scheduler-riscv.cc} | 255 +- .../riscv/instruction-selector-riscv.h | 1240 ++ .../riscv/instruction-selector-riscv32.cc | 1324 ++ .../instruction-selector-riscv64.cc | 1453 +- .../riscv64/instruction-codes-riscv64.h | 434 - .../backend/s390/code-generator-s390.cc | 170 +- .../backend/s390/instruction-codes-s390.h | 2 - .../s390/instruction-scheduler-s390.cc | 2 - .../backend/s390/instruction-selector-s390.cc | 66 +- deps/v8/src/compiler/backend/spill-placer.cc | 4 +- .../compiler/backend/unwinding-info-writer.h | 2 +- .../backend/x64/code-generator-x64.cc | 561 +- .../backend/x64/instruction-codes-x64.h | 66 +- .../backend/x64/instruction-scheduler-x64.cc | 7 +- .../backend/x64/instruction-selector-x64.cc | 498 +- .../src/compiler/basic-block-instrumentor.cc | 10 + .../compiler/branch-condition-duplicator.cc | 1 - deps/v8/src/compiler/branch-elimination.cc | 342 +- deps/v8/src/compiler/branch-elimination.h | 120 +- deps/v8/src/compiler/bytecode-analysis.h | 1 - .../v8/src/compiler/bytecode-graph-builder.cc | 264 +- deps/v8/src/compiler/bytecode-graph-builder.h | 7 +- deps/v8/src/compiler/c-linkage.cc | 76 +- deps/v8/src/compiler/checkpoint-elimination.h | 1 - deps/v8/src/compiler/code-assembler.cc | 29 +- deps/v8/src/compiler/code-assembler.h | 40 +- deps/v8/src/compiler/common-node-cache.cc | 4 +- deps/v8/src/compiler/common-node-cache.h | 6 +- .../src/compiler/common-operator-reducer.cc | 11 +- .../v8/src/compiler/common-operator-reducer.h | 1 - deps/v8/src/compiler/common-operator.cc | 29 +- deps/v8/src/compiler/common-operator.h | 26 +- .../src/compiler/compilation-dependencies.cc | 68 +- .../src/compiler/compilation-dependencies.h | 8 +- .../compiler-source-position-table.cc | 9 + .../compiler/compiler-source-position-table.h | 7 +- deps/v8/src/compiler/control-flow-optimizer.h | 1 - deps/v8/src/compiler/control-path-state.h | 258 + deps/v8/src/compiler/csa-load-elimination.cc | 40 +- deps/v8/src/compiler/csa-load-elimination.h | 4 +- deps/v8/src/compiler/dead-code-elimination.cc | 1 - deps/v8/src/compiler/dead-code-elimination.h | 1 - .../src/compiler/decompression-optimizer.cc | 50 + .../v8/src/compiler/decompression-optimizer.h | 2 + .../src/compiler/effect-control-linearizer.cc | 635 +- .../src/compiler/escape-analysis-reducer.cc | 1 - .../v8/src/compiler/escape-analysis-reducer.h | 1 - deps/v8/src/compiler/escape-analysis.cc | 42 +- deps/v8/src/compiler/fast-api-calls.cc | 276 +- deps/v8/src/compiler/fast-api-calls.h | 17 + deps/v8/src/compiler/frame-states.cc | 4 +- deps/v8/src/compiler/frame-states.h | 5 +- deps/v8/src/compiler/frame.cc | 4 - deps/v8/src/compiler/globals.h | 6 +- deps/v8/src/compiler/graph-assembler.cc | 11 +- deps/v8/src/compiler/graph-assembler.h | 8 +- deps/v8/src/compiler/graph-reducer.h | 1 - deps/v8/src/compiler/graph-trimmer.h | 1 - deps/v8/src/compiler/graph-visualizer.cc | 47 +- deps/v8/src/compiler/graph-visualizer.h | 11 + deps/v8/src/compiler/graph.cc | 2 - deps/v8/src/compiler/graph.h | 1 - deps/v8/src/compiler/heap-refs.cc | 91 +- deps/v8/src/compiler/heap-refs.h | 27 +- deps/v8/src/compiler/int64-lowering.cc | 239 +- deps/v8/src/compiler/int64-lowering.h | 16 +- deps/v8/src/compiler/js-call-reducer.cc | 295 +- deps/v8/src/compiler/js-call-reducer.h | 5 +- .../src/compiler/js-context-specialization.cc | 1 - deps/v8/src/compiler/js-create-lowering.cc | 55 +- deps/v8/src/compiler/js-generic-lowering.cc | 59 +- deps/v8/src/compiler/js-generic-lowering.h | 1 - deps/v8/src/compiler/js-graph.cc | 8 +- deps/v8/src/compiler/js-graph.h | 3 +- deps/v8/src/compiler/js-heap-broker.cc | 44 +- deps/v8/src/compiler/js-heap-broker.h | 7 +- deps/v8/src/compiler/js-inlining-heuristic.cc | 4 +- deps/v8/src/compiler/js-inlining-heuristic.h | 6 +- deps/v8/src/compiler/js-inlining.cc | 20 +- deps/v8/src/compiler/js-inlining.h | 8 +- deps/v8/src/compiler/js-intrinsic-lowering.cc | 8 +- deps/v8/src/compiler/js-intrinsic-lowering.h | 1 - .../js-native-context-specialization.cc | 463 +- .../js-native-context-specialization.h | 8 +- 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 | 27 +- deps/v8/src/compiler/js-type-hint-lowering.h | 1 - deps/v8/src/compiler/js-typed-lowering.cc | 44 +- deps/v8/src/compiler/js-typed-lowering.h | 2 - deps/v8/src/compiler/late-escape-analysis.cc | 145 + deps/v8/src/compiler/late-escape-analysis.h | 46 + deps/v8/src/compiler/linear-scheduler.cc | 124 + deps/v8/src/compiler/linear-scheduler.h | 67 + deps/v8/src/compiler/linkage.cc | 3 - deps/v8/src/compiler/linkage.h | 23 +- deps/v8/src/compiler/load-elimination.cc | 11 +- deps/v8/src/compiler/load-elimination.h | 13 +- deps/v8/src/compiler/loop-analysis.cc | 1 + deps/v8/src/compiler/loop-unrolling.cc | 39 +- .../v8/src/compiler/machine-graph-verifier.cc | 29 +- deps/v8/src/compiler/machine-graph-verifier.h | 2 - deps/v8/src/compiler/machine-graph.cc | 1 - deps/v8/src/compiler/machine-graph.h | 24 +- .../src/compiler/machine-operator-reducer.cc | 313 +- .../src/compiler/machine-operator-reducer.h | 28 +- deps/v8/src/compiler/machine-operator.cc | 545 +- deps/v8/src/compiler/machine-operator.h | 90 +- deps/v8/src/compiler/map-inference.h | 2 - deps/v8/src/compiler/memory-lowering.cc | 119 +- deps/v8/src/compiler/memory-lowering.h | 4 +- deps/v8/src/compiler/memory-optimizer.cc | 13 +- deps/v8/src/compiler/node-aux-data.h | 33 +- deps/v8/src/compiler/node-origin-table.cc | 12 + deps/v8/src/compiler/node-origin-table.h | 14 +- deps/v8/src/compiler/node-properties.cc | 36 +- deps/v8/src/compiler/node-properties.h | 6 - deps/v8/src/compiler/node.cc | 4 +- deps/v8/src/compiler/opcodes.h | 49 +- deps/v8/src/compiler/operation-typer.cc | 46 +- deps/v8/src/compiler/operation-typer.h | 1 - deps/v8/src/compiler/operator-properties.h | 1 - deps/v8/src/compiler/operator.h | 1 - deps/v8/src/compiler/osr.cc | 4 +- deps/v8/src/compiler/osr.h | 2 +- .../src/compiler/per-isolate-compiler-cache.h | 1 - deps/v8/src/compiler/persistent-map.h | 40 +- deps/v8/src/compiler/pipeline-statistics.cc | 8 +- deps/v8/src/compiler/pipeline-statistics.h | 5 +- deps/v8/src/compiler/pipeline.cc | 376 +- deps/v8/src/compiler/pipeline.h | 12 +- deps/v8/src/compiler/processed-feedback.h | 15 +- .../src/compiler/property-access-builder.cc | 8 +- .../v8/src/compiler/property-access-builder.h | 1 - deps/v8/src/compiler/raw-machine-assembler.cc | 1 - deps/v8/src/compiler/raw-machine-assembler.h | 14 +- .../v8/src/compiler/redundancy-elimination.cc | 8 + deps/v8/src/compiler/refs-map.h | 1 - deps/v8/src/compiler/representation-change.cc | 5 +- deps/v8/src/compiler/schedule.cc | 8 +- deps/v8/src/compiler/scheduler.cc | 23 +- deps/v8/src/compiler/scheduler.h | 3 - deps/v8/src/compiler/select-lowering.cc | 2 - .../compiler/simplified-lowering-verifier.cc | 378 +- deps/v8/src/compiler/simplified-lowering.cc | 119 +- .../compiler/simplified-operator-reducer.cc | 1 - .../compiler/simplified-operator-reducer.h | 3 +- deps/v8/src/compiler/simplified-operator.cc | 146 +- deps/v8/src/compiler/simplified-operator.h | 50 +- deps/v8/src/compiler/state-values-utils.cc | 1 - deps/v8/src/compiler/state-values-utils.h | 1 - .../src/compiler/store-store-elimination.cc | 204 +- deps/v8/src/compiler/turboshaft/assembler.h | 466 + .../turboshaft/decompression-optimization.cc | 221 + .../turboshaft/decompression-optimization.h | 25 + deps/v8/src/compiler/turboshaft/deopt-data.h | 139 + deps/v8/src/compiler/turboshaft/fast-hash.h | 73 + .../src/compiler/turboshaft/graph-builder.cc | 708 + .../src/compiler/turboshaft/graph-builder.h | 23 + .../compiler/turboshaft/graph-visualizer.cc | 118 + .../compiler/turboshaft/graph-visualizer.h | 57 + deps/v8/src/compiler/turboshaft/graph.cc | 194 + deps/v8/src/compiler/turboshaft/graph.h | 722 + deps/v8/src/compiler/turboshaft/operations.cc | 512 + deps/v8/src/compiler/turboshaft/operations.h | 1685 ++ .../compiler/turboshaft/optimization-phase.cc | 26 + .../compiler/turboshaft/optimization-phase.h | 552 + .../compiler/turboshaft/recreate-schedule.cc | 1131 + .../compiler/turboshaft/recreate-schedule.h | 35 + deps/v8/src/compiler/turboshaft/sidetable.h | 92 + deps/v8/src/compiler/turboshaft/utils.h | 91 + .../turboshaft/value-numbering-assembler.h | 269 + deps/v8/src/compiler/type-cache.h | 1 - deps/v8/src/compiler/typed-optimization.cc | 40 +- deps/v8/src/compiler/typed-optimization.h | 1 - deps/v8/src/compiler/typer.cc | 19 +- deps/v8/src/compiler/typer.h | 1 - deps/v8/src/compiler/types.cc | 48 +- deps/v8/src/compiler/types.h | 46 +- .../src/compiler/value-numbering-reducer.cc | 1 - deps/v8/src/compiler/verifier.cc | 50 +- deps/v8/src/compiler/verifier.h | 1 - .../src/compiler/wasm-compiler-definitions.h | 46 + deps/v8/src/compiler/wasm-compiler.cc | 2571 ++- deps/v8/src/compiler/wasm-compiler.h | 221 +- deps/v8/src/compiler/wasm-escape-analysis.cc | 2 +- deps/v8/src/compiler/wasm-gc-lowering.cc | 310 + deps/v8/src/compiler/wasm-gc-lowering.h | 52 + .../src/compiler/wasm-gc-operator-reducer.cc | 346 + .../src/compiler/wasm-gc-operator-reducer.h | 82 + deps/v8/src/compiler/wasm-graph-assembler.cc | 395 + deps/v8/src/compiler/wasm-graph-assembler.h | 281 + deps/v8/src/compiler/wasm-inlining.cc | 162 +- deps/v8/src/compiler/wasm-inlining.h | 14 +- deps/v8/src/compiler/wasm-loop-peeling.cc | 3 - deps/v8/src/compiler/wasm-loop-peeling.h | 3 +- deps/v8/src/compiler/wasm-typer.cc | 299 + deps/v8/src/compiler/wasm-typer.h | 39 + deps/v8/src/compiler/zone-stats.h | 1 - deps/v8/src/d8/OWNERS | 1 + deps/v8/src/d8/async-hooks-wrapper.cc | 12 +- deps/v8/src/d8/async-hooks-wrapper.h | 3 +- deps/v8/src/d8/cov.cc | 2 +- deps/v8/src/d8/d8-console.cc | 2 +- deps/v8/src/d8/d8-console.h | 3 +- deps/v8/src/d8/d8-platforms.cc | 23 +- deps/v8/src/d8/d8-posix.cc | 3 +- deps/v8/src/d8/d8-test.cc | 313 +- deps/v8/src/d8/d8.cc | 897 +- deps/v8/src/d8/d8.h | 62 +- deps/v8/src/date/date.cc | 18 +- deps/v8/src/date/date.h | 1 + deps/v8/src/debug/debug-coverage.cc | 2 - deps/v8/src/debug/debug-coverage.h | 1 - deps/v8/src/debug/debug-evaluate.cc | 28 +- deps/v8/src/debug/debug-evaluate.h | 2 +- deps/v8/src/debug/debug-interface.cc | 326 +- deps/v8/src/debug/debug-interface.h | 42 +- deps/v8/src/debug/debug-property-iterator.cc | 22 +- deps/v8/src/debug/debug-scope-iterator.cc | 3 - deps/v8/src/debug/debug-scopes.cc | 267 +- deps/v8/src/debug/debug-scopes.h | 9 +- .../src/debug/debug-stack-trace-iterator.cc | 72 +- .../v8/src/debug/debug-stack-trace-iterator.h | 7 + deps/v8/src/debug/debug-type-profile.h | 1 - deps/v8/src/debug/debug-wasm-objects.cc | 197 +- deps/v8/src/debug/debug.cc | 98 +- deps/v8/src/debug/debug.h | 38 +- deps/v8/src/debug/interface-types.h | 2 +- deps/v8/src/debug/liveedit-diff.cc | 625 + deps/v8/src/debug/liveedit-diff.h | 50 + deps/v8/src/debug/liveedit.cc | 290 +- deps/v8/src/debug/liveedit.h | 1 + .../debug/wasm/gdb-server/gdb-remote-util.h | 2 +- .../wasm/gdb-server/gdb-server-thread.cc | 2 + deps/v8/src/debug/wasm/gdb-server/target.h | 4 +- .../v8/src/debug/wasm/gdb-server/transport.cc | 2 - .../wasm/gdb-server/wasm-module-debug.cc | 9 +- .../debug/wasm/gdb-server/wasm-module-debug.h | 2 +- deps/v8/src/deoptimizer/OWNERS | 2 + .../v8/src/deoptimizer/arm/deoptimizer-arm.cc | 2 +- .../deoptimizer/arm64/deoptimizer-arm64.cc | 8 +- deps/v8/src/deoptimizer/deoptimize-reason.h | 13 +- .../deoptimizer/deoptimizer-cfi-builtins.cc | 17 +- .../src/deoptimizer/deoptimizer-cfi-empty.cc | 4 +- deps/v8/src/deoptimizer/deoptimizer.cc | 184 +- deps/v8/src/deoptimizer/deoptimizer.h | 20 +- deps/v8/src/deoptimizer/frame-description.h | 9 +- .../src/deoptimizer/mips/deoptimizer-mips.cc | 34 - .../v8/src/deoptimizer/ppc/deoptimizer-ppc.cc | 4 +- .../deoptimizer-riscv.cc} | 0 .../src/deoptimizer/s390/deoptimizer-s390.cc | 2 +- deps/v8/src/deoptimizer/translated-state.cc | 109 +- deps/v8/src/deoptimizer/translated-state.h | 4 +- deps/v8/src/deoptimizer/translation-array.cc | 167 +- deps/v8/src/deoptimizer/translation-array.h | 12 +- deps/v8/src/deoptimizer/translation-opcode.h | 10 +- .../v8/src/deoptimizer/x64/deoptimizer-x64.cc | 2 +- .../src/diagnostics/basic-block-profiler.cc | 81 +- .../v8/src/diagnostics/basic-block-profiler.h | 7 +- deps/v8/src/diagnostics/code-tracer.h | 2 +- .../src/diagnostics/compilation-statistics.h | 1 + deps/v8/src/diagnostics/disassembler.cc | 52 +- ...-metadata-win.h => etw-jit-metadata-win.h} | 29 +- deps/v8/src/diagnostics/etw-jit-win.cc | 352 + .../{system-jit-win.h => etw-jit-win.h} | 10 +- deps/v8/src/diagnostics/gdb-jit.cc | 7 +- deps/v8/src/diagnostics/ia32/disasm-ia32.cc | 8 +- deps/v8/src/diagnostics/mips/disasm-mips.cc | 2736 --- deps/v8/src/diagnostics/mips/unwinder-mips.cc | 14 - deps/v8/src/diagnostics/objects-debug.cc | 141 +- deps/v8/src/diagnostics/objects-printer.cc | 349 +- deps/v8/src/diagnostics/perf-jit.cc | 83 +- deps/v8/src/diagnostics/perf-jit.h | 13 +- deps/v8/src/diagnostics/ppc/disasm-ppc.cc | 48 +- .../disasm-riscv.cc} | 523 +- .../unwinder-riscv.cc} | 0 deps/v8/src/diagnostics/system-jit-win.cc | 134 - .../src/diagnostics/unwinding-info-win64.cc | 35 +- deps/v8/src/diagnostics/x64/disasm-x64.cc | 34 +- deps/v8/src/execution/arguments.h | 34 +- .../src/execution/arm/frame-constants-arm.h | 28 +- deps/v8/src/execution/arm/simulator-arm.cc | 82 +- .../execution/arm64/frame-constants-arm64.cc | 2 +- .../execution/arm64/frame-constants-arm64.h | 33 +- .../src/execution/arm64/pointer-auth-arm64.cc | 2 +- .../arm64/pointer-authentication-arm64.h | 45 +- .../v8/src/execution/arm64/simulator-arm64.cc | 61 +- deps/v8/src/execution/arm64/simulator-arm64.h | 11 +- .../execution/arm64/simulator-logic-arm64.cc | 16 +- deps/v8/src/execution/clobber-registers.cc | 34 +- deps/v8/src/execution/execution.cc | 40 +- deps/v8/src/execution/execution.h | 5 +- deps/v8/src/execution/frame-constants.h | 11 +- deps/v8/src/execution/frames-inl.h | 36 +- deps/v8/src/execution/frames.cc | 1249 +- deps/v8/src/execution/frames.h | 177 +- deps/v8/src/execution/futex-emulation.cc | 8 +- .../src/execution/ia32/frame-constants-ia32.h | 20 +- deps/v8/src/execution/isolate-data.h | 87 +- deps/v8/src/execution/isolate-inl.h | 52 + deps/v8/src/execution/isolate-utils-inl.h | 2 +- deps/v8/src/execution/isolate.cc | 1015 +- deps/v8/src/execution/isolate.h | 237 +- deps/v8/src/execution/local-isolate.cc | 5 +- deps/v8/src/execution/local-isolate.h | 9 +- .../loong64/frame-constants-loong64.h | 29 +- .../execution/loong64/simulator-loong64.cc | 354 +- .../src/execution/loong64/simulator-loong64.h | 73 +- deps/v8/src/execution/messages.cc | 16 +- deps/v8/src/execution/messages.h | 5 +- deps/v8/src/execution/microtask-queue.cc | 10 +- .../execution/mips/frame-constants-mips.cc | 32 - .../src/execution/mips/frame-constants-mips.h | 84 - deps/v8/src/execution/mips/simulator-mips.cc | 7295 ------- deps/v8/src/execution/mips/simulator-mips.h | 719 - .../execution/mips64/frame-constants-mips64.h | 28 +- .../src/execution/mips64/simulator-mips64.cc | 452 +- .../src/execution/mips64/simulator-mips64.h | 66 +- .../execution/pointer-authentication-dummy.h | 14 +- .../v8/src/execution/pointer-authentication.h | 3 +- .../src/execution/ppc/frame-constants-ppc.cc | 2 +- .../src/execution/ppc/frame-constants-ppc.h | 31 +- deps/v8/src/execution/ppc/simulator-ppc.cc | 182 +- deps/v8/src/execution/ppc/simulator-ppc.h | 13 +- deps/v8/src/execution/protectors.cc | 8 +- .../frame-constants-riscv.cc} | 7 +- .../frame-constants-riscv.h} | 28 +- .../simulator-riscv.cc} | 1174 +- .../simulator-riscv.h} | 252 +- .../src/execution/s390/frame-constants-s390.h | 22 +- deps/v8/src/execution/s390/simulator-s390.cc | 135 +- deps/v8/src/execution/s390/simulator-s390.h | 34 - deps/v8/src/execution/simulator-base.cc | 6 + deps/v8/src/execution/simulator-base.h | 36 +- deps/v8/src/execution/simulator.h | 9 +- deps/v8/src/execution/stack-guard.cc | 9 +- deps/v8/src/execution/stack-guard.h | 9 +- deps/v8/src/execution/thread-local-top.cc | 10 +- deps/v8/src/execution/thread-local-top.h | 14 +- deps/v8/src/execution/tiering-manager.cc | 202 +- deps/v8/src/execution/tiering-manager.h | 13 +- deps/v8/src/execution/v8threads.cc | 12 +- .../src/execution/x64/frame-constants-x64.h | 24 +- .../externalize-string-extension.cc | 17 +- deps/v8/src/extensions/gc-extension.cc | 5 +- deps/v8/src/flags/flag-definitions.h | 545 +- deps/v8/src/flags/flags.cc | 435 +- deps/v8/src/flags/flags.h | 101 +- deps/v8/src/handles/global-handles-inl.h | 6 + deps/v8/src/handles/global-handles.cc | 969 +- deps/v8/src/handles/global-handles.h | 117 +- deps/v8/src/handles/handles.h | 4 +- deps/v8/src/handles/persistent-handles.cc | 5 +- deps/v8/src/handles/persistent-handles.h | 3 + .../handles/shared-object-conveyor-handles.cc | 25 + .../handles/shared-object-conveyor-handles.h | 56 + deps/v8/src/heap/allocation-result.h | 2 +- deps/v8/src/heap/array-buffer-sweeper.cc | 2 +- ...gisters_masm.S => push_registers_masm.asm} | 0 .../heap/base/asm/mips/push_registers_asm.cc | 48 - .../heap/base/asm/ppc/push_registers_asm.cc | 2 +- .../{riscv64 => riscv}/push_registers_asm.cc | 42 + .../heap/base/asm/x64/push_registers_asm.cc | 2 +- ...gisters_masm.S => push_registers_masm.asm} | 0 deps/v8/src/heap/base/stack.cc | 12 - deps/v8/src/heap/base/stack.h | 13 +- deps/v8/src/heap/base/worklist.cc | 12 +- deps/v8/src/heap/base/worklist.h | 367 +- deps/v8/src/heap/basic-memory-chunk.cc | 40 +- deps/v8/src/heap/basic-memory-chunk.h | 89 +- deps/v8/src/heap/code-object-registry.cc | 35 +- deps/v8/src/heap/code-object-registry.h | 10 +- deps/v8/src/heap/code-range.cc | 104 +- deps/v8/src/heap/code-stats.cc | 27 +- deps/v8/src/heap/code-stats.h | 3 +- deps/v8/src/heap/concurrent-allocator-inl.h | 29 +- deps/v8/src/heap/concurrent-allocator.cc | 60 +- deps/v8/src/heap/concurrent-allocator.h | 29 +- deps/v8/src/heap/concurrent-marking.cc | 735 +- deps/v8/src/heap/concurrent-marking.h | 41 +- .../v8/src/heap/conservative-stack-visitor.cc | 35 +- deps/v8/src/heap/cppgc-js/cpp-heap.cc | 172 +- deps/v8/src/heap/cppgc-js/cpp-heap.h | 21 +- deps/v8/src/heap/cppgc-js/cpp-snapshot.cc | 41 +- .../cppgc-js/unified-heap-marking-state-inl.h | 14 +- .../cppgc-js/unified-heap-marking-state.cc | 6 +- .../cppgc-js/unified-heap-marking-state.h | 2 +- .../cppgc-js/unified-heap-marking-visitor.cc | 15 - .../cppgc-js/unified-heap-marking-visitor.h | 29 +- deps/v8/src/heap/cppgc/allocation.cc | 4 +- .../src/heap/cppgc/caged-heap-local-data.cc | 57 +- deps/v8/src/heap/cppgc/caged-heap.cc | 111 +- deps/v8/src/heap/cppgc/caged-heap.h | 38 +- deps/v8/src/heap/cppgc/compactor.cc | 40 +- deps/v8/src/heap/cppgc/compactor.h | 5 +- deps/v8/src/heap/cppgc/concurrent-marker.cc | 8 +- deps/v8/src/heap/cppgc/concurrent-marker.h | 1 + deps/v8/src/heap/cppgc/explicit-management.cc | 17 +- deps/v8/src/heap/cppgc/gc-info-table.cc | 52 +- deps/v8/src/heap/cppgc/gc-info-table.h | 11 +- deps/v8/src/heap/cppgc/gc-info.cc | 2 +- deps/v8/src/heap/cppgc/globals.h | 4 + deps/v8/src/heap/cppgc/heap-base.cc | 119 +- deps/v8/src/heap/cppgc/heap-base.h | 70 +- deps/v8/src/heap/cppgc/heap-object-header.cc | 11 +- deps/v8/src/heap/cppgc/heap-object-header.h | 2 +- deps/v8/src/heap/cppgc/heap-page.cc | 38 +- deps/v8/src/heap/cppgc/heap-page.h | 24 +- .../heap/cppgc/heap-statistics-collector.cc | 14 +- deps/v8/src/heap/cppgc/heap.cc | 17 +- deps/v8/src/heap/cppgc/heap.h | 3 + deps/v8/src/heap/cppgc/marker.cc | 131 +- deps/v8/src/heap/cppgc/marker.h | 7 + deps/v8/src/heap/cppgc/marking-state.cc | 2 +- deps/v8/src/heap/cppgc/marking-state.h | 35 +- deps/v8/src/heap/cppgc/marking-verifier.cc | 18 +- deps/v8/src/heap/cppgc/marking-visitor.cc | 22 +- deps/v8/src/heap/cppgc/marking-visitor.h | 26 +- deps/v8/src/heap/cppgc/marking-worklists.cc | 1 + deps/v8/src/heap/cppgc/marking-worklists.h | 6 + deps/v8/src/heap/cppgc/member-storage.cc | 15 + deps/v8/src/heap/cppgc/member-storage.h | 33 + deps/v8/src/heap/cppgc/object-allocator.cc | 115 +- deps/v8/src/heap/cppgc/object-allocator.h | 21 +- deps/v8/src/heap/cppgc/object-start-bitmap.h | 5 +- deps/v8/src/heap/cppgc/object-view.h | 2 +- deps/v8/src/heap/cppgc/page-memory.cc | 145 +- deps/v8/src/heap/cppgc/page-memory.h | 27 +- deps/v8/src/heap/cppgc/persistent-node.cc | 10 +- deps/v8/src/heap/cppgc/platform.cc | 37 +- deps/v8/src/heap/cppgc/platform.h | 3 + deps/v8/src/heap/cppgc/pointer-policies.cc | 1 - deps/v8/src/heap/cppgc/remembered-set.cc | 79 +- deps/v8/src/heap/cppgc/remembered-set.h | 4 + deps/v8/src/heap/cppgc/stats-collector.cc | 67 +- deps/v8/src/heap/cppgc/stats-collector.h | 11 +- deps/v8/src/heap/cppgc/sweeper.cc | 62 +- deps/v8/src/heap/cppgc/trace-event.h | 10 +- deps/v8/src/heap/cppgc/visitor.cc | 83 +- deps/v8/src/heap/cppgc/visitor.h | 28 +- deps/v8/src/heap/cppgc/write-barrier.cc | 92 +- deps/v8/src/heap/cppgc/write-barrier.h | 32 +- deps/v8/src/heap/embedder-tracing.cc | 32 +- deps/v8/src/heap/embedder-tracing.h | 25 +- deps/v8/src/heap/evacuation-allocator-inl.h | 9 +- deps/v8/src/heap/factory-base-inl.h | 8 + deps/v8/src/heap/factory-base.cc | 200 +- deps/v8/src/heap/factory-base.h | 48 +- deps/v8/src/heap/factory-inl.h | 33 +- deps/v8/src/heap/factory.cc | 974 +- deps/v8/src/heap/factory.h | 147 +- deps/v8/src/heap/free-list.cc | 47 +- deps/v8/src/heap/free-list.h | 50 +- deps/v8/src/heap/gc-callbacks.h | 78 + deps/v8/src/heap/gc-idle-time-handler.cc | 4 +- deps/v8/src/heap/gc-tracer-inl.h | 47 +- deps/v8/src/heap/gc-tracer.cc | 246 +- deps/v8/src/heap/gc-tracer.h | 28 +- .../src/heap/global-handle-marking-visitor.cc | 51 + .../src/heap/global-handle-marking-visitor.h | 36 + deps/v8/src/heap/heap-allocator-inl.h | 22 +- deps/v8/src/heap/heap-allocator.cc | 47 +- deps/v8/src/heap/heap-allocator.h | 18 +- deps/v8/src/heap/heap-controller.cc | 8 +- deps/v8/src/heap/heap-inl.h | 124 +- deps/v8/src/heap/heap-layout-tracer.cc | 34 +- deps/v8/src/heap/heap-layout-tracer.h | 3 +- deps/v8/src/heap/heap-verifier.cc | 493 + deps/v8/src/heap/heap-verifier.h | 72 + deps/v8/src/heap/heap-write-barrier-inl.h | 227 +- deps/v8/src/heap/heap-write-barrier.cc | 47 +- deps/v8/src/heap/heap-write-barrier.h | 37 +- deps/v8/src/heap/heap.cc | 1868 +- deps/v8/src/heap/heap.h | 487 +- deps/v8/src/heap/incremental-marking-inl.h | 25 +- deps/v8/src/heap/incremental-marking-job.cc | 112 +- deps/v8/src/heap/incremental-marking-job.h | 28 +- deps/v8/src/heap/incremental-marking.cc | 755 +- deps/v8/src/heap/incremental-marking.h | 201 +- deps/v8/src/heap/invalidated-slots-inl.h | 49 +- deps/v8/src/heap/invalidated-slots.cc | 34 +- deps/v8/src/heap/invalidated-slots.h | 33 +- deps/v8/src/heap/large-spaces.cc | 167 +- deps/v8/src/heap/large-spaces.h | 27 +- deps/v8/src/heap/linear-allocation-area.h | 11 +- deps/v8/src/heap/local-factory-inl.h | 7 - deps/v8/src/heap/local-factory.cc | 14 +- deps/v8/src/heap/local-factory.h | 19 +- deps/v8/src/heap/local-heap-inl.h | 19 +- deps/v8/src/heap/local-heap.cc | 41 +- deps/v8/src/heap/local-heap.h | 27 +- deps/v8/src/heap/mark-compact-inl.h | 12 +- deps/v8/src/heap/mark-compact.cc | 2644 ++- deps/v8/src/heap/mark-compact.h | 525 +- deps/v8/src/heap/marking-barrier-inl.h | 25 +- deps/v8/src/heap/marking-barrier.cc | 101 +- deps/v8/src/heap/marking-barrier.h | 26 +- deps/v8/src/heap/marking-visitor-inl.h | 75 +- deps/v8/src/heap/marking-visitor.h | 120 +- deps/v8/src/heap/marking-worklist-inl.h | 22 +- deps/v8/src/heap/marking-worklist.cc | 150 +- deps/v8/src/heap/marking-worklist.h | 47 +- deps/v8/src/heap/marking.h | 8 +- deps/v8/src/heap/memory-allocator.cc | 186 +- deps/v8/src/heap/memory-allocator.h | 21 +- deps/v8/src/heap/memory-chunk-layout.h | 10 +- deps/v8/src/heap/memory-chunk.cc | 128 +- deps/v8/src/heap/memory-chunk.h | 50 +- deps/v8/src/heap/memory-measurement.cc | 6 +- deps/v8/src/heap/memory-reducer.cc | 34 +- deps/v8/src/heap/memory-reducer.h | 1 + deps/v8/src/heap/new-spaces-inl.h | 75 +- deps/v8/src/heap/new-spaces.cc | 633 +- deps/v8/src/heap/new-spaces.h | 612 +- deps/v8/src/heap/object-start-bitmap-inl.h | 168 + deps/v8/src/heap/object-start-bitmap.h | 137 +- deps/v8/src/heap/object-stats.cc | 26 +- deps/v8/src/heap/object-stats.h | 9 +- deps/v8/src/heap/objects-visiting-inl.h | 20 +- deps/v8/src/heap/objects-visiting.cc | 10 +- deps/v8/src/heap/objects-visiting.h | 17 +- deps/v8/src/heap/paged-spaces-inl.h | 53 +- deps/v8/src/heap/paged-spaces.cc | 370 +- deps/v8/src/heap/paged-spaces.h | 145 +- deps/v8/src/heap/parked-scope.h | 83 + deps/v8/src/heap/read-only-heap.cc | 14 +- deps/v8/src/heap/read-only-heap.h | 6 +- deps/v8/src/heap/read-only-spaces.cc | 62 +- deps/v8/src/heap/read-only-spaces.h | 5 - deps/v8/src/heap/reference-summarizer.cc | 5 +- deps/v8/src/heap/reference-summarizer.h | 15 +- deps/v8/src/heap/remembered-set-inl.h | 40 + deps/v8/src/heap/remembered-set.h | 6 +- deps/v8/src/heap/safepoint.cc | 12 +- deps/v8/src/heap/safepoint.h | 3 +- deps/v8/src/heap/scavenge-job.cc | 4 +- deps/v8/src/heap/scavenge-job.h | 6 +- deps/v8/src/heap/scavenger-inl.h | 16 +- deps/v8/src/heap/scavenger.cc | 220 +- deps/v8/src/heap/scavenger.h | 6 + deps/v8/src/heap/setup-heap-internal.cc | 106 +- deps/v8/src/heap/slot-set.h | 15 +- deps/v8/src/heap/spaces-inl.h | 58 +- deps/v8/src/heap/spaces.cc | 75 +- deps/v8/src/heap/spaces.h | 146 +- deps/v8/src/heap/stress-marking-observer.cc | 1 - deps/v8/src/heap/stress-scavenge-observer.cc | 12 +- deps/v8/src/heap/stress-scavenge-observer.h | 2 +- deps/v8/src/heap/sweeper.cc | 496 +- deps/v8/src/heap/sweeper.h | 93 +- deps/v8/src/heap/weak-object-worklists.cc | 2 +- deps/v8/src/heap/weak-object-worklists.h | 2 +- deps/v8/src/ic/OWNERS | 1 + deps/v8/src/ic/accessor-assembler.cc | 361 +- deps/v8/src/ic/accessor-assembler.h | 47 +- deps/v8/src/ic/handler-configuration-inl.h | 54 +- deps/v8/src/ic/handler-configuration.cc | 25 +- deps/v8/src/ic/handler-configuration.h | 32 +- deps/v8/src/ic/ic-inl.h | 3 +- deps/v8/src/ic/ic.cc | 258 +- deps/v8/src/ic/ic.h | 4 +- deps/v8/src/ic/keyed-store-generic.cc | 39 +- deps/v8/src/ic/stub-cache.cc | 21 +- deps/v8/src/ic/stub-cache.h | 10 +- deps/v8/src/ic/unary-op-assembler.cc | 2 +- deps/v8/src/init/bootstrapper.cc | 469 +- deps/v8/src/init/bootstrapper.h | 4 + deps/v8/src/init/heap-symbols.h | 669 +- deps/v8/src/init/isolate-allocator.cc | 35 +- deps/v8/src/init/setup-isolate-full.cc | 4 +- deps/v8/src/init/v8.cc | 100 +- deps/v8/src/init/v8.h | 22 +- deps/v8/src/inspector/BUILD.gn | 1 - deps/v8/src/inspector/DEPS | 1 + deps/v8/src/inspector/injected-script.cc | 43 +- deps/v8/src/inspector/injected-script.h | 4 +- deps/v8/src/inspector/string-util.h | 4 +- deps/v8/src/inspector/v8-console-message.cc | 29 +- deps/v8/src/inspector/v8-console.cc | 191 +- deps/v8/src/inspector/v8-console.h | 83 +- .../src/inspector/v8-debugger-agent-impl.cc | 230 +- .../v8/src/inspector/v8-debugger-agent-impl.h | 19 +- deps/v8/src/inspector/v8-debugger-script.cc | 89 +- deps/v8/src/inspector/v8-debugger-script.h | 6 +- deps/v8/src/inspector/v8-debugger.cc | 30 +- deps/v8/src/inspector/v8-debugger.h | 1 + .../inspector/v8-heap-profiler-agent-impl.cc | 28 +- .../inspector/v8-heap-profiler-agent-impl.h | 6 +- deps/v8/src/inspector/v8-inspector-impl.cc | 8 +- deps/v8/src/inspector/v8-inspector-impl.h | 5 +- .../inspector/v8-inspector-session-impl.cc | 52 +- .../src/inspector/v8-inspector-session-impl.h | 16 +- .../v8/src/inspector/v8-runtime-agent-impl.cc | 33 +- .../src/inspector/v8-webdriver-serializer.cc | 408 +- .../src/inspector/v8-webdriver-serializer.h | 5 +- deps/v8/src/inspector/value-mirror.cc | 168 +- deps/v8/src/inspector/value-mirror.h | 5 +- deps/v8/src/interpreter/OWNERS | 3 + .../src/interpreter/bytecode-array-builder.cc | 15 +- .../src/interpreter/bytecode-array-builder.h | 23 +- .../interpreter/bytecode-array-iterator.cc | 18 +- .../src/interpreter/bytecode-array-iterator.h | 21 +- .../src/interpreter/bytecode-array-writer.cc | 28 +- .../src/interpreter/bytecode-array-writer.h | 1 - deps/v8/src/interpreter/bytecode-decoder.cc | 35 +- deps/v8/src/interpreter/bytecode-decoder.h | 5 +- deps/v8/src/interpreter/bytecode-flags.cc | 15 +- deps/v8/src/interpreter/bytecode-flags.h | 7 +- deps/v8/src/interpreter/bytecode-generator.cc | 248 +- deps/v8/src/interpreter/bytecode-generator.h | 11 +- deps/v8/src/interpreter/bytecode-node.cc | 1 - deps/v8/src/interpreter/bytecode-node.h | 1 - deps/v8/src/interpreter/bytecode-operands.h | 1 + .../interpreter/bytecode-register-allocator.h | 12 +- .../bytecode-register-optimizer.cc | 42 +- .../interpreter/bytecode-register-optimizer.h | 18 +- deps/v8/src/interpreter/bytecode-register.h | 3 + .../src/interpreter/bytecode-source-info.cc | 1 - deps/v8/src/interpreter/bytecodes.cc | 3 +- deps/v8/src/interpreter/bytecodes.h | 16 +- .../src/interpreter/constant-array-builder.cc | 2 +- .../src/interpreter/constant-array-builder.h | 3 +- .../src/interpreter/control-flow-builders.cc | 7 +- .../src/interpreter/control-flow-builders.h | 8 +- .../src/interpreter/handler-table-builder.h | 1 - .../src/interpreter/interpreter-assembler.cc | 116 +- .../src/interpreter/interpreter-assembler.h | 25 +- .../src/interpreter/interpreter-generator.cc | 134 +- .../interpreter-intrinsics-generator.cc | 5 - .../src/interpreter/interpreter-intrinsics.h | 2 +- deps/v8/src/interpreter/interpreter.cc | 11 - deps/v8/src/interpreter/interpreter.h | 5 +- deps/v8/src/json/json-parser.cc | 164 +- deps/v8/src/json/json-parser.h | 32 +- deps/v8/src/json/json-stringifier.cc | 5 +- .../default-foreground-task-runner.cc | 25 +- deps/v8/src/libplatform/default-job.cc | 74 +- deps/v8/src/libplatform/default-job.h | 16 +- deps/v8/src/libplatform/default-platform.cc | 22 +- deps/v8/src/libplatform/default-platform.h | 4 +- .../default-worker-threads-task-runner.h | 4 +- deps/v8/src/libplatform/delayed-task-queue.h | 1 - .../v8/src/libplatform/etw/etw-provider-win.h | 37 + deps/v8/src/libplatform/task-queue.h | 1 - .../src/libplatform/tracing/recorder-win.cc | 17 +- deps/v8/src/libplatform/tracing/recorder.h | 13 +- .../src/libplatform/tracing/trace-object.cc | 1 - deps/v8/src/libplatform/worker-thread.h | 1 - deps/v8/src/libsampler/sampler.cc | 36 +- deps/v8/src/logging/code-events.h | 267 +- deps/v8/src/logging/counters-definitions.h | 135 +- deps/v8/src/logging/counters-scopes.h | 8 +- deps/v8/src/logging/counters.cc | 5 +- deps/v8/src/logging/counters.h | 2 +- deps/v8/src/logging/local-logger.cc | 21 +- deps/v8/src/logging/local-logger.h | 4 +- .../src/logging/{log-utils.cc => log-file.cc} | 114 +- .../src/logging/{log-utils.h => log-file.h} | 46 +- deps/v8/src/logging/log-inl.h | 18 +- deps/v8/src/logging/log.cc | 925 +- deps/v8/src/logging/log.h | 102 +- deps/v8/src/logging/runtime-call-stats.cc | 1 + deps/v8/src/logging/runtime-call-stats.h | 18 +- deps/v8/src/maglev/DEPS | 11 + deps/v8/src/maglev/DIR_METADATA | 11 + deps/v8/src/maglev/maglev-assembler-inl.h | 300 + deps/v8/src/maglev/maglev-assembler.h | 110 + deps/v8/src/maglev/maglev-basic-block.h | 22 +- deps/v8/src/maglev/maglev-code-gen-state.h | 119 +- deps/v8/src/maglev/maglev-code-generator.cc | 1313 +- deps/v8/src/maglev/maglev-code-generator.h | 4 +- deps/v8/src/maglev/maglev-compilation-info.cc | 17 +- deps/v8/src/maglev/maglev-compilation-info.h | 27 +- deps/v8/src/maglev/maglev-compilation-unit.cc | 17 +- deps/v8/src/maglev/maglev-compilation-unit.h | 36 +- deps/v8/src/maglev/maglev-compiler.cc | 560 +- deps/v8/src/maglev/maglev-compiler.h | 23 +- .../maglev/maglev-concurrent-dispatcher.cc | 26 +- .../src/maglev/maglev-concurrent-dispatcher.h | 8 +- deps/v8/src/maglev/maglev-graph-builder.cc | 3072 ++- deps/v8/src/maglev/maglev-graph-builder.h | 812 +- deps/v8/src/maglev/maglev-graph-labeller.h | 9 +- deps/v8/src/maglev/maglev-graph-printer.cc | 347 +- deps/v8/src/maglev/maglev-graph-printer.h | 31 +- deps/v8/src/maglev/maglev-graph-processor.h | 101 +- deps/v8/src/maglev/maglev-graph-verifier.h | 257 +- deps/v8/src/maglev/maglev-graph.h | 48 +- .../maglev/maglev-interpreter-frame-state.cc | 64 + .../maglev/maglev-interpreter-frame-state.h | 599 +- deps/v8/src/maglev/maglev-ir-inl.h | 45 + deps/v8/src/maglev/maglev-ir.cc | 3592 +++- deps/v8/src/maglev/maglev-ir.h | 3487 ++- deps/v8/src/maglev/maglev-regalloc-data.h | 26 +- deps/v8/src/maglev/maglev-regalloc.cc | 1528 +- deps/v8/src/maglev/maglev-regalloc.h | 211 +- deps/v8/src/maglev/maglev-vreg-allocator.h | 8 +- deps/v8/src/maglev/maglev.cc | 9 +- deps/v8/src/numbers/conversions-inl.h | 12 +- deps/v8/src/numbers/conversions.cc | 34 +- deps/v8/src/numbers/conversions.h | 4 +- deps/v8/src/objects/all-objects-inl.h | 6 +- deps/v8/src/objects/allocation-site-inl.h | 17 +- .../src/objects/allocation-site-scopes-inl.h | 4 +- deps/v8/src/objects/allocation-site.h | 10 +- deps/v8/src/objects/api-callbacks-inl.h | 122 +- deps/v8/src/objects/api-callbacks.h | 52 +- deps/v8/src/objects/api-callbacks.tq | 27 +- deps/v8/src/objects/arguments.h | 2 +- deps/v8/src/objects/arguments.tq | 4 +- deps/v8/src/objects/backing-store.cc | 224 +- deps/v8/src/objects/backing-store.h | 31 +- deps/v8/src/objects/bigint.cc | 126 +- deps/v8/src/objects/bigint.h | 30 +- deps/v8/src/objects/call-site-info-inl.h | 6 +- deps/v8/src/objects/call-site-info.cc | 16 +- deps/v8/src/objects/call-site-info.h | 1 + deps/v8/src/objects/cell.tq | 4 +- deps/v8/src/objects/code-inl.h | 864 +- deps/v8/src/objects/code-kind.h | 18 +- deps/v8/src/objects/code.cc | 363 +- deps/v8/src/objects/code.h | 463 +- deps/v8/src/objects/code.tq | 12 +- .../src/objects/compilation-cache-table-inl.h | 113 +- .../v8/src/objects/compilation-cache-table.cc | 397 +- deps/v8/src/objects/compilation-cache-table.h | 66 +- deps/v8/src/objects/contexts-inl.h | 49 +- deps/v8/src/objects/contexts.cc | 48 +- deps/v8/src/objects/contexts.h | 29 +- deps/v8/src/objects/debug-objects.cc | 4 +- deps/v8/src/objects/descriptor-array-inl.h | 30 +- deps/v8/src/objects/descriptor-array.h | 17 +- deps/v8/src/objects/dictionary-inl.h | 4 +- deps/v8/src/objects/elements-inl.h | 10 +- deps/v8/src/objects/elements-kind.cc | 19 +- deps/v8/src/objects/elements-kind.h | 41 +- deps/v8/src/objects/elements.cc | 174 +- deps/v8/src/objects/elements.h | 28 +- deps/v8/src/objects/embedder-data-array.h | 2 +- deps/v8/src/objects/embedder-data-slot-inl.h | 33 +- deps/v8/src/objects/embedder-data-slot.h | 10 +- deps/v8/src/objects/feedback-vector-inl.h | 79 +- deps/v8/src/objects/feedback-vector.cc | 156 +- deps/v8/src/objects/feedback-vector.h | 115 +- deps/v8/src/objects/feedback-vector.tq | 30 +- deps/v8/src/objects/field-index-inl.h | 18 + deps/v8/src/objects/field-index.h | 3 +- deps/v8/src/objects/fixed-array-inl.h | 192 +- deps/v8/src/objects/fixed-array.h | 127 +- deps/v8/src/objects/fixed-array.tq | 9 +- deps/v8/src/objects/foreign-inl.h | 23 +- deps/v8/src/objects/foreign.h | 19 +- deps/v8/src/objects/free-space-inl.h | 4 +- deps/v8/src/objects/function-kind.h | 2 +- deps/v8/src/objects/hash-table-inl.h | 17 +- deps/v8/src/objects/hash-table.h | 11 +- deps/v8/src/objects/heap-object.h | 7 +- deps/v8/src/objects/instance-type-inl.h | 12 +- deps/v8/src/objects/instance-type.h | 62 +- deps/v8/src/objects/intl-objects.cc | 185 +- deps/v8/src/objects/intl-objects.h | 43 +- deps/v8/src/objects/intl-objects.tq | 2 +- deps/v8/src/objects/js-array-buffer-inl.h | 21 +- deps/v8/src/objects/js-array-buffer.cc | 5 +- deps/v8/src/objects/js-array-buffer.h | 15 +- deps/v8/src/objects/js-array.h | 6 +- .../objects/js-atomics-synchronization-inl.h | 138 + .../src/objects/js-atomics-synchronization.cc | 598 + .../src/objects/js-atomics-synchronization.h | 224 + .../src/objects/js-atomics-synchronization.tq | 18 + deps/v8/src/objects/js-collection.h | 4 +- deps/v8/src/objects/js-date-time-format.cc | 1089 +- deps/v8/src/objects/js-date-time-format.h | 52 +- deps/v8/src/objects/js-display-names.h | 14 +- deps/v8/src/objects/js-function-inl.h | 30 +- deps/v8/src/objects/js-function.cc | 78 +- deps/v8/src/objects/js-function.h | 21 +- deps/v8/src/objects/js-generator.h | 1 + deps/v8/src/objects/js-list-format.h | 12 +- deps/v8/src/objects/js-number-format-inl.h | 3 - deps/v8/src/objects/js-number-format.cc | 815 +- deps/v8/src/objects/js-number-format.h | 46 +- deps/v8/src/objects/js-number-format.tq | 2 - deps/v8/src/objects/js-objects-inl.h | 36 +- deps/v8/src/objects/js-objects.cc | 279 +- deps/v8/src/objects/js-objects.h | 46 +- deps/v8/src/objects/js-objects.tq | 8 +- deps/v8/src/objects/js-plural-rules-inl.h | 3 - deps/v8/src/objects/js-plural-rules.cc | 24 +- deps/v8/src/objects/js-plural-rules.h | 6 +- deps/v8/src/objects/js-plural-rules.tq | 2 - deps/v8/src/objects/js-promise.h | 6 +- deps/v8/src/objects/js-proxy.h | 2 +- deps/v8/src/objects/js-regexp-inl.h | 12 + deps/v8/src/objects/js-regexp.cc | 28 +- deps/v8/src/objects/js-regexp.h | 19 +- deps/v8/src/objects/js-regexp.tq | 1 + deps/v8/src/objects/js-relative-time-format.h | 4 +- deps/v8/src/objects/js-segment-iterator.h | 6 +- deps/v8/src/objects/js-segmenter.h | 6 +- deps/v8/src/objects/js-segments.h | 6 +- ...dow-realms-inl.h => js-shadow-realm-inl.h} | 10 +- .../{js-shadow-realms.h => js-shadow-realm.h} | 8 +- ...js-shadow-realms.tq => js-shadow-realm.tq} | 4 +- deps/v8/src/objects/js-shared-array-inl.h | 30 + deps/v8/src/objects/js-shared-array.h | 35 + deps/v8/src/objects/js-shared-array.tq | 5 + deps/v8/src/objects/js-temporal-objects.cc | 17902 +++++++++++++--- deps/v8/src/objects/js-temporal-objects.h | 679 +- deps/v8/src/objects/js-temporal-objects.tq | 4 +- deps/v8/src/objects/js-weak-refs.tq | 4 +- deps/v8/src/objects/keys.cc | 38 +- deps/v8/src/objects/keys.h | 3 +- deps/v8/src/objects/literal-objects.cc | 16 +- deps/v8/src/objects/lookup-cache-inl.h | 5 +- deps/v8/src/objects/lookup-inl.h | 23 +- deps/v8/src/objects/lookup.cc | 125 +- deps/v8/src/objects/lookup.h | 2 + deps/v8/src/objects/managed-inl.h | 12 +- deps/v8/src/objects/managed.h | 10 +- deps/v8/src/objects/map-inl.h | 43 +- deps/v8/src/objects/map-updater.cc | 21 +- deps/v8/src/objects/map.cc | 87 +- deps/v8/src/objects/map.h | 31 +- deps/v8/src/objects/megadom-handler-inl.h | 2 + deps/v8/src/objects/megadom-handler.h | 2 + deps/v8/src/objects/module.cc | 46 +- deps/v8/src/objects/module.h | 10 +- deps/v8/src/objects/module.tq | 4 +- deps/v8/src/objects/name-inl.h | 125 +- deps/v8/src/objects/name.h | 67 +- deps/v8/src/objects/object-list-macros.h | 8 +- deps/v8/src/objects/object-macros-undef.h | 7 + deps/v8/src/objects/object-macros.h | 144 +- deps/v8/src/objects/object-type.cc | 41 +- deps/v8/src/objects/object-type.h | 1 + .../objects/objects-body-descriptors-inl.h | 240 +- .../v8/src/objects/objects-body-descriptors.h | 2 +- deps/v8/src/objects/objects-definitions.h | 20 +- deps/v8/src/objects/objects-inl.h | 80 +- deps/v8/src/objects/objects.cc | 345 +- deps/v8/src/objects/objects.h | 65 +- deps/v8/src/objects/oddball.h | 6 +- deps/v8/src/objects/option-utils.cc | 33 +- deps/v8/src/objects/option-utils.h | 17 +- deps/v8/src/objects/ordered-hash-table.cc | 147 +- deps/v8/src/objects/ordered-hash-table.h | 6 +- .../objects/osr-optimized-code-cache-inl.h | 25 - .../src/objects/osr-optimized-code-cache.cc | 303 - .../v8/src/objects/osr-optimized-code-cache.h | 118 - deps/v8/src/objects/primitive-heap-object.h | 2 +- deps/v8/src/objects/promise.h | 4 +- deps/v8/src/objects/property-array.tq | 4 +- deps/v8/src/objects/property-cell-inl.h | 4 +- deps/v8/src/objects/property-details.h | 48 +- deps/v8/src/objects/scope-info.cc | 72 +- deps/v8/src/objects/scope-info.h | 4 +- deps/v8/src/objects/script-inl.h | 2 +- deps/v8/src/objects/script.h | 2 + deps/v8/src/objects/script.tq | 4 + .../v8/src/objects/shared-function-info-inl.h | 136 +- deps/v8/src/objects/shared-function-info.cc | 141 +- deps/v8/src/objects/shared-function-info.h | 47 +- deps/v8/src/objects/shared-function-info.tq | 19 +- deps/v8/src/objects/simd.cc | 419 + deps/v8/src/objects/simd.h | 26 + deps/v8/src/objects/slots-inl.h | 104 + deps/v8/src/objects/slots.h | 55 + deps/v8/src/objects/smi.h | 2 +- deps/v8/src/objects/source-text-module.cc | 220 +- deps/v8/src/objects/source-text-module.h | 25 +- .../src/objects/string-forwarding-table-inl.h | 356 + .../v8/src/objects/string-forwarding-table.cc | 313 + deps/v8/src/objects/string-forwarding-table.h | 105 + deps/v8/src/objects/string-inl.h | 140 +- deps/v8/src/objects/string-table.cc | 185 +- deps/v8/src/objects/string-table.h | 1 - deps/v8/src/objects/string.cc | 555 +- deps/v8/src/objects/string.h | 41 +- deps/v8/src/objects/struct.h | 2 +- .../v8/src/objects/swiss-hash-table-helpers.h | 4 +- .../src/objects/swiss-name-dictionary-inl.h | 29 +- deps/v8/src/objects/swiss-name-dictionary.cc | 10 +- deps/v8/src/objects/swiss-name-dictionary.tq | 3 +- deps/v8/src/objects/synthetic-module.cc | 2 +- deps/v8/src/objects/tagged-field.h | 2 +- deps/v8/src/objects/tagged-impl.cc | 51 + deps/v8/src/objects/tagged-impl.h | 46 + deps/v8/src/objects/tagged-index.h | 2 +- deps/v8/src/objects/templates.cc | 28 +- deps/v8/src/objects/transitions.cc | 2 +- deps/v8/src/objects/transitions.h | 2 +- deps/v8/src/objects/value-serializer.cc | 220 +- deps/v8/src/objects/value-serializer.h | 17 +- deps/v8/src/objects/visitors.h | 12 +- deps/v8/src/parsing/parse-info.cc | 30 +- deps/v8/src/parsing/parse-info.h | 14 +- deps/v8/src/parsing/parser-base.h | 34 +- deps/v8/src/parsing/parser.cc | 49 +- deps/v8/src/parsing/parser.h | 6 +- deps/v8/src/parsing/parsing.cc | 2 - deps/v8/src/parsing/preparse-data.cc | 3 +- deps/v8/src/parsing/preparser.cc | 6 +- deps/v8/src/parsing/preparser.h | 14 +- .../src/parsing/scanner-character-streams.cc | 3 +- deps/v8/src/parsing/scanner-inl.h | 6 +- deps/v8/src/parsing/scanner.cc | 3 +- deps/v8/src/parsing/scanner.h | 5 +- deps/v8/src/profiler/allocation-tracker.cc | 2 +- deps/v8/src/profiler/cpu-profiler-inl.h | 2 +- deps/v8/src/profiler/cpu-profiler.cc | 23 +- deps/v8/src/profiler/cpu-profiler.h | 2 +- deps/v8/src/profiler/heap-profiler.cc | 29 +- deps/v8/src/profiler/heap-profiler.h | 8 +- .../src/profiler/heap-snapshot-generator.cc | 251 +- .../v8/src/profiler/heap-snapshot-generator.h | 26 +- deps/v8/src/profiler/profile-generator-inl.h | 4 +- deps/v8/src/profiler/profile-generator.cc | 133 +- deps/v8/src/profiler/profile-generator.h | 17 +- deps/v8/src/profiler/profiler-listener.cc | 77 +- deps/v8/src/profiler/profiler-listener.h | 12 +- deps/v8/src/profiler/strings-storage.cc | 9 +- deps/v8/src/profiler/tick-sample.cc | 9 +- .../regexp/arm/regexp-macro-assembler-arm.cc | 10 +- .../arm64/regexp-macro-assembler-arm64.cc | 24 +- .../experimental/experimental-bytecode.h | 4 +- .../experimental/experimental-compiler.cc | 4 +- .../experimental/experimental-interpreter.cc | 2 +- .../src/regexp/experimental/experimental.cc | 30 +- .../ia32/regexp-macro-assembler-ia32.cc | 50 +- .../regexp/ia32/regexp-macro-assembler-ia32.h | 4 + .../loong64/regexp-macro-assembler-loong64.cc | 10 +- .../mips/regexp-macro-assembler-mips.cc | 1359 -- .../regexp/mips/regexp-macro-assembler-mips.h | 231 - .../mips64/regexp-macro-assembler-mips64.cc | 10 +- .../regexp/ppc/regexp-macro-assembler-ppc.cc | 10 +- .../src/regexp/regexp-bytecode-generator.cc | 2 +- .../v8/src/regexp/regexp-bytecode-peephole.cc | 2 +- deps/v8/src/regexp/regexp-bytecodes.h | 4 +- deps/v8/src/regexp/regexp-compiler-tonode.cc | 26 +- deps/v8/src/regexp/regexp-compiler.cc | 24 +- deps/v8/src/regexp/regexp-flags.h | 17 +- deps/v8/src/regexp/regexp-interpreter.cc | 14 +- .../src/regexp/regexp-macro-assembler-arch.h | 6 +- deps/v8/src/regexp/regexp-macro-assembler.cc | 59 +- deps/v8/src/regexp/regexp-macro-assembler.h | 7 +- deps/v8/src/regexp/regexp-parser.cc | 28 +- deps/v8/src/regexp/regexp-parser.h | 6 - deps/v8/src/regexp/regexp-stack.h | 2 +- deps/v8/src/regexp/regexp.cc | 62 +- deps/v8/src/regexp/regexp.h | 3 + .../regexp-macro-assembler-riscv.cc} | 510 +- .../regexp-macro-assembler-riscv.h} | 22 +- .../s390/regexp-macro-assembler-s390.cc | 12 +- .../regexp/x64/regexp-macro-assembler-x64.cc | 48 +- .../regexp/x64/regexp-macro-assembler-x64.h | 4 + deps/v8/src/roots/roots-inl.h | 20 + deps/v8/src/roots/roots.cc | 17 + deps/v8/src/roots/roots.h | 80 +- deps/v8/src/runtime/runtime-array.cc | 8 - deps/v8/src/runtime/runtime-atomics.cc | 128 +- deps/v8/src/runtime/runtime-bigint.cc | 2 - deps/v8/src/runtime/runtime-classes.cc | 8 +- deps/v8/src/runtime/runtime-collections.cc | 3 - deps/v8/src/runtime/runtime-compiler.cc | 472 +- deps/v8/src/runtime/runtime-date.cc | 5 - deps/v8/src/runtime/runtime-debug.cc | 23 +- deps/v8/src/runtime/runtime-forin.cc | 5 - deps/v8/src/runtime/runtime-function.cc | 4 - deps/v8/src/runtime/runtime-futex.cc | 10 +- deps/v8/src/runtime/runtime-generator.cc | 24 +- deps/v8/src/runtime/runtime-internal.cc | 93 +- deps/v8/src/runtime/runtime-intl.cc | 11 - deps/v8/src/runtime/runtime-literals.cc | 8 +- deps/v8/src/runtime/runtime-module.cc | 15 +- deps/v8/src/runtime/runtime-numbers.cc | 4 - deps/v8/src/runtime/runtime-object.cc | 67 +- deps/v8/src/runtime/runtime-operators.cc | 2 - deps/v8/src/runtime/runtime-promise.cc | 6 - deps/v8/src/runtime/runtime-proxy.cc | 4 - deps/v8/src/runtime/runtime-regexp.cc | 9 +- deps/v8/src/runtime/runtime-scopes.cc | 5 - deps/v8/src/runtime/runtime-shadow-realm.cc | 22 + deps/v8/src/runtime/runtime-strings.cc | 79 +- deps/v8/src/runtime/runtime-symbol.cc | 2 - deps/v8/src/runtime/runtime-temporal.cc | 21 + deps/v8/src/runtime/runtime-test-wasm.cc | 8 +- deps/v8/src/runtime/runtime-test.cc | 280 +- deps/v8/src/runtime/runtime-typedarray.cc | 3 - deps/v8/src/runtime/runtime-utils.h | 3 - deps/v8/src/runtime/runtime-wasm.cc | 859 +- deps/v8/src/runtime/runtime.cc | 9 +- deps/v8/src/runtime/runtime.h | 182 +- deps/v8/src/sandbox/external-pointer-inl.h | 136 +- .../src/sandbox/external-pointer-table-inl.h | 240 +- deps/v8/src/sandbox/external-pointer-table.cc | 342 +- deps/v8/src/sandbox/external-pointer-table.h | 542 +- deps/v8/src/sandbox/external-pointer.h | 53 +- deps/v8/src/sandbox/sandbox.cc | 182 +- deps/v8/src/sandbox/sandbox.h | 118 +- deps/v8/src/sandbox/sandboxed-pointer-inl.h | 8 +- deps/v8/src/sandbox/testing.cc | 315 + deps/v8/src/sandbox/testing.h | 42 + deps/v8/src/snapshot/code-serializer.cc | 168 +- deps/v8/src/snapshot/code-serializer.h | 14 +- deps/v8/src/snapshot/context-deserializer.cc | 19 - deps/v8/src/snapshot/context-deserializer.h | 3 - deps/v8/src/snapshot/context-serializer.cc | 36 +- deps/v8/src/snapshot/context-serializer.h | 1 - deps/v8/src/snapshot/deserializer.cc | 269 +- deps/v8/src/snapshot/deserializer.h | 42 +- .../src/snapshot/embedded/embedded-data-inl.h | 35 +- .../v8/src/snapshot/embedded/embedded-data.cc | 94 +- deps/v8/src/snapshot/embedded/embedded-data.h | 33 +- .../src/snapshot/embedded/embedded-empty.cc | 10 +- .../snapshot/embedded/embedded-file-writer.cc | 34 +- .../snapshot/embedded/embedded-file-writer.h | 25 +- .../platform-embedded-file-writer-aix.cc | 20 +- .../platform-embedded-file-writer-aix.h | 2 - .../platform-embedded-file-writer-base.cc | 1 - .../platform-embedded-file-writer-base.h | 6 +- .../platform-embedded-file-writer-generic.cc | 39 +- .../platform-embedded-file-writer-generic.h | 4 +- .../platform-embedded-file-writer-mac.cc | 19 +- .../platform-embedded-file-writer-mac.h | 4 +- .../platform-embedded-file-writer-win.cc | 48 +- .../platform-embedded-file-writer-win.h | 2 - deps/v8/src/snapshot/mksnapshot.cc | 40 +- deps/v8/src/snapshot/object-deserializer.cc | 14 - .../v8/src/snapshot/read-only-deserializer.cc | 6 +- deps/v8/src/snapshot/read-only-deserializer.h | 1 - deps/v8/src/snapshot/read-only-serializer.cc | 5 +- deps/v8/src/snapshot/references.h | 3 +- deps/v8/src/snapshot/roots-serializer.cc | 1 - .../src/snapshot/serializer-deserializer.cc | 13 +- .../v8/src/snapshot/serializer-deserializer.h | 17 +- deps/v8/src/snapshot/serializer.cc | 208 +- deps/v8/src/snapshot/serializer.h | 14 +- .../src/snapshot/shared-heap-deserializer.cc | 3 +- .../src/snapshot/shared-heap-deserializer.h | 1 - .../v8/src/snapshot/shared-heap-serializer.cc | 3 +- deps/v8/src/snapshot/snapshot-compression.cc | 26 +- deps/v8/src/snapshot/snapshot-empty.cc | 4 + deps/v8/src/snapshot/snapshot-external.cc | 25 +- deps/v8/src/snapshot/snapshot-source-sink.cc | 8 +- deps/v8/src/snapshot/snapshot-source-sink.h | 4 +- deps/v8/src/snapshot/snapshot-utils.cc | 14 + deps/v8/src/snapshot/snapshot.cc | 72 +- deps/v8/src/snapshot/snapshot.h | 5 + deps/v8/src/snapshot/startup-deserializer.cc | 13 +- deps/v8/src/snapshot/startup-deserializer.h | 1 - deps/v8/src/snapshot/startup-serializer.cc | 56 +- deps/v8/src/strings/char-predicates.h | 1 - deps/v8/src/strings/string-builder-inl.h | 7 +- deps/v8/src/strings/string-hasher-inl.h | 9 +- deps/v8/src/strings/string-stream.cc | 6 +- deps/v8/src/strings/string-stream.h | 3 +- deps/v8/src/strings/unicode-decoder.cc | 191 +- deps/v8/src/strings/unicode-decoder.h | 63 +- deps/v8/src/strings/unicode.cc | 54 + deps/v8/src/strings/unicode.h | 43 +- deps/v8/src/strings/uri.h | 3 +- deps/v8/src/tasks/cancelable-task.cc | 1 - deps/v8/src/tasks/cancelable-task.h | 1 - deps/v8/src/temporal/temporal-parser.cc | 730 +- deps/v8/src/temporal/temporal-parser.h | 60 +- .../v8/src/third_party/utf8-decoder/README.v8 | 6 + .../utf8-decoder/generalized-utf8-decoder.h | 104 + .../third_party/utf8-decoder/utf8-decoder.h | 122 +- deps/v8/src/third_party/vtune/vtune-jit.cc | 3 +- deps/v8/src/torque/global-context.cc | 4 +- deps/v8/src/torque/implementation-visitor.cc | 4 +- deps/v8/src/torque/torque-parser.cc | 1 + deps/v8/src/torque/types.cc | 2 +- deps/v8/src/torque/types.h | 2 + deps/v8/src/tracing/trace-event.h | 11 +- deps/v8/src/trap-handler/handler-shared.cc | 5 + deps/v8/src/trap-handler/trap-handler.h | 2 +- deps/v8/src/utils/address-map.cc | 5 +- deps/v8/src/utils/allocation.cc | 151 +- deps/v8/src/utils/allocation.h | 54 +- deps/v8/src/utils/bit-vector.cc | 13 +- deps/v8/src/utils/bit-vector.h | 353 +- deps/v8/src/utils/boxed-float.h | 16 +- deps/v8/src/utils/detachable-vector.h | 1 - deps/v8/src/utils/hex-format.cc | 29 + deps/v8/src/utils/hex-format.h | 25 + deps/v8/src/utils/identity-map.h | 14 +- deps/v8/src/utils/locked-queue-inl.h | 1 + deps/v8/src/utils/locked-queue.h | 1 - deps/v8/src/utils/memcopy.h | 27 +- deps/v8/src/utils/ostreams.cc | 1 - deps/v8/src/utils/ostreams.h | 2 - deps/v8/src/utils/sha-256.cc | 176 + deps/v8/src/utils/sha-256.h | 76 + deps/v8/src/utils/sparse-bit-vector.h | 258 + deps/v8/src/utils/utils.cc | 6 +- deps/v8/src/utils/utils.h | 43 +- deps/v8/src/utils/version.cc | 1 - deps/v8/src/wasm/OWNERS | 1 + deps/v8/src/wasm/assembler-buffer-cache.cc | 66 + deps/v8/src/wasm/assembler-buffer-cache.h | 46 + .../wasm/baseline/arm/liftoff-assembler-arm.h | 314 +- .../baseline/arm64/liftoff-assembler-arm64.h | 206 +- .../baseline/ia32/liftoff-assembler-ia32.h | 220 +- .../wasm/baseline/liftoff-assembler-defs.h | 17 +- .../v8/src/wasm/baseline/liftoff-assembler.cc | 71 +- deps/v8/src/wasm/baseline/liftoff-assembler.h | 171 +- deps/v8/src/wasm/baseline/liftoff-compiler.cc | 2650 ++- deps/v8/src/wasm/baseline/liftoff-compiler.h | 30 +- deps/v8/src/wasm/baseline/liftoff-register.h | 30 +- .../loong64/liftoff-assembler-loong64.h | 258 +- .../baseline/mips/liftoff-assembler-mips.h | 3148 --- .../mips64/liftoff-assembler-mips64.h | 253 +- .../wasm/baseline/ppc/liftoff-assembler-ppc.h | 980 +- .../liftoff-assembler-riscv.h} | 2028 +- .../riscv/liftoff-assembler-riscv32.h | 2119 ++ .../riscv/liftoff-assembler-riscv64.h | 1728 ++ .../baseline/s390/liftoff-assembler-s390.h | 222 +- .../wasm/baseline/x64/liftoff-assembler-x64.h | 241 +- deps/v8/src/wasm/c-api.cc | 129 +- deps/v8/src/wasm/canonical-types.h | 6 +- deps/v8/src/wasm/code-space-access.cc | 53 +- deps/v8/src/wasm/code-space-access.h | 10 +- deps/v8/src/wasm/compilation-environment.h | 55 +- .../src/wasm/constant-expression-interface.cc | 328 + ...face.h => constant-expression-interface.h} | 45 +- deps/v8/src/wasm/constant-expression.cc | 78 + deps/v8/src/wasm/constant-expression.h | 142 + deps/v8/src/wasm/decoder.h | 83 +- deps/v8/src/wasm/function-body-decoder-impl.h | 2136 +- deps/v8/src/wasm/function-body-decoder.cc | 23 +- deps/v8/src/wasm/function-body-decoder.h | 6 +- deps/v8/src/wasm/function-compiler.cc | 90 +- deps/v8/src/wasm/function-compiler.h | 24 +- deps/v8/src/wasm/graph-builder-interface.cc | 924 +- deps/v8/src/wasm/graph-builder-interface.h | 2 + deps/v8/src/wasm/init-expr-interface.cc | 241 - deps/v8/src/wasm/jump-table-assembler.cc | 51 +- deps/v8/src/wasm/jump-table-assembler.h | 5 +- deps/v8/src/wasm/local-decl-encoder.cc | 1 - deps/v8/src/wasm/memory-protection-key.h | 96 - deps/v8/src/wasm/module-compiler.cc | 1113 +- deps/v8/src/wasm/module-compiler.h | 63 +- deps/v8/src/wasm/module-decoder-impl.h | 2455 +++ deps/v8/src/wasm/module-decoder.cc | 2485 +-- deps/v8/src/wasm/module-decoder.h | 127 +- deps/v8/src/wasm/module-instantiate.cc | 442 +- deps/v8/src/wasm/module-instantiate.h | 16 +- deps/v8/src/wasm/names-provider.cc | 405 + deps/v8/src/wasm/names-provider.h | 101 + deps/v8/src/wasm/object-access.h | 16 +- deps/v8/src/wasm/signature-map.h | 1 + deps/v8/src/wasm/simd-shuffle.cc | 9 + deps/v8/src/wasm/simd-shuffle.h | 6 + deps/v8/src/wasm/stacks.cc | 61 + deps/v8/src/wasm/stacks.h | 73 +- deps/v8/src/wasm/streaming-decoder.cc | 60 +- deps/v8/src/wasm/streaming-decoder.h | 24 +- deps/v8/src/wasm/string-builder-multiline.h | 157 + deps/v8/src/wasm/string-builder.h | 159 + deps/v8/src/wasm/struct-types.h | 16 + deps/v8/src/wasm/sync-streaming-decoder.cc | 3 - deps/v8/src/wasm/value-type.cc | 15 + deps/v8/src/wasm/value-type.h | 237 +- deps/v8/src/wasm/wasm-code-manager.cc | 388 +- deps/v8/src/wasm/wasm-code-manager.h | 305 +- deps/v8/src/wasm/wasm-constants.h | 40 +- deps/v8/src/wasm/wasm-debug.cc | 107 +- deps/v8/src/wasm/wasm-debug.h | 16 - deps/v8/src/wasm/wasm-disassembler-impl.h | 175 + deps/v8/src/wasm/wasm-disassembler.cc | 1111 + deps/v8/src/wasm/wasm-disassembler.h | 34 + deps/v8/src/wasm/wasm-engine.cc | 189 +- deps/v8/src/wasm/wasm-engine.h | 10 +- deps/v8/src/wasm/wasm-external-refs.cc | 23 +- deps/v8/src/wasm/wasm-external-refs.h | 7 +- deps/v8/src/wasm/wasm-feature-flags.h | 19 +- deps/v8/src/wasm/wasm-features.cc | 2 +- deps/v8/src/wasm/wasm-import-wrapper-cache.cc | 1 - deps/v8/src/wasm/wasm-init-expr.cc | 17 +- deps/v8/src/wasm/wasm-init-expr.h | 60 +- deps/v8/src/wasm/wasm-js.cc | 1066 +- deps/v8/src/wasm/wasm-limits.h | 56 +- deps/v8/src/wasm/wasm-linkage.h | 14 +- deps/v8/src/wasm/wasm-module-builder.cc | 75 +- deps/v8/src/wasm/wasm-module-builder.h | 4 +- deps/v8/src/wasm/wasm-module-sourcemap.cc | 1 - deps/v8/src/wasm/wasm-module.cc | 233 +- deps/v8/src/wasm/wasm-module.h | 351 +- deps/v8/src/wasm/wasm-objects-inl.h | 105 +- deps/v8/src/wasm/wasm-objects.cc | 697 +- deps/v8/src/wasm/wasm-objects.h | 166 +- deps/v8/src/wasm/wasm-objects.tq | 62 +- deps/v8/src/wasm/wasm-opcodes-inl.h | 542 +- deps/v8/src/wasm/wasm-opcodes.cc | 15 + deps/v8/src/wasm/wasm-opcodes.h | 1356 +- deps/v8/src/wasm/wasm-result.cc | 2 - deps/v8/src/wasm/wasm-result.h | 30 +- deps/v8/src/wasm/wasm-serialization.cc | 76 +- deps/v8/src/wasm/wasm-subtyping.cc | 346 +- deps/v8/src/wasm/wasm-subtyping.h | 93 +- deps/v8/src/wasm/wasm-value.h | 14 +- deps/v8/src/web-snapshot/web-snapshot.cc | 2800 ++- deps/v8/src/web-snapshot/web-snapshot.h | 331 +- deps/v8/src/zone/accounting-allocator.cc | 4 +- deps/v8/src/zone/zone-chunk-list.h | 2 +- deps/v8/src/zone/zone-containers.h | 6 + deps/v8/src/zone/zone-handle-set.h | 2 +- deps/v8/src/zone/zone-list-inl.h | 1 - deps/v8/src/zone/zone.h | 23 + deps/v8/test/BUILD.gn | 2 +- deps/v8/test/benchmarks/benchmarks.status | 11 + deps/v8/test/benchmarks/csuite/README.md | 2 +- deps/v8/test/benchmarks/csuite/benchmark.py | 2 +- .../benchmarks/csuite/compare-baseline.py | 2 +- deps/v8/test/benchmarks/csuite/csuite.py | 4 +- deps/v8/test/benchmarks/testcfg.py | 9 +- deps/v8/test/bigint/bigint-shell.cc | 24 +- deps/v8/test/bigint/testcfg.py | 12 +- deps/v8/test/cctest/BUILD.gn | 209 +- deps/v8/test/cctest/assembler-helper-arm.cc | 2 - deps/v8/test/cctest/cctest-utils.h | 2 +- deps/v8/test/cctest/cctest.cc | 28 +- deps/v8/test/cctest/cctest.h | 11 +- deps/v8/test/cctest/cctest.status | 181 +- .../v8/test/cctest/compiler/codegen-tester.cc | 635 +- deps/v8/test/cctest/compiler/codegen-tester.h | 19 +- .../test-atomic-load-store-codegen.cc | 4 +- .../compiler/test-basic-block-profiler.cc | 2 - .../cctest/compiler/test-branch-combine.cc | 2 +- .../test-calls-with-arraylike-or-spread.cc | 2 +- .../cctest/compiler/test-code-assembler.cc | 2 +- .../cctest/compiler/test-code-generator.cc | 131 +- .../test/cctest/compiler/test-gap-resolver.cc | 37 +- .../cctest/compiler/test-js-constant-cache.cc | 12 +- .../compiler/test-machine-operator-reducer.cc | 26 +- .../cctest/compiler/test-multiple-return.cc | 2 +- .../compiler/test-representation-change.cc | 2 +- .../test-run-bytecode-graph-builder.cc | 2 +- .../test-run-calls-to-external-references.cc | 48 +- .../v8/test/cctest/compiler/test-run-deopt.cc | 119 - .../cctest/compiler/test-run-jsbranches.cc | 324 - .../test/cctest/compiler/test-run-jscalls.cc | 197 - .../v8/test/cctest/compiler/test-run-jsops.cc | 534 - .../cctest/compiler/test-run-load-store.cc | 5 +- .../test/cctest/compiler/test-run-machops.cc | 77 +- .../cctest/compiler/test-run-native-calls.cc | 3 +- .../compiler/test-run-unwinding-info.cc | 2 +- .../test/cctest/compiler/test-verify-type.cc | 3 +- ...back-vector.h => feedback-vector-helper.h} | 22 +- deps/v8/test/cctest/heap/heap-tester.h | 2 +- deps/v8/test/cctest/heap/heap-utils.cc | 182 +- deps/v8/test/cctest/heap/heap-utils.h | 12 +- deps/v8/test/cctest/heap/test-alloc.cc | 19 +- .../cctest/heap/test-array-buffer-tracker.cc | 73 +- deps/v8/test/cctest/heap/test-compaction.cc | 44 +- .../cctest/heap/test-concurrent-allocation.cc | 50 +- .../cctest/heap/test-concurrent-marking.cc | 49 +- .../heap/test-external-string-tracker.cc | 13 +- deps/v8/test/cctest/heap/test-heap.cc | 1342 +- .../cctest/heap/test-incremental-marking.cc | 9 +- .../cctest/heap/test-invalidated-slots.cc | 85 +- deps/v8/test/cctest/heap/test-iterators.cc | 7 +- deps/v8/test/cctest/heap/test-mark-compact.cc | 112 +- deps/v8/test/cctest/heap/test-shared-heap.cc | 266 - deps/v8/test/cctest/heap/test-spaces.cc | 133 +- deps/v8/test/cctest/heap/test-unmapper.cc | 2 +- .../test/cctest/heap/test-weak-references.cc | 45 +- .../v8/test/cctest/heap/test-write-barrier.cc | 4 +- deps/v8/test/cctest/libplatform/DEPS | 3 - deps/v8/test/cctest/parsing/test-preparser.cc | 951 - deps/v8/test/cctest/test-access-checks.cc | 462 - .../v8/test/cctest/test-accessor-assembler.cc | 5 +- deps/v8/test/cctest/test-accessors.cc | 5 +- deps/v8/test/cctest/test-allocation.cc | 12 +- deps/v8/test/cctest/test-api-icu.cc | 58 - deps/v8/test/cctest/test-api-interceptors.cc | 209 +- deps/v8/test/cctest/test-api-stack-traces.cc | 4 +- deps/v8/test/cctest/test-api-wasm.cc | 220 - deps/v8/test/cctest/test-api.cc | 772 +- deps/v8/test/cctest/test-api.h | 2 - deps/v8/test/cctest/test-array-list.cc | 39 - deps/v8/test/cctest/test-assembler-arm.cc | 168 +- deps/v8/test/cctest/test-assembler-arm64.cc | 374 +- deps/v8/test/cctest/test-assembler-ia32.cc | 6 +- deps/v8/test/cctest/test-assembler-mips.cc | 10442 --------- deps/v8/test/cctest/test-assembler-mips64.cc | 259 +- deps/v8/test/cctest/test-assembler-riscv32.cc | 2563 +++ deps/v8/test/cctest/test-assembler-riscv64.cc | 17 +- deps/v8/test/cctest/test-bignum.cc | 1544 -- deps/v8/test/cctest/test-bit-vector.cc | 154 - .../test/cctest/test-code-stub-assembler.cc | 125 +- deps/v8/test/cctest/test-compiler.cc | 1004 - deps/v8/test/cctest/test-conversions.cc | 505 - deps/v8/test/cctest/test-cpu-profiler.cc | 145 +- deps/v8/test/cctest/test-debug-helper.cc | 1 - deps/v8/test/cctest/test-debug.cc | 77 +- deps/v8/test/cctest/test-deoptimization.cc | 931 - deps/v8/test/cctest/test-descriptor-array.cc | 6 +- deps/v8/test/cctest/test-dictionary.cc | 324 - deps/v8/test/cctest/test-disasm-mips.cc | 1819 -- ...-helper.cc => test-disasm-regex-helper.cc} | 2 +- ...ex-helper.h => test-disasm-regex-helper.h} | 0 .../test/cctest/test-field-type-tracking.cc | 16 +- .../test/cctest/test-func-name-inference.cc | 2 - deps/v8/test/cctest/test-heap-profiler.cc | 140 +- deps/v8/test/cctest/test-helper-riscv32.cc | 49 + deps/v8/test/cctest/test-helper-riscv32.h | 337 + deps/v8/test/cctest/test-helper-riscv64.cc | 1 - deps/v8/test/cctest/test-helper-riscv64.h | 45 +- deps/v8/test/cctest/test-icache.cc | 55 +- .../test-ignition-statistics-extension.cc | 3 +- .../cctest/test-inobject-slack-tracking.cc | 45 +- deps/v8/test/cctest/test-intl.cc | 315 - deps/v8/test/cctest/test-javascript-arm64.cc | 10 - .../v8/test/cctest/test-js-arm64-variables.cc | 10 - deps/v8/test/cctest/test-js-to-wasm.cc | 12 +- deps/v8/test/cctest/test-js-weak-refs.cc | 1 - deps/v8/test/cctest/test-liveedit.cc | 18 +- deps/v8/test/cctest/test-lockers.cc | 21 +- deps/v8/test/cctest/test-log-stack-tracer.cc | 3 - .../test/cctest/test-macro-assembler-arm.cc | 3 +- .../cctest/test-macro-assembler-loong64.cc | 63 +- .../test/cctest/test-macro-assembler-mips.cc | 1362 -- .../cctest/test-macro-assembler-mips64.cc | 63 +- .../cctest/test-macro-assembler-riscv32.cc | 1324 ++ .../cctest/test-macro-assembler-riscv64.cc | 86 +- deps/v8/test/cctest/test-mementos.cc | 7 + deps/v8/test/cctest/test-object.cc | 502 - deps/v8/test/cctest/test-orderedhashtable.cc | 1 - .../v8/test/cctest/test-persistent-handles.cc | 183 - deps/v8/test/cctest/test-platform.cc | 57 - deps/v8/test/cctest/test-profile-generator.cc | 112 +- .../cctest/test-random-number-generator.cc | 8 +- deps/v8/test/cctest/test-regexp.cc | 2391 --- deps/v8/test/cctest/test-serialize.cc | 342 +- deps/v8/test/cctest/test-shared-strings.cc | 1319 +- deps/v8/test/cctest/test-simple-riscv32.cc | 229 + .../cctest/test-smi-lexicographic-compare.cc | 1 - .../test/cctest/test-stack-unwinding-win64.cc | 3 +- deps/v8/test/cctest/test-strings.cc | 89 +- .../cctest/test-swiss-name-dictionary-csa.cc | 18 +- .../cctest/test-swiss-name-dictionary-infra.h | 4 - .../test-swiss-name-dictionary-shared-tests.h | 4 +- .../test/cctest/test-sync-primitives-arm.cc | 8 +- .../test/cctest/test-sync-primitives-arm64.cc | 5 +- deps/v8/test/cctest/test-temporal-parser.cc | 2466 --- .../v8/test/cctest/test-thread-termination.cc | 983 - deps/v8/test/cctest/test-transitions.cc | 11 +- deps/v8/test/cctest/test-typedarrays.cc | 7 +- .../test-unscopables-hidden-prototype.cc | 1 - .../test/cctest/test-unwinder-code-pages.cc | 18 +- deps/v8/test/cctest/test-usecounters.cc | 2 - deps/v8/test/cctest/test-utils-arm64.cc | 23 +- deps/v8/test/cctest/test-utils-arm64.h | 7 +- deps/v8/test/cctest/test-utils.cc | 5 +- deps/v8/test/cctest/testcfg.py | 34 +- deps/v8/test/cctest/torque/test-torque.cc | 2 +- deps/v8/test/cctest/trace-extension.h | 1 - .../v8/test/cctest/wasm/test-backing-store.cc | 4 +- deps/v8/test/cctest/wasm/test-c-wasm-entry.cc | 2 +- .../cctest/wasm/test-compilation-cache.cc | 8 +- deps/v8/test/cctest/wasm/test-gc.cc | 1397 +- .../cctest/wasm/test-jump-table-assembler.cc | 22 +- .../cctest/wasm/test-liftoff-inspection.cc | 36 +- deps/v8/test/cctest/wasm/test-run-wasm-64.cc | 9 +- .../test/cctest/wasm/test-run-wasm-asmjs.cc | 3 +- .../test/cctest/wasm/test-run-wasm-atomics.cc | 127 + .../cctest/wasm/test-run-wasm-exceptions.cc | 48 +- .../cctest/wasm/test-run-wasm-interpreter.cc | 14 +- deps/v8/test/cctest/wasm/test-run-wasm-js.cc | 2 +- .../test/cctest/wasm/test-run-wasm-module.cc | 59 +- .../cctest/wasm/test-run-wasm-relaxed-simd.cc | 117 +- .../v8/test/cctest/wasm/test-run-wasm-simd.cc | 119 +- .../cctest/wasm/test-run-wasm-wrappers.cc | 26 +- deps/v8/test/cctest/wasm/test-run-wasm.cc | 49 +- .../cctest/wasm/test-streaming-compilation.cc | 334 +- .../test/cctest/wasm/test-wasm-breakpoints.cc | 2 +- .../wasm/test-wasm-import-wrapper-cache.cc | 2 +- deps/v8/test/cctest/wasm/test-wasm-metrics.cc | 82 +- .../cctest/wasm/test-wasm-serialization.cc | 51 +- deps/v8/test/cctest/wasm/test-wasm-stack.cc | 2 +- deps/v8/test/cctest/wasm/test-wasm-strings.cc | 186 + .../cctest/wasm/test-wasm-trap-position.cc | 2 +- deps/v8/test/cctest/wasm/wasm-atomics-utils.h | 2 +- deps/v8/test/cctest/wasm/wasm-run-utils.cc | 88 +- deps/v8/test/cctest/wasm/wasm-run-utils.h | 42 +- deps/v8/test/cctest/wasm/wasm-simd-utils.cc | 26 +- deps/v8/test/common/assembler-tester.h | 61 +- .../{cctest/compiler => common}/c-signature.h | 8 +- .../{cctest/compiler => common}/call-tester.h | 11 +- .../code-assembler-tester.h | 11 +- deps/v8/test/common/flag-utils.h | 6 +- .../node-observer-tester.h | 9 +- .../compiler => common}/value-helper.cc | 4 +- .../compiler => common}/value-helper.h | 38 +- deps/v8/test/common/wasm/test-signatures.h | 20 +- deps/v8/test/common/wasm/wasm-interpreter.cc | 107 +- deps/v8/test/common/wasm/wasm-macro-gen.h | 136 +- .../v8/test/common/wasm/wasm-module-runner.cc | 4 +- deps/v8/test/common/wasm/wasm-module-runner.h | 1 - .../debugger/debug/debug-compile-optimized.js | 2 +- .../test/debugger/debug/debug-eval-scope.js | 2 +- .../debugger/debug/debug-evaluate-closure.js | 2 +- .../debug-evaluate-dead-function-fails.js | 2 +- .../debug/debug-evaluate-locals-capturing.js | 2 +- ...debug-evaluate-modify-catch-block-scope.js | 2 +- .../debug/debug-evaluate-nested-let.js | 2 +- .../debug-evaluate-repl-mode-optimized.js | 2 +- .../debug-evaluate-shadowed-context-4.js | 37 + .../test/debugger/debug/debug-liveedit-2.js | 2 +- .../test/debugger/debug/debug-liveedit-4.js | 2 +- .../debug-modules-set-variable-value.mjs | 2 +- deps/v8/test/debugger/debug/debug-optimize.js | 2 +- .../debug/debug-set-variable-value.js | 4 +- .../debug/debug-stack-check-position.js | 6 +- .../debug-stepin-property-function-call.js | 2 +- .../debugger/debug/es6/debug-blockscopes.js | 2 +- .../debug/es6/debug-evaluate-blockscopes.js | 2 +- .../es6/debug-promises/stepin-handler.js | 2 +- .../es8/async-function-debug-evaluate.js | 2 +- .../debug/es8/async-function-debug-scopes.js | 2 +- .../debug/lazy-deopt-then-flush-bytecode.js | 2 +- deps/v8/test/debugger/debug/regress-3225.js | 2 +- .../debugger/debug/regress/regress-10319.js | 9 +- .../debug/regress/regress-crbug-1357554.js | 20 + .../debug/regress/regress-crbug-171715.js | 2 +- .../debug/regress/regress-crbug-323936.js | 2 +- .../debug/regress/regress-crbug-633999.js | 2 +- .../regress/regress-opt-after-debug-deopt.js | 2 +- .../regress-prepare-break-while-recompile.js | 2 +- deps/v8/test/debugger/debugger.status | 7 +- .../debugger/regress/regress-crbug-1350842.js | 13 + deps/v8/test/debugger/testcfg.py | 4 - deps/v8/test/debugging/testcfg.py | 4 - deps/v8/test/fuzzer/fuzzer-support.cc | 12 +- deps/v8/test/fuzzer/inspector-fuzzer.cc | 5 - deps/v8/test/fuzzer/multi-return.cc | 2 - deps/v8/test/fuzzer/parser.cc | 4 +- deps/v8/test/fuzzer/regexp-builtins.cc | 32 +- deps/v8/test/fuzzer/regexp.cc | 2 +- deps/v8/test/fuzzer/testcfg.py | 25 +- deps/v8/test/fuzzer/wasm-async.cc | 10 +- deps/v8/test/fuzzer/wasm-code.cc | 2 - deps/v8/test/fuzzer/wasm-compile.cc | 106 +- deps/v8/test/fuzzer/wasm-fuzzer-common.cc | 358 +- deps/v8/test/fuzzer/wasm-fuzzer-common.h | 1 - deps/v8/test/fuzzer/wasm-streaming.cc | 199 + deps/v8/test/fuzzer/wasm.cc | 9 +- deps/v8/test/fuzzer/wasm_streaming/README.md | 4 + .../test/fuzzer/wasm_streaming/empty_module | Bin 0 -> 9 bytes .../fuzzer/wasm_streaming/regress-1334577 | Bin 0 -> 15 bytes .../fuzzer/wasm_streaming/regress-1335023 | Bin 0 -> 11 bytes deps/v8/test/fuzzilli/testcfg.py | 4 - deps/v8/test/inspector/DEPS | 2 + .../console/stack-tagging-expected.txt | 145 + .../test/inspector/console/stack-tagging.js | 134 + .../cpu-profiler/console-profile-wasm.js | 4 +- .../inspector/cpu-profiler/coverage-block.js | 2 +- .../test/inspector/cpu-profiler/coverage.js | 2 +- ...-on-exception-compiler-errors-expected.txt | 6 +- .../debugger/breakpoints-expected.txt | 2 +- .../v8/test/inspector/debugger/breakpoints.js | 2 +- .../debugger/class-fields-scopes-expected.txt | 216 + .../class-private-fields-scopes-expected.txt | 3 + .../debugger/es6-module-liveedit-expected.txt | 4 +- .../es6-module-script-parsed-expected.txt | 12 +- .../evaluate-on-callframe-this-expected.txt | 7 + .../debugger/evaluate-on-callframe-this.js | 32 + ...ssible-breakpoints-lazy-error-expected.txt | 6 +- .../regress-crbug-1319828-expected.txt | 18 + .../debugger/regress-crbug-1319828.js | 65 + .../resource-name-to-url-expected.txt | 24 +- .../fails-for-non-existant-index-expected.txt | 17 + .../fails-for-non-existant-index.js | 21 + .../fails-for-resumables-expected.txt | 51 + .../restart-frame/fails-for-resumables.js | 59 + .../fails-with-embedder-frames-expected.txt | 16 + .../fails-with-embedder-frames.js | 29 + .../fails-without-mode-param-expected.txt} | 2 +- .../fails-without-mode-param.js} | 0 .../restart-inlined-frame-expected.txt | 20 + .../restart-frame/restart-inlined-frame.js | 71 + ...start-top-frame-debugger-stmt-expected.txt | 15 + .../restart-top-frame-debugger-stmt.js | 31 + ...art-top-frame-local-variables-expected.txt | 72 + .../restart-top-frame-local-variables.js | 52 + ...art-top-frame-with-breakpoint-expected.txt | 15 + .../restart-top-frame-with-breakpoint.js | 35 + .../restart-various-frames-expected.txt | 139 + .../restart-frame/restart-various-frames.js | 69 + .../script-on-after-compile-expected.txt | 256 +- .../debugger/script-origin-stack-expected.txt | 12 +- ...t-parsed-for-runtime-evaluate-expected.txt | 80 +- .../debugger/script-parsed-hash-expected.txt | 12 +- ...set-breakpoint-after-liveedit-expected.txt | 4 +- ...script-source-active-function-expected.txt | 16 + .../set-script-source-active-function.js | 43 + .../set-script-source-exception-expected.txt | 1 + .../debugger/set-script-source-expected.txt | 5 +- .../set-script-source-top-frame-expected.txt | 17 + ...e-with-additional-activations-expected.txt | 21 + ...e-top-frame-with-additional-activations.js | 51 + .../debugger/set-script-source-top-frame.js | 42 + .../inspector/debugger/set-variable-value.js | 2 +- .../inspector/debugger/tdz-modules-scopes.js | 2 +- deps/v8/test/inspector/debugger/tdz-scopes.js | 2 +- .../value-unavailable-scopes-expected.txt | 13 + .../debugger/value-unavailable-scopes.js | 129 + .../debugger/wasm-gc-anyref-expected.txt | 36 + .../test/inspector/debugger/wasm-gc-anyref.js | 136 + .../debugger/wasm-gc-breakpoints-expected.txt | 12 +- .../inspector/debugger/wasm-gc-breakpoints.js | 38 +- .../debugger/wasm-scope-info-expected.txt | 44 +- ...-script-code-offset-streaming-expected.txt | 2 +- .../wasm-scripts-disassembly-expected.txt | 33 + .../debugger/wasm-scripts-disassembly.js | 84 + ...-terminate-execution-on-pause-expected.txt | 24 + .../wasm-terminate-execution-on-pause.js | 52 + deps/v8/test/inspector/frontend-channel.h | 1 - deps/v8/test/inspector/inspector-test.cc | 26 +- deps/v8/test/inspector/inspector.status | 31 +- deps/v8/test/inspector/isolate-data.cc | 6 +- deps/v8/test/inspector/isolate-data.h | 4 - deps/v8/test/inspector/protocol-test.js | 48 +- .../regress-crbug-1195927-expected.txt | 7 +- .../regress-crbug-1246896-expected.txt | 49 + .../regress/regress-crbug-1246896.js | 23 + .../regress-crbug-1328453-expected.txt | 7 + .../regress/regress-crbug-1328453.js | 30 + .../regress-crbug-1350842-expected.txt | 21 + .../regress/regress-crbug-1350842.js | 41 + .../regress-crbug-1353051-expected.txt | 16 + .../regress/regress-crbug-1353051.js | 18 + .../runtime/compile-script-expected.txt | 2 +- .../inspector/runtime/es6-module-expected.txt | 21 +- .../evaluate-repl-mode-silent-expected.txt | 26 + .../runtime/evaluate-repl-mode-silent.js | 60 + ...=> generate-web-driver-value-expected.txt} | 91 +- ...-value.js => generate-web-driver-value.js} | 36 +- .../runtime/regress-1078205-expected.txt | 26 +- .../runtime/regress-1321833-expected.txt | 67 + .../test/inspector/runtime/regress-1321833.js | 51 + deps/v8/test/inspector/task-runner.cc | 4 +- deps/v8/test/inspector/task-runner.h | 6 +- deps/v8/test/inspector/testcfg.py | 12 +- deps/v8/test/inspector/utils.h | 1 - deps/v8/test/inspector/wasm-inspector-test.js | 13 +- .../intl/date-format/format-range-to-parts.js | 2 +- deps/v8/test/intl/date-format/format-range.js | 2 +- deps/v8/test/intl/intl.status | 1 - .../format-range-numbering-system.js | 14 + .../intl/number-format/format-range-string.js | 105 + .../intl/number-format/format-range-v3.js | 10 +- .../test/intl/number-format/format-string.js | 132 + .../intl/number-format/options-digits-v3.js | 63 + .../test/intl/number-format/options-digits.js | 64 + .../rounding-increment-resolved-match-v3.js | 5 +- .../number-format/rounding-increment-v3.js | 32 +- .../intl/number-format/use-grouping-v3.js | 4 +- deps/v8/test/intl/regress-1336865.js | 79 + deps/v8/test/intl/regress-1347690.js | 19 + deps/v8/test/intl/string-localecompare.js | 2 +- deps/v8/test/intl/temporal/calendar/fields.js | 24 + deps/v8/test/intl/testcfg.py | 4 - deps/v8/test/js-perf-test/Array/at.js | 104 + deps/v8/test/js-perf-test/Array/run.js | 1 + .../test/js-perf-test/BigInt/bigint-util.js | 3 + .../test/js-perf-test/BigInt/bitwise-and.js | 95 + deps/v8/test/js-perf-test/BigInt/divide.js | 119 + .../test/js-perf-test/BigInt/exponentiate.js | 48 + deps/v8/test/js-perf-test/BigInt/multiply.js | 95 + .../js-perf-test/BytecodeHandlers/compare.js | 114 + .../GetOwnPropertyDescriptor.json | 85 + .../get-own-property-descriptor.js | 280 + .../GetOwnPropertyDescriptor/run.js | 24 + deps/v8/test/js-perf-test/JSTests1.json | 53 + deps/v8/test/js-perf-test/JSTests3.json | 5 +- deps/v8/test/js-perf-test/JSTests5.json | 4 +- .../fail/array-spread-non-iterable-object.js | 5 + .../fail/array-spread-non-iterable-object.out | 5 + .../destructuring-object-private-name.out | 4 +- .../message/fail/iterator-non-callable-2.js | 7 + .../message/fail/iterator-non-callable-2.out | 6 + .../message/fail/iterator-non-callable-3.js | 7 + .../message/fail/iterator-non-callable-3.out | 6 + .../message/fail/iterator-non-callable.js | 7 + .../message/fail/iterator-non-callable.out | 6 + .../fail/modules-import-assertions-fail-2.out | 4 +- .../modules-skip-stalled-top-level-await.mjs | 5 + .../fail/modules-stalled-top-level-await.mjs | 5 + .../fail/modules-stalled-top-level-await.out | 8 + .../message/fail/nf-yield-in-generator.out | 4 +- .../test/message/fail/nfe-yield-generator.out | 4 +- deps/v8/test/message/fail/spread-call-4.out | 4 +- .../message/fail/unexpected-identifier.js | 5 + .../message/fail/unexpected-identifier.out | 8 + .../message/fail/wasm-exception-rethrow.out | 5 +- .../fail/wasm-exception-stack-trace.js | 19 + .../fail/wasm-exception-stack-trace.out | 7 + .../message/fail/wasm-exception-throw.out | 5 +- deps/v8/test/message/message.status | 8 +- deps/v8/test/message/testcfg.py | 7 +- deps/v8/test/mjsunit/allocation-site-info.js | 2 +- .../mjsunit/array-bounds-check-removal.js | 2 +- .../mjsunit/array-constructor-feedback.js | 2 +- deps/v8/test/mjsunit/array-feedback.js | 2 +- deps/v8/test/mjsunit/array-includes-simd.js | 151 + deps/v8/test/mjsunit/array-indexof-simd.js | 202 + .../v8/test/mjsunit/array-literal-feedback.js | 2 +- .../test/mjsunit/array-literal-transitions.js | 4 +- deps/v8/test/mjsunit/array-push5.js | 2 +- deps/v8/test/mjsunit/array-reduce.js | 2 +- deps/v8/test/mjsunit/array-shift4.js | 2 +- deps/v8/test/mjsunit/array-sort.js | 9 +- deps/v8/test/mjsunit/array-store-and-grow.js | 2 +- deps/v8/test/mjsunit/asm/asm-validation.js | 5 +- .../async-hooks/regress-crbug-1337629.js | 11 + ...async-stack-traces-prepare-stacktrace-3.js | 4 +- .../mjsunit/baseline/batch-compilation.js | 2 +- .../mjsunit/baseline/deopt-to-baseline.js | 32 + .../mjsunit/baseline/flush-baseline-code.js | 10 +- .../baseline/flush-only-baseline-code.js | 2 +- deps/v8/test/mjsunit/baseline/test-osr.js | 2 +- deps/v8/test/mjsunit/binary-op-newspace.js | 2 +- deps/v8/test/mjsunit/canonicalize-nan.js | 23 + .../test/mjsunit/check-bounds-array-index.js | 2 +- .../check-bounds-string-from-char-code-at.js | 2 +- deps/v8/test/mjsunit/code-coverage-ad-hoc.js | 2 +- .../test/mjsunit/code-coverage-block-async.js | 2 +- .../test/mjsunit/code-coverage-block-noopt.js | 4 +- .../test/mjsunit/code-coverage-block-opt.js | 2 +- deps/v8/test/mjsunit/code-coverage-block.js | 2 +- .../mjsunit/code-coverage-class-fields.js | 2 +- deps/v8/test/mjsunit/code-coverage-precise.js | 2 +- .../compiler/abstract-equal-oddball.js | 2 +- .../compiler/abstract-equal-receiver.js | 2 +- .../mjsunit/compiler/abstract-equal-symbol.js | 2 +- .../compiler/abstract-equal-undetectable.js | 2 +- .../test/mjsunit/compiler/arguments-object.js | 25 +- .../mjsunit/compiler/array-buffer-is-view.js | 2 +- .../compiler/array-multiple-receiver-maps.js | 2 +- deps/v8/test/mjsunit/compiler/array-push-1.js | 2 +- deps/v8/test/mjsunit/compiler/array-push-2.js | 2 +- deps/v8/test/mjsunit/compiler/array-push-3.js | 2 +- .../mjsunit/compiler/array-slice-clone.js | 2 +- .../compiler/bigint-add-no-deopt-loop.js | 2 +- deps/v8/test/mjsunit/compiler/bigint-add.js | 2 +- .../v8/test/mjsunit/compiler/bigint-asintn.js | 2 +- .../test/mjsunit/compiler/bigint-asuintn.js | 2 +- .../mjsunit/compiler/bigint-bitwise-and.js | 35 + .../v8/test/mjsunit/compiler/bigint-divide.js | 46 + .../mjsunit/compiler/bigint-int64-lowered.js | 2 +- .../compiler/bigint-multiply-truncate.js | 28 + .../test/mjsunit/compiler/bigint-multiply.js | 22 + .../v8/test/mjsunit/compiler/bigint-negate.js | 2 +- .../mjsunit/compiler/bigint-uint64-lowered.js | 2 +- .../compiler/bound-functions-serialize.js | 2 +- .../call-with-arraylike-or-spread-2.js | 10 +- .../call-with-arraylike-or-spread-3.js | 8 +- .../call-with-arraylike-or-spread-4.js | 8 +- .../call-with-arraylike-or-spread-5.js | 8 +- .../call-with-arraylike-or-spread-6.js | 8 +- .../call-with-arraylike-or-spread-7.js | 8 +- .../compiler/call-with-arraylike-or-spread.js | 8 +- .../test/mjsunit/compiler/collection-has.js | 77 + .../concurrent-invalidate-transition-map.js | 2 +- .../compiler/concurrent-proto-change.js | 2 +- .../compiler/constant-fold-cow-array.js | 2 +- .../compiler/constant-fold-tostring.js | 2 +- .../compiler/construct-bound-function.js | 2 +- .../test/mjsunit/compiler/construct-object.js | 2 +- .../test/mjsunit/compiler/dataview-deopt.js | 2 +- .../mjsunit/compiler/dataview-detached.js | 2 +- deps/v8/test/mjsunit/compiler/dataview-get.js | 2 +- deps/v8/test/mjsunit/compiler/dataview-set.js | 2 +- .../mjsunit/compiler/deopt-array-builtins.js | 2 +- .../deopt-array-iterator-prototype-next.js | 2 +- .../compiler/deopt-array-prototype-every.js | 2 +- .../compiler/deopt-array-prototype-filter.js | 2 +- .../compiler/deopt-array-prototype-find.js | 2 +- .../deopt-array-prototype-findindex.js | 2 +- .../compiler/deopt-array-prototype-foreach.js | 2 +- .../deopt-array-prototype-includes.js | 2 +- .../compiler/deopt-array-prototype-indexof.js | 2 +- .../deopt-array-prototype-lastindexof.js | 2 +- .../compiler/deopt-array-prototype-map.js | 2 +- .../compiler/deopt-array-prototype-pop.js | 2 +- .../compiler/deopt-array-prototype-reduce.js | 2 +- .../compiler/deopt-array-prototype-slice.js | 2 +- .../compiler/deopt-array-prototype-some.js | 2 +- .../test/mjsunit/compiler/deopt-array-push.js | 2 +- .../compiler/deopt-inlined-from-call.js | 2 +- .../mjsunit/compiler/deopt-inlined-smi.js | 2 +- .../compiler/deopt-numberoroddball-binop.js | 2 +- .../test/mjsunit/compiler/deopt-pretenure.js | 2 +- .../compiler/deopt-string-outofbounds.js | 2 +- .../dont-flush-code-marked-for-opt.js | 2 +- .../test/mjsunit/compiler/expression-trees.js | 2 +- .../mjsunit/compiler/fast-api-annotations.js | 127 + .../mjsunit/compiler/fast-api-calls-wasm.js | 66 + .../test/mjsunit/compiler/fast-api-calls.js | 6 +- .../test/mjsunit/compiler/fast-api-helpers.js | 2 +- .../compiler/fast-api-interface-types.js | 4 +- .../compiler/fast-api-sequences-x64.js | 6 +- .../mjsunit/compiler/fast-api-sequences.js | 49 +- .../compiler/field-representation-tracking.js | 2 +- deps/v8/test/mjsunit/compiler/for-in-1.js | 2 +- deps/v8/test/mjsunit/compiler/for-in-2.js | 2 +- deps/v8/test/mjsunit/compiler/for-in-3.js | 2 +- deps/v8/test/mjsunit/compiler/for-in-4.js | 2 +- deps/v8/test/mjsunit/compiler/for-in-5.js | 2 +- .../mjsunit/compiler/get-iterator-deopt.js | 42 + .../compiler/globals-change-writable.js | 2 +- .../compiler/globals-freeze-constant.js | 2 +- .../compiler/globals-freeze-constanttype.js | 2 +- .../compiler/globals-freeze-mutable.js | 2 +- .../compiler/increment-typefeedback.js | 2 +- .../mjsunit/compiler/inline-exception-1.js | 2 +- .../mjsunit/compiler/inline-exception-2.js | 2 +- .../mjsunit/compiler/inlined-array-pop-opt.js | 2 +- .../compiler/inlined-call-polymorphic.js | 2 +- deps/v8/test/mjsunit/compiler/inlined-call.js | 2 +- .../mjsunit/compiler/integral32-add-sub.js | 2 +- .../compiler/is-being-interpreted-1.js | 2 +- .../compiler/is-being-interpreted-2.js | 2 +- .../mjsunit/compiler/js-create-arguments.js | 2 +- deps/v8/test/mjsunit/compiler/js-create.js | 2 +- .../compiler/manual-concurrent-recompile.js | 2 +- deps/v8/test/mjsunit/compiler/math-imul.js | 2 +- ...ative-context-specialization-hole-check.js | 2 +- deps/v8/test/mjsunit/compiler/number-abs.js | 2 +- deps/v8/test/mjsunit/compiler/number-ceil.js | 2 +- .../compiler/number-comparison-truncations.js | 2 +- .../v8/test/mjsunit/compiler/number-divide.js | 2 +- deps/v8/test/mjsunit/compiler/number-floor.js | 2 +- deps/v8/test/mjsunit/compiler/number-max.js | 2 +- deps/v8/test/mjsunit/compiler/number-min.js | 2 +- .../test/mjsunit/compiler/number-modulus.js | 2 +- .../test/mjsunit/compiler/number-multiply.js | 2 +- deps/v8/test/mjsunit/compiler/number-round.js | 2 +- .../test/mjsunit/compiler/number-toboolean.js | 2 +- deps/v8/test/mjsunit/compiler/number-trunc.js | 2 +- .../compiler/opt-higher-order-functions.js | 2 +- .../mjsunit/compiler/opt-next-call-turbo.js | 2 +- .../v8/test/mjsunit/compiler/opt-next-call.js | 2 +- .../mjsunit/compiler/optimized-array-at.js | 195 + .../compiler/optimized-float32array-length.js | 2 +- .../compiler/optimized-float64array-length.js | 2 +- .../compiler/optimized-int32array-length.js | 2 +- .../compiler/optimized-uint32array-length.js | 2 +- .../test/mjsunit/compiler/osr-block-scope.js | 1 + .../compiler/promise-resolve-stable-maps.js | 2 +- .../compiler/redundancy-elimination.js | 2 +- .../compiler/reference-equal-boolean.js | 20 + .../test/mjsunit/compiler/regress-1092011.js | 2 +- .../test/mjsunit/compiler/regress-1125145.js | 2 +- .../test/mjsunit/compiler/regress-1199345.js | 2 +- .../test/mjsunit/compiler/regress-3185901.js | 2 +- .../test/mjsunit/compiler/regress-3260426.js | 2 +- .../test/mjsunit/compiler/regress-446647.js | 2 +- deps/v8/test/mjsunit/compiler/regress-5320.js | 2 +- deps/v8/test/mjsunit/compiler/regress-6.js | 2 +- deps/v8/test/mjsunit/compiler/regress-9017.js | 2 +- .../test/mjsunit/compiler/regress-905555-2.js | 2 +- .../test/mjsunit/compiler/regress-905555.js | 2 +- .../test/mjsunit/compiler/regress-9137-1.js | 2 +- .../test/mjsunit/compiler/regress-9137-2.js | 2 +- .../test/mjsunit/compiler/regress-957559.js | 2 +- .../test/mjsunit/compiler/regress-9945-1.js | 2 +- .../test/mjsunit/compiler/regress-9945-2.js | 2 +- .../compiler/regress-compare-negate.js | 2 +- .../mjsunit/compiler/regress-crbug-1223107.js | 2 +- .../mjsunit/compiler/regress-crbug-1323114.js | 19 + .../mjsunit/compiler/regress-crbug-1344965.js | 9 + .../mjsunit/compiler/regress-crbug-1353360.js | 46 + .../mjsunit/compiler/regress-crbug-1355824.js | 19 + .../mjsunit/compiler/regress-crbug-965513.js | 2 +- ...ss-nonextensiblearray-store-outofbounds.js | 2 +- .../regress-sealedarray-store-outofbounds.js | 2 +- .../test/mjsunit/compiler/regress-v8-9139.js | 2 +- .../mjsunit/compiler/serializer-accessors.js | 2 +- .../test/mjsunit/compiler/serializer-apply.js | 2 +- .../test/mjsunit/compiler/serializer-call.js | 2 +- .../compiler/serializer-dead-after-jump.js | 2 +- .../compiler/serializer-dead-after-return.js | 2 +- .../serializer-transition-propagation.js | 2 +- .../store-data-property-in-literal-private.js | 2 +- .../mjsunit/compiler/stress-deopt-count-1.js | 2 +- .../mjsunit/compiler/stress-deopt-count-2.js | 2 +- .../mjsunit/compiler/strict-equal-receiver.js | 2 +- .../compiler/string-from-code-point.js | 2 +- .../mjsunit/compiler/string-startswith.js | 2 +- .../compiler/test-literal-map-migration.js | 2 +- .../typedarray-resizablearraybuffer.js | 27 + .../mjsunit/compiler/uint8-clamped-array.js | 2 +- deps/v8/test/mjsunit/compiler/verify-type.js | 2 +- .../concurrent-initial-prototype-change-1.js | 9 +- .../concurrent-initial-prototype-change-2.js | 9 +- deps/v8/test/mjsunit/const-dict-tracking.js | 2 +- deps/v8/test/mjsunit/const-field-tracking.js | 2 +- deps/v8/test/mjsunit/constant-folding-2.js | 2 +- deps/v8/test/mjsunit/default-nospec.js | 2 +- deps/v8/test/mjsunit/deopt-minus-zero.js | 2 +- .../mjsunit/deopt-recursive-eager-once.js | 2 +- .../test/mjsunit/deopt-recursive-lazy-once.js | 2 +- .../test/mjsunit/deopt-recursive-soft-once.js | 2 +- deps/v8/test/mjsunit/deopt-unlinked.js | 2 +- deps/v8/test/mjsunit/deopt-with-fp-regs.js | 4 +- .../mjsunit/deserialize-optimize-inner.js | 2 +- deps/v8/test/mjsunit/div-mul-minus-one.js | 2 +- deps/v8/test/mjsunit/elements-kind.js | 2 +- .../mjsunit/elements-transition-hoisting.js | 2 +- deps/v8/test/mjsunit/elements-transition.js | 2 +- .../mjsunit/ensure-growing-store-learns.js | 4 +- .../test/mjsunit/es6/array-iterator-turbo.js | 4 +- deps/v8/test/mjsunit/es6/array-iterator.js | 8 +- .../mjsunit/es6/block-conflicts-sloppy.js | 2 +- .../v8/test/mjsunit/es6/block-const-assign.js | 2 +- .../es6/block-let-crankshaft-sloppy.js | 2 +- .../test/mjsunit/es6/block-let-crankshaft.js | 2 +- .../test/mjsunit/es6/block-scoping-sloppy.js | 2 +- deps/v8/test/mjsunit/es6/block-scoping.js | 2 +- .../test/mjsunit/es6/collection-iterator.js | 14 +- ...collections-constructor-custom-iterator.js | 2 +- ...ctions-constructor-iterator-side-effect.js | 2 +- ...nstructor-with-modified-array-prototype.js | 2 +- ...ions-constructor-with-modified-protoype.js | 2 +- .../mjsunit/es6/iterator-call-lazy-deopt.js | 66 + .../test/mjsunit/es6/iterator-eager-deopt.js | 5 +- ...zy-deopt.js => iterator-get-lazy-deopt.js} | 7 +- .../es6/iterator-invalid-receiver-opt.js | 51 + .../mjsunit/es6/large-classes-properties.js | 2 +- .../es6/map-constructor-entry-side-effect.js | 2 +- .../es6/map-constructor-entry-side-effect2.js | 2 +- .../es6/map-constructor-entry-side-effect3.js | 2 +- .../es6/map-constructor-entry-side-effect4.js | 2 +- deps/v8/test/mjsunit/es6/map-iterator-1.js | 2 +- deps/v8/test/mjsunit/es6/map-iterator-10.js | 2 +- deps/v8/test/mjsunit/es6/map-iterator-2.js | 2 +- deps/v8/test/mjsunit/es6/map-iterator-3.js | 2 +- deps/v8/test/mjsunit/es6/map-iterator-4.js | 2 +- deps/v8/test/mjsunit/es6/map-iterator-5.js | 2 +- deps/v8/test/mjsunit/es6/map-iterator-6.js | 2 +- deps/v8/test/mjsunit/es6/map-iterator-7.js | 2 +- deps/v8/test/mjsunit/es6/map-iterator-8.js | 2 +- deps/v8/test/mjsunit/es6/map-iterator-9.js | 2 +- deps/v8/test/mjsunit/es6/set-iterator-1.js | 2 +- deps/v8/test/mjsunit/es6/set-iterator-10.js | 2 +- deps/v8/test/mjsunit/es6/set-iterator-2.js | 2 +- deps/v8/test/mjsunit/es6/set-iterator-3.js | 2 +- deps/v8/test/mjsunit/es6/set-iterator-4.js | 2 +- deps/v8/test/mjsunit/es6/set-iterator-5.js | 2 +- deps/v8/test/mjsunit/es6/set-iterator-6.js | 2 +- deps/v8/test/mjsunit/es6/set-iterator-7.js | 2 +- deps/v8/test/mjsunit/es6/set-iterator-8.js | 2 +- deps/v8/test/mjsunit/es6/set-iterator-9.js | 2 +- deps/v8/test/mjsunit/es6/string-iterator.js | 2 +- deps/v8/test/mjsunit/es6/string-iterator2.js | 2 +- deps/v8/test/mjsunit/es6/string-iterator3.js | 2 +- deps/v8/test/mjsunit/es6/string-iterator4.js | 2 +- deps/v8/test/mjsunit/es6/string-iterator6.js | 2 +- .../mjsunit/es6/super-ic-opt-no-turboprop.js | 4 +- deps/v8/test/mjsunit/es6/super-ic-opt.js | 4 +- deps/v8/test/mjsunit/es6/typedarray-fill.js | 11 + deps/v8/test/mjsunit/es9/object-rest-basic.js | 6 +- deps/v8/test/mjsunit/eval-origin.js | 2 +- .../test/mjsunit/external-backing-store-gc.js | 13 - deps/v8/test/mjsunit/field-type-tracking.js | 4 +- deps/v8/test/mjsunit/filter-element-kinds.js | 2 +- deps/v8/test/mjsunit/frozen-array-reduce.js | 2 +- deps/v8/test/mjsunit/getters-on-elements.js | 2 +- deps/v8/test/mjsunit/global-prototypes.js | 2 +- ...prototype-groupby-fast-path-assumptions.js | 4 +- .../harmony/array-prototype-groupby.js | 52 +- .../harmony/array-prototype-groupbytomap.js | 54 +- .../test/mjsunit/harmony/array-to-reversed.js | 108 + .../test/mjsunit/harmony/array-to-sorted.js | 122 + .../test/mjsunit/harmony/array-to-spliced.js | 144 + deps/v8/test/mjsunit/harmony/array-with.js | 136 + .../mjsunit/harmony/arraybuffer-transfer.js | 132 + .../async-generators-return-broken-promise.js | 82 + ...ync-1thread-buffer-out-of-scope-timeout.js | 2 +- .../mjsunit/harmony/bigint/property-names.js | 23 + .../harmony/bigint/rematerialize-on-deopt.js | 2 +- .../define-private-class-field-stress.js | 2 +- deps/v8/test/mjsunit/harmony/has-own.js | 2 - .../mjsunit/harmony/regexp-overriden-exec.js | 2 +- .../mjsunit/harmony/regress/regress-912504.js | 2 +- .../harmony/shadowrealm-importvalue.js | 67 + .../mjsunit/harmony/shadowrealm-skip-1.mjs | 7 + .../harmony/shadowrealm-skip-2-throw.mjs | 2 + .../mjsunit/harmony/typedarray-to-reversed.js | 160 + .../mjsunit/harmony/typedarray-tostringtag.js | 23 + .../test/mjsunit/harmony/typedarray-with.js | 310 + .../weakrefs/cleanupsome-after-unregister.js | 2 - deps/v8/test/mjsunit/ic-megadom-2.js | 6 +- deps/v8/test/mjsunit/ic-megadom-3.js | 57 + deps/v8/test/mjsunit/ic-megadom.js | 5 +- .../ic-migrated-map-add-when-monomorphic.js | 2 +- .../ic-migrated-map-add-when-uninitialized.js | 2 +- .../ic-migrated-map-update-when-deprecated.js | 2 +- .../test/mjsunit/ignition/regress-672027.js | 2 +- .../v8/test/mjsunit/ignition/throw-if-hole.js | 2 +- .../mjsunit/ignition/throw-if-not-hole.js | 2 +- .../ignition/throw-super-not-called.js | 2 +- .../test/mjsunit/interrupt-budget-override.js | 2 +- deps/v8/test/mjsunit/json-errors.js | 12 +- .../mjsunit/keyed-load-hole-to-undefined.js | 4 +- .../mjsunit/keyed-load-with-string-key.js | 2 +- .../mjsunit/keyed-load-with-symbol-key.js | 2 +- deps/v8/test/mjsunit/keyed-store-generic.js | 2 +- deps/v8/test/mjsunit/large-external-string.js | 16 + deps/v8/test/mjsunit/maglev/18.js | 2 +- deps/v8/test/mjsunit/maglev/add-number.js | 88 + deps/v8/test/mjsunit/maglev/add-smi.js | 2 +- .../v8/test/mjsunit/maglev/call-js-runtime.js | 21 + .../mjsunit/maglev/call-runtime-for-pair.js | 23 + .../constant-in-proto-proxy-after-holder.js | 36 + ...ring-assignment-with-exclude-properties.js | 17 + .../mjsunit/maglev/eager-deopt-in-inline.js | 23 + deps/v8/test/mjsunit/maglev/exceptions.js | 79 + .../mjsunit/maglev/get-template-object.js | 20 + deps/v8/test/mjsunit/maglev/inner-function.js | 20 + deps/v8/test/mjsunit/maglev/int32-branch.js | 42 + .../lazy-deopt-with-onstack-activation.js | 2 +- .../lazy-deopt-without-onstack-activation.js | 2 +- .../maglev/lda-global-inside-typeof.js | 23 + deps/v8/test/mjsunit/maglev/lda-global.js | 23 + .../maglev/lda-module-variable-import.mjs | 8 + .../mjsunit/maglev/lda-module-variable.mjs | 33 + deps/v8/test/mjsunit/maglev/literals.js | 51 + deps/v8/test/mjsunit/maglev/load-named.js | 59 + .../test/mjsunit/maglev/lots-of-registers.js | 59 + .../mjsunit/maglev/mutable-context-access.js | 94 + .../test/mjsunit/maglev/osr-from-ml-to-tf.js | 39 + deps/v8/test/mjsunit/maglev/osr-to-tf.js | 25 + .../mjsunit/maglev/regress/regress-1359382.js | 19 + .../mjsunit/maglev/regress/regress-1359928.js | 28 + .../mjsunit/maglev/set-pending-message.js | 22 + .../mjsunit/maglev/shift-right-logical-smi.js | 48 + .../mjsunit/maglev/shift-right-logical.js | 44 + .../v8/test/mjsunit/maglev/shift-right-smi.js | 45 + deps/v8/test/mjsunit/maglev/shift-right.js | 41 + .../v8/test/mjsunit/maglev/simple-inlining.js | 20 + deps/v8/test/mjsunit/maglev/spill-double.js | 37 + .../mjsunit/maglev/sta-module-variable.mjs | 20 + deps/v8/test/mjsunit/maglev/string-compare.js | 118 + deps/v8/test/mjsunit/maglev/super-ic.js | 35 + .../test/mjsunit/maglev/tier-to-ml-to-tf.js | 44 + .../maglev/undefined-or-null-branch.js | 19 + deps/v8/test/mjsunit/math-deopt.js | 2 +- .../mjsunit/math-floor-of-div-minus-zero.js | 2 +- .../test/mjsunit/math-floor-of-div-nosudiv.js | 2 +- deps/v8/test/mjsunit/math-floor-of-div.js | 2 +- deps/v8/test/mjsunit/messages.js | 142 +- deps/v8/test/mjsunit/mjsunit-assert-equals.js | 98 + deps/v8/test/mjsunit/mjsunit.js | 24 +- deps/v8/test/mjsunit/mjsunit.status | 272 +- .../mjsunit/modules-import-meta-turbo.mjs | 2 +- deps/v8/test/mjsunit/modules-turbo1.mjs | 2 +- deps/v8/test/mjsunit/never-optimize.js | 2 +- .../mjsunit/non-extensible-array-reduce.js | 2 +- deps/v8/test/mjsunit/noopt.js | 4 +- deps/v8/test/mjsunit/object-seal.js | 2 +- .../omit-default-ctors-array-iterator.js | 28 + deps/v8/test/mjsunit/omit-default-ctors.js | 484 + deps/v8/test/mjsunit/optimized-array-every.js | 4 +- deps/v8/test/mjsunit/optimized-array-find.js | 4 +- .../test/mjsunit/optimized-array-findindex.js | 4 +- deps/v8/test/mjsunit/optimized-array-some.js | 4 +- deps/v8/test/mjsunit/optimized-filter.js | 2 +- deps/v8/test/mjsunit/optimized-map.js | 2 +- deps/v8/test/mjsunit/optimized-reduce.js | 2 +- deps/v8/test/mjsunit/optimized-reduceright.js | 2 +- .../test/mjsunit/optimized-string-includes.js | 2 +- deps/v8/test/mjsunit/promise-hooks.js | 2 +- .../protector-cell/array-constructor-2.js | 2 +- .../protector-cell/array-constructor.js | 2 +- .../protector-cell/array-iterator-2.js | 2 +- .../mjsunit/protector-cell/array-iterator.js | 2 +- .../mjsunit/protector-cell/array-next-1.js | 2 +- .../mjsunit/protector-cell/array-next-2.js | 2 +- .../protector-cell/bigint64Array-species.js | 2 +- .../protector-cell/biguint64Array-species.js | 2 +- .../protector-cell/concat-spreadable.js.js | 2 +- .../protector-cell/float32Array-species.js | 2 +- .../protector-cell/float64Array-species.js | 2 +- .../protector-cell/int16Array-species.js | 2 +- .../protector-cell/int32Array-species.js | 2 +- .../protector-cell/int8array-species.js | 2 +- .../test/mjsunit/protector-cell/iterator.js | 2 +- .../mjsunit/protector-cell/map-iterator-2.js | 2 +- .../mjsunit/protector-cell/map-iterator.js | 2 +- .../test/mjsunit/protector-cell/map-next-1.js | 2 +- .../test/mjsunit/protector-cell/map-next-2.js | 2 +- .../protector-cell/promise-constructor-2.js | 2 +- .../protector-cell/promise-constructor.js | 2 +- .../protector-cell/regexp-constructor-2.js | 2 +- .../protector-cell/regexp-constructor.js | 2 +- .../mjsunit/protector-cell/set-iterator-1.js | 2 +- .../mjsunit/protector-cell/set-iterator-2.js | 2 +- .../mjsunit/protector-cell/set-iterator-3.js | 2 +- .../mjsunit/protector-cell/set-iterator-4.js | 2 +- .../test/mjsunit/protector-cell/set-next-1.js | 2 +- .../test/mjsunit/protector-cell/set-next-2.js | 2 +- .../v8/test/mjsunit/protector-cell/species.js | 2 +- .../mjsunit/protector-cell/string-iterator.js | 2 +- .../mjsunit/protector-cell/string-next-1.js | 2 +- .../mjsunit/protector-cell/string-next-2.js | 2 +- .../typedarray-constructor-1.js | 2 +- .../typedarray-constructor-10.js | 2 +- .../typedarray-constructor-2.js | 2 +- .../typedarray-constructor-3.js | 2 +- .../typedarray-constructor-4.js | 2 +- .../typedarray-constructor-5.js | 2 +- .../typedarray-constructor-6.js | 2 +- .../typedarray-constructor-7.js | 2 +- .../typedarray-constructor-8.js | 2 +- .../typedarray-constructor-9.js | 2 +- .../typedarray-prototype-constructor-1.js | 2 +- .../typedarray-prototype-constructor-10.js | 2 +- .../typedarray-prototype-constructor-2.js | 2 +- .../typedarray-prototype-constructor-3.js | 2 +- .../typedarray-prototype-constructor-4.js | 2 +- .../typedarray-prototype-constructor-5.js | 2 +- .../typedarray-prototype-constructor-6.js | 2 +- .../typedarray-prototype-constructor-7.js | 2 +- .../typedarray-prototype-constructor-8.js | 2 +- .../typedarray-prototype-constructor-9.js | 2 +- .../protector-cell/uint16Array-species.js | 2 +- .../protector-cell/uint32Array-species.js | 2 +- .../protector-cell/uint8Array-species.js | 2 +- .../test/mjsunit/rab-gsab-valueserializer.js | 17 + .../test/mjsunit/random-bit-correlations.js | 2 +- deps/v8/test/mjsunit/readonly.js | 2 +- deps/v8/test/mjsunit/regress-crbug-1321980.js | 13 + deps/v8/test/mjsunit/regress-crbug-1359991.js | 20 + .../mjsunit/regress/asm/regress-618608.js | 2 +- .../test/mjsunit/regress/regress-1016450.js | 2 +- .../test/mjsunit/regress/regress-1034449.js | 2 +- .../test/mjsunit/regress/regress-1049982-1.js | 2 +- .../test/mjsunit/regress/regress-1049982-2.js | 2 +- .../test/mjsunit/regress/regress-1073440.js | 2 +- .../test/mjsunit/regress/regress-1112155.js | 2 +- .../test/mjsunit/regress/regress-1125871.js | 2 +- deps/v8/test/mjsunit/regress/regress-1129.js | 2 +- .../test/mjsunit/regress/regress-1166136-0.js | 2 +- .../test/mjsunit/regress/regress-1166136-1.js | 2 +- .../test/mjsunit/regress/regress-1166136-2.js | 2 +- .../test/mjsunit/regress/regress-1212583.js | 2 +- deps/v8/test/mjsunit/regress/regress-12359.js | 2 +- .../test/mjsunit/regress/regress-1254191.js | 2 +- .../test/mjsunit/regress/regress-1320094.js | 25 + .../test/mjsunit/regress/regress-1323602.js | 20 + .../test/mjsunit/regress/regress-1353555.js | 16 + .../test/mjsunit/regress/regress-1359230.js | 30 + deps/v8/test/mjsunit/regress/regress-2132.js | 2 +- deps/v8/test/mjsunit/regress/regress-2250.js | 2 +- deps/v8/test/mjsunit/regress/regress-2315.js | 2 +- deps/v8/test/mjsunit/regress/regress-2339.js | 2 +- deps/v8/test/mjsunit/regress/regress-2451.js | 2 +- .../v8/test/mjsunit/regress/regress-252797.js | 2 +- deps/v8/test/mjsunit/regress/regress-2618.js | 12 +- deps/v8/test/mjsunit/regress/regress-2989.js | 2 +- deps/v8/test/mjsunit/regress/regress-3176.js | 2 +- .../regress/regress-319722-ArrayBuffer.js | 2 +- .../regress/regress-319722-TypedArrays.js | 2 +- .../v8/test/mjsunit/regress/regress-330046.js | 2 +- .../v8/test/mjsunit/regress/regress-347914.js | 2 +- .../v8/test/mjsunit/regress/regress-354357.js | 2 +- .../v8/test/mjsunit/regress/regress-3650-3.js | 2 +- deps/v8/test/mjsunit/regress/regress-3709.js | 2 +- .../v8/test/mjsunit/regress/regress-379770.js | 2 +- .../v8/test/mjsunit/regress/regress-385565.js | 2 +- deps/v8/test/mjsunit/regress/regress-3976.js | 2 +- .../v8/test/mjsunit/regress/regress-410912.js | 2 +- deps/v8/test/mjsunit/regress/regress-4121.js | 2 +- deps/v8/test/mjsunit/regress/regress-4380.js | 2 +- .../v8/test/mjsunit/regress/regress-453481.js | 2 +- deps/v8/test/mjsunit/regress/regress-4578.js | 4 +- .../v8/test/mjsunit/regress/regress-475705.js | 2 +- .../v8/test/mjsunit/regress/regress-476488.js | 2 +- deps/v8/test/mjsunit/regress/regress-4908.js | 2 +- deps/v8/test/mjsunit/regress/regress-5174.js | 4 +- deps/v8/test/mjsunit/regress/regress-5404.js | 2 +- .../v8/test/mjsunit/regress/regress-543994.js | 2 +- deps/v8/test/mjsunit/regress/regress-5440.js | 2 +- deps/v8/test/mjsunit/regress/regress-5660.js | 2 +- deps/v8/test/mjsunit/regress/regress-5790.js | 2 +- deps/v8/test/mjsunit/regress/regress-5802.js | 2 +- .../v8/test/mjsunit/regress/regress-619382.js | 6 +- .../v8/test/mjsunit/regress/regress-632289.js | 2 +- .../v8/test/mjsunit/regress/regress-655573.js | 2 +- .../v8/test/mjsunit/regress/regress-6607-1.js | 2 +- .../v8/test/mjsunit/regress/regress-6607-2.js | 2 +- .../test/mjsunit/regress/regress-681171-1.js | 2 +- .../test/mjsunit/regress/regress-681171-2.js | 2 +- .../test/mjsunit/regress/regress-681171-3.js | 2 +- deps/v8/test/mjsunit/regress/regress-6941.js | 2 +- deps/v8/test/mjsunit/regress/regress-6948.js | 2 +- deps/v8/test/mjsunit/regress/regress-6989.js | 2 +- deps/v8/test/mjsunit/regress/regress-6991.js | 2 +- .../v8/test/mjsunit/regress/regress-7014-1.js | 2 +- .../v8/test/mjsunit/regress/regress-7014-2.js | 2 +- deps/v8/test/mjsunit/regress/regress-7135.js | 2 +- .../v8/test/mjsunit/regress/regress-722978.js | 2 +- deps/v8/test/mjsunit/regress/regress-7254.js | 2 +- .../v8/test/mjsunit/regress/regress-730254.js | 2 +- deps/v8/test/mjsunit/regress/regress-7510.js | 2 +- .../v8/test/mjsunit/regress/regress-772190.js | 2 +- .../v8/test/mjsunit/regress/regress-794825.js | 2 +- .../v8/test/mjsunit/regress/regress-804096.js | 2 +- .../v8/test/mjsunit/regress/regress-804837.js | 2 +- .../v8/test/mjsunit/regress/regress-818070.js | 2 +- deps/v8/test/mjsunit/regress/regress-84234.js | 2 +- .../v8/test/mjsunit/regress/regress-863155.js | 2 +- deps/v8/test/mjsunit/regress/regress-8913.js | 2 +- deps/v8/test/mjsunit/regress/regress-9002.js | 2 +- .../v8/test/mjsunit/regress/regress-919340.js | 2 +- deps/v8/test/mjsunit/regress/regress-9441.js | 2 +- .../regress/regress-961709-classes-opt.js | 2 +- .../regress-assignment-in-test-context.js | 2 +- ...binary-bitwise-bigint-smi-mix-opt-depot.js | 2 +- .../regress/regress-bind-deoptimize.js | 2 +- .../mjsunit/regress/regress-charat-empty.js | 2 +- .../regress/regress-conditional-position.js | 2 +- .../mjsunit/regress/regress-crbug-1002628.js | 2 +- .../mjsunit/regress/regress-crbug-1004037.js | 2 +- .../mjsunit/regress/regress-crbug-1065741.js | 2 +- .../mjsunit/regress/regress-crbug-1171954.js | 2 +- .../mjsunit/regress/regress-crbug-1249941.js | 2 +- .../mjsunit/regress/regress-crbug-1259902.js | 2 +- .../mjsunit/regress/regress-crbug-1262007.js | 2 +- .../mjsunit/regress/regress-crbug-1308360.js | 44 + .../mjsunit/regress/regress-crbug-1309467.js | 33 + .../mjsunit/regress/regress-crbug-1321573.js | 8 + .../regress/regress-crbug-1321899-1.js | 11 +- .../regress/regress-crbug-1321899-3.js | 53 +- .../regress/regress-crbug-1321899-5.js | 11 +- .../mjsunit/regress/regress-crbug-1321899.js | 111 +- .../mjsunit/regress/regress-crbug-1327321.js | 10 + .../mjsunit/regress/regress-crbug-1329234.js | 11 + .../mjsunit/regress/regress-crbug-1335445.js | 37 + .../regress/regress-crbug-1339722-2.js | 7 + .../regress/regress-crbug-1339722-3.js | 18 + .../regress/regress-crbug-1339722-4.js | 7 + .../regress/regress-crbug-1339722-5.js | 14 + .../regress/regress-crbug-1339722-6.js | 7 + .../regress/regress-crbug-1339722-7.js | 16 + .../regress/regress-crbug-1339722-8.js | 7 + .../mjsunit/regress/regress-crbug-1339722.js | 12 + .../mjsunit/regress/regress-crbug-1344549.js | 43 + .../mjsunit/regress/regress-crbug-1347721.js | 13 + .../mjsunit/regress/regress-crbug-1347722.js | 12 + .../mjsunit/regress/regress-crbug-1350270.js | 19 + .../mjsunit/regress/regress-crbug-1360736.js | 9 + .../mjsunit/regress/regress-crbug-157019.js | 2 +- .../mjsunit/regress/regress-crbug-157520.js | 2 +- .../mjsunit/regress/regress-crbug-245480.js | 2 +- .../mjsunit/regress/regress-crbug-352058.js | 17 - .../mjsunit/regress/regress-crbug-431602.js | 2 +- .../mjsunit/regress/regress-crbug-467531.js | 2 +- .../mjsunit/regress/regress-crbug-480807.js | 2 +- .../mjsunit/regress/regress-crbug-480819.js | 2 +- .../mjsunit/regress/regress-crbug-500497.js | 2 +- .../mjsunit/regress/regress-crbug-554831.js | 2 +- .../mjsunit/regress/regress-crbug-587068.js | 2 +- .../mjsunit/regress/regress-crbug-594183.js | 2 +- .../mjsunit/regress/regress-crbug-608279.js | 2 +- .../mjsunit/regress/regress-crbug-609029.js | 2 +- .../mjsunit/regress/regress-crbug-617524.js | 2 +- .../mjsunit/regress/regress-crbug-630952.js | 2 +- .../mjsunit/regress/regress-crbug-633585.js | 2 +- .../mjsunit/regress/regress-crbug-644111.js | 2 +- .../mjsunit/regress/regress-crbug-644631.js | 2 +- .../regress/regress-crbug-651403-global.js | 2 +- .../mjsunit/regress/regress-crbug-651403.js | 2 +- .../regress/regress-crbug-652186-global.js | 2 +- .../regress/regress-crbug-652186-local.js | 2 +- .../mjsunit/regress/regress-crbug-691687.js | 2 +- .../mjsunit/regress/regress-crbug-736451.js | 2 +- .../mjsunit/regress/regress-crbug-768158.js | 2 +- .../mjsunit/regress/regress-crbug-808192.js | 2 +- .../mjsunit/regress/regress-crbug-882233-2.js | 2 +- .../mjsunit/regress/regress-crbug-936302.js | 2 +- .../mjsunit/regress/regress-crbug-937734.js | 2 +- .../mjsunit/regress/regress-crbug-941743.js | 2 +- .../mjsunit/regress/regress-crbug-961709-2.js | 2 +- .../mjsunit/regress/regress-crbug-980529.js | 2 +- .../regress/regress-embedded-cons-string.js | 2 +- .../regress-fast-literal-transition.js | 8 +- .../regress/regress-map-invalidation-2.js | 2 +- .../regress/regress-param-local-type.js | 2 +- .../regress/regress-store-uncacheable.js | 2 +- .../regress/regress-stringAt-boundsCheck.js | 2 +- .../regress-trap-allocation-memento.js | 2 +- .../regress-unlink-closures-on-deopt.js | 2 +- .../test/mjsunit/regress/regress-v8-12194.js | 2 +- .../test/mjsunit/regress/regress-v8-13037.js | 9 + .../test/mjsunit/regress/regress-v8-13097.js | 6 + .../test/mjsunit/regress/regress-v8-13110.js | 13 + .../test/mjsunit/regress/regress-v8-13181.js | 19 + .../test/mjsunit/regress/regress-v8-5697.js | 2 +- .../mjsunit/regress/string-next-encoding.js | 2 +- .../regress/wasm/i32-lowering-inlining.js | 33 + .../mjsunit/regress/wasm/regress-02256.js | 2 +- .../mjsunit/regress/wasm/regress-02256b.js | 2 +- .../mjsunit/regress/wasm/regress-10702.js | 2 +- .../mjsunit/regress/wasm/regress-1074586-b.js | 4 +- .../mjsunit/regress/wasm/regress-1179065.js | 10 +- .../mjsunit/regress/wasm/regress-1187831.js | 2 +- .../mjsunit/regress/wasm/regress-1189454.js | 2 +- .../mjsunit/regress/wasm/regress-1236958.js | 3 +- .../mjsunit/regress/wasm/regress-1237024.js | 5 +- .../mjsunit/regress/wasm/regress-1239954.js | 9 +- .../mjsunit/regress/wasm/regress-1247659.js | 2 +- .../mjsunit/regress/wasm/regress-12624.js | 2 +- .../mjsunit/regress/wasm/regress-12789.js | 38 + .../mjsunit/regress/wasm/regress-12866.js | 8 + .../mjsunit/regress/wasm/regress-12867.js | 18 + .../mjsunit/regress/wasm/regress-12874.js | 43 + .../mjsunit/regress/wasm/regress-12945.js | 43 + .../mjsunit/regress/wasm/regress-1299183.js | 90 +- .../mjsunit/regress/wasm/regress-13061.js | 29 + .../mjsunit/regress/wasm/regress-13118.js | 19 + .../mjsunit/regress/wasm/regress-13123.js | 6 + .../mjsunit/regress/wasm/regress-1314184.js | 24 + .../mjsunit/regress/wasm/regress-13230.js | 30 + .../mjsunit/regress/wasm/regress-13290.js | 29 + .../mjsunit/regress/wasm/regress-1338150.js | 8 + .../mjsunit/regress/wasm/regress-1339153.js | 24 + .../mjsunit/regress/wasm/regress-1347073.js | 10 + .../mjsunit/regress/wasm/regress-647649.js | 2 +- .../mjsunit/regress/wasm/regress-731351.js | 23 - .../mjsunit/regress/wasm/regress-739768.js | 2 +- .../test/mjsunit/regress/wasm/regress-7785.js | 5 +- .../mjsunit/regress/wasm/regress-803788.js | 2 +- .../mjsunit/regress/wasm/regress-808848.js | 5 +- .../mjsunit/regress/wasm/regress-808980.js | 4 +- .../test/mjsunit/regress/wasm/regress-8094.js | 2 +- .../mjsunit/regress/wasm/regress-817380.js | 3 +- .../mjsunit/regress/wasm/regress-834619.js | 2 +- .../test/mjsunit/regress/wasm/regress-8896.js | 4 +- .../mjsunit/regress/wasm/regress-956771.js | 21 +- .../mjsunit/regress/wasm/regress-956771b.js | 11 +- .../regress/wasm/regress-crbug-1320614.js | 34 + .../regress/wasm/regress-crbug-1338075.js | 51 + .../regress/wasm/regress-crbug-1338980.js | 63 + .../regress/wasm/regress-crbug-1339321.js | 66 + .../regress/wasm/regress-crbug-1340488.js | 18 + .../regress/wasm/regress-crbug-1341180.js | 75 + .../regress/wasm/regress-crbug-1355070.js | 31 + .../regress/wasm/regress-crbug-1356718.js | 14 + .../regress/wasm/regress-inlining-throw.js | 11 +- .../regress/wasm/typecheck-null-undefined.js | 19 + .../wasm/wasm-typer-incompatible-ref-cast.js | 35 + ...learraybuffer-growablesharedarraybuffer.js | 40 + deps/v8/test/mjsunit/sealed-array-reduce.js | 2 +- deps/v8/test/mjsunit/setters-on-elements.js | 2 +- .../mjsunit/shared-function-tier-up-turbo.js | 2 +- .../shared-memory/condition-workers.js | 43 + .../test/mjsunit/shared-memory/condition.js | 36 + .../mjsunit/shared-memory/mutex-workers.js | 45 + deps/v8/test/mjsunit/shared-memory/mutex.js | 46 + .../shared-array-atomics-workers.js | 42 + .../shared-memory/shared-array-atomics.js | 63 + .../shared-memory/shared-array-surface.js | 109 + .../shared-memory/shared-array-workers.js | 41 + .../shared-string-promotion-major.js | 27 + .../shared-string-promotion-minor.js | 28 + .../mjsunit/shared-memory/shared-string.js | 36 +- .../shared-memory/shared-struct-atomics.js | 6 +- .../shared-memory/shared-struct-surface.js | 24 + .../shared-struct-workers-optimized-code.js | 40 + .../mjsunit/shared-memory/value-serializer.js | 13 + deps/v8/test/mjsunit/shift-for-integer-div.js | 2 +- deps/v8/test/mjsunit/sin-cos.js | 2 +- deps/v8/test/mjsunit/smi-mul-const.js | 2 +- deps/v8/test/mjsunit/smi-mul.js | 2 +- .../stack-trace-cpp-function-template-2.js | 2 +- .../mjsunit/stackoverflow-underapplication.js | 2 +- deps/v8/test/mjsunit/string-deopt.js | 2 +- .../test/mjsunit/string-forwarding-table.js | 59 + .../v8/test/mjsunit/strong-rooted-literals.js | 2 +- .../test/mjsunit/temporal/function-exist.js | 1 + .../mjsunit/temporal/instant-constructor.js | 8 +- .../instant-from-epoch-milliseconds.js | 28 +- .../temporal/instant-from-epoch-seconds.js | 28 +- .../test/mjsunit/temporal/instant-to-json.js | 21 +- .../temporal/plain-date-time-to-json.js | 4 +- .../mjsunit/temporal/plain-date-to-json.js | 4 +- .../temporal/plain-date-to-plain-date-time.js | 29 +- deps/v8/test/mjsunit/testcfg.py | 4 - ...ozzie_archs.js => foozzie_typed_arrays.js} | 3 +- deps/v8/test/mjsunit/tools/log.js | 2 +- deps/v8/test/mjsunit/tools/log_two_byte.js | 2 +- deps/v8/test/mjsunit/tools/processor.mjs | 3 +- ...rocessor-test.separate-sparkplug-handlers} | 0 deps/v8/test/mjsunit/tools/tickprocessor.mjs | 10 +- deps/v8/test/mjsunit/turboshaft/simple.js | 17 + ...growablesharedarraybuffer-array-methods.js | 369 + ...array-growablesharedarraybuffer-atomics.js | 168 + .../typedarray-growablesharedarraybuffer.js | 1067 +- deps/v8/test/mjsunit/typedarray-helpers.js | 320 +- ...rray-resizablearraybuffer-array-methods.js | 1274 ++ ...typedarray-resizablearraybuffer-atomics.js | 370 + .../typedarray-resizablearraybuffer-detach.js | 442 +- .../typedarray-resizablearraybuffer.js | 2583 ++- deps/v8/test/mjsunit/unary-minus-deopt.js | 5 +- deps/v8/test/mjsunit/value-serializer.js | 48 + .../test/mjsunit/wasm/array-copy-benchmark.js | 114 +- .../mjsunit/wasm/array-init-from-segment.js | 328 + deps/v8/test/mjsunit/wasm/async-compile.js | 19 +- deps/v8/test/mjsunit/wasm/atomics.js | 8 +- deps/v8/test/mjsunit/wasm/bigint-opt.js | 36 + deps/v8/test/mjsunit/wasm/bit-shift-right.js | 126 + deps/v8/test/mjsunit/wasm/bulk-memory.js | 4 +- deps/v8/test/mjsunit/wasm/call-ref.js | 15 +- deps/v8/test/mjsunit/wasm/call_indirect.js | 140 + .../compilation-hints-async-compilation.js | 10 +- ...compilation-hints-streaming-compilation.js | 18 +- .../wasm/compiled-module-serialization.js | 8 +- .../wasm/element-segments-with-reftypes.js | 33 +- deps/v8/test/mjsunit/wasm/errors.js | 2 +- deps/v8/test/mjsunit/wasm/exceptions-api.js | 16 +- .../mjsunit/wasm/export-mutable-global.js | 28 +- .../test/mjsunit/wasm/extended-constants.js | 20 +- .../v8/test/mjsunit/wasm/externref-globals.js | 6 +- deps/v8/test/mjsunit/wasm/externref-table.js | 41 +- .../gc-experimental-string-conversions.js | 47 + deps/v8/test/mjsunit/wasm/gc-experiments.js | 26 + deps/v8/test/mjsunit/wasm/gc-nominal.js | 96 +- deps/v8/test/mjsunit/wasm/gc-optimizations.js | 203 +- deps/v8/test/mjsunit/wasm/generic-wrapper.js | 1 + deps/v8/test/mjsunit/wasm/globals.js | 14 +- deps/v8/test/mjsunit/wasm/grow-memory.js | 107 +- .../test/mjsunit/wasm/grow-shared-memory.js | 9 +- deps/v8/test/mjsunit/wasm/i31ref.js | 56 + deps/v8/test/mjsunit/wasm/import-table.js | 38 +- .../mjsunit/wasm/imported-function-types.js | 16 +- .../wasm/indirect-call-non-zero-table.js | 11 +- deps/v8/test/mjsunit/wasm/indirect-calls.js | 4 +- deps/v8/test/mjsunit/wasm/indirect-tables.js | 36 +- deps/v8/test/mjsunit/wasm/inlining.js | 30 +- deps/v8/test/mjsunit/wasm/js-api.js | 13 +- deps/v8/test/mjsunit/wasm/liftoff.js | 3 + deps/v8/test/mjsunit/wasm/load-immutable.js | 9 +- deps/v8/test/mjsunit/wasm/loop-unrolling.js | 44 +- .../wasm/many-memories-no-trap-handler.js | 3 - deps/v8/test/mjsunit/wasm/many-memories.js | 3 - deps/v8/test/mjsunit/wasm/many-modules.js | 3 - .../test/mjsunit/wasm/max-module-size-flag.js | 50 + deps/v8/test/mjsunit/wasm/memory64.js | 90 +- .../wasm/multi-table-element-section.js | 10 +- .../test/mjsunit/wasm/multiple-code-spaces.js | 2 + deps/v8/test/mjsunit/wasm/mutable-globals.js | 2 +- deps/v8/test/mjsunit/wasm/print-code.js | 4 +- .../mjsunit/wasm/reference-globals-import.js | 516 + .../v8/test/mjsunit/wasm/reference-globals.js | 191 +- .../wasm/reference-table-js-interop.js | 246 + deps/v8/test/mjsunit/wasm/reference-tables.js | 408 +- deps/v8/test/mjsunit/wasm/return-calls.js | 2 +- .../wasm/runtime-type-canonicalization.js | 5 +- .../serialization-with-compilation-hints.js | 10 +- .../mjsunit/wasm/shared-memory-worker-gc.js | 2 +- deps/v8/test/mjsunit/wasm/simd-globals.js | 5 +- .../test/mjsunit/wasm/speculative-inlining.js | 96 +- .../mjsunit/wasm/stack-switching-export.js | 935 + deps/v8/test/mjsunit/wasm/stack-switching.js | 453 +- deps/v8/test/mjsunit/wasm/start-function.js | 2 +- .../test/mjsunit/wasm/stringrefs-exec-gc.js | 440 + deps/v8/test/mjsunit/wasm/stringrefs-exec.js | 1177 + .../test/mjsunit/wasm/stringrefs-invalid.js | 39 + deps/v8/test/mjsunit/wasm/stringrefs-js.js | 360 + deps/v8/test/mjsunit/wasm/stringrefs-valid.js | 423 + deps/v8/test/mjsunit/wasm/table-access.js | 4 +- deps/v8/test/mjsunit/wasm/table-get.js | 18 +- deps/v8/test/mjsunit/wasm/table-grow.js | 8 +- .../mjsunit/wasm/tagged-stack-parameters.js | 8 +- .../wasm/test-partial-serialization.js | 2 +- ...est-serialization-with-lazy-compilation.js | 7 +- .../mjsunit/wasm/test-wasm-module-builder.js | 3 +- .../test/mjsunit/wasm/tier-up-testing-flag.js | 1 + .../mjsunit/wasm/type-based-optimizations.js | 68 + .../mjsunit/wasm/wasm-array-js-interop.js | 13 +- .../test/mjsunit/wasm/wasm-dynamic-tiering.js | 2 +- .../wasm/wasm-gc-externalize-internalize.js | 226 + deps/v8/test/mjsunit/wasm/wasm-gc-js-ref.js | 39 + .../test/mjsunit/wasm/wasm-gc-js-roundtrip.js | 77 +- .../test/mjsunit/wasm/wasm-module-builder.js | 538 +- .../mjsunit/wasm/wasm-struct-js-interop.js | 176 - .../mjsunit/web-snapshot/web-snapshot-2.js | 297 - .../web-snapshot/web-snapshot-array-buffer.js | 85 + .../web-snapshot/web-snapshot-array.js | 109 + ...web-snapshot-1.js => web-snapshot-base.js} | 101 +- .../web-snapshot/web-snapshot-bigint.js | 122 + .../web-snapshot/web-snapshot-builtin.js | 39 + .../web-snapshot-circular-reference.js | 20 + .../web-snapshot/web-snapshot-class.js | 177 + .../web-snapshot/web-snapshot-data-view.js | 127 + .../web-snapshot/web-snapshot-externals.js | 77 +- .../web-snapshot-function-context.js | 444 + .../web-snapshot/web-snapshot-function.js | 270 + .../web-snapshot/web-snapshot-helpers.js | 5 +- .../web-snapshot/web-snapshot-holey-array.js | 49 + ...b-snapshot-3.js => web-snapshot-object.js} | 86 +- .../web-snapshot/web-snapshot-prototype.js | 105 + .../web-snapshot/web-snapshot-sparse-array.js | 99 + .../web-snapshot/web-snapshot-symbol.js | 47 + .../web-snapshot/web-snapshot-typed-array.js | 439 + deps/v8/test/mkgrokdump/README | 6 +- deps/v8/test/mkgrokdump/mkgrokdump.cc | 5 - deps/v8/test/mkgrokdump/mkgrokdump.status | 4 +- deps/v8/test/mkgrokdump/testcfg.py | 9 +- deps/v8/test/mozilla/mozilla.status | 34 +- deps/v8/test/mozilla/testcfg.py | 9 +- deps/v8/test/test262/test262.status | 2930 +-- deps/v8/test/test262/testcfg.py | 40 +- deps/v8/test/unittests/BUILD.gn | 245 +- deps/v8/test/unittests/DEPS | 2 + .../unittests/api/access-check-unittest.cc | 453 +- .../api/accessor-unittest.cc} | 604 +- .../v8/test/unittests/api/api-icu-unittest.cc | 56 + .../test/unittests/api/api-wasm-unittest.cc | 213 + .../unittests/api/deserialize-unittest.cc | 396 +- .../test/unittests/api/exception-unittest.cc | 219 +- .../unittests/api/gc-callbacks-unittest.cc | 167 + .../v8/test/unittests/api/isolate-unittest.cc | 36 +- .../unittests/api/remote-object-unittest.cc | 1 - .../test/unittests/api/v8-maybe-unittest.cc | 42 + .../test/unittests/api/v8-object-unittest.cc | 1 - .../test/unittests/api/v8-script-unittest.cc | 161 + .../unittests/asmjs/asm-scanner-unittest.cc | 2 +- .../assembler/assembler-x64-unittest.cc} | 370 +- .../assembler/disasm-arm-unittest.cc} | 41 +- .../assembler/disasm-arm64-unittest.cc} | 298 +- .../assembler/disasm-ia32-unittest.cc} | 28 +- .../assembler/disasm-loong64-unittest.cc} | 27 +- .../assembler/disasm-mips64-unittest.cc} | 820 +- .../assembler/disasm-ppc-unittest.cc} | 18 +- .../assembler/disasm-riscv-unittest.cc} | 137 +- .../assembler/disasm-s390-unittest.cc} | 18 +- .../assembler/disasm-x64-unittest.cc} | 67 +- .../macro-assembler-arm64-unittest.cc} | 28 +- .../macro-assembler-x64-unittest.cc} | 81 +- .../assembler/turbo-assembler-arm-unittest.cc | 2 +- .../turbo-assembler-arm64-unittest.cc | 178 +- .../turbo-assembler-mips-unittest.cc | 66 - ...t.cc => turbo-assembler-riscv-unittest.cc} | 2 +- .../base/atomicops-unittest.cc} | 35 +- .../base/bignum-dtoa-unittest.cc} | 71 +- .../v8/test/unittests/base/bignum-unittest.cc | 1498 ++ deps/v8/test/unittests/base/bits-unittest.cc | 4 +- .../base/double-unittest.cc} | 45 +- .../base/dtoa-unittest.cc} | 74 +- .../base/fast-dtoa-unittest.cc} | 90 +- .../base/fixed-dtoa-unittest.cc} | 39 +- .../base/hashmap-unittest.cc} | 24 +- .../test/unittests/base/ieee754-unittest.cc | 5 +- .../test/unittests/base/logging-unittest.cc | 4 +- .../unittests/base/platform/mutex-unittest.cc | 220 + .../base/platform/platform-unittest.cc | 197 +- .../unittests/base/string-format-unittest.cc | 88 + .../v8/test/unittests/base/vector-unittest.cc | 7 +- .../codegen/code-layout-unittest.cc} | 36 +- .../codegen/code-pages-unittest.cc} | 311 +- .../codegen/code-stub-assembler-unittest.cc | 3 - .../codegen/code-stub-assembler-unittest.h | 1 - .../codegen/factory-unittest.cc} | 100 +- .../codegen/pointer-auth-arm64-unittest.cc} | 14 +- .../register-configuration-unittest.cc | 12 +- .../codegen/source-position-table-unittest.cc | 4 +- .../compiler-dispatcher-unittest.cc | 26 +- .../instruction-selector-arm64-unittest.cc | 252 +- .../backend/instruction-sequence-unittest.cc | 19 +- .../backend/instruction-sequence-unittest.h | 1 + .../compiler/branch-elimination-unittest.cc | 6 +- .../compiler/bytecode-analysis-unittest.cc | 14 +- .../checkpoint-elimination-unittest.cc | 2 +- .../test/unittests/compiler/codegen-tester.cc | 94 + .../test/unittests/compiler/codegen-tester.h | 454 + .../unittests/compiler/codegen-unittest.cc | 644 + .../compiler/common-operator-unittest.cc | 6 +- .../unittests/compiler/compiler-unittest.cc | 927 + .../constant-folding-reducer-unittest.cc | 6 +- .../compiler/control-equivalence-unittest.cc | 2 +- .../compiler/csa-load-elimination-unittest.cc | 3 - .../dead-code-elimination-unittest.cc | 4 +- .../effect-control-linearizer-unittest.cc | 2 +- .../test/unittests/compiler/frame-unittest.cc | 2 +- .../unittests/compiler/function-tester.cc | 205 + .../test/unittests/compiler/function-tester.h | 155 + .../test/unittests/compiler/graph-unittest.cc | 6 +- .../test/unittests/compiler/graph-unittest.h | 11 +- .../instruction-selector-ia32-unittest.cc | 62 +- .../compiler/int64-lowering-unittest.cc | 116 +- .../compiler/js-create-lowering-unittest.cc | 7 +- .../js-intrinsic-lowering-unittest.cc | 8 +- ...-native-context-specialization-unittest.cc | 6 +- .../compiler/js-typed-lowering-unittest.cc | 4 - .../compiler/linear-scheduler-unittest.cc | 180 + .../compiler/linkage-tail-call-unittest.cc | 15 +- .../compiler/load-elimination-unittest.cc | 2 +- .../compiler/loop-peeling-unittest.cc | 9 +- .../machine-operator-reducer-unittest.cc | 160 +- .../unittests/compiler/node-cache-unittest.cc | 2 +- .../compiler/node-matchers-unittest.cc | 5 +- .../unittests/compiler/node-test-utils.cc | 2 - .../test/unittests/compiler/node-unittest.cc | 3 +- .../redundancy-elimination-unittest.cc | 3 +- .../instruction-selector-riscv32-unittest.cc} | 859 +- .../instruction-selector-riscv64-unittest.cc | 4 +- .../unittests/compiler/run-deopt-unittest.cc | 116 + .../compiler/run-jsbranches-unittest.cc | 318 + .../compiler/run-jscalls-unittest.cc | 199 + .../compiler/run-jsexceptions-unittest.cc} | 141 +- .../compiler/run-jsobjects-unittest.cc} | 31 +- .../unittests/compiler/run-jsops-unittest.cc | 509 + .../compiler/run-tail-calls-unittest.cc} | 64 +- .../compiler/scheduler-rpo-unittest.cc | 1 - .../compiler/simplified-lowering-unittest.cc | 2 +- .../simplified-operator-reducer-unittest.cc | 8 +- .../compiler/sloppy-equality-unittest.cc} | 31 +- .../compiler/state-values-utils-unittest.cc | 1 - .../compiler/typed-optimization-unittest.cc | 26 +- .../compiler/types-unittest.cc} | 154 +- .../x64/instruction-selector-x64-unittest.cc | 50 +- .../date/date-unittest.cc} | 102 +- .../deoptimizer/deoptimization-unittest.cc | 862 + .../execution/thread-termination-unittest.cc | 999 + .../execution/threads-unittest.cc} | 8 +- .../flags/flag-definitions-unittest.cc} | 168 +- .../test/{cctest => unittests}/gay-fixed.cc | 2 +- .../v8/test/{cctest => unittests}/gay-fixed.h | 0 .../{cctest => unittests}/gay-precision.cc | 2 +- .../{cctest => unittests}/gay-precision.h | 0 .../{cctest => unittests}/gay-shortest.cc | 2 +- .../test/{cctest => unittests}/gay-shortest.h | 0 .../unittests/heap/base/worklist-unittest.cc | 205 +- .../heap/code-object-registry-unittest.cc | 24 +- .../cppgc-js/traced-reference-unittest.cc | 65 +- .../unified-heap-snapshot-unittest.cc | 9 +- .../heap/cppgc-js/unified-heap-unittest.cc | 46 +- .../heap/cppgc-js/unified-heap-utils.cc | 4 +- .../heap/cppgc/age-table-unittest.cc | 211 + .../heap/cppgc/compactor-unittest.cc | 22 +- .../heap/cppgc/concurrent-sweeper-unittest.cc | 46 +- .../heap/cppgc/ephemeron-pair-unittest.cc | 3 +- .../cppgc/explicit-management-unittest.cc | 8 - .../heap/cppgc/garbage-collected-unittest.cc | 60 +- .../unittests/heap/cppgc/gc-info-unittest.cc | 5 +- .../heap/cppgc/heap-growing-unittest.cc | 4 +- .../heap/cppgc/heap-page-unittest.cc | 14 +- .../unittests/heap/cppgc/heap-unittest.cc | 2 +- .../unittests/heap/cppgc/marker-unittest.cc | 8 +- .../heap/cppgc/marking-visitor-unittest.cc | 108 +- .../unittests/heap/cppgc/member-unittest.cc | 99 +- .../heap/cppgc/metric-recorder-unittest.cc | 9 +- .../unittests/heap/cppgc/minor-gc-unittest.cc | 103 +- .../heap/cppgc/name-trait-unittest.cc | 62 +- .../heap/cppgc/page-memory-unittest.cc | 52 +- .../heap/cppgc/persistent-family-unittest.cc | 26 +- .../cppgc/stats-collector-scopes-unittest.cc | 15 +- .../heap/cppgc/stats-collector-unittest.cc | 28 +- .../unittests/heap/cppgc/sweeper-unittest.cc | 15 +- deps/v8/test/unittests/heap/cppgc/tests.cc | 5 +- deps/v8/test/unittests/heap/cppgc/tests.h | 1 + .../heap/cppgc/weak-container-unittest.cc | 44 +- .../heap/cppgc/write-barrier-unittest.cc | 11 +- .../heap/embedder-tracing-unittest.cc | 338 +- .../test/unittests/heap/gc-tracer-unittest.cc | 4 +- .../heap/global-handles-unittest.cc} | 489 +- .../heap/global-safepoint-unittest.cc | 147 + deps/v8/test/unittests/heap/heap-unittest.cc | 231 +- deps/v8/test/unittests/heap/heap-utils.cc | 239 +- deps/v8/test/unittests/heap/heap-utils.h | 93 + deps/v8/test/unittests/heap/lab-unittest.cc | 3 +- .../unittests/heap/local-factory-unittest.cc | 4 +- .../heap/local-handles-unittest.cc} | 33 +- .../unittests/heap/local-heap-unittest.cc | 2 +- ...rking-inner-pointer-resolution-unittest.cc | 607 + .../heap/marking-worklist-unittest.cc | 4 +- .../unittests/heap/memory-reducer-unittest.cc | 25 +- .../heap/object-start-bitmap-unittest.cc | 55 +- .../heap/page-promotion-unittest.cc} | 75 +- .../heap/persistent-handles-unittest.cc | 138 + .../unittests/heap/shared-heap-unittest.cc | 269 + .../v8/test/unittests/heap/spaces-unittest.cc | 3 +- .../test/unittests/heap/unmapper-unittest.cc | 104 +- .../inspector/inspector-unittest.cc} | 133 +- .../bytecode-array-builder-unittest.cc | 18 +- .../bytecode-array-writer-unittest.cc | 23 +- .../bytecode-expectations-printer.cc | 17 +- .../bytecode-expectations-printer.h | 6 +- .../bytecode-generator-unittest.cc} | 857 +- .../ArrayLiterals.golden | 68 +- .../AssignmentsInBinaryExpression.golden | 0 .../AsyncGenerators.golden | 80 +- .../bytecode_expectations/AsyncModules.golden | 0 .../BasicBlockToBoolean.golden | 0 .../bytecode_expectations/BasicLoops.golden | 98 +- .../BreakableBlocks.golden | 14 +- .../CallAndSpread.golden | 21 +- .../bytecode_expectations/CallGlobal.golden | 0 .../CallLookupSlot.golden | 0 .../bytecode_expectations/CallNew.golden | 33 + .../bytecode_expectations/CallRuntime.golden | 0 .../ClassAndSuperClass.golden | 22 +- .../ClassDeclarations.golden | 28 +- .../CompareBoolean.golden | 400 + .../bytecode_expectations/CompareNil.golden | 6 +- .../CompareTypeOf.golden | 0 .../CompoundExpressions.golden | 0 .../bytecode_expectations/Conditional.golden | 0 .../ConstVariable.golden | 0 .../ConstVariableContextSlot.golden | 0 .../ContextParameters.golden | 0 .../ContextVariables.golden | 0 .../CountOperators.golden | 0 .../CreateArguments.golden | 0 .../CreateRestParameter.golden | 0 .../DeadCodeRemoval.golden | 0 .../DeclareGlobals.golden | 0 .../bytecode_expectations/Delete.golden | 0 .../DeleteLookupSlotInEval.golden | 0 .../DestructuringAssignment.golden | 40 +- .../bytecode_expectations/DoDebugger.golden | 0 ...dantLoadOperationOfImmutableContext.golden | 36 + .../bytecode_expectations/Eval.golden | 0 .../bytecode_expectations/ForAwaitOf.golden | 211 +- .../bytecode_expectations/ForIn.golden | 34 +- .../bytecode_expectations/ForOf.golden | 119 +- .../bytecode_expectations/ForOfLoop.golden | 323 +- .../FunctionLiterals.golden | 0 .../GenerateTestUndetectable.golden | 0 .../bytecode_expectations/Generators.golden | 61 +- .../GlobalCompoundExpressions.golden | 0 .../GlobalCountOperators.golden | 0 .../bytecode_expectations/GlobalDelete.golden | 0 .../HeapNumberConstants.golden | 0 .../bytecode_expectations/IIFE.golden | 0 .../bytecode_expectations/IfConditions.golden | 0 .../IntegerConstants.golden | 0 .../bytecode_expectations/LetVariable.golden | 0 .../LetVariableContextSlot.golden | 0 .../bytecode_expectations/LoadGlobal.golden | 0 .../LogicalExpressions.golden | 0 .../bytecode_expectations/LookupSlot.golden | 0 .../LookupSlotInEval.golden | 0 .../bytecode_expectations/Modules.golden | 3 +- .../bytecode_expectations/NewAndSpread.golden | 42 +- .../bytecode_expectations/NewTarget.golden | 0 .../ObjectLiterals.golden | 0 .../OuterContextVariables.golden | 0 .../bytecode_expectations/Parameters.golden | 0 .../PrimitiveExpressions.golden | 0 .../PrimitiveReturnStatements.golden | 0 .../PrivateAccessorAccess.golden | 8 +- .../PrivateAccessorDeclaration.golden | 167 +- .../PrivateClassFieldAccess.golden | 0 .../PrivateClassFields.golden | 51 +- .../PrivateMethodAccess.golden | 103 +- .../PrivateMethodDeclaration.golden | 75 +- .../bytecode_expectations/PropertyCall.golden | 0 .../PropertyLoadStore.golden | 0 .../PropertyLoads.golden | 0 .../PropertyStores.golden | 0 .../PublicClassFields.golden | 51 +- .../RegExpLiterals.golden | 12 +- .../RemoveRedundantLdar.golden | 6 +- .../StandardForLoop.golden | 68 +- .../StaticClassFields.golden | 65 +- .../StaticPrivateMethodAccess.golden | 30 +- .../StaticPrivateMethodDeclaration.golden | 65 +- .../bytecode_expectations/StoreGlobal.golden | 0 .../bytecode_expectations/StringConcat.golden | 0 .../StringConstants.golden | 0 .../SuperCallAndSpread.golden | 53 +- .../bytecode_expectations/Switch.golden | 6 +- .../TemplateLiterals.golden | 0 .../bytecode_expectations/ThisFunction.golden | 0 .../bytecode_expectations/Throw.golden | 0 .../TopLevelObjectLiterals.golden | 0 .../bytecode_expectations/TryCatch.golden | 0 .../bytecode_expectations/TryFinally.golden | 0 .../bytecode_expectations/Typeof.golden | 0 .../UnaryOperators.golden | 12 +- .../WideRegisters.golden | 14 +- .../WithStatement.golden | 0 .../generate-bytecode-expectations.cc | 11 +- .../interpreter-assembler-unittest.cc | 6 +- .../interpreter-intrinsics-unittest.cc} | 6 +- .../interpreter/interpreter-tester.cc | 4 +- .../interpreter/interpreter-tester.h | 34 +- .../interpreter/interpreter-unittest.cc} | 2044 +- .../interpreter/source-position-matcher.cc | 2 +- .../interpreter/source-position-matcher.h | 6 +- .../interpreter/source-positions-unittest.cc} | 115 +- ...mics-synchronization-primitive-unittest.cc | 214 + deps/v8/test/unittests/libplatform/DEPS | 6 + ...ngle-threaded-default-platform-unittest.cc | 17 +- .../libplatform/tracing-unittest.cc} | 51 +- .../libsampler/sampler-unittest.cc} | 85 +- .../signals-and-mutexes-unittest.cc} | 9 +- .../unittests/logging/counters-unittest.cc | 24 - .../logging/log-unittest.cc} | 538 +- .../unittests/numbers/conversions-unittest.cc | 459 +- .../numbers/diy-fp-unittest.cc} | 13 +- .../numbers/strtod-unittest.cc} | 33 +- .../unittests/objects/array-list-unittest.cc | 43 + .../concurrent-descriptor-array-unittest.cc} | 69 +- .../concurrent-feedback-vector-unittest.cc} | 81 +- .../objects/concurrent-js-array-unittest.cc} | 39 +- .../objects/concurrent-prototype-unittest.cc} | 71 +- ...ncurrent-script-context-table-unittest.cc} | 57 +- .../objects/concurrent-string-unittest.cc} | 223 +- .../concurrent-transition-array-unittest.cc} | 236 +- .../unittests/objects/dictionary-unittest.cc | 299 + .../objects/elements-kind-unittest.cc} | 238 +- .../objects/feedback-vector-unittest.cc} | 284 +- .../objects/global-object-unittest.cc} | 106 +- .../objects/hashcode-unittest.cc} | 222 +- .../inobject-slack-tracking-unittest.cc | 1423 ++ .../test/unittests/objects/intl-unittest.cc | 450 + .../objects/managed-unittest.cc} | 45 +- .../objects/modules-unittest.cc} | 735 +- .../test/unittests/objects/object-unittest.cc | 548 +- .../osr-optimized-code-cache-unittest.cc | 424 - .../objects/representation-unittest.cc} | 12 +- .../objects/roots-unittest.cc} | 17 +- .../objects/symbols-unittest.cc} | 19 +- .../objects/value-serializer-unittest.cc | 21 +- .../objects/wasm-backing-store-unittest.cc | 20 +- .../objects/weakmaps-unittest.cc} | 116 +- .../objects/weaksets-unittest.cc} | 128 +- .../parser/decls-unittest.cc} | 712 +- .../parser/parse-decision-unittest.cc} | 39 +- .../parser/parsing-unittest.cc} | 2146 +- .../unittests/parser/preparser-unittest.cc | 941 + .../parser/scanner-streams-unittest.cc} | 122 +- .../parser/scanner-unittest.cc} | 59 +- .../parser}/scope-test-helper.h | 10 +- .../parser}/unicode-helpers.cc | 5 +- .../parser}/unicode-helpers.h | 8 +- .../profiler/circular-queue-unittest.cc} | 46 +- .../test/unittests/regexp/regexp-unittest.cc | 2334 ++ deps/v8/test/unittests/run-all-unittests.cc | 11 + .../unittests/sandbox/sandbox-unittest.cc | 42 +- .../unittests/strings/unicode-unittest.cc | 65 + .../temporal/temporal-parser-unittest.cc | 2064 ++ deps/v8/test/unittests/test-utils.cc | 7 +- deps/v8/test/unittests/test-utils.h | 318 +- deps/v8/test/unittests/testcfg.py | 22 +- .../tracing/traced-value-unittest.cc} | 19 +- deps/v8/test/unittests/unittests.status | 203 +- .../unittests/utils/bit-vector-unittest.cc | 165 + .../utils/identity-map-unittest.cc} | 521 +- .../utils/sparse-bit-vector-unittest.cc | 96 + .../utils/version-unittest.cc} | 11 +- deps/v8/test/unittests/v8_unittests.cml | 42 + .../test/unittests/wasm/decoder-unittest.cc | 3 +- .../wasm/function-body-decoder-unittest.cc | 971 +- .../unittests/wasm/leb-helper-unittest.cc | 8 +- .../wasm/liftoff-register-unittests.cc | 48 +- .../wasm/loop-assignment-analysis-unittest.cc | 33 - .../wasm/memory-protection-unittest.cc | 12 +- .../unittests/wasm/module-decoder-unittest.cc | 536 +- .../wasm/streaming-decoder-unittest.cc | 20 +- .../unittests/wasm/string-builder-unittest.cc | 43 + .../test/unittests/wasm/subtyping-unittest.cc | 342 +- .../wasm/trap-handler-x64-unittest.cc | 5 +- .../unittests/wasm/wasm-compiler-unittest.cc | 2 +- .../web-snapshot/web-snapshot-unittest.cc} | 645 +- deps/v8/test/wasm-api-tests/BUILD.gn | 1 + deps/v8/test/wasm-api-tests/callbacks.cc | 6 +- deps/v8/test/wasm-api-tests/hostref.cc | 10 +- deps/v8/test/wasm-api-tests/reflect.cc | 4 +- deps/v8/test/wasm-api-tests/regressions.cc | 30 + deps/v8/test/wasm-api-tests/testcfg.py | 12 +- deps/v8/test/wasm-api-tests/traps.cc | 1 - deps/v8/test/wasm-api-tests/wasm-api-test.h | 30 +- deps/v8/test/wasm-js/testcfg.py | 14 +- deps/v8/test/wasm-js/tests.tar.gz.sha1 | 2 +- deps/v8/test/wasm-js/wasm-js.status | 23 +- deps/v8/test/wasm-spec-tests/testcfg.py | 9 +- .../v8/test/wasm-spec-tests/tests.tar.gz.sha1 | 2 +- .../wasm-spec-tests/wasm-spec-tests.status | 52 +- deps/v8/test/webkit/testcfg.py | 4 - deps/v8/test/webkit/webkit.status | 10 +- deps/v8/testing/gmock-support.h | 25 + deps/v8/third_party/google_benchmark/BUILD.gn | 20 +- .../precompiled_headers/benchmark/export.h | 31 - .../third_party/inspector_protocol/README.v8 | 2 +- .../check_protocol_compatibility.py | 902 +- .../inspector_protocol/code_generator.py | 95 +- .../concatenate_protocols.py | 2 +- .../convert_protocol_to_json.py | 49 +- .../inspector_protocol/crdtp/cbor.cc | 196 +- .../inspector_protocol/crdtp/cbor.h | 41 +- .../inspector_protocol/crdtp/cbor_test.cc | 130 +- .../inspector_protocol/crdtp/dispatch.cc | 48 +- .../inspector_protocol/crdtp/dispatch.h | 19 +- .../inspector_protocol/crdtp/dispatch_test.cc | 21 +- .../inspector_protocol/crdtp/protocol_core.h | 14 +- .../inspector_protocol/crdtp/status.cc | 12 +- .../inspector_protocol/crdtp/status.h | 3 +- .../inspector_protocol/inspector_protocol.gni | 30 +- .../inspector_protocol/lib/Forward_h.template | 21 +- .../lib/Values_cpp.template | 1 - .../lib/base_string_adapter_cc.template | 123 - .../lib/base_string_adapter_h.template | 48 - .../templates/TypeBuilder_cpp.template | 7 +- .../test262-harness/src/_monkeyYaml.py | 2 +- .../test262-harness/src/parseTestRecord.py | 2 +- .../test262-harness/src/test262.py | 2 +- .../test262-harness/test/test_common.py | 2 +- .../test262-harness/test/test_monkeyYaml.py | 2 +- .../test/test_parseTestRecord.py | 2 +- .../test262-harness/test/test_test262.py | 2 +- deps/v8/third_party/v8/builtins/array-sort.tq | 61 +- deps/v8/third_party/zlib/BUILD.gn | 64 +- deps/v8/third_party/zlib/LICENSE | 4 +- deps/v8/third_party/zlib/README.chromium | 8 +- deps/v8/third_party/zlib/chromeconf.h | 4 + .../zlib/contrib/minizip/README.chromium | 15 + .../third_party/zlib/contrib/minizip/unzip.c | 114 +- .../zlib/contrib/optimizations/inflate.c | 61 +- .../contrib/optimizations/insert_string.h | 55 +- .../contrib/optimizations/slide_hash_neon.h | 65 - deps/v8/third_party/zlib/cpu_features.c | 9 +- deps/v8/third_party/zlib/crc32.c | 1339 +- deps/v8/third_party/zlib/crc32.h | 9877 ++++++++- deps/v8/third_party/zlib/crc32_simd.c | 195 +- deps/v8/third_party/zlib/crc32_simd.h | 29 +- deps/v8/third_party/zlib/deflate.c | 99 +- deps/v8/third_party/zlib/deflate.h | 13 +- deps/v8/third_party/zlib/fill_window_sse.c | 182 - .../zlib/google/compression_utils.cc | 27 +- deps/v8/third_party/zlib/google/zip.cc | 5 +- deps/v8/third_party/zlib/google/zip.h | 6 + deps/v8/third_party/zlib/google/zip_reader.cc | 42 + deps/v8/third_party/zlib/google/zip_reader.h | 48 +- deps/v8/third_party/zlib/gzguts.h | 3 +- deps/v8/third_party/zlib/gzlib.c | 4 +- deps/v8/third_party/zlib/gzread.c | 2 +- deps/v8/third_party/zlib/gzwrite.c | 13 +- deps/v8/third_party/zlib/infback.c | 26 +- deps/v8/third_party/zlib/inflate.c | 44 +- deps/v8/third_party/zlib/inflate.h | 2 +- deps/v8/third_party/zlib/inftrees.c | 6 +- deps/v8/third_party/zlib/inftrees.h | 12 +- deps/v8/third_party/zlib/slide_hash_simd.h | 116 + deps/v8/third_party/zlib/trees.c | 28 +- deps/v8/third_party/zlib/zlib.h | 219 +- deps/v8/third_party/zlib/zutil.h | 13 +- deps/v8/tools/BUILD.gn | 4 + deps/v8/tools/__init__.py | 2 +- deps/v8/tools/adb-d8.py | 2 +- deps/v8/tools/android-run.py | 2 +- deps/v8/tools/avg.py | 2 +- deps/v8/tools/bigint-tester.py | 2 +- deps/v8/tools/builtins-pgo/arm64.profile | 6282 ++++++ deps/v8/tools/builtins-pgo/combine_hints.py | 136 + deps/v8/tools/builtins-pgo/generate.py | 89 + deps/v8/tools/builtins-pgo/get_hints.py | 151 + deps/v8/tools/builtins-pgo/x64.profile | 6305 ++++++ deps/v8/tools/callstats.html | 33 +- deps/v8/tools/callstats.py | 2 +- .../v8/tools/clusterfuzz/foozzie/PRESUBMIT.py | 3 +- .../foozzie/testdata/failure_output.txt | 4 +- .../foozzie/testdata/failure_output_arch.txt | 4 +- .../testdata/failure_output_second.txt | 4 +- .../foozzie/testdata/smoke_test_output.txt | 4 +- .../tools/clusterfuzz/foozzie/v8_commands.py | 3 + .../tools/clusterfuzz/foozzie/v8_foozzie.py | 143 +- .../clusterfuzz/foozzie/v8_foozzie_test.py | 19 + .../clusterfuzz/foozzie/v8_fuzz_flags.json | 3 +- deps/v8/tools/clusterfuzz/foozzie/v8_mock.js | 80 + .../clusterfuzz/foozzie/v8_mock_archs.js | 80 - .../tools/clusterfuzz/js_fuzzer/exceptions.js | 1 - .../clusterfuzz/js_fuzzer/foozzie_launcher.py | 21 +- .../clusterfuzz/js_fuzzer/tools/fuzz_one.py | 2 +- .../clusterfuzz/js_fuzzer/tools/minimize.py | 4 +- .../clusterfuzz/js_fuzzer/tools/run_one.py | 2 +- .../clusterfuzz/js_fuzzer/tools/workbench.py | 2 +- deps/v8/tools/clusterfuzz/trials/PRESUBMIT.py | 16 +- deps/v8/tools/clusterfuzz/trials/README.md | 18 + .../trials/clusterfuzz_trials_config.json | 12 +- deps/v8/tools/codemap.mjs | 47 +- deps/v8/tools/cppgc/gen_cmake.py | 2 +- .../debug_helper/get-object-properties.cc | 13 +- deps/v8/tools/dev/gen-tags.py | 5 +- deps/v8/tools/dev/gm.py | 59 +- deps/v8/tools/dev/update-compile-commands.py | 2 +- deps/v8/tools/dev/v8gen.py | 2 +- deps/v8/tools/disasm.py | 5 +- deps/v8/tools/dump-cpp.py | 2 +- deps/v8/tools/eval_gc_nvp.py | 2 +- deps/v8/tools/find-commit-for-patch.py | 2 +- deps/v8/tools/gc-nvp-to-csv.py | 2 +- deps/v8/tools/gc-nvp-trace-processor.py | 2 +- deps/v8/tools/gcmole/gcmole.py | 39 +- deps/v8/tools/gcmole/run-gcmole.py | 36 +- deps/v8/tools/gdbinit | 10 +- deps/v8/tools/gen-inlining-tests.py | 12 +- deps/v8/tools/gen-keywords-gen-h.py | 2 +- deps/v8/tools/gen-postmortem-metadata.py | 3 +- deps/v8/tools/gen-v8-gn.py | 2 +- deps/v8/tools/generate-builtins-tests.py | 2 +- .../tools/generate-header-include-checks.py | 23 +- .../generate_shim_headers.py | 2 +- deps/v8/tools/grokdump.py | 26 +- deps/v8/tools/heap-layout/index.html | 6 +- deps/v8/tools/heap-stats/index.html | 4 +- .../ignition/bytecode_dispatches_report.py | 284 - .../bytecode_dispatches_report_test.py | 62 - .../ignition/linux_perf_bytecode_annotate.py | 177 - .../linux_perf_bytecode_annotate_test.py | 85 - deps/v8/tools/ignition/linux_perf_report.py | 260 - .../tools/ignition/linux_perf_report_test.py | 166 - deps/v8/tools/index.html | 152 +- deps/v8/tools/js/helper.mjs | 26 +- deps/v8/tools/locs.py | 2 +- deps/v8/tools/logreader.mjs | 8 +- deps/v8/tools/mac-nm | 2 +- deps/v8/tools/mb/PRESUBMIT.py | 8 +- deps/v8/tools/mb/mb.py | 20 +- deps/v8/tools/mb/mb_test.py | 16 +- deps/v8/tools/objdump-v8 | 2 +- deps/v8/tools/parse-processor.html | 9 +- deps/v8/tools/parse-processor.mjs | 69 +- deps/v8/tools/perf-compare.py | 2 +- deps/v8/tools/predictable_wrapper.py | 5 - deps/v8/tools/profile.mjs | 46 +- deps/v8/tools/profiling/README.md | 8 + .../tools/{ => profiling}/android-ll-prof.sh | 0 .../linux-perf-chrome-renderer-cmd.sh} | 3 +- .../linux-perf-chrome.py} | 127 +- deps/v8/tools/profiling/linux-perf-d8.py | 268 + deps/v8/tools/{ => profiling}/ll_prof.py | 3 +- deps/v8/tools/{ => profiling}/run-llprof.sh | 0 deps/v8/tools/profview/index.html | 4 +- deps/v8/tools/profview/profile-utils.js | 72 +- deps/v8/tools/profview/profview.js | 47 +- deps/v8/tools/regexp-sequences.py | 2 +- deps/v8/tools/release/auto_roll.py | 6 +- deps/v8/tools/release/common_includes.py | 47 +- deps/v8/tools/release/filter_build_files.py | 2 +- deps/v8/tools/release/mergeinfo.py | 22 +- deps/v8/tools/release/roll_merge_gerrit.py | 178 + deps/v8/tools/release/test_mergeinfo.py | 2 +- deps/v8/tools/release/test_scripts.py | 1 + deps/v8/tools/run-clang-tidy.py | 2 +- deps/v8/tools/run-num-fuzzer.py | 2 +- deps/v8/tools/run-perf.sh | 58 - deps/v8/tools/run-tests.py | 2 +- deps/v8/tools/run-wasm-api-tests.py | 2 +- deps/v8/tools/run_perf.py | 311 +- deps/v8/tools/sanitizers/sancov_formatter.py | 2 +- deps/v8/tools/sanitizers/sancov_merger.py | 2 +- deps/v8/tools/sanitizers/sanitize_pcs.py | 2 +- deps/v8/tools/snapshot/asm_to_inline_asm.py | 2 +- deps/v8/tools/sourcemap.mjs | 2 +- deps/v8/tools/stats-viewer.py | 2 +- deps/v8/tools/system-analyzer/helper.mjs | 18 +- deps/v8/tools/system-analyzer/index.css | 6 + deps/v8/tools/system-analyzer/index.html | 11 +- deps/v8/tools/system-analyzer/index.mjs | 14 +- deps/v8/tools/system-analyzer/local-server.sh | 55 + deps/v8/tools/system-analyzer/log/code.mjs | 57 +- deps/v8/tools/system-analyzer/log/log.mjs | 6 +- deps/v8/tools/system-analyzer/log/tick.mjs | 3 + .../tools/system-analyzer/lws-middleware.js | 27 +- deps/v8/tools/system-analyzer/processor.mjs | 65 +- deps/v8/tools/system-analyzer/profiling.mjs | 335 + deps/v8/tools/system-analyzer/timeline.mjs | 36 +- .../view/code-panel-template.html | 2 +- deps/v8/tools/system-analyzer/view/helper.mjs | 4 + .../tools/system-analyzer/view/list-panel.mjs | 3 +- .../view/map-panel/map-details.mjs | 3 +- .../view/map-panel/map-transitions.mjs | 3 +- .../view/profiler-panel-template.html | 159 + .../system-analyzer/view/profiler-panel.mjs | 307 + .../view/property-link-table-template.html | 1 + .../view/script-panel-template.html | 1 + .../timeline/timeline-overview-template.html | 73 + .../view/timeline/timeline-overview.mjs | 274 + .../view/timeline/timeline-track-base.mjs | 10 +- .../timeline/timeline-track-stacked-base.mjs | 1 + .../timeline/timeline-track-template.html | 21 +- .../view/timeline/timeline-track-tick.mjs | 95 +- deps/v8/tools/testrunner/base_runner.py | 602 +- deps/v8/tools/testrunner/build_config.py | 152 + deps/v8/tools/testrunner/local/android.py | 19 +- deps/v8/tools/testrunner/local/command.py | 60 +- deps/v8/tools/testrunner/local/context.py | 84 + .../local/fake_testsuite/testcfg.py | 11 +- .../v8/tools/testrunner/local/junit_output.py | 49 - deps/v8/tools/testrunner/local/pool.py | 211 +- deps/v8/tools/testrunner/local/pool_test.py | 25 +- deps/v8/tools/testrunner/local/statusfile.py | 10 +- .../tools/testrunner/local/statusfile_test.py | 26 +- deps/v8/tools/testrunner/local/testsuite.py | 16 +- .../tools/testrunner/local/testsuite_test.py | 22 +- deps/v8/tools/testrunner/local/utils.py | 7 +- deps/v8/tools/testrunner/local/variants.py | 109 +- deps/v8/tools/testrunner/num_fuzzer.py | 160 +- .../tools/testrunner/objects/predictable.py | 2 - deps/v8/tools/testrunner/objects/testcase.py | 70 +- deps/v8/tools/testrunner/outproc/base.py | 20 +- deps/v8/tools/testrunner/outproc/webkit.py | 4 + deps/v8/tools/testrunner/standard_runner.py | 233 +- .../tools/testrunner/standard_runner_test.py | 535 + deps/v8/tools/testrunner/test_config.py | 2 - .../testdata/expected_test_results1.json | 3 + .../testdata/expected_test_results2.json | 2 + .../testroot1/out/build}/d8_mocked.py | 0 .../testroot1/out/build}/v8_build_config.json | 0 .../testroot1/test/sweet/sweet.status | 0 .../testdata/testroot1/test/sweet/testcfg.py | 51 + .../testroot2/out/build}/d8_mocked.py | 0 .../testroot2/out/build}/v8_build_config.json | 0 .../testroot2/test/sweet/sweet.status | 0 .../testdata/testroot2/test/sweet/testcfg.py | 3 - .../testroot3/out/build}/d8_mocked.py | 0 .../testroot3/out/build}/v8_build_config.json | 0 .../testroot3/test/sweet/sweet.status | 0 .../testdata/testroot3/test/sweet/testcfg.py | 3 - .../testroot4/out/build/v8_build_config.json | 2 + .../out.gn/build/v8_build_config.json | 32 + .../testroot5/test/sweet/sweet.status | 36 + .../testdata/testroot5}/test/sweet/testcfg.py | 5 +- .../testdata/testroot6/out/build/d8_mocked.py | 18 + .../testroot6/out/build/v8_build_config.json | 32 + .../testdata/testroot6/test/fat/fat.status | 19 + .../testdata/testroot6/test/fat/testcfg.py | 41 + deps/v8/tools/testrunner/testproc/base.py | 31 - deps/v8/tools/testrunner/testproc/combiner.py | 18 +- .../v8/tools/testrunner/testproc/execution.py | 44 +- .../tools/testrunner/testproc/expectation.py | 3 - deps/v8/tools/testrunner/testproc/fuzzer.py | 113 +- .../tools/testrunner/testproc/fuzzer_test.py | 51 + .../tools/testrunner/testproc/indicators.py | 443 + deps/v8/tools/testrunner/testproc/loader.py | 38 +- .../tools/testrunner/testproc/loader_test.py | 75 + deps/v8/tools/testrunner/testproc/progress.py | 502 +- deps/v8/tools/testrunner/testproc/rerun.py | 7 + deps/v8/tools/testrunner/testproc/result.py | 21 +- deps/v8/tools/testrunner/testproc/seed.py | 8 +- .../testrunner/testproc/sequence_test.py | 4 +- deps/v8/tools/testrunner/testproc/shard.py | 7 + .../tools/testrunner/testproc/shard_test.py | 1 - deps/v8/tools/testrunner/testproc/sigproc.py | 20 +- deps/v8/tools/testrunner/testproc/timeout.py | 12 +- deps/v8/tools/testrunner/testproc/util.py | 14 +- deps/v8/tools/testrunner/testproc/variant.py | 10 +- .../tools/testrunner/testproc/variant_test.py | 2 - .../testrunner/utils/augmented_options.py | 78 + .../testrunner/utils/dump_build_config.py | 1 - .../testrunner/utils/dump_build_config_gyp.py | 54 - deps/v8/tools/testrunner/utils/test_utils.py | 238 + deps/v8/tools/tickprocessor.mjs | 20 +- deps/v8/tools/toolchain/BUILD.gn | 44 - deps/v8/tools/try_perf.py | 2 +- deps/v8/tools/turbolizer/css/tabs.css | 54 + .../{ => css}/turbo-visualizer-ranges.css | 8 +- .../turbolizer/{ => css}/turbo-visualizer.css | 108 +- deps/v8/tools/turbolizer/css/turboshaft.css | 92 + deps/v8/tools/turbolizer/deploy.sh | 2 +- .../{ => img/arrows}/down-arrow.png | Bin .../{ => img/arrows}/left-arrow.png | Bin .../{ => img/arrows}/right-arrow.png | Bin .../turbolizer/{ => img/arrows}/up-arrow.png | Bin .../img/toolbox/collapse-selected-icon.png | Bin 0 -> 469 bytes .../img/toolbox/compress-layout-icon.png | Bin 0 -> 536 bytes .../img/{ => toolbox}/hide-selected-icon.png | Bin .../{ => toolbox}/hide-unselected-icon.png | Bin .../img/{ => toolbox}/layout-icon.png | Bin .../img/{ => toolbox}/show-all-icon.png | Bin .../img/{ => toolbox}/show-control-icon.png | Bin .../img/toolbox/toggle-cache-layout-icon.png | Bin 0 -> 256 bytes .../img/toolbox/toggle-custom-data-icon.png | Bin 0 -> 993 bytes .../{ => toolbox}/toggle-hide-dead-icon.png | Bin .../img/{ => toolbox}/toggle-types-icon.png | Bin .../img/toolbox/uncollapse-selected-icon.png | Bin 0 -> 480 bytes .../img/{ => toolbox}/zoom-selection-icon.png | Bin .../img/turboshaft/collapse_down.svg | 1 + .../turbolizer/img/turboshaft/collapse_up.svg | 1 + .../turbolizer/{ => img}/upload-icon.png | Bin deps/v8/tools/turbolizer/index.html | 41 +- deps/v8/tools/turbolizer/info-view.html | 67 +- deps/v8/tools/turbolizer/package-lock.json | 7879 +++++-- deps/v8/tools/turbolizer/package.json | 23 +- deps/v8/tools/turbolizer/rollup.config.js | 17 +- deps/v8/tools/turbolizer/search2.png | Bin 689 -> 0 bytes .../tools/turbolizer/src/common/constants.ts | 68 + deps/v8/tools/turbolizer/src/common/util.ts | 102 + .../turbolizer/src/common/view-elements.ts | 44 + deps/v8/tools/turbolizer/src/constants.ts | 27 - .../tools/turbolizer/src/disassembly-view.ts | 394 - deps/v8/tools/turbolizer/src/edge.ts | 100 +- deps/v8/tools/turbolizer/src/graph-layout.ts | 605 +- deps/v8/tools/turbolizer/src/graph-view.ts | 994 - deps/v8/tools/turbolizer/src/graph.ts | 117 +- .../v8/tools/turbolizer/src/graphmultiview.ts | 160 +- deps/v8/tools/turbolizer/src/interval.ts | 13 + .../tools/turbolizer/src/layout-occupation.ts | 221 + .../tools/turbolizer/src/movable-container.ts | 35 + deps/v8/tools/turbolizer/src/node-label.ts | 67 +- deps/v8/tools/turbolizer/src/node.ts | 237 +- deps/v8/tools/turbolizer/src/origin.ts | 53 + .../src/phases/disassembly-phase.ts | 39 + .../src/phases/graph-phase/graph-edge.ts | 19 + .../src/phases/graph-phase/graph-node.ts | 131 + .../src/phases/graph-phase/graph-phase.ts | 141 + .../src/phases/instructions-phase.ts | 278 + deps/v8/tools/turbolizer/src/phases/phase.ts | 36 + .../turbolizer/src/phases/schedule-phase.ts | 140 + .../turbolizer/src/phases/sequence-phase.ts | 293 + .../phases/turboshaft-custom-data-phase.ts | 29 + .../turboshaft-graph-block.ts | 90 + .../turboshaft-graph-edge.ts | 23 + .../turboshaft-graph-node.ts | 88 + .../turboshaft-graph-phase.ts | 204 + deps/v8/tools/turbolizer/src/position.ts | 110 + deps/v8/tools/turbolizer/src/resizer.ts | 393 +- deps/v8/tools/turbolizer/src/schedule-view.ts | 189 - .../tools/turbolizer/src/selection-broker.ts | 147 - .../tools/turbolizer/src/selection-handler.ts | 38 - deps/v8/tools/turbolizer/src/selection.ts | 63 - .../src/selection/selection-broker.ts | 243 + .../src/selection/selection-handler.ts | 57 + .../turbolizer/src/selection/selection-map.ts | 63 + .../src/selection/selection-storage.ts | 29 + deps/v8/tools/turbolizer/src/sequence-view.ts | 376 - .../tools/turbolizer/src/source-resolver.ts | 998 +- deps/v8/tools/turbolizer/src/source.ts | 57 + deps/v8/tools/turbolizer/src/tabs.ts | 95 +- deps/v8/tools/turbolizer/src/text-view.ts | 304 - .../tools/turbolizer/src/turbo-visualizer.ts | 136 +- .../turbolizer/src/turboshaft-graph-layout.ts | 211 + .../tools/turbolizer/src/turboshaft-graph.ts | 117 + deps/v8/tools/turbolizer/src/util.ts | 100 - .../src/views/bytecode-source-view.ts | 180 + .../turbolizer/src/{ => views}/code-view.ts | 280 +- .../turbolizer/src/views/disassembly-view.ts | 443 + .../tools/turbolizer/src/views/graph-view.ts | 742 + .../turbolizer/src/views/history-view.ts | 548 + .../turbolizer/src/{ => views}/info-view.ts | 7 +- .../turbolizer/src/views/movable-view.ts | 336 + .../turbolizer/src/{ => views}/range-view.ts | 674 +- .../turbolizer/src/views/schedule-view.ts | 180 + .../turbolizer/src/views/sequence-view.ts | 386 + .../tools/turbolizer/src/views/text-view.ts | 306 + .../src/views/turboshaft-graph-view.ts | 897 + .../tools/turbolizer/src/{ => views}/view.ts | 17 +- deps/v8/tools/turbolizer/tabs.css | 57 - deps/v8/tools/turbolizer/tsconfig.json | 59 +- deps/v8/tools/turbolizer/tsconfig.test.json | 8 +- deps/v8/tools/unittests/run_perf_test.py | 183 +- deps/v8/tools/unittests/run_tests_test.py | 675 - .../v8/tools/unittests/testdata/d8_mocked1.py | 2 +- .../v8/tools/unittests/testdata/d8_mocked2.py | 2 +- .../unittests/testdata/results_processor.py | 2 +- deps/v8/tools/v8_presubmit.py | 10 +- deps/v8/tools/v8heapconst.py | 936 +- deps/v8/tools/v8windbg/copy-prereqs.py | 2 +- deps/v8/tools/v8windbg/src/local-variables.cc | 29 +- .../tools/v8windbg/src/object-inspection.cc | 16 +- .../inject-compilation-hints.py | 2 +- .../wasm-objdump-compilation-hints.py | 2 +- deps/v8/tools/wasm-compilation-hints/wasm.py | 2 +- deps/v8/tools/wasm/BUILD.gn | 36 + deps/v8/tools/wasm/module-inspector.cc | 1232 ++ deps/v8/tools/wasm/update-wasm-spec-tests.sh | 5 +- deps/v8/tools/whitespace.txt | 2 +- deps/v8/tools/zone-stats/index.html | 4 +- 3737 files changed, 277849 insertions(+), 186447 deletions(-) delete mode 100644 deps/v8/bazel/BUILD.zlib create mode 100644 deps/v8/gni/v8.cml delete mode 100644 deps/v8/gni/v8.cmx create mode 100644 deps/v8/include/cppgc/heap-handle.h create mode 100644 deps/v8/include/cppgc/internal/base-page-handle.h create mode 100644 deps/v8/include/cppgc/internal/caged-heap.h create mode 100644 deps/v8/include/cppgc/internal/member-storage.h delete mode 100644 deps/v8/src/base/atomicops_internals_atomicword_compat.h create mode 100644 deps/v8/src/base/container-utils.h delete mode 100644 deps/v8/src/base/functional.cc rename deps/v8/src/{wasm => base/platform}/memory-protection-key.cc (72%) create mode 100644 deps/v8/src/base/platform/memory-protection-key.h create mode 100644 deps/v8/src/base/platform/memory.h create mode 100644 deps/v8/src/base/platform/platform-linux.h create mode 100644 deps/v8/src/base/string-format.h delete mode 100644 deps/v8/src/baseline/mips/baseline-assembler-mips-inl.h delete mode 100644 deps/v8/src/baseline/mips/baseline-compiler-mips-inl.h rename deps/v8/src/baseline/{riscv64/baseline-assembler-riscv64-inl.h => riscv/baseline-assembler-riscv-inl.h} (79%) rename deps/v8/src/baseline/{riscv64/baseline-compiler-riscv64-inl.h => riscv/baseline-compiler-riscv-inl.h} (64%) create mode 100644 deps/v8/src/builtins/array-to-reversed.tq create mode 100644 deps/v8/src/builtins/array-to-sorted.tq create mode 100644 deps/v8/src/builtins/array-to-spliced.tq create mode 100644 deps/v8/src/builtins/array-with.tq create mode 100644 deps/v8/src/builtins/builtins-atomics-synchronization.cc rename deps/v8/src/builtins/{builtins-shadowrealm-gen.cc => builtins-shadow-realm-gen.cc} (54%) rename deps/v8/src/builtins/{builtins-shadow-realms.cc => builtins-shadow-realm.cc} (96%) create mode 100644 deps/v8/src/builtins/builtins-shared-array.cc create mode 100644 deps/v8/src/builtins/builtins-web-snapshots.cc delete mode 100644 deps/v8/src/builtins/mips/builtins-mips.cc rename deps/v8/src/builtins/{riscv64/builtins-riscv64.cc => riscv/builtins-riscv.cc} (82%) create mode 100644 deps/v8/src/builtins/typed-array-to-reversed.tq create mode 100644 deps/v8/src/builtins/typed-array-with.tq create mode 100644 deps/v8/src/codegen/background-merge-task.h create mode 100644 deps/v8/src/codegen/maglev-safepoint-table.cc create mode 100644 deps/v8/src/codegen/maglev-safepoint-table.h delete mode 100644 deps/v8/src/codegen/mips/assembler-mips-inl.h delete mode 100644 deps/v8/src/codegen/mips/assembler-mips.cc delete mode 100644 deps/v8/src/codegen/mips/assembler-mips.h delete mode 100644 deps/v8/src/codegen/mips/constants-mips.cc delete mode 100644 deps/v8/src/codegen/mips/constants-mips.h delete mode 100644 deps/v8/src/codegen/mips/cpu-mips.cc delete mode 100644 deps/v8/src/codegen/mips/interface-descriptors-mips-inl.h delete mode 100644 deps/v8/src/codegen/mips/macro-assembler-mips.cc delete mode 100644 deps/v8/src/codegen/mips/macro-assembler-mips.h delete mode 100644 deps/v8/src/codegen/mips/register-mips.h delete mode 100644 deps/v8/src/codegen/mips/reglist-mips.h rename deps/v8/src/codegen/{riscv64/assembler-riscv64-inl.h => riscv/assembler-riscv-inl.h} (89%) create mode 100644 deps/v8/src/codegen/riscv/assembler-riscv.cc create mode 100644 deps/v8/src/codegen/riscv/assembler-riscv.h create mode 100644 deps/v8/src/codegen/riscv/base-assembler-riscv.cc create mode 100644 deps/v8/src/codegen/riscv/base-assembler-riscv.h rename deps/v8/src/codegen/{riscv64/constants-riscv64.cc => riscv/base-constants-riscv.cc} (66%) rename deps/v8/src/codegen/{riscv64/constants-riscv64.h => riscv/base-constants-riscv.h} (50%) create mode 100644 deps/v8/src/codegen/riscv/base-riscv-i.cc create mode 100644 deps/v8/src/codegen/riscv/base-riscv-i.h create mode 100644 deps/v8/src/codegen/riscv/constant-riscv-a.h create mode 100644 deps/v8/src/codegen/riscv/constant-riscv-c.h create mode 100644 deps/v8/src/codegen/riscv/constant-riscv-d.h create mode 100644 deps/v8/src/codegen/riscv/constant-riscv-f.h create mode 100644 deps/v8/src/codegen/riscv/constant-riscv-i.h create mode 100644 deps/v8/src/codegen/riscv/constant-riscv-m.h create mode 100644 deps/v8/src/codegen/riscv/constant-riscv-v.h create mode 100644 deps/v8/src/codegen/riscv/constant-riscv-zicsr.h create mode 100644 deps/v8/src/codegen/riscv/constant-riscv-zifencei.h create mode 100644 deps/v8/src/codegen/riscv/constants-riscv.h rename deps/v8/src/codegen/{riscv64/cpu-riscv64.cc => riscv/cpu-riscv.cc} (93%) create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-a.cc create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-a.h create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-c.cc create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-c.h create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-d.cc create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-d.h create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-f.cc create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-f.h create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-m.cc create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-m.h create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-v.cc create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-v.h create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-zicsr.cc create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-zicsr.h create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-zifencei.cc create mode 100644 deps/v8/src/codegen/riscv/extension-riscv-zifencei.h rename deps/v8/src/codegen/{riscv64/interface-descriptors-riscv64-inl.h => riscv/interface-descriptors-riscv-inl.h} (95%) rename deps/v8/src/codegen/{riscv64/macro-assembler-riscv64.cc => riscv/macro-assembler-riscv.cc} (72%) rename deps/v8/src/codegen/{riscv64/macro-assembler-riscv64.h => riscv/macro-assembler-riscv.h} (80%) rename deps/v8/src/codegen/{riscv64/register-riscv64.h => riscv/register-riscv.h} (98%) rename deps/v8/src/codegen/{riscv64/reglist-riscv64.h => riscv/reglist-riscv.h} (92%) delete mode 100644 deps/v8/src/codegen/riscv64/assembler-riscv64.cc delete mode 100644 deps/v8/src/codegen/riscv64/assembler-riscv64.h create mode 100644 deps/v8/src/codegen/safepoint-table-base.h delete mode 100644 deps/v8/src/common/allow-deprecated.h create mode 100644 deps/v8/src/common/code-memory-access-inl.h create mode 100644 deps/v8/src/common/code-memory-access.cc create mode 100644 deps/v8/src/common/code-memory-access.h delete mode 100644 deps/v8/src/compiler/backend/mips/code-generator-mips.cc delete mode 100644 deps/v8/src/compiler/backend/mips/instruction-codes-mips.h delete mode 100644 deps/v8/src/compiler/backend/mips/instruction-scheduler-mips.cc delete mode 100644 deps/v8/src/compiler/backend/mips/instruction-selector-mips.cc rename deps/v8/src/compiler/backend/{riscv64/code-generator-riscv64.cc => riscv/code-generator-riscv.cc} (87%) create mode 100644 deps/v8/src/compiler/backend/riscv/instruction-codes-riscv.h rename deps/v8/src/compiler/backend/{riscv64/instruction-scheduler-riscv64.cc => riscv/instruction-scheduler-riscv.cc} (96%) create mode 100644 deps/v8/src/compiler/backend/riscv/instruction-selector-riscv.h create mode 100644 deps/v8/src/compiler/backend/riscv/instruction-selector-riscv32.cc rename deps/v8/src/compiler/backend/{riscv64 => riscv}/instruction-selector-riscv64.cc (57%) delete mode 100644 deps/v8/src/compiler/backend/riscv64/instruction-codes-riscv64.h create mode 100644 deps/v8/src/compiler/control-path-state.h create mode 100644 deps/v8/src/compiler/late-escape-analysis.cc create mode 100644 deps/v8/src/compiler/late-escape-analysis.h create mode 100644 deps/v8/src/compiler/linear-scheduler.cc create mode 100644 deps/v8/src/compiler/linear-scheduler.h create mode 100644 deps/v8/src/compiler/turboshaft/assembler.h create mode 100644 deps/v8/src/compiler/turboshaft/decompression-optimization.cc create mode 100644 deps/v8/src/compiler/turboshaft/decompression-optimization.h create mode 100644 deps/v8/src/compiler/turboshaft/deopt-data.h create mode 100644 deps/v8/src/compiler/turboshaft/fast-hash.h create mode 100644 deps/v8/src/compiler/turboshaft/graph-builder.cc create mode 100644 deps/v8/src/compiler/turboshaft/graph-builder.h create mode 100644 deps/v8/src/compiler/turboshaft/graph-visualizer.cc create mode 100644 deps/v8/src/compiler/turboshaft/graph-visualizer.h create mode 100644 deps/v8/src/compiler/turboshaft/graph.cc create mode 100644 deps/v8/src/compiler/turboshaft/graph.h create mode 100644 deps/v8/src/compiler/turboshaft/operations.cc create mode 100644 deps/v8/src/compiler/turboshaft/operations.h create mode 100644 deps/v8/src/compiler/turboshaft/optimization-phase.cc create mode 100644 deps/v8/src/compiler/turboshaft/optimization-phase.h create mode 100644 deps/v8/src/compiler/turboshaft/recreate-schedule.cc create mode 100644 deps/v8/src/compiler/turboshaft/recreate-schedule.h create mode 100644 deps/v8/src/compiler/turboshaft/sidetable.h create mode 100644 deps/v8/src/compiler/turboshaft/utils.h create mode 100644 deps/v8/src/compiler/turboshaft/value-numbering-assembler.h create mode 100644 deps/v8/src/compiler/wasm-compiler-definitions.h create mode 100644 deps/v8/src/compiler/wasm-gc-lowering.cc create mode 100644 deps/v8/src/compiler/wasm-gc-lowering.h create mode 100644 deps/v8/src/compiler/wasm-gc-operator-reducer.cc create mode 100644 deps/v8/src/compiler/wasm-gc-operator-reducer.h create mode 100644 deps/v8/src/compiler/wasm-graph-assembler.cc create mode 100644 deps/v8/src/compiler/wasm-graph-assembler.h create mode 100644 deps/v8/src/compiler/wasm-typer.cc create mode 100644 deps/v8/src/compiler/wasm-typer.h create mode 100644 deps/v8/src/debug/liveedit-diff.cc create mode 100644 deps/v8/src/debug/liveedit-diff.h delete mode 100644 deps/v8/src/deoptimizer/mips/deoptimizer-mips.cc rename deps/v8/src/deoptimizer/{riscv64/deoptimizer-riscv64.cc => riscv/deoptimizer-riscv.cc} (100%) rename deps/v8/src/diagnostics/{system-jit-metadata-win.h => etw-jit-metadata-win.h} (93%) create mode 100644 deps/v8/src/diagnostics/etw-jit-win.cc rename deps/v8/src/diagnostics/{system-jit-win.h => etw-jit-win.h} (62%) delete mode 100644 deps/v8/src/diagnostics/mips/disasm-mips.cc delete mode 100644 deps/v8/src/diagnostics/mips/unwinder-mips.cc rename deps/v8/src/diagnostics/{riscv64/disasm-riscv64.cc => riscv/disasm-riscv.cc} (90%) rename deps/v8/src/diagnostics/{riscv64/unwinder-riscv64.cc => riscv/unwinder-riscv.cc} (100%) delete mode 100644 deps/v8/src/diagnostics/system-jit-win.cc delete mode 100644 deps/v8/src/execution/mips/frame-constants-mips.cc delete mode 100644 deps/v8/src/execution/mips/frame-constants-mips.h delete mode 100644 deps/v8/src/execution/mips/simulator-mips.cc delete mode 100644 deps/v8/src/execution/mips/simulator-mips.h rename deps/v8/src/execution/{riscv64/frame-constants-riscv64.cc => riscv/frame-constants-riscv.cc} (81%) rename deps/v8/src/execution/{riscv64/frame-constants-riscv64.h => riscv/frame-constants-riscv.h} (74%) rename deps/v8/src/execution/{riscv64/simulator-riscv64.cc => riscv/simulator-riscv.cc} (88%) rename deps/v8/src/execution/{riscv64/simulator-riscv64.h => riscv/simulator-riscv.h} (80%) create mode 100644 deps/v8/src/handles/shared-object-conveyor-handles.cc create mode 100644 deps/v8/src/handles/shared-object-conveyor-handles.h rename deps/v8/src/heap/base/asm/ia32/{push_registers_masm.S => push_registers_masm.asm} (100%) delete mode 100644 deps/v8/src/heap/base/asm/mips/push_registers_asm.cc rename deps/v8/src/heap/base/asm/{riscv64 => riscv}/push_registers_asm.cc (54%) rename deps/v8/src/heap/base/asm/x64/{push_registers_masm.S => push_registers_masm.asm} (100%) create mode 100644 deps/v8/src/heap/cppgc/member-storage.cc create mode 100644 deps/v8/src/heap/cppgc/member-storage.h create mode 100644 deps/v8/src/heap/gc-callbacks.h create mode 100644 deps/v8/src/heap/global-handle-marking-visitor.cc create mode 100644 deps/v8/src/heap/global-handle-marking-visitor.h create mode 100644 deps/v8/src/heap/heap-verifier.cc create mode 100644 deps/v8/src/heap/heap-verifier.h create mode 100644 deps/v8/src/heap/object-start-bitmap-inl.h create mode 100644 deps/v8/src/libplatform/etw/etw-provider-win.h rename deps/v8/src/logging/{log-utils.cc => log-file.cc} (65%) rename deps/v8/src/logging/{log-utils.h => log-file.h} (77%) create mode 100644 deps/v8/src/maglev/DIR_METADATA create mode 100644 deps/v8/src/maglev/maglev-assembler-inl.h create mode 100644 deps/v8/src/maglev/maglev-assembler.h create mode 100644 deps/v8/src/maglev/maglev-interpreter-frame-state.cc create mode 100644 deps/v8/src/maglev/maglev-ir-inl.h create mode 100644 deps/v8/src/objects/js-atomics-synchronization-inl.h create mode 100644 deps/v8/src/objects/js-atomics-synchronization.cc create mode 100644 deps/v8/src/objects/js-atomics-synchronization.h create mode 100644 deps/v8/src/objects/js-atomics-synchronization.tq rename deps/v8/src/objects/{js-shadow-realms-inl.h => js-shadow-realm-inl.h} (69%) rename deps/v8/src/objects/{js-shadow-realms.h => js-shadow-realm.h} (82%) rename deps/v8/src/objects/{js-shadow-realms.tq => js-shadow-realm.tq} (67%) create mode 100644 deps/v8/src/objects/js-shared-array-inl.h create mode 100644 deps/v8/src/objects/js-shared-array.h create mode 100644 deps/v8/src/objects/js-shared-array.tq delete mode 100644 deps/v8/src/objects/osr-optimized-code-cache-inl.h delete mode 100644 deps/v8/src/objects/osr-optimized-code-cache.cc delete mode 100644 deps/v8/src/objects/osr-optimized-code-cache.h create mode 100644 deps/v8/src/objects/simd.cc create mode 100644 deps/v8/src/objects/simd.h create mode 100644 deps/v8/src/objects/string-forwarding-table-inl.h create mode 100644 deps/v8/src/objects/string-forwarding-table.cc create mode 100644 deps/v8/src/objects/string-forwarding-table.h delete mode 100644 deps/v8/src/regexp/mips/regexp-macro-assembler-mips.cc delete mode 100644 deps/v8/src/regexp/mips/regexp-macro-assembler-mips.h rename deps/v8/src/regexp/{riscv64/regexp-macro-assembler-riscv64.cc => riscv/regexp-macro-assembler-riscv.cc} (76%) rename deps/v8/src/regexp/{riscv64/regexp-macro-assembler-riscv64.h => riscv/regexp-macro-assembler-riscv.h} (93%) create mode 100644 deps/v8/src/runtime/runtime-temporal.cc create mode 100644 deps/v8/src/sandbox/testing.cc create mode 100644 deps/v8/src/sandbox/testing.h create mode 100644 deps/v8/src/third_party/utf8-decoder/generalized-utf8-decoder.h create mode 100644 deps/v8/src/utils/hex-format.cc create mode 100644 deps/v8/src/utils/hex-format.h create mode 100644 deps/v8/src/utils/sha-256.cc create mode 100644 deps/v8/src/utils/sha-256.h create mode 100644 deps/v8/src/utils/sparse-bit-vector.h create mode 100644 deps/v8/src/wasm/assembler-buffer-cache.cc create mode 100644 deps/v8/src/wasm/assembler-buffer-cache.h delete mode 100644 deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h rename deps/v8/src/wasm/baseline/{riscv64/liftoff-assembler-riscv64.h => riscv/liftoff-assembler-riscv.h} (54%) create mode 100644 deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv32.h create mode 100644 deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h create mode 100644 deps/v8/src/wasm/constant-expression-interface.cc rename deps/v8/src/wasm/{init-expr-interface.h => constant-expression-interface.h} (65%) create mode 100644 deps/v8/src/wasm/constant-expression.cc create mode 100644 deps/v8/src/wasm/constant-expression.h delete mode 100644 deps/v8/src/wasm/init-expr-interface.cc delete mode 100644 deps/v8/src/wasm/memory-protection-key.h create mode 100644 deps/v8/src/wasm/module-decoder-impl.h create mode 100644 deps/v8/src/wasm/names-provider.cc create mode 100644 deps/v8/src/wasm/names-provider.h create mode 100644 deps/v8/src/wasm/stacks.cc create mode 100644 deps/v8/src/wasm/string-builder-multiline.h create mode 100644 deps/v8/src/wasm/string-builder.h create mode 100644 deps/v8/src/wasm/wasm-disassembler-impl.h create mode 100644 deps/v8/src/wasm/wasm-disassembler.cc create mode 100644 deps/v8/src/wasm/wasm-disassembler.h delete mode 100644 deps/v8/test/cctest/compiler/test-run-deopt.cc delete mode 100644 deps/v8/test/cctest/compiler/test-run-jsbranches.cc delete mode 100644 deps/v8/test/cctest/compiler/test-run-jscalls.cc delete mode 100644 deps/v8/test/cctest/compiler/test-run-jsops.cc rename deps/v8/test/cctest/{test-feedback-vector.h => feedback-vector-helper.h} (57%) delete mode 100644 deps/v8/test/cctest/heap/test-shared-heap.cc delete mode 100644 deps/v8/test/cctest/libplatform/DEPS delete mode 100644 deps/v8/test/cctest/parsing/test-preparser.cc delete mode 100644 deps/v8/test/cctest/test-access-checks.cc delete mode 100644 deps/v8/test/cctest/test-api-icu.cc delete mode 100644 deps/v8/test/cctest/test-api-wasm.cc delete mode 100644 deps/v8/test/cctest/test-array-list.cc delete mode 100644 deps/v8/test/cctest/test-assembler-mips.cc create mode 100644 deps/v8/test/cctest/test-assembler-riscv32.cc delete mode 100644 deps/v8/test/cctest/test-bignum.cc delete mode 100644 deps/v8/test/cctest/test-bit-vector.cc delete mode 100644 deps/v8/test/cctest/test-compiler.cc delete mode 100644 deps/v8/test/cctest/test-conversions.cc delete mode 100644 deps/v8/test/cctest/test-deoptimization.cc delete mode 100644 deps/v8/test/cctest/test-dictionary.cc delete mode 100644 deps/v8/test/cctest/test-disasm-mips.cc rename deps/v8/test/cctest/{disasm-regex-helper.cc => test-disasm-regex-helper.cc} (99%) rename deps/v8/test/cctest/{disasm-regex-helper.h => test-disasm-regex-helper.h} (100%) create mode 100644 deps/v8/test/cctest/test-helper-riscv32.cc create mode 100644 deps/v8/test/cctest/test-helper-riscv32.h delete mode 100644 deps/v8/test/cctest/test-intl.cc delete mode 100644 deps/v8/test/cctest/test-macro-assembler-mips.cc create mode 100644 deps/v8/test/cctest/test-macro-assembler-riscv32.cc delete mode 100644 deps/v8/test/cctest/test-object.cc delete mode 100644 deps/v8/test/cctest/test-persistent-handles.cc delete mode 100644 deps/v8/test/cctest/test-platform.cc delete mode 100644 deps/v8/test/cctest/test-regexp.cc create mode 100644 deps/v8/test/cctest/test-simple-riscv32.cc delete mode 100644 deps/v8/test/cctest/test-temporal-parser.cc delete mode 100644 deps/v8/test/cctest/test-thread-termination.cc create mode 100644 deps/v8/test/cctest/wasm/test-wasm-strings.cc rename deps/v8/test/{cctest/compiler => common}/c-signature.h (96%) rename deps/v8/test/{cctest/compiler => common}/call-tester.h (88%) rename deps/v8/test/{cctest/compiler => common}/code-assembler-tester.h (89%) rename deps/v8/test/{cctest/compiler => common}/node-observer-tester.h (90%) rename deps/v8/test/{cctest/compiler => common}/value-helper.cc (84%) rename deps/v8/test/{cctest/compiler => common}/value-helper.h (91%) create mode 100644 deps/v8/test/debugger/debug/debug-evaluate-shadowed-context-4.js create mode 100644 deps/v8/test/debugger/debug/regress/regress-crbug-1357554.js create mode 100644 deps/v8/test/debugger/regress/regress-crbug-1350842.js create mode 100644 deps/v8/test/fuzzer/wasm-streaming.cc create mode 100644 deps/v8/test/fuzzer/wasm_streaming/README.md create mode 100644 deps/v8/test/fuzzer/wasm_streaming/empty_module create mode 100644 deps/v8/test/fuzzer/wasm_streaming/regress-1334577 create mode 100644 deps/v8/test/fuzzer/wasm_streaming/regress-1335023 create mode 100644 deps/v8/test/inspector/console/stack-tagging-expected.txt create mode 100644 deps/v8/test/inspector/console/stack-tagging.js create mode 100644 deps/v8/test/inspector/debugger/evaluate-on-callframe-this-expected.txt create mode 100644 deps/v8/test/inspector/debugger/evaluate-on-callframe-this.js create mode 100644 deps/v8/test/inspector/debugger/regress-crbug-1319828-expected.txt create mode 100644 deps/v8/test/inspector/debugger/regress-crbug-1319828.js create mode 100644 deps/v8/test/inspector/debugger/restart-frame/fails-for-non-existant-index-expected.txt create mode 100644 deps/v8/test/inspector/debugger/restart-frame/fails-for-non-existant-index.js create mode 100644 deps/v8/test/inspector/debugger/restart-frame/fails-for-resumables-expected.txt create mode 100644 deps/v8/test/inspector/debugger/restart-frame/fails-for-resumables.js create mode 100644 deps/v8/test/inspector/debugger/restart-frame/fails-with-embedder-frames-expected.txt create mode 100644 deps/v8/test/inspector/debugger/restart-frame/fails-with-embedder-frames.js rename deps/v8/test/inspector/debugger/{restart-frame-expected.txt => restart-frame/fails-without-mode-param-expected.txt} (75%) rename deps/v8/test/inspector/debugger/{restart-frame.js => restart-frame/fails-without-mode-param.js} (100%) create mode 100644 deps/v8/test/inspector/debugger/restart-frame/restart-inlined-frame-expected.txt create mode 100644 deps/v8/test/inspector/debugger/restart-frame/restart-inlined-frame.js create mode 100644 deps/v8/test/inspector/debugger/restart-frame/restart-top-frame-debugger-stmt-expected.txt create mode 100644 deps/v8/test/inspector/debugger/restart-frame/restart-top-frame-debugger-stmt.js create mode 100644 deps/v8/test/inspector/debugger/restart-frame/restart-top-frame-local-variables-expected.txt create mode 100644 deps/v8/test/inspector/debugger/restart-frame/restart-top-frame-local-variables.js create mode 100644 deps/v8/test/inspector/debugger/restart-frame/restart-top-frame-with-breakpoint-expected.txt create mode 100644 deps/v8/test/inspector/debugger/restart-frame/restart-top-frame-with-breakpoint.js create mode 100644 deps/v8/test/inspector/debugger/restart-frame/restart-various-frames-expected.txt create mode 100644 deps/v8/test/inspector/debugger/restart-frame/restart-various-frames.js create mode 100644 deps/v8/test/inspector/debugger/set-script-source-active-function-expected.txt create mode 100644 deps/v8/test/inspector/debugger/set-script-source-active-function.js create mode 100644 deps/v8/test/inspector/debugger/set-script-source-top-frame-expected.txt create mode 100644 deps/v8/test/inspector/debugger/set-script-source-top-frame-with-additional-activations-expected.txt create mode 100644 deps/v8/test/inspector/debugger/set-script-source-top-frame-with-additional-activations.js create mode 100644 deps/v8/test/inspector/debugger/set-script-source-top-frame.js create mode 100644 deps/v8/test/inspector/debugger/value-unavailable-scopes-expected.txt create mode 100644 deps/v8/test/inspector/debugger/value-unavailable-scopes.js create mode 100644 deps/v8/test/inspector/debugger/wasm-gc-anyref-expected.txt create mode 100644 deps/v8/test/inspector/debugger/wasm-gc-anyref.js create mode 100644 deps/v8/test/inspector/debugger/wasm-scripts-disassembly-expected.txt create mode 100644 deps/v8/test/inspector/debugger/wasm-scripts-disassembly.js create mode 100644 deps/v8/test/inspector/debugger/wasm-terminate-execution-on-pause-expected.txt create mode 100644 deps/v8/test/inspector/debugger/wasm-terminate-execution-on-pause.js create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1246896-expected.txt create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1246896.js create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1328453-expected.txt create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1328453.js create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1350842-expected.txt create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1350842.js create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1353051-expected.txt create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1353051.js create mode 100644 deps/v8/test/inspector/runtime/evaluate-repl-mode-silent-expected.txt create mode 100644 deps/v8/test/inspector/runtime/evaluate-repl-mode-silent.js rename deps/v8/test/inspector/runtime/{add-web-driver-value-expected.txt => generate-web-driver-value-expected.txt} (87%) rename deps/v8/test/inspector/runtime/{add-web-driver-value.js => generate-web-driver-value.js} (71%) create mode 100644 deps/v8/test/inspector/runtime/regress-1321833-expected.txt create mode 100644 deps/v8/test/inspector/runtime/regress-1321833.js create mode 100644 deps/v8/test/intl/number-format/format-range-numbering-system.js create mode 100644 deps/v8/test/intl/number-format/format-range-string.js create mode 100644 deps/v8/test/intl/number-format/format-string.js create mode 100644 deps/v8/test/intl/number-format/options-digits-v3.js create mode 100644 deps/v8/test/intl/number-format/options-digits.js create mode 100644 deps/v8/test/intl/regress-1336865.js create mode 100644 deps/v8/test/intl/regress-1347690.js create mode 100644 deps/v8/test/intl/temporal/calendar/fields.js create mode 100644 deps/v8/test/js-perf-test/Array/at.js create mode 100644 deps/v8/test/js-perf-test/BigInt/bitwise-and.js create mode 100644 deps/v8/test/js-perf-test/BigInt/divide.js create mode 100644 deps/v8/test/js-perf-test/BigInt/exponentiate.js create mode 100644 deps/v8/test/js-perf-test/BigInt/multiply.js create mode 100644 deps/v8/test/js-perf-test/GetOwnPropertyDescriptor/GetOwnPropertyDescriptor.json create mode 100644 deps/v8/test/js-perf-test/GetOwnPropertyDescriptor/get-own-property-descriptor.js create mode 100644 deps/v8/test/js-perf-test/GetOwnPropertyDescriptor/run.js create mode 100644 deps/v8/test/message/fail/array-spread-non-iterable-object.js create mode 100644 deps/v8/test/message/fail/array-spread-non-iterable-object.out create mode 100644 deps/v8/test/message/fail/iterator-non-callable-2.js create mode 100644 deps/v8/test/message/fail/iterator-non-callable-2.out create mode 100644 deps/v8/test/message/fail/iterator-non-callable-3.js create mode 100644 deps/v8/test/message/fail/iterator-non-callable-3.out create mode 100644 deps/v8/test/message/fail/iterator-non-callable.js create mode 100644 deps/v8/test/message/fail/iterator-non-callable.out create mode 100644 deps/v8/test/message/fail/modules-skip-stalled-top-level-await.mjs create mode 100644 deps/v8/test/message/fail/modules-stalled-top-level-await.mjs create mode 100644 deps/v8/test/message/fail/modules-stalled-top-level-await.out create mode 100644 deps/v8/test/message/fail/unexpected-identifier.js create mode 100644 deps/v8/test/message/fail/unexpected-identifier.out create mode 100644 deps/v8/test/message/fail/wasm-exception-stack-trace.js create mode 100644 deps/v8/test/message/fail/wasm-exception-stack-trace.out create mode 100644 deps/v8/test/mjsunit/array-includes-simd.js create mode 100644 deps/v8/test/mjsunit/array-indexof-simd.js create mode 100644 deps/v8/test/mjsunit/async-hooks/regress-crbug-1337629.js create mode 100644 deps/v8/test/mjsunit/baseline/deopt-to-baseline.js create mode 100644 deps/v8/test/mjsunit/canonicalize-nan.js create mode 100644 deps/v8/test/mjsunit/compiler/bigint-bitwise-and.js create mode 100644 deps/v8/test/mjsunit/compiler/bigint-divide.js create mode 100644 deps/v8/test/mjsunit/compiler/bigint-multiply-truncate.js create mode 100644 deps/v8/test/mjsunit/compiler/bigint-multiply.js create mode 100644 deps/v8/test/mjsunit/compiler/collection-has.js create mode 100644 deps/v8/test/mjsunit/compiler/fast-api-annotations.js create mode 100644 deps/v8/test/mjsunit/compiler/get-iterator-deopt.js create mode 100644 deps/v8/test/mjsunit/compiler/optimized-array-at.js create mode 100644 deps/v8/test/mjsunit/compiler/reference-equal-boolean.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-crbug-1323114.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-crbug-1344965.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-crbug-1353360.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-crbug-1355824.js create mode 100644 deps/v8/test/mjsunit/compiler/typedarray-resizablearraybuffer.js create mode 100644 deps/v8/test/mjsunit/es6/iterator-call-lazy-deopt.js rename deps/v8/test/mjsunit/es6/{iterator-lazy-deopt.js => iterator-get-lazy-deopt.js} (88%) create mode 100644 deps/v8/test/mjsunit/es6/iterator-invalid-receiver-opt.js delete mode 100644 deps/v8/test/mjsunit/external-backing-store-gc.js create mode 100644 deps/v8/test/mjsunit/harmony/array-to-reversed.js create mode 100644 deps/v8/test/mjsunit/harmony/array-to-sorted.js create mode 100644 deps/v8/test/mjsunit/harmony/array-to-spliced.js create mode 100644 deps/v8/test/mjsunit/harmony/array-with.js create mode 100644 deps/v8/test/mjsunit/harmony/arraybuffer-transfer.js create mode 100644 deps/v8/test/mjsunit/harmony/async-generators-return-broken-promise.js create mode 100644 deps/v8/test/mjsunit/harmony/shadowrealm-importvalue.js create mode 100644 deps/v8/test/mjsunit/harmony/shadowrealm-skip-1.mjs create mode 100644 deps/v8/test/mjsunit/harmony/shadowrealm-skip-2-throw.mjs create mode 100644 deps/v8/test/mjsunit/harmony/typedarray-to-reversed.js create mode 100644 deps/v8/test/mjsunit/harmony/typedarray-tostringtag.js create mode 100644 deps/v8/test/mjsunit/harmony/typedarray-with.js create mode 100644 deps/v8/test/mjsunit/ic-megadom-3.js create mode 100644 deps/v8/test/mjsunit/large-external-string.js create mode 100644 deps/v8/test/mjsunit/maglev/add-number.js create mode 100644 deps/v8/test/mjsunit/maglev/call-js-runtime.js create mode 100644 deps/v8/test/mjsunit/maglev/call-runtime-for-pair.js create mode 100644 deps/v8/test/mjsunit/maglev/constant-in-proto-proxy-after-holder.js create mode 100644 deps/v8/test/mjsunit/maglev/destructuring-assignment-with-exclude-properties.js create mode 100644 deps/v8/test/mjsunit/maglev/eager-deopt-in-inline.js create mode 100644 deps/v8/test/mjsunit/maglev/exceptions.js create mode 100644 deps/v8/test/mjsunit/maglev/get-template-object.js create mode 100644 deps/v8/test/mjsunit/maglev/inner-function.js create mode 100644 deps/v8/test/mjsunit/maglev/int32-branch.js create mode 100644 deps/v8/test/mjsunit/maglev/lda-global-inside-typeof.js create mode 100644 deps/v8/test/mjsunit/maglev/lda-global.js create mode 100644 deps/v8/test/mjsunit/maglev/lda-module-variable-import.mjs create mode 100644 deps/v8/test/mjsunit/maglev/lda-module-variable.mjs create mode 100644 deps/v8/test/mjsunit/maglev/literals.js create mode 100644 deps/v8/test/mjsunit/maglev/load-named.js create mode 100644 deps/v8/test/mjsunit/maglev/lots-of-registers.js create mode 100644 deps/v8/test/mjsunit/maglev/mutable-context-access.js create mode 100644 deps/v8/test/mjsunit/maglev/osr-from-ml-to-tf.js create mode 100644 deps/v8/test/mjsunit/maglev/osr-to-tf.js create mode 100644 deps/v8/test/mjsunit/maglev/regress/regress-1359382.js create mode 100644 deps/v8/test/mjsunit/maglev/regress/regress-1359928.js create mode 100644 deps/v8/test/mjsunit/maglev/set-pending-message.js create mode 100644 deps/v8/test/mjsunit/maglev/shift-right-logical-smi.js create mode 100644 deps/v8/test/mjsunit/maglev/shift-right-logical.js create mode 100644 deps/v8/test/mjsunit/maglev/shift-right-smi.js create mode 100644 deps/v8/test/mjsunit/maglev/shift-right.js create mode 100644 deps/v8/test/mjsunit/maglev/simple-inlining.js create mode 100644 deps/v8/test/mjsunit/maglev/spill-double.js create mode 100644 deps/v8/test/mjsunit/maglev/sta-module-variable.mjs create mode 100644 deps/v8/test/mjsunit/maglev/string-compare.js create mode 100644 deps/v8/test/mjsunit/maglev/super-ic.js create mode 100644 deps/v8/test/mjsunit/maglev/tier-to-ml-to-tf.js create mode 100644 deps/v8/test/mjsunit/maglev/undefined-or-null-branch.js create mode 100644 deps/v8/test/mjsunit/mjsunit-assert-equals.js create mode 100644 deps/v8/test/mjsunit/omit-default-ctors-array-iterator.js create mode 100644 deps/v8/test/mjsunit/omit-default-ctors.js create mode 100644 deps/v8/test/mjsunit/rab-gsab-valueserializer.js create mode 100644 deps/v8/test/mjsunit/regress-crbug-1321980.js create mode 100644 deps/v8/test/mjsunit/regress-crbug-1359991.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1320094.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1323602.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1353555.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1359230.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1308360.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1309467.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1321573.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1327321.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1329234.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1335445.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1339722-2.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1339722-3.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1339722-4.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1339722-5.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1339722-6.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1339722-7.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1339722-8.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1339722.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1344549.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1347721.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1347722.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1350270.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1360736.js delete mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-352058.js create mode 100644 deps/v8/test/mjsunit/regress/regress-v8-13037.js create mode 100644 deps/v8/test/mjsunit/regress/regress-v8-13097.js create mode 100644 deps/v8/test/mjsunit/regress/regress-v8-13110.js create mode 100644 deps/v8/test/mjsunit/regress/regress-v8-13181.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/i32-lowering-inlining.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-12789.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-12866.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-12867.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-12874.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-12945.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-13061.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-13118.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-13123.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-1314184.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-13230.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-13290.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-1338150.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-1339153.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-1347073.js delete mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-731351.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-crbug-1320614.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-crbug-1338075.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-crbug-1338980.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-crbug-1339321.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-crbug-1340488.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-crbug-1341180.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-crbug-1355070.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-crbug-1356718.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/typecheck-null-undefined.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/wasm-typer-incompatible-ref-cast.js create mode 100644 deps/v8/test/mjsunit/shared-memory/condition-workers.js create mode 100644 deps/v8/test/mjsunit/shared-memory/condition.js create mode 100644 deps/v8/test/mjsunit/shared-memory/mutex-workers.js create mode 100644 deps/v8/test/mjsunit/shared-memory/mutex.js create mode 100644 deps/v8/test/mjsunit/shared-memory/shared-array-atomics-workers.js create mode 100644 deps/v8/test/mjsunit/shared-memory/shared-array-atomics.js create mode 100644 deps/v8/test/mjsunit/shared-memory/shared-array-surface.js create mode 100644 deps/v8/test/mjsunit/shared-memory/shared-array-workers.js create mode 100644 deps/v8/test/mjsunit/shared-memory/shared-string-promotion-major.js create mode 100644 deps/v8/test/mjsunit/shared-memory/shared-string-promotion-minor.js create mode 100644 deps/v8/test/mjsunit/shared-memory/shared-struct-workers-optimized-code.js create mode 100644 deps/v8/test/mjsunit/shared-memory/value-serializer.js create mode 100644 deps/v8/test/mjsunit/string-forwarding-table.js rename deps/v8/test/mjsunit/tools/{foozzie_archs.js => foozzie_typed_arrays.js} (95%) rename deps/v8/test/mjsunit/tools/{tickprocessor-test.separate-baseline-handlers => tickprocessor-test.separate-sparkplug-handlers} (100%) create mode 100644 deps/v8/test/mjsunit/turboshaft/simple.js create mode 100644 deps/v8/test/mjsunit/typedarray-growablesharedarraybuffer-array-methods.js create mode 100644 deps/v8/test/mjsunit/typedarray-growablesharedarraybuffer-atomics.js create mode 100644 deps/v8/test/mjsunit/typedarray-resizablearraybuffer-array-methods.js create mode 100644 deps/v8/test/mjsunit/typedarray-resizablearraybuffer-atomics.js create mode 100644 deps/v8/test/mjsunit/value-serializer.js create mode 100644 deps/v8/test/mjsunit/wasm/array-init-from-segment.js create mode 100644 deps/v8/test/mjsunit/wasm/bigint-opt.js create mode 100644 deps/v8/test/mjsunit/wasm/bit-shift-right.js create mode 100644 deps/v8/test/mjsunit/wasm/call_indirect.js create mode 100644 deps/v8/test/mjsunit/wasm/gc-experimental-string-conversions.js create mode 100644 deps/v8/test/mjsunit/wasm/gc-experiments.js create mode 100644 deps/v8/test/mjsunit/wasm/i31ref.js create mode 100644 deps/v8/test/mjsunit/wasm/max-module-size-flag.js create mode 100644 deps/v8/test/mjsunit/wasm/reference-globals-import.js create mode 100644 deps/v8/test/mjsunit/wasm/reference-table-js-interop.js create mode 100644 deps/v8/test/mjsunit/wasm/stack-switching-export.js create mode 100644 deps/v8/test/mjsunit/wasm/stringrefs-exec-gc.js create mode 100644 deps/v8/test/mjsunit/wasm/stringrefs-exec.js create mode 100644 deps/v8/test/mjsunit/wasm/stringrefs-invalid.js create mode 100644 deps/v8/test/mjsunit/wasm/stringrefs-js.js create mode 100644 deps/v8/test/mjsunit/wasm/stringrefs-valid.js create mode 100644 deps/v8/test/mjsunit/wasm/type-based-optimizations.js create mode 100644 deps/v8/test/mjsunit/wasm/wasm-gc-externalize-internalize.js create mode 100644 deps/v8/test/mjsunit/wasm/wasm-gc-js-ref.js delete mode 100644 deps/v8/test/mjsunit/wasm/wasm-struct-js-interop.js delete mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-2.js create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-array-buffer.js create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-array.js rename deps/v8/test/mjsunit/web-snapshot/{web-snapshot-1.js => web-snapshot-base.js} (59%) create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-bigint.js create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-builtin.js create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-circular-reference.js create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-class.js create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-data-view.js create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-function-context.js create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-function.js create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-holey-array.js rename deps/v8/test/mjsunit/web-snapshot/{web-snapshot-3.js => web-snapshot-object.js} (57%) create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-prototype.js create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-sparse-array.js create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-symbol.js create mode 100644 deps/v8/test/mjsunit/web-snapshot/web-snapshot-typed-array.js rename deps/v8/test/{cctest/test-api-accessors.cc => unittests/api/accessor-unittest.cc} (54%) create mode 100644 deps/v8/test/unittests/api/api-icu-unittest.cc create mode 100644 deps/v8/test/unittests/api/api-wasm-unittest.cc create mode 100644 deps/v8/test/unittests/api/gc-callbacks-unittest.cc create mode 100644 deps/v8/test/unittests/api/v8-maybe-unittest.cc create mode 100644 deps/v8/test/unittests/api/v8-script-unittest.cc rename deps/v8/test/{cctest/test-assembler-x64.cc => unittests/assembler/assembler-x64-unittest.cc} (91%) rename deps/v8/test/{cctest/test-disasm-arm.cc => unittests/assembler/disasm-arm-unittest.cc} (98%) rename deps/v8/test/{cctest/test-disasm-arm64.cc => unittests/assembler/disasm-arm64-unittest.cc} (97%) rename deps/v8/test/{cctest/test-disasm-ia32.cc => unittests/assembler/disasm-ia32-unittest.cc} (98%) rename deps/v8/test/{cctest/test-disasm-loong64.cc => unittests/assembler/disasm-loong64-unittest.cc} (98%) rename deps/v8/test/{cctest/test-disasm-mips64.cc => unittests/assembler/disasm-mips64-unittest.cc} (81%) rename deps/v8/test/{cctest/test-disasm-ppc.cc => unittests/assembler/disasm-ppc-unittest.cc} (95%) rename deps/v8/test/{cctest/test-disasm-riscv64.cc => unittests/assembler/disasm-riscv-unittest.cc} (89%) rename deps/v8/test/{cctest/test-disasm-s390.cc => unittests/assembler/disasm-s390-unittest.cc} (98%) rename deps/v8/test/{cctest/test-disasm-x64.cc => unittests/assembler/disasm-x64-unittest.cc} (97%) rename deps/v8/test/{cctest/test-macro-assembler-arm64.cc => unittests/assembler/macro-assembler-arm64-unittest.cc} (90%) rename deps/v8/test/{cctest/test-macro-assembler-x64.cc => unittests/assembler/macro-assembler-x64-unittest.cc} (94%) delete mode 100644 deps/v8/test/unittests/assembler/turbo-assembler-mips-unittest.cc rename deps/v8/test/unittests/assembler/{turbo-assembler-riscv64-unittest.cc => turbo-assembler-riscv-unittest.cc} (97%) rename deps/v8/test/{cctest/test-atomicops.cc => unittests/base/atomicops-unittest.cc} (96%) rename deps/v8/test/{cctest/test-bignum-dtoa.cc => unittests/base/bignum-dtoa-unittest.cc} (87%) create mode 100644 deps/v8/test/unittests/base/bignum-unittest.cc rename deps/v8/test/{cctest/test-double.cc => unittests/base/double-unittest.cc} (93%) rename deps/v8/test/{cctest/test-dtoa.cc => unittests/base/dtoa-unittest.cc} (87%) rename deps/v8/test/{cctest/test-fast-dtoa.cc => unittests/base/fast-dtoa-unittest.cc} (83%) rename deps/v8/test/{cctest/test-fixed-dtoa.cc => unittests/base/fixed-dtoa-unittest.cc} (95%) rename deps/v8/test/{cctest/test-hashmap.cc => unittests/base/hashmap-unittest.cc} (94%) create mode 100644 deps/v8/test/unittests/base/string-format-unittest.cc rename deps/v8/test/{cctest/test-code-layout.cc => unittests/codegen/code-layout-unittest.cc} (78%) rename deps/v8/test/{cctest/test-code-pages.cc => unittests/codegen/code-pages-unittest.cc} (59%) rename deps/v8/test/{cctest/test-factory.cc => unittests/codegen/factory-unittest.cc} (51%) rename deps/v8/test/{cctest/test-pointer-auth-arm64.cc => unittests/codegen/pointer-auth-arm64-unittest.cc} (87%) create mode 100644 deps/v8/test/unittests/compiler/codegen-tester.cc create mode 100644 deps/v8/test/unittests/compiler/codegen-tester.h create mode 100644 deps/v8/test/unittests/compiler/codegen-unittest.cc create mode 100644 deps/v8/test/unittests/compiler/compiler-unittest.cc create mode 100644 deps/v8/test/unittests/compiler/function-tester.cc create mode 100644 deps/v8/test/unittests/compiler/function-tester.h create mode 100644 deps/v8/test/unittests/compiler/linear-scheduler-unittest.cc rename deps/v8/test/unittests/compiler/{mips/instruction-selector-mips-unittest.cc => riscv32/instruction-selector-riscv32-unittest.cc} (64%) create mode 100644 deps/v8/test/unittests/compiler/run-deopt-unittest.cc create mode 100644 deps/v8/test/unittests/compiler/run-jsbranches-unittest.cc create mode 100644 deps/v8/test/unittests/compiler/run-jscalls-unittest.cc rename deps/v8/test/{cctest/compiler/test-run-jsexceptions.cc => unittests/compiler/run-jsexceptions-unittest.cc} (53%) rename deps/v8/test/{cctest/compiler/test-run-jsobjects.cc => unittests/compiler/run-jsobjects-unittest.cc} (60%) create mode 100644 deps/v8/test/unittests/compiler/run-jsops-unittest.cc rename deps/v8/test/{cctest/compiler/test-run-tail-calls.cc => unittests/compiler/run-tail-calls-unittest.cc} (78%) rename deps/v8/test/{cctest/compiler/test-sloppy-equality.cc => unittests/compiler/sloppy-equality-unittest.cc} (86%) rename deps/v8/test/{cctest/test-types.cc => unittests/compiler/types-unittest.cc} (91%) rename deps/v8/test/{cctest/test-date.cc => unittests/date/date-unittest.cc} (56%) create mode 100644 deps/v8/test/unittests/deoptimizer/deoptimization-unittest.cc create mode 100644 deps/v8/test/unittests/execution/thread-termination-unittest.cc rename deps/v8/test/{cctest/test-threads.cc => unittests/execution/threads-unittest.cc} (95%) rename deps/v8/test/{cctest/test-flags.cc => unittests/flags/flag-definitions-unittest.cc} (54%) rename deps/v8/test/{cctest => unittests}/gay-fixed.cc (99%) rename deps/v8/test/{cctest => unittests}/gay-fixed.h (100%) rename deps/v8/test/{cctest => unittests}/gay-precision.cc (99%) rename deps/v8/test/{cctest => unittests}/gay-precision.h (100%) rename deps/v8/test/{cctest => unittests}/gay-shortest.cc (99%) rename deps/v8/test/{cctest => unittests}/gay-shortest.h (100%) create mode 100644 deps/v8/test/unittests/heap/cppgc/age-table-unittest.cc rename deps/v8/test/{cctest/test-global-handles.cc => unittests/heap/global-handles-unittest.cc} (53%) create mode 100644 deps/v8/test/unittests/heap/global-safepoint-unittest.cc rename deps/v8/test/{cctest/test-local-handles.cc => unittests/heap/local-handles-unittest.cc} (86%) create mode 100644 deps/v8/test/unittests/heap/marking-inner-pointer-resolution-unittest.cc rename deps/v8/test/{cctest/heap/test-page-promotion.cc => unittests/heap/page-promotion-unittest.cc} (53%) create mode 100644 deps/v8/test/unittests/heap/shared-heap-unittest.cc rename deps/v8/test/{cctest/test-inspector.cc => unittests/inspector/inspector-unittest.cc} (57%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode-expectations-printer.cc (95%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode-expectations-printer.h (95%) rename deps/v8/test/{cctest/interpreter/test-bytecode-generator.cc => unittests/interpreter/bytecode-generator-unittest.cc} (76%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/ArrayLiterals.golden (80%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/AsyncGenerators.golden (93%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/AsyncModules.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/BasicBlockToBoolean.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/BasicLoops.golden (89%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/BreakableBlocks.golden (93%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/CallAndSpread.golden (86%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/CallGlobal.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/CallLookupSlot.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/CallNew.golden (67%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/CallRuntime.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/ClassAndSuperClass.golden (92%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/ClassDeclarations.golden (91%) create mode 100644 deps/v8/test/unittests/interpreter/bytecode_expectations/CompareBoolean.golden rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/CompareNil.golden (97%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/CompareTypeOf.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/CompoundExpressions.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/Conditional.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/ConstVariable.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/ConstVariableContextSlot.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/ContextParameters.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/ContextVariables.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/CountOperators.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/CreateArguments.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/CreateRestParameter.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/DeadCodeRemoval.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/DeclareGlobals.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/Delete.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/DeleteLookupSlotInEval.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/DestructuringAssignment.golden (93%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/DoDebugger.golden (100%) create mode 100644 deps/v8/test/unittests/interpreter/bytecode_expectations/ElideRedundantLoadOperationOfImmutableContext.golden rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/Eval.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/ForAwaitOf.golden (84%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/ForIn.golden (87%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/ForOf.golden (83%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/ForOfLoop.golden (83%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/FunctionLiterals.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/GenerateTestUndetectable.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/Generators.golden (88%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/GlobalCountOperators.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/GlobalDelete.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/HeapNumberConstants.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/IIFE.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/IfConditions.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/IntegerConstants.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/LetVariable.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/LetVariableContextSlot.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/LoadGlobal.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/LogicalExpressions.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/LookupSlot.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/LookupSlotInEval.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/Modules.golden (99%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/NewAndSpread.golden (80%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/NewTarget.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/ObjectLiterals.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/OuterContextVariables.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/Parameters.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/PrimitiveExpressions.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/PrimitiveReturnStatements.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/PrivateAccessorAccess.golden (96%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/PrivateAccessorDeclaration.golden (78%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/PrivateClassFieldAccess.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/PrivateClassFields.golden (87%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/PrivateMethodAccess.golden (81%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/PrivateMethodDeclaration.golden (75%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/PropertyCall.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/PropertyLoadStore.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/PropertyLoads.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/PropertyStores.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/PublicClassFields.golden (87%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/RegExpLiterals.golden (79%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/RemoveRedundantLdar.golden (93%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/StandardForLoop.golden (90%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/StaticClassFields.golden (90%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/StaticPrivateMethodAccess.golden (93%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/StaticPrivateMethodDeclaration.golden (82%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/StoreGlobal.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/StringConcat.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/StringConstants.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/SuperCallAndSpread.golden (74%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/Switch.golden (99%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/TemplateLiterals.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/ThisFunction.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/Throw.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/TryCatch.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/TryFinally.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/Typeof.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/UnaryOperators.golden (91%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/WideRegisters.golden (99%) rename deps/v8/test/{cctest => unittests}/interpreter/bytecode_expectations/WithStatement.golden (100%) rename deps/v8/test/{cctest => unittests}/interpreter/generate-bytecode-expectations.cc (98%) rename deps/v8/test/{cctest/interpreter/test-interpreter-intrinsics.cc => unittests/interpreter/interpreter-intrinsics-unittest.cc} (97%) rename deps/v8/test/{cctest => unittests}/interpreter/interpreter-tester.cc (96%) rename deps/v8/test/{cctest => unittests}/interpreter/interpreter-tester.h (84%) rename deps/v8/test/{cctest/interpreter/test-interpreter.cc => unittests/interpreter/interpreter-unittest.cc} (73%) rename deps/v8/test/{cctest => unittests}/interpreter/source-position-matcher.cc (99%) rename deps/v8/test/{cctest => unittests}/interpreter/source-position-matcher.h (88%) rename deps/v8/test/{cctest/interpreter/test-source-positions.cc => unittests/interpreter/source-positions-unittest.cc} (64%) create mode 100644 deps/v8/test/unittests/js-atomics/js-atomics-synchronization-primitive-unittest.cc create mode 100644 deps/v8/test/unittests/libplatform/DEPS rename deps/v8/test/{cctest/libplatform/test-tracing.cc => unittests/libplatform/tracing-unittest.cc} (96%) rename deps/v8/test/{cctest/libsampler/test-sampler.cc => unittests/libsampler/sampler-unittest.cc} (75%) rename deps/v8/test/{cctest/libsampler/signals-and-mutexes.cc => unittests/libsampler/signals-and-mutexes-unittest.cc} (95%) rename deps/v8/test/{cctest/test-log.cc => unittests/logging/log-unittest.cc} (73%) rename deps/v8/test/{cctest/test-diy-fp.cc => unittests/numbers/diy-fp-unittest.cc} (94%) rename deps/v8/test/{cctest/test-strtod.cc => unittests/numbers/strtod-unittest.cc} (97%) create mode 100644 deps/v8/test/unittests/objects/array-list-unittest.cc rename deps/v8/test/{cctest/test-concurrent-descriptor-array.cc => unittests/objects/concurrent-descriptor-array-unittest.cc} (73%) rename deps/v8/test/{cctest/test-concurrent-feedback-vector.cc => unittests/objects/concurrent-feedback-vector-unittest.cc} (77%) rename deps/v8/test/{cctest/test-concurrent-js-array.cc => unittests/objects/concurrent-js-array-unittest.cc} (80%) rename deps/v8/test/{cctest/test-concurrent-prototype.cc => unittests/objects/concurrent-prototype-unittest.cc} (73%) rename deps/v8/test/{cctest/test-concurrent-script-context-table.cc => unittests/objects/concurrent-script-context-table-unittest.cc} (79%) rename deps/v8/test/{cctest/test-concurrent-string.cc => unittests/objects/concurrent-string-unittest.cc} (62%) rename deps/v8/test/{cctest/test-concurrent-transition-array.cc => unittests/objects/concurrent-transition-array-unittest.cc} (61%) create mode 100644 deps/v8/test/unittests/objects/dictionary-unittest.cc rename deps/v8/test/{cctest/test-elements-kind.cc => unittests/objects/elements-kind-unittest.cc} (73%) rename deps/v8/test/{cctest/test-feedback-vector.cc => unittests/objects/feedback-vector-unittest.cc} (81%) rename deps/v8/test/{cctest/test-global-object.cc => unittests/objects/global-object-unittest.cc} (55%) rename deps/v8/test/{cctest/test-hashcode.cc => unittests/objects/hashcode-unittest.cc} (54%) create mode 100644 deps/v8/test/unittests/objects/inobject-slack-tracking-unittest.cc create mode 100644 deps/v8/test/unittests/objects/intl-unittest.cc rename deps/v8/test/{cctest/test-managed.cc => unittests/objects/managed-unittest.cc} (80%) rename deps/v8/test/{cctest/test-modules.cc => unittests/objects/modules-unittest.cc} (56%) delete mode 100644 deps/v8/test/unittests/objects/osr-optimized-code-cache-unittest.cc rename deps/v8/test/{cctest/test-representation.cc => unittests/objects/representation-unittest.cc} (91%) rename deps/v8/test/{cctest/test-roots.cc => unittests/objects/roots-unittest.cc} (88%) rename deps/v8/test/{cctest/test-symbols.cc => unittests/objects/symbols-unittest.cc} (90%) rename deps/v8/test/{cctest/test-weakmaps.cc => unittests/objects/weakmaps-unittest.cc} (83%) rename deps/v8/test/{cctest/test-weaksets.cc => unittests/objects/weaksets-unittest.cc} (72%) rename deps/v8/test/{cctest/test-decls.cc => unittests/parser/decls-unittest.cc} (55%) rename deps/v8/test/{cctest/parsing/test-parse-decision.cc => unittests/parser/parse-decision-unittest.cc} (79%) rename deps/v8/test/{cctest/test-parsing.cc => unittests/parser/parsing-unittest.cc} (90%) rename deps/v8/test/{cctest/parsing/test-scanner-streams.cc => unittests/parser/scanner-streams-unittest.cc} (90%) rename deps/v8/test/{cctest/parsing/test-scanner.cc => unittests/parser/scanner-unittest.cc} (71%) rename deps/v8/test/{cctest => unittests/parser}/scope-test-helper.h (93%) rename deps/v8/test/{cctest => unittests/parser}/unicode-helpers.cc (88%) rename deps/v8/test/{cctest => unittests/parser}/unicode-helpers.h (51%) rename deps/v8/test/{cctest/test-circular-queue.cc => unittests/profiler/circular-queue-unittest.cc} (72%) create mode 100644 deps/v8/test/unittests/temporal/temporal-parser-unittest.cc rename deps/v8/test/{cctest/test-traced-value.cc => unittests/tracing/traced-value-unittest.cc} (92%) create mode 100644 deps/v8/test/unittests/utils/bit-vector-unittest.cc rename deps/v8/test/{cctest/test-identity-map.cc => unittests/utils/identity-map-unittest.cc} (57%) create mode 100644 deps/v8/test/unittests/utils/sparse-bit-vector-unittest.cc rename deps/v8/test/{cctest/test-version.cc => unittests/utils/version-unittest.cc} (96%) create mode 100644 deps/v8/test/unittests/v8_unittests.cml create mode 100644 deps/v8/test/unittests/wasm/string-builder-unittest.cc rename deps/v8/test/{cctest/test-web-snapshots.cc => unittests/web-snapshot/web-snapshot-unittest.cc} (56%) create mode 100644 deps/v8/test/wasm-api-tests/regressions.cc delete mode 100644 deps/v8/third_party/google_benchmark/precompiled_headers/benchmark/export.h delete mode 100644 deps/v8/third_party/inspector_protocol/lib/base_string_adapter_cc.template delete mode 100644 deps/v8/third_party/inspector_protocol/lib/base_string_adapter_h.template create mode 100644 deps/v8/third_party/zlib/contrib/minizip/README.chromium delete mode 100644 deps/v8/third_party/zlib/contrib/optimizations/slide_hash_neon.h delete mode 100644 deps/v8/third_party/zlib/fill_window_sse.c create mode 100644 deps/v8/third_party/zlib/slide_hash_simd.h create mode 100644 deps/v8/tools/builtins-pgo/arm64.profile create mode 100755 deps/v8/tools/builtins-pgo/combine_hints.py create mode 100755 deps/v8/tools/builtins-pgo/generate.py create mode 100755 deps/v8/tools/builtins-pgo/get_hints.py create mode 100644 deps/v8/tools/builtins-pgo/x64.profile create mode 100644 deps/v8/tools/clusterfuzz/trials/README.md delete mode 100755 deps/v8/tools/ignition/bytecode_dispatches_report.py delete mode 100644 deps/v8/tools/ignition/bytecode_dispatches_report_test.py delete mode 100755 deps/v8/tools/ignition/linux_perf_bytecode_annotate.py delete mode 100644 deps/v8/tools/ignition/linux_perf_bytecode_annotate_test.py delete mode 100755 deps/v8/tools/ignition/linux_perf_report.py delete mode 100644 deps/v8/tools/ignition/linux_perf_report_test.py create mode 100644 deps/v8/tools/profiling/README.md rename deps/v8/tools/{ => profiling}/android-ll-prof.sh (100%) rename deps/v8/tools/{chrome/linux-perf-renderer-cmd.sh => profiling/linux-perf-chrome-renderer-cmd.sh} (99%) rename deps/v8/tools/{chrome/linux_perf.py => profiling/linux-perf-chrome.py} (64%) create mode 100755 deps/v8/tools/profiling/linux-perf-d8.py rename deps/v8/tools/{ => profiling}/ll_prof.py (99%) rename deps/v8/tools/{ => profiling}/run-llprof.sh (100%) create mode 100755 deps/v8/tools/release/roll_merge_gerrit.py delete mode 100755 deps/v8/tools/run-perf.sh create mode 100755 deps/v8/tools/system-analyzer/local-server.sh create mode 100644 deps/v8/tools/system-analyzer/profiling.mjs create mode 100644 deps/v8/tools/system-analyzer/view/profiler-panel-template.html create mode 100644 deps/v8/tools/system-analyzer/view/profiler-panel.mjs create mode 100644 deps/v8/tools/system-analyzer/view/timeline/timeline-overview-template.html create mode 100644 deps/v8/tools/system-analyzer/view/timeline/timeline-overview.mjs create mode 100644 deps/v8/tools/testrunner/build_config.py create mode 100644 deps/v8/tools/testrunner/local/context.py delete mode 100644 deps/v8/tools/testrunner/local/junit_output.py create mode 100644 deps/v8/tools/testrunner/standard_runner_test.py rename deps/v8/tools/{unittests => testrunner}/testdata/expected_test_results1.json (97%) rename deps/v8/tools/{unittests => testrunner}/testdata/expected_test_results2.json (98%) rename deps/v8/tools/{unittests/testdata/testroot1 => testrunner/testdata/testroot1/out/build}/d8_mocked.py (100%) rename deps/v8/tools/{unittests/testdata/testroot1 => testrunner/testdata/testroot1/out/build}/v8_build_config.json (100%) rename deps/v8/tools/{unittests => testrunner}/testdata/testroot1/test/sweet/sweet.status (100%) create mode 100644 deps/v8/tools/testrunner/testdata/testroot1/test/sweet/testcfg.py rename deps/v8/tools/{unittests/testdata/testroot2 => testrunner/testdata/testroot2/out/build}/d8_mocked.py (100%) rename deps/v8/tools/{unittests/testdata/testroot2 => testrunner/testdata/testroot2/out/build}/v8_build_config.json (100%) rename deps/v8/tools/{unittests => testrunner}/testdata/testroot2/test/sweet/sweet.status (100%) rename deps/v8/tools/{unittests => testrunner}/testdata/testroot2/test/sweet/testcfg.py (91%) rename deps/v8/tools/{unittests/testdata/testroot3 => testrunner/testdata/testroot3/out/build}/d8_mocked.py (100%) rename deps/v8/tools/{unittests/testdata/testroot3 => testrunner/testdata/testroot3/out/build}/v8_build_config.json (100%) rename deps/v8/tools/{unittests => testrunner}/testdata/testroot3/test/sweet/sweet.status (100%) rename deps/v8/tools/{unittests => testrunner}/testdata/testroot3/test/sweet/testcfg.py (92%) create mode 100644 deps/v8/tools/testrunner/testdata/testroot4/out/build/v8_build_config.json create mode 100644 deps/v8/tools/testrunner/testdata/testroot5/out.gn/build/v8_build_config.json create mode 100644 deps/v8/tools/testrunner/testdata/testroot5/test/sweet/sweet.status rename deps/v8/tools/{unittests/testdata/testroot1 => testrunner/testdata/testroot5}/test/sweet/testcfg.py (84%) create mode 100644 deps/v8/tools/testrunner/testdata/testroot6/out/build/d8_mocked.py create mode 100644 deps/v8/tools/testrunner/testdata/testroot6/out/build/v8_build_config.json create mode 100644 deps/v8/tools/testrunner/testdata/testroot6/test/fat/fat.status create mode 100644 deps/v8/tools/testrunner/testdata/testroot6/test/fat/testcfg.py create mode 100644 deps/v8/tools/testrunner/testproc/fuzzer_test.py create mode 100644 deps/v8/tools/testrunner/testproc/indicators.py create mode 100755 deps/v8/tools/testrunner/testproc/loader_test.py create mode 100644 deps/v8/tools/testrunner/utils/augmented_options.py delete mode 100644 deps/v8/tools/testrunner/utils/dump_build_config_gyp.py create mode 100644 deps/v8/tools/testrunner/utils/test_utils.py create mode 100644 deps/v8/tools/turbolizer/css/tabs.css rename deps/v8/tools/turbolizer/{ => css}/turbo-visualizer-ranges.css (97%) rename deps/v8/tools/turbolizer/{ => css}/turbo-visualizer.css (86%) create mode 100644 deps/v8/tools/turbolizer/css/turboshaft.css rename deps/v8/tools/turbolizer/{ => img/arrows}/down-arrow.png (100%) rename deps/v8/tools/turbolizer/{ => img/arrows}/left-arrow.png (100%) rename deps/v8/tools/turbolizer/{ => img/arrows}/right-arrow.png (100%) rename deps/v8/tools/turbolizer/{ => img/arrows}/up-arrow.png (100%) create mode 100644 deps/v8/tools/turbolizer/img/toolbox/collapse-selected-icon.png create mode 100644 deps/v8/tools/turbolizer/img/toolbox/compress-layout-icon.png rename deps/v8/tools/turbolizer/img/{ => toolbox}/hide-selected-icon.png (100%) rename deps/v8/tools/turbolizer/img/{ => toolbox}/hide-unselected-icon.png (100%) rename deps/v8/tools/turbolizer/img/{ => toolbox}/layout-icon.png (100%) rename deps/v8/tools/turbolizer/img/{ => toolbox}/show-all-icon.png (100%) rename deps/v8/tools/turbolizer/img/{ => toolbox}/show-control-icon.png (100%) create mode 100644 deps/v8/tools/turbolizer/img/toolbox/toggle-cache-layout-icon.png create mode 100644 deps/v8/tools/turbolizer/img/toolbox/toggle-custom-data-icon.png rename deps/v8/tools/turbolizer/img/{ => toolbox}/toggle-hide-dead-icon.png (100%) rename deps/v8/tools/turbolizer/img/{ => toolbox}/toggle-types-icon.png (100%) create mode 100644 deps/v8/tools/turbolizer/img/toolbox/uncollapse-selected-icon.png rename deps/v8/tools/turbolizer/img/{ => toolbox}/zoom-selection-icon.png (100%) create mode 100644 deps/v8/tools/turbolizer/img/turboshaft/collapse_down.svg create mode 100644 deps/v8/tools/turbolizer/img/turboshaft/collapse_up.svg rename deps/v8/tools/turbolizer/{ => img}/upload-icon.png (100%) delete mode 100644 deps/v8/tools/turbolizer/search2.png create mode 100644 deps/v8/tools/turbolizer/src/common/constants.ts create mode 100644 deps/v8/tools/turbolizer/src/common/util.ts create mode 100644 deps/v8/tools/turbolizer/src/common/view-elements.ts delete mode 100644 deps/v8/tools/turbolizer/src/constants.ts delete mode 100644 deps/v8/tools/turbolizer/src/disassembly-view.ts delete mode 100644 deps/v8/tools/turbolizer/src/graph-view.ts create mode 100644 deps/v8/tools/turbolizer/src/interval.ts create mode 100644 deps/v8/tools/turbolizer/src/layout-occupation.ts create mode 100644 deps/v8/tools/turbolizer/src/movable-container.ts create mode 100644 deps/v8/tools/turbolizer/src/origin.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/disassembly-phase.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/graph-phase/graph-edge.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/graph-phase/graph-node.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/graph-phase/graph-phase.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/instructions-phase.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/phase.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/schedule-phase.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/sequence-phase.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/turboshaft-custom-data-phase.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/turboshaft-graph-phase/turboshaft-graph-block.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/turboshaft-graph-phase/turboshaft-graph-edge.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/turboshaft-graph-phase/turboshaft-graph-node.ts create mode 100644 deps/v8/tools/turbolizer/src/phases/turboshaft-graph-phase/turboshaft-graph-phase.ts create mode 100644 deps/v8/tools/turbolizer/src/position.ts delete mode 100644 deps/v8/tools/turbolizer/src/schedule-view.ts delete mode 100644 deps/v8/tools/turbolizer/src/selection-broker.ts delete mode 100644 deps/v8/tools/turbolizer/src/selection-handler.ts delete mode 100644 deps/v8/tools/turbolizer/src/selection.ts create mode 100644 deps/v8/tools/turbolizer/src/selection/selection-broker.ts create mode 100644 deps/v8/tools/turbolizer/src/selection/selection-handler.ts create mode 100644 deps/v8/tools/turbolizer/src/selection/selection-map.ts create mode 100644 deps/v8/tools/turbolizer/src/selection/selection-storage.ts delete mode 100644 deps/v8/tools/turbolizer/src/sequence-view.ts create mode 100644 deps/v8/tools/turbolizer/src/source.ts delete mode 100644 deps/v8/tools/turbolizer/src/text-view.ts create mode 100644 deps/v8/tools/turbolizer/src/turboshaft-graph-layout.ts create mode 100644 deps/v8/tools/turbolizer/src/turboshaft-graph.ts delete mode 100644 deps/v8/tools/turbolizer/src/util.ts create mode 100644 deps/v8/tools/turbolizer/src/views/bytecode-source-view.ts rename deps/v8/tools/turbolizer/src/{ => views}/code-view.ts (60%) create mode 100644 deps/v8/tools/turbolizer/src/views/disassembly-view.ts create mode 100644 deps/v8/tools/turbolizer/src/views/graph-view.ts create mode 100644 deps/v8/tools/turbolizer/src/views/history-view.ts rename deps/v8/tools/turbolizer/src/{ => views}/info-view.ts (66%) create mode 100644 deps/v8/tools/turbolizer/src/views/movable-view.ts rename deps/v8/tools/turbolizer/src/{ => views}/range-view.ts (60%) create mode 100644 deps/v8/tools/turbolizer/src/views/schedule-view.ts create mode 100644 deps/v8/tools/turbolizer/src/views/sequence-view.ts create mode 100644 deps/v8/tools/turbolizer/src/views/text-view.ts create mode 100644 deps/v8/tools/turbolizer/src/views/turboshaft-graph-view.ts rename deps/v8/tools/turbolizer/src/{ => views}/view.ts (62%) delete mode 100644 deps/v8/tools/turbolizer/tabs.css delete mode 100755 deps/v8/tools/unittests/run_tests_test.py create mode 100644 deps/v8/tools/wasm/BUILD.gn create mode 100644 deps/v8/tools/wasm/module-inspector.cc diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index b8d1d934bcf610..489f0b64f9b1ef 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -30,6 +30,7 @@ .cproject .gclient_entries .gdb_history +.idea .jslint-cache .landmines .project diff --git a/deps/v8/.gn b/deps/v8/.gn index a691fa339b0430..8edbdf34c51807 100644 --- a/deps/v8/.gn +++ b/deps/v8/.gn @@ -19,10 +19,17 @@ no_check_targets = [ "//:cppgc_base", "//:v8_internal_headers", "//src/inspector:inspector", - "//test/cctest:cctest_sources", + "//test/cctest:cctest_sources", # 15 errors + "//test/unittests:inspector_unittests_sources", # 2 errors "//third_party/icu:*", ] +default_args = { + # Overwrite default args declared in the Fuchsia sdk + # Please maintain this in sync with Chromium version in src/.gn + fuchsia_target_api_level = 9 +} + # These are the list of GN files that run exec_script. This whitelist exists # to force additional review for new uses of exec_script, which is strongly # discouraged except for gypi_to_gn calls. diff --git a/deps/v8/.mailmap b/deps/v8/.mailmap index 7f2e3b9e5e9098..780084c4138133 100644 --- a/deps/v8/.mailmap +++ b/deps/v8/.mailmap @@ -11,4 +11,6 @@ # Please keep the list sorted. Clemens Backes Clemens Hammacher +Jakob Linke +Jakob Linke Timothy Gu diff --git a/deps/v8/.vpython3 b/deps/v8/.vpython3 index d1842bb8dd2eda..50fab3bb519735 100644 --- a/deps/v8/.vpython3 +++ b/deps/v8/.vpython3 @@ -69,3 +69,8 @@ wheel: < name: "infra/python/wheels/numpy/${vpython_platform}" version: "version:1.2x.supported.1" > + +wheel: < + name: "infra/python/wheels/protobuf-py3" + version: "version:3.19.3" +> diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index e095f812659d7a..6ac1e3a1a2a6b3 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -42,6 +42,7 @@ Cloudflare, Inc. <*@cloudflare.com> Julia Computing, Inc. <*@juliacomputing.com> CodeWeavers, Inc. <*@codeweavers.com> Alibaba, Inc. <*@alibaba-inc.com> +SiFive, Inc. <*@sifive.com> Aaron Bieber Aaron O'Mullan @@ -99,21 +100,25 @@ David Sanders Deepak Mohan Deon Dior Derek Tu +Divy Srivastava Dominic Chen Dominic Farolini Douglas Crosher Dusan Milosavljevic +Eden Wang Eric Rannaud Erich Ocean Evan Lucas Fedor Indutny Felix Geisendörfer +Feng Yu Filipe David Manana Franziska Hinkelmann Gao Sheng Geoffrey Garside Gergely Nagy Gilang Mentari Hamidy +Giovanny Gutierrez Gus Caplan Gwang Yoon Hwang Haichuan Wang @@ -122,6 +127,7 @@ Harshal Nandigramwar Harshil Jain Henrique Ferreiro Hirofumi Mako +Hisham Muhammad Honggyu Kim Huáng Jùnliàng HyeockJin Kim @@ -194,6 +200,7 @@ Paolo Giarrusso Patrick Gansterer Paul Lind Pavel Medvedev +Pedro Falcato Peng Fei Peng Wu Peng-Yu Chen diff --git a/deps/v8/BUILD.bazel b/deps/v8/BUILD.bazel index 279e3e55a0dca8..4e89f90e7e31e1 100644 --- a/deps/v8/BUILD.bazel +++ b/deps/v8/BUILD.bazel @@ -68,6 +68,7 @@ load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression # cppgc_enable_caged_heap # cppgc_enable_check_assignments_in_prefinalizers # cppgc_enable_object_names +# cppgc_enable_pointer_compression # cppgc_enable_verify_heap # cppgc_enable_young_generation # v8_enable_zone_compression @@ -323,7 +324,6 @@ v8_config( }, defines = [ "GOOGLE3", - "CHROMIUM_ZLIB_NO_CHROMECONF", "ENABLE_DEBUGGER_SUPPORT", "V8_ADVANCED_BIGINT_ALGORITHMS", "V8_CONCURRENT_MARKING", @@ -457,15 +457,19 @@ filegroup( "include/cppgc/garbage-collected.h", "include/cppgc/heap.h", "include/cppgc/heap-consistency.h", + "include/cppgc/heap-handle.h", "include/cppgc/heap-state.h", "include/cppgc/heap-statistics.h", "include/cppgc/internal/api-constants.h", "include/cppgc/internal/atomic-entry-flag.h", + "include/cppgc/internal/base-page-handle.h", "include/cppgc/internal/caged-heap-local-data.h", + "include/cppgc/internal/caged-heap.h", "include/cppgc/internal/compiler-specific.h", "include/cppgc/internal/finalizer-trait.h", "include/cppgc/internal/gc-info.h", "include/cppgc/internal/logging.h", + "include/cppgc/internal/member-storage.h", "include/cppgc/internal/name-trait.h", "include/cppgc/internal/persistent-node.h", "include/cppgc/internal/pointer-policies.h", @@ -579,7 +583,6 @@ filegroup( "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", @@ -590,6 +593,7 @@ filegroup( "src/base/bounds.h", "src/base/build_config.h", "src/base/compiler-specific.h", + "src/base/container-utils.h", "src/base/cpu.cc", "src/base/cpu.h", "src/base/debug/stack_trace.cc", @@ -604,7 +608,6 @@ filegroup( "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", @@ -643,6 +646,9 @@ filegroup( "src/base/platform/condition-variable.cc", "src/base/platform/condition-variable.h", "src/base/platform/elapsed-timer.h", + "src/base/platform/memory.h", + "src/base/platform/memory-protection-key.cc", + "src/base/platform/memory-protection-key.h", "src/base/platform/mutex.cc", "src/base/platform/mutex.h", "src/base/platform/platform.h", @@ -659,6 +665,7 @@ filegroup( "src/base/safe_conversions_arm_impl.h", "src/base/safe_conversions_impl.h", "src/base/small-vector.h", + "src/base/string-format.h", "src/base/strings.cc", "src/base/strings.h", "src/base/sys-info.cc", @@ -689,6 +696,7 @@ filegroup( "@v8//bazel/config:is_linux": [ "src/base/debug/stack_trace_posix.cc", "src/base/platform/platform-linux.cc", + "src/base/platform/platform-linux.h", ], "@v8//bazel/config:is_android": [ "src/base/debug/stack_trace_android.cc", @@ -779,7 +787,11 @@ filegroup( "src/builtins/array-slice.tq", "src/builtins/array-some.tq", "src/builtins/array-splice.tq", + "src/builtins/array-to-reversed.tq", + "src/builtins/array-to-sorted.tq", + "src/builtins/array-to-spliced.tq", "src/builtins/array-unshift.tq", + "src/builtins/array-with.tq", "src/builtins/array.tq", "src/builtins/arraybuffer.tq", "src/builtins/base.tq", @@ -878,7 +890,9 @@ filegroup( "src/builtins/typed-array-some.tq", "src/builtins/typed-array-sort.tq", "src/builtins/typed-array-subarray.tq", + "src/builtins/typed-array-to-reversed.tq", "src/builtins/typed-array-values.tq", + "src/builtins/typed-array-with.tq", "src/builtins/typed-array.tq", "src/builtins/weak-ref.tq", "src/ic/handler-configuration.tq", @@ -903,6 +917,7 @@ filegroup( "src/objects/heap-object.tq", "src/objects/js-array-buffer.tq", "src/objects/js-array.tq", + "src/objects/js-atomics-synchronization.tq", "src/objects/js-collection-iterator.tq", "src/objects/js-collection.tq", "src/objects/js-function.tq", @@ -912,7 +927,8 @@ filegroup( "src/objects/js-proxy.tq", "src/objects/js-regexp-string-iterator.tq", "src/objects/js-regexp.tq", - "src/objects/js-shadow-realms.tq", + "src/objects/js-shadow-realm.tq", + "src/objects/js-shared-array.tq", "src/objects/js-struct.tq", "src/objects/js-temporal-objects.tq", "src/objects/js-weak-refs.tq", @@ -1034,6 +1050,15 @@ filegroup( ], ) +# Default setting for v8_enable_pointer_compression when target is x64. +selects.config_setting_group( + name = "is_v8_enable_webassembly_on_non_android_posix_x64", + match_all = [ + ":is_v8_enable_webassembly", + "@v8//bazel/config:is_non_android_posix_x64", + ], +) + filegroup( name = "v8_base_without_compiler_files", srcs = [ @@ -1091,6 +1116,7 @@ filegroup( "src/builtins/builtins-array.cc", "src/builtins/builtins-arraybuffer.cc", "src/builtins/builtins-async-module.cc", + "src/builtins/builtins-atomics-synchronization.cc", "src/builtins/builtins-bigint.cc", "src/builtins/builtins-callsite.cc", "src/builtins/builtins-collections.cc", @@ -1110,8 +1136,9 @@ filegroup( "src/builtins/builtins-promise.h", "src/builtins/builtins-reflect.cc", "src/builtins/builtins-regexp.cc", - "src/builtins/builtins-shadow-realms.cc", + "src/builtins/builtins-shadow-realm.cc", "src/builtins/builtins-sharedarraybuffer.cc", + "src/builtins/builtins-shared-array.cc", "src/builtins/builtins-string.cc", "src/builtins/builtins-struct.cc", "src/builtins/builtins-symbol.cc", @@ -1121,6 +1148,7 @@ filegroup( "src/builtins/builtins-utils-inl.h", "src/builtins/builtins-utils.h", "src/builtins/builtins-weak-refs.cc", + "src/builtins/builtins-web-snapshots.cc", "src/builtins/builtins.cc", "src/builtins/builtins.h", "src/builtins/constants-table-builder.cc", @@ -1133,6 +1161,7 @@ filegroup( "src/codegen/assembler.cc", "src/codegen/assembler.h", "src/codegen/atomic-memory-order.h", + "src/codegen/background-merge-task.h", "src/codegen/bailout-reason.cc", "src/codegen/bailout-reason.h", "src/codegen/callable.h", @@ -1170,6 +1199,8 @@ filegroup( "src/codegen/machine-type.h", "src/codegen/macro-assembler-inl.h", "src/codegen/macro-assembler.h", + "src/codegen/maglev-safepoint-table.cc", + "src/codegen/maglev-safepoint-table.h", "src/codegen/optimized-compilation-info.cc", "src/codegen/optimized-compilation-info.h", "src/codegen/pending-optimization-table.cc", @@ -1183,6 +1214,7 @@ filegroup( "src/codegen/reglist.h", "src/codegen/reloc-info.cc", "src/codegen/reloc-info.h", + "src/codegen/safepoint-table-base.h", "src/codegen/safepoint-table.cc", "src/codegen/safepoint-table.h", "src/codegen/script-details.h", @@ -1191,8 +1223,6 @@ filegroup( "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", @@ -1203,8 +1233,10 @@ filegroup( "src/codegen/unoptimized-compilation-info.h", "src/common/assert-scope.cc", "src/common/assert-scope.h", - "src/common/allow-deprecated.h", "src/common/checks.h", + "src/common/code-memory-access-inl.h", + "src/common/code-memory-access.cc", + "src/common/code-memory-access.h", "src/common/high-allocation-throughput-scope.h", "src/common/message-template.h", "src/common/operation.h", @@ -1240,6 +1272,8 @@ filegroup( "src/debug/debug.cc", "src/debug/debug.h", "src/debug/interface-types.h", + "src/debug/liveedit-diff.cc", + "src/debug/liveedit-diff.h", "src/debug/liveedit.cc", "src/debug/liveedit.h", "src/deoptimizer/deoptimize-reason.cc", @@ -1356,6 +1390,8 @@ filegroup( "src/handles/maybe-handles.h", "src/handles/persistent-handles.cc", "src/handles/persistent-handles.h", + "src/handles/shared-object-conveyor-handles.cc", + "src/handles/shared-object-conveyor-handles.h", "src/heap/base/active-system-pages.cc", "src/heap/base/active-system-pages.h", "src/heap/allocation-observer.cc", @@ -1410,11 +1446,14 @@ filegroup( "src/heap/free-list-inl.h", "src/heap/free-list.cc", "src/heap/free-list.h", + "src/heap/gc-callbacks.h", "src/heap/gc-idle-time-handler.cc", "src/heap/gc-idle-time-handler.h", "src/heap/gc-tracer.cc", "src/heap/gc-tracer-inl.h", "src/heap/gc-tracer.h", + "src/heap/global-handle-marking-visitor.cc", + "src/heap/global-handle-marking-visitor.h", "src/heap/heap-allocator-inl.h", "src/heap/heap-allocator.cc", "src/heap/heap-allocator.h", @@ -1423,6 +1462,8 @@ filegroup( "src/heap/heap-inl.h", "src/heap/heap-layout-tracer.cc", "src/heap/heap-layout-tracer.h", + "src/heap/heap-verifier.cc", + "src/heap/heap-verifier.h", "src/heap/heap-write-barrier-inl.h", "src/heap/heap-write-barrier.cc", "src/heap/heap-write-barrier.h", @@ -1595,8 +1636,8 @@ filegroup( "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-file.cc", + "src/logging/log-file.h", "src/logging/log.cc", "src/logging/log.h", "src/logging/metrics.cc", @@ -1693,6 +1734,9 @@ filegroup( "src/objects/js-array-buffer.h", "src/objects/js-array-inl.h", "src/objects/js-array.h", + "src/objects/js-atomics-synchronization-inl.h", + "src/objects/js-atomics-synchronization.h", + "src/objects/js-atomics-synchronization.cc", "src/objects/js-collection-inl.h", "src/objects/js-collection-iterator.h", "src/objects/js-collection-iterator-inl.h", @@ -1714,8 +1758,10 @@ filegroup( "src/objects/js-regexp-string-iterator.h", "src/objects/js-regexp.cc", "src/objects/js-regexp.h", - "src/objects/js-shadow-realms.h", - "src/objects/js-shadow-realms-inl.h", + "src/objects/js-shadow-realm.h", + "src/objects/js-shadow-realm-inl.h", + "src/objects/js-shared-array.h", + "src/objects/js-shared-array-inl.h", "src/objects/js-struct.h", "src/objects/js-struct-inl.h", "src/objects/js-temporal-objects.h", @@ -1771,9 +1817,6 @@ filegroup( "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", @@ -1803,6 +1846,8 @@ filegroup( "src/objects/shared-function-info-inl.h", "src/objects/shared-function-info.cc", "src/objects/shared-function-info.h", + "src/objects/simd.cc", + "src/objects/simd.h", "src/objects/slots-atomic-inl.h", "src/objects/slots-inl.h", "src/objects/slots.h", @@ -1816,6 +1861,9 @@ filegroup( "src/objects/string-inl.h", "src/objects/string-set-inl.h", "src/objects/string-set.h", + "src/objects/string-forwarding-table-inl.h", + "src/objects/string-forwarding-table.cc", + "src/objects/string-forwarding-table.h", "src/objects/string-table-inl.h", "src/objects/string-table.cc", "src/objects/symbol-table.cc", @@ -1994,6 +2042,7 @@ filegroup( "src/runtime/runtime-shadow-realm.cc", "src/runtime/runtime-strings.cc", "src/runtime/runtime-symbol.cc", + "src/runtime/runtime-temporal.cc", "src/runtime/runtime-test.cc", "src/runtime/runtime-trace.cc", "src/runtime/runtime-typedarray.cc", @@ -2006,6 +2055,8 @@ filegroup( "src/sandbox/external-pointer-table.cc", "src/sandbox/external-pointer-table-inl.h", "src/sandbox/external-pointer-table.h", + "src/sandbox/testing.cc", + "src/sandbox/testing.h", "src/sandbox/sandbox.cc", "src/sandbox/sandbox.h", "src/sandbox/sandboxed-pointer-inl.h", @@ -2047,8 +2098,6 @@ filegroup( "src/snapshot/shared-heap-deserializer.cc", "src/snapshot/shared-heap-serializer.h", "src/snapshot/shared-heap-serializer.cc", - "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", @@ -2097,12 +2146,6 @@ filegroup( "src/tracing/traced-value.h", "src/tracing/tracing-category-observer.cc", "src/tracing/tracing-category-observer.h", - "src/trap-handler/handler-inside-posix.h", - "src/trap-handler/handler-inside.cc", - "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", @@ -2112,6 +2155,8 @@ filegroup( "src/utils/boxed-float.h", "src/utils/detachable-vector.cc", "src/utils/detachable-vector.h", + "src/utils/hex-format.cc", + "src/utils/hex-format.h", "src/utils/identity-map.cc", "src/utils/identity-map.h", "src/utils/locked-queue-inl.h", @@ -2121,6 +2166,9 @@ filegroup( "src/utils/ostreams.cc", "src/utils/ostreams.h", "src/utils/scoped-list.h", + "src/utils/sha-256.cc", + "src/utils/sha-256.h", + "src/utils/sparse-bit-vector.h", "src/utils/utils-inl.h", "src/utils/utils.cc", "src/utils/utils.h", @@ -2386,7 +2434,11 @@ filegroup( ], }) + select({ # Only for x64 builds and for arm64 with x64 host simulator. - "@v8//bazel/config:is_non_android_posix_x64": [ + ":is_v8_enable_webassembly_on_non_android_posix_x64": [ + "src/trap-handler/handler-inside-posix.cc", + "src/trap-handler/handler-outside-posix.cc", + ], + "@v8//bazel/config:is_macos_arm64": [ "src/trap-handler/handler-inside-posix.cc", "src/trap-handler/handler-outside-posix.cc", ], @@ -2420,16 +2472,20 @@ filegroup( "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/compiler/wasm-escape-analysis.h", - "src/compiler/wasm-inlining.h", - "src/compiler/wasm-loop-peeling.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/third_party/utf8-decoder/generalized-utf8-decoder.h", + "src/trap-handler/handler-inside-posix.h", + "src/trap-handler/handler-inside.cc", + "src/trap-handler/handler-outside.cc", + "src/trap-handler/handler-shared.cc", + "src/trap-handler/trap-handler-internal.h", + "src/trap-handler/trap-handler.h", + "src/wasm/assembler-buffer-cache.cc", + "src/wasm/assembler-buffer-cache.h", "src/wasm/baseline/liftoff-assembler.cc", "src/wasm/baseline/liftoff-assembler-defs.h", "src/wasm/baseline/liftoff-assembler.h", @@ -2442,6 +2498,10 @@ filegroup( "src/wasm/code-space-access.cc", "src/wasm/code-space-access.h", "src/wasm/compilation-environment.h", + "src/wasm/constant-expression.cc", + "src/wasm/constant-expression.h", + "src/wasm/constant-expression-interface.cc", + "src/wasm/constant-expression-interface.h", "src/wasm/decoder.h", "src/wasm/function-body-decoder.cc", "src/wasm/function-body-decoder.h", @@ -2450,31 +2510,33 @@ filegroup( "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-decoder-impl.h", "src/wasm/module-instantiate.cc", "src/wasm/module-instantiate.h", + "src/wasm/names-provider.cc", + "src/wasm/names-provider.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/stacks.cc", "src/wasm/stacks.h", "src/wasm/streaming-decoder.cc", "src/wasm/streaming-decoder.h", + "src/wasm/string-builder.h", + "src/wasm/string-builder-multiline.h", "src/wasm/struct-types.h", "src/wasm/sync-streaming-decoder.cc", "src/wasm/value-type.cc", @@ -2484,6 +2546,9 @@ filegroup( "src/wasm/wasm-code-manager.h", "src/wasm/wasm-debug.cc", "src/wasm/wasm-debug.h", + "src/wasm/wasm-disassembler.cc", + "src/wasm/wasm-disassembler.h", + "src/wasm/wasm-disassembler-impl.h", "src/wasm/wasm-engine.cc", "src/wasm/wasm-engine.h", "src/wasm/wasm-external-refs.cc", @@ -2646,6 +2711,7 @@ filegroup( "src/compiler/control-equivalence.h", "src/compiler/control-flow-optimizer.cc", "src/compiler/control-flow-optimizer.h", + "src/compiler/control-path-state.h", "src/compiler/csa-load-elimination.cc", "src/compiler/csa-load-elimination.h", "src/compiler/dead-code-elimination.cc", @@ -2708,6 +2774,8 @@ filegroup( "src/compiler/js-type-hint-lowering.h", "src/compiler/js-typed-lowering.cc", "src/compiler/js-typed-lowering.h", + "src/compiler/late-escape-analysis.cc", + "src/compiler/late-escape-analysis.h", "src/compiler/linkage.cc", "src/compiler/linkage.h", "src/compiler/load-elimination.cc", @@ -2793,6 +2861,26 @@ filegroup( "src/compiler/state-values-utils.h", "src/compiler/store-store-elimination.cc", "src/compiler/store-store-elimination.h", + "src/compiler/turboshaft/assembler.h", + "src/compiler/turboshaft/decompression-optimization.cc", + "src/compiler/turboshaft/decompression-optimization.h", + "src/compiler/turboshaft/deopt-data.h", + "src/compiler/turboshaft/fast-hash.h", + "src/compiler/turboshaft/graph-builder.cc", + "src/compiler/turboshaft/graph-builder.h", + "src/compiler/turboshaft/graph.cc", + "src/compiler/turboshaft/graph.h", + "src/compiler/turboshaft/graph-visualizer.cc", + "src/compiler/turboshaft/graph-visualizer.h", + "src/compiler/turboshaft/operations.cc", + "src/compiler/turboshaft/operations.h", + "src/compiler/turboshaft/optimization-phase.cc", + "src/compiler/turboshaft/optimization-phase.h", + "src/compiler/turboshaft/recreate-schedule.cc", + "src/compiler/turboshaft/recreate-schedule.h", + "src/compiler/turboshaft/sidetable.h", + "src/compiler/turboshaft/utils.h", + "src/compiler/turboshaft/value-numbering-assembler.h", "src/compiler/type-cache.cc", "src/compiler/type-cache.h", "src/compiler/type-narrowing-reducer.cc", @@ -2813,10 +2901,24 @@ filegroup( ] + select({ ":is_v8_enable_webassembly": [ "src/compiler/int64-lowering.cc", + "src/compiler/int64-lowering.h", + "src/compiler/wasm-compiler-definitions.h", "src/compiler/wasm-compiler.cc", - "src/compiler/wasm-loop-peeling.cc", + "src/compiler/wasm-compiler.h", "src/compiler/wasm-escape-analysis.cc", + "src/compiler/wasm-escape-analysis.h", + "src/compiler/wasm-loop-peeling.cc", + "src/compiler/wasm-loop-peeling.h", + "src/compiler/wasm-gc-lowering.cc", + "src/compiler/wasm-gc-lowering.h", + "src/compiler/wasm-gc-operator-reducer.cc", + "src/compiler/wasm-gc-operator-reducer.h", + "src/compiler/wasm-graph-assembler.cc", + "src/compiler/wasm-graph-assembler.h", "src/compiler/wasm-inlining.cc", + "src/compiler/wasm-inlining.h", + "src/compiler/wasm-typer.cc", + "src/compiler/wasm-typer.h", ], "//conditions:default": [], }), @@ -2863,7 +2965,7 @@ filegroup( "src/builtins/builtins-proxy-gen.h", "src/builtins/builtins-regexp-gen.cc", "src/builtins/builtins-regexp-gen.h", - "src/builtins/builtins-shadowrealm-gen.cc", + "src/builtins/builtins-shadow-realm-gen.cc", "src/builtins/builtins-sharedarraybuffer-gen.cc", "src/builtins/builtins-string-gen.cc", "src/builtins/builtins-string-gen.h", @@ -2966,6 +3068,8 @@ filegroup( "src/heap/cppgc/marking-visitor.h", "src/heap/cppgc/marking-worklists.cc", "src/heap/cppgc/marking-worklists.h", + "src/heap/cppgc/member-storage.cc", + "src/heap/cppgc/member-storage.h", "src/heap/cppgc/memory.cc", "src/heap/cppgc/memory.h", "src/heap/cppgc/metric-recorder.h", @@ -3030,8 +3134,8 @@ filegroup( "@v8//bazel/config:is_inline_asm_s390x": ["src/heap/base/asm/s390/push_registers_asm.cc"], "@v8//bazel/config:is_inline_asm_riscv64": ["src/heap/base/asm/riscv64/push_registers_asm.cc"], "@v8//bazel/config:is_inline_asm_ppc64le": ["src/heap/base/asm/ppc/push_registers_asm.cc"], - "@v8//bazel/config:is_msvc_asm_ia32": ["src/heap/base/asm/ia32/push_registers_masm.S"], - "@v8//bazel/config:is_msvc_asm_x64": ["src/heap/base/asm/x64/push_registers_masm.S"], + "@v8//bazel/config:is_msvc_asm_ia32": ["src/heap/base/asm/ia32/push_registers_masm.asm"], + "@v8//bazel/config:is_msvc_asm_x64": ["src/heap/base/asm/x64/push_registers_masm.asm"], "@v8//bazel/config:is_msvc_asm_arm64": ["src/heap/base/asm/arm64/push_registers_masm.S"], }), ) @@ -3136,6 +3240,8 @@ filegroup( "src/inspector/v8-string-conversions.h", "src/inspector/v8-value-utils.cc", "src/inspector/v8-value-utils.h", + "src/inspector/v8-webdriver-serializer.cc", + "src/inspector/v8-webdriver-serializer.h", "src/inspector/value-mirror.cc", "src/inspector/value-mirror.h", ":crdtp_platform_files", @@ -3285,8 +3391,6 @@ py_binary( "third_party/inspector_protocol/lib/ValueConversions_h.template", "third_party/inspector_protocol/lib/Values_cpp.template", "third_party/inspector_protocol/lib/Values_h.template", - "third_party/inspector_protocol/lib/base_string_adapter_cc.template", - "third_party/inspector_protocol/lib/base_string_adapter_h.template", "third_party/inspector_protocol/templates/Exported_h.template", "third_party/inspector_protocol/templates/Imported_h.template", "third_party/inspector_protocol/templates/TypeBuilder_cpp.template", @@ -3479,8 +3583,6 @@ v8_library( deps = [ ":v8_libbase", "//external:base_trace_event_common", - "//external:zlib", - "//external:zlib_compression_utils", ], ) @@ -3596,7 +3698,7 @@ v8_binary_non_pointer_compression( alias( name = "v8ci", - actual = "icu/v8", + actual = "noicu/v8", ) # ================================================= diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 988c907d964a25..3f78b1773f3907 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -40,9 +40,12 @@ declare_args() { # Sets -DV8_ENABLE_FUTURE. v8_enable_future = false - # Sets -DSYSTEM_INSTRUMENTATION. Enables OS-dependent event tracing + # Sets -DENABLE_SYSTEM_INSTRUMENTATION. Enables OS-dependent event tracing v8_enable_system_instrumentation = (is_win || is_mac) && !v8_use_perfetto + # Sets -DV8_ENABLE_ETW_STACK_WALKING. Enables ETW Stack Walking + v8_enable_etw_stack_walking = is_win + # Sets the GUID for the ETW provider v8_etw_guid = "" @@ -83,7 +86,7 @@ declare_args() { v8_enable_hugepage = false # Sets -dENABLE_HANDLE_ZAPPING. - v8_enable_handle_zapping = !is_on_release_branch || is_debug + v8_enable_handle_zapping = is_asan || is_debug # Enable slow dchecks. v8_enable_slow_dchecks = false @@ -175,16 +178,19 @@ declare_args() { # # To do profile-guided optimizations of builtins: # 1. Build with v8_enable_builtins_profiling = true - # 2. Run your chosen workload with the --turbo-profiling-log-builtins flag. + # 2. Run your chosen workload with the --turbo-profiling-output flag. # For Chrome, the invocation might look like this: # chrome --no-sandbox --disable-extensions - # --js-flags="--turbo-profiling-log-builtins --logfile=path/to/v8.log" + # --js-flags="--turbo-profiling-output=v8.builtins.pgo" # "http://localhost/test-suite" - # 3. Optionally repeat step 2 for additional workloads, and concatenate all of - # the resulting log files into a single file. - # 4. Build again with v8_builtins_profiling_log_file set to the file created - # in steps 2-3. - v8_builtins_profiling_log_file = "" + # 3. Run tools/builtins-pgo/get_hints.py to produce the branch hints, + # selecting min_count and threshold_ratio as you wish. + # 4. Optionally repeat steps 2-3 for additional workloads, and use + # tools/builtins-pgo/combine_hints.py to combine the hints produced in + # step 3 into a single file. + # 5. Build again with v8_builtins_profiling_log_file set to the file created + # in step 3 or 4. + v8_builtins_profiling_log_file = "default" # Enables various testing features. v8_enable_test_features = "" @@ -298,20 +304,17 @@ declare_args() { v8_enable_zone_compression = "" # Enable the experimental V8 sandbox. - # Sets -DV8_SANDBOX. + # Sets -DV8_ENABLE_SANDBOX. v8_enable_sandbox = "" - # Enable external pointer sandboxing. Requires v8_enable_sandbox. - # Sets -DV8_SANDBOXED_EXTERNAL_POINRTERS. - v8_enable_sandboxed_external_pointers = false - - # Enable sandboxed pointers. Requires v8_enable_sandbox. - # Sets -DV8_SANDBOXED_POINTERS. - v8_enable_sandboxed_pointers = false - # Enable all available sandbox features. Implies v8_enable_sandbox. v8_enable_sandbox_future = false + # Expose the memory corruption API to JavaScript. Useful for testing the sandbox. + # WARNING This will expose builtins that (by design) cause memory corruption. + # Sets -DV8_EXPOSE_MEMORY_CORRUPTION_API + v8_expose_memory_corruption_api = false + # Experimental feature for collecting per-class zone memory stats. # Requires use_rtti = true v8_enable_precise_zone_stats = false @@ -362,6 +365,14 @@ declare_args() { # TODO(victorgomes): Remove this flag once Chormium no longer needs # the deprecated feature. v8_fuchsia_use_vmex_resource = is_fuchsia && !build_with_chromium + + # Enables pointer compression for 8GB heaps. + # Sets -DV8_COMPRESS_POINTERS_8GB. + v8_enable_pointer_compression_8gb = "" + + # Compile V8 using zlib as dependency. + # Sets -DV8_USE_ZLIB + v8_use_zlib = true } # Derived defaults. @@ -407,9 +418,27 @@ if (v8_enable_pointer_compression == "") { v8_enable_pointer_compression = v8_current_cpu == "arm64" || v8_current_cpu == "x64" } + +# Toggle pointer compression for correctness fuzzing when building the +# clang_x64_pointer_compression toolchain. We'll correctness-compare the +# default build with the clang_x64_pointer_compression build. +if (v8_multi_arch_build && + rebase_path(get_label_info(":d8", "root_out_dir"), root_build_dir) == + "clang_x64_pointer_compression") { + v8_enable_pointer_compression = !v8_enable_pointer_compression +} + +# Ensure the sandbox is on/off in the same way as pointer compression for +# correctness fuzzing builds. +if (v8_multi_arch_build) { + v8_enable_sandbox = v8_enable_pointer_compression +} if (v8_enable_pointer_compression_shared_cage == "") { v8_enable_pointer_compression_shared_cage = v8_enable_pointer_compression } +if (v8_enable_pointer_compression_8gb == "") { + v8_enable_pointer_compression_8gb = false +} if (v8_enable_fast_torque == "") { v8_enable_fast_torque = v8_enable_fast_mksnapshot } @@ -418,7 +447,7 @@ if (v8_enable_zone_compression == "") { } if (v8_enable_short_builtin_calls == "") { v8_enable_short_builtin_calls = - v8_current_cpu == "x64" || (!is_android && v8_current_cpu == "arm64") + v8_current_cpu == "x64" || v8_current_cpu == "arm64" } if (v8_enable_external_code_space == "") { v8_enable_external_code_space = @@ -429,6 +458,16 @@ if (v8_enable_external_code_space == "") { if (v8_enable_maglev == "") { v8_enable_maglev = v8_current_cpu == "x64" && v8_enable_pointer_compression } +if (v8_builtins_profiling_log_file == "default") { + v8_builtins_profiling_log_file = "" + if (is_debug == false) { + if (v8_current_cpu == "x64") { + v8_builtins_profiling_log_file = "tools/builtins-pgo/x64.profile" + } else if (v8_current_cpu == "arm64") { + v8_builtins_profiling_log_file = "tools/builtins-pgo/arm64.profile" + } + } +} if (v8_enable_single_generation == "") { v8_enable_single_generation = v8_disable_write_barriers } @@ -457,17 +496,6 @@ assert(!v8_enable_trace_ignition || v8_enable_trace_unoptimized, assert(!v8_enable_trace_baseline_exec || v8_enable_trace_unoptimized, "Baseline tracing requires unoptimized tracing to be enabled.") -# Toggle pointer compression for correctness fuzzing when building the -# clang_x64_pointer_compression toolchain. We'll correctness-compare the -# default build with the clang_x64_pointer_compression build. -if (v8_multi_arch_build && - rebase_path(get_label_info(":d8", "root_out_dir"), root_build_dir) == - "clang_x64_pointer_compression") { - v8_enable_pointer_compression = !v8_enable_pointer_compression - v8_enable_pointer_compression_shared_cage = v8_enable_pointer_compression - v8_enable_external_code_space = v8_enable_pointer_compression -} - # Check if it is a Chromium build and activate PAC/BTI if needed. # TODO(cavalcantii): have a single point of integration with PAC/BTI flags. if (build_with_chromium && v8_current_cpu == "arm64" && @@ -477,10 +505,8 @@ if (build_with_chromium && v8_current_cpu == "arm64" && } if (v8_enable_short_builtin_calls && - ((!v8_enable_pointer_compression && v8_current_cpu != "x64") || - v8_control_flow_integrity)) { - # Disable short calls when pointer compression is not enabled. - # Or when CFI is enabled (until the CFI-related issues are fixed), except x64, + (!v8_enable_pointer_compression && v8_current_cpu != "x64")) { + # Disable short calls when pointer compression is not enabled, except x64, # where short builtin calls can still be enabled if the code range is # guaranteed to be close enough to embedded builtins. v8_enable_short_builtin_calls = false @@ -493,15 +519,15 @@ if (v8_enable_shared_ro_heap == "") { if (v8_enable_sandbox == "") { # TODO(saelo, v8:11880) remove dependency on v8_enable_external_code_space # once that is enabled everywhere by default. + # TODO(chromium:1325784) the sandbox is not currently supported in Chromium + # on Fuchsia. v8_enable_sandbox = build_with_chromium && v8_enable_pointer_compression_shared_cage && - v8_enable_external_code_space + v8_enable_external_code_space && target_os != "fuchsia" } # Enable all available sandbox features if sandbox future is enabled. if (v8_enable_sandbox_future) { - v8_enable_sandboxed_pointers = true - v8_enable_sandboxed_external_pointers = true v8_enable_sandbox = true } @@ -527,17 +553,17 @@ assert(!v8_enable_map_packing || v8_current_cpu == "x64", assert(!v8_enable_external_code_space || v8_enable_pointer_compression, "External code space feature requires pointer compression") +assert(!v8_enable_pointer_compression_8gb || v8_enable_pointer_compression, + "Pointer compression for 8GB cages requires pointer compression") + assert(!v8_enable_sandbox || v8_enable_pointer_compression_shared_cage, "The sandbox requires the shared pointer compression cage") assert(!v8_enable_sandbox || v8_enable_external_code_space, "The sandbox requires the external code space") -assert(!v8_enable_sandboxed_pointers || v8_enable_sandbox, - "Sandboxed pointers require the sandbox") - -assert(!v8_enable_sandboxed_external_pointers || v8_enable_sandbox, - "Sandboxed external pointers require the sandbox") +assert(!v8_expose_memory_corruption_api || v8_enable_sandbox, + "The Memory Corruption API requires the sandbox") assert( !v8_enable_pointer_compression_shared_cage || v8_enable_pointer_compression, @@ -558,19 +584,28 @@ assert(!cppgc_enable_caged_heap || v8_current_cpu == "x64" || assert(!cppgc_enable_young_generation || cppgc_enable_caged_heap, "Young generation in CppGC requires caged heap") +assert(!cppgc_enable_pointer_compression || cppgc_enable_caged_heap, + "Pointer compression in CppGC requires caged heap") + +assert( + !v8_enable_conservative_stack_scanning || + v8_enable_inner_pointer_resolution_osb || + v8_enable_inner_pointer_resolution_mb, + "Conservative stack scanning requires inner pointer resolution (OSB or MB)") + if (v8_enable_single_generation == true) { assert( v8_enable_unconditional_write_barriers || v8_disable_write_barriers, "Requires unconditional write barriers or none (which disables incremental marking)") } -assert(!v8_enable_conservative_stack_scanning || v8_enable_single_generation, - "Conservative stack scanning requires single generation") - if (v8_fuchsia_use_vmex_resource) { assert(target_os == "fuchsia", "VMEX resource only available on Fuchsia") } +assert(!v8_enable_snapshot_compression || v8_use_zlib, + "Snapshot compression requires zlib") + v8_random_seed = "314159265" v8_toolset_for_shell = "host" @@ -609,7 +644,7 @@ config("internal_config") { defines += [ "BUILDING_V8_SHARED" ] } - if (v8_current_cpu == "riscv64") { + if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { libs = [ "atomic" ] } } @@ -681,7 +716,7 @@ config("external_config") { defines += [ "USING_V8_SHARED" ] } - if (current_cpu == "riscv64") { + if (current_cpu == "riscv64" || current_cpu == "riscv32") { libs = [ "atomic" ] } } @@ -703,9 +738,7 @@ external_v8_defines = [ "V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE", "V8_31BIT_SMIS_ON_64BIT_ARCH", "V8_COMPRESS_ZONES", - "V8_SANDBOX", - "V8_SANDBOXED_POINTERS", - "V8_SANDBOXED_EXTERNAL_POINTERS", + "V8_ENABLE_SANDBOX", "V8_DEPRECATION_WARNINGS", "V8_IMMINENT_DEPRECATION_WARNINGS", "V8_NO_ARGUMENTS_ADAPTOR", @@ -734,13 +767,7 @@ if (v8_enable_zone_compression) { enabled_external_v8_defines += [ "V8_COMPRESS_ZONES" ] } if (v8_enable_sandbox) { - enabled_external_v8_defines += [ "V8_SANDBOX" ] -} -if (v8_enable_sandboxed_pointers) { - enabled_external_v8_defines += [ "V8_SANDBOXED_POINTERS" ] -} -if (v8_enable_sandboxed_external_pointers) { - enabled_external_v8_defines += [ "V8_SANDBOXED_EXTERNAL_POINTERS" ] + enabled_external_v8_defines += [ "V8_ENABLE_SANDBOX" ] } if (v8_deprecation_warnings) { enabled_external_v8_defines += [ "V8_DEPRECATION_WARNINGS" ] @@ -778,6 +805,7 @@ external_cppgc_defines = [ "CPPGC_SUPPORTS_OBJECT_NAMES", "CPPGC_CAGED_HEAP", "CPPGC_YOUNG_GENERATION", + "CPPGC_POINTER_COMPRESSION", ] enabled_external_cppgc_defines = [] @@ -787,10 +815,24 @@ if (cppgc_enable_object_names) { } if (cppgc_enable_caged_heap) { enabled_external_cppgc_defines += [ "CPPGC_CAGED_HEAP" ] + + # Always enable young generation compile time flag if caged heap is enabled. + cppgc_enable_young_generation = true + + # Pointer compression regresses binary size on Fuchsia by about 300K. + # However, the change improves Oilpan memory by 15-20% (2-4% of PMF), + # which is beneficial for memory-impoverished platforms. + cppgc_enable_pointer_compression = true } if (cppgc_enable_young_generation) { enabled_external_cppgc_defines += [ "CPPGC_YOUNG_GENERATION" ] } +if (cppgc_enable_pointer_compression) { + enabled_external_cppgc_defines += [ "CPPGC_POINTER_COMPRESSION" ] +} +if (cppgc_enable_2gb_cage) { + enabled_external_cppgc_defines += [ "CPPGC_2GB_CAGE" ] +} disabled_external_cppgc_defines = external_cppgc_defines - enabled_external_cppgc_defines @@ -909,6 +951,12 @@ config("features") { if (v8_enable_conservative_stack_scanning) { defines += [ "V8_ENABLE_CONSERVATIVE_STACK_SCANNING" ] } + if (v8_enable_inner_pointer_resolution_osb) { + defines += [ "V8_ENABLE_INNER_POINTER_RESOLUTION_OSB" ] + } + if (v8_enable_inner_pointer_resolution_mb) { + defines += [ "V8_ENABLE_INNER_POINTER_RESOLUTION_MB" ] + } if (v8_disable_write_barriers) { defines += [ "V8_DISABLE_WRITE_BARRIERS" ] } @@ -972,6 +1020,9 @@ config("features") { if (v8_enable_system_instrumentation) { defines += [ "V8_ENABLE_SYSTEM_INSTRUMENTATION" ] } + if (v8_enable_etw_stack_walking) { + defines += [ "V8_ENABLE_ETW_STACK_WALKING" ] + } if (v8_etw_guid != "") { defines += [ "V8_ETW_GUID=\"$v8_etw_guid\"" ] } @@ -999,6 +1050,15 @@ config("features") { if (v8_fuchsia_use_vmex_resource) { defines += [ "V8_USE_VMEX_RESOURCE" ] } + if (v8_expose_memory_corruption_api) { + defines += [ "V8_EXPOSE_MEMORY_CORRUPTION_API" ] + } + if (v8_enable_pointer_compression_8gb) { + defines += [ "V8_COMPRESS_POINTERS_8GB" ] + } + if (v8_use_zlib) { + defines += [ "V8_USE_ZLIB" ] + } } config("toolchain") { @@ -1057,49 +1117,11 @@ config("toolchain") { } } - # Mips64el/mipsel simulators. - if (target_is_simulator && - (v8_current_cpu == "mipsel" || v8_current_cpu == "mips64el")) { + # Mips64el simulators. + if (target_is_simulator && v8_current_cpu == "mips64el") { defines += [ "_MIPS_TARGET_SIMULATOR" ] } - if (v8_current_cpu == "mipsel" || v8_current_cpu == "mips") { - defines += [ "V8_TARGET_ARCH_MIPS" ] - if (v8_can_use_fpu_instructions) { - defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] - } - if (v8_use_mips_abi_hardfloat) { - defines += [ - "__mips_hard_float=1", - "CAN_USE_FPU_INSTRUCTIONS", - ] - } else { - defines += [ "__mips_soft_float=1" ] - } - if (mips_arch_variant == "r6") { - defines += [ - "_MIPS_ARCH_MIPS32R6", - "FPU_MODE_FP64", - ] - if (mips_use_msa) { - defines += [ "_MIPS_MSA" ] - } - } else if (mips_arch_variant == "r2") { - defines += [ "_MIPS_ARCH_MIPS32R2" ] - if (mips_fpu_mode == "fp64") { - defines += [ "FPU_MODE_FP64" ] - } else if (mips_fpu_mode == "fpxx") { - defines += [ "FPU_MODE_FPXX" ] - } else if (mips_fpu_mode == "fp32") { - defines += [ "FPU_MODE_FP32" ] - } - } else if (mips_arch_variant == "r1") { - defines += [ "FPU_MODE_FP32" ] - } - - # TODO(infra): Add support for mips_arch_variant rx and loongson. - } - if (v8_current_cpu == "mips64el" || v8_current_cpu == "mips64") { defines += [ "V8_TARGET_ARCH_MIPS64" ] if (v8_can_use_fpu_instructions) { @@ -1176,14 +1198,21 @@ config("toolchain") { if (v8_current_cpu == "riscv64") { defines += [ "V8_TARGET_ARCH_RISCV64" ] defines += [ "__riscv_xlen=64" ] - - #FIXME: Temporarily use MIPS macro for the building. defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] + if (!is_clang) { + cflags += [ "-ffp-contract=off" ] + } if (target_is_simulator) { defines += [ "CAN_USE_RVV_INSTRUCTIONS" ] } } + if (v8_current_cpu == "riscv32") { + defines += [ "V8_TARGET_ARCH_RISCV32" ] + defines += [ "__riscv_xlen=32" ] + defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] + } + if (v8_current_cpu == "x86") { defines += [ "V8_TARGET_ARCH_IA32" ] if (is_win) { @@ -1266,16 +1295,17 @@ config("toolchain") { if (is_clang) { cflags += [ "-Wmissing-field-initializers", + "-Wunreachable-code", + + # Google3 enables this warning, so we should also enable it to find issue + # earlier. See https://reviews.llvm.org/D56731 for details about this + # warning. + "-Wctad-maybe-unsupported", # TODO(v8:12245): Fix shadowing instances and remove. "-Wno-shadow", ] - if (v8_current_cpu != "mips" && v8_current_cpu != "mipsel") { - # We exclude MIPS because the IsMipsArchVariant macro causes trouble. - cflags += [ "-Wunreachable-code" ] - } - if (v8_current_cpu == "x64" || v8_current_cpu == "arm64" || v8_current_cpu == "mips64el" || v8_current_cpu == "riscv64") { cflags += [ "-Wshorten-64-to-32" ] @@ -1470,7 +1500,7 @@ config("toolchain") { # For code that is hot during mksnapshot. In fast-mksnapshot builds, we # optimize some files even in debug builds to speed up mksnapshot times. -config("always_optimize") { +config("always_turbofanimize") { configs = [ ":internal_config" ] # TODO(crbug.com/621335) Rework this so that we don't have the confusion @@ -1488,6 +1518,10 @@ config("v8_gcov_coverage_cflags") { cflags = [ "-fprofile-arcs", "-ftest-coverage", + + # We already block on gcc warnings on other bots. Let's not block here to + # always generate coverage reports. + "-Wno-error", ] } @@ -1531,8 +1565,7 @@ if (is_android && enable_java_templates) { if (v8_use_external_startup_data) { deps = [ "//v8" ] renaming_sources = [ "$root_out_dir/snapshot_blob.bin" ] - if (current_cpu == "arm" || current_cpu == "x86" || - current_cpu == "mipsel") { + if (current_cpu == "arm" || current_cpu == "x86") { renaming_destinations = [ "snapshot_blob_32.bin" ] } else { renaming_destinations = [ "snapshot_blob_64.bin" ] @@ -1653,7 +1686,11 @@ torque_files = [ "src/builtins/array-slice.tq", "src/builtins/array-some.tq", "src/builtins/array-splice.tq", + "src/builtins/array-to-reversed.tq", + "src/builtins/array-to-sorted.tq", + "src/builtins/array-to-spliced.tq", "src/builtins/array-unshift.tq", + "src/builtins/array-with.tq", "src/builtins/array.tq", "src/builtins/arraybuffer.tq", "src/builtins/base.tq", @@ -1752,7 +1789,9 @@ torque_files = [ "src/builtins/typed-array-some.tq", "src/builtins/typed-array-sort.tq", "src/builtins/typed-array-subarray.tq", + "src/builtins/typed-array-to-reversed.tq", "src/builtins/typed-array-values.tq", + "src/builtins/typed-array-with.tq", "src/builtins/typed-array.tq", "src/builtins/weak-ref.tq", "src/ic/handler-configuration.tq", @@ -1777,6 +1816,7 @@ torque_files = [ "src/objects/heap-object.tq", "src/objects/js-array-buffer.tq", "src/objects/js-array.tq", + "src/objects/js-atomics-synchronization.tq", "src/objects/js-collection-iterator.tq", "src/objects/js-collection.tq", "src/objects/js-function.tq", @@ -1786,7 +1826,8 @@ torque_files = [ "src/objects/js-proxy.tq", "src/objects/js-regexp-string-iterator.tq", "src/objects/js-regexp.tq", - "src/objects/js-shadow-realms.tq", + "src/objects/js-shadow-realm.tq", + "src/objects/js-shared-array.tq", "src/objects/js-struct.tq", "src/objects/js-temporal-objects.tq", "src/objects/js-weak-refs.tq", @@ -2113,7 +2154,7 @@ template("run_mksnapshot") { if (v8_builtins_profiling_log_file != "") { sources += [ v8_builtins_profiling_log_file ] args += [ - "--turbo-profiling-log-file", + "--turbo-profiling-input", rebase_path(v8_builtins_profiling_log_file, root_build_dir), ] } @@ -2182,10 +2223,11 @@ template("run_mksnapshot") { } if (v8_enable_fast_mksnapshot) { - args += [ - "--no-turbo-rewrite-far-jumps", - "--no-turbo-verify-allocation", - ] + args += [ "--no-turbo-verify-allocation" ] + + if (v8_current_cpu == "x86" || v8_current_cpu == "x64") { + args += [ "--no-turbo-rewrite-far-jumps" ] + } if (v8_enable_debugging_features && v8_enable_slow_dchecks) { # mksnapshot only accepts this flag if ENABLE_SLOW_DCHECKS is defined. @@ -2253,8 +2295,7 @@ action("v8_dump_build_config") { "v8_enable_cet_shadow_stack=$v8_enable_cet_shadow_stack", ] - if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" || - v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { + if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { args += [ "mips_arch_variant=\"$mips_arch_variant\"", "mips_use_msa=$mips_use_msa", @@ -2365,7 +2406,7 @@ v8_source_set("v8_initializers") { "src/builtins/builtins-proxy-gen.h", "src/builtins/builtins-regexp-gen.cc", "src/builtins/builtins-regexp-gen.h", - "src/builtins/builtins-shadowrealm-gen.cc", + "src/builtins/builtins-shadow-realm-gen.cc", "src/builtins/builtins-sharedarraybuffer-gen.cc", "src/builtins/builtins-string-gen.cc", "src/builtins/builtins-string-gen.h", @@ -2427,11 +2468,6 @@ v8_source_set("v8_initializers") { ### gcmole(arch:arm64) ### "src/builtins/arm64/builtins-arm64.cc", ] - } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") { - sources += [ - ### gcmole(arch:mipsel) ### - "src/builtins/mips/builtins-mips.cc", - ] } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { sources += [ ### gcmole(arch:mips64el) ### @@ -2460,7 +2496,12 @@ v8_source_set("v8_initializers") { } else if (v8_current_cpu == "riscv64") { sources += [ ### gcmole(arch:riscv64) ### - "src/builtins/riscv64/builtins-riscv64.cc", + "src/builtins/riscv/builtins-riscv.cc", + ] + } else if (v8_current_cpu == "riscv32") { + sources += [ + ### gcmole(arch:riscv32) ### + "src/builtins/riscv/builtins-riscv.cc", ] } @@ -2652,7 +2693,10 @@ v8_header_set("v8_flags") { "src/flags/flags.h", ] - deps = [ ":v8_shared_internal_headers" ] + deps = [ + ":v8_libbase", + ":v8_shared_internal_headers", + ] } v8_header_set("v8_internal_headers") { @@ -2706,6 +2750,7 @@ v8_header_set("v8_internal_headers") { "src/codegen/assembler-inl.h", "src/codegen/assembler.h", "src/codegen/atomic-memory-order.h", + "src/codegen/background-merge-task.h", "src/codegen/bailout-reason.h", "src/codegen/callable.h", "src/codegen/code-comments.h", @@ -2728,6 +2773,7 @@ v8_header_set("v8_internal_headers") { "src/codegen/machine-type.h", "src/codegen/macro-assembler-inl.h", "src/codegen/macro-assembler.h", + "src/codegen/maglev-safepoint-table.h", "src/codegen/optimized-compilation-info.h", "src/codegen/pending-optimization-table.h", "src/codegen/register-arch.h", @@ -2737,19 +2783,20 @@ v8_header_set("v8_internal_headers") { "src/codegen/reglist-base.h", "src/codegen/reglist.h", "src/codegen/reloc-info.h", + "src/codegen/safepoint-table-base.h", "src/codegen/safepoint-table.h", "src/codegen/script-details.h", "src/codegen/signature.h", "src/codegen/source-position-table.h", "src/codegen/source-position.h", - "src/codegen/string-constants.h", "src/codegen/tick-counter.h", "src/codegen/tnode.h", "src/codegen/turbo-assembler.h", "src/codegen/unoptimized-compilation-info.h", - "src/common/allow-deprecated.h", "src/common/assert-scope.h", "src/common/checks.h", + "src/common/code-memory-access-inl.h", + "src/common/code-memory-access.h", "src/common/high-allocation-throughput-scope.h", "src/common/message-template.h", "src/common/operation.h", @@ -2796,6 +2843,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/constant-folding-reducer.h", "src/compiler/control-equivalence.h", "src/compiler/control-flow-optimizer.h", + "src/compiler/control-path-state.h", "src/compiler/csa-load-elimination.h", "src/compiler/dead-code-elimination.h", "src/compiler/decompression-optimizer.h", @@ -2829,6 +2877,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/js-operator.h", "src/compiler/js-type-hint-lowering.h", "src/compiler/js-typed-lowering.h", + "src/compiler/late-escape-analysis.h", "src/compiler/linkage.h", "src/compiler/load-elimination.h", "src/compiler/loop-analysis.h", @@ -2874,6 +2923,19 @@ v8_header_set("v8_internal_headers") { "src/compiler/simplified-operator.h", "src/compiler/state-values-utils.h", "src/compiler/store-store-elimination.h", + "src/compiler/turboshaft/assembler.h", + "src/compiler/turboshaft/decompression-optimization.h", + "src/compiler/turboshaft/deopt-data.h", + "src/compiler/turboshaft/fast-hash.h", + "src/compiler/turboshaft/graph-builder.h", + "src/compiler/turboshaft/graph-visualizer.h", + "src/compiler/turboshaft/graph.h", + "src/compiler/turboshaft/operations.h", + "src/compiler/turboshaft/optimization-phase.h", + "src/compiler/turboshaft/recreate-schedule.h", + "src/compiler/turboshaft/sidetable.h", + "src/compiler/turboshaft/utils.h", + "src/compiler/turboshaft/value-numbering-assembler.h", "src/compiler/type-cache.h", "src/compiler/type-narrowing-reducer.h", "src/compiler/typed-optimization.h", @@ -2897,6 +2959,7 @@ v8_header_set("v8_internal_headers") { "src/debug/debug-type-profile.h", "src/debug/debug.h", "src/debug/interface-types.h", + "src/debug/liveedit-diff.h", "src/debug/liveedit.h", "src/deoptimizer/deoptimize-reason.h", "src/deoptimizer/deoptimized-frame-info.h", @@ -2963,6 +3026,7 @@ v8_header_set("v8_internal_headers") { "src/handles/maybe-handles-inl.h", "src/handles/maybe-handles.h", "src/handles/persistent-handles.h", + "src/handles/shared-object-conveyor-handles.h", "src/heap/allocation-observer.h", "src/heap/allocation-result.h", "src/heap/allocation-stats.h", @@ -2996,9 +3060,11 @@ v8_header_set("v8_internal_headers") { "src/heap/finalization-registry-cleanup-task.h", "src/heap/free-list-inl.h", "src/heap/free-list.h", + "src/heap/gc-callbacks.h", "src/heap/gc-idle-time-handler.h", "src/heap/gc-tracer-inl.h", "src/heap/gc-tracer.h", + "src/heap/global-handle-marking-visitor.h", "src/heap/heap-allocator-inl.h", "src/heap/heap-allocator.h", "src/heap/heap-controller.h", @@ -3108,8 +3174,8 @@ v8_header_set("v8_internal_headers") { "src/logging/counters-scopes.h", "src/logging/counters.h", "src/logging/local-logger.h", + "src/logging/log-file.h", "src/logging/log-inl.h", - "src/logging/log-utils.h", "src/logging/log.h", "src/logging/metrics.h", "src/logging/runtime-call-stats-scope.h", @@ -3187,6 +3253,8 @@ v8_header_set("v8_internal_headers") { "src/objects/js-array-buffer.h", "src/objects/js-array-inl.h", "src/objects/js-array.h", + "src/objects/js-atomics-synchronization-inl.h", + "src/objects/js-atomics-synchronization.h", "src/objects/js-collection-inl.h", "src/objects/js-collection-iterator-inl.h", "src/objects/js-collection-iterator.h", @@ -3207,8 +3275,10 @@ v8_header_set("v8_internal_headers") { "src/objects/js-regexp.h", "src/objects/js-segments-inl.h", "src/objects/js-segments.h", - "src/objects/js-shadow-realms-inl.h", - "src/objects/js-shadow-realms.h", + "src/objects/js-shadow-realm-inl.h", + "src/objects/js-shadow-realm.h", + "src/objects/js-shared-array-inl.h", + "src/objects/js-shared-array.h", "src/objects/js-struct-inl.h", "src/objects/js-struct.h", "src/objects/js-temporal-objects-inl.h", @@ -3251,8 +3321,6 @@ v8_header_set("v8_internal_headers") { "src/objects/option-utils.h", "src/objects/ordered-hash-table-inl.h", "src/objects/ordered-hash-table.h", - "src/objects/osr-optimized-code-cache-inl.h", - "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", @@ -3277,6 +3345,7 @@ v8_header_set("v8_internal_headers") { "src/objects/script.h", "src/objects/shared-function-info-inl.h", "src/objects/shared-function-info.h", + "src/objects/simd.h", "src/objects/slots-atomic-inl.h", "src/objects/slots-inl.h", "src/objects/slots.h", @@ -3285,6 +3354,8 @@ v8_header_set("v8_internal_headers") { "src/objects/source-text-module-inl.h", "src/objects/source-text-module.h", "src/objects/string-comparator.h", + "src/objects/string-forwarding-table-inl.h", + "src/objects/string-forwarding-table.h", "src/objects/string-inl.h", "src/objects/string-set-inl.h", "src/objects/string-set.h", @@ -3391,6 +3462,7 @@ v8_header_set("v8_internal_headers") { "src/sandbox/sandbox.h", "src/sandbox/sandboxed-pointer-inl.h", "src/sandbox/sandboxed-pointer.h", + "src/sandbox/testing.h", "src/snapshot/code-serializer.h", "src/snapshot/context-deserializer.h", "src/snapshot/context-serializer.h", @@ -3408,7 +3480,6 @@ v8_header_set("v8_internal_headers") { "src/snapshot/serializer.h", "src/snapshot/shared-heap-deserializer.h", "src/snapshot/shared-heap-serializer.h", - "src/snapshot/snapshot-compression.h", "src/snapshot/snapshot-data.h", "src/snapshot/snapshot-source-sink.h", "src/snapshot/snapshot-utils.h", @@ -3442,12 +3513,15 @@ v8_header_set("v8_internal_headers") { "src/utils/bit-vector.h", "src/utils/boxed-float.h", "src/utils/detachable-vector.h", + "src/utils/hex-format.h", "src/utils/identity-map.h", "src/utils/locked-queue-inl.h", "src/utils/locked-queue.h", "src/utils/memcopy.h", "src/utils/ostreams.h", "src/utils/scoped-list.h", + "src/utils/sha-256.h", + "src/utils/sparse-bit-vector.h", "src/utils/utils-inl.h", "src/utils/utils.h", "src/utils/version.h", @@ -3468,12 +3542,18 @@ v8_header_set("v8_internal_headers") { "src/zone/zone.h", ] + if (v8_enable_snapshot_compression) { + sources += [ "src/snapshot/snapshot-compression.h" ] + } + if (v8_use_perfetto) { sources -= [ "//base/trace_event/common/trace_event_common.h" ] } if (v8_enable_maglev) { sources += [ + "src/maglev/maglev-assembler-inl.h", + "src/maglev/maglev-assembler.h", "src/maglev/maglev-basic-block.h", "src/maglev/maglev-code-gen-state.h", "src/maglev/maglev-code-generator.h", @@ -3488,6 +3568,7 @@ v8_header_set("v8_internal_headers") { "src/maglev/maglev-graph-verifier.h", "src/maglev/maglev-graph.h", "src/maglev/maglev-interpreter-frame-state.h", + "src/maglev/maglev-ir-inl.h", "src/maglev/maglev-ir.h", "src/maglev/maglev-regalloc-data.h", "src/maglev/maglev-regalloc.h", @@ -3505,14 +3586,21 @@ v8_header_set("v8_internal_headers") { "src/asmjs/asm-scanner.h", "src/asmjs/asm-types.h", "src/compiler/int64-lowering.h", + "src/compiler/wasm-compiler-definitions.h", "src/compiler/wasm-compiler.h", "src/compiler/wasm-escape-analysis.h", + "src/compiler/wasm-gc-lowering.h", + "src/compiler/wasm-gc-operator-reducer.h", + "src/compiler/wasm-graph-assembler.h", "src/compiler/wasm-inlining.h", "src/compiler/wasm-loop-peeling.h", + "src/compiler/wasm-typer.h", "src/debug/debug-wasm-objects-inl.h", "src/debug/debug-wasm-objects.h", + "src/third_party/utf8-decoder/generalized-utf8-decoder.h", "src/trap-handler/trap-handler-internal.h", "src/trap-handler/trap-handler.h", + "src/wasm/assembler-buffer-cache.h", "src/wasm/baseline/liftoff-assembler-defs.h", "src/wasm/baseline/liftoff-assembler.h", "src/wasm/baseline/liftoff-compiler.h", @@ -3520,29 +3608,36 @@ v8_header_set("v8_internal_headers") { "src/wasm/canonical-types.h", "src/wasm/code-space-access.h", "src/wasm/compilation-environment.h", + "src/wasm/constant-expression-interface.h", + "src/wasm/constant-expression.h", "src/wasm/decoder.h", "src/wasm/function-body-decoder-impl.h", "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", - "src/wasm/memory-protection-key.h", "src/wasm/memory-tracing.h", "src/wasm/module-compiler.h", + "src/wasm/module-decoder-impl.h", "src/wasm/module-decoder.h", "src/wasm/module-instantiate.h", + "src/wasm/names-provider.h", "src/wasm/object-access.h", "src/wasm/signature-map.h", "src/wasm/simd-shuffle.h", "src/wasm/stacks.h", "src/wasm/streaming-decoder.h", + "src/wasm/string-builder-multiline.h", + "src/wasm/string-builder.h", "src/wasm/struct-types.h", "src/wasm/value-type.h", "src/wasm/wasm-arguments.h", "src/wasm/wasm-code-manager.h", + "src/wasm/wasm-debug.h", + "src/wasm/wasm-disassembler-impl.h", + "src/wasm/wasm-disassembler.h", "src/wasm/wasm-engine.h", "src/wasm/wasm-external-refs.h", "src/wasm/wasm-feature-flags.h", @@ -3566,6 +3661,10 @@ v8_header_set("v8_internal_headers") { ] } + if (v8_enable_wasm_simd256_revec) { + sources += [ "src/compiler/linear-scheduler.h" ] + } + if (!v8_enable_third_party_heap) { sources += filter_include(v8_third_party_heap_files, [ "*.h" ]) } else { @@ -3607,8 +3706,12 @@ v8_header_set("v8_internal_headers") { } if (v8_enable_conservative_stack_scanning) { + sources += [ "src/heap/conservative-stack-visitor.h" ] + } + + if (v8_enable_inner_pointer_resolution_osb) { sources += [ - "src/heap/conservative-stack-visitor.h", + "src/heap/object-start-bitmap-inl.h", "src/heap/object-start-bitmap.h", ] } @@ -3744,22 +3847,6 @@ v8_header_set("v8_internal_headers") { if (is_win) { sources += [ "src/diagnostics/unwinding-info-win64.h" ] } - } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") { - sources += [ ### gcmole(arch:mipsel) ### - "src/baseline/mips/baseline-assembler-mips-inl.h", - "src/baseline/mips/baseline-compiler-mips-inl.h", - "src/codegen/mips/assembler-mips-inl.h", - "src/codegen/mips/assembler-mips.h", - "src/codegen/mips/constants-mips.h", - "src/codegen/mips/macro-assembler-mips.h", - "src/codegen/mips/register-mips.h", - "src/codegen/mips/reglist-mips.h", - "src/compiler/backend/mips/instruction-codes-mips.h", - "src/execution/mips/frame-constants-mips.h", - "src/execution/mips/simulator-mips.h", - "src/regexp/mips/regexp-macro-assembler-mips.h", - "src/wasm/baseline/mips/liftoff-assembler-mips.h", - ] } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { sources += [ ### gcmole(arch:mips64el) ### "src/baseline/mips64/baseline-assembler-mips64-inl.h", @@ -3846,20 +3933,81 @@ v8_header_set("v8_internal_headers") { ] } else if (v8_current_cpu == "riscv64") { sources += [ ### gcmole(arch:riscv64) ### - "src/baseline/riscv64/baseline-assembler-riscv64-inl.h", - "src/baseline/riscv64/baseline-compiler-riscv64-inl.h", - "src/codegen/riscv64/assembler-riscv64-inl.h", - "src/codegen/riscv64/assembler-riscv64.h", - "src/codegen/riscv64/constants-riscv64.h", - "src/codegen/riscv64/macro-assembler-riscv64.h", - "src/codegen/riscv64/register-riscv64.h", - "src/codegen/riscv64/reglist-riscv64.h", - "src/compiler/backend/riscv64/instruction-codes-riscv64.h", - "src/execution/riscv64/frame-constants-riscv64.h", - "src/execution/riscv64/simulator-riscv64.h", - "src/regexp/riscv64/regexp-macro-assembler-riscv64.h", + "src/baseline/riscv/baseline-assembler-riscv-inl.h", + "src/baseline/riscv/baseline-compiler-riscv-inl.h", + "src/codegen/riscv/assembler-riscv-inl.h", + "src/codegen/riscv/assembler-riscv-inl.h", + "src/codegen/riscv/assembler-riscv.h", + "src/codegen/riscv/base-assembler-riscv.h", + "src/codegen/riscv/base-constants-riscv.h", + "src/codegen/riscv/base-riscv-i.h", + "src/codegen/riscv/base-riscv-i.h", + "src/codegen/riscv/constant-riscv-a.h", + "src/codegen/riscv/constant-riscv-c.h", + "src/codegen/riscv/constant-riscv-d.h", + "src/codegen/riscv/constant-riscv-f.h", + "src/codegen/riscv/constant-riscv-m.h", + "src/codegen/riscv/constant-riscv-v.h", + "src/codegen/riscv/constant-riscv-zicsr.h", + "src/codegen/riscv/constant-riscv-zifencei.h", + "src/codegen/riscv/constants-riscv.h", + "src/codegen/riscv/extension-riscv-a.h", + "src/codegen/riscv/extension-riscv-c.h", + "src/codegen/riscv/extension-riscv-d.h", + "src/codegen/riscv/extension-riscv-d.h", + "src/codegen/riscv/extension-riscv-inl.h", + "src/codegen/riscv/extension-riscv-m.h", + "src/codegen/riscv/extension-riscv-v.h", + "src/codegen/riscv/extension-riscv-zicsr.h", + "src/codegen/riscv/extension-riscv-zifencei.h", + "src/codegen/riscv/interface-descriptors-riscv-inl.h", + "src/codegen/riscv/macro-assembler-riscv.h", + "src/codegen/riscv/register-riscv.h", + "src/codegen/riscv/reglist-riscv.h", + "src/compiler/backend/riscv/instruction-codes-riscv.h", + "src/execution/riscv/frame-constants-riscv.h", + "src/execution/riscv/simulator-riscv.h", + "src/regexp/riscv/regexp-macro-assembler-riscv.h", "src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h", ] + } else if (v8_current_cpu == "riscv32") { + sources += [ ### gcmole(arch:riscv32) ### + "src/baseline/riscv/baseline-assembler-riscv-inl.h", + "src/baseline/riscv/baseline-compiler-riscv-inl.h", + "src/codegen/riscv/assembler-riscv.h", + "src/codegen/riscv/assembler-riscv32-inl.h", + "src/codegen/riscv/base-assembler-riscv.h", + "src/codegen/riscv/base-constants-riscv.h", + "src/codegen/riscv/base-riscv-i.h", + "src/codegen/riscv/constant-riscv-a.h", + "src/codegen/riscv/constant-riscv-c.h", + "src/codegen/riscv/constant-riscv-d.h", + "src/codegen/riscv/constant-riscv-f.h", + "src/codegen/riscv/constant-riscv-i.h", + "src/codegen/riscv/constant-riscv-m.h", + "src/codegen/riscv/constant-riscv-v.h", + "src/codegen/riscv/constant-riscv-zicsr.h", + "src/codegen/riscv/constant-riscv-zifencei.h", + "src/codegen/riscv/constants-riscv.h", + "src/codegen/riscv/extension-riscv-a.h", + "src/codegen/riscv/extension-riscv-c.h", + "src/codegen/riscv/extension-riscv-d.h", + "src/codegen/riscv/extension-riscv-f.h", + "src/codegen/riscv/extension-riscv-inl.h", + "src/codegen/riscv/extension-riscv-m.h", + "src/codegen/riscv/extension-riscv-v.h", + "src/codegen/riscv/extension-riscv-zicsr.h", + "src/codegen/riscv/extension-riscv-zifencei.h", + "src/codegen/riscv/interface-descriptors-riscv-inl.h", + "src/codegen/riscv/macro-assembler-riscv.h", + "src/codegen/riscv/register-riscv.h", + "src/codegen/riscv/reglist-riscv.h", + "src/compiler/backend/riscv/instruction-codes-riscv.h", + "src/execution/riscv/frame-constants-riscv.h", + "src/execution/riscv/simulator-riscv.h", + "src/regexp/riscv/regexp-macro-assembler-riscv.h", + "src/wasm/baseline/riscv32/liftoff-assembler-riscv32.h", + ] } public_deps = [ @@ -3943,6 +4091,7 @@ v8_compiler_sources = [ "src/compiler/js-operator.cc", "src/compiler/js-type-hint-lowering.cc", "src/compiler/js-typed-lowering.cc", + "src/compiler/late-escape-analysis.cc", "src/compiler/linkage.cc", "src/compiler/load-elimination.cc", "src/compiler/loop-analysis.cc", @@ -3991,6 +4140,8 @@ v8_compiler_sources = [ "src/compiler/value-numbering-reducer.cc", "src/compiler/verifier.cc", "src/compiler/zone-stats.cc", + "src/utils/hex-format.cc", + "src/utils/sha-256.cc", ] if (v8_enable_webassembly) { @@ -3998,11 +4149,19 @@ if (v8_enable_webassembly) { "src/compiler/int64-lowering.cc", "src/compiler/wasm-compiler.cc", "src/compiler/wasm-escape-analysis.cc", + "src/compiler/wasm-gc-lowering.cc", + "src/compiler/wasm-gc-operator-reducer.cc", + "src/compiler/wasm-graph-assembler.cc", "src/compiler/wasm-inlining.cc", "src/compiler/wasm-loop-peeling.cc", + "src/compiler/wasm-typer.cc", ] } +if (v8_enable_wasm_simd256_revec) { + v8_compiler_sources += [ "src/compiler/linear-scheduler.cc" ] +} + # The src/compiler files with optimizations. v8_source_set("v8_compiler_opt") { visibility = [ ":*" ] # Only targets in this file can depend on this. @@ -4026,7 +4185,7 @@ v8_source_set("v8_compiler_opt") { if (is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot) { # The :no_optimize config is added to v8_add_configs in v8.gni. remove_configs = [ "//build/config/compiler:no_optimize" ] - configs = [ ":always_optimize" ] + configs = [ ":always_turbofanimize" ] } else { # Without this else branch, gn fails to generate build files for non-debug # builds (because we try to remove a config that is not present). @@ -4058,6 +4217,37 @@ v8_source_set("v8_compiler") { configs = [ ":internal_config" ] } +# The src/compiler files with default optimization behavior. +v8_source_set("v8_turboshaft") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + sources = [ + "src/compiler/turboshaft/decompression-optimization.cc", + "src/compiler/turboshaft/graph-builder.cc", + "src/compiler/turboshaft/graph-visualizer.cc", + "src/compiler/turboshaft/graph.cc", + "src/compiler/turboshaft/operations.cc", + "src/compiler/turboshaft/optimization-phase.cc", + "src/compiler/turboshaft/recreate-schedule.cc", + ] + + public_deps = [ + ":generate_bytecode_builtins_list", + ":run_torque", + ":v8_internal_headers", + ":v8_maybe_icu", + ":v8_tracing", + ] + + deps = [ + ":v8_base_without_compiler", + ":v8_libbase", + ":v8_shared_internal_headers", + ] + + configs = [ ":internal_config" ] +} + group("v8_compiler_for_mksnapshot") { if (is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot) { deps = [ ":v8_compiler_opt" ] @@ -4106,6 +4296,7 @@ v8_source_set("v8_base_without_compiler") { "src/builtins/builtins-array.cc", "src/builtins/builtins-arraybuffer.cc", "src/builtins/builtins-async-module.cc", + "src/builtins/builtins-atomics-synchronization.cc", "src/builtins/builtins-bigint.cc", "src/builtins/builtins-callsite.cc", "src/builtins/builtins-collections.cc", @@ -4122,7 +4313,8 @@ v8_source_set("v8_base_without_compiler") { "src/builtins/builtins-object.cc", "src/builtins/builtins-reflect.cc", "src/builtins/builtins-regexp.cc", - "src/builtins/builtins-shadow-realms.cc", + "src/builtins/builtins-shadow-realm.cc", + "src/builtins/builtins-shared-array.cc", "src/builtins/builtins-sharedarraybuffer.cc", "src/builtins/builtins-string.cc", "src/builtins/builtins-struct.cc", @@ -4131,6 +4323,7 @@ v8_source_set("v8_base_without_compiler") { "src/builtins/builtins-trace.cc", "src/builtins/builtins-typed-array.cc", "src/builtins/builtins-weak-refs.cc", + "src/builtins/builtins-web-snapshots.cc", "src/builtins/builtins.cc", "src/builtins/constants-table-builder.cc", "src/codegen/aligned-slot-allocator.cc", @@ -4150,6 +4343,7 @@ v8_source_set("v8_base_without_compiler") { "src/codegen/handler-table.cc", "src/codegen/interface-descriptors.cc", "src/codegen/machine-type.cc", + "src/codegen/maglev-safepoint-table.cc", "src/codegen/optimized-compilation-info.cc", "src/codegen/pending-optimization-table.cc", "src/codegen/register-configuration.cc", @@ -4157,12 +4351,12 @@ v8_source_set("v8_base_without_compiler") { "src/codegen/safepoint-table.cc", "src/codegen/source-position-table.cc", "src/codegen/source-position.cc", - "src/codegen/string-constants.cc", "src/codegen/tick-counter.cc", "src/codegen/tnode.cc", "src/codegen/turbo-assembler.cc", "src/codegen/unoptimized-compilation-info.cc", "src/common/assert-scope.cc", + "src/common/code-memory-access.cc", "src/compiler-dispatcher/lazy-compile-dispatcher.cc", "src/compiler-dispatcher/optimizing-compile-dispatcher.cc", "src/date/date.cc", @@ -4177,6 +4371,7 @@ v8_source_set("v8_base_without_compiler") { "src/debug/debug-stack-trace-iterator.cc", "src/debug/debug-type-profile.cc", "src/debug/debug.cc", + "src/debug/liveedit-diff.cc", "src/debug/liveedit.cc", "src/deoptimizer/deoptimize-reason.cc", "src/deoptimizer/deoptimized-frame-info.cc", @@ -4223,6 +4418,7 @@ v8_source_set("v8_base_without_compiler") { "src/handles/handles.cc", "src/handles/local-handles.cc", "src/handles/persistent-handles.cc", + "src/handles/shared-object-conveyor-handles.cc", "src/heap/allocation-observer.cc", "src/heap/array-buffer-sweeper.cc", "src/heap/base-space.cc", @@ -4246,9 +4442,11 @@ v8_source_set("v8_base_without_compiler") { "src/heap/free-list.cc", "src/heap/gc-idle-time-handler.cc", "src/heap/gc-tracer.cc", + "src/heap/global-handle-marking-visitor.cc", "src/heap/heap-allocator.cc", "src/heap/heap-controller.cc", "src/heap/heap-layout-tracer.cc", + "src/heap/heap-verifier.cc", "src/heap/heap-write-barrier.cc", "src/heap/heap.cc", "src/heap/incremental-marking-job.cc", @@ -4316,7 +4514,7 @@ v8_source_set("v8_base_without_compiler") { "src/libsampler/sampler.cc", "src/logging/counters.cc", "src/logging/local-logger.cc", - "src/logging/log-utils.cc", + "src/logging/log-file.cc", "src/logging/log.cc", "src/logging/metrics.cc", "src/logging/runtime-call-stats.cc", @@ -4338,6 +4536,7 @@ v8_source_set("v8_base_without_compiler") { "src/objects/field-type.cc", "src/objects/intl-objects.cc", "src/objects/js-array-buffer.cc", + "src/objects/js-atomics-synchronization.cc", "src/objects/js-break-iterator.cc", "src/objects/js-collator.cc", "src/objects/js-date-time-format.cc", @@ -4366,13 +4565,14 @@ v8_source_set("v8_base_without_compiler") { "src/objects/objects.cc", "src/objects/option-utils.cc", "src/objects/ordered-hash-table.cc", - "src/objects/osr-optimized-code-cache.cc", "src/objects/property-descriptor.cc", "src/objects/property.cc", "src/objects/scope-info.cc", "src/objects/shared-function-info.cc", + "src/objects/simd.cc", "src/objects/source-text-module.cc", "src/objects/string-comparator.cc", + "src/objects/string-forwarding-table.cc", "src/objects/string-table.cc", "src/objects/string.cc", "src/objects/swiss-name-dictionary.cc", @@ -4458,6 +4658,7 @@ v8_source_set("v8_base_without_compiler") { "src/runtime/runtime-shadow-realm.cc", "src/runtime/runtime-strings.cc", "src/runtime/runtime-symbol.cc", + "src/runtime/runtime-temporal.cc", "src/runtime/runtime-test.cc", "src/runtime/runtime-trace.cc", "src/runtime/runtime-typedarray.cc", @@ -4465,6 +4666,7 @@ v8_source_set("v8_base_without_compiler") { "src/runtime/runtime.cc", "src/sandbox/external-pointer-table.cc", "src/sandbox/sandbox.cc", + "src/sandbox/testing.cc", "src/snapshot/code-serializer.cc", "src/snapshot/context-deserializer.cc", "src/snapshot/context-serializer.cc", @@ -4478,7 +4680,6 @@ v8_source_set("v8_base_without_compiler") { "src/snapshot/serializer.cc", "src/snapshot/shared-heap-deserializer.cc", "src/snapshot/shared-heap-serializer.cc", - "src/snapshot/snapshot-compression.cc", "src/snapshot/snapshot-data.cc", "src/snapshot/snapshot-source-sink.cc", "src/snapshot/snapshot-utils.cc", @@ -4517,6 +4718,10 @@ v8_source_set("v8_base_without_compiler") { "src/zone/zone.cc", ] + if (v8_enable_snapshot_compression) { + sources += [ "src/snapshot/snapshot-compression.cc" ] + } + if (v8_enable_maglev) { sources += [ "src/maglev/maglev-code-generator.cc", @@ -4526,6 +4731,7 @@ v8_source_set("v8_base_without_compiler") { "src/maglev/maglev-concurrent-dispatcher.cc", "src/maglev/maglev-graph-builder.cc", "src/maglev/maglev-graph-printer.cc", + "src/maglev/maglev-interpreter-frame-state.cc", "src/maglev/maglev-ir.cc", "src/maglev/maglev-regalloc.cc", "src/maglev/maglev.cc", @@ -4544,29 +4750,32 @@ v8_source_set("v8_base_without_compiler") { "src/trap-handler/handler-inside.cc", "src/trap-handler/handler-outside.cc", "src/trap-handler/handler-shared.cc", + "src/wasm/assembler-buffer-cache.cc", "src/wasm/baseline/liftoff-assembler.cc", "src/wasm/baseline/liftoff-compiler.cc", "src/wasm/canonical-types.cc", "src/wasm/code-space-access.cc", + "src/wasm/constant-expression-interface.cc", + "src/wasm/constant-expression.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", "src/wasm/memory-tracing.cc", "src/wasm/module-compiler.cc", "src/wasm/module-decoder.cc", "src/wasm/module-instantiate.cc", + "src/wasm/names-provider.cc", "src/wasm/signature-map.cc", "src/wasm/simd-shuffle.cc", + "src/wasm/stacks.cc", "src/wasm/streaming-decoder.cc", "src/wasm/sync-streaming-decoder.cc", "src/wasm/value-type.cc", "src/wasm/wasm-code-manager.cc", "src/wasm/wasm-debug.cc", - "src/wasm/wasm-debug.h", + "src/wasm/wasm-disassembler.cc", "src/wasm/wasm-engine.cc", "src/wasm/wasm-external-refs.cc", "src/wasm/wasm-features.cc", @@ -4729,23 +4938,6 @@ v8_source_set("v8_base_without_compiler") { if (is_win) { sources += [ "src/diagnostics/unwinding-info-win64.cc" ] } - } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") { - sources += [ ### gcmole(arch:mipsel) ### - "src/codegen/mips/assembler-mips.cc", - "src/codegen/mips/constants-mips.cc", - "src/codegen/mips/cpu-mips.cc", - "src/codegen/mips/interface-descriptors-mips-inl.h", - "src/codegen/mips/macro-assembler-mips.cc", - "src/compiler/backend/mips/code-generator-mips.cc", - "src/compiler/backend/mips/instruction-scheduler-mips.cc", - "src/compiler/backend/mips/instruction-selector-mips.cc", - "src/deoptimizer/mips/deoptimizer-mips.cc", - "src/diagnostics/mips/disasm-mips.cc", - "src/diagnostics/mips/unwinder-mips.cc", - "src/execution/mips/frame-constants-mips.cc", - "src/execution/mips/simulator-mips.cc", - "src/regexp/mips/regexp-macro-assembler-mips.cc", - ] } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { sources += [ ### gcmole(arch:mips64el) ### "src/codegen/mips64/assembler-mips64.cc", @@ -4836,33 +5028,64 @@ v8_source_set("v8_base_without_compiler") { ] } else if (v8_current_cpu == "riscv64") { sources += [ ### gcmole(arch:riscv64) ### - "src/baseline/riscv64/baseline-assembler-riscv64-inl.h", - "src/baseline/riscv64/baseline-compiler-riscv64-inl.h", - "src/codegen/riscv64/assembler-riscv64-inl.h", - "src/codegen/riscv64/assembler-riscv64.cc", - "src/codegen/riscv64/constants-riscv64.cc", - "src/codegen/riscv64/cpu-riscv64.cc", - "src/codegen/riscv64/interface-descriptors-riscv64-inl.h", - "src/codegen/riscv64/macro-assembler-riscv64.cc", - "src/compiler/backend/riscv64/code-generator-riscv64.cc", - "src/compiler/backend/riscv64/instruction-scheduler-riscv64.cc", - "src/compiler/backend/riscv64/instruction-selector-riscv64.cc", - "src/deoptimizer/riscv64/deoptimizer-riscv64.cc", - "src/diagnostics/riscv64/disasm-riscv64.cc", - "src/diagnostics/riscv64/unwinder-riscv64.cc", - "src/execution/riscv64/frame-constants-riscv64.cc", - "src/execution/riscv64/simulator-riscv64.cc", - "src/regexp/riscv64/regexp-macro-assembler-riscv64.cc", + "src/codegen/riscv/assembler-riscv.cc", + "src/codegen/riscv/base-assembler-riscv.cc", + "src/codegen/riscv/base-constants-riscv.cc", + "src/codegen/riscv/base-riscv-i.cc", + "src/codegen/riscv/cpu-riscv.cc", + "src/codegen/riscv/extension-riscv-a.cc", + "src/codegen/riscv/extension-riscv-c.cc", + "src/codegen/riscv/extension-riscv-d.cc", + "src/codegen/riscv/extension-riscv-f.cc", + "src/codegen/riscv/extension-riscv-m.cc", + "src/codegen/riscv/extension-riscv-v.cc", + "src/codegen/riscv/extension-riscv-zicsr.cc", + "src/codegen/riscv/extension-riscv-zifencei.cc", + "src/codegen/riscv/macro-assembler-riscv.cc", + "src/compiler/backend/riscv/code-generator-riscv.cc", + "src/compiler/backend/riscv/instruction-scheduler-riscv.cc", + "src/compiler/backend/riscv/instruction-selector-riscv64.cc", + "src/deoptimizer/riscv/deoptimizer-riscv.cc", + "src/diagnostics/riscv/disasm-riscv.cc", + "src/diagnostics/riscv/unwinder-riscv.cc", + "src/execution/riscv/frame-constants-riscv.cc", + "src/execution/riscv/simulator-riscv.cc", + "src/regexp/riscv/regexp-macro-assembler-riscv.cc", + ] + } else if (v8_current_cpu == "riscv32") { + sources += [ ### gcmole(arch:riscv32) ### + "src/codegen/riscv/assembler-riscv.cc", + "src/codegen/riscv/base-assembler-riscv.cc", + "src/codegen/riscv/base-constants-riscv.cc", + "src/codegen/riscv/base-riscv-i.cc", + "src/codegen/riscv/cpu-riscv.cc", + "src/codegen/riscv/extension-riscv-a.cc", + "src/codegen/riscv/extension-riscv-c.cc", + "src/codegen/riscv/extension-riscv-d.cc", + "src/codegen/riscv/extension-riscv-f.cc", + "src/codegen/riscv/extension-riscv-m.cc", + "src/codegen/riscv/extension-riscv-v.cc", + "src/codegen/riscv/extension-riscv-zicsr.cc", + "src/codegen/riscv/extension-riscv-zifencei.cc", + "src/codegen/riscv/macro-assembler-riscv.cc", + "src/compiler/backend/riscv/code-generator-riscv.cc", + "src/compiler/backend/riscv/instruction-scheduler-riscv.cc", + "src/compiler/backend/riscv/instruction-selector-riscv32.cc", + "src/deoptimizer/riscv/deoptimizer-riscv.cc", + "src/diagnostics/riscv/disasm-riscv.cc", + "src/diagnostics/riscv/unwinder-riscv.cc", + "src/execution/riscv/frame-constants-riscv.cc", + "src/execution/riscv/simulator-riscv.cc", + "src/regexp/riscv/regexp-macro-assembler-riscv.cc", ] } # Architecture independent but platform-specific sources if (is_win) { - if (v8_enable_system_instrumentation) { + if (v8_enable_etw_stack_walking) { sources += [ - "src/diagnostics/system-jit-metadata-win.h", - "src/diagnostics/system-jit-win.cc", - "src/diagnostics/system-jit-win.h", + "src/diagnostics/etw-jit-win.cc", + "src/diagnostics/etw-jit-win.h", ] } } @@ -4920,10 +5143,12 @@ v8_source_set("v8_base_without_compiler") { ] } - deps += [ - "//third_party/zlib", - "//third_party/zlib/google:compression_utils_portable", - ] + if (v8_use_zlib) { + deps += [ + "//third_party/zlib", + "//third_party/zlib/google:compression_utils_portable", + ] + } if (v8_postmortem_support) { sources += [ "$target_gen_dir/debug-support.cc" ] @@ -4938,11 +5163,10 @@ v8_source_set("v8_base_without_compiler") { # Platforms that don't have CAS support need to link atomic library # to implement atomic memory access - if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" || - v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" || + if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" || v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" || v8_current_cpu == "s390" || v8_current_cpu == "s390x" || - v8_current_cpu == "riscv64") { + v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { libs += [ "atomic" ] } @@ -4966,6 +5190,7 @@ group("v8_base") { public_deps = [ ":v8_base_without_compiler", ":v8_compiler", + ":v8_turboshaft", ] } @@ -5057,7 +5282,7 @@ v8_source_set("torque_base") { if (is_debug && !v8_optimized_debug && v8_enable_fast_torque) { # The :no_optimize config is added to v8_add_configs in v8.gni. remove_configs += [ "//build/config/compiler:no_optimize" ] - configs += [ ":always_optimize" ] + configs += [ ":always_turbofanimize" ] } } @@ -5101,7 +5326,6 @@ v8_component("v8_libbase") { "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", @@ -5112,6 +5336,7 @@ v8_component("v8_libbase") { "src/base/bounds.h", "src/base/build_config.h", "src/base/compiler-specific.h", + "src/base/container-utils.h", "src/base/cpu.cc", "src/base/cpu.h", "src/base/debug/stack_trace.cc", @@ -5126,7 +5351,6 @@ v8_component("v8_libbase") { "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", @@ -5165,6 +5389,9 @@ v8_component("v8_libbase") { "src/base/platform/condition-variable.cc", "src/base/platform/condition-variable.h", "src/base/platform/elapsed-timer.h", + "src/base/platform/memory-protection-key.cc", + "src/base/platform/memory-protection-key.h", + "src/base/platform/memory.h", "src/base/platform/mutex.cc", "src/base/platform/mutex.h", "src/base/platform/platform.h", @@ -5190,6 +5417,7 @@ v8_component("v8_libbase") { "src/base/sanitizer/msan.h", "src/base/sanitizer/tsan.h", "src/base/small-vector.h", + "src/base/string-format.h", "src/base/strings.cc", "src/base/strings.h", "src/base/sys-info.cc", @@ -5243,6 +5471,7 @@ v8_component("v8_libbase") { sources += [ "src/base/debug/stack_trace_posix.cc", "src/base/platform/platform-linux.cc", + "src/base/platform/platform-linux.h", ] libs = [ @@ -5317,14 +5546,14 @@ v8_component("v8_libbase") { "ws2_32.lib", ] - if (v8_enable_system_instrumentation) { + if (v8_enable_etw_stack_walking) { libs += [ "advapi32.lib" ] # Needed for TraceLoggingProvider.h } data_deps += [ "//build/win:runtime_libs" ] } - if (v8_current_cpu == "mips" || v8_current_cpu == "mips64") { + if (v8_current_cpu == "mips64") { # Add runtime libs for mips. data += [ "tools/mips_toolchain/sysroot/usr/lib/", @@ -5332,13 +5561,12 @@ v8_component("v8_libbase") { ] } - if (is_ubsan && (v8_current_cpu == "x86" || v8_current_cpu == "arm" || - v8_current_cpu == "mips")) { + if (is_ubsan && (v8_current_cpu == "x86" || v8_current_cpu == "arm")) { # Special UBSan 32-bit requirement. sources += [ "src/base/ubsan.cc" ] } - if (v8_current_cpu == "riscv64") { + if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { libs += [ "atomic" ] } @@ -5427,7 +5655,7 @@ v8_component("v8_libplatform") { } } - if (v8_current_cpu == "riscv64") { + if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { libs = [ "atomic" ] } } @@ -5481,7 +5709,7 @@ v8_source_set("v8_bigint") { configs = [ ":internal_config" ] } -v8_source_set("v8_heap_base_headers") { +v8_header_set("v8_heap_base_headers") { sources = [ "src/heap/base/active-system-pages.h", "src/heap/base/stack.h", @@ -5513,20 +5741,18 @@ v8_source_set("v8_heap_base") { sources += [ "src/heap/base/asm/ppc/push_registers_asm.cc" ] } else if (current_cpu == "s390x") { sources += [ "src/heap/base/asm/s390/push_registers_asm.cc" ] - } else if (current_cpu == "mipsel") { - sources += [ "src/heap/base/asm/mips/push_registers_asm.cc" ] } else if (current_cpu == "mips64el") { sources += [ "src/heap/base/asm/mips64/push_registers_asm.cc" ] } else if (current_cpu == "loong64") { sources += [ "src/heap/base/asm/loong64/push_registers_asm.cc" ] - } else if (current_cpu == "riscv64") { - sources += [ "src/heap/base/asm/riscv64/push_registers_asm.cc" ] + } else if (current_cpu == "riscv64" || current_cpu == "riscv32") { + sources += [ "src/heap/base/asm/riscv/push_registers_asm.cc" ] } } else if (is_win) { if (current_cpu == "x64") { - sources += [ "src/heap/base/asm/x64/push_registers_masm.S" ] + sources += [ "src/heap/base/asm/x64/push_registers_masm.asm" ] } else if (current_cpu == "x86") { - sources += [ "src/heap/base/asm/ia32/push_registers_masm.S" ] + sources += [ "src/heap/base/asm/ia32/push_registers_masm.asm" ] } else if (current_cpu == "arm64") { sources += [ "src/heap/base/asm/arm64/push_registers_masm.S" ] } @@ -5559,14 +5785,17 @@ v8_header_set("cppgc_headers") { "include/cppgc/explicit-management.h", "include/cppgc/garbage-collected.h", "include/cppgc/heap-consistency.h", + "include/cppgc/heap-handle.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/base-page-handle.h", "include/cppgc/internal/compiler-specific.h", "include/cppgc/internal/finalizer-trait.h", "include/cppgc/internal/gc-info.h", + "include/cppgc/internal/member-storage.h", "include/cppgc/internal/name-trait.h", "include/cppgc/internal/persistent-node.h", "include/cppgc/internal/pointer-policies.h", @@ -5593,6 +5822,7 @@ v8_header_set("cppgc_headers") { if (cppgc_enable_caged_heap) { sources += [ "include/cppgc/internal/caged-heap-local-data.h" ] + sources += [ "include/cppgc/internal/caged-heap.h" ] } deps = [ @@ -5656,6 +5886,8 @@ v8_source_set("cppgc_base") { "src/heap/cppgc/marking-visitor.h", "src/heap/cppgc/marking-worklists.cc", "src/heap/cppgc/marking-worklists.h", + "src/heap/cppgc/member-storage.cc", + "src/heap/cppgc/member-storage.h", "src/heap/cppgc/memory.cc", "src/heap/cppgc/memory.h", "src/heap/cppgc/metric-recorder.h", @@ -5874,6 +6106,7 @@ if (current_toolchain == v8_snapshot_toolchain) { ":v8_maybe_icu", ":v8_shared_internal_headers", ":v8_tracing", + ":v8_turboshaft", "//build/win:default_exe_manifest", ] } @@ -6043,6 +6276,14 @@ group("v8_clusterfuzz") { } } +# Targets we ensure work with gcc. The aim is to keep this list small to have +# a fast overall compile time. +group("v8_gcc_light") { + testonly = true + + deps = [ ":d8" ] +} + group("v8_archive") { testonly = true @@ -6057,19 +6298,26 @@ group("v8_archive") { # TODO(dglazkov): Remove the "!build_with_chromium" condition once this clause # is removed from Chromium. if (is_fuchsia && !build_with_chromium) { - import("//build/config/fuchsia/rules.gni") + import("//build/config/fuchsia/generate_runner_scripts.gni") + import("//third_party/fuchsia-sdk/sdk/build/component.gni") + import("//third_party/fuchsia-sdk/sdk/build/package.gni") - cr_fuchsia_package("d8_fuchsia_pkg") { + fuchsia_component("d8_component") { testonly = true - binary = ":d8" - manifest = "gni/v8.cmx" - package_name_override = "d8" + manifest = "gni/v8.cml" + data_deps = [ ":d8" ] } - fuchsia_package_runner("d8_fuchsia") { + fuchsia_package("d8_pkg") { testonly = true - package = ":d8_fuchsia_pkg" - package_name_override = "d8" + package_name = "d8" + deps = [ ":d8_component" ] + } + + fuchsia_package_installer("d8_fuchsia") { + testonly = true + package = ":d8_pkg" + package_name = "d8" } } @@ -6090,6 +6338,7 @@ group("v8_fuzzers") { ":v8_simple_wasm_code_fuzzer", ":v8_simple_wasm_compile_fuzzer", ":v8_simple_wasm_fuzzer", + ":v8_simple_wasm_streaming_fuzzer", ] } } @@ -6311,6 +6560,10 @@ if (want_v8_shell) { ":internal_config_base", ] + if (is_win && !v8_enable_cet_shadow_stack) { + v8_remove_configs += [ "//build/config/compiler:cet_shadow_stack" ] + } + deps = [ ":v8", ":v8_libbase", @@ -6323,7 +6576,7 @@ if (want_v8_shell) { v8_executable("cppgc_hello_world") { sources = [ "samples/cppgc/hello-world.cc" ] - if (v8_current_cpu == "riscv64") { + if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { libs = [ "atomic" ] } @@ -6560,6 +6813,24 @@ if (v8_enable_webassembly) { v8_fuzzer("wasm_compile_fuzzer") { } + + v8_source_set("wasm_streaming_fuzzer") { + sources = [ "test/fuzzer/wasm-streaming.cc" ] + + deps = [ + ":fuzzer_support", + ":lib_wasm_fuzzer_common", + ":wasm_test_common", + ] + + configs = [ + ":external_config", + ":internal_config_base", + ] + } + + v8_fuzzer("wasm_streaming_fuzzer") { + } } v8_source_set("inspector_fuzzer") { diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 54ac85a4bdbb8a..595c243abcc602 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -12,17 +12,20 @@ vars = { # Fetches only the SDK boot images which match at least one of the whitelist # entries in a comma-separated list. # - # Only the X64 and ARM64 QEMU images are downloaded by default. Developers - # that need to boot on other target architectures or devices can opt to - # download more boot images. Example of images include: + # Available images: + # Emulation: + # - qemu.x64 (pulls terminal.qemu-x64-release) + # - qemu.arm64 (pulls terminal.qemu-arm64-release) + # - workstation.qemu-x64-release + # Hardware: + # - generic.x64 (pulls terminal.x64-debug) + # - generic.arm64 (pulls terminal.arm64-debug) + # - chromebook.x64 (pulls terminal.chromebook-x64-debug) # - # Emulation: - # qemu.x64, qemu.arm64 - # Hardware: - # generic.x64, generic.arm64 - # - # Wildcards are supported (e.g. "qemu.*"). - 'checkout_fuchsia_boot_images': "qemu.x64,qemu.arm64", + # Since the images are hundreds of MB, default to only downloading the image + # most commonly useful for developers. Bots and developers that need to use + # other images (e.g., qemu.arm64) can override this with additional images. + 'checkout_fuchsia_boot_images': "qemu.x64", 'checkout_instrumented_libraries': False, 'checkout_ittapi': False, @@ -36,27 +39,35 @@ vars = { 'check_v8_header_includes': False, 'checkout_reclient': False, + # By default, download the fuchsia sdk from the public sdk directory. + 'fuchsia_sdk_cipd_prefix': 'fuchsia/sdk/gn/', + # reclient CIPD package version - 'reclient_version': 're_client_version:0.40.0.40ff5a5', + 'reclient_version': 're_client_version:0.69.0.458df98-gomaip', # GN CIPD package version. - 'gn_version': 'git_revision:ae110f8b525009255ba1f9ae96982176d3bfad3d', + 'gn_version': 'git_revision:b4851eb2062f76a880c07f7fa0d12913beb6d79e', # luci-go CIPD package version. - 'luci_go': 'git_revision:6da0608e4fa8a3c6d1fa4f855485c0038b05bf72', + 'luci_go': 'git_revision:c93fd3c5ebdc3999eea86a7623dbd1ed4b40bc78', + + # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling Fuchsia sdk + # and whatever else without interference from each other. + 'fuchsia_version': 'version:9.20220913.3.1', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_build-tools_version # and whatever else without interference from each other. - 'android_sdk_build-tools_version': 'tRoD45SCi7UleQqSV7MrMQO1_e5P8ysphkCcj6z_cCQC', + 'android_sdk_build-tools_version': '-VRKr36Uw8L_iFqqo9nevIBgNMggND5iWxjidyjnCgsC', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_emulator_version # and whatever else without interference from each other. - 'android_sdk_emulator_version': 'gMHhUuoQRKfxr-MBn3fNNXZtkAVXtOwMwT7kfx8jkIgC', + 'android_sdk_emulator_version': '9lGp8nTUCRRWGMnI_96HcKfzjnxEJKUcfvfwmA3wXNkC', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_extras_version # and whatever else without interference from each other. - 'android_sdk_extras_version': 'ppQ4TnqDvBHQ3lXx5KPq97egzF5X2FFyOrVHkGmiTMQC', + 'android_sdk_extras_version': 'bY55nDqO6FAm6FkGIj09sh2KW9oqAkCGKjYok5nUvBMC', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_patcher_version # and whatever else without interference from each other. @@ -64,39 +75,39 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_platform-tools_version # and whatever else without interference from each other. - 'android_sdk_platform-tools_version': 'g7n_-r6yJd_SGRklujGB1wEt8iyr77FZTUJVS9w6O34C', + 'android_sdk_platform-tools_version': 'RSI3iwryh7URLGRgJHsCvUxj092woTPnKt4pwFcJ6L8C', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_platforms_version # and whatever else without interference from each other. - 'android_sdk_platforms_version': 'lL3IGexKjYlwjO_1Ga-xwxgwbE_w-lmi2Zi1uOlWUIAC', + 'android_sdk_platforms_version': 'eo5KvW6UVor92LwZai8Zulc624BQZoCu-yn7wa1z_YcC', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_sources_version # and whatever else without interference from each other. - 'android_sdk_sources_version': '7EcXjyZWkTu3sCA8d8eRXg_aCBCYt8ihXgxp29VXLs8C', + 'android_sdk_sources_version': 'qfTSF99e29-w3eIVPpfcif0Em5etyvxuicTDTntWHQMC', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_tools-lint_version # and whatever else without interference from each other. - 'android_sdk_cmdline-tools_version': 'PGPmqJtSIQ84If155ba7iTU846h5WJ-bL5d_OoUWEWYC', + 'android_sdk_cmdline-tools_version': 'IPzAG-uU5zVMxohpg9-7-N0tQC1TCSW1VbrBFw7Ld04C', } deps = { 'base/trace_event/common': - Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + 'd115b033c4e53666b535cbd1985ffe60badad082', + Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + '521ac34ebd795939c7e16b37d9d3ddb40e8ed556', 'build': - Var('chromium_url') + '/chromium/src/build.git' + '@' + 'b37c340767cf9e7777d4ca5a588c34c5744df9b2', + Var('chromium_url') + '/chromium/src/build.git' + '@' + '4157fb6cb44135013300168c9f4c5b95d04acf70', 'buildtools': - Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + 'c2e4795660817c2776dbabd778b92ed58c074032', + Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + 'e713c13e2fa3b7aa9131276f27990011e1aa6a73', 'buildtools/clang_format/script': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + 'e435ad79c17b1888b34df88d6a30a094936e3836', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + '8b525d2747f2584fc35d8c7e612e66f377858df7', 'buildtools/linux64': { 'packages': [ { - 'package': 'gn/gn/linux-amd64', + 'package': 'gn/gn/linux-${{arch}}', 'version': Var('gn_version'), } ], 'dep_type': 'cipd', - 'condition': 'host_os == "linux"', + 'condition': 'host_os == "linux" and host_cpu != "s390" and host_cpu != "ppc"', }, 'buildtools/mac': { 'packages': [ @@ -109,11 +120,11 @@ deps = { 'condition': 'host_os == "mac"', }, 'buildtools/third_party/libc++/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '79a2e924d96e2fc1e4b937c42efd08898fa472d7', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + 'c1e647c7c30238f7c512457eec55798e3458fd8a', 'buildtools/third_party/libc++abi/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + 'e025ba5dc85202540099d7cd8e72eae2d4ee9e33', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '5c3e02e92ae8bbc1bf1001bd9ef0d76e044ddb86', 'buildtools/third_party/libunwind/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'c39fea88739be63a2d5590a938ce19d762b915fc', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + '60a480ee1819266cf8054548454f99838583cd76', 'buildtools/win': { 'packages': [ { @@ -132,46 +143,26 @@ deps = { } ], 'dep_type': 'cipd', - 'condition': '(host_os == "linux" or host_os == "win") and checkout_reclient', + 'condition': '(host_os == "linux" or host_os == "mac" 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' + '@' + 'd7c0a2076c2b0c1531aef7069d4abe70eec44ee3', - 'third_party/aemu-linux-x64': { - 'packages': [ - { - 'package': 'fuchsia/third_party/aemu/linux-amd64', - 'version': 'vRCm89BzABss-_H8vC-tLjcSf6uusZA9IBSSYtdw4_kC' - }, - ], - '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', - }, + Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + '746197355c1705b7d4463fc75c29433c0ce2fd0d', 'third_party/android_ndk': { 'url': Var('chromium_url') + '/android_ndk.git' + '@' + '8388a2be5421311dc75c5f937aae13d821a27f3d', 'condition': 'checkout_android', }, 'third_party/android_platform': { - 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + '2760db43ffc8b074cb7960c90b5254f74a5c299a', + 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + '04b33506bfd9d0e866bd8bd62f4cbf323d84dc79', 'condition': 'checkout_android', }, 'third_party/android_sdk/public': { 'packages': [ { - 'package': 'chromium/third_party/android_sdk/public/build-tools/31.0.0', + 'package': 'chromium/third_party/android_sdk/public/build-tools/33.0.0', 'version': Var('android_sdk_build-tools_version'), }, { @@ -191,7 +182,7 @@ deps = { 'version': Var('android_sdk_platform-tools_version'), }, { - 'package': 'chromium/third_party/android_sdk/public/platforms/android-31', + 'package': 'chromium/third_party/android_sdk/public/platforms/android-33', 'version': Var('android_sdk_platforms_version'), }, { @@ -207,7 +198,7 @@ deps = { 'dep_type': 'cipd', }, 'third_party/catapult': { - 'url': Var('chromium_url') + '/catapult.git' + '@' + '3a1ae18f882d024686144edbec3050aae055f146', + 'url': Var('chromium_url') + '/catapult.git' + '@' + '37391a1619e953e23d3441dbc61e658e881fede4', 'condition': 'checkout_android', }, 'third_party/colorama/src': { @@ -215,18 +206,24 @@ deps = { 'condition': 'checkout_android', }, 'third_party/depot_tools': - Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '3b97fa826eee4bd1978c4c049038b1e4f201e8f2', - 'third_party/fuchsia-sdk': { - 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-sdk.git' + '@' + '7c9c220d13ab367d49420144a257886ebfbce278', + Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '9ebcfa6be17c2d1e7bd72135ceab5e767ed89b7d', + 'third_party/fuchsia-sdk/sdk': { + 'packages': [ + { + 'package': Var('fuchsia_sdk_cipd_prefix') + '${{platform}}', + 'version': Var('fuchsia_version'), + }, + ], 'condition': 'checkout_fuchsia', + 'dep_type': 'cipd', }, 'third_party/google_benchmark/src': { - 'url': Var('chromium_url') + '/external/github.com/google/benchmark.git' + '@' + 'dc901ff9090e2b931433790cc44afc3af3b09ab2', + 'url': Var('chromium_url') + '/external/github.com/google/benchmark.git' + '@' + 'e8baf2622591569a27615b31372d1e9cc046af10', }, 'third_party/googletest/src': Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + 'af29db7ec28d6df1c7f0f745186884091e602e07', 'third_party/icu': - Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '1fd0dbea04448c3f73fe5cb7599f9472f0f107f1', + Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '20f8ac695af59b6c830def7d4e95bfeb13dd7be5', 'third_party/instrumented_libraries': Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + 'e09c4b66b6e87116eb190651421f1a6e2f3b9c52', 'third_party/ittapi': { @@ -238,43 +235,23 @@ deps = { 'third_party/jinja2': Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + 'ee69aa00ee8536f61db6a451f3858745cf587de6', 'third_party/jsoncpp/source': - Var('chromium_url') + '/external/github.com/open-source-parsers/jsoncpp.git'+ '@' + '9059f5cad030ba11d37818847443a53918c327b1', + Var('chromium_url') + '/external/github.com/open-source-parsers/jsoncpp.git'+ '@' + '42e892d96e47b1f6e29844cc705e148ec4856448', 'third_party/logdog/logdog': Var('chromium_url') + '/infra/luci/luci-py/client/libs/logdog' + '@' + '0b2078a90f7a638d576b3a7c407d136f2fb62399', 'third_party/markupsafe': Var('chromium_url') + '/chromium/src/third_party/markupsafe.git' + '@' + '1b882ef6372b58bfd55a3285f37ed801be9137cd', 'third_party/perfetto': - Var('android_url') + '/platform/external/perfetto.git' + '@' + 'aa4385bc5997ecad4c633885e1b331b1115012fb', + Var('android_url') + '/platform/external/perfetto.git' + '@' + '0eba417b2c72264fa825dc21067b9adc9b8adf70', 'third_party/protobuf': Var('chromium_url') + '/external/github.com/google/protobuf'+ '@' + '6a59a2ad1f61d9696092f79b6d74368b4d7970a3', - 'third_party/qemu-linux-x64': { - 'packages': [ - { - 'package': 'fuchsia/qemu/linux-amd64', - 'version': '9cc486c5b18a0be515c39a280ca9a309c54cf994' - }, - ], - 'condition': 'host_os == "linux" and checkout_fuchsia', - 'dep_type': 'cipd', - }, - 'third_party/qemu-mac-x64': { - 'packages': [ - { - 'package': 'fuchsia/qemu/mac-amd64', - 'version': '2d3358ae9a569b2d4a474f498b32b202a152134f' - }, - ], - 'condition': 'host_os == "mac" and checkout_fuchsia', - 'dep_type': 'cipd', - }, 'third_party/requests': { - 'url': Var('chromium_url') + '/external/github.com/kennethreitz/requests.git' + '@' + '2c2138e811487b13020eb331482fb991fd399d4e', + 'url': Var('chromium_url') + '/external/github.com/kennethreitz/requests.git' + '@' + 'refs/tags/v2.23.0', 'condition': 'checkout_android', }, 'third_party/zlib': - Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + 'a6d209ab932df0f1c9d5b7dc67cfa74e8a3272c0', + Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + 'f48cb14d487038d20c85680e29351e095a0fea8b', 'tools/clang': - Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + 'b5e2f7c16bbf3aefc9354e8fbad3de0a543f2193', + Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '02a202a7b1fa863352c0c9fb088fd3c0cf48c978', 'tools/luci-go': { 'packages': [ { @@ -580,15 +557,6 @@ hooks = [ 'action': ['python3', 'build/util/lastchange.py', '-o', 'build/util/LASTCHANGE'], }, - { - 'name': 'Download Fuchsia SDK', - 'pattern': '.', - 'condition': 'checkout_fuchsia', - 'action': [ - 'python3', - 'build/fuchsia/update_sdk.py', - ], - }, { 'name': 'Download Fuchsia system images', 'pattern': '.', @@ -634,4 +602,14 @@ hooks = [ 'tools/generate-header-include-checks.py', ], }, + { + # Clean up build dirs for crbug.com/1337238. + # After a libc++ roll and revert, .ninja_deps would get into a state + # that breaks Ninja on Windows. + # TODO(crbug.com/1337238): Remove in a month or so. + 'name': 'del_ninja_deps_cache', + 'pattern': '.', + 'condition': 'host_os == "win"', + 'action': ['python3', 'build/del_ninja_deps_cache.py'], + }, ] diff --git a/deps/v8/ENG_REVIEW_OWNERS b/deps/v8/ENG_REVIEW_OWNERS index 3943c49432ce82..78d53b821d67e5 100644 --- a/deps/v8/ENG_REVIEW_OWNERS +++ b/deps/v8/ENG_REVIEW_OWNERS @@ -6,3 +6,4 @@ adamk@chromium.org danno@chromium.org hpayer@chromium.org verwaest@chromium.org +vahl@chromium.org diff --git a/deps/v8/INFRA_OWNERS b/deps/v8/INFRA_OWNERS index b5b36aa26844cd..33c1024df844fd 100644 --- a/deps/v8/INFRA_OWNERS +++ b/deps/v8/INFRA_OWNERS @@ -1,4 +1,5 @@ -machenbach@chromium.org -tmrts@chromium.org +alexschulze@chromium.org almuthanna@chromium.org liviurau@chromium.org +machenbach@chromium.org +tmrts@chromium.org diff --git a/deps/v8/LICENSE b/deps/v8/LICENSE index 53d9c47e33c182..f665c480d2c169 100644 --- a/deps/v8/LICENSE +++ b/deps/v8/LICENSE @@ -15,8 +15,7 @@ are: - Strongtalk assembler, the basis of the files assembler-arm-inl.h, assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h, assembler-ia32.cc, assembler-ia32.h, assembler-x64-inl.h, - assembler-x64.cc, assembler-x64.h, assembler-mips-inl.h, - assembler-mips.cc, assembler-mips.h, assembler.cc and assembler.h. + assembler-x64.cc, assembler-x64.h, assembler.cc and assembler.h. This code is copyrighted by Sun Microsystems Inc. and released under a 3-clause BSD license. diff --git a/deps/v8/OWNERS b/deps/v8/OWNERS index 42d7d9981da461..db579fb0e6a2d3 100644 --- a/deps/v8/OWNERS +++ b/deps/v8/OWNERS @@ -3,20 +3,21 @@ file:ENG_REVIEW_OWNERS per-file .*=file:INFRA_OWNERS -per-file .mailmap=file:COMMON_OWNERS per-file .bazelrc=file:COMMON_OWNERS +per-file .mailmap=file:COMMON_OWNERS +per-file codereview.settings=file:INFRA_OWNERS +per-file AUTHORS=file:COMMON_OWNERS per-file BUILD.bazel=file:COMMON_OWNERS per-file BUILD.gn=file:COMMON_OWNERS -per-file WORKSPACE=file:COMMON_OWNERS per-file DEPS=file:INFRA_OWNERS +per-file INFRA_OWNERS=file:INFRA_OWNERS +per-file PRESUBMIT.py=file:INFRA_OWNERS +per-file WATCHLISTS=file:COMMON_OWNERS +per-file WORKSPACE=file:COMMON_OWNERS + # For Test262 rolls. per-file DEPS=mathias@chromium.org per-file DEPS=syg@chromium.org -per-file PRESUBMIT.py=file:INFRA_OWNERS -per-file codereview.settings=file:INFRA_OWNERS - -per-file AUTHORS=file:COMMON_OWNERS -per-file WATCHLISTS=file:COMMON_OWNERS # Needed by the auto_tag builder per-file WATCHLISTS=v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com @@ -26,5 +27,5 @@ per-file ...-loong64*=file:LOONG_OWNERS per-file ...-mips*=file:MIPS_OWNERS per-file ...-mips64*=file:MIPS_OWNERS per-file ...-ppc*=file:PPC_OWNERS -per-file ...-riscv64*=file:RISCV_OWNERS +per-file ...-riscv*=file:RISCV_OWNERS per-file ...-s390*=file:S390_OWNERS diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index cb6888d32a23e2..03db4c126f346d 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -486,14 +486,18 @@ def _CheckNoexceptAnnotations(input_api, output_api): """ def FilterFile(affected_file): - return input_api.FilterSourceFile( - affected_file, - files_to_check=(r'src[\\\/].*', r'test[\\\/].*'), + files_to_skip = _EXCLUDED_PATHS + ( # Skip api.cc since we cannot easily add the 'noexcept' annotation to # public methods. + r'src[\\\/]api[\\\/]api\.cc', # Skip src/bigint/ because it's meant to be V8-independent. - files_to_skip=(r'src[\\\/]api[\\\/]api\.cc', - r'src[\\\/]bigint[\\\/].*')) + r'src[\\\/]bigint[\\\/].*', + ) + return input_api.FilterSourceFile( + affected_file, + files_to_check=(r'src[\\\/].*\.cc', r'src[\\\/].*\.h', + r'test[\\\/].*\.cc', r'test[\\\/].*\.h'), + files_to_skip=files_to_skip) # matches any class name. class_name = r'\b([A-Z][A-Za-z0-9_:]*)(?:::\1)?' diff --git a/deps/v8/WATCHLISTS b/deps/v8/WATCHLISTS index feadac3fab5afc..a078c5568e4707 100644 --- a/deps/v8/WATCHLISTS +++ b/deps/v8/WATCHLISTS @@ -108,6 +108,7 @@ 'jgruber+watch@chromium.org', 'leszeks+watch@chromium.org', 'verwaest+watch@chromium.org', + 'victorgomes+watch@chromium.org', ], 'snapshot': [ 'jgruber+watch@chromium.org', @@ -129,6 +130,7 @@ 'arm': [ 'v8-mips-ports@googlegroups.com', 'v8-ppc-ports@googlegroups.com', + 'v8-risc-v-ports@chromium.org', ], 'merges': [ # Only enabled on branches created with tools/release/create_release.py diff --git a/deps/v8/WORKSPACE b/deps/v8/WORKSPACE index 490e973a762a5a..306aff18091e2e 100644 --- a/deps/v8/WORKSPACE +++ b/deps/v8/WORKSPACE @@ -34,22 +34,6 @@ pip_install( requirements = "//:bazel/requirements.txt", ) -new_local_repository( - name = "com_googlesource_chromium_zlib", - build_file = "bazel/BUILD.zlib", - path = "third_party/zlib", -) - -bind( - name = "zlib", - actual = "@com_googlesource_chromium_zlib//:zlib", -) - -bind( - name = "zlib_compression_utils", - actual = "@com_googlesource_chromium_zlib//:zlib_compression_utils", -) - new_local_repository( name = "com_googlesource_chromium_icu", build_file = "bazel/BUILD.icu", diff --git a/deps/v8/base/trace_event/common/trace_event_common.h b/deps/v8/base/trace_event/common/trace_event_common.h index fb1ce8a053c3d4..f07f19b3095f57 100644 --- a/deps/v8/base/trace_event/common/trace_event_common.h +++ b/deps/v8/base/trace_event/common/trace_event_common.h @@ -1,4 +1,4 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. +// Copyright 2015 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -404,6 +404,10 @@ struct BASE_EXPORT TraceTimestampTraits<::base::TimeTicks> { // - |timestamp| must be non-null or it crashes. Use DCHECK(timestamp) before // calling this to detect an invalid timestamp even when tracing is not // enabled, as the commit queue doesn't run all tests with tracing enabled. +// Note: This legacy macro is deprecated. It should not be used in new code. +// If thread_id is different from current thread id, it will result into +// DCHECK failure. This note is also applicable to `_COPY` and `_END` +// variant of this macro. #define TRACE_EVENT_BEGIN_WITH_ID_TID_AND_TIMESTAMP0(category_group, name, id, \ thread_id, timestamp) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ @@ -1024,18 +1028,6 @@ struct BASE_EXPORT TraceTimestampTraits<::base::TimeTicks> { TRACE_EVENT_PHASE_DELETE_OBJECT, category_group, name, id, \ TRACE_EVENT_FLAG_NONE) -// Records entering and leaving trace event contexts. |category_group| and -// |name| specify the context category and type. |context| is a -// snapshotted context object id. -#define TRACE_EVENT_ENTER_CONTEXT(category_group, name, context) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_ENTER_CONTEXT, category_group, name, context, \ - TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_LEAVE_CONTEXT(category_group, name, context) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_LEAVE_CONTEXT, category_group, name, context, \ - TRACE_EVENT_FLAG_NONE) - // Macro to efficiently determine if a given category group is enabled. #define TRACE_EVENT_CATEGORY_GROUP_ENABLED(category_group, ret) \ do { \ @@ -1099,12 +1091,15 @@ struct BASE_EXPORT TraceTimestampTraits<::base::TimeTicks> { #define TRACE_EVENT_PHASE_MEMORY_DUMP ('v') #define TRACE_EVENT_PHASE_MARK ('R') #define TRACE_EVENT_PHASE_CLOCK_SYNC ('c') -#define TRACE_EVENT_PHASE_ENTER_CONTEXT ('(') -#define TRACE_EVENT_PHASE_LEAVE_CONTEXT (')') // Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. #define TRACE_EVENT_FLAG_NONE (static_cast(0)) + +// Should not be used outside this file or +// except `trace_event_impl.cc` (implementation details). +// If used, it will result in CHECK failure in SDK build. #define TRACE_EVENT_FLAG_COPY (static_cast(1 << 0)) + #define TRACE_EVENT_FLAG_HAS_ID (static_cast(1 << 1)) #define TRACE_EVENT_FLAG_SCOPE_OFFSET (static_cast(1 << 2)) #define TRACE_EVENT_FLAG_SCOPE_EXTRA (static_cast(1 << 3)) diff --git a/deps/v8/bazel/BUILD.zlib b/deps/v8/bazel/BUILD.zlib deleted file mode 100644 index 25a2c35313b981..00000000000000 --- a/deps/v8/bazel/BUILD.zlib +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2021 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -cc_library( - name = "zlib", - srcs = [ - "adler32.c", - "chromeconf.h", - "compress.c", - "contrib/optimizations/insert_string.h", - "contrib/optimizations/slide_hash_neon.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", - ], - hdrs = [ - "zlib.h", - ], - defines = [ - "CHROMIUM_ZLIB_NO_CHROMECONF", - "CPU_NO_SIMD", - ] + select({ - "@platforms//os:windows": [], - "//conditions:default": [ - "HAVE_HIDDEN", - ], - }), - include_prefix = "third_party/zlib", - visibility = ["//visibility:public"], -) - -cc_library( - name = "zlib_compression_utils", - srcs = [ - "google/compression_utils_portable.cc", - ], - hdrs = [ - "google/compression_utils_portable.h", - ], - include_prefix = "third_party/zlib", - visibility = ["//visibility:public"], - deps = [ - "//external:zlib", - ], -) diff --git a/deps/v8/bazel/config/BUILD.bazel b/deps/v8/bazel/config/BUILD.bazel index ffa9ef040722b4..448260de88465d 100644 --- a/deps/v8/bazel/config/BUILD.bazel +++ b/deps/v8/bazel/config/BUILD.bazel @@ -290,6 +290,14 @@ selects.config_setting_group( ], ) +selects.config_setting_group( + name = "is_macos_arm64", + match_all = [ + ":is_macos", + ":is_arm64", + ], +) + config_setting( name = "is_compiler_default", flag_values = { diff --git a/deps/v8/bazel/defs.bzl b/deps/v8/bazel/defs.bzl index ed7dea9581deff..e957c0fad3bc4b 100644 --- a/deps/v8/bazel/defs.bzl +++ b/deps/v8/bazel/defs.bzl @@ -493,7 +493,6 @@ def build_config_content(cpu, icu): ("target_cpu", cpu), ("v8_current_cpu", cpu), ("v8_dict_property_const_tracking", "false"), - ("v8_enable_atomic_marking_state", "false"), ("v8_enable_atomic_object_field_writes", "false"), ("v8_enable_concurrent_marking", "false"), ("v8_enable_i18n_support", icu), diff --git a/deps/v8/gni/OWNERS b/deps/v8/gni/OWNERS index fa1262b503174e..c20b8de5a25442 100644 --- a/deps/v8/gni/OWNERS +++ b/deps/v8/gni/OWNERS @@ -1,5 +1,5 @@ file:../INFRA_OWNERS -per-file v8.cmx=victorgomes@chromium.org +per-file v8.cml=victorgomes@chromium.org per-file release_branch_toggle.gni=v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com -per-file release_branch_toggle.gni=vahl@chromium.org \ No newline at end of file +per-file release_branch_toggle.gni=vahl@chromium.org diff --git a/deps/v8/gni/proto_library.gni b/deps/v8/gni/proto_library.gni index 583057e0a5a3e8..a8690999f97710 100644 --- a/deps/v8/gni/proto_library.gni +++ b/deps/v8/gni/proto_library.gni @@ -76,6 +76,17 @@ template("proto_library") { out_dir = "$root_gen_dir/" + proto_out_dir rel_out_dir = rebase_path(out_dir, root_build_dir) + # exclude_imports is only used for generating the descriptor. Therefore, the + # check needs to be here to avoid complaints from GN about the unused + # variable. + if (generate_descriptor != "") { + if (defined(invoker.exclude_imports)) { + exclude_imports = invoker.exclude_imports + } else { + exclude_imports = false + } + } + # Prevent unused errors when generating descriptor only. if (generate_descriptor != "") { not_needed([ "rel_out_dir" ]) @@ -163,8 +174,10 @@ template("proto_library") { } if (generate_descriptor != "") { depfile = "$out_dir/$generate_descriptor.d" + if (!exclude_imports) { + args += [ "--include_imports" ] + } args += [ - "--include_imports", "--descriptor_set_out", rebase_path("$out_dir/$generate_descriptor", root_build_dir), "--dependency_out", diff --git a/deps/v8/gni/protoc.py b/deps/v8/gni/protoc.py index dc8920009dede0..d529d1c65a536b 100755 --- a/deps/v8/gni/protoc.py +++ b/deps/v8/gni/protoc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2021 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/gni/release_branch_toggle.gni b/deps/v8/gni/release_branch_toggle.gni index 43e3b6ae567631..c502c8c62e5836 100644 --- a/deps/v8/gni/release_branch_toggle.gni +++ b/deps/v8/gni/release_branch_toggle.gni @@ -4,4 +4,4 @@ declare_args() { is_on_release_branch = true -} +} \ No newline at end of file diff --git a/deps/v8/gni/snapshot_toolchain.gni b/deps/v8/gni/snapshot_toolchain.gni index 39b196521c35ad..5f5e53a30d0789 100644 --- a/deps/v8/gni/snapshot_toolchain.gni +++ b/deps/v8/gni/snapshot_toolchain.gni @@ -64,8 +64,7 @@ if (v8_snapshot_toolchain == "") { current_cpu == "arm") { # Trying to compile 32-bit arm on arm64. Good luck! v8_snapshot_toolchain = current_toolchain - } else if (host_cpu == "x64" && - (v8_current_cpu == "mips" || v8_current_cpu == "mips64")) { + } else if (host_cpu == "x64" && v8_current_cpu == "mips64") { # We don't support snapshot generation for big-endian targets, # therefore snapshots will need to be built using native mksnapshot # in combination with qemu @@ -96,7 +95,7 @@ if (v8_snapshot_toolchain == "") { } else { _cpus = "x64_v8_${v8_current_cpu}" } - } else if (v8_current_cpu == "arm" || v8_current_cpu == "mipsel") { + } else if (v8_current_cpu == "arm" || v8_current_cpu == "riscv32") { _cpus = "x86_v8_${v8_current_cpu}" } else { # This branch should not be reached; leave _cpus blank so the assert @@ -121,7 +120,6 @@ assert(v8_snapshot_toolchain != "", # avoid building v8_libbase on the host more than once. On mips with big endian, # the snapshot toolchain is the target toolchain and, hence, can't be used. v8_generator_toolchain = v8_snapshot_toolchain -if (host_cpu == "x64" && - (v8_current_cpu == "mips" || v8_current_cpu == "mips64")) { +if (host_cpu == "x64" && v8_current_cpu == "mips64") { v8_generator_toolchain = "//build/toolchain/linux:clang_x64" } diff --git a/deps/v8/gni/v8.cml b/deps/v8/gni/v8.cml new file mode 100644 index 00000000000000..4d74c7626cfb36 --- /dev/null +++ b/deps/v8/gni/v8.cml @@ -0,0 +1,21 @@ +// Copyright 2022 The V8 project authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +{ + include: [ "syslog/client.shard.cml" ], + program: { + runner: "elf", + binary: "d8", + }, + use: [ + { + protocol: [ + "fuchsia.kernel.VmexResource", + ], + }, + { + storage: "tmp", + path: "/tmp", + }, + ], +} diff --git a/deps/v8/gni/v8.cmx b/deps/v8/gni/v8.cmx deleted file mode 100644 index 45fd74a09faffa..00000000000000 --- a/deps/v8/gni/v8.cmx +++ /dev/null @@ -1,52 +0,0 @@ -{ - "facets": { - "fuchsia.test": { - "system-services": [ - "fuchsia.kernel.VmexResource" - ] - } - }, - "sandbox": { - "dev": [ - "null", - "zero" - ], - "features": [ - "deprecated-ambient-replace-as-executable", - "isolated-cache-storage", - "isolated-persistent-storage", - "isolated-temp", - "root-ssl-certificates", - "vulkan" - ], - "services": [ - "fuchsia.accessibility.semantics.SemanticsManager", - "fuchsia.camera3.DeviceWatcher", - "fuchsia.device.NameProvider", - "fuchsia.fonts.Provider", - "fuchsia.intl.PropertyProvider", - "fuchsia.kernel.VmexResource", - "fuchsia.logger.Log", - "fuchsia.logger.LogSink", - "fuchsia.media.Audio", - "fuchsia.media.SessionAudioConsumerFactory", - "fuchsia.media.drm.Widevine", - "fuchsia.mediacodec.CodecFactory", - "fuchsia.memorypressure.Provider", - "fuchsia.net.NameLookup", - "fuchsia.net.interfaces.State", - "fuchsia.posix.socket.Provider", - "fuchsia.process.Launcher", - "fuchsia.sys.Environment", - "fuchsia.sys.Launcher", - "fuchsia.sys.Loader", - "fuchsia.sysmem.Allocator", - "fuchsia.ui.input.ImeService", - "fuchsia.ui.input.ImeVisibilityService", - "fuchsia.ui.scenic.Scenic", - "fuchsia.ui.policy.Presenter", - "fuchsia.vulkan.loader.Loader", - "fuchsia.web.ContextProvider" - ] - } -} diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index 7b9da1f06a6539..3f093597faccdc 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -69,6 +69,9 @@ declare_args() { # executed as standard JavaScript instead. v8_enable_webassembly = "" + # Enable 256-bit long vector re-vectorization pass in WASM compilation pipeline. + v8_enable_wasm_simd256_revec = false + # Enable runtime call stats. v8_enable_runtime_call_stats = !is_on_release_branch @@ -78,6 +81,12 @@ declare_args() { # Scan the call stack conservatively during garbage collection. v8_enable_conservative_stack_scanning = false + # Use the object start bitmap for inner pointer resolution. + v8_enable_inner_pointer_resolution_osb = false + + # Use the marking bitmap for inner pointer resolution. + v8_enable_inner_pointer_resolution_mb = false + v8_enable_google_benchmark = false cppgc_is_standalone = false @@ -88,6 +97,13 @@ declare_args() { # Enable young generation in cppgc. cppgc_enable_young_generation = false + # Enable pointer compression in cppgc. + cppgc_enable_pointer_compression = false + + # Enable 2gb cage for fast compression/decompression. Currently disabled + # due to an increased number of OOMs. + cppgc_enable_2gb_cage = false + # Enable advanced BigInt algorithms, costing about 10-30 KB binary size # depending on platform. Disabled on Android to save binary size. v8_advanced_bigint_algorithms = !is_android @@ -142,7 +158,7 @@ if (is_debug && !v8_optimized_debug) { # TODO(crbug.com/621335) Rework this so that we don't have the confusion # between "optimize_speed" and "optimize_max". - if (((is_posix && !is_android) || is_fuchsia) && !using_sanitizer) { + if (is_posix && !is_android && !using_sanitizer) { v8_add_configs += [ "//build/config/compiler:optimize_speed" ] } else { v8_add_configs += [ "//build/config/compiler:optimize_max" ] @@ -183,8 +199,7 @@ if ((is_posix || is_fuchsia) && } # On MIPS gcc_target_rpath and ldso_path might be needed for all builds. -if (target_cpu == "mipsel" || target_cpu == "mips64el" || - target_cpu == "mips" || target_cpu == "mips64") { +if (target_cpu == "mips64el" || target_cpu == "mips64") { v8_add_configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] } diff --git a/deps/v8/include/cppgc/common.h b/deps/v8/include/cppgc/common.h index b6dbff3dd6f007..961038360ac428 100644 --- a/deps/v8/include/cppgc/common.h +++ b/deps/v8/include/cppgc/common.h @@ -5,7 +5,6 @@ #ifndef INCLUDE_CPPGC_COMMON_H_ #define INCLUDE_CPPGC_COMMON_H_ -// TODO(chromium:1056170): Remove dependency on v8. #include "v8config.h" // NOLINT(build/include_directory) namespace cppgc { diff --git a/deps/v8/include/cppgc/cross-thread-persistent.h b/deps/v8/include/cppgc/cross-thread-persistent.h index c8751e1d64121a..1fa28afa136eb4 100644 --- a/deps/v8/include/cppgc/cross-thread-persistent.h +++ b/deps/v8/include/cppgc/cross-thread-persistent.h @@ -120,7 +120,7 @@ class BasicCrossThreadPersistent final : public CrossThreadPersistentBase, if (!IsValid(raw)) return; PersistentRegionLock guard; CrossThreadPersistentRegion& region = this->GetPersistentRegion(raw); - SetNode(region.AllocateNode(this, &Trace)); + SetNode(region.AllocateNode(this, &TraceAsRoot)); this->CheckPointer(raw); } @@ -138,7 +138,7 @@ class BasicCrossThreadPersistent final : public CrossThreadPersistentBase, : CrossThreadPersistentBase(raw), LocationPolicy(loc) { if (!IsValid(raw)) return; CrossThreadPersistentRegion& region = this->GetPersistentRegion(raw); - SetNode(region.AllocateNode(this, &Trace)); + SetNode(region.AllocateNode(this, &TraceAsRoot)); this->CheckPointer(raw); } @@ -349,9 +349,8 @@ class BasicCrossThreadPersistent final : public CrossThreadPersistentBase, return ptr && ptr != kSentinelPointer; } - static void Trace(Visitor* v, const void* ptr) { - const auto* handle = static_cast(ptr); - v->TraceRoot(*handle, handle->Location()); + static void TraceAsRoot(RootVisitor& root_visitor, const void* ptr) { + root_visitor.Trace(*static_cast(ptr)); } void AssignUnsafe(T* ptr) { @@ -378,7 +377,7 @@ class BasicCrossThreadPersistent final : public CrossThreadPersistentBase, SetValue(ptr); if (!IsValid(ptr)) return; PersistentRegionLock guard; - SetNode(this->GetPersistentRegion(ptr).AllocateNode(this, &Trace)); + SetNode(this->GetPersistentRegion(ptr).AllocateNode(this, &TraceAsRoot)); this->CheckPointer(ptr); } @@ -398,7 +397,7 @@ class BasicCrossThreadPersistent final : public CrossThreadPersistentBase, } SetValue(ptr); if (!IsValid(ptr)) return; - SetNode(this->GetPersistentRegion(ptr).AllocateNode(this, &Trace)); + SetNode(this->GetPersistentRegion(ptr).AllocateNode(this, &TraceAsRoot)); this->CheckPointer(ptr); } @@ -416,7 +415,7 @@ class BasicCrossThreadPersistent final : public CrossThreadPersistentBase, return static_cast(const_cast(GetValueFromGC())); } - friend class cppgc::Visitor; + friend class internal::RootVisitor; }; template diff --git a/deps/v8/include/cppgc/heap-consistency.h b/deps/v8/include/cppgc/heap-consistency.h index 54a4dbc21ed2eb..35c59ed1ad417f 100644 --- a/deps/v8/include/cppgc/heap-consistency.h +++ b/deps/v8/include/cppgc/heap-consistency.h @@ -9,6 +9,7 @@ #include "cppgc/internal/write-barrier.h" #include "cppgc/macros.h" +#include "cppgc/member.h" #include "cppgc/trace-trait.h" #include "v8config.h" // NOLINT(build/include_directory) @@ -47,6 +48,29 @@ class HeapConsistency final { return internal::WriteBarrier::GetWriteBarrierType(slot, value, params); } + /** + * Gets the required write barrier type for a specific write. This override is + * only used for all the BasicMember types. + * + * \param slot Slot containing the pointer to the object. The slot itself + * must reside in an object that has been allocated using + * `MakeGarbageCollected()`. + * \param value The pointer to the object held via `BasicMember`. + * \param params Parameters that may be used for actual write barrier calls. + * Only filled if return value indicates that a write barrier is needed. The + * contents of the `params` are an implementation detail. + * \returns whether a write barrier is needed and which barrier to invoke. + */ + template + static V8_INLINE WriteBarrierType GetWriteBarrierType( + const internal::BasicMember& value, + WriteBarrierParams& params) { + return internal::WriteBarrier::GetWriteBarrierType( + value.GetRawSlot(), value.GetRawStorage(), params); + } + /** * Gets the required write barrier type for a specific write. * @@ -146,7 +170,25 @@ class HeapConsistency final { */ static V8_INLINE void GenerationalBarrier(const WriteBarrierParams& params, const void* slot) { - internal::WriteBarrier::GenerationalBarrier(params, slot); + internal::WriteBarrier::GenerationalBarrier< + internal::WriteBarrier::GenerationalBarrierType::kPreciseSlot>(params, + slot); + } + + /** + * Generational barrier for maintaining consistency when running with multiple + * generations. This version is used when slot contains uncompressed pointer. + * + * \param params The parameters retrieved from `GetWriteBarrierType()`. + * \param slot Uncompressed slot containing the direct pointer to the object. + * The slot itself must reside in an object that has been allocated using + * `MakeGarbageCollected()`. + */ + static V8_INLINE void GenerationalBarrierForUncompressedSlot( + const WriteBarrierParams& params, const void* uncompressed_slot) { + internal::WriteBarrier::GenerationalBarrier< + internal::WriteBarrier::GenerationalBarrierType:: + kPreciseUncompressedSlot>(params, uncompressed_slot); } /** @@ -158,8 +200,9 @@ class HeapConsistency final { */ static V8_INLINE void GenerationalBarrierForSourceObject( const WriteBarrierParams& params, const void* inner_pointer) { - internal::WriteBarrier::GenerationalBarrierForSourceObject(params, - inner_pointer); + internal::WriteBarrier::GenerationalBarrier< + internal::WriteBarrier::GenerationalBarrierType::kImpreciseSlot>( + params, inner_pointer); } private: diff --git a/deps/v8/include/cppgc/heap-handle.h b/deps/v8/include/cppgc/heap-handle.h new file mode 100644 index 00000000000000..5a0f9cd2edcb9f --- /dev/null +++ b/deps/v8/include/cppgc/heap-handle.h @@ -0,0 +1,41 @@ +// Copyright 2022 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef INCLUDE_CPPGC_HEAP_HANDLE_H_ +#define INCLUDE_CPPGC_HEAP_HANDLE_H_ + +#include "v8config.h" // NOLINT(build/include_directory) + +namespace cppgc { + +namespace internal { +class HeapBase; +class WriteBarrierTypeForCagedHeapPolicy; +} // namespace internal + +/** + * Opaque handle used for additional heap APIs. + */ +class HeapHandle { + private: + HeapHandle() = default; + + V8_INLINE bool is_incremental_marking_in_progress() const { + return is_incremental_marking_in_progress_; + } + + V8_INLINE bool is_young_generation_enabled() const { + return is_young_generation_enabled_; + } + + bool is_incremental_marking_in_progress_ = false; + bool is_young_generation_enabled_ = false; + + friend class internal::HeapBase; + friend class internal::WriteBarrierTypeForCagedHeapPolicy; +}; + +} // namespace cppgc + +#endif // INCLUDE_CPPGC_HEAP_HANDLE_H_ diff --git a/deps/v8/include/cppgc/heap-statistics.h b/deps/v8/include/cppgc/heap-statistics.h index 8e626596e5b07b..5e389874099426 100644 --- a/deps/v8/include/cppgc/heap-statistics.h +++ b/deps/v8/include/cppgc/heap-statistics.h @@ -56,7 +56,7 @@ struct HeapStatistics final { /** 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. */ + * NameProvider::SupportsCppClassNamesAsObjectNames() is true. */ std::vector object_statistics; }; @@ -98,7 +98,7 @@ struct HeapStatistics final { /** Overall committed amount of memory for the heap. */ size_t committed_size_bytes = 0; - /** Resident amount of memory help by the heap. */ + /** Resident amount of memory held by the heap. */ size_t resident_size_bytes = 0; /** Amount of memory actually used on the heap. */ size_t used_size_bytes = 0; diff --git a/deps/v8/include/cppgc/heap.h b/deps/v8/include/cppgc/heap.h index aa3c6f468a21de..02ee12eaba09d5 100644 --- a/deps/v8/include/cppgc/heap.h +++ b/deps/v8/include/cppgc/heap.h @@ -21,6 +21,7 @@ namespace cppgc { class AllocationHandle; +class HeapHandle; /** * Implementation details of cppgc. Those details are considered internal and @@ -31,11 +32,6 @@ namespace internal { class Heap; } // namespace internal -/** - * Used for additional heap APIs. - */ -class HeapHandle; - class V8_EXPORT Heap { public: /** @@ -59,7 +55,7 @@ class V8_EXPORT Heap { }; /** - * Specifies supported marking types + * Specifies supported marking types. */ enum class MarkingType : uint8_t { /** @@ -79,7 +75,7 @@ class V8_EXPORT Heap { }; /** - * Specifies supported sweeping types + * Specifies supported sweeping types. */ enum class SweepingType : uint8_t { /** diff --git a/deps/v8/include/cppgc/internal/api-constants.h b/deps/v8/include/cppgc/internal/api-constants.h index a50d4d046c953c..023426e94b04c9 100644 --- a/deps/v8/include/cppgc/internal/api-constants.h +++ b/deps/v8/include/cppgc/internal/api-constants.h @@ -32,12 +32,22 @@ static constexpr uint16_t kFullyConstructedBitMask = uint16_t{1}; static constexpr size_t kPageSize = size_t{1} << 17; +#if defined(V8_TARGET_ARCH_ARM64) && defined(V8_OS_MACOS) +constexpr size_t kGuardPageSize = 0; +#else +constexpr size_t kGuardPageSize = 4096; +#endif + static constexpr size_t kLargeObjectSizeThreshold = kPageSize / 2; #if defined(CPPGC_CAGED_HEAP) +#if defined(CPPGC_2GB_CAGE) +constexpr size_t kCagedHeapReservationSize = static_cast(2) * kGB; +#else // !defined(CPPGC_2GB_CAGE) constexpr size_t kCagedHeapReservationSize = static_cast(4) * kGB; +#endif // !defined(CPPGC_2GB_CAGE) constexpr size_t kCagedHeapReservationAlignment = kCagedHeapReservationSize; -#endif +#endif // defined(CPPGC_CAGED_HEAP) static constexpr size_t kDefaultAlignment = sizeof(void*); diff --git a/deps/v8/include/cppgc/internal/base-page-handle.h b/deps/v8/include/cppgc/internal/base-page-handle.h new file mode 100644 index 00000000000000..9c6907555e21d4 --- /dev/null +++ b/deps/v8/include/cppgc/internal/base-page-handle.h @@ -0,0 +1,45 @@ +// Copyright 2022 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef INCLUDE_CPPGC_INTERNAL_BASE_PAGE_HANDLE_H_ +#define INCLUDE_CPPGC_INTERNAL_BASE_PAGE_HANDLE_H_ + +#include "cppgc/heap-handle.h" +#include "cppgc/internal/api-constants.h" +#include "cppgc/internal/logging.h" +#include "v8config.h" // NOLINT(build/include_directory) + +namespace cppgc { +namespace internal { + +// The class is needed in the header to allow for fast access to HeapHandle in +// the write barrier. +class BasePageHandle { + public: + static V8_INLINE BasePageHandle* FromPayload(void* payload) { + return reinterpret_cast( + (reinterpret_cast(payload) & + ~(api_constants::kPageSize - 1)) + + api_constants::kGuardPageSize); + } + static V8_INLINE const BasePageHandle* FromPayload(const void* payload) { + return FromPayload(const_cast(payload)); + } + + HeapHandle& heap_handle() { return heap_handle_; } + const HeapHandle& heap_handle() const { return heap_handle_; } + + protected: + explicit BasePageHandle(HeapHandle& heap_handle) : heap_handle_(heap_handle) { + CPPGC_DCHECK(reinterpret_cast(this) % api_constants::kPageSize == + api_constants::kGuardPageSize); + } + + HeapHandle& heap_handle_; +}; + +} // namespace internal +} // namespace cppgc + +#endif // INCLUDE_CPPGC_INTERNAL_BASE_PAGE_HANDLE_H_ diff --git a/deps/v8/include/cppgc/internal/caged-heap-local-data.h b/deps/v8/include/cppgc/internal/caged-heap-local-data.h index a27649c17fce5b..7d689f87e71da1 100644 --- a/deps/v8/include/cppgc/internal/caged-heap-local-data.h +++ b/deps/v8/include/cppgc/internal/caged-heap-local-data.h @@ -10,46 +10,76 @@ #include #include "cppgc/internal/api-constants.h" +#include "cppgc/internal/caged-heap.h" #include "cppgc/internal/logging.h" #include "cppgc/platform.h" #include "v8config.h" // NOLINT(build/include_directory) +#if __cpp_lib_bitopts +#include +#endif // __cpp_lib_bitopts + +#if defined(CPPGC_CAGED_HEAP) + namespace cppgc { namespace internal { class HeapBase; +class HeapBaseHandle; #if defined(CPPGC_YOUNG_GENERATION) // AgeTable is the bytemap needed for the fast generation check in the write -// barrier. AgeTable contains entries that correspond to 512 bytes memory +// barrier. AgeTable contains entries that correspond to 4096 bytes memory // regions (cards). Each entry in the table represents generation of the objects // that reside on the corresponding card (young, old or mixed). -class AgeTable final { +class V8_EXPORT AgeTable final { static constexpr size_t kRequiredSize = 1 * api_constants::kMB; static constexpr size_t kAllocationGranularity = api_constants::kAllocationGranularity; public: + // Represents age of the objects living on a single card. enum class Age : uint8_t { kOld, kYoung, kMixed }; + // When setting age for a range, consider or ignore ages of the adjacent + // cards. + enum class AdjacentCardsPolicy : uint8_t { kConsider, kIgnore }; static constexpr size_t kCardSizeInBytes = - (api_constants::kCagedHeapReservationSize / kAllocationGranularity) / - kRequiredSize; + api_constants::kCagedHeapReservationSize / kRequiredSize; void SetAge(uintptr_t cage_offset, Age age) { table_[card(cage_offset)] = age; } + V8_INLINE Age GetAge(uintptr_t cage_offset) const { return table_[card(cage_offset)]; } - void Reset(PageAllocator* allocator); + void SetAgeForRange(uintptr_t cage_offset_begin, uintptr_t cage_offset_end, + Age age, AdjacentCardsPolicy adjacent_cards_policy); + + Age GetAgeForRange(uintptr_t cage_offset_begin, + uintptr_t cage_offset_end) const; + + void ResetForTesting(); private: V8_INLINE size_t card(uintptr_t offset) const { constexpr size_t kGranularityBits = +#if __cpp_lib_bitopts + std::countr_zero(static_cast(kCardSizeInBytes)); +#elif V8_HAS_BUILTIN_CTZ __builtin_ctz(static_cast(kCardSizeInBytes)); +#else //! V8_HAS_BUILTIN_CTZ + // Hardcode and check with assert. +#if defined(CPPGC_2GB_CAGE) + 11; +#else // !defined(CPPGC_2GB_CAGE) + 12; +#endif // !defined(CPPGC_2GB_CAGE) +#endif // !V8_HAS_BUILTIN_CTZ + static_assert((1 << kGranularityBits) == kCardSizeInBytes); const size_t entry = offset >> kGranularityBits; CPPGC_DCHECK(table_.size() > entry); return entry; @@ -64,10 +94,10 @@ static_assert(sizeof(AgeTable) == 1 * api_constants::kMB, #endif // CPPGC_YOUNG_GENERATION struct CagedHeapLocalData final { - CagedHeapLocalData(HeapBase&, PageAllocator&); + V8_INLINE static CagedHeapLocalData& Get() { + return *reinterpret_cast(CagedHeapBase::GetBase()); + } - bool is_incremental_marking_in_progress = false; - HeapBase& heap_base; #if defined(CPPGC_YOUNG_GENERATION) AgeTable age_table; #endif @@ -76,4 +106,6 @@ struct CagedHeapLocalData final { } // namespace internal } // namespace cppgc +#endif // defined(CPPGC_CAGED_HEAP) + #endif // INCLUDE_CPPGC_INTERNAL_CAGED_HEAP_LOCAL_DATA_H_ diff --git a/deps/v8/include/cppgc/internal/caged-heap.h b/deps/v8/include/cppgc/internal/caged-heap.h new file mode 100644 index 00000000000000..4db42aee089b5d --- /dev/null +++ b/deps/v8/include/cppgc/internal/caged-heap.h @@ -0,0 +1,61 @@ +// Copyright 2022 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef INCLUDE_CPPGC_INTERNAL_CAGED_HEAP_H_ +#define INCLUDE_CPPGC_INTERNAL_CAGED_HEAP_H_ + +#include +#include + +#include "cppgc/internal/api-constants.h" +#include "cppgc/internal/base-page-handle.h" +#include "v8config.h" // NOLINT(build/include_directory) + +#if defined(CPPGC_CAGED_HEAP) + +namespace cppgc { +namespace internal { + +class V8_EXPORT CagedHeapBase { + public: + V8_INLINE static uintptr_t OffsetFromAddress(const void* address) { + return reinterpret_cast(address) & + (api_constants::kCagedHeapReservationAlignment - 1); + } + + V8_INLINE static bool IsWithinCage(const void* address) { + CPPGC_DCHECK(g_heap_base_); + return (reinterpret_cast(address) & + ~(api_constants::kCagedHeapReservationAlignment - 1)) == + g_heap_base_; + } + + V8_INLINE static bool AreWithinCage(const void* addr1, const void* addr2) { +#if defined(CPPGC_2GB_CAGE) + static constexpr size_t kHalfWordShift = sizeof(uint32_t) * CHAR_BIT - 1; +#else //! defined(CPPGC_2GB_CAGE) + static constexpr size_t kHalfWordShift = sizeof(uint32_t) * CHAR_BIT; +#endif //! defined(CPPGC_2GB_CAGE) + static_assert((static_cast(1) << kHalfWordShift) == + api_constants::kCagedHeapReservationSize); + CPPGC_DCHECK(g_heap_base_); + return !(((reinterpret_cast(addr1) ^ g_heap_base_) | + (reinterpret_cast(addr2) ^ g_heap_base_)) >> + kHalfWordShift); + } + + V8_INLINE static uintptr_t GetBase() { return g_heap_base_; } + + private: + friend class CagedHeap; + + static uintptr_t g_heap_base_; +}; + +} // namespace internal +} // namespace cppgc + +#endif // defined(CPPGC_CAGED_HEAP) + +#endif // INCLUDE_CPPGC_INTERNAL_CAGED_HEAP_H_ diff --git a/deps/v8/include/cppgc/internal/gc-info.h b/deps/v8/include/cppgc/internal/gc-info.h index 82a0d053431f8a..e8f90fed57109f 100644 --- a/deps/v8/include/cppgc/internal/gc-info.h +++ b/deps/v8/include/cppgc/internal/gc-info.h @@ -48,7 +48,6 @@ struct V8_EXPORT EnsureGCInfoIndexTrait final { static GCInfoIndex EnsureGCInfoIndexNonPolymorphic(std::atomic&, TraceCallback, FinalizationCallback, - NameCallback); static GCInfoIndex EnsureGCInfoIndexNonPolymorphic(std::atomic&, TraceCallback, diff --git a/deps/v8/include/cppgc/internal/member-storage.h b/deps/v8/include/cppgc/internal/member-storage.h new file mode 100644 index 00000000000000..98389b8cd3d531 --- /dev/null +++ b/deps/v8/include/cppgc/internal/member-storage.h @@ -0,0 +1,236 @@ +// Copyright 2022 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef INCLUDE_CPPGC_INTERNAL_MEMBER_STORAGE_H_ +#define INCLUDE_CPPGC_INTERNAL_MEMBER_STORAGE_H_ + +#include +#include +#include + +#include "cppgc/internal/api-constants.h" +#include "cppgc/internal/logging.h" +#include "cppgc/sentinel-pointer.h" +#include "v8config.h" // NOLINT(build/include_directory) + +namespace cppgc { +namespace internal { + +#if defined(CPPGC_POINTER_COMPRESSION) + +#if defined(__clang__) +// Attribute const allows the compiler to assume that CageBaseGlobal::g_base_ +// doesn't change (e.g. across calls) and thereby avoid redundant loads. +#define CPPGC_CONST __attribute__((const)) +#define CPPGC_REQUIRE_CONSTANT_INIT \ + __attribute__((require_constant_initialization)) +#else // defined(__clang__) +#define CPPGC_CONST +#define CPPGC_REQUIRE_CONSTANT_INIT +#endif // defined(__clang__) + +class CageBaseGlobal final { + public: + V8_INLINE CPPGC_CONST static uintptr_t Get() { + CPPGC_DCHECK(IsBaseConsistent()); + return g_base_; + } + + V8_INLINE CPPGC_CONST static bool IsSet() { + CPPGC_DCHECK(IsBaseConsistent()); + return (g_base_ & ~kLowerHalfWordMask) != 0; + } + + private: + // We keep the lower halfword as ones to speed up decompression. + static constexpr uintptr_t kLowerHalfWordMask = + (api_constants::kCagedHeapReservationAlignment - 1); + + static V8_EXPORT uintptr_t g_base_ CPPGC_REQUIRE_CONSTANT_INIT; + + CageBaseGlobal() = delete; + + V8_INLINE static bool IsBaseConsistent() { + return kLowerHalfWordMask == (g_base_ & kLowerHalfWordMask); + } + + friend class CageBaseGlobalUpdater; +}; + +#undef CPPGC_REQUIRE_CONSTANT_INIT +#undef CPPGC_CONST + +class CompressedPointer final { + public: + using IntegralType = uint32_t; + + V8_INLINE CompressedPointer() : value_(0u) {} + V8_INLINE explicit CompressedPointer(const void* ptr) + : value_(Compress(ptr)) {} + V8_INLINE explicit CompressedPointer(std::nullptr_t) : value_(0u) {} + V8_INLINE explicit CompressedPointer(SentinelPointer) + : value_(kCompressedSentinel) {} + + V8_INLINE const void* Load() const { return Decompress(value_); } + V8_INLINE const void* LoadAtomic() const { + return Decompress( + reinterpret_cast&>(value_).load( + std::memory_order_relaxed)); + } + + V8_INLINE void Store(const void* ptr) { value_ = Compress(ptr); } + V8_INLINE void StoreAtomic(const void* value) { + reinterpret_cast&>(value_).store( + Compress(value), std::memory_order_relaxed); + } + + V8_INLINE void Clear() { value_ = 0u; } + V8_INLINE bool IsCleared() const { return !value_; } + + V8_INLINE bool IsSentinel() const { return value_ == kCompressedSentinel; } + + V8_INLINE uint32_t GetAsInteger() const { return value_; } + + V8_INLINE friend bool operator==(CompressedPointer a, CompressedPointer b) { + return a.value_ == b.value_; + } + V8_INLINE friend bool operator!=(CompressedPointer a, CompressedPointer b) { + return a.value_ != b.value_; + } + V8_INLINE friend bool operator<(CompressedPointer a, CompressedPointer b) { + return a.value_ < b.value_; + } + V8_INLINE friend bool operator<=(CompressedPointer a, CompressedPointer b) { + return a.value_ <= b.value_; + } + V8_INLINE friend bool operator>(CompressedPointer a, CompressedPointer b) { + return a.value_ > b.value_; + } + V8_INLINE friend bool operator>=(CompressedPointer a, CompressedPointer b) { + return a.value_ >= b.value_; + } + + static V8_INLINE IntegralType Compress(const void* ptr) { + static_assert( + SentinelPointer::kSentinelValue == 0b10, + "The compression scheme relies on the sentinel encoded as 0b10"); + static constexpr size_t kGigaCageMask = + ~(api_constants::kCagedHeapReservationAlignment - 1); + + CPPGC_DCHECK(CageBaseGlobal::IsSet()); + const uintptr_t base = CageBaseGlobal::Get(); + CPPGC_DCHECK(!ptr || ptr == kSentinelPointer || + (base & kGigaCageMask) == + (reinterpret_cast(ptr) & kGigaCageMask)); + +#if defined(CPPGC_2GB_CAGE) + // Truncate the pointer. + auto compressed = + static_cast(reinterpret_cast(ptr)); +#else // !defined(CPPGC_2GB_CAGE) + const auto uptr = reinterpret_cast(ptr); + // Shift the pointer by one and truncate. + auto compressed = static_cast(uptr >> 1); +#endif // !defined(CPPGC_2GB_CAGE) + // Normal compressed pointers must have the MSB set. + CPPGC_DCHECK((!compressed || compressed == kCompressedSentinel) || + (compressed & (1 << 31))); + return compressed; + } + + static V8_INLINE void* Decompress(IntegralType ptr) { + CPPGC_DCHECK(CageBaseGlobal::IsSet()); + const uintptr_t base = CageBaseGlobal::Get(); + // Treat compressed pointer as signed and cast it to uint64_t, which will + // sign-extend it. +#if defined(CPPGC_2GB_CAGE) + const uint64_t mask = static_cast(static_cast(ptr)); +#else // !defined(CPPGC_2GB_CAGE) + // Then, shift the result by one. It's important to shift the unsigned + // value, as otherwise it would result in undefined behavior. + const uint64_t mask = static_cast(static_cast(ptr)) << 1; +#endif // !defined(CPPGC_2GB_CAGE) + return reinterpret_cast(mask & base); + } + + private: +#if defined(CPPGC_2GB_CAGE) + static constexpr IntegralType kCompressedSentinel = + SentinelPointer::kSentinelValue; +#else // !defined(CPPGC_2GB_CAGE) + static constexpr IntegralType kCompressedSentinel = + SentinelPointer::kSentinelValue >> 1; +#endif // !defined(CPPGC_2GB_CAGE) + // All constructors initialize `value_`. Do not add a default value here as it + // results in a non-atomic write on some builds, even when the atomic version + // of the constructor is used. + IntegralType value_; +}; + +#endif // defined(CPPGC_POINTER_COMPRESSION) + +class RawPointer final { + public: + using IntegralType = uintptr_t; + + V8_INLINE RawPointer() : ptr_(nullptr) {} + V8_INLINE explicit RawPointer(const void* ptr) : ptr_(ptr) {} + + V8_INLINE const void* Load() const { return ptr_; } + V8_INLINE const void* LoadAtomic() const { + return reinterpret_cast&>(ptr_).load( + std::memory_order_relaxed); + } + + V8_INLINE void Store(const void* ptr) { ptr_ = ptr; } + V8_INLINE void StoreAtomic(const void* ptr) { + reinterpret_cast&>(ptr_).store( + ptr, std::memory_order_relaxed); + } + + V8_INLINE void Clear() { ptr_ = nullptr; } + V8_INLINE bool IsCleared() const { return !ptr_; } + + V8_INLINE bool IsSentinel() const { return ptr_ == kSentinelPointer; } + + V8_INLINE uintptr_t GetAsInteger() const { + return reinterpret_cast(ptr_); + } + + V8_INLINE friend bool operator==(RawPointer a, RawPointer b) { + return a.ptr_ == b.ptr_; + } + V8_INLINE friend bool operator!=(RawPointer a, RawPointer b) { + return a.ptr_ != b.ptr_; + } + V8_INLINE friend bool operator<(RawPointer a, RawPointer b) { + return a.ptr_ < b.ptr_; + } + V8_INLINE friend bool operator<=(RawPointer a, RawPointer b) { + return a.ptr_ <= b.ptr_; + } + V8_INLINE friend bool operator>(RawPointer a, RawPointer b) { + return a.ptr_ > b.ptr_; + } + V8_INLINE friend bool operator>=(RawPointer a, RawPointer b) { + return a.ptr_ >= b.ptr_; + } + + private: + // All constructors initialize `ptr_`. Do not add a default value here as it + // results in a non-atomic write on some builds, even when the atomic version + // of the constructor is used. + const void* ptr_; +}; + +#if defined(CPPGC_POINTER_COMPRESSION) +using MemberStorage = CompressedPointer; +#else // !defined(CPPGC_POINTER_COMPRESSION) +using MemberStorage = RawPointer; +#endif // !defined(CPPGC_POINTER_COMPRESSION) + +} // namespace internal +} // namespace cppgc + +#endif // INCLUDE_CPPGC_INTERNAL_MEMBER_STORAGE_H_ diff --git a/deps/v8/include/cppgc/internal/name-trait.h b/deps/v8/include/cppgc/internal/name-trait.h index 32a334785926d7..1d927a9d0a962c 100644 --- a/deps/v8/include/cppgc/internal/name-trait.h +++ b/deps/v8/include/cppgc/internal/name-trait.h @@ -6,6 +6,7 @@ #define INCLUDE_CPPGC_INTERNAL_NAME_TRAIT_H_ #include +#include #include #include "cppgc/name-provider.h" @@ -58,6 +59,11 @@ struct HeapObjectName { bool name_was_hidden; }; +enum class HeapObjectNameForUnnamedObject : uint8_t { + kUseClassNameIfSupported, + kUseHiddenName, +}; + class V8_EXPORT NameTraitBase { protected: static HeapObjectName GetNameFromTypeSignature(const char*); @@ -78,16 +84,24 @@ class NameTrait final : public NameTraitBase { #endif // !CPPGC_SUPPORTS_OBJECT_NAMES } - static HeapObjectName GetName(const void* obj) { - return GetNameFor(static_cast(obj)); + static HeapObjectName GetName( + const void* obj, HeapObjectNameForUnnamedObject name_retrieval_mode) { + return GetNameFor(static_cast(obj), name_retrieval_mode); } private: - static HeapObjectName GetNameFor(const NameProvider* name_provider) { + static HeapObjectName GetNameFor(const NameProvider* name_provider, + HeapObjectNameForUnnamedObject) { + // Objects inheriting from `NameProvider` are not considered unnamed as + // users already provided a name for them. return {name_provider->GetHumanReadableName(), false}; } - static HeapObjectName GetNameFor(...) { + static HeapObjectName GetNameFor( + const void*, HeapObjectNameForUnnamedObject name_retrieval_mode) { + if (name_retrieval_mode == HeapObjectNameForUnnamedObject::kUseHiddenName) + return {NameProvider::kHiddenName, true}; + #if CPPGC_SUPPORTS_COMPILE_TIME_TYPENAME return {GetTypename(), false}; #elif CPPGC_SUPPORTS_OBJECT_NAMES @@ -102,7 +116,7 @@ class NameTrait final : public NameTraitBase { static const HeapObjectName leaky_name = GetNameFromTypeSignature(PRETTY_FUNCTION_VALUE); - return {leaky_name, false}; + return leaky_name; #undef PRETTY_FUNCTION_VALUE @@ -112,7 +126,8 @@ class NameTrait final : public NameTraitBase { } }; -using NameCallback = HeapObjectName (*)(const void*); +using NameCallback = HeapObjectName (*)(const void*, + HeapObjectNameForUnnamedObject); } // namespace internal } // namespace cppgc diff --git a/deps/v8/include/cppgc/internal/persistent-node.h b/deps/v8/include/cppgc/internal/persistent-node.h index 22b4cf093c110f..d22692a768c49f 100644 --- a/deps/v8/include/cppgc/internal/persistent-node.h +++ b/deps/v8/include/cppgc/internal/persistent-node.h @@ -14,13 +14,11 @@ #include "v8config.h" // NOLINT(build/include_directory) namespace cppgc { - -class Visitor; - namespace internal { class CrossThreadPersistentRegion; class FatalOutOfMemoryHandler; +class RootVisitor; // PersistentNode represents a variant of two states: // 1) traceable node with a back pointer to the Persistent object; @@ -32,7 +30,7 @@ class PersistentNode final { PersistentNode(const PersistentNode&) = delete; PersistentNode& operator=(const PersistentNode&) = delete; - void InitializeAsUsedNode(void* owner, TraceCallback trace) { + void InitializeAsUsedNode(void* owner, TraceRootCallback trace) { CPPGC_DCHECK(trace); owner_ = owner; trace_ = trace; @@ -53,9 +51,9 @@ class PersistentNode final { return next_; } - void Trace(Visitor* visitor) const { + void Trace(RootVisitor& root_visitor) const { CPPGC_DCHECK(IsUsed()); - trace_(visitor, owner_); + trace_(root_visitor, owner_); } bool IsUsed() const { return trace_; } @@ -73,7 +71,7 @@ class PersistentNode final { void* owner_ = nullptr; PersistentNode* next_; }; - TraceCallback trace_ = nullptr; + TraceRootCallback trace_ = nullptr; }; class V8_EXPORT PersistentRegionBase { @@ -86,7 +84,7 @@ class V8_EXPORT PersistentRegionBase { PersistentRegionBase(const PersistentRegionBase&) = delete; PersistentRegionBase& operator=(const PersistentRegionBase&) = delete; - void Trace(Visitor*); + void Iterate(RootVisitor&); size_t NodesInUse() const; @@ -96,7 +94,7 @@ class V8_EXPORT PersistentRegionBase { explicit PersistentRegionBase(const FatalOutOfMemoryHandler& oom_handler); PersistentNode* TryAllocateNodeFromFreeList(void* owner, - TraceCallback trace) { + TraceRootCallback trace) { PersistentNode* node = nullptr; if (V8_LIKELY(free_list_head_)) { node = free_list_head_; @@ -118,7 +116,7 @@ class V8_EXPORT PersistentRegionBase { } PersistentNode* RefillFreeListAndAllocateNode(void* owner, - TraceCallback trace); + TraceRootCallback trace); private: template @@ -145,7 +143,7 @@ class V8_EXPORT PersistentRegion final : public PersistentRegionBase { PersistentRegion(const PersistentRegion&) = delete; PersistentRegion& operator=(const PersistentRegion&) = delete; - V8_INLINE PersistentNode* AllocateNode(void* owner, TraceCallback trace) { + V8_INLINE PersistentNode* AllocateNode(void* owner, TraceRootCallback trace) { CPPGC_DCHECK(IsCreationThread()); auto* node = TryAllocateNodeFromFreeList(owner, trace); if (V8_LIKELY(node)) return node; @@ -189,7 +187,7 @@ class V8_EXPORT CrossThreadPersistentRegion final CrossThreadPersistentRegion& operator=(const CrossThreadPersistentRegion&) = delete; - V8_INLINE PersistentNode* AllocateNode(void* owner, TraceCallback trace) { + V8_INLINE PersistentNode* AllocateNode(void* owner, TraceRootCallback trace) { PersistentRegionLock::AssertLocked(); auto* node = TryAllocateNodeFromFreeList(owner, trace); if (V8_LIKELY(node)) return node; @@ -202,7 +200,7 @@ class V8_EXPORT CrossThreadPersistentRegion final PersistentRegionBase::FreeNode(node); } - void Trace(Visitor*); + void Iterate(RootVisitor&); size_t NodesInUse() const; diff --git a/deps/v8/include/cppgc/internal/pointer-policies.h b/deps/v8/include/cppgc/internal/pointer-policies.h index 853d7031530979..8455b3df8196b4 100644 --- a/deps/v8/include/cppgc/internal/pointer-policies.h +++ b/deps/v8/include/cppgc/internal/pointer-policies.h @@ -8,6 +8,7 @@ #include #include +#include "cppgc/internal/member-storage.h" #include "cppgc/internal/write-barrier.h" #include "cppgc/sentinel-pointer.h" #include "cppgc/source-location.h" @@ -27,15 +28,34 @@ class WeakMemberTag; class UntracedMemberTag; struct DijkstraWriteBarrierPolicy { - static void InitializingBarrier(const void*, const void*) { + V8_INLINE static void InitializingBarrier(const void*, const void*) { // Since in initializing writes the source object is always white, having no // barrier doesn't break the tri-color invariant. } - static void AssigningBarrier(const void* slot, const void* value) { + + V8_INLINE static void AssigningBarrier(const void* slot, const void* value) { + WriteBarrier::Params params; + const WriteBarrier::Type type = + WriteBarrier::GetWriteBarrierType(slot, value, params); + WriteBarrier(type, params, slot, value); + } + + V8_INLINE static void AssigningBarrier(const void* slot, + MemberStorage storage) { WriteBarrier::Params params; - switch (WriteBarrier::GetWriteBarrierType(slot, value, params)) { + const WriteBarrier::Type type = + WriteBarrier::GetWriteBarrierType(slot, storage, params); + WriteBarrier(type, params, slot, storage.Load()); + } + + private: + V8_INLINE static void WriteBarrier(WriteBarrier::Type type, + const WriteBarrier::Params& params, + const void* slot, const void* value) { + switch (type) { case WriteBarrier::Type::kGenerational: - WriteBarrier::GenerationalBarrier(params, slot); + WriteBarrier::GenerationalBarrier< + WriteBarrier::GenerationalBarrierType::kPreciseSlot>(params, slot); break; case WriteBarrier::Type::kMarking: WriteBarrier::DijkstraMarkingBarrier(params, value); @@ -47,8 +67,9 @@ struct DijkstraWriteBarrierPolicy { }; struct NoWriteBarrierPolicy { - static void InitializingBarrier(const void*, const void*) {} - static void AssigningBarrier(const void*, const void*) {} + V8_INLINE static void InitializingBarrier(const void*, const void*) {} + V8_INLINE static void AssigningBarrier(const void*, const void*) {} + V8_INLINE static void AssigningBarrier(const void*, MemberStorage) {} }; class V8_EXPORT SameThreadEnabledCheckingPolicyBase { @@ -89,7 +110,7 @@ class V8_EXPORT SameThreadEnabledCheckingPolicy class DisabledCheckingPolicy { protected: - void CheckPointer(const void*) {} + V8_INLINE void CheckPointer(const void*) {} }; #ifdef DEBUG diff --git a/deps/v8/include/cppgc/internal/write-barrier.h b/deps/v8/include/cppgc/internal/write-barrier.h index bfabc31e13a969..2d8e14be086d64 100644 --- a/deps/v8/include/cppgc/internal/write-barrier.h +++ b/deps/v8/include/cppgc/internal/write-barrier.h @@ -8,9 +8,11 @@ #include #include +#include "cppgc/heap-handle.h" #include "cppgc/heap-state.h" #include "cppgc/internal/api-constants.h" #include "cppgc/internal/atomic-entry-flag.h" +#include "cppgc/internal/member-storage.h" #include "cppgc/platform.h" #include "cppgc/sentinel-pointer.h" #include "cppgc/trace-trait.h" @@ -18,6 +20,7 @@ #if defined(CPPGC_CAGED_HEAP) #include "cppgc/internal/caged-heap-local-data.h" +#include "cppgc/internal/caged-heap.h" #endif namespace cppgc { @@ -40,16 +43,18 @@ class V8_EXPORT WriteBarrier final { kGenerational, }; + enum class GenerationalBarrierType : uint8_t { + kPreciseSlot, + kPreciseUncompressedSlot, + kImpreciseSlot, + }; + struct Params { HeapHandle* heap = nullptr; #if V8_ENABLE_CHECKS Type type = Type::kNone; #endif // !V8_ENABLE_CHECKS #if defined(CPPGC_CAGED_HEAP) - uintptr_t start = 0; - CagedHeapLocalData& caged_heap() const { - return *reinterpret_cast(start); - } uintptr_t slot_offset = 0; uintptr_t value_offset = 0; #endif // CPPGC_CAGED_HEAP @@ -63,6 +68,9 @@ class V8_EXPORT WriteBarrier final { // Returns the required write barrier for a given `slot` and `value`. static V8_INLINE Type GetWriteBarrierType(const void* slot, const void* value, Params& params); + // Returns the required write barrier for a given `slot` and `value`. + static V8_INLINE Type GetWriteBarrierType(const void* slot, MemberStorage, + Params& params); // Returns the required write barrier for a given `slot`. template static V8_INLINE Type GetWriteBarrierType(const void* slot, Params& params, @@ -78,15 +86,13 @@ class V8_EXPORT WriteBarrier final { static V8_INLINE void SteeleMarkingBarrier(const Params& params, const void* object); #if defined(CPPGC_YOUNG_GENERATION) + template static V8_INLINE void GenerationalBarrier(const Params& params, const void* slot); - static V8_INLINE void GenerationalBarrierForSourceObject( - const Params& params, const void* inner_pointer); #else // !CPPGC_YOUNG_GENERATION + template static V8_INLINE void GenerationalBarrier(const Params& params, - const void* slot) {} - static V8_INLINE void GenerationalBarrierForSourceObject( - const Params& params, const void* inner_pointer) {} + const void* slot){} #endif // CPPGC_YOUNG_GENERATION #if V8_ENABLE_CHECKS @@ -95,12 +101,10 @@ class V8_EXPORT WriteBarrier final { static void CheckParams(Type expected_type, const Params& params) {} #endif // !V8_ENABLE_CHECKS - // The IncrementalOrConcurrentUpdater class allows cppgc internal to update - // |incremental_or_concurrent_marking_flag_|. - class IncrementalOrConcurrentMarkingFlagUpdater; - static bool IsAnyIncrementalOrConcurrentMarking() { - return incremental_or_concurrent_marking_flag_.MightBeEntered(); - } + // The FlagUpdater class allows cppgc internal to update + // |write_barrier_enabled_|. + class FlagUpdater; + static bool IsEnabled() { return write_barrier_enabled_.MightBeEntered(); } private: WriteBarrier() = delete; @@ -125,17 +129,23 @@ class V8_EXPORT WriteBarrier final { static CagedHeapLocalData& GetLocalData(HeapHandle&); static void GenerationalBarrierSlow(const CagedHeapLocalData& local_data, const AgeTable& age_table, - const void* slot, uintptr_t value_offset); + const void* slot, uintptr_t value_offset, + HeapHandle* heap_handle); + static void GenerationalBarrierForUncompressedSlotSlow( + const CagedHeapLocalData& local_data, const AgeTable& age_table, + const void* slot, uintptr_t value_offset, HeapHandle* heap_handle); static void GenerationalBarrierForSourceObjectSlow( - const CagedHeapLocalData& local_data, const void* object); + const CagedHeapLocalData& local_data, const void* object, + HeapHandle* heap_handle); #endif // CPPGC_YOUNG_GENERATION - static AtomicEntryFlag incremental_or_concurrent_marking_flag_; + static AtomicEntryFlag write_barrier_enabled_; }; template V8_INLINE WriteBarrier::Type SetAndReturnType(WriteBarrier::Params& params) { - if (type == WriteBarrier::Type::kNone) return WriteBarrier::Type::kNone; + if constexpr (type == WriteBarrier::Type::kNone) + return WriteBarrier::Type::kNone; #if V8_ENABLE_CHECKS params.type = type; #endif // !V8_ENABLE_CHECKS @@ -152,6 +162,13 @@ class V8_EXPORT WriteBarrierTypeForCagedHeapPolicy final { return ValueModeDispatch::Get(slot, value, params, callback); } + template + static V8_INLINE WriteBarrier::Type Get(const void* slot, MemberStorage value, + WriteBarrier::Params& params, + HeapHandleCallback callback) { + return ValueModeDispatch::Get(slot, value, params, callback); + } + template static V8_INLINE WriteBarrier::Type Get(const void* value, WriteBarrier::Params& params, @@ -166,69 +183,77 @@ class V8_EXPORT WriteBarrierTypeForCagedHeapPolicy final { static V8_INLINE WriteBarrier::Type GetNoSlot(const void* value, WriteBarrier::Params& params, HeapHandleCallback) { - if (!TryGetCagedHeap(value, value, params)) { - return WriteBarrier::Type::kNone; - } - if (V8_UNLIKELY(params.caged_heap().is_incremental_marking_in_progress)) { + const bool within_cage = CagedHeapBase::IsWithinCage(value); + if (!within_cage) return WriteBarrier::Type::kNone; + + // We know that |value| points either within the normal page or to the + // beginning of large-page, so extract the page header by bitmasking. + BasePageHandle* page = + BasePageHandle::FromPayload(const_cast(value)); + + HeapHandle& heap_handle = page->heap_handle(); + if (V8_UNLIKELY(heap_handle.is_incremental_marking_in_progress())) { return SetAndReturnType(params); } + return SetAndReturnType(params); } template struct ValueModeDispatch; - - static V8_INLINE bool TryGetCagedHeap(const void* slot, const void* value, - WriteBarrier::Params& params) { - // TODO(chromium:1056170): Check if the null check can be folded in with - // the rest of the write barrier. - if (!value) return false; - params.start = reinterpret_cast(value) & - ~(api_constants::kCagedHeapReservationAlignment - 1); - const uintptr_t slot_offset = - reinterpret_cast(slot) - params.start; - if (slot_offset > api_constants::kCagedHeapReservationSize) { - // Check if slot is on stack or value is sentinel or nullptr. This relies - // on the fact that kSentinelPointer is encoded as 0x1. - return false; - } - return true; - } - - // Returns whether marking is in progress. If marking is not in progress - // sets the start of the cage accordingly. - // - // TODO(chromium:1056170): Create fast path on API. - static bool IsMarking(const HeapHandle&, WriteBarrier::Params&); }; template <> struct WriteBarrierTypeForCagedHeapPolicy::ValueModeDispatch< WriteBarrier::ValueMode::kValuePresent> { + template + static V8_INLINE WriteBarrier::Type Get(const void* slot, + MemberStorage storage, + WriteBarrier::Params& params, + HeapHandleCallback) { + if (V8_LIKELY(!WriteBarrier::IsEnabled())) + return SetAndReturnType(params); + + return BarrierEnabledGet(slot, storage.Load(), params); + } + template static V8_INLINE WriteBarrier::Type Get(const void* slot, const void* value, WriteBarrier::Params& params, HeapHandleCallback) { -#if !defined(CPPGC_YOUNG_GENERATION) - if (V8_LIKELY(!WriteBarrier::IsAnyIncrementalOrConcurrentMarking())) { + if (V8_LIKELY(!WriteBarrier::IsEnabled())) return SetAndReturnType(params); - } -#endif // !CPPGC_YOUNG_GENERATION - bool within_cage = TryGetCagedHeap(slot, value, params); - if (!within_cage) { - return WriteBarrier::Type::kNone; - } - if (V8_LIKELY(!params.caged_heap().is_incremental_marking_in_progress)) { + + return BarrierEnabledGet(slot, value, params); + } + + private: + static V8_INLINE WriteBarrier::Type BarrierEnabledGet( + const void* slot, const void* value, WriteBarrier::Params& params) { + const bool within_cage = CagedHeapBase::AreWithinCage(slot, value); + if (!within_cage) return WriteBarrier::Type::kNone; + + // We know that |value| points either within the normal page or to the + // beginning of large-page, so extract the page header by bitmasking. + BasePageHandle* page = + BasePageHandle::FromPayload(const_cast(value)); + + HeapHandle& heap_handle = page->heap_handle(); + if (V8_LIKELY(!heap_handle.is_incremental_marking_in_progress())) { #if defined(CPPGC_YOUNG_GENERATION) - params.heap = reinterpret_cast(params.start); - params.slot_offset = reinterpret_cast(slot) - params.start; - params.value_offset = reinterpret_cast(value) - params.start; + if (!heap_handle.is_young_generation_enabled()) + return WriteBarrier::Type::kNone; + params.heap = &heap_handle; + params.slot_offset = CagedHeapBase::OffsetFromAddress(slot); + params.value_offset = CagedHeapBase::OffsetFromAddress(value); return SetAndReturnType(params); #else // !CPPGC_YOUNG_GENERATION return SetAndReturnType(params); #endif // !CPPGC_YOUNG_GENERATION } - params.heap = reinterpret_cast(params.start); + + // Use marking barrier. + params.heap = &heap_handle; return SetAndReturnType(params); } }; @@ -240,28 +265,28 @@ struct WriteBarrierTypeForCagedHeapPolicy::ValueModeDispatch< static V8_INLINE WriteBarrier::Type Get(const void* slot, const void*, WriteBarrier::Params& params, HeapHandleCallback callback) { -#if defined(CPPGC_YOUNG_GENERATION) + if (V8_LIKELY(!WriteBarrier::IsEnabled())) + return SetAndReturnType(params); + HeapHandle& handle = callback(); - if (V8_LIKELY(!IsMarking(handle, params))) { - // params.start is populated by IsMarking(). +#if defined(CPPGC_YOUNG_GENERATION) + if (V8_LIKELY(!handle.is_incremental_marking_in_progress())) { + if (!handle.is_young_generation_enabled()) { + return WriteBarrier::Type::kNone; + } params.heap = &handle; - params.slot_offset = reinterpret_cast(slot) - params.start; - // params.value_offset stays 0. - if (params.slot_offset > api_constants::kCagedHeapReservationSize) { - // Check if slot is on stack. + // Check if slot is on stack. + if (V8_UNLIKELY(!CagedHeapBase::IsWithinCage(slot))) { return SetAndReturnType(params); } + params.slot_offset = CagedHeapBase::OffsetFromAddress(slot); return SetAndReturnType(params); } -#else // !CPPGC_YOUNG_GENERATION - if (V8_LIKELY(!WriteBarrier::IsAnyIncrementalOrConcurrentMarking())) { - return SetAndReturnType(params); - } - HeapHandle& handle = callback(); +#else // !defined(CPPGC_YOUNG_GENERATION) if (V8_UNLIKELY(!subtle::HeapState::IsMarking(handle))) { return SetAndReturnType(params); } -#endif // !CPPGC_YOUNG_GENERATION +#endif // !defined(CPPGC_YOUNG_GENERATION) params.heap = &handle; return SetAndReturnType(params); } @@ -278,6 +303,16 @@ class V8_EXPORT WriteBarrierTypeForNonCagedHeapPolicy final { return ValueModeDispatch::Get(slot, value, params, callback); } + template + static V8_INLINE WriteBarrier::Type Get(const void* slot, MemberStorage value, + WriteBarrier::Params& params, + HeapHandleCallback callback) { + // `MemberStorage` will always be `RawPointer` for non-caged heap builds. + // Just convert to `void*` in this case. + return ValueModeDispatch::Get(slot, value.Load(), params, + callback); + } + template static V8_INLINE WriteBarrier::Type Get(const void* value, WriteBarrier::Params& params, @@ -310,7 +345,7 @@ struct WriteBarrierTypeForNonCagedHeapPolicy::ValueModeDispatch< if (object <= static_cast(kSentinelPointer)) { return SetAndReturnType(params); } - if (V8_LIKELY(!WriteBarrier::IsAnyIncrementalOrConcurrentMarking())) { + if (V8_LIKELY(!WriteBarrier::IsEnabled())) { return SetAndReturnType(params); } if (IsMarking(object, ¶ms.heap)) { @@ -327,7 +362,7 @@ struct WriteBarrierTypeForNonCagedHeapPolicy::ValueModeDispatch< static V8_INLINE WriteBarrier::Type Get(const void*, const void*, WriteBarrier::Params& params, HeapHandleCallback callback) { - if (V8_UNLIKELY(WriteBarrier::IsAnyIncrementalOrConcurrentMarking())) { + if (V8_UNLIKELY(WriteBarrier::IsEnabled())) { HeapHandle& handle = callback(); if (IsMarking(handle)) { params.heap = &handle; @@ -345,6 +380,13 @@ WriteBarrier::Type WriteBarrier::GetWriteBarrierType( params, []() {}); } +// static +WriteBarrier::Type WriteBarrier::GetWriteBarrierType( + const void* slot, MemberStorage value, WriteBarrier::Params& params) { + return WriteBarrierTypePolicy::Get(slot, value, + params, []() {}); +} + // static template WriteBarrier::Type WriteBarrier::GetWriteBarrierType( @@ -397,34 +439,32 @@ void WriteBarrier::SteeleMarkingBarrier(const Params& params, } #if defined(CPPGC_YOUNG_GENERATION) -// static -void WriteBarrier::GenerationalBarrier(const Params& params, const void* slot) { - CheckParams(Type::kGenerational, params); - - const CagedHeapLocalData& local_data = params.caged_heap(); - const AgeTable& age_table = local_data.age_table; - - // Bail out if the slot is in young generation. - if (V8_LIKELY(age_table.GetAge(params.slot_offset) == AgeTable::Age::kYoung)) - return; - - GenerationalBarrierSlow(local_data, age_table, slot, params.value_offset); -} // static -void WriteBarrier::GenerationalBarrierForSourceObject( - const Params& params, const void* inner_pointer) { +template +void WriteBarrier::GenerationalBarrier(const Params& params, const void* slot) { CheckParams(Type::kGenerational, params); - const CagedHeapLocalData& local_data = params.caged_heap(); + const CagedHeapLocalData& local_data = CagedHeapLocalData::Get(); const AgeTable& age_table = local_data.age_table; - // Assume that if the first element is in young generation, the whole range is - // in young generation. + // Bail out if the slot (precise or imprecise) is in young generation. if (V8_LIKELY(age_table.GetAge(params.slot_offset) == AgeTable::Age::kYoung)) return; - GenerationalBarrierForSourceObjectSlow(local_data, inner_pointer); + // Dispatch between different types of barriers. + // TODO(chromium:1029379): Consider reload local_data in the slow path to + // reduce register pressure. + if constexpr (type == GenerationalBarrierType::kPreciseSlot) { + GenerationalBarrierSlow(local_data, age_table, slot, params.value_offset, + params.heap); + } else if constexpr (type == + GenerationalBarrierType::kPreciseUncompressedSlot) { + GenerationalBarrierForUncompressedSlotSlow( + local_data, age_table, slot, params.value_offset, params.heap); + } else { + GenerationalBarrierForSourceObjectSlow(local_data, slot, params.heap); + } } #endif // !CPPGC_YOUNG_GENERATION diff --git a/deps/v8/include/cppgc/liveness-broker.h b/deps/v8/include/cppgc/liveness-broker.h index c94eef0d4acdad..2c94f1c0fade96 100644 --- a/deps/v8/include/cppgc/liveness-broker.h +++ b/deps/v8/include/cppgc/liveness-broker.h @@ -7,6 +7,7 @@ #include "cppgc/heap.h" #include "cppgc/member.h" +#include "cppgc/sentinel-pointer.h" #include "cppgc/trace-trait.h" #include "v8config.h" // NOLINT(build/include_directory) @@ -44,24 +45,24 @@ class V8_EXPORT LivenessBroker final { public: template bool IsHeapObjectAlive(const T* object) const { - // nullptr objects are considered alive to allow weakness to be used from + // - nullptr objects are considered alive to allow weakness to be used from // stack while running into a conservative GC. Treating nullptr as dead - // would mean that e.g. custom collectins could not be strongified on stack. - return !object || + // would mean that e.g. custom collections could not be strongified on + // stack. + // - Sentinel pointers are also preserved in weakness and not cleared. + return !object || object == kSentinelPointer || IsHeapObjectAliveImpl( TraceTrait::GetTraceDescriptor(object).base_object_payload); } template bool IsHeapObjectAlive(const WeakMember& weak_member) const { - return (weak_member != kSentinelPointer) && - IsHeapObjectAlive(weak_member.Get()); + return IsHeapObjectAlive(weak_member.Get()); } template bool IsHeapObjectAlive(const UntracedMember& untraced_member) const { - return (untraced_member != kSentinelPointer) && - IsHeapObjectAlive(untraced_member.Get()); + return IsHeapObjectAlive(untraced_member.Get()); } private: diff --git a/deps/v8/include/cppgc/member.h b/deps/v8/include/cppgc/member.h index 66a8cfd80294c3..71f9cab65280da 100644 --- a/deps/v8/include/cppgc/member.h +++ b/deps/v8/include/cppgc/member.h @@ -9,6 +9,8 @@ #include #include +#include "cppgc/internal/api-constants.h" +#include "cppgc/internal/member-storage.h" #include "cppgc/internal/pointer-policies.h" #include "cppgc/sentinel-pointer.h" #include "cppgc/type-traits.h" @@ -16,6 +18,10 @@ namespace cppgc { +namespace subtle { +class HeapConsistency; +} // namespace subtle + class Visitor; namespace internal { @@ -23,33 +29,46 @@ namespace internal { // MemberBase always refers to the object as const object and defers to // BasicMember on casting to the right type as needed. class MemberBase { + public: +#if defined(CPPGC_POINTER_COMPRESSION) + using RawStorage = CompressedPointer; +#else // !defined(CPPGC_POINTER_COMPRESSION) + using RawStorage = RawPointer; +#endif // !defined(CPPGC_POINTER_COMPRESSION) protected: struct AtomicInitializerTag {}; - MemberBase() : raw_(nullptr) {} - explicit MemberBase(const void* value) : raw_(value) {} - MemberBase(const void* value, AtomicInitializerTag) { SetRawAtomic(value); } + V8_INLINE MemberBase() = default; + V8_INLINE explicit MemberBase(const void* value) : raw_(value) {} + V8_INLINE MemberBase(const void* value, AtomicInitializerTag) { + SetRawAtomic(value); + } - const void** GetRawSlot() const { return &raw_; } - const void* GetRaw() const { return raw_; } - void SetRaw(void* value) { raw_ = value; } + V8_INLINE explicit MemberBase(RawStorage raw) : raw_(raw) {} + V8_INLINE explicit MemberBase(std::nullptr_t) : raw_(nullptr) {} + V8_INLINE explicit MemberBase(SentinelPointer s) : raw_(s) {} - const void* GetRawAtomic() const { - return reinterpret_cast*>(&raw_)->load( - std::memory_order_relaxed); + V8_INLINE const void** GetRawSlot() const { + return reinterpret_cast(const_cast(this)); } - void SetRawAtomic(const void* value) { - reinterpret_cast*>(&raw_)->store( - value, std::memory_order_relaxed); + V8_INLINE const void* GetRaw() const { return raw_.Load(); } + V8_INLINE void SetRaw(void* value) { raw_.Store(value); } + + V8_INLINE const void* GetRawAtomic() const { return raw_.LoadAtomic(); } + V8_INLINE void SetRawAtomic(const void* value) { raw_.StoreAtomic(value); } + + V8_INLINE RawStorage GetRawStorage() const { return raw_; } + V8_INLINE void SetRawStorageAtomic(RawStorage other) { + reinterpret_cast&>(raw_).store( + other, std::memory_order_relaxed); } - void ClearFromGC() const { raw_ = nullptr; } + V8_INLINE bool IsCleared() const { return raw_.IsCleared(); } + + V8_INLINE void ClearFromGC() const { raw_.Clear(); } private: - // All constructors initialize `raw_`. Do not add a default value here as it - // results in a non-atomic write on some builds, even when the atomic version - // of the constructor is used. - mutable const void* raw_; + mutable RawStorage raw_; }; // The basic class from which all Member classes are 'generated'. @@ -59,134 +78,184 @@ class BasicMember final : private MemberBase, private CheckingPolicy { public: using PointeeType = T; - constexpr BasicMember() = default; - constexpr BasicMember(std::nullptr_t) {} // NOLINT - BasicMember(SentinelPointer s) : MemberBase(s) {} // NOLINT - BasicMember(T* raw) : MemberBase(raw) { // NOLINT - InitializingWriteBarrier(); + V8_INLINE constexpr BasicMember() = default; + V8_INLINE constexpr BasicMember(std::nullptr_t) {} // NOLINT + V8_INLINE BasicMember(SentinelPointer s) : MemberBase(s) {} // NOLINT + V8_INLINE BasicMember(T* raw) : MemberBase(raw) { // NOLINT + InitializingWriteBarrier(raw); this->CheckPointer(Get()); } - BasicMember(T& raw) : BasicMember(&raw) {} // NOLINT + V8_INLINE BasicMember(T& raw) // NOLINT + : BasicMember(&raw) {} + // Atomic ctor. Using the AtomicInitializerTag forces BasicMember to // initialize using atomic assignments. This is required for preventing // data races with concurrent marking. using AtomicInitializerTag = MemberBase::AtomicInitializerTag; - BasicMember(std::nullptr_t, AtomicInitializerTag atomic) + V8_INLINE BasicMember(std::nullptr_t, AtomicInitializerTag atomic) : MemberBase(nullptr, atomic) {} - BasicMember(SentinelPointer s, AtomicInitializerTag atomic) + V8_INLINE BasicMember(SentinelPointer s, AtomicInitializerTag atomic) : MemberBase(s, atomic) {} - BasicMember(T* raw, AtomicInitializerTag atomic) : MemberBase(raw, atomic) { - InitializingWriteBarrier(); + V8_INLINE BasicMember(T* raw, AtomicInitializerTag atomic) + : MemberBase(raw, atomic) { + InitializingWriteBarrier(raw); this->CheckPointer(Get()); } - BasicMember(T& raw, AtomicInitializerTag atomic) + V8_INLINE BasicMember(T& raw, AtomicInitializerTag atomic) : BasicMember(&raw, atomic) {} + // Copy ctor. - BasicMember(const BasicMember& other) : BasicMember(other.Get()) {} - // Allow heterogeneous construction. + V8_INLINE BasicMember(const BasicMember& other) + : BasicMember(other.GetRawStorage()) {} + + // Heterogeneous copy constructors. When the source pointer have a different + // type, perform a compress-decompress round, because the source pointer may + // need to be adjusted. template ::value>> - BasicMember( // NOLINT + std::enable_if_t>* = nullptr> + V8_INLINE BasicMember( // NOLINT + const BasicMember& other) + : BasicMember(other.GetRawStorage()) {} + + template >* = nullptr> + V8_INLINE BasicMember( // NOLINT const BasicMember& other) : BasicMember(other.Get()) {} + // Move ctor. - BasicMember(BasicMember&& other) noexcept : BasicMember(other.Get()) { + V8_INLINE BasicMember(BasicMember&& other) noexcept + : BasicMember(other.GetRawStorage()) { other.Clear(); } - // Allow heterogeneous move construction. + + // Heterogeneous move constructors. When the source pointer have a different + // type, perform a compress-decompress round, because the source pointer may + // need to be adjusted. template ::value>> - BasicMember(BasicMember&& other) noexcept + std::enable_if_t>* = nullptr> + V8_INLINE BasicMember(BasicMember&& other) noexcept + : BasicMember(other.GetRawStorage()) { + other.Clear(); + } + + template >* = nullptr> + V8_INLINE BasicMember(BasicMember&& other) noexcept : BasicMember(other.Get()) { other.Clear(); } + // Construction from Persistent. template ::value>> - BasicMember(const BasicPersistent& p) + V8_INLINE BasicMember(const BasicPersistent& p) : BasicMember(p.Get()) {} // Copy assignment. - BasicMember& operator=(const BasicMember& other) { - return operator=(other.Get()); + V8_INLINE BasicMember& operator=(const BasicMember& other) { + return operator=(other.GetRawStorage()); } - // Allow heterogeneous copy assignment. + + // Heterogeneous copy assignment. When the source pointer have a different + // type, perform a compress-decompress round, because the source pointer may + // need to be adjusted. template ::value>> - BasicMember& operator=( + typename OtherCheckingPolicy> + V8_INLINE BasicMember& operator=( const BasicMember& other) { - return operator=(other.Get()); + if constexpr (internal::IsDecayedSameV) { + return operator=(other.GetRawStorage()); + } else { + static_assert(internal::IsStrictlyBaseOfV); + return operator=(other.Get()); + } } + // Move assignment. - BasicMember& operator=(BasicMember&& other) noexcept { - operator=(other.Get()); + V8_INLINE BasicMember& operator=(BasicMember&& other) noexcept { + operator=(other.GetRawStorage()); other.Clear(); return *this; } - // Heterogeneous move assignment. + + // Heterogeneous move assignment. When the source pointer have a different + // type, perform a compress-decompress round, because the source pointer may + // need to be adjusted. template ::value>> - BasicMember& operator=(BasicMember&& other) noexcept { - operator=(other.Get()); + typename OtherCheckingPolicy> + V8_INLINE BasicMember& operator=( + BasicMember&& other) noexcept { + if constexpr (internal::IsDecayedSameV) { + operator=(other.GetRawStorage()); + } else { + static_assert(internal::IsStrictlyBaseOfV); + operator=(other.Get()); + } other.Clear(); return *this; } + // Assignment from Persistent. template ::value>> - BasicMember& operator=( + V8_INLINE BasicMember& operator=( const BasicPersistent& other) { return operator=(other.Get()); } - BasicMember& operator=(T* other) { + + V8_INLINE BasicMember& operator=(T* other) { SetRawAtomic(other); - AssigningWriteBarrier(); + AssigningWriteBarrier(other); this->CheckPointer(Get()); return *this; } - BasicMember& operator=(std::nullptr_t) { + + V8_INLINE BasicMember& operator=(std::nullptr_t) { Clear(); return *this; } - BasicMember& operator=(SentinelPointer s) { + V8_INLINE BasicMember& operator=(SentinelPointer s) { SetRawAtomic(s); return *this; } template - void Swap(BasicMember& other) { - T* tmp = Get(); + V8_INLINE void Swap(BasicMember& other) { + auto tmp = GetRawStorage(); *this = other; other = tmp; } - explicit operator bool() const { return Get(); } - operator T*() const { return Get(); } - T* operator->() const { return Get(); } - T& operator*() const { return *Get(); } + V8_INLINE explicit operator bool() const { return !IsCleared(); } + V8_INLINE operator T*() const { return Get(); } + V8_INLINE T* operator->() const { return Get(); } + V8_INLINE T& operator*() const { return *Get(); } // CFI cast exemption to allow passing SentinelPointer through T* and support // heterogeneous assignments between different Member and Persistent handles // based on their actual types. - V8_CLANG_NO_SANITIZE("cfi-unrelated-cast") T* Get() const { + V8_INLINE V8_CLANG_NO_SANITIZE("cfi-unrelated-cast") T* Get() const { // Executed by the mutator, hence non atomic load. // // The const_cast below removes the constness from MemberBase storage. The @@ -195,59 +264,262 @@ class BasicMember final : private MemberBase, private CheckingPolicy { return static_cast(const_cast(MemberBase::GetRaw())); } - void Clear() { SetRawAtomic(nullptr); } + V8_INLINE void Clear() { SetRawStorageAtomic(RawStorage{}); } - T* Release() { + V8_INLINE T* Release() { T* result = Get(); Clear(); return result; } - const T** GetSlotForTesting() const { + V8_INLINE const T** GetSlotForTesting() const { return reinterpret_cast(GetRawSlot()); } + V8_INLINE RawStorage GetRawStorage() const { + return MemberBase::GetRawStorage(); + } + private: - const T* GetRawAtomic() const { + V8_INLINE explicit BasicMember(RawStorage raw) : MemberBase(raw) { + InitializingWriteBarrier(Get()); + this->CheckPointer(Get()); + } + + V8_INLINE BasicMember& operator=(RawStorage other) { + SetRawStorageAtomic(other); + AssigningWriteBarrier(); + this->CheckPointer(Get()); + return *this; + } + + V8_INLINE const T* GetRawAtomic() const { return static_cast(MemberBase::GetRawAtomic()); } - void InitializingWriteBarrier() const { - WriteBarrierPolicy::InitializingBarrier(GetRawSlot(), GetRaw()); + V8_INLINE void InitializingWriteBarrier(T* value) const { + WriteBarrierPolicy::InitializingBarrier(GetRawSlot(), value); + } + V8_INLINE void AssigningWriteBarrier(T* value) const { + WriteBarrierPolicy::AssigningBarrier(GetRawSlot(), value); } - void AssigningWriteBarrier() const { - WriteBarrierPolicy::AssigningBarrier(GetRawSlot(), GetRaw()); + V8_INLINE void AssigningWriteBarrier() const { + WriteBarrierPolicy::AssigningBarrier(GetRawSlot(), GetRawStorage()); } - void ClearFromGC() const { MemberBase::ClearFromGC(); } + V8_INLINE void ClearFromGC() const { MemberBase::ClearFromGC(); } - T* GetFromGC() const { return Get(); } + V8_INLINE T* GetFromGC() const { return Get(); } + friend class cppgc::subtle::HeapConsistency; friend class cppgc::Visitor; template friend struct cppgc::TraceTrait; + template + friend class BasicMember; }; +// Member equality operators. template -bool operator==(const BasicMember& member1, - const BasicMember& member2) { - return member1.Get() == member2.Get(); +V8_INLINE bool operator==( + const BasicMember& + member1, + const BasicMember& + member2) { + if constexpr (internal::IsDecayedSameV) { + // Check compressed pointers if types are the same. + return member1.GetRawStorage() == member2.GetRawStorage(); + } else { + static_assert(internal::IsStrictlyBaseOfV || + internal::IsStrictlyBaseOfV); + // Otherwise, check decompressed pointers. + return member1.Get() == member2.Get(); + } } template -bool operator!=(const BasicMember& member1, - const BasicMember& member2) { +V8_INLINE bool operator!=( + const BasicMember& + member1, + const BasicMember& + member2) { return !(member1 == member2); } +// Equality with raw pointers. +template +V8_INLINE bool operator==(const BasicMember& member, + U* raw) { + // Never allow comparison with erased pointers. + static_assert(!internal::IsDecayedSameV); + + if constexpr (internal::IsDecayedSameV) { + // Check compressed pointers if types are the same. + return member.GetRawStorage() == MemberBase::RawStorage(raw); + } else if constexpr (internal::IsStrictlyBaseOfV) { + // Cast the raw pointer to T, which may adjust the pointer. + return member.GetRawStorage() == + MemberBase::RawStorage(static_cast(raw)); + } else { + // Otherwise, decompressed the member. + return member.Get() == raw; + } +} + +template +V8_INLINE bool operator!=(const BasicMember& member, + U* raw) { + return !(member == raw); +} + +template +V8_INLINE bool operator==(T* raw, + const BasicMember& member) { + return member == raw; +} + +template +V8_INLINE bool operator!=(T* raw, + const BasicMember& member) { + return !(raw == member); +} + +// Equality with sentinel. +template +V8_INLINE bool operator==(const BasicMember& member, + SentinelPointer) { + return member.GetRawStorage().IsSentinel(); +} + +template +V8_INLINE bool operator!=(const BasicMember& member, + SentinelPointer s) { + return !(member == s); +} + +template +V8_INLINE bool operator==(SentinelPointer s, + const BasicMember& member) { + return member == s; +} + +template +V8_INLINE bool operator!=(SentinelPointer s, + const BasicMember& member) { + return !(s == member); +} + +// Equality with nullptr. +template +V8_INLINE bool operator==(const BasicMember& member, + std::nullptr_t) { + return !static_cast(member); +} + +template +V8_INLINE bool operator!=(const BasicMember& member, + std::nullptr_t n) { + return !(member == n); +} + +template +V8_INLINE bool operator==(std::nullptr_t n, + const BasicMember& member) { + return member == n; +} + +template +V8_INLINE bool operator!=(std::nullptr_t n, + const BasicMember& member) { + return !(n == member); +} + +// Relational operators. +template +V8_INLINE bool operator<( + const BasicMember& + member1, + const BasicMember& + member2) { + static_assert( + internal::IsDecayedSameV, + "Comparison works only for same pointer type modulo cv-qualifiers"); + return member1.GetRawStorage() < member2.GetRawStorage(); +} + +template +V8_INLINE bool operator<=( + const BasicMember& + member1, + const BasicMember& + member2) { + static_assert( + internal::IsDecayedSameV, + "Comparison works only for same pointer type modulo cv-qualifiers"); + return member1.GetRawStorage() <= member2.GetRawStorage(); +} + +template +V8_INLINE bool operator>( + const BasicMember& + member1, + const BasicMember& + member2) { + static_assert( + internal::IsDecayedSameV, + "Comparison works only for same pointer type modulo cv-qualifiers"); + return member1.GetRawStorage() > member2.GetRawStorage(); +} + +template +V8_INLINE bool operator>=( + const BasicMember& + member1, + const BasicMember& + member2) { + static_assert( + internal::IsDecayedSameV, + "Comparison works only for same pointer type modulo cv-qualifiers"); + return member1.GetRawStorage() >= member2.GetRawStorage(); +} + template struct IsWeak< internal::BasicMember> diff --git a/deps/v8/include/cppgc/name-provider.h b/deps/v8/include/cppgc/name-provider.h index 224dd4b5d678ec..216f6098d99dd1 100644 --- a/deps/v8/include/cppgc/name-provider.h +++ b/deps/v8/include/cppgc/name-provider.h @@ -37,15 +37,15 @@ class V8_EXPORT NameProvider { static constexpr const char kNoNameDeducible[] = ""; /** - * Indicating whether internal names are hidden or not. + * Indicating whether the build supports extracting C++ names as object names. * * @returns true if C++ names should be hidden and represented by kHiddenName. */ - static constexpr bool HideInternalNames() { + static constexpr bool SupportsCppClassNamesAsObjectNames() { #if CPPGC_SUPPORTS_OBJECT_NAMES - return false; -#else // !CPPGC_SUPPORTS_OBJECT_NAMES return true; +#else // !CPPGC_SUPPORTS_OBJECT_NAMES + return false; #endif // !CPPGC_SUPPORTS_OBJECT_NAMES } diff --git a/deps/v8/include/cppgc/persistent.h b/deps/v8/include/cppgc/persistent.h index 244f94c81958b8..3a66ccc0864328 100644 --- a/deps/v8/include/cppgc/persistent.h +++ b/deps/v8/include/cppgc/persistent.h @@ -16,9 +16,6 @@ #include "v8config.h" // NOLINT(build/include_directory) namespace cppgc { - -class Visitor; - namespace internal { // PersistentBase always refers to the object as const object and defers to @@ -78,7 +75,7 @@ class BasicPersistent final : public PersistentBase, : PersistentBase(raw), LocationPolicy(loc) { if (!IsValid()) return; SetNode(WeaknessPolicy::GetPersistentRegion(GetValue()) - .AllocateNode(this, &BasicPersistent::Trace)); + .AllocateNode(this, &TraceAsRoot)); this->CheckPointer(Get()); } @@ -221,9 +218,8 @@ class BasicPersistent final : public PersistentBase, } private: - static void Trace(Visitor* v, const void* ptr) { - const auto* persistent = static_cast(ptr); - v->TraceRoot(*persistent, persistent->Location()); + static void TraceAsRoot(RootVisitor& root_visitor, const void* ptr) { + root_visitor.Trace(*static_cast(ptr)); } bool IsValid() const { @@ -247,7 +243,7 @@ class BasicPersistent final : public PersistentBase, SetValue(ptr); if (!IsValid()) return; SetNode(WeaknessPolicy::GetPersistentRegion(GetValue()) - .AllocateNode(this, &BasicPersistent::Trace)); + .AllocateNode(this, &TraceAsRoot)); this->CheckPointer(Get()); } @@ -264,7 +260,7 @@ class BasicPersistent final : public PersistentBase, return static_cast(const_cast(GetValue())); } - friend class cppgc::Visitor; + friend class internal::RootVisitor; }; template operator T*() const { - static constexpr intptr_t kSentinelValue = 1; return reinterpret_cast(kSentinelValue); } // Hidden friends. diff --git a/deps/v8/include/cppgc/trace-trait.h b/deps/v8/include/cppgc/trace-trait.h index 83619b1d51848b..694fbfdccf4dcb 100644 --- a/deps/v8/include/cppgc/trace-trait.h +++ b/deps/v8/include/cppgc/trace-trait.h @@ -16,6 +16,10 @@ class Visitor; namespace internal { +class RootVisitor; + +using TraceRootCallback = void (*)(RootVisitor&, const void* object); + // Implementation of the default TraceTrait handling GarbageCollected and // GarbageCollectedMixin. template ()))::value; }; +template +constexpr bool IsDecayedSameV = + std::is_same_v, std::decay_t>; + +template +constexpr bool IsStrictlyBaseOfV = + std::is_base_of_v, std::decay_t> && + !IsDecayedSameV; + } // namespace internal /** diff --git a/deps/v8/include/cppgc/visitor.h b/deps/v8/include/cppgc/visitor.h index 57e2ce3963af1e..f7ebc1d01f566e 100644 --- a/deps/v8/include/cppgc/visitor.h +++ b/deps/v8/include/cppgc/visitor.h @@ -62,22 +62,6 @@ class V8_EXPORT Visitor { virtual ~Visitor() = default; - /** - * Trace method for raw pointers. Prefer the versions for managed pointers. - * - * \param member Reference retaining an object. - */ - template - void Trace(const T* t) { - static_assert(sizeof(T), "Pointee type must be fully defined."); - static_assert(internal::IsGarbageCollectedOrMixinType::value, - "T must be GarbageCollected or GarbageCollectedMixin type"); - if (!t) { - return; - } - Visit(t, TraceTrait::GetTraceDescriptor(t)); - } - /** * Trace method for Member. * @@ -87,7 +71,7 @@ class V8_EXPORT Visitor { void Trace(const Member& member) { const T* value = member.GetRawAtomic(); CPPGC_DCHECK(value != kSentinelPointer); - Trace(value); + TraceImpl(value); } /** @@ -231,23 +215,33 @@ class V8_EXPORT Visitor { void TraceStrongly(const WeakMember& weak_member) { const T* value = weak_member.GetRawAtomic(); CPPGC_DCHECK(value != kSentinelPointer); - Trace(value); + TraceImpl(value); + } + + /** + * Trace method for retaining containers strongly. + * + * \param object reference to the container. + */ + template + void TraceStrongContainer(const T* object) { + TraceImpl(object); } /** - * Trace method for weak containers. + * Trace method for retaining containers weakly. * - * \param object reference of the weak container. + * \param object reference to the container. * \param callback to be invoked. - * \param data custom data that is passed to the callback. + * \param callback_data custom data that is passed to the callback. */ template void TraceWeakContainer(const T* object, WeakCallback callback, - const void* data) { + const void* callback_data) { if (!object) return; VisitWeakContainer(object, TraceTrait::GetTraceDescriptor(object), TraceTrait::GetWeakTraceDescriptor(object), callback, - data); + callback_data); } /** @@ -255,6 +249,7 @@ class V8_EXPORT Visitor { * compactable space. Such references maybe be arbitrarily moved by the GC. * * \param slot location of reference to object that might be moved by the GC. + * The slot must contain an uncompressed pointer. */ template void RegisterMovableReference(const T** slot) { @@ -297,9 +292,6 @@ class V8_EXPORT Visitor { virtual void Visit(const void* self, TraceDescriptor) {} virtual void VisitWeak(const void* self, TraceDescriptor, WeakCallback, const void* weak_member) {} - virtual void VisitRoot(const void*, TraceDescriptor, const SourceLocation&) {} - virtual void VisitWeakRoot(const void* self, TraceDescriptor, WeakCallback, - const void* weak_root, const SourceLocation&) {} virtual void VisitEphemeron(const void* key, const void* value, TraceDescriptor value_desc) {} virtual void VisitWeakContainer(const void* self, TraceDescriptor strong_desc, @@ -320,44 +312,20 @@ class V8_EXPORT Visitor { static void HandleWeak(const LivenessBroker& info, const void* object) { const PointerType* weak = static_cast(object); auto* raw_ptr = weak->GetFromGC(); - // Sentinel values are preserved for weak pointers. - if (raw_ptr == kSentinelPointer) return; if (!info.IsHeapObjectAlive(raw_ptr)) { weak->ClearFromGC(); } } - template * = nullptr> - void TraceRoot(const Persistent& p, const SourceLocation& loc) { - using PointeeType = typename Persistent::PointeeType; - static_assert(sizeof(PointeeType), - "Persistent's pointee type must be fully defined"); - static_assert(internal::IsGarbageCollectedOrMixinType::value, - "Persistent's pointee type must be GarbageCollected or " - "GarbageCollectedMixin"); - auto* ptr = p.GetFromGC(); - if (!ptr) { + template + void TraceImpl(const T* t) { + static_assert(sizeof(T), "Pointee type must be fully defined."); + static_assert(internal::IsGarbageCollectedOrMixinType::value, + "T must be GarbageCollected or GarbageCollectedMixin type"); + if (!t) { return; } - VisitRoot(ptr, TraceTrait::GetTraceDescriptor(ptr), loc); - } - - template < - typename WeakPersistent, - std::enable_if_t* = nullptr> - void TraceRoot(const WeakPersistent& p, const SourceLocation& loc) { - using PointeeType = typename WeakPersistent::PointeeType; - static_assert(sizeof(PointeeType), - "Persistent's pointee type must be fully defined"); - static_assert(internal::IsGarbageCollectedOrMixinType::value, - "Persistent's pointee type must be GarbageCollected or " - "GarbageCollectedMixin"); - static_assert(!internal::IsAllocatedOnCompactableSpace::value, - "Weak references to compactable objects are not allowed"); - auto* ptr = p.GetFromGC(); - VisitWeakRoot(ptr, TraceTrait::GetTraceDescriptor(ptr), - &HandleWeak, &p, loc); + Visit(t, TraceTrait::GetTraceDescriptor(t)); } #if V8_ENABLE_CHECKS @@ -374,6 +342,70 @@ class V8_EXPORT Visitor { friend class internal::VisitorBase; }; +namespace internal { + +class V8_EXPORT RootVisitor { + public: + explicit RootVisitor(Visitor::Key) {} + + virtual ~RootVisitor() = default; + + template * = nullptr> + void Trace(const AnyStrongPersistentType& p) { + using PointeeType = typename AnyStrongPersistentType::PointeeType; + const void* object = Extract(p); + if (!object) { + return; + } + VisitRoot(object, TraceTrait::GetTraceDescriptor(object), + p.Location()); + } + + template * = nullptr> + void Trace(const AnyWeakPersistentType& p) { + using PointeeType = typename AnyWeakPersistentType::PointeeType; + static_assert(!internal::IsAllocatedOnCompactableSpace::value, + "Weak references to compactable objects are not allowed"); + const void* object = Extract(p); + if (!object) { + return; + } + VisitWeakRoot(object, TraceTrait::GetTraceDescriptor(object), + &HandleWeak, &p, p.Location()); + } + + protected: + virtual void VisitRoot(const void*, TraceDescriptor, const SourceLocation&) {} + virtual void VisitWeakRoot(const void* self, TraceDescriptor, WeakCallback, + const void* weak_root, const SourceLocation&) {} + + private: + template + static const void* Extract(AnyPersistentType& p) { + using PointeeType = typename AnyPersistentType::PointeeType; + static_assert(sizeof(PointeeType), + "Persistent's pointee type must be fully defined"); + static_assert(internal::IsGarbageCollectedOrMixinType::value, + "Persistent's pointee type must be GarbageCollected or " + "GarbageCollectedMixin"); + return p.GetFromGC(); + } + + template + static void HandleWeak(const LivenessBroker& info, const void* object) { + const PointerType* weak = static_cast(object); + auto* raw_ptr = weak->GetFromGC(); + if (!info.IsHeapObjectAlive(raw_ptr)) { + weak->ClearFromGC(); + } + } +}; + +} // namespace internal } // namespace cppgc #endif // INCLUDE_CPPGC_VISITOR_H_ diff --git a/deps/v8/include/js_protocol.pdl b/deps/v8/include/js_protocol.pdl index 53a5f4c11dcc02..8d8211bf989f13 100644 --- a/deps/v8/include/js_protocol.pdl +++ b/deps/v8/include/js_protocol.pdl @@ -113,6 +113,11 @@ domain Debugger Runtime.RemoteObject this # The value being returned, if the function is at return point. optional Runtime.RemoteObject returnValue + # Valid only while the VM is paused and indicates whether this frame + # can be restarted or not. Note that a `true` value here does not + # guarantee that Debugger#restartFrame with this CallFrameId will be + # successful, but it is very likely. + experimental optional boolean canBeRestarted # Scope description. type Scope extends object @@ -239,6 +244,40 @@ domain Debugger # Wasm bytecode. optional binary bytecode + experimental type WasmDisassemblyChunk extends object + properties + # The next chunk of disassembled lines. + array of string lines + # The bytecode offsets describing the start of each line. + array of integer bytecodeOffsets + + experimental command disassembleWasmModule + parameters + # Id of the script to disassemble + Runtime.ScriptId scriptId + returns + # For large modules, return a stream from which additional chunks of + # disassembly can be read successively. + optional string streamId + # The total number of lines in the disassembly text. + integer totalNumberOfLines + # The offsets of all function bodies, in the format [start1, end1, + # start2, end2, ...] where all ends are exclusive. + array of integer functionBodyOffsets + # The first chunk of disassembly. + WasmDisassemblyChunk chunk + + # Disassemble the next chunk of lines for the module corresponding to the + # stream. If disassembly is complete, this API will invalidate the streamId + # and return an empty chunk. Any subsequent calls for the now invalid stream + # will return errors. + experimental command nextWasmDisassemblyChunk + parameters + string streamId + returns + # The next chunk of disassembly. + WasmDisassemblyChunk chunk + # This command is deprecated. Use getScriptSource instead. deprecated command getWasmBytecode parameters @@ -268,18 +307,35 @@ domain Debugger parameters BreakpointId breakpointId - # Restarts particular call frame from the beginning. - deprecated command restartFrame + # Restarts particular call frame from the beginning. The old, deprecated + # behavior of `restartFrame` is to stay paused and allow further CDP commands + # after a restart was scheduled. This can cause problems with restarting, so + # we now continue execution immediatly after it has been scheduled until we + # reach the beginning of the restarted frame. + # + # To stay back-wards compatible, `restartFrame` now expects a `mode` + # parameter to be present. If the `mode` parameter is missing, `restartFrame` + # errors out. + # + # The various return values are deprecated and `callFrames` is always empty. + # Use the call frames from the `Debugger#paused` events instead, that fires + # once V8 pauses at the beginning of the restarted function. + command restartFrame parameters # Call frame identifier to evaluate on. CallFrameId callFrameId + # The `mode` parameter must be present and set to 'StepInto', otherwise + # `restartFrame` will error out. + experimental optional enum mode + # Pause at the beginning of the restarted function + StepInto returns # New stack trace. - array of CallFrame callFrames + deprecated array of CallFrame callFrames # Async stack trace, if any. - optional Runtime.StackTrace asyncStackTrace + deprecated optional Runtime.StackTrace asyncStackTrace # Async stack trace, if any. - experimental optional Runtime.StackTraceId asyncStackTraceId + deprecated optional Runtime.StackTraceId asyncStackTraceId # Resumes JavaScript execution. command resume @@ -419,6 +475,12 @@ domain Debugger Runtime.CallArgument newValue # Edits JavaScript source live. + # + # In general, functions that are currently on the stack can not be edited with + # a single exception: If the edited function is the top-most stack frame and + # that is the only activation of that function on the stack. In this case + # the live edit will be successful and a `Debugger.restartFrame` for the + # top-most function is automatically triggered. command setScriptSource parameters # Id of the script to edit. @@ -428,16 +490,27 @@ domain Debugger # If true the change will not actually be applied. Dry run may be used to get result # description without actually modifying the code. optional boolean dryRun + # If true, then `scriptSource` is allowed to change the function on top of the stack + # as long as the top-most stack frame is the only activation of that function. + experimental optional boolean allowTopFrameEditing returns # New stack trace in case editing has happened while VM was stopped. - optional array of CallFrame callFrames + deprecated optional array of CallFrame callFrames # Whether current call stack was modified after applying the changes. - optional boolean stackChanged + deprecated optional boolean stackChanged # Async stack trace, if any. - optional Runtime.StackTrace asyncStackTrace + deprecated optional Runtime.StackTrace asyncStackTrace # Async stack trace, if any. - experimental optional Runtime.StackTraceId asyncStackTraceId - # Exception details if any. + deprecated optional Runtime.StackTraceId asyncStackTraceId + # Whether the operation was successful or not. Only `Ok` denotes a + # successful live edit while the other enum variants denote why + # the live edit failed. + experimental enum status + Ok + CompileError + BlockedByActiveGenerator + BlockedByActiveFunction + # Exception details if any. Only present when `status` is `CompileError`. optional Runtime.ExceptionDetails exceptionDetails # Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). @@ -554,7 +627,7 @@ domain Debugger integer endColumn # Specifies script creation context. Runtime.ExecutionContextId executionContextId - # Content hash of the script. + # Content hash of the script, SHA-256. string hash # Embedder-specific auxiliary data. optional object executionContextAuxData @@ -593,7 +666,7 @@ domain Debugger integer endColumn # Specifies script creation context. Runtime.ExecutionContextId executionContextId - # Content hash of the script. + # Content hash of the script, SHA-256. string hash # Embedder-specific auxiliary data. optional object executionContextAuxData @@ -708,18 +781,24 @@ experimental domain HeapProfiler # If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken # when the tracking is stopped. optional boolean reportProgress - optional boolean treatGlobalObjectsAsRoots + # Deprecated in favor of `exposeInternals`. + deprecated optional boolean treatGlobalObjectsAsRoots # If true, numerical values are included in the snapshot optional boolean captureNumericValue + # If true, exposes internals of the snapshot. + experimental optional boolean exposeInternals command takeHeapSnapshot parameters # If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. optional boolean reportProgress - # If true, a raw snapshot without artificial roots will be generated - optional boolean treatGlobalObjectsAsRoots + # If true, a raw snapshot without artificial roots will be generated. + # Deprecated in favor of `exposeInternals`. + deprecated optional boolean treatGlobalObjectsAsRoots # If true, numerical values are included in the snapshot optional boolean captureNumericValue + # If true, exposes internals of the snapshot. + experimental optional boolean exposeInternals event addHeapSnapshotChunk parameters @@ -1342,7 +1421,9 @@ domain Runtime optional string objectGroup # Whether to throw an exception if side effect cannot be ruled out during evaluation. experimental optional boolean throwOnSideEffect - # Whether the result should be serialized according to https://w3c.github.io/webdriver-bidi. + # Whether the result should contain `webDriverValue`, serialized according to + # https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but + # resulting `objectId` is still provided. experimental optional boolean generateWebDriverValue returns # Call result. diff --git a/deps/v8/include/v8-callbacks.h b/deps/v8/include/v8-callbacks.h index 70b9c2ae9308a5..c02059a5891a74 100644 --- a/deps/v8/include/v8-callbacks.h +++ b/deps/v8/include/v8-callbacks.h @@ -12,6 +12,7 @@ #include "cppgc/common.h" #include "v8-data.h" // NOLINT(build/include_directory) #include "v8-local-handle.h" // NOLINT(build/include_directory) +#include "v8-promise.h" // NOLINT(build/include_directory) #include "v8config.h" // NOLINT(build/include_directory) #if defined(V8_OS_WIN) @@ -105,7 +106,7 @@ struct JitCodeEvent { size_t line_number_table_size; }; - wasm_source_info_t* wasm_source_info; + wasm_source_info_t* wasm_source_info = nullptr; union { // Only valid for CODE_ADDED. @@ -216,7 +217,13 @@ using AddHistogramSampleCallback = void (*)(void* histogram, int sample); using FatalErrorCallback = void (*)(const char* location, const char* message); -using OOMErrorCallback = void (*)(const char* location, bool is_heap_oom); +struct OOMDetails { + bool is_heap_oom = false; + const char* detail = nullptr; +}; + +using OOMErrorCallback = void (*)(const char* location, + const OOMDetails& details); using MessageCallback = void (*)(Local message, Local data); @@ -231,8 +238,11 @@ enum class CrashKeyId { kIsolateAddress, kReadonlySpaceFirstPageAddress, kMapSpaceFirstPageAddress, + kCodeRangeBaseAddress, kCodeSpaceFirstPageAddress, kDumpType, + kSnapshotChecksumCalculated, + kSnapshotChecksumExpected, }; using AddCrashKeyCallback = void (*)(CrashKeyId id, const std::string& value); @@ -300,6 +310,13 @@ using ApiImplementationCallback = void (*)(const FunctionCallbackInfo&); // --- Callback for WebAssembly.compileStreaming --- using WasmStreamingCallback = void (*)(const FunctionCallbackInfo&); +enum class WasmAsyncSuccess { kSuccess, kFail }; + +// --- Callback called when async WebAssembly operations finish --- +using WasmAsyncResolvePromiseCallback = void (*)( + Isolate* isolate, Local context, Local resolver, + Local result, WasmAsyncSuccess success); + // --- Callback for loading source map file for Wasm profiling support using WasmLoadSourceMapCallback = Local (*)(Isolate* isolate, const char* name); @@ -310,9 +327,6 @@ using WasmSimdEnabledCallback = bool (*)(Local context); // --- Callback for checking if WebAssembly exceptions are enabled --- using WasmExceptionsEnabledCallback = bool (*)(Local context); -// --- Callback for checking if WebAssembly dynamic tiering is enabled --- -using WasmDynamicTieringEnabledCallback = bool (*)(Local context); - // --- Callback for checking if the SharedArrayBuffer constructor is enabled --- using SharedArrayBufferConstructorEnabledCallback = bool (*)(Local context); diff --git a/deps/v8/include/v8-context.h b/deps/v8/include/v8-context.h index 72dfbaad74d1f9..be52c414b4e028 100644 --- a/deps/v8/include/v8-context.h +++ b/deps/v8/include/v8-context.h @@ -244,6 +244,12 @@ class V8_EXPORT Context : public Data { */ void SetErrorMessageForCodeGenerationFromStrings(Local message); + /** + * Sets the error description for the exception that is thrown when + * wasm code generation is not allowed. + */ + void SetErrorMessageForWasmCodeGeneration(Local message); + /** * Return data that was previously attached to the context snapshot via * SnapshotCreator, and removes the reference to it. @@ -374,15 +380,13 @@ void* Context::GetAlignedPointerFromEmbedderData(int index) { A ctx = *reinterpret_cast(this); A embedder_data = I::ReadTaggedPointerField(ctx, I::kNativeContextEmbedderDataOffset); - int value_offset = - I::kEmbedderDataArrayHeaderSize + (I::kEmbedderDataSlotSize * index); -#ifdef V8_SANDBOXED_EXTERNAL_POINTERS - value_offset += I::kEmbedderDataSlotRawPayloadOffset; -#endif - internal::Isolate* isolate = I::GetIsolateForSandbox(ctx); + int value_offset = I::kEmbedderDataArrayHeaderSize + + (I::kEmbedderDataSlotSize * index) + + I::kEmbedderDataSlotExternalPointerOffset; + Isolate* isolate = I::GetIsolateForSandbox(ctx); return reinterpret_cast( - I::ReadExternalPointerField(isolate, embedder_data, value_offset, - internal::kEmbedderDataSlotPayloadTag)); + I::ReadExternalPointerField( + isolate, embedder_data, value_offset)); #else return SlowGetAlignedPointerFromEmbedderData(index); #endif diff --git a/deps/v8/include/v8-cppgc.h b/deps/v8/include/v8-cppgc.h index 401e492210609f..f96709c783a0b1 100644 --- a/deps/v8/include/v8-cppgc.h +++ b/deps/v8/include/v8-cppgc.h @@ -77,11 +77,20 @@ struct WrapperDescriptor final { }; struct V8_EXPORT CppHeapCreateParams { - CppHeapCreateParams(const CppHeapCreateParams&) = delete; - CppHeapCreateParams& operator=(const CppHeapCreateParams&) = delete; - std::vector> custom_spaces; WrapperDescriptor wrapper_descriptor; + /** + * Specifies which kind of marking are supported by the heap. The type may be + * further reduced via runtime flags when attaching the heap to an Isolate. + */ + cppgc::Heap::MarkingType marking_support = + cppgc::Heap::MarkingType::kIncrementalAndConcurrent; + /** + * Specifies which kind of sweeping is supported by the heap. The type may be + * further reduced via runtime flags when attaching the heap to an Isolate. + */ + cppgc::Heap::SweepingType sweeping_support = + cppgc::Heap::SweepingType::kIncrementalAndConcurrent; }; /** diff --git a/deps/v8/include/v8-date.h b/deps/v8/include/v8-date.h index e7a01f29b2d3b7..8d82ccc9ea60bb 100644 --- a/deps/v8/include/v8-date.h +++ b/deps/v8/include/v8-date.h @@ -27,6 +27,11 @@ class V8_EXPORT Date : public Object { */ double ValueOf() const; + /** + * Generates ISO string representation. + */ + v8::Local ToISOString() const; + V8_INLINE static Date* Cast(Value* value) { #ifdef V8_ENABLE_CHECKS CheckCast(value); diff --git a/deps/v8/include/v8-embedder-heap.h b/deps/v8/include/v8-embedder-heap.h index 09dbae1fd8778b..d3920c5f3b5580 100644 --- a/deps/v8/include/v8-embedder-heap.h +++ b/deps/v8/include/v8-embedder-heap.h @@ -69,7 +69,12 @@ class V8_EXPORT EmbedderRootsHandler { * trace through its heap and use reporter to report each JavaScript object * reachable from any of the given wrappers. */ -class V8_EXPORT EmbedderHeapTracer { +class V8_EXPORT +// GCC doesn't like combining __attribute__(()) with [[deprecated]]. +#ifdef __clang__ +V8_DEPRECATE_SOON("Use CppHeap when working with v8::TracedReference.") +#endif // __clang__ + EmbedderHeapTracer { public: using EmbedderStackState = cppgc::EmbedderStackState; @@ -205,10 +210,10 @@ class V8_EXPORT EmbedderHeapTracer { * Returns the v8::Isolate this tracer is attached too and |nullptr| if it * is not attached to any v8::Isolate. */ - v8::Isolate* isolate() const { return isolate_; } + v8::Isolate* isolate() const { return v8_isolate_; } protected: - v8::Isolate* isolate_ = nullptr; + v8::Isolate* v8_isolate_ = nullptr; friend class internal::LocalEmbedderHeapTracer; }; diff --git a/deps/v8/include/v8-exception.h b/deps/v8/include/v8-exception.h index 64126c420a6928..bc058e3fc7b874 100644 --- a/deps/v8/include/v8-exception.h +++ b/deps/v8/include/v8-exception.h @@ -197,7 +197,7 @@ class V8_EXPORT TryCatch { void ResetInternal(); - internal::Isolate* isolate_; + internal::Isolate* i_isolate_; TryCatch* next_; void* exception_; void* message_obj_; diff --git a/deps/v8/include/v8-fast-api-calls.h b/deps/v8/include/v8-fast-api-calls.h index 3403de93eca852..1826f133210477 100644 --- a/deps/v8/include/v8-fast-api-calls.h +++ b/deps/v8/include/v8-fast-api-calls.h @@ -240,6 +240,7 @@ class CTypeInfo { enum class Type : uint8_t { kVoid, kBool, + kUint8, kInt32, kUint32, kInt64, @@ -302,8 +303,9 @@ class CTypeInfo { 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; + return type == Type::kUint8 || type == Type::kInt32 || + type == Type::kUint32 || type == Type::kInt64 || + type == Type::kUint64; } static constexpr bool IsFloatingPointType(Type type) { @@ -429,6 +431,7 @@ struct AnyCType { double double_value; Local object_value; Local sequence_value; + const FastApiTypedArray* uint8_ta_value; const FastApiTypedArray* int32_ta_value; const FastApiTypedArray* uint32_ta_value; const FastApiTypedArray* int64_ta_value; @@ -544,7 +547,7 @@ struct FastApiCallbackOptions { * returned instance may be filled with mock data. */ static FastApiCallbackOptions CreateForTesting(Isolate* isolate) { - return {false, {0}}; + return {false, {0}, nullptr}; } /** @@ -566,8 +569,13 @@ struct FastApiCallbackOptions { */ union { uintptr_t data_ptr; - v8::Value data; + v8::Local data; }; + + /** + * When called from WebAssembly, a view of the calling module's memory. + */ + FastApiTypedArray* const wasm_memory; }; namespace internal { @@ -648,7 +656,8 @@ struct CTypeInfoTraits {}; V(int64_t, kInt64) \ V(uint64_t, kUint64) \ V(float, kFloat32) \ - V(double, kFloat64) + V(double, kFloat64) \ + V(uint8_t, kUint8) // Same as above, but includes deprecated types for compatibility. #define ALL_C_TYPES(V) \ @@ -687,7 +696,8 @@ PRIMITIVE_C_TYPES(DEFINE_TYPE_INFO_TRAITS) V(int64_t, kInt64) \ V(uint64_t, kUint64) \ V(float, kFloat32) \ - V(double, kFloat64) + V(double, kFloat64) \ + V(uint8_t, kUint8) TYPED_ARRAY_C_TYPES(SPECIALIZE_GET_TYPE_INFO_HELPER_FOR_TA) @@ -802,6 +812,16 @@ class CFunctionBuilderWithFunction { std::make_index_sequence()); } + // Provided for testing purposes. + template + auto Patch(Ret (*patching_func)(Args...)) { + static_assert( + sizeof...(Args) == sizeof...(ArgBuilders), + "The patching function must have the same number of arguments."); + fn_ = reinterpret_cast(patching_func); + return *this; + } + auto Build() { static CFunctionInfoImpl instance; return CFunction(fn_, &instance); @@ -881,31 +901,6 @@ static constexpr CTypeInfo kTypeInfoFloat64 = * to the requested destination type, is considered unsupported. The operation * returns true on success. `type_info` will be used for conversions. */ -template -V8_DEPRECATED( - "Use TryToCopyAndConvertArrayToCppBuffer()") -bool V8_EXPORT V8_WARN_UNUSED_RESULT - TryCopyAndConvertArrayToCppBuffer(Local src, T* dst, - uint32_t max_length); - -template <> -V8_DEPRECATED( - "Use TryToCopyAndConvertArrayToCppBuffer()") -inline bool V8_WARN_UNUSED_RESULT - TryCopyAndConvertArrayToCppBuffer<&kTypeInfoInt32, int32_t>( - Local src, int32_t* dst, uint32_t max_length) { - return false; -} - -template <> -V8_DEPRECATED( - "Use TryToCopyAndConvertArrayToCppBuffer()") -inline bool V8_WARN_UNUSED_RESULT - TryCopyAndConvertArrayToCppBuffer<&kTypeInfoFloat64, double>( - Local src, double* dst, uint32_t max_length) { - return false; -} - template bool V8_EXPORT V8_WARN_UNUSED_RESULT TryToCopyAndConvertArrayToCppBuffer( Local src, T* dst, uint32_t max_length); diff --git a/deps/v8/include/v8-function.h b/deps/v8/include/v8-function.h index 897e6ed6175931..2dc7e722bb9e8c 100644 --- a/deps/v8/include/v8-function.h +++ b/deps/v8/include/v8-function.h @@ -106,6 +106,14 @@ class V8_EXPORT Function : public Object { V8_WARN_UNUSED_RESULT MaybeLocal FunctionProtoToString( Local context); + /** + * Returns true if the function does nothing. + * The function returns false on error. + * Note that this function is experimental. Embedders should not rely on + * this existing. We may remove this function in the future. + */ + V8_WARN_UNUSED_RESULT bool Experimental_IsNopFunction() const; + ScriptOrigin GetScriptOrigin() const; V8_INLINE static Function* Cast(Value* value) { #ifdef V8_ENABLE_CHECKS diff --git a/deps/v8/include/v8-initialization.h b/deps/v8/include/v8-initialization.h index 3d59c73f7c9caf..d3e35d6ec5f860 100644 --- a/deps/v8/include/v8-initialization.h +++ b/deps/v8/include/v8-initialization.h @@ -100,9 +100,6 @@ class V8_EXPORT V8 { const int kBuildConfiguration = (internal::PointerCompressionIsEnabled() ? kPointerCompression : 0) | (internal::SmiValuesAre31Bits() ? k31BitSmis : 0) | - (internal::SandboxedExternalPointersAreEnabled() - ? kSandboxedExternalPointers - : 0) | (internal::SandboxIsEnabled() ? kSandbox : 0); return Initialize(kBuildConfiguration); } @@ -184,30 +181,19 @@ class V8_EXPORT V8 { * V8 was disposed. */ static void DisposePlatform(); - V8_DEPRECATED("Use DisposePlatform()") - static void ShutdownPlatform() { DisposePlatform(); } - -#ifdef V8_SANDBOX - // - // Sandbox related API. - // - // This API is not yet stable and subject to changes in the future. - // +#if defined(V8_ENABLE_SANDBOX) /** - * Initializes the V8 sandbox. - * - * This must be invoked after the platform was initialized but before V8 is - * initialized. The sandbox is torn down during platform shutdown. - * Returns true on success, false otherwise. + * Returns true if the sandbox is configured securely. * - * TODO(saelo) Once it is no longer optional to initialize the sandbox when - * compiling with V8_SANDBOX, the sandbox initialization will likely happen - * as part of V8::Initialize, at which point this function should be removed. + * If V8 cannot create a regular sandbox during initialization, for example + * because not enough virtual address space can be reserved, it will instead + * create a fallback sandbox that still allows it to function normally but + * does not have the same security properties as a regular sandbox. This API + * can be used to determine if such a fallback sandbox is being used, in + * which case it will return false. */ - static bool InitializeSandbox(); - V8_DEPRECATE_SOON("Use InitializeSandbox()") - static bool InitializeVirtualMemoryCage() { return InitializeSandbox(); } + static bool IsSandboxConfiguredSecurely(); /** * Provides access to the virtual address subspace backing the sandbox. @@ -220,39 +206,29 @@ class V8_EXPORT V8 { * and so in particular the contents of pages allocagted in this virtual * address space, arbitrarily and concurrently. Due to this, it is * recommended to to only place pure data buffers in them. - * - * This function must only be called after initializing the sandbox. */ static VirtualAddressSpace* GetSandboxAddressSpace(); - V8_DEPRECATE_SOON("Use GetSandboxAddressSpace()") - static PageAllocator* GetVirtualMemoryCagePageAllocator(); /** * Returns the size of the sandbox in bytes. * - * If the sandbox has not been initialized, or if the initialization failed, - * this returns zero. + * This represents the size of the address space that V8 can directly address + * and in which it allocates its objects. */ static size_t GetSandboxSizeInBytes(); - V8_DEPRECATE_SOON("Use GetSandboxSizeInBytes()") - static size_t GetVirtualMemoryCageSizeInBytes() { - return GetSandboxSizeInBytes(); - } /** - * Returns whether the sandbox is configured securely. + * Returns the size of the address space reservation backing the sandbox. * - * If V8 cannot create a proper sandbox, it will fall back to creating a - * sandbox that doesn't have the desired security properties but at least - * still allows V8 to function. This API can be used to determine if such an - * insecure sandbox is being used, in which case it will return false. + * This may be larger than the sandbox (i.e. |GetSandboxSizeInBytes()|) due + * to surrounding guard regions, or may be smaller than the sandbox in case a + * fallback sandbox is being used, which will use a smaller virtual address + * space reservation. In the latter case this will also be different from + * |GetSandboxAddressSpace()->size()| as that will cover a larger part of the + * address space than what has actually been reserved. */ - static bool IsSandboxConfiguredSecurely(); - V8_DEPRECATE_SOON("Use IsSandboxConfiguredSecurely()") - static bool IsUsingSecureVirtualMemoryCage() { - return IsSandboxConfiguredSecurely(); - } -#endif + static size_t GetSandboxReservationSizeInBytes(); +#endif // V8_ENABLE_SANDBOX /** * Activate trap-based bounds checking for WebAssembly. @@ -273,7 +249,7 @@ class V8_EXPORT V8 { * exceptions in V8-generated code. */ static void SetUnhandledExceptionCallback( - UnhandledExceptionCallback unhandled_exception_callback); + UnhandledExceptionCallback callback); #endif /** @@ -281,8 +257,7 @@ class V8_EXPORT V8 { * v8 has encountered a fatal failure to allocate memory and is about to * terminate. */ - - static void SetFatalMemoryErrorCallback(OOMErrorCallback oom_error_callback); + static void SetFatalMemoryErrorCallback(OOMErrorCallback callback); /** * Get statistics about the shared memory usage. @@ -295,8 +270,7 @@ class V8_EXPORT V8 { enum BuildConfigurationFeatures { kPointerCompression = 1 << 0, k31BitSmis = 1 << 1, - kSandboxedExternalPointers = 1 << 2, - kSandbox = 1 << 3, + kSandbox = 1 << 2, }; /** diff --git a/deps/v8/include/v8-inspector.h b/deps/v8/include/v8-inspector.h index ce5430bd039870..aa5a044afb61c4 100644 --- a/deps/v8/include/v8-inspector.h +++ b/deps/v8/include/v8-inspector.h @@ -207,10 +207,10 @@ class V8_EXPORT V8InspectorSession { class V8_EXPORT WebDriverValue { public: - explicit WebDriverValue(StringView type, v8::MaybeLocal value = {}) - : type(type), value(value) {} - - StringView type; + explicit WebDriverValue(std::unique_ptr type, + v8::MaybeLocal value = {}) + : type(std::move(type)), value(value) {} + std::unique_ptr type; v8::MaybeLocal value; }; @@ -219,6 +219,9 @@ class V8_EXPORT V8InspectorClient { virtual ~V8InspectorClient() = default; virtual void runMessageLoopOnPause(int contextGroupId) {} + virtual void runMessageLoopOnInstrumentationPause(int contextGroupId) { + runMessageLoopOnPause(contextGroupId); + } virtual void quitMessageLoopOnPause() {} virtual void runIfWaitingForDebugger(int contextGroupId) {} @@ -361,9 +364,12 @@ class V8_EXPORT V8Inspector { virtual void sendNotification(std::unique_ptr message) = 0; virtual void flushProtocolNotifications() = 0; }; - virtual std::unique_ptr connect(int contextGroupId, - Channel*, - StringView state) = 0; + enum ClientTrustLevel { kUntrusted, kFullyTrusted }; + virtual std::unique_ptr connect( + int contextGroupId, Channel*, StringView state, + ClientTrustLevel client_trust_level) { + return nullptr; + } // API methods. virtual std::unique_ptr createStackTrace( diff --git a/deps/v8/include/v8-internal.h b/deps/v8/include/v8-internal.h index e6e9cc5f9f5bbc..c97942ed1b476a 100644 --- a/deps/v8/include/v8-internal.h +++ b/deps/v8/include/v8-internal.h @@ -8,6 +8,8 @@ #include #include #include + +#include #include #include "v8-version.h" // NOLINT(build/include_directory) @@ -50,6 +52,7 @@ const int kHeapObjectTag = 1; const int kWeakHeapObjectTag = 3; const int kHeapObjectTagSize = 2; const intptr_t kHeapObjectTagMask = (1 << kHeapObjectTagSize) - 1; +const intptr_t kHeapObjectReferenceTagMask = 1 << (kHeapObjectTagSize - 1); // Tag information for fowarding pointers stored in object headers. // 0b00 at the lowest 2 bits in the header indicates that the map word is a @@ -157,15 +160,7 @@ V8_INLINE static constexpr internal::Address IntToSmi(int value) { * Sandbox related types, constants, and functions. */ constexpr bool SandboxIsEnabled() { -#ifdef V8_SANDBOX - return true; -#else - return false; -#endif -} - -constexpr bool SandboxedExternalPointersAreEnabled() { -#ifdef V8_SANDBOXED_EXTERNAL_POINTERS +#ifdef V8_ENABLE_SANDBOX return true; #else return false; @@ -176,19 +171,18 @@ constexpr bool SandboxedExternalPointersAreEnabled() { // for example by storing them as offset rather than as raw pointers. using SandboxedPointer_t = Address; -// ExternalPointers point to objects located outside the sandbox. When sandboxed -// external pointers are enabled, these are stored in an external pointer table -// and referenced from HeapObjects through indices. -#ifdef V8_SANDBOXED_EXTERNAL_POINTERS -using ExternalPointer_t = uint32_t; -#else -using ExternalPointer_t = Address; -#endif - -#ifdef V8_SANDBOX_IS_AVAILABLE +#ifdef V8_ENABLE_SANDBOX // Size of the sandbox, excluding the guard regions surrounding it. +#ifdef V8_TARGET_OS_ANDROID +// On Android, most 64-bit devices seem to be configured with only 39 bits of +// virtual address space for userspace. As such, limit the sandbox to 128GB (a +// quarter of the total available address space). +constexpr size_t kSandboxSizeLog2 = 37; // 128 GB +#else +// Everywhere else use a 1TB sandbox. constexpr size_t kSandboxSizeLog2 = 40; // 1 TB +#endif // V8_OS_ANDROID constexpr size_t kSandboxSize = 1ULL << kSandboxSizeLog2; // Required alignment of the sandbox. For simplicity, we require the @@ -213,20 +207,6 @@ static_assert((kSandboxGuardRegionSize % kSandboxAlignment) == 0, "The size of the guard regions around the sandbox must be a " "multiple of its required alignment."); -// Minimum size of the sandbox, excluding the guard regions surrounding it. If -// the virtual memory reservation for the sandbox fails, its size is currently -// halved until either the reservation succeeds or the minimum size is reached. -// A minimum of 32GB allows the 4GB pointer compression region as well as the -// ArrayBuffer partition and two 10GB Wasm memory cages to fit into the -// sandbox. 32GB should also be the minimum possible size of the userspace -// address space as there are some machine configurations with only 36 virtual -// address bits. -constexpr size_t kSandboxMinimumSize = 32ULL * GB; - -static_assert(kSandboxMinimumSize <= kSandboxSize, - "The minimal size of the sandbox must be smaller or equal to the " - "regular size."); - // On OSes where reserving virtual memory is too expensive to reserve the // entire address space backing the sandbox, notably Windows pre 8.1, we create // a partially reserved sandbox that doesn't actually reserve most of the @@ -239,82 +219,253 @@ static_assert(kSandboxMinimumSize <= kSandboxSize, // well as the ArrayBuffer partition. constexpr size_t kSandboxMinimumReservationSize = 8ULL * GB; -static_assert(kSandboxMinimumSize > kPtrComprCageReservationSize, - "The sandbox must be larger than the pointer compression cage " - "contained within it."); static_assert(kSandboxMinimumReservationSize > kPtrComprCageReservationSize, "The minimum reservation size for a sandbox must be larger than " "the pointer compression cage contained within it."); -// For now, even if the sandbox is enabled, we still allow backing stores to be -// allocated outside of it as fallback. This will simplify the initial rollout. -// However, if sandboxed pointers are also enabled, we must always place -// backing stores inside the sandbox as they will be referenced though them. -#ifdef V8_SANDBOXED_POINTERS -constexpr bool kAllowBackingStoresOutsideSandbox = false; -#else -constexpr bool kAllowBackingStoresOutsideSandbox = true; -#endif // V8_SANDBOXED_POINTERS +#endif // V8_ENABLE_SANDBOX + +#ifdef V8_COMPRESS_POINTERS // The size of the virtual memory reservation for an external pointer table. // This determines the maximum number of entries in a table. Using a maximum // size allows omitting bounds checks on table accesses if the indices are // guaranteed (e.g. through shifting) to be below the maximum index. This // value must be a power of two. -static const size_t kExternalPointerTableReservationSize = 128 * MB; +static const size_t kExternalPointerTableReservationSize = 512 * MB; // The maximum number of entries in an external pointer table. -static const size_t kMaxSandboxedExternalPointers = +static const size_t kMaxExternalPointers = kExternalPointerTableReservationSize / kApiSystemPointerSize; // The external pointer table indices stored in HeapObjects as external // pointers are shifted to the left by this amount to guarantee that they are // smaller than the maximum table size. -static const uint32_t kExternalPointerIndexShift = 8; -static_assert((1 << (32 - kExternalPointerIndexShift)) == - kMaxSandboxedExternalPointers, +static const uint32_t kExternalPointerIndexShift = 6; +static_assert((1 << (32 - kExternalPointerIndexShift)) == kMaxExternalPointers, "kExternalPointerTableReservationSize and " "kExternalPointerIndexShift don't match"); -#endif // V8_SANDBOX_IS_AVAILABLE - -// If sandboxed external pointers are enabled, these tag values will be ORed -// with the external pointers in the external pointer table to prevent use of -// pointers of the wrong type. When a pointer is loaded, it is ANDed with the -// inverse of the expected type's tag. The tags are constructed in a way that -// guarantees that a failed type check will result in one or more of the top -// bits of the pointer to be set, rendering the pointer inacessible. Besides -// the type tag bits (48 through 62), the tags also have the GC mark bit (63) -// set, so that the mark bit is automatically set when a pointer is written -// into the external pointer table (in which case it is clearly alive) and is -// cleared when the pointer is loaded. The exception to this is the free entry -// tag, which doesn't have the mark bit set, as the entry is not alive. This +#else // !V8_COMPRESS_POINTERS + +// Needed for the V8.SandboxedExternalPointersCount histogram. +static const size_t kMaxExternalPointers = 0; + +#endif // V8_COMPRESS_POINTERS + +// A ExternalPointerHandle represents a (opaque) reference to an external +// pointer that can be stored inside the sandbox. A ExternalPointerHandle has +// meaning only in combination with an (active) Isolate as it references an +// external pointer stored in the currently active Isolate's +// ExternalPointerTable. Internally, an ExternalPointerHandles is simply an +// index into an ExternalPointerTable that is shifted to the left to guarantee +// that it is smaller than the size of the table. +using ExternalPointerHandle = uint32_t; + +// ExternalPointers point to objects located outside the sandbox. When +// sandboxed external pointers are enabled, these are stored on heap as +// ExternalPointerHandles, otherwise they are simply raw pointers. +#ifdef V8_ENABLE_SANDBOX +using ExternalPointer_t = ExternalPointerHandle; +#else +using ExternalPointer_t = Address; +#endif + +// When the sandbox is enabled, external pointers are stored in an external +// pointer table and are referenced from HeapObjects through an index (a +// "handle"). When stored in the table, the pointers are tagged with per-type +// tags to prevent type confusion attacks between different external objects. +// Besides type information bits, these tags also contain the GC marking bit +// which indicates whether the pointer table entry is currently alive. When a +// pointer is written into the table, the tag is ORed into the top bits. When +// that pointer is later loaded from the table, it is ANDed with the inverse of +// the expected tag. If the expected and actual type differ, this will leave +// some of the top bits of the pointer set, rendering the pointer inaccessible. +// The AND operation also removes the GC marking bit from the pointer. +// +// The tags are constructed such that UNTAG(TAG(0, T1), T2) != 0 for any two +// (distinct) tags T1 and T2. In practice, this is achieved by generating tags +// that all have the same number of zeroes and ones but different bit patterns. +// With N type tag bits, this allows for (N choose N/2) possible type tags. +// Besides the type tag bits, the tags also have the GC marking bit set so that +// the marking bit is automatically set when a pointer is written into the +// external pointer table (in which case it is clearly alive) and is cleared +// when the pointer is loaded. The exception to this is the free entry tag, +// which doesn't have the mark bit set, as the entry is not alive. This // construction allows performing the type check and removing GC marking bits -// (the MSB) from the pointer at the same time. -// Note: this scheme assumes a 48-bit address space and will likely break if -// more virtual address bits are used. -constexpr uint64_t kExternalPointerTagMask = 0xffff000000000000; +// from the pointer in one efficient operation (bitwise AND). The number of +// available bits is limited in the following way: on x64, bits [47, 64) are +// generally available for tagging (userspace has 47 address bits available). +// On Arm64, userspace typically has a 40 or 48 bit address space. However, due +// to top-byte ignore (TBI) and memory tagging (MTE), the top byte is unusable +// for type checks as type-check failures would go unnoticed or collide with +// MTE bits. Some bits of the top byte can, however, still be used for the GC +// marking bit. The bits available for the type tags are therefore limited to +// [48, 56), i.e. (8 choose 4) = 70 different types. +// The following options exist to increase the number of possible types: +// - Using multiple ExternalPointerTables since tags can safely be reused +// across different tables +// - Using "extended" type checks, where additional type information is stored +// either in an adjacent pointer table entry or at the pointed-to location +// - Using a different tagging scheme, for example based on XOR which would +// allow for 2**8 different tags but require a separate operation to remove +// the marking bit +// +// The external pointer sandboxing mechanism ensures that every access to an +// external pointer field will result in a valid pointer of the expected type +// even in the presence of an attacker able to corrupt memory inside the +// sandbox. However, if any data related to the external object is stored +// inside the sandbox it may still be corrupted and so must be validated before +// use or moved into the external object. Further, an attacker will always be +// able to substitute different external pointers of the same type for each +// other. Therefore, code using external pointers must be written in a +// "substitution-safe" way, i.e. it must always be possible to substitute +// external pointers of the same type without causing memory corruption outside +// of the sandbox. Generally this is achieved by referencing any group of +// related external objects through a single external pointer. +// +// Currently we use bit 62 for the marking bit which should always be unused as +// it's part of the non-canonical address range. When Arm's top-byte ignore +// (TBI) is enabled, this bit will be part of the ignored byte, and we assume +// that the Embedder is not using this byte (really only this one bit) for any +// other purpose. This bit also does not collide with the memory tagging +// extension (MTE) which would use bits [56, 60). +constexpr uint64_t kExternalPointerMarkBit = 1ULL << 62; +constexpr uint64_t kExternalPointerTagMask = 0x40ff000000000000; constexpr uint64_t kExternalPointerTagShift = 48; -#define MAKE_TAG(v) (static_cast(v) << kExternalPointerTagShift) + +// All possible 8-bit type tags. +// These are sorted so that tags can be grouped together and it can efficiently +// be checked if a tag belongs to a given group. See for example the +// IsSharedExternalPointerType routine. +constexpr uint64_t kAllExternalPointerTypeTags[] = { + 0b00001111, 0b00010111, 0b00011011, 0b00011101, 0b00011110, 0b00100111, + 0b00101011, 0b00101101, 0b00101110, 0b00110011, 0b00110101, 0b00110110, + 0b00111001, 0b00111010, 0b00111100, 0b01000111, 0b01001011, 0b01001101, + 0b01001110, 0b01010011, 0b01010101, 0b01010110, 0b01011001, 0b01011010, + 0b01011100, 0b01100011, 0b01100101, 0b01100110, 0b01101001, 0b01101010, + 0b01101100, 0b01110001, 0b01110010, 0b01110100, 0b01111000, 0b10000111, + 0b10001011, 0b10001101, 0b10001110, 0b10010011, 0b10010101, 0b10010110, + 0b10011001, 0b10011010, 0b10011100, 0b10100011, 0b10100101, 0b10100110, + 0b10101001, 0b10101010, 0b10101100, 0b10110001, 0b10110010, 0b10110100, + 0b10111000, 0b11000011, 0b11000101, 0b11000110, 0b11001001, 0b11001010, + 0b11001100, 0b11010001, 0b11010010, 0b11010100, 0b11011000, 0b11100001, + 0b11100010, 0b11100100, 0b11101000, 0b11110000}; + // clang-format off +// New entries should be added with state "sandboxed". +// When adding new tags, please ensure that the code using these tags is +// "substitution-safe", i.e. still operate safely if external pointers of the +// same type are swapped by an attacker. See comment above for more details. +#define TAG(i) (kAllExternalPointerTypeTags[i]) + +// Shared external pointers are owned by the shared Isolate and stored in the +// shared external pointer table associated with that Isolate, where they can +// be accessed from multiple threads at the same time. The objects referenced +// in this way must therefore always be thread-safe. +#define SHARED_EXTERNAL_POINTER_TAGS(V) \ + V(kFirstSharedTag, sandboxed, TAG(0)) \ + V(kWaiterQueueNodeTag, sandboxed, TAG(0)) \ + V(kExternalStringResourceTag, sandboxed, TAG(1)) \ + V(kExternalStringResourceDataTag, sandboxed, TAG(2)) \ + V(kLastSharedTag, sandboxed, TAG(2)) + +// External pointers using these tags are kept in a per-Isolate external +// pointer table and can only be accessed when this Isolate is active. +#define PER_ISOLATE_EXTERNAL_POINTER_TAGS(V) \ + V(kForeignForeignAddressTag, sandboxed, TAG(10)) \ + V(kNativeContextMicrotaskQueueTag, sandboxed, TAG(11)) \ + V(kEmbedderDataSlotPayloadTag, sandboxed, TAG(12)) \ + V(kExternalObjectValueTag, sandboxed, TAG(13)) \ + V(kCallHandlerInfoCallbackTag, sandboxed, TAG(14)) \ + V(kAccessorInfoGetterTag, sandboxed, TAG(15)) \ + V(kAccessorInfoSetterTag, sandboxed, TAG(16)) \ + V(kWasmInternalFunctionCallTargetTag, sandboxed, TAG(17)) \ + V(kWasmTypeInfoNativeTypeTag, sandboxed, TAG(18)) \ + V(kWasmExportedFunctionDataSignatureTag, sandboxed, TAG(19)) \ + V(kWasmContinuationJmpbufTag, sandboxed, TAG(20)) + +// All external pointer tags. +#define ALL_EXTERNAL_POINTER_TAGS(V) \ + SHARED_EXTERNAL_POINTER_TAGS(V) \ + PER_ISOLATE_EXTERNAL_POINTER_TAGS(V) + +// When the sandbox is enabled, external pointers marked as "sandboxed" above +// use the external pointer table (i.e. are sandboxed). This allows a gradual +// rollout of external pointer sandboxing. If the sandbox is off, no external +// pointers are sandboxed. +// +// Sandboxed external pointer tags are available when compressing pointers even +// when the sandbox is off. Some tags (e.g. kWaiterQueueNodeTag) are used +// manually with the external pointer table even when the sandbox is off to ease +// alignment requirements. +#define sandboxed(X) (X << kExternalPointerTagShift) | kExternalPointerMarkBit +#define unsandboxed(X) kUnsandboxedExternalPointerTag +#if defined(V8_COMPRESS_POINTERS) +#define EXTERNAL_POINTER_TAG_ENUM(Name, State, Bits) Name = State(Bits), +#else +#define EXTERNAL_POINTER_TAG_ENUM(Name, State, Bits) Name = unsandboxed(Bits), +#endif + +#define MAKE_TAG(HasMarkBit, TypeTag) \ + ((static_cast(TypeTag) << kExternalPointerTagShift) | \ + (HasMarkBit ? kExternalPointerMarkBit : 0)) enum ExternalPointerTag : uint64_t { - kExternalPointerNullTag = MAKE_TAG(0b0000000000000000), - kExternalPointerFreeEntryTag = MAKE_TAG(0b0111111110000000), - kExternalStringResourceTag = MAKE_TAG(0b1000000011111111), - kExternalStringResourceDataTag = MAKE_TAG(0b1000000101111111), - kForeignForeignAddressTag = MAKE_TAG(0b1000000110111111), - kNativeContextMicrotaskQueueTag = MAKE_TAG(0b1000000111011111), - kEmbedderDataSlotPayloadTag = MAKE_TAG(0b1000000111101111), - kCodeEntryPointTag = MAKE_TAG(0b1000000111110111), - kExternalObjectValueTag = MAKE_TAG(0b1000000111111011), + // Empty tag value. Mostly used as placeholder. + kExternalPointerNullTag = MAKE_TAG(0, 0b00000000), + // Tag to use for unsandboxed external pointers, which are still stored as + // raw pointers on the heap. + kUnsandboxedExternalPointerTag = MAKE_TAG(0, 0b00000000), + // External pointer tag that will match any external pointer. Use with care! + kAnyExternalPointerTag = MAKE_TAG(1, 0b11111111), + // The free entry tag has all type bits set so every type check with a + // different type fails. It also doesn't have the mark bit set as free + // entries are (by definition) not alive. + kExternalPointerFreeEntryTag = MAKE_TAG(0, 0b11111111), + // Evacuation entries are used during external pointer table compaction. + kExternalPointerEvacuationEntryTag = MAKE_TAG(1, 0b11100111), + + ALL_EXTERNAL_POINTER_TAGS(EXTERNAL_POINTER_TAG_ENUM) }; -// clang-format on + #undef MAKE_TAG +#undef unsandboxed +#undef sandboxed +#undef TAG +#undef EXTERNAL_POINTER_TAG_ENUM + +// clang-format on + +// True if the external pointer is sandboxed and so must be referenced through +// an external pointer table. +V8_INLINE static constexpr bool IsSandboxedExternalPointerType( + ExternalPointerTag tag) { + return tag != kUnsandboxedExternalPointerTag; +} -// Converts encoded external pointer to address. -V8_EXPORT Address DecodeExternalPointerImpl(const Isolate* isolate, - ExternalPointer_t pointer, - ExternalPointerTag tag); +// True if the external pointer must be accessed from the shared isolate's +// external pointer table. +V8_INLINE static constexpr bool IsSharedExternalPointerType( + ExternalPointerTag tag) { + return tag >= kFirstSharedTag && tag <= kLastSharedTag; +} + +// Sanity checks. +#define CHECK_SHARED_EXTERNAL_POINTER_TAGS(Tag, ...) \ + static_assert(!IsSandboxedExternalPointerType(Tag) || \ + IsSharedExternalPointerType(Tag)); +#define CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS(Tag, ...) \ + static_assert(!IsSandboxedExternalPointerType(Tag) || \ + !IsSharedExternalPointerType(Tag)); + +SHARED_EXTERNAL_POINTER_TAGS(CHECK_SHARED_EXTERNAL_POINTER_TAGS) +PER_ISOLATE_EXTERNAL_POINTER_TAGS(CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS) + +#undef CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS +#undef CHECK_SHARED_EXTERNAL_POINTER_TAGS + +#undef SHARED_EXTERNAL_POINTER_TAGS +#undef EXTERNAL_POINTER_TAGS // {obj} must be the raw tagged pointer representation of a HeapObject // that's guaranteed to never be in ReadOnlySpace. @@ -324,9 +475,6 @@ V8_EXPORT internal::Isolate* IsolateFromNeverReadOnlySpaceObject(Address obj); // mode based on the current context and the closure. This returns true if the // language mode is strict. V8_EXPORT bool ShouldThrowOnError(v8::internal::Isolate* isolate); - -V8_EXPORT bool CanHaveInternalField(int instance_type); - /** * This class exports constants and functionality from within v8 that * is necessary to implement inline functions in the v8 api. Don't @@ -354,8 +502,10 @@ class Internals { static const int kFixedArrayHeaderSize = 2 * kApiTaggedSize; static const int kEmbedderDataArrayHeaderSize = 2 * kApiTaggedSize; static const int kEmbedderDataSlotSize = kApiSystemPointerSize; -#ifdef V8_SANDBOXED_EXTERNAL_POINTERS - static const int kEmbedderDataSlotRawPayloadOffset = kApiTaggedSize; +#ifdef V8_ENABLE_SANDBOX + static const int kEmbedderDataSlotExternalPointerOffset = kApiTaggedSize; +#else + static const int kEmbedderDataSlotExternalPointerOffset = 0; #endif static const int kNativeContextEmbedderDataOffset = 6 * kApiTaggedSize; static const int kStringRepresentationAndEncodingMask = 0x0f; @@ -365,15 +515,21 @@ class Internals { static const uint32_t kNumIsolateDataSlots = 4; static const int kStackGuardSize = 7 * kApiSystemPointerSize; - static const int kBuiltinTier0EntryTableSize = 10 * kApiSystemPointerSize; - static const int kBuiltinTier0TableSize = 10 * kApiSystemPointerSize; + static const int kBuiltinTier0EntryTableSize = 7 * kApiSystemPointerSize; + static const int kBuiltinTier0TableSize = 7 * kApiSystemPointerSize; + + // ExternalPointerTable layout guarantees. + static const int kExternalPointerTableBufferOffset = 0; + static const int kExternalPointerTableSize = 4 * kApiSystemPointerSize; // IsolateData layout guarantees. static const int kIsolateCageBaseOffset = 0; static const int kIsolateStackGuardOffset = kIsolateCageBaseOffset + kApiSystemPointerSize; - static const int kBuiltinTier0EntryTableOffset = + static const int kVariousBooleanFlagsOffset = kIsolateStackGuardOffset + kStackGuardSize; + static const int kBuiltinTier0EntryTableOffset = + kVariousBooleanFlagsOffset + kApiSystemPointerSize; static const int kBuiltinTier0TableOffset = kBuiltinTier0EntryTableOffset + kBuiltinTier0EntryTableSize; static const int kIsolateEmbedderDataOffset = @@ -386,14 +542,17 @@ class Internals { kIsolateFastCCallCallerPcOffset + kApiSystemPointerSize; static const int kIsolateLongTaskStatsCounterOffset = kIsolateFastApiCallTargetOffset + kApiSystemPointerSize; +#ifdef V8_COMPRESS_POINTERS + static const int kIsolateExternalPointerTableOffset = + kIsolateLongTaskStatsCounterOffset + kApiSizetSize; + static const int kIsolateSharedExternalPointerTableAddressOffset = + kIsolateExternalPointerTableOffset + kExternalPointerTableSize; + static const int kIsolateRootsOffset = + kIsolateSharedExternalPointerTableAddressOffset + kApiSystemPointerSize; +#else static const int kIsolateRootsOffset = kIsolateLongTaskStatsCounterOffset + kApiSizetSize; - - static const int kExternalPointerTableBufferOffset = 0; - static const int kExternalPointerTableCapacityOffset = - kExternalPointerTableBufferOffset + kApiSystemPointerSize; - static const int kExternalPointerTableFreelistHeadOffset = - kExternalPointerTableCapacityOffset + kApiInt32Size; +#endif static const int kUndefinedValueRootIndex = 4; static const int kTheHoleValueRootIndex = 5; @@ -404,9 +563,8 @@ class Internals { static const int kNodeClassIdOffset = 1 * kApiSystemPointerSize; static const int kNodeFlagsOffset = 1 * kApiSystemPointerSize + 3; - static const int kNodeStateMask = 0x7; + static const int kNodeStateMask = 0x3; static const int kNodeStateIsWeakValue = 2; - static const int kNodeStateIsPendingValue = 3; static const int kFirstNonstringType = 0x80; static const int kOddballType = 0x83; @@ -481,6 +639,18 @@ class Internals { return representation == kExternalTwoByteRepresentationTag; } + V8_INLINE static constexpr bool CanHaveInternalField(int instance_type) { + static_assert(kJSObjectType + 1 == kFirstJSApiObjectType); + static_assert(kJSObjectType < kLastJSApiObjectType); + static_assert(kFirstJSApiObjectType < kLastJSApiObjectType); + // Check for IsJSObject() || IsJSSpecialApiObject() || IsJSApiObject() + return instance_type == kJSSpecialApiObjectType || + // inlined version of base::IsInRange + (static_cast(static_cast(instance_type) - + static_cast(kJSObjectType)) <= + static_cast(kLastJSApiObjectType - kJSObjectType)); + } + V8_INLINE static uint8_t GetNodeFlag(internal::Address* obj, int shift) { uint8_t* addr = reinterpret_cast(obj) + kNodeFlagsOffset; return *addr & static_cast(1U << shift); @@ -532,6 +702,25 @@ class Internals { return reinterpret_cast(addr); } +#ifdef V8_ENABLE_SANDBOX + V8_INLINE static internal::Address* GetExternalPointerTableBase( + v8::Isolate* isolate) { + internal::Address addr = reinterpret_cast(isolate) + + kIsolateExternalPointerTableOffset + + kExternalPointerTableBufferOffset; + return *reinterpret_cast(addr); + } + + V8_INLINE static internal::Address* GetSharedExternalPointerTableBase( + v8::Isolate* isolate) { + internal::Address addr = reinterpret_cast(isolate) + + kIsolateSharedExternalPointerTableAddressOffset; + addr = *reinterpret_cast(addr); + addr += kExternalPointerTableBufferOffset; + return *reinterpret_cast(addr); + } +#endif + template V8_INLINE static T ReadRawField(internal::Address heap_object_ptr, int offset) { @@ -572,38 +761,38 @@ class Internals { #endif } - V8_INLINE static internal::Isolate* GetIsolateForSandbox( - internal::Address obj) { -#ifdef V8_SANDBOXED_EXTERNAL_POINTERS - return internal::IsolateFromNeverReadOnlySpaceObject(obj); + V8_INLINE static v8::Isolate* GetIsolateForSandbox(internal::Address obj) { +#ifdef V8_ENABLE_SANDBOX + return reinterpret_cast( + internal::IsolateFromNeverReadOnlySpaceObject(obj)); #else // Not used in non-sandbox mode. return nullptr; #endif } - V8_INLINE static Address DecodeExternalPointer( - const Isolate* isolate, ExternalPointer_t encoded_pointer, - ExternalPointerTag tag) { -#ifdef V8_SANDBOXED_EXTERNAL_POINTERS - return internal::DecodeExternalPointerImpl(isolate, encoded_pointer, tag); -#else - return encoded_pointer; -#endif - } - + template V8_INLINE static internal::Address ReadExternalPointerField( - internal::Isolate* isolate, internal::Address heap_object_ptr, int offset, - ExternalPointerTag tag) { -#ifdef V8_SANDBOXED_EXTERNAL_POINTERS - internal::ExternalPointer_t encoded_value = - ReadRawField(heap_object_ptr, offset); - // We currently have to treat zero as nullptr in embedder slots. - return encoded_value ? DecodeExternalPointer(isolate, encoded_value, tag) - : 0; -#else - return ReadRawField
(heap_object_ptr, offset); + v8::Isolate* isolate, internal::Address heap_object_ptr, int offset) { +#ifdef V8_ENABLE_SANDBOX + if (IsSandboxedExternalPointerType(tag)) { + // See src/sandbox/external-pointer-table-inl.h. Logic duplicated here so + // it can be inlined and doesn't require an additional call. + internal::Address* table = + IsSharedExternalPointerType(tag) + ? GetSharedExternalPointerTableBase(isolate) + : GetExternalPointerTableBase(isolate); + internal::ExternalPointerHandle handle = + ReadRawField(heap_object_ptr, offset); + uint32_t index = handle >> kExternalPointerIndexShift; + std::atomic* ptr = + reinterpret_cast*>(&table[index]); + internal::Address entry = + std::atomic_load_explicit(ptr, std::memory_order_relaxed); + return entry & ~tag; + } #endif + return ReadRawField
(heap_object_ptr, offset); } #ifdef V8_COMPRESS_POINTERS @@ -652,7 +841,7 @@ class BackingStoreBase {}; // The maximum value in enum GarbageCollectionReason, defined in heap.h. // This is needed for histograms sampling garbage collection reasons. -constexpr int kGarbageCollectionReasonMaxValue = 25; +constexpr int kGarbageCollectionReasonMaxValue = 27; } // namespace internal diff --git a/deps/v8/include/v8-isolate.h b/deps/v8/include/v8-isolate.h index 2849d7cae1e9e8..4f31d8c7a80835 100644 --- a/deps/v8/include/v8-isolate.h +++ b/deps/v8/include/v8-isolate.h @@ -194,6 +194,11 @@ enum RAILMode : unsigned { */ enum class MemoryPressureLevel { kNone, kModerate, kCritical }; +/** + * Indicator for the stack state. + */ +using StackState = cppgc::EmbedderStackState; + /** * Isolate represents an isolated instance of the V8 engine. V8 isolates have * completely separate states. Objects from one isolate must not be used in @@ -211,6 +216,8 @@ class V8_EXPORT Isolate { CreateParams(); ~CreateParams(); + ALLOW_COPY_AND_MOVE_WITH_DEPRECATED_FIELDS(CreateParams) + /** * Allows the host application to provide the address of a function that is * notified each time code is added, moved or removed. @@ -287,12 +294,6 @@ class V8_EXPORT Isolate { */ FatalErrorCallback fatal_error_callback = nullptr; OOMErrorCallback oom_error_callback = nullptr; - - /** - * The following parameter is experimental and may change significantly. - * This is currently for internal testing. - */ - Isolate* experimental_attach_to_shared_isolate = nullptr; }; /** @@ -301,16 +302,18 @@ class V8_EXPORT Isolate { */ class V8_EXPORT V8_NODISCARD Scope { public: - explicit Scope(Isolate* isolate) : isolate_(isolate) { isolate->Enter(); } + explicit Scope(Isolate* isolate) : v8_isolate_(isolate) { + v8_isolate_->Enter(); + } - ~Scope() { isolate_->Exit(); } + ~Scope() { v8_isolate_->Exit(); } // Prevent copying of Scope objects. Scope(const Scope&) = delete; Scope& operator=(const Scope&) = delete; private: - Isolate* const isolate_; + Isolate* const v8_isolate_; }; /** @@ -331,7 +334,7 @@ class V8_EXPORT Isolate { private: OnFailure on_failure_; - Isolate* isolate_; + v8::Isolate* v8_isolate_; bool was_execution_allowed_assert_; bool was_execution_allowed_throws_; @@ -353,7 +356,7 @@ class V8_EXPORT Isolate { const AllowJavascriptExecutionScope&) = delete; private: - Isolate* isolate_; + Isolate* v8_isolate_; bool was_execution_allowed_assert_; bool was_execution_allowed_throws_; bool was_execution_allowed_dump_; @@ -376,7 +379,7 @@ class V8_EXPORT Isolate { const SuppressMicrotaskExecutionScope&) = delete; private: - internal::Isolate* const isolate_; + internal::Isolate* const i_isolate_; internal::MicrotaskQueue* const microtask_queue_; internal::Address previous_stack_height_; @@ -389,7 +392,7 @@ class V8_EXPORT Isolate { */ class V8_EXPORT V8_NODISCARD SafeForTerminationScope { public: - explicit SafeForTerminationScope(v8::Isolate* isolate); + explicit SafeForTerminationScope(v8::Isolate* v8_isolate); ~SafeForTerminationScope(); // Prevent copying of Scope objects. @@ -397,7 +400,7 @@ class V8_EXPORT Isolate { SafeForTerminationScope& operator=(const SafeForTerminationScope&) = delete; private: - internal::Isolate* isolate_; + internal::Isolate* i_isolate_; bool prev_value_; }; @@ -531,6 +534,8 @@ class V8_EXPORT Isolate { kInvalidatedMegaDOMProtector = 112, kFunctionPrototypeArguments = 113, kFunctionPrototypeCaller = 114, + kTurboFanOsrCompileStarted = 115, + kAsyncStackTaggingCreateTaskCall = 116, // If you add new values here, you'll also need to update Chromium's: // web_feature.mojom, use_counter_callback.cc, and enums.xml. V8 changes to @@ -636,9 +641,6 @@ class V8_EXPORT Isolate { * This specifies the callback called by the upcoming dynamic * import() language feature to load modules. */ - V8_DEPRECATED("Use HostImportModuleDynamicallyCallback") - void SetHostImportModuleDynamicallyCallback( - HostImportModuleDynamicallyWithImportAssertionsCallback callback); void SetHostImportModuleDynamicallyCallback( HostImportModuleDynamicallyCallback callback); @@ -839,12 +841,6 @@ class V8_EXPORT Isolate { */ int64_t AdjustAmountOfExternalAllocatedMemory(int64_t change_in_bytes); - /** - * Returns the number of phantom handles without callbacks that were reset - * by the garbage collector since the last call to this function. - */ - size_t NumberOfPhantomHandleResetsSinceLastCall(); - /** * Returns heap profiler for this isolate. Will return NULL until the isolate * is initialized. @@ -927,6 +923,7 @@ class V8_EXPORT Isolate { void RemoveGCPrologueCallback(GCCallbackWithData, void* data = nullptr); void RemoveGCPrologueCallback(GCCallback callback); + START_ALLOW_USE_DEPRECATED() /** * Sets the embedder heap tracer for the isolate. * SetEmbedderHeapTracer cannot be used simultaneously with AttachCppHeap. @@ -938,6 +935,7 @@ class V8_EXPORT Isolate { * SetEmbedderHeapTracer. */ EmbedderHeapTracer* GetEmbedderHeapTracer(); + END_ALLOW_USE_DEPRECATED() /** * Sets an embedder roots handle that V8 should consider when performing @@ -1163,9 +1161,8 @@ class V8_EXPORT Isolate { * LowMemoryNotification() instead to influence the garbage collection * schedule. */ - void RequestGarbageCollectionForTesting( - GarbageCollectionType type, - EmbedderHeapTracer::EmbedderStackState stack_state); + void RequestGarbageCollectionForTesting(GarbageCollectionType type, + StackState stack_state); /** * Set the callback to invoke for logging event. @@ -1523,15 +1520,15 @@ class V8_EXPORT Isolate { void SetWasmStreamingCallback(WasmStreamingCallback callback); + void SetWasmAsyncResolvePromiseCallback( + WasmAsyncResolvePromiseCallback callback); + void SetWasmLoadSourceMapCallback(WasmLoadSourceMapCallback callback); void SetWasmSimdEnabledCallback(WasmSimdEnabledCallback callback); void SetWasmExceptionsEnabledCallback(WasmExceptionsEnabledCallback callback); - void SetWasmDynamicTieringEnabledCallback( - WasmDynamicTieringEnabledCallback callback); - void SetSharedArrayBufferConstructorEnabledCallback( SharedArrayBufferConstructorEnabledCallback callback); @@ -1598,19 +1595,6 @@ class V8_EXPORT Isolate { */ void VisitExternalResources(ExternalResourceVisitor* visitor); - /** - * Iterates through all the persistent handles in the current isolate's heap - * that have class_ids. - */ - void VisitHandlesWithClassIds(PersistentHandleVisitor* visitor); - - /** - * Iterates through all the persistent handles in the current isolate's heap - * that have class_ids and are weak to be marked as inactive if there is no - * pending activity for the handle. - */ - void VisitWeakHandles(PersistentHandleVisitor* visitor); - /** * Check if this isolate is in use. * True if at least one thread Enter'ed this isolate. diff --git a/deps/v8/include/v8-local-handle.h b/deps/v8/include/v8-local-handle.h index 5ae974081f8e32..cbf87f949d09fa 100644 --- a/deps/v8/include/v8-local-handle.h +++ b/deps/v8/include/v8-local-handle.h @@ -86,7 +86,7 @@ class V8_EXPORT V8_NODISCARD HandleScope { static int NumberOfHandles(Isolate* isolate); V8_INLINE Isolate* GetIsolate() const { - return reinterpret_cast(isolate_); + return reinterpret_cast(i_isolate_); } HandleScope(const HandleScope&) = delete; @@ -97,7 +97,7 @@ class V8_EXPORT V8_NODISCARD HandleScope { void Initialize(Isolate* isolate); - static internal::Address* CreateHandle(internal::Isolate* isolate, + static internal::Address* CreateHandle(internal::Isolate* i_isolate, internal::Address value); private: @@ -108,7 +108,7 @@ class V8_EXPORT V8_NODISCARD HandleScope { void operator delete(void*, size_t); void operator delete[](void*, size_t); - internal::Isolate* isolate_; + internal::Isolate* i_isolate_; internal::Address* prev_next_; internal::Address* prev_limit_; @@ -354,7 +354,7 @@ class MaybeLocal { /** * Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty, - * |false| is returned and |out| is left untouched. + * |false| is returned and |out| is assigned with nullptr. */ template V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local* out) const { @@ -445,7 +445,7 @@ class V8_EXPORT V8_NODISCARD SealHandleScope { void operator delete(void*, size_t); void operator delete[](void*, size_t); - internal::Isolate* const isolate_; + internal::Isolate* const i_isolate_; internal::Address* prev_limit_; int prev_sealed_level_; }; diff --git a/deps/v8/include/v8-locker.h b/deps/v8/include/v8-locker.h index 7ca5bf6e421e41..22b7a8767a83a7 100644 --- a/deps/v8/include/v8-locker.h +++ b/deps/v8/include/v8-locker.h @@ -121,17 +121,6 @@ class V8_EXPORT Locker { */ static bool IsLocked(Isolate* isolate); - /** - * Returns whether any v8::Locker has ever been used in this process. - * TODO(cbruni, chromium:1240851): Fix locking checks on a per-thread basis. - * The current implementation is quite confusing and leads to unexpected - * results if anybody uses v8::Locker in the current process. - */ - V8_DEPRECATE_SOON("This method will be removed.") - static bool WasEverUsed(); - V8_DEPRECATED("Use WasEverUsed instead") - static bool IsActive(); - // Disallow copying and assigning. Locker(const Locker&) = delete; void operator=(const Locker&) = delete; diff --git a/deps/v8/include/v8-maybe.h b/deps/v8/include/v8-maybe.h index 0532a510059d02..8d3aeabe02af45 100644 --- a/deps/v8/include/v8-maybe.h +++ b/deps/v8/include/v8-maybe.h @@ -5,6 +5,9 @@ #ifndef INCLUDE_V8_MAYBE_H_ #define INCLUDE_V8_MAYBE_H_ +#include +#include + #include "v8-internal.h" // NOLINT(build/include_directory) #include "v8config.h" // NOLINT(build/include_directory) @@ -57,11 +60,20 @@ class Maybe { * Converts this Maybe<> to a value of type T. If this Maybe<> is * nothing (empty), V8 will crash the process. */ - V8_INLINE T FromJust() const { + V8_INLINE T FromJust() const& { if (V8_UNLIKELY(!IsJust())) api_internal::FromJustIsNothing(); return value_; } + /** + * Converts this Maybe<> to a value of type T. If this Maybe<> is + * nothing (empty), V8 will crash the process. + */ + V8_INLINE T FromJust() && { + if (V8_UNLIKELY(!IsJust())) api_internal::FromJustIsNothing(); + return std::move(value_); + } + /** * Converts this Maybe<> to a value of type T, using a default value if this * Maybe<> is nothing (empty). @@ -82,6 +94,7 @@ class Maybe { private: Maybe() : has_value_(false) {} explicit Maybe(const T& t) : has_value_(true), value_(t) {} + explicit Maybe(T&& t) : has_value_(true), value_(std::move(t)) {} bool has_value_; T value_; @@ -90,6 +103,8 @@ class Maybe { friend Maybe Nothing(); template friend Maybe Just(const U& u); + template >*> + friend Maybe Just(U&& u); }; template @@ -102,6 +117,14 @@ inline Maybe Just(const T& t) { return Maybe(t); } +// Don't use forwarding references here but instead use two overloads. +// Forwarding references only work when type deduction takes place, which is not +// the case for callsites such as Just(t). +template >* = nullptr> +inline Maybe Just(T&& t) { + return Maybe(std::move(t)); +} + // A template specialization of Maybe for the case of T = void. template <> class Maybe { diff --git a/deps/v8/include/v8-message.h b/deps/v8/include/v8-message.h index a13276412a8152..09f9a0a97ddb64 100644 --- a/deps/v8/include/v8-message.h +++ b/deps/v8/include/v8-message.h @@ -70,7 +70,7 @@ class V8_EXPORT ScriptOrigin { bool resource_is_opaque = false, bool is_wasm = false, bool is_module = false, Local host_defined_options = Local()) - : isolate_(isolate), + : v8_isolate_(isolate), resource_name_(resource_name), resource_line_offset_(resource_line_offset), resource_column_offset_(resource_column_offset), @@ -87,14 +87,12 @@ class V8_EXPORT ScriptOrigin { V8_INLINE int ColumnOffset() const; V8_INLINE int ScriptId() const; V8_INLINE Local SourceMapUrl() const; - V8_DEPRECATE_SOON("Use GetHostDefinedOptions") - Local HostDefinedOptions() const; V8_INLINE Local GetHostDefinedOptions() const; V8_INLINE ScriptOriginOptions Options() const { return options_; } private: void VerifyHostDefinedOptions() const; - Isolate* isolate_; + Isolate* v8_isolate_; Local resource_name_; int resource_line_offset_; int resource_column_offset_; diff --git a/deps/v8/include/v8-metrics.h b/deps/v8/include/v8-metrics.h index d8e8bd865bfc03..887012ac8c3a0b 100644 --- a/deps/v8/include/v8-metrics.h +++ b/deps/v8/include/v8-metrics.h @@ -125,31 +125,10 @@ struct WasmModuleInstantiated { int64_t wall_clock_duration_in_us = -1; }; -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(GarbageCollectionFullMainThreadBatchedIncrementalMark) \ - V(GarbageCollectionFullMainThreadIncrementalSweep) \ - V(GarbageCollectionFullMainThreadBatchedIncrementalSweep) \ - V(GarbageCollectionYoungCycle) \ - V(WasmModuleDecoded) \ - V(WasmModuleCompiled) \ - V(WasmModuleInstantiated) \ - V(WasmModuleTieredUp) - -#define V8_THREAD_SAFE_METRICS_EVENTS(V) V(WasmModulesPerIsolate) - /** * This class serves as a base class for recording event-based metrics in V8. * There a two kinds of metrics, those which are expected to be thread-safe and @@ -159,19 +138,6 @@ struct WasmModulesPerIsolate { * background thread, it will be delayed and executed by the foreground task * runner. * - * The thread-safe events are listed in the V8_THREAD_SAFE_METRICS_EVENTS - * macro above while the main thread event are listed in - * V8_MAIN_THREAD_METRICS_EVENTS above. For the former, a virtual method - * AddMainThreadEvent(const E& event, v8::Context::Token token) will be - * generated and for the latter AddThreadSafeEvent(const E& event). - * - * Thread-safe events are not allowed to access the context and therefore do - * not carry a context ID with them. These IDs can be generated using - * Recorder::GetContextId() and the ID will be valid throughout the lifetime - * of the isolate. It is not guaranteed that the ID will still resolve to - * a valid context using Recorder::GetContext() at the time the metric is - * recorded. In this case, an empty handle will be returned. - * * The embedder is expected to call v8::Isolate::SetMetricsRecorder() * providing its implementation and have the virtual methods overwritten * for the events it cares about. @@ -202,14 +168,30 @@ class V8_EXPORT Recorder { virtual ~Recorder() = default; + // Main thread events. Those are only triggered on the main thread, and hence + // can access the context. #define ADD_MAIN_THREAD_EVENT(E) \ - virtual void AddMainThreadEvent(const E& event, ContextId context_id) {} - V8_MAIN_THREAD_METRICS_EVENTS(ADD_MAIN_THREAD_EVENT) + virtual void AddMainThreadEvent(const E&, ContextId) {} + ADD_MAIN_THREAD_EVENT(GarbageCollectionFullCycle) + ADD_MAIN_THREAD_EVENT(GarbageCollectionFullMainThreadIncrementalMark) + ADD_MAIN_THREAD_EVENT(GarbageCollectionFullMainThreadBatchedIncrementalMark) + ADD_MAIN_THREAD_EVENT(GarbageCollectionFullMainThreadIncrementalSweep) + ADD_MAIN_THREAD_EVENT(GarbageCollectionFullMainThreadBatchedIncrementalSweep) + ADD_MAIN_THREAD_EVENT(GarbageCollectionYoungCycle) + ADD_MAIN_THREAD_EVENT(WasmModuleDecoded) + ADD_MAIN_THREAD_EVENT(WasmModuleCompiled) + ADD_MAIN_THREAD_EVENT(WasmModuleInstantiated) #undef ADD_MAIN_THREAD_EVENT + // Thread-safe events are not allowed to access the context and therefore do + // not carry a context ID with them. These IDs can be generated using + // Recorder::GetContextId() and the ID will be valid throughout the lifetime + // of the isolate. It is not guaranteed that the ID will still resolve to + // a valid context using Recorder::GetContext() at the time the metric is + // recorded. In this case, an empty handle will be returned. #define ADD_THREAD_SAFE_EVENT(E) \ - virtual void AddThreadSafeEvent(const E& event) {} - V8_THREAD_SAFE_METRICS_EVENTS(ADD_THREAD_SAFE_EVENT) + virtual void AddThreadSafeEvent(const E&) {} + ADD_THREAD_SAFE_EVENT(WasmModulesPerIsolate) #undef ADD_THREAD_SAFE_EVENT virtual void NotifyIsolateDisposal() {} diff --git a/deps/v8/include/v8-microtask-queue.h b/deps/v8/include/v8-microtask-queue.h index af9caa54a8ff51..f1624b903b13c1 100644 --- a/deps/v8/include/v8-microtask-queue.h +++ b/deps/v8/include/v8-microtask-queue.h @@ -142,7 +142,7 @@ class V8_EXPORT V8_NODISCARD MicrotasksScope { MicrotasksScope& operator=(const MicrotasksScope&) = delete; private: - internal::Isolate* const isolate_; + internal::Isolate* const i_isolate_; internal::MicrotaskQueue* const microtask_queue_; bool run_; }; diff --git a/deps/v8/include/v8-object.h b/deps/v8/include/v8-object.h index bad299fc42948d..d7332ba0c88d12 100644 --- a/deps/v8/include/v8-object.h +++ b/deps/v8/include/v8-object.h @@ -594,8 +594,6 @@ class V8_EXPORT Object : public Value { /** * Returns the context in which the object was created. */ - V8_DEPRECATED("Use MaybeLocal GetCreationContext()") - Local CreationContext(); MaybeLocal GetCreationContext(); /** @@ -604,10 +602,6 @@ class V8_EXPORT Object : public Value { Local GetCreationContextChecked(); /** Same as above, but works for Persistents */ - V8_DEPRECATED( - "Use MaybeLocal GetCreationContext(const " - "PersistentBase& object)") - static Local CreationContext(const PersistentBase& object); V8_INLINE static MaybeLocal GetCreationContext( const PersistentBase& object) { return object.val_->GetCreationContext(); @@ -717,7 +711,7 @@ Local Object::GetInternalField(int index) { // Fast path: If the object is a plain JSObject, which is the common case, we // know where to find the internal fields and can return the value directly. int instance_type = I::GetInstanceType(obj); - if (v8::internal::CanHaveInternalField(instance_type)) { + if (I::CanHaveInternalField(instance_type)) { int offset = I::kJSObjectHeaderSize + (I::kEmbedderDataSlotSize * index); A value = I::ReadRawField(obj, offset); #ifdef V8_COMPRESS_POINTERS @@ -742,14 +736,13 @@ void* Object::GetAlignedPointerFromInternalField(int index) { // Fast path: If the object is a plain JSObject, which is the common case, we // know where to find the internal fields and can return the value directly. auto instance_type = I::GetInstanceType(obj); - if (v8::internal::CanHaveInternalField(instance_type)) { - int offset = I::kJSObjectHeaderSize + (I::kEmbedderDataSlotSize * index); -#ifdef V8_SANDBOXED_EXTERNAL_POINTERS - offset += I::kEmbedderDataSlotRawPayloadOffset; -#endif - internal::Isolate* isolate = I::GetIsolateForSandbox(obj); - A value = I::ReadExternalPointerField( - isolate, obj, offset, internal::kEmbedderDataSlotPayloadTag); + if (I::CanHaveInternalField(instance_type)) { + int offset = I::kJSObjectHeaderSize + (I::kEmbedderDataSlotSize * index) + + I::kEmbedderDataSlotExternalPointerOffset; + Isolate* isolate = I::GetIsolateForSandbox(obj); + A value = + I::ReadExternalPointerField( + isolate, obj, offset); return reinterpret_cast(value); } #endif diff --git a/deps/v8/include/v8-persistent-handle.h b/deps/v8/include/v8-persistent-handle.h index a6c21268d6ab54..4fe79862e400f9 100644 --- a/deps/v8/include/v8-persistent-handle.h +++ b/deps/v8/include/v8-persistent-handle.h @@ -169,8 +169,6 @@ class PersistentBase { * Turns this handle into a weak phantom handle without finalization callback. * The handle will be reset automatically when the garbage collector detects * that the object is no longer reachable. - * A related function Isolate::NumberOfPhantomHandleResetsSinceLastCall - * returns how many phantom handles were reset by the garbage collector. */ V8_INLINE void SetWeak(); @@ -254,7 +252,7 @@ class NonCopyablePersistentTraits { * This will clone the contents of storage cell, but not any of the flags, etc. */ template -struct CopyablePersistentTraits { +struct V8_DEPRECATED("Use v8::Global instead") CopyablePersistentTraits { using CopyablePersistent = Persistent>; static const bool kResetInDestructor = true; template diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h index 91b3fd9cc3f9a3..5d34372df50c2b 100644 --- a/deps/v8/include/v8-platform.h +++ b/deps/v8/include/v8-platform.h @@ -158,9 +158,10 @@ class TaskRunner { class JobDelegate { public: /** - * Returns true if this thread should return from the worker task on the + * Returns true if this thread *must* return from the worker task on the * current thread ASAP. Workers should periodically invoke ShouldYield (or * YieldIfNeeded()) as often as is reasonable. + * After this method returned true, ShouldYield must not be called again. */ virtual bool ShouldYield() = 0; @@ -429,6 +430,17 @@ class PageAllocator { virtual bool SetPermissions(void* address, size_t length, Permission permissions) = 0; + /** + * Recommits discarded pages in the given range with given permissions. + * Discarded pages must be recommitted with their original permissions + * before they are used again. + */ + virtual bool RecommitPages(void* address, size_t length, + Permission permissions) { + // TODO(v8:12797): make it pure once it's implemented on Chromium side. + return false; + } + /** * Frees memory in the given [address, address + size) range. address and size * should be operating system page-aligned. The next write to this @@ -698,6 +710,10 @@ class VirtualAddressSpace { /** * Sets permissions of all allocated pages in the given range. * + * This operation can fail due to OOM, in which case false is returned. If + * the operation fails for a reason other than OOM, this function will + * terminate the process as this implies a bug in the client. + * * \param address The start address of the range. Must be aligned to * page_size(). * @@ -706,7 +722,7 @@ class VirtualAddressSpace { * * \param permissions The new permissions for the range. * - * \returns true on success, false otherwise. + * \returns true on success, false on OOM. */ virtual V8_WARN_UNUSED_RESULT bool SetPagePermissions( Address address, size_t size, PagePermissions permissions) = 0; @@ -820,6 +836,24 @@ class VirtualAddressSpace { // takes a command enum as parameter. // + /** + * Recommits discarded pages in the given range with given permissions. + * Discarded pages must be recommitted with their original permissions + * before they are used again. + * + * \param address The start address of the range. Must be aligned to + * page_size(). + * + * \param size The size in bytes of the range. Must be a multiple + * of page_size(). + * + * \param permissions The permissions for the range that the pages must have. + * + * \returns true on success, false otherwise. + */ + virtual V8_WARN_UNUSED_RESULT bool RecommitPages( + Address address, size_t size, PagePermissions permissions) = 0; + /** * Frees memory in the given [address, address + size) range. address and * size should be aligned to the page_size(). The next write to this memory @@ -890,10 +924,7 @@ class Platform { /** * Allows the embedder to manage memory page allocations. */ - virtual PageAllocator* GetPageAllocator() { - // TODO(bbudge) Make this abstract after all embedders implement this. - return nullptr; - } + virtual PageAllocator* GetPageAllocator() = 0; /** * Allows the embedder to specify a custom allocator used for zones. @@ -910,10 +941,7 @@ class Platform { * error. * Embedder overrides of this function must NOT call back into V8. */ - virtual void OnCriticalMemoryPressure() { - // TODO(bbudge) Remove this when embedders override the following method. - // See crbug.com/634547. - } + virtual void OnCriticalMemoryPressure() {} /** * Enables the embedder to respond in cases where V8 can't allocate large @@ -924,6 +952,7 @@ class Platform { * * Embedder overrides of this function must NOT call back into V8. */ + V8_DEPRECATED("Use the method without informative parameter") virtual bool OnCriticalMemoryPressure(size_t length) { return false; } /** @@ -1022,16 +1051,28 @@ class Platform { * thread (A=>B/B=>A deadlock) and [2] JobTask::Run or * JobTask::GetMaxConcurrency may be invoked synchronously from JobHandle * (B=>JobHandle::foo=>B deadlock). + */ + virtual std::unique_ptr PostJob( + TaskPriority priority, std::unique_ptr job_task) { + auto handle = CreateJob(priority, std::move(job_task)); + handle->NotifyConcurrencyIncrease(); + return handle; + } + + /** + * Creates and returns a JobHandle associated with a Job. Unlike PostJob(), + * this doesn't immediately schedules |worker_task| to run; the Job is then + * scheduled by calling either NotifyConcurrencyIncrease() or Join(). * - * A sufficient PostJob() implementation that uses the default Job provided in - * libplatform looks like: - * std::unique_ptr PostJob( + * A sufficient CreateJob() implementation that uses the default Job provided + * in libplatform looks like: + * std::unique_ptr CreateJob( * TaskPriority priority, std::unique_ptr job_task) override { * return v8::platform::NewDefaultJobHandle( * this, priority, std::move(job_task), NumberOfWorkerThreads()); * } */ - virtual std::unique_ptr PostJob( + virtual std::unique_ptr CreateJob( TaskPriority priority, std::unique_ptr job_task) = 0; /** diff --git a/deps/v8/include/v8-primitive.h b/deps/v8/include/v8-primitive.h index 1b6de16686b10d..4fef8da7f8d5e7 100644 --- a/deps/v8/include/v8-primitive.h +++ b/deps/v8/include/v8-primitive.h @@ -20,6 +20,7 @@ class String; namespace internal { class ExternalString; class ScopedExternalStringLock; +class StringForwardingTable; } // namespace internal /** @@ -269,6 +270,7 @@ class V8_EXPORT String : public Name { private: friend class internal::ExternalString; friend class v8::String; + friend class internal::StringForwardingTable; friend class internal::ScopedExternalStringLock; }; @@ -785,10 +787,9 @@ String::ExternalStringResource* String::GetExternalStringResource() const { ExternalStringResource* result; if (I::IsExternalTwoByteString(I::GetInstanceType(obj))) { - internal::Isolate* isolate = I::GetIsolateForSandbox(obj); - A value = - I::ReadExternalPointerField(isolate, obj, I::kStringResourceOffset, - internal::kExternalStringResourceTag); + Isolate* isolate = I::GetIsolateForSandbox(obj); + A value = I::ReadExternalPointerField( + isolate, obj, I::kStringResourceOffset); result = reinterpret_cast(value); } else { result = GetExternalStringResourceSlow(); @@ -809,10 +810,9 @@ String::ExternalStringResourceBase* String::GetExternalStringResourceBase( ExternalStringResourceBase* resource; if (type == I::kExternalOneByteRepresentationTag || type == I::kExternalTwoByteRepresentationTag) { - internal::Isolate* isolate = I::GetIsolateForSandbox(obj); - A value = - I::ReadExternalPointerField(isolate, obj, I::kStringResourceOffset, - internal::kExternalStringResourceTag); + Isolate* isolate = I::GetIsolateForSandbox(obj); + A value = I::ReadExternalPointerField( + isolate, obj, I::kStringResourceOffset); resource = reinterpret_cast(value); } else { resource = GetExternalStringResourceBaseSlow(encoding_out); diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h index 268104073231c6..8894641993e42a 100644 --- a/deps/v8/include/v8-profiler.h +++ b/deps/v8/include/v8-profiler.h @@ -331,6 +331,9 @@ class V8_EXPORT CpuProfilingOptions { unsigned max_samples = kNoSampleLimit, int sampling_interval_us = 0, MaybeLocal filter_context = MaybeLocal()); + CpuProfilingOptions(CpuProfilingOptions&&) = default; + CpuProfilingOptions& operator=(CpuProfilingOptions&&) = default; + CpuProfilingMode mode() const { return mode_; } unsigned max_samples() const { return max_samples_; } int sampling_interval_us() const { return sampling_interval_us_; } @@ -344,7 +347,7 @@ class V8_EXPORT CpuProfilingOptions { CpuProfilingMode mode_; unsigned max_samples_; int sampling_interval_us_; - CopyablePersistentTraits::CopyablePersistent filter_context_; + Global filter_context_; }; /** @@ -542,7 +545,9 @@ class V8_EXPORT HeapGraphNode { kConsString = 10, // Concatenated string. A pair of pointers to strings. kSlicedString = 11, // Sliced string. A fragment of another string. kSymbol = 12, // A Symbol (ES6). - kBigInt = 13 // BigInt. + kBigInt = 13, // BigInt. + kObjectShape = 14, // Internal data used for tracking the shapes (or + // "hidden classes") of JS objects. }; /** Returns node type (see HeapGraphNode::Type). */ @@ -975,14 +980,71 @@ class V8_EXPORT HeapProfiler { virtual ~ObjectNameResolver() = default; }; + enum class HeapSnapshotMode { + /** + * Heap snapshot for regular developers. + */ + kRegular, + /** + * Heap snapshot is exposing internals that may be useful for experts. + */ + kExposeInternals, + }; + + enum class NumericsMode { + /** + * Numeric values are hidden as they are values of the corresponding + * objects. + */ + kHideNumericValues, + /** + * Numeric values are exposed in artificial fields. + */ + kExposeNumericValues + }; + + struct HeapSnapshotOptions final { + // Manually define default constructor here to be able to use it in + // `TakeSnapshot()` below. + // NOLINTNEXTLINE + HeapSnapshotOptions() {} + + /** + * The control used to report intermediate progress to. + */ + ActivityControl* control = nullptr; + /** + * The resolver used by the snapshot generator to get names for V8 objects. + */ + ObjectNameResolver* global_object_name_resolver = nullptr; + /** + * Mode for taking the snapshot, see `HeapSnapshotMode`. + */ + HeapSnapshotMode snapshot_mode = HeapSnapshotMode::kRegular; + /** + * Mode for dealing with numeric values, see `NumericsMode`. + */ + NumericsMode numerics_mode = NumericsMode::kHideNumericValues; + }; + /** - * Takes a heap snapshot and returns it. + * Takes a heap snapshot. + * + * \returns the snapshot. + */ + const HeapSnapshot* TakeHeapSnapshot( + const HeapSnapshotOptions& options = HeapSnapshotOptions()); + + /** + * Takes a heap snapshot. See `HeapSnapshotOptions` for details on the + * parameters. + * + * \returns the snapshot. */ const HeapSnapshot* TakeHeapSnapshot( - ActivityControl* control = nullptr, + ActivityControl* control, ObjectNameResolver* global_object_name_resolver = nullptr, - bool treat_global_objects_as_roots = true, - bool capture_numeric_value = false); + bool hide_internals = true, bool capture_numeric_value = false); /** * Starts tracking of heap objects population statistics. After calling @@ -1101,18 +1163,18 @@ struct HeapStatsUpdate { uint32_t size; // New value of size field for the interval with this index. }; -#define CODE_EVENTS_LIST(V) \ - V(Builtin) \ - V(Callback) \ - V(Eval) \ - V(Function) \ - V(InterpretedFunction) \ - V(Handler) \ - V(BytecodeHandler) \ - V(LazyCompile) \ - V(RegExp) \ - V(Script) \ - V(Stub) \ +#define CODE_EVENTS_LIST(V) \ + V(Builtin) \ + V(Callback) \ + V(Eval) \ + V(Function) \ + V(InterpretedFunction) \ + V(Handler) \ + V(BytecodeHandler) \ + V(LazyCompile) /* Unused, use kFunction instead */ \ + V(RegExp) \ + V(Script) \ + V(Stub) \ V(Relocation) /** diff --git a/deps/v8/include/v8-regexp.h b/deps/v8/include/v8-regexp.h index 3791bc0368718d..135977bfbb85ee 100644 --- a/deps/v8/include/v8-regexp.h +++ b/deps/v8/include/v8-regexp.h @@ -37,9 +37,10 @@ class V8_EXPORT RegExp : public Object { kDotAll = 1 << 5, kLinear = 1 << 6, kHasIndices = 1 << 7, + kUnicodeSets = 1 << 8, }; - static constexpr int kFlagCount = 8; + static constexpr int kFlagCount = 9; /** * Creates a regular expression from the given pattern string and diff --git a/deps/v8/include/v8-script.h b/deps/v8/include/v8-script.h index 5644a3bb70c6b1..dbd98ed55b4ce0 100644 --- a/deps/v8/include/v8-script.h +++ b/deps/v8/include/v8-script.h @@ -20,6 +20,7 @@ namespace v8 { class Function; +class Message; class Object; class PrimitiveArray; class Script; @@ -47,8 +48,6 @@ class V8_EXPORT ScriptOrModule { * The options that were passed by the embedder as HostDefinedOptions to * the ScriptOrigin. */ - V8_DEPRECATED("Use HostDefinedOptions") - Local GetHostDefinedOptions(); Local HostDefinedOptions(); }; @@ -78,7 +77,13 @@ class V8_EXPORT UnboundScript { * Returns zero based line number of the code_pos location in the script. * -1 will be returned if no information available. */ - int GetLineNumber(int code_pos); + int GetLineNumber(int code_pos = 0); + + /** + * Returns zero based column number of the code_pos location in the script. + * -1 will be returned if no information available. + */ + int GetColumnNumber(int code_pos = 0); static const int kNoScriptId = 0; }; @@ -286,6 +291,16 @@ class V8_EXPORT Module : public Data { V8_WARN_UNUSED_RESULT Maybe SetSyntheticModuleExport( Isolate* isolate, Local export_name, Local export_value); + /** + * Search the modules requested directly or indirectly by the module for + * any top-level await that has not yet resolved. If there is any, the + * returned vector contains a tuple of the unresolved module and a message + * with the pending top-level await. + * An embedder may call this before exiting to improve error messages. + */ + std::vector, Local>> + GetStalledTopLevelAwaitMessage(Isolate* isolate); + V8_INLINE static Module* Cast(Data* data); private: @@ -489,7 +504,7 @@ class V8_EXPORT ScriptCompiler { /** * A task which the embedder must run on a background thread to * consume a V8 code cache. Returned by - * ScriptCompiler::StarConsumingCodeCache. + * ScriptCompiler::StartConsumingCodeCache. */ class V8_EXPORT ConsumeCodeCacheTask final { public: @@ -497,6 +512,36 @@ class V8_EXPORT ScriptCompiler { void Run(); + /** + * Provides the source text string and origin information to the consumption + * task. May be called before, during, or after Run(). This step checks + * whether the script matches an existing script in the Isolate's + * compilation cache. To check whether such a script was found, call + * ShouldMergeWithExistingScript. + * + * The Isolate provided must be the same one used during + * StartConsumingCodeCache and must be currently entered on the thread that + * calls this function. The source text and origin provided in this step + * must precisely match those used later in the ScriptCompiler::Source that + * will contain this ConsumeCodeCacheTask. + */ + void SourceTextAvailable(Isolate* isolate, Local source_text, + const ScriptOrigin& origin); + + /** + * Returns whether the embedder should call MergeWithExistingScript. This + * function may be called from any thread, any number of times, but its + * return value is only meaningful after SourceTextAvailable has completed. + */ + bool ShouldMergeWithExistingScript() const; + + /** + * Merges newly deserialized data into an existing script which was found + * during SourceTextAvailable. May be called only after Run() has completed. + * Can execute on any thread, like Run(). + */ + void MergeWithExistingScript(); + private: friend class ScriptCompiler; @@ -581,7 +626,8 @@ class V8_EXPORT ScriptCompiler { */ static ScriptStreamingTask* StartStreaming( Isolate* isolate, StreamedSource* source, - ScriptType type = ScriptType::kClassic); + ScriptType type = ScriptType::kClassic, + CompileOptions options = kNoCompileOptions); static ConsumeCodeCacheTask* StartConsumingCodeCache( Isolate* isolate, std::unique_ptr source); @@ -650,6 +696,7 @@ class V8_EXPORT ScriptCompiler { * It is possible to specify multiple context extensions (obj in the above * example). */ + V8_DEPRECATED("Use CompileFunction") static V8_WARN_UNUSED_RESULT MaybeLocal CompileFunctionInContext( Local context, Source* source, size_t arguments_count, Local arguments[], size_t context_extension_count, @@ -657,6 +704,7 @@ class V8_EXPORT ScriptCompiler { CompileOptions options = kNoCompileOptions, NoCacheReason no_cache_reason = kNoCacheNoReason, Local* script_or_module_out = nullptr); + static V8_WARN_UNUSED_RESULT MaybeLocal CompileFunction( Local context, Source* source, size_t arguments_count = 0, Local arguments[] = nullptr, size_t context_extension_count = 0, diff --git a/deps/v8/include/v8-template.h b/deps/v8/include/v8-template.h index 0afdccaafb68fe..669012a9814465 100644 --- a/deps/v8/include/v8-template.h +++ b/deps/v8/include/v8-template.h @@ -14,7 +14,6 @@ namespace v8 { -class AccessorSignature; class CFunction; class FunctionTemplate; class ObjectTemplate; @@ -83,28 +82,7 @@ class V8_EXPORT Template : public Data { * cross-context access. * \param attribute The attributes of the property for which an accessor * is added. - * \param signature The signature describes valid receivers for the accessor - * and is used to perform implicit instance checks against them. If the - * receiver is incompatible (i.e. is not an instance of the constructor as - * defined by FunctionTemplate::HasInstance()), an implicit TypeError is - * thrown and no callback is invoked. */ - V8_DEPRECATED("Do signature check in accessor") - void SetNativeDataProperty( - Local name, AccessorGetterCallback getter, - AccessorSetterCallback setter, Local data, - PropertyAttribute attribute, Local signature, - AccessControl settings = DEFAULT, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, - SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); - V8_DEPRECATED("Do signature check in accessor") - void SetNativeDataProperty( - Local name, AccessorNameGetterCallback getter, - AccessorNameSetterCallback setter, Local data, - PropertyAttribute attribute, Local signature, - AccessControl settings = DEFAULT, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, - SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); void SetNativeDataProperty( Local name, AccessorGetterCallback getter, AccessorSetterCallback setter = nullptr, @@ -151,7 +129,8 @@ class V8_EXPORT Template : public Data { * Interceptor for get requests on an object. * * Use `info.GetReturnValue().Set()` to set the return value of the - * intercepted get request. + * intercepted get request. If the property does not exist the callback should + * not set the result and must not produce side effects. * * \param property The name of the property for which the request was * intercepted. @@ -192,9 +171,9 @@ using GenericNamedPropertyGetterCallback = * Use `info.GetReturnValue()` to indicate whether the request was intercepted * or not. If the setter successfully intercepts the request, i.e., if the * request should not be further executed, call - * `info.GetReturnValue().Set(value)`. If the setter - * did not intercept the request, i.e., if the request should be handled as - * if no interceptor is present, do not not call `Set()`. + * `info.GetReturnValue().Set(value)`. If the setter did not intercept the + * request, i.e., if the request should be handled as if no interceptor is + * present, do not not call `Set()` and do not produce side effects. * * \param property The name of the property for which the request was * intercepted. @@ -217,7 +196,9 @@ using GenericNamedPropertySetterCallback = * defineProperty(). * * Use `info.GetReturnValue().Set(value)` to set the property attributes. The - * value is an integer encoding a `v8::PropertyAttribute`. + * value is an integer encoding a `v8::PropertyAttribute`. If the property does + * not exist the callback should not set the result and must not produce side + * effects. * * \param property The name of the property for which the request was * intercepted. @@ -242,7 +223,8 @@ using GenericNamedPropertyQueryCallback = * or not. If the deleter successfully intercepts the request, i.e., if the * request should not be further executed, call * `info.GetReturnValue().Set(value)` with a boolean `value`. The `value` is - * used as the return value of `delete`. + * used as the return value of `delete`. If the deleter does not intercept the + * request then it should not set the result and must not produce side effects. * * \param property The name of the property for which the request was * intercepted. @@ -274,9 +256,9 @@ using GenericNamedPropertyEnumeratorCallback = * Use `info.GetReturnValue()` to indicate whether the request was intercepted * or not. If the definer successfully intercepts the request, i.e., if the * request should not be further executed, call - * `info.GetReturnValue().Set(value)`. If the definer - * did not intercept the request, i.e., if the request should be handled as - * if no interceptor is present, do not not call `Set()`. + * `info.GetReturnValue().Set(value)`. If the definer did not intercept the + * request, i.e., if the request should be handled as if no interceptor is + * present, do not not call `Set()` and do not produce side effects. * * \param property The name of the property for which the request was * intercepted. @@ -821,27 +803,7 @@ class V8_EXPORT ObjectTemplate : public Template { * cross-context access. * \param attribute The attributes of the property for which an accessor * is added. - * \param signature The signature describes valid receivers for the accessor - * and is used to perform implicit instance checks against them. If the - * receiver is incompatible (i.e. is not an instance of the constructor as - * defined by FunctionTemplate::HasInstance()), an implicit TypeError is - * thrown and no callback is invoked. */ - V8_DEPRECATED("Do signature check in accessor") - void SetAccessor( - Local name, AccessorGetterCallback getter, - AccessorSetterCallback setter, Local data, AccessControl settings, - PropertyAttribute attribute, Local signature, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, - SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); - V8_DEPRECATED("Do signature check in accessor") - void SetAccessor( - Local name, AccessorNameGetterCallback getter, - AccessorNameSetterCallback setter, Local data, - AccessControl settings, PropertyAttribute attribute, - Local signature, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, - SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); void SetAccessor( Local name, AccessorGetterCallback getter, AccessorSetterCallback setter = nullptr, @@ -1019,24 +981,6 @@ class V8_EXPORT Signature : public Data { static void CheckCast(Data* that); }; -/** - * An AccessorSignature specifies which receivers are valid parameters - * to an accessor callback. - */ -class V8_EXPORT AccessorSignature : public Data { - public: - static Local New( - Isolate* isolate, - Local receiver = Local()); - - V8_INLINE static AccessorSignature* Cast(Data* data); - - private: - AccessorSignature(); - - static void CheckCast(Data* that); -}; - // --- Implementation --- void Template::Set(Isolate* isolate, const char* name, Local value, @@ -1067,13 +1011,6 @@ Signature* Signature::Cast(Data* data) { return reinterpret_cast(data); } -AccessorSignature* AccessorSignature::Cast(Data* data) { -#ifdef V8_ENABLE_CHECKS - CheckCast(data); -#endif - return reinterpret_cast(data); -} - } // namespace v8 #endif // INCLUDE_V8_TEMPLATE_H_ diff --git a/deps/v8/include/v8-unwinder-state.h b/deps/v8/include/v8-unwinder-state.h index a30f7325f48285..18bb410d2b163b 100644 --- a/deps/v8/include/v8-unwinder-state.h +++ b/deps/v8/include/v8-unwinder-state.h @@ -17,10 +17,10 @@ struct CalleeSavedRegisters { void* arm_r9; void* arm_r10; }; -#elif V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM64 || \ - V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC || \ - V8_TARGET_ARCH_PPC64 || V8_TARGET_ARCH_RISCV64 || V8_TARGET_ARCH_S390 || \ - V8_TARGET_ARCH_LOONG64 +#elif V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM64 || \ + V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64 || \ + V8_TARGET_ARCH_RISCV64 || V8_TARGET_ARCH_S390 || V8_TARGET_ARCH_LOONG64 || \ + V8_TARGET_ARCH_RISCV32 struct CalleeSavedRegisters {}; #else #error Target architecture was not detected as supported by v8 diff --git a/deps/v8/include/v8-util.h b/deps/v8/include/v8-util.h index c54418aa251534..159027d31786ff 100644 --- a/deps/v8/include/v8-util.h +++ b/deps/v8/include/v8-util.h @@ -537,7 +537,6 @@ class StdGlobalValueMap : public GlobalValueMap { : GlobalValueMap(isolate) {} }; - class DefaultPersistentValueVectorTraits { public: typedef std::vector Impl; @@ -562,7 +561,6 @@ class DefaultPersistentValueVectorTraits { } }; - /** * A vector wrapper that safely stores Global values. * C++11 embedders don't need this class, as they can use Global @@ -573,8 +571,8 @@ class DefaultPersistentValueVectorTraits { * PersistentContainerValue, with all conversion into and out of V8 * handles being transparently handled by this class. */ -template -class PersistentValueVector { +template +class V8_DEPRECATE_SOON("Use std::vector>.") PersistentValueVector { public: explicit PersistentValueVector(Isolate* isolate) : isolate_(isolate) { } diff --git a/deps/v8/include/v8-value-serializer.h b/deps/v8/include/v8-value-serializer.h index 078f367c646d06..729730c608dbe4 100644 --- a/deps/v8/include/v8-value-serializer.h +++ b/deps/v8/include/v8-value-serializer.h @@ -8,6 +8,7 @@ #include #include +#include #include #include "v8-local-handle.h" // NOLINT(build/include_directory) @@ -26,8 +27,37 @@ class Value; namespace internal { struct ScriptStreamingData; +class SharedObjectConveyorHandles; +class ValueDeserializer; +class ValueSerializer; } // namespace internal +/** + * A move-only class for managing the lifetime of shared value conveyors used + * by V8 to keep JS shared values alive in transit when serialized. + * + * This class is not directly constructible and is always passed to a + * ValueSerializer::Delegate via ValueSerializer::SetSharedValueConveyor. + * + * The embedder must not destruct the SharedValueConveyor until the associated + * serialized data will no longer be deserialized. + */ +class V8_EXPORT SharedValueConveyor final { + public: + SharedValueConveyor(SharedValueConveyor&&) noexcept; + ~SharedValueConveyor(); + + SharedValueConveyor& operator=(SharedValueConveyor&&) noexcept; + + private: + friend class internal::ValueSerializer; + friend class internal::ValueDeserializer; + + explicit SharedValueConveyor(Isolate* isolate); + + std::unique_ptr private_; +}; + /** * Value serialization compatible with the HTML structured clone algorithm. * The format is backward-compatible (i.e. safe to store to disk). @@ -69,20 +99,20 @@ class V8_EXPORT ValueSerializer { Isolate* isolate, Local module); /** - * Returns whether shared values are supported. GetSharedValueId is only - * called if SupportsSharedValues() returns true. - */ - virtual bool SupportsSharedValues() const; - - /** - * Called when the ValueSerializer serializes a value that is shared across - * Isolates. The embedder must return an ID for the object. This function - * must be idempotent for the same object. When deserializing, the ID will - * be passed to ValueDeserializer::Delegate::GetSharedValueFromId as - * |shared_value_id|. + * Called when the first shared value is serialized. All subsequent shared + * values will use the same conveyor. + * + * The embedder must ensure the lifetime of the conveyor matches the + * lifetime of the serialized data. + * + * If the embedder supports serializing shared values, this method should + * return true. Otherwise the embedder should throw an exception and return + * false. + * + * This method is called at most once per serializer. */ - virtual Maybe GetSharedValueId(Isolate* isolate, - Local shared_value); + virtual bool AdoptSharedValueConveyor(Isolate* isolate, + SharedValueConveyor&& conveyor); /** * Allocates memory for the buffer of at least the size provided. The actual @@ -196,17 +226,10 @@ class V8_EXPORT ValueDeserializer { Isolate* isolate, uint32_t clone_id); /** - * Returns whether shared values are supported. GetSharedValueFromId is only - * called if SupportsSharedValues() returns true. - */ - virtual bool SupportsSharedValues() const; - - /** - * Get a value shared across Isolates given a shared_value_id provided by - * ValueSerializer::Delegate::GetSharedValueId. + * Get the SharedValueConveyor previously provided by + * ValueSerializer::Delegate::AdoptSharedValueConveyor. */ - virtual MaybeLocal GetSharedValueFromId(Isolate* isolate, - uint32_t shared_value_id); + virtual const SharedValueConveyor* GetSharedValueConveyor(Isolate* isolate); }; ValueDeserializer(Isolate* isolate, const uint8_t* data, size_t size); diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index d2b7b508132e7e..4dd63447ed886e 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -9,9 +9,9 @@ // NOTE these macros are used by some of the tool scripts and the build // system so their names cannot be changed without changing the scripts. #define V8_MAJOR_VERSION 10 -#define V8_MINOR_VERSION 2 -#define V8_BUILD_NUMBER 154 -#define V8_PATCH_LEVEL 15 +#define V8_MINOR_VERSION 7 +#define V8_BUILD_NUMBER 193 +#define V8_PATCH_LEVEL 13 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/include/v8-wasm.h b/deps/v8/include/v8-wasm.h index 59b2a69b1244ca..05acd2e86deff8 100644 --- a/deps/v8/include/v8-wasm.h +++ b/deps/v8/include/v8-wasm.h @@ -5,6 +5,7 @@ #ifndef INCLUDE_V8_WASM_H_ #define INCLUDE_V8_WASM_H_ +#include #include #include @@ -130,19 +131,6 @@ class V8_EXPORT WasmStreaming final { public: class WasmStreamingImpl; - /** - * Client to receive streaming event notifications. - */ - class Client { - public: - virtual ~Client() = default; - /** - * Passes the fully compiled module to the client. This can be used to - * implement code caching. - */ - virtual void OnModuleCompiled(CompiledWasmModule compiled_module) = 0; - }; - explicit WasmStreaming(std::unique_ptr impl); ~WasmStreaming(); @@ -183,10 +171,11 @@ class V8_EXPORT WasmStreaming final { bool SetCompiledModuleBytes(const uint8_t* bytes, size_t size); /** - * Sets the client object that will receive streaming event notifications. - * This must be called before {OnBytesReceived}, {Finish}, or {Abort}. + * Sets a callback which is called whenever a significant number of new + * functions are ready for serialization. */ - void SetClient(std::shared_ptr client); + void SetMoreFunctionsCanBeSerializedCallback( + std::function); /* * Sets the UTF-8 encoded source URL for the {Script} object. This must be @@ -206,52 +195,6 @@ class V8_EXPORT WasmStreaming final { std::unique_ptr impl_; }; -// TODO(mtrofin): when streaming compilation is done, we can rename this -// to simply WasmModuleObjectBuilder -class V8_EXPORT WasmModuleObjectBuilderStreaming final { - public: - explicit WasmModuleObjectBuilderStreaming(Isolate* isolate); - /** - * The buffer passed into OnBytesReceived is owned by the caller. - */ - void OnBytesReceived(const uint8_t*, size_t size); - void Finish(); - /** - * Abort streaming compilation. If {exception} has a value, then the promise - * associated with streaming compilation is rejected with that value. If - * {exception} does not have value, the promise does not get rejected. - */ - void Abort(MaybeLocal exception); - Local GetPromise(); - - ~WasmModuleObjectBuilderStreaming() = default; - - private: - WasmModuleObjectBuilderStreaming(const WasmModuleObjectBuilderStreaming&) = - delete; - WasmModuleObjectBuilderStreaming(WasmModuleObjectBuilderStreaming&&) = - default; - WasmModuleObjectBuilderStreaming& operator=( - const WasmModuleObjectBuilderStreaming&) = delete; - WasmModuleObjectBuilderStreaming& operator=( - WasmModuleObjectBuilderStreaming&&) = default; - Isolate* isolate_ = nullptr; - -#if V8_CC_MSVC - /** - * We don't need the static Copy API, so the default - * NonCopyablePersistentTraits would be sufficient, however, - * MSVC eagerly instantiates the Copy. - * We ensure we don't use Copy, however, by compiling with the - * defaults everywhere else. - */ - Persistent> promise_; -#else - Persistent promise_; -#endif - std::shared_ptr streaming_decoder_; -}; - } // namespace v8 #endif // INCLUDE_V8_WASM_H_ diff --git a/deps/v8/include/v8-weak-callback-info.h b/deps/v8/include/v8-weak-callback-info.h index 6d0fb3ac1d40f8..df4dcb8eb9644c 100644 --- a/deps/v8/include/v8-weak-callback-info.h +++ b/deps/v8/include/v8-weak-callback-info.h @@ -63,13 +63,6 @@ enum class WeakCallbackType { * Passes the first two internal fields of the object back to the callback. */ kInternalFields, - /** - * Passes a user-defined void* parameter back to the callback. Will do so - * before the object is actually reclaimed, allowing it to be resurrected. In - * this case it is not possible to set a second-pass callback. - */ - kFinalizer V8_ENUM_DEPRECATED("Resurrecting finalizers are deprecated " - "and will not be supported going forward.") }; template diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h index 77fd65c6c5b7d8..6753eb083b3c1c 100644 --- a/deps/v8/include/v8config.h +++ b/deps/v8/include/v8config.h @@ -308,6 +308,7 @@ path. Add it with -I to the command line // V8_HAS_BUILTIN_SADD_OVERFLOW - __builtin_sadd_overflow() supported // V8_HAS_BUILTIN_SSUB_OVERFLOW - __builtin_ssub_overflow() supported // V8_HAS_BUILTIN_UADD_OVERFLOW - __builtin_uadd_overflow() supported +// V8_HAS_BUILTIN_SMUL_OVERFLOW - __builtin_smul_overflow() supported // V8_HAS_COMPUTED_GOTO - computed goto/labels as values // supported // V8_HAS_DECLSPEC_NOINLINE - __declspec(noinline) supported @@ -344,6 +345,7 @@ path. Add it with -I to the command line # define V8_HAS_CPP_ATTRIBUTE_NO_UNIQUE_ADDRESS \ (V8_HAS_CPP_ATTRIBUTE(no_unique_address)) +# define V8_HAS_BUILTIN_ASSUME (__has_builtin(__builtin_assume)) # define V8_HAS_BUILTIN_ASSUME_ALIGNED (__has_builtin(__builtin_assume_aligned)) # define V8_HAS_BUILTIN_BSWAP16 (__has_builtin(__builtin_bswap16)) # define V8_HAS_BUILTIN_BSWAP32 (__has_builtin(__builtin_bswap32)) @@ -356,6 +358,8 @@ path. Add it with -I to the command line # define V8_HAS_BUILTIN_SADD_OVERFLOW (__has_builtin(__builtin_sadd_overflow)) # define V8_HAS_BUILTIN_SSUB_OVERFLOW (__has_builtin(__builtin_ssub_overflow)) # define V8_HAS_BUILTIN_UADD_OVERFLOW (__has_builtin(__builtin_uadd_overflow)) +# define V8_HAS_BUILTIN_SMUL_OVERFLOW (__has_builtin(__builtin_smul_overflow)) +# define V8_HAS_BUILTIN_UNREACHABLE (__has_builtin(__builtin_unreachable)) // Clang has no __has_feature for computed gotos. // GCC doc: https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html @@ -394,6 +398,7 @@ path. Add it with -I to the command line # define V8_HAS_BUILTIN_EXPECT 1 # define V8_HAS_BUILTIN_FRAME_ADDRESS 1 # define V8_HAS_BUILTIN_POPCOUNT 1 +# define V8_HAS_BUILTIN_UNREACHABLE 1 // GCC doc: https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html #define V8_HAS_COMPUTED_GOTO 1 @@ -425,6 +430,18 @@ path. Add it with -I to the command line # define V8_INLINE inline #endif +#ifdef DEBUG +// In debug mode, check assumptions instead of actually adding annotations. +# define V8_ASSUME(condition) DCHECK(condition) +#elif V8_HAS_BUILTIN_ASSUME +# define V8_ASSUME(condition) __builtin_assume(condition) +#elif V8_HAS_BUILTIN_UNREACHABLE +# define V8_ASSUME(condition) \ + do { if (!(condition)) __builtin_unreachable(); } while (false) +#else +# define V8_ASSUME(condition) +#endif + #if V8_HAS_BUILTIN_ASSUME_ALIGNED # define V8_ASSUME_ALIGNED(ptr, alignment) \ __builtin_assume_aligned((ptr), (alignment)) @@ -471,6 +488,34 @@ path. Add it with -I to the command line #endif +#if defined(V8_IMMINENT_DEPRECATION_WARNINGS) || \ + defined(V8_DEPRECATION_WARNINGS) +#if defined(V8_CC_MSVC) +# define START_ALLOW_USE_DEPRECATED() \ + __pragma(warning(push)) \ + __pragma(warning(disable : 4996)) +# define END_ALLOW_USE_DEPRECATED() __pragma(warning(pop)) +#else // !defined(V8_CC_MSVC) +# define START_ALLOW_USE_DEPRECATED() \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#define END_ALLOW_USE_DEPRECATED() _Pragma("GCC diagnostic pop") +#endif // !defined(V8_CC_MSVC) +#else // !(defined(V8_IMMINENT_DEPRECATION_WARNINGS) || + // defined(V8_DEPRECATION_WARNINGS)) +#define START_ALLOW_USE_DEPRECATED() +#define END_ALLOW_USE_DEPRECATED() +#endif // !(defined(V8_IMMINENT_DEPRECATION_WARNINGS) || + // defined(V8_DEPRECATION_WARNINGS)) +#define ALLOW_COPY_AND_MOVE_WITH_DEPRECATED_FIELDS(ClassName) \ + START_ALLOW_USE_DEPRECATED() \ + ClassName(const ClassName&) = default; \ + ClassName(ClassName&&) = default; \ + ClassName& operator=(const ClassName&) = default; \ + ClassName& operator=(ClassName&&) = default; \ + END_ALLOW_USE_DEPRECATED() + + #if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 6) # define V8_ENUM_DEPRECATED(message) # define V8_ENUM_DEPRECATE_SOON(message) @@ -580,25 +625,214 @@ V8 shared library set USING_V8_SHARED. #endif // V8_OS_WIN -// The sandbox is available (i.e. defined) when pointer compression -// is enabled, but it is only used when V8_SANDBOX is enabled as -// well. This allows better test coverage of the sandbox. -#if defined(V8_COMPRESS_POINTERS) -#define V8_SANDBOX_IS_AVAILABLE +// clang-format on + +// Processor architecture detection. For more info on what's defined, see: +// http://msdn.microsoft.com/en-us/library/b0084kay.aspx +// http://www.agner.org/optimize/calling_conventions.pdf +// or with gcc, run: "echo | gcc -E -dM -" +// The V8_HOST_ARCH_* macros correspond to the architecture on which V8, as a +// virtual machine and compiler, runs. Don't confuse this with the architecture +// on which V8 is built. +#if defined(_M_X64) || defined(__x86_64__) +#define V8_HOST_ARCH_X64 1 +#if defined(__x86_64__) && __SIZEOF_POINTER__ == 4 // Check for x32. +#define V8_HOST_ARCH_32_BIT 1 +#else +#define V8_HOST_ARCH_64_BIT 1 +#endif +#elif defined(_M_IX86) || defined(__i386__) +#define V8_HOST_ARCH_IA32 1 +#define V8_HOST_ARCH_32_BIT 1 +#elif defined(__AARCH64EL__) || defined(_M_ARM64) +#define V8_HOST_ARCH_ARM64 1 +#define V8_HOST_ARCH_64_BIT 1 +#elif defined(__ARMEL__) +#define V8_HOST_ARCH_ARM 1 +#define V8_HOST_ARCH_32_BIT 1 +#elif defined(__mips64) +#define V8_HOST_ARCH_MIPS64 1 +#define V8_HOST_ARCH_64_BIT 1 +#elif defined(__loongarch64) +#define V8_HOST_ARCH_LOONG64 1 +#define V8_HOST_ARCH_64_BIT 1 +#elif defined(__PPC64__) || defined(_ARCH_PPC64) +#define V8_HOST_ARCH_PPC64 1 +#define V8_HOST_ARCH_64_BIT 1 +#elif defined(__PPC__) || defined(_ARCH_PPC) +#define V8_HOST_ARCH_PPC 1 +#define V8_HOST_ARCH_32_BIT 1 +#elif defined(__s390__) || defined(__s390x__) +#define V8_HOST_ARCH_S390 1 +#if defined(__s390x__) +#define V8_HOST_ARCH_64_BIT 1 +#else +#define V8_HOST_ARCH_32_BIT 1 +#endif +#elif defined(__riscv) || defined(__riscv__) +#if __riscv_xlen == 64 +#define V8_HOST_ARCH_RISCV64 1 +#define V8_HOST_ARCH_64_BIT 1 +#elif __riscv_xlen == 32 +#define V8_HOST_ARCH_RISCV32 1 +#define V8_HOST_ARCH_32_BIT 1 +#else +#error "Cannot detect Riscv's bitwidth" +#endif +#else +#error "Host architecture was not detected as supported by v8" +#endif + +// Target architecture detection. This corresponds to the architecture for which +// V8's JIT will generate code (the last stage of the canadian cross-compiler). +// The macros may be set externally. If not, detect in the same way as the host +// architecture, that is, target the native environment as presented by the +// compiler. +#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && \ + !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_PPC && \ + !V8_TARGET_ARCH_PPC64 && !V8_TARGET_ARCH_S390 && \ + !V8_TARGET_ARCH_RISCV64 && !V8_TARGET_ARCH_LOONG64 && \ + !V8_TARGET_ARCH_RISCV32 +#if defined(_M_X64) || defined(__x86_64__) +#define V8_TARGET_ARCH_X64 1 +#elif defined(_M_IX86) || defined(__i386__) +#define V8_TARGET_ARCH_IA32 1 +#elif defined(__AARCH64EL__) || defined(_M_ARM64) +#define V8_TARGET_ARCH_ARM64 1 +#elif defined(__ARMEL__) +#define V8_TARGET_ARCH_ARM 1 +#elif defined(__mips64) +#define V8_TARGET_ARCH_MIPS64 1 +#elif defined(_ARCH_PPC64) +#define V8_TARGET_ARCH_PPC64 1 +#elif defined(_ARCH_PPC) +#define V8_TARGET_ARCH_PPC 1 +#elif defined(__s390__) +#define V8_TARGET_ARCH_S390 1 +#if defined(__s390x__) +#define V8_TARGET_ARCH_S390X 1 +#endif +#elif defined(__riscv) || defined(__riscv__) +#if __riscv_xlen == 64 +#define V8_TARGET_ARCH_RISCV64 1 +#elif __riscv_xlen == 32 +#define V8_TARGET_ARCH_RISCV32 1 +#endif +#else +#error Target architecture was not detected as supported by v8 +#endif #endif -#if defined(V8_SANDBOX) && !defined(V8_SANDBOX_IS_AVAILABLE) -#error Inconsistent configuration: sandbox is enabled but not available +// Determine architecture pointer size. +#if V8_TARGET_ARCH_IA32 +#define V8_TARGET_ARCH_32_BIT 1 +#elif V8_TARGET_ARCH_X64 +#if !V8_TARGET_ARCH_32_BIT && !V8_TARGET_ARCH_64_BIT +#if defined(__x86_64__) && __SIZEOF_POINTER__ == 4 // Check for x32. +#define V8_TARGET_ARCH_32_BIT 1 +#else +#define V8_TARGET_ARCH_64_BIT 1 +#endif +#endif +#elif V8_TARGET_ARCH_ARM +#define V8_TARGET_ARCH_32_BIT 1 +#elif V8_TARGET_ARCH_ARM64 +#define V8_TARGET_ARCH_64_BIT 1 +#elif V8_TARGET_ARCH_MIPS +#define V8_TARGET_ARCH_32_BIT 1 +#elif V8_TARGET_ARCH_MIPS64 +#define V8_TARGET_ARCH_64_BIT 1 +#elif V8_TARGET_ARCH_LOONG64 +#define V8_TARGET_ARCH_64_BIT 1 +#elif V8_TARGET_ARCH_PPC +#define V8_TARGET_ARCH_32_BIT 1 +#elif V8_TARGET_ARCH_PPC64 +#define V8_TARGET_ARCH_64_BIT 1 +#elif V8_TARGET_ARCH_S390 +#if V8_TARGET_ARCH_S390X +#define V8_TARGET_ARCH_64_BIT 1 +#else +#define V8_TARGET_ARCH_32_BIT 1 +#endif +#elif V8_TARGET_ARCH_RISCV64 +#define V8_TARGET_ARCH_64_BIT 1 +#elif V8_TARGET_ARCH_RISCV32 +#define V8_TARGET_ARCH_32_BIT 1 +#else +#error Unknown target architecture pointer size #endif -// From C++17 onwards, static constexpr member variables are defined to be -// "inline", and adding a separate definition for them can trigger deprecation -// warnings. For C++14 and below, however, these definitions are required. -#if __cplusplus < 201703L && (!defined(_MSVC_LANG) || _MSVC_LANG < 201703L) -#define V8_STATIC_CONSTEXPR_VARIABLES_NEED_DEFINITIONS +// Check for supported combinations of host and target architectures. +#if V8_TARGET_ARCH_IA32 && !V8_HOST_ARCH_IA32 +#error Target architecture ia32 is only supported on ia32 host +#endif +#if (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_64_BIT && \ + !((V8_HOST_ARCH_X64 || V8_HOST_ARCH_ARM64) && V8_HOST_ARCH_64_BIT)) +#error Target architecture x64 is only supported on x64 and arm64 host +#endif +#if (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT && \ + !(V8_HOST_ARCH_X64 && V8_HOST_ARCH_32_BIT)) +#error Target architecture x32 is only supported on x64 host with x32 support +#endif +#if (V8_TARGET_ARCH_ARM && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_ARM)) +#error Target architecture arm is only supported on arm and ia32 host +#endif +#if (V8_TARGET_ARCH_ARM64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_ARM64)) +#error Target architecture arm64 is only supported on arm64 and x64 host +#endif +#if (V8_TARGET_ARCH_MIPS64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_MIPS64)) +#error Target architecture mips64 is only supported on mips64 and x64 host +#endif +#if (V8_TARGET_ARCH_RISCV64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_RISCV64)) +#error Target architecture riscv64 is only supported on riscv64 and x64 host +#endif +#if (V8_TARGET_ARCH_RISCV32 && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_RISCV32)) +#error Target architecture riscv32 is only supported on riscv32 and ia32 host +#endif +#if (V8_TARGET_ARCH_LOONG64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_LOONG64)) +#error Target architecture loong64 is only supported on loong64 and x64 host #endif -// clang-format on +// Determine architecture endianness. +#if V8_TARGET_ARCH_IA32 +#define V8_TARGET_LITTLE_ENDIAN 1 +#elif V8_TARGET_ARCH_X64 +#define V8_TARGET_LITTLE_ENDIAN 1 +#elif V8_TARGET_ARCH_ARM +#define V8_TARGET_LITTLE_ENDIAN 1 +#elif V8_TARGET_ARCH_ARM64 +#define V8_TARGET_LITTLE_ENDIAN 1 +#elif V8_TARGET_ARCH_LOONG64 +#define V8_TARGET_LITTLE_ENDIAN 1 +#elif V8_TARGET_ARCH_MIPS64 +#if defined(__MIPSEB__) || defined(V8_TARGET_ARCH_MIPS64_BE) +#define V8_TARGET_BIG_ENDIAN 1 +#else +#define V8_TARGET_LITTLE_ENDIAN 1 +#endif +#elif defined(__BIG_ENDIAN__) // FOR PPCGR on AIX +#define V8_TARGET_BIG_ENDIAN 1 +#elif V8_TARGET_ARCH_PPC_LE +#define V8_TARGET_LITTLE_ENDIAN 1 +#elif V8_TARGET_ARCH_PPC_BE +#define V8_TARGET_BIG_ENDIAN 1 +#elif V8_TARGET_ARCH_S390 +#if V8_TARGET_ARCH_S390_LE_SIM +#define V8_TARGET_LITTLE_ENDIAN 1 +#else +#define V8_TARGET_BIG_ENDIAN 1 +#endif +#elif V8_TARGET_ARCH_RISCV32 || V8_TARGET_ARCH_RISCV64 +#define V8_TARGET_LITTLE_ENDIAN 1 +#elif defined(__BYTE_ORDER__) +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#define V8_TARGET_BIG_ENDIAN 1 +#else +#define V8_TARGET_LITTLE_ENDIAN 1 +#endif +#else +#error Unknown target architecture endianness +#endif #undef V8_HAS_CPP_ATTRIBUTE diff --git a/deps/v8/infra/mb/PRESUBMIT.py b/deps/v8/infra/mb/PRESUBMIT.py index 85e257c2d4cd1c..0896d46b372e8a 100644 --- a/deps/v8/infra/mb/PRESUBMIT.py +++ b/deps/v8/infra/mb/PRESUBMIT.py @@ -20,7 +20,7 @@ def _CommonChecks(input_api, output_api): '..', 'tools', 'mb', 'mb.py') mb_config_path = input_api.os_path.join(input_api.PresubmitLocalPath(), 'mb_config.pyl') - cmd = [input_api.python_executable, mb_script, 'validate', '--config-file', + cmd = [input_api.python3_executable, mb_script, 'validate', '--config-file', mb_config_path] kwargs = {'cwd': input_api.PresubmitLocalPath()} results.extend(input_api.RunTests([ diff --git a/deps/v8/infra/mb/gn_isolate_map.pyl b/deps/v8/infra/mb/gn_isolate_map.pyl index a5031f1a203a43..5732d862189c1a 100644 --- a/deps/v8/infra/mb/gn_isolate_map.pyl +++ b/deps/v8/infra/mb/gn_isolate_map.pyl @@ -32,7 +32,7 @@ "type": "script", }, "generate-bytecode-expectations": { - "label": "//test/cctest:generate-bytecode-expectations", + "label": "//test/unittests:generate-bytecode-expectations", "type": "script", }, "mjsunit": { diff --git a/deps/v8/infra/mb/mb_config.pyl b/deps/v8/infra/mb/mb_config.pyl index 769582188a11d5..5488996a641ae4 100644 --- a/deps/v8/infra/mb/mb_config.pyl +++ b/deps/v8/infra/mb/mb_config.pyl @@ -22,9 +22,6 @@ 'ia32.debug': 'default_debug_x86', 'ia32.optdebug': 'default_optdebug_x86', 'ia32.release': 'default_release_x86', - 'mipsel.debug': 'default_debug_mipsel', - 'mipsel.optdebug': 'default_optdebug_mipsel', - 'mipsel.release': 'default_release_mipsel', 'mips64el.debug': 'default_debug_mips64el', 'mips64el.optdebug': 'default_optdebug_mips64el', 'mips64el.release': 'default_release_mips64el', @@ -67,33 +64,38 @@ 'V8 Linux64 - builder (reclient)': 'release_x64_reclient', 'V8 Linux64 - builder (reclient compare)': '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 - builder': 'release_x64_internal', 'V8 Linux64 - debug - header includes - builder': 'debug_x64_header_includes', + 'V8 Linux64 - no sandbox - debug builder': 'debug_x64_no_sandbox', + 'V8 Linux64 - no sandbox - builder': 'release_x64_no_sandbox', 'V8 Linux64 - shared - builder': 'release_x64_shared_verify_heap', 'V8 Linux64 - verify csa - builder': 'release_x64_verify_csa', 'V8 Linux64 - no wasm - builder': 'release_x64_webassembly_disabled', # Windows. 'V8 Win32 - builder': 'release_x86_minimal_symbols', - 'V8 Win32 - builder (goma cache silo)': 'release_x64', + 'V8 Win32 - builder (goma cache silo)': 'release_x86', 'V8 Win32 - builder (reclient)': 'release_x86_minimal_symbols_reclient', 'V8 Win32 - builder (reclient compare)': 'release_x86_minimal_symbols_reclient', 'V8 Win32 - debug builder': 'debug_x86_minimal_symbols', # TODO(machenbach): Remove after switching to x64 on infra side. 'V8 Win64 ASAN - builder': 'release_x64_asan_no_lsan', 'V8 Win64 - builder': 'release_x64_minimal_symbols', + 'V8 Win64 - builder (reclient)': 'release_x64_minimal_symbols_reclient', + 'V8 Win64 - builder (reclient compare)': 'release_x64_minimal_symbols_reclient', 'V8 Win64 - dev image': 'release_x64_minimal_symbols', 'V8 Win64 - debug builder': 'debug_x64_minimal_symbols', 'V8 Win64 - msvc - builder': 'release_x64_msvc', # Mac. 'V8 Mac64 - builder': 'release_x64', 'V8 Mac64 - debug builder': 'debug_x64', + 'V8 Mac64 - builder (reclient)': 'release_x64_reclient', 'V8 Official Mac ARM64': 'release_arm64', 'V8 Official Mac ARM64 Debug': 'debug_arm64', 'V8 Mac64 ASAN - builder': 'release_x64_asan_no_lsan', + 'V8 Mac - arm64 - no pointer compression debug builder': 'debug_arm64_no_pointer_compression', 'V8 Mac - arm64 - release builder': 'release_arm64', 'V8 Mac - arm64 - debug builder': 'debug_arm64', 'V8 Mac - arm64 - sim - debug builder': 'debug_simulate_arm64', @@ -104,21 +106,19 @@ 'V8 Linux64 TSAN - no-concurrent-marking - builder': 'release_x64_tsan_no_cm', 'V8 Linux - arm64 - sim - CFI - builder': 'release_simulate_arm64_cfi', 'V8 Linux - arm64 - sim - MSAN - builder': 'release_simulate_arm64_msan', - # Misc. - 'V8 Linux gcc - builder': 'release_x86_gcc', # FYI. 'V8 iOS - sim - builder': 'release_x64_ios_simulator', 'V8 Linux64 - arm64 - sim - heap sandbox - debug - builder': 'debug_x64_heap_sandbox_arm64_sim', + 'V8 Linux64 - arm64 - sim - no pointer compression - builder': + 'release_simulate_arm64_no_pointer_compression', 'V8 Linux64 - cppgc-non-default - debug - builder': 'debug_x64_non_default_cppgc', 'V8 Linux64 - debug - perfetto - builder': 'debug_x64_perfetto', 'V8 Linux64 - disable runtime call stats - builder': 'release_x64_disable_runtime_call_stats', 'V8 Linux64 - debug - single generation - builder': 'debug_x64_single_generation', - 'V8 Linux64 - pointer compression - builder': 'release_x64_pointer_compression', - 'V8 Linux64 - pointer compression without dchecks': - 'release_x64_pointer_compression_without_dchecks', - 'V8 Linux64 - arm64 - sim - pointer compression - builder': - 'release_simulate_arm64_pointer_compression', + 'V8 Linux64 - no pointer compression - builder': 'release_x64_no_pointer_compression', + 'V8 Linux64 gcc - builder': 'release_x64_gcc', 'V8 Linux64 gcc - debug builder': 'debug_x64_gcc', + 'V8 Linux64 gcc light - debug builder': 'debug_x64_gcc', 'V8 Fuchsia - builder': 'release_x64_fuchsia', 'V8 Fuchsia - debug builder': 'debug_x64_fuchsia', 'V8 Linux64 - cfi - builder': 'release_x64_cfi', @@ -126,7 +126,7 @@ 'V8 Linux - vtunejit': 'debug_x86_vtunejit', 'V8 Linux64 - gcov coverage': 'release_x64_gcc_coverage', 'V8 Linux64 - Fuzzilli - builder': 'release_x64_fuzzilli', - 'V8 Linux - predictable - builder': 'release_x86_predictable', + 'V8 Linux64 - predictable - builder': 'release_x64_predictable', 'V8 Linux - full debug builder': 'full_debug_x86', 'V8 Mac64 - full debug builder': 'full_debug_x64', 'V8 Random Deopt Fuzzer - debug': 'debug_x64', @@ -166,6 +166,8 @@ 'V8 Clusterfuzz Linux64 TSAN - release builder': 'release_x64_tsan', 'V8 Clusterfuzz Linux64 UBSan - release builder': 'release_x64_ubsan_recover', + 'V8 Clusterfuzz Linux64 ASAN sandbox testing - release builder': + 'release_x64_asan_sandbox_testing', }, 'client.v8.perf' : { 'V8 Arm - builder - perf': 'official_arm', @@ -173,6 +175,7 @@ 'V8 Android Arm64 - builder - perf': 'official_android_arm64', 'V8 Linux - builder - perf': 'official_x86', 'V8 Linux64 - builder - perf': 'official_x64', + 'V8 Mac Arm64 - builder - perf': 'official_mac_arm64', }, 'client.v8.ports': { # Arm. @@ -191,12 +194,12 @@ 'V8 Linux - arm64 - sim - debug builder': 'debug_simulate_arm64', 'V8 Linux - arm64 - sim - gc stress - builder': 'debug_simulate_arm64', # Mips. - 'V8 Linux - mipsel - sim - builder': 'release_simulate_mipsel', 'V8 Linux - mips64el - sim - builder': 'release_simulate_mips64el', # IBM. 'V8 Linux - ppc64 - sim - builder': 'release_simulate_ppc64', 'V8 Linux - s390x - sim - builder': 'release_simulate_s390x', # RISC-V + 'V8 Linux - riscv32 - sim - builder': 'release_simulate_riscv32', 'V8 Linux - riscv64 - sim - builder': 'release_simulate_riscv64', # Loongson 'V8 Linux - loong64 - sim - builder': 'release_simulate_loong64', @@ -216,28 +219,34 @@ 'v8_linux_noi18n_compile_dbg': 'debug_x86_no_i18n', 'v8_linux_noi18n_rel_ng': 'release_x86_no_i18n_trybot', 'v8_linux_gc_stress_dbg_ng': 'debug_x86_trybot', - 'v8_linux_gcc_compile_rel': 'release_x86_gcc_minimal_symbols', - 'v8_linux_gcc_rel_ng': 'release_x86_gcc_minimal_symbols', 'v8_linux_shared_compile_rel': 'release_x86_shared_verify_heap', 'v8_linux_vtunejit': 'debug_x86_vtunejit', - 'v8_linux64_arm64_pointer_compression_rel_ng': - 'release_simulate_arm64_pointer_compression', + 'v8_linux64_arm64_no_pointer_compression_rel_ng': + 'release_simulate_arm64_no_pointer_compression', 'v8_linux64_cppgc_non_default_dbg_ng': 'debug_x64_non_default_cppgc', 'v8_linux64_dbg_ng': 'debug_x64_trybot', + 'v8_linux64_no_sandbox_dbg_ng': 'debug_x64_no_sandbox', 'v8_linux64_dict_tracking_dbg_ng': 'debug_x64_dict_tracking_trybot', 'v8_linux64_disable_runtime_call_stats_rel_ng': 'release_x64_disable_runtime_call_stats', '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_gc_stress_dbg_ng': 'debug_x64_trybot', 'v8_linux64_gcc_compile_dbg': 'debug_x64_gcc', + 'v8_linux64_gcc_compile_rel': 'release_x64_gcc', + 'v8_linux64_gcc_light_compile_dbg': 'debug_x64_gcc', + 'v8_linux64_gcc_rel_ng': 'release_x64_gcc', 'v8_linux64_gcov_coverage': 'release_x64_gcc_coverage', 'v8_linux64_header_includes_dbg': 'debug_x64_header_includes', 'v8_linux64_heap_sandbox_dbg_ng': 'debug_x64_heap_sandbox', + 'v8_linux64_minor_mc_dbg_ng': 'debug_x64_trybot', 'v8_linux_arm64_sim_heap_sandbox_dbg_ng': 'debug_x64_heap_sandbox_arm64_sim', 'v8_linux64_fyi_rel_ng': 'release_x64_test_features_trybot', 'v8_linux64_nodcheck_rel_ng': 'release_x64', 'v8_linux64_perfetto_dbg_ng': 'debug_x64_perfetto', - 'v8_linux64_pointer_compression_rel_ng': 'release_x64_pointer_compression', + 'v8_linux64_no_pointer_compression_rel_ng': 'release_x64_no_pointer_compression', 'v8_linux64_rel_ng': 'release_x64_test_features_trybot', + 'v8_linux64_no_sandbox_rel_ng': 'release_x64_no_sandbox', + 'v8_linux64_predictable_rel_ng': 'release_x64_predictable', 'v8_linux64_shared_compile_rel': 'release_x64_shared_verify_heap', 'v8_linux64_single_generation_dbg_ng': 'debug_x64_single_generation', 'v8_linux64_no_wasm_compile_rel': 'release_x64_webassembly_disabled', @@ -247,6 +256,7 @@ 'v8_linux64_fuzzilli_ng': 'release_x64_fuzzilli', 'v8_linux64_loong64_rel_ng': 'release_simulate_loong64', 'v8_linux64_msan_rel_ng': 'release_simulate_arm64_msan_minimal_symbols', + 'v8_linux_riscv32_rel_ng': 'release_simulate_riscv32', 'v8_linux64_riscv64_rel_ng': 'release_simulate_riscv64', 'v8_linux64_tsan_rel_ng': 'release_x64_tsan_minimal_symbols', 'v8_linux64_tsan_no_cm_rel_ng': 'release_x64_tsan_no_cm', @@ -267,6 +277,7 @@ 'v8_mac_arm64_rel_ng': 'release_arm64', 'v8_mac_arm64_dbg_ng': 'debug_arm64', 'v8_mac_arm64_full_dbg_ng': 'full_debug_arm64', + 'v8_mac_arm64_no_pointer_compression_dbg_ng': 'debug_arm64_no_pointer_compression', 'v8_mac_arm64_compile_dbg': 'debug_arm64', 'v8_mac_arm64_compile_rel': 'release_arm64', 'v8_mac_arm64_sim_compile_dbg': 'debug_simulate_arm64', @@ -279,7 +290,7 @@ 'v8_mac64_dbg': 'debug_x64', 'v8_mac64_dbg_ng': 'debug_x64', 'v8_mac64_compile_full_dbg_ng': 'full_debug_x64', - 'v8_mac64_asan_compile_rel_ng': 'release_x64_asan_no_lsan', + 'v8_mac64_asan_compile_rel': 'release_x64_asan_no_lsan', 'v8_mac64_asan_rel_ng': 'release_x64_asan_no_lsan', 'v8_linux_arm_rel_ng': 'release_simulate_arm_trybot', 'v8_linux_arm_lite_compile_dbg': 'debug_simulate_arm_lite', @@ -291,7 +302,6 @@ 'v8_linux_arm64_cfi_rel_ng' : 'release_simulate_arm64_cfi', 'v8_linux_arm64_dbg_ng': 'debug_simulate_arm64', 'v8_linux_arm64_gc_stress_dbg_ng': 'debug_simulate_arm64', - 'v8_linux_mipsel_compile_rel': 'release_simulate_mipsel', 'v8_linux_mips64el_compile_rel': 'release_simulate_mips64el', 'v8_numfuzz_ng': 'release_x64', 'v8_numfuzz_dbg_ng': 'debug_x64', @@ -324,12 +334,6 @@ 'release', 'simulate_arm64'], 'release_arm64_sample': [ 'release', 'arm64', 'sample'], - 'default_debug_mipsel': [ - 'debug', 'simulate_mipsel', 'v8_enable_slow_dchecks', 'v8_full_debug'], - 'default_optdebug_mipsel': [ - 'debug', 'simulate_mipsel', 'v8_enable_slow_dchecks'], - 'default_release_mipsel': [ - 'release', 'simulate_mipsel'], 'default_debug_mips64el': [ 'debug', 'simulate_mips64el', 'v8_enable_slow_dchecks', 'v8_full_debug'], 'default_optdebug_mips64el': [ @@ -413,11 +417,8 @@ 'release_bot', 'simulate_arm64'], 'release_simulate_arm64_cfi': [ 'release_bot', 'simulate_arm64', 'v8_control_flow_integrity'], - 'release_simulate_arm64_pointer_compression': [ - # TODO(v8:v7703): Make pointer compression bots testing non pointer - # compression mode while pointer compression is temporarily enabled - # on arm64 - 'release_bot', 'simulate_arm64', 'dcheck_always_on', + 'release_simulate_arm64_no_pointer_compression': [ + 'release_bot', 'simulate_arm64_no_sandbox', 'dcheck_always_on', 'v8_enable_slow_dchecks', 'v8_disable_pointer_compression'], 'release_simulate_arm64_msan': [ 'release_bot', 'simulate_arm64', 'msan'], @@ -431,12 +432,12 @@ 'release_trybot', 'simulate_arm64'], 'release_simulate_loong64': [ 'release_bot', 'simulate_loong64'], - 'release_simulate_mipsel': [ - 'release_bot', 'simulate_mipsel'], 'release_simulate_mips64el': [ 'release_bot', 'simulate_mips64el'], 'release_simulate_ppc64': [ 'release_bot', 'simulate_ppc64'], + 'release_simulate_riscv32': [ + 'release_bot', 'simulate_riscv32'], 'release_simulate_riscv64': [ 'release_bot', 'simulate_riscv64'], 'release_simulate_s390x': [ @@ -449,6 +450,9 @@ 'debug_bot', 'arm', 'hard_float'], 'debug_arm64': [ 'debug_bot', 'arm64'], + 'debug_arm64_no_pointer_compression': [ + 'debug_bot', 'arm64_no_sandbox', 'dcheck_always_on', 'v8_enable_slow_dchecks', 'v8_enable_javascript_promise_hooks', + 'v8_disable_pointer_compression'], 'full_debug_arm64': [ 'debug_bot', 'arm64', 'v8_full_debug'], @@ -475,6 +479,8 @@ 'official_android_arm64': [ 'release_bot', 'arm64', 'android', 'minimal_symbols', 'android_strip_outputs', 'official', 'disable_pgo'], + 'official_mac_arm64': [ + 'release_bot', 'arm64', 'official', 'disable_pgo'], # Release configs for x64. 'release_x64': [ @@ -512,6 +518,8 @@ 'release_bot', 'x64', 'fuchsia'], 'release_x64_fuchsia_trybot': [ 'release_trybot', 'x64', 'fuchsia'], + 'release_x64_gcc': [ + 'release_bot_no_goma', 'x64', 'gcc', 'lld', 'no_custom_libcxx'], 'release_x64_gcc_coverage': [ 'release_bot_no_goma', 'x64', 'coverage', 'gcc', 'lld', 'no_custom_libcxx', 'no_sysroot'], @@ -521,13 +529,15 @@ 'release_bot', 'x64', 'v8_snapshot_internal'], 'release_x64_minimal_symbols': [ 'release_bot', 'x64', 'minimal_symbols'], - 'release_x64_pointer_compression': [ - 'release_bot', 'x64', 'dcheck_always_on', 'v8_enable_slow_dchecks', 'v8_enable_javascript_promise_hooks', + 'release_x64_minimal_symbols_reclient': [ + 'release_bot_reclient', 'x64', 'minimal_symbols'], + 'release_x64_no_pointer_compression': [ + 'release_bot', 'x64_no_sandbox', 'dcheck_always_on', 'v8_enable_slow_dchecks', 'v8_enable_javascript_promise_hooks', '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_no_sandbox': [ + 'release_bot', 'x64_no_sandbox'], 'release_x64_trybot': [ 'release_trybot', 'x64'], 'release_x64_test_features_trybot': [ @@ -551,6 +561,9 @@ 'v8_enable_slow_dchecks', 'v8_verify_csa'], 'release_x64_webassembly_disabled': [ 'release_bot', 'x64', 'webassembly_disabled'], + 'release_x64_asan_sandbox_testing': [ + 'release_bot', 'x64', 'asan', 'symbolized', 'v8_enable_sandbox_future', + 'v8_expose_memory_corruption_api'], # Official configs for x64. 'official_x64': [ @@ -571,20 +584,21 @@ 'debug_x64_fuchsia': [ 'debug_bot', 'x64', 'fuchsia'], 'debug_x64_gcc': [ - 'debug_bot_no_goma', 'x64', 'gcc', 'lld', 'no_custom_libcxx', - 'v8_check_header_includes'], + 'debug_bot_no_goma', 'x64', 'gcc', 'lld', 'no_custom_libcxx'], 'debug_x64_header_includes': [ 'debug_bot', 'x64', 'v8_check_header_includes'], 'debug_x64_heap_sandbox': [ - 'debug_bot', 'x64', 'v8_enable_sandbox_future'], + 'debug_bot', 'x64', 'v8_enable_sandbox_future', 'v8_expose_memory_corruption_api'], 'debug_x64_heap_sandbox_arm64_sim': [ - 'debug_bot', 'simulate_arm64', 'v8_enable_sandbox_future'], + 'debug_bot', 'simulate_arm64', 'v8_enable_sandbox_future', 'v8_expose_memory_corruption_api'], 'debug_x64_minimal_symbols': [ 'debug_bot', 'x64', 'minimal_symbols'], 'debug_x64_non_default_cppgc': [ 'debug_bot', 'x64', 'non_default_cppgc'], 'debug_x64_perfetto': [ 'debug_bot', 'x64', 'perfetto'], + 'debug_x64_no_sandbox': [ + 'debug_bot', 'x64_no_sandbox'], 'debug_x64_single_generation': [ 'debug_bot', 'x64', 'v8_enable_single_generation'], 'debug_x64_trybot': [ @@ -613,15 +627,11 @@ 'debug', 'x86', 'goma', 'v8_enable_slow_dchecks', 'v8_full_debug'], # Release configs for x86. + 'release_x86': [ + 'release_bot', 'x86'], 'release_x86_asan_symbolized_verify_heap': [ 'release_bot', 'x86', 'asan', 'lsan', 'symbolized', 'v8_verify_heap'], - 'release_x86_gcc': [ - 'release_bot_no_goma', 'x86', 'gcc', 'lld', 'no_custom_libcxx', - 'v8_check_header_includes'], - 'release_x86_gcc_minimal_symbols': [ - 'release_bot_no_goma', 'x86', 'gcc', 'lld', 'no_custom_libcxx', - 'minimal_symbols', 'v8_check_header_includes'], 'release_x86_gcmole': [ 'release_bot', 'x86', 'gcmole'], 'release_x86_gcmole_trybot': [ @@ -632,8 +642,8 @@ 'release_bot_reclient', 'x86', 'minimal_symbols'], 'release_x86_no_i18n_trybot': [ 'release_trybot', 'x86', 'v8_no_i18n'], - 'release_x86_predictable': [ - 'release_bot', 'x86', 'v8_enable_verify_predictable'], + 'release_x64_predictable': [ + 'release_bot', 'x64', 'v8_enable_verify_predictable'], 'release_x86_shared_verify_heap': [ 'release', 'x86', 'goma', 'shared', 'v8_verify_heap'], 'release_x86_trybot': [ @@ -665,7 +675,11 @@ }, 'arm64': { - 'gn_args': 'target_cpu="arm64"', + 'gn_args': 'target_cpu="arm64" v8_enable_sandbox=true', + }, + + 'arm64_no_sandbox': { + 'gn_args': 'target_cpu="arm64" v8_enable_sandbox=false', }, 'asan': { @@ -723,8 +737,7 @@ # atomic marking state enabled because that is needed for the concurrent # write-barrier used by background compilation. 'gn_args': 'v8_enable_concurrent_marking=false ' - 'v8_enable_atomic_object_field_writes=false ' - 'v8_enable_atomic_marking_state=true ', + 'v8_enable_atomic_object_field_writes=false ', }, 'disable_pgo': { @@ -812,7 +825,7 @@ }, 'reclient': { - 'gn_args': 'use_rbe=true use_remoteexec=true', + 'gn_args': 'use_remoteexec=true', }, 'release': { @@ -848,16 +861,15 @@ }, 'simulate_arm64': { - 'gn_args': 'target_cpu="x64" v8_target_cpu="arm64"', + 'gn_args': 'target_cpu="x64" v8_target_cpu="arm64" v8_enable_sandbox=true', }, - 'simulate_loong64': { - 'gn_args': 'target_cpu="x64" v8_target_cpu="loong64"', + 'simulate_arm64_no_sandbox': { + 'gn_args': 'target_cpu="x64" v8_target_cpu="arm64" v8_enable_sandbox=false', }, - 'simulate_mipsel': { - 'gn_args': - 'target_cpu="x86" v8_target_cpu="mipsel" mips_arch_variant="r2"', + 'simulate_loong64': { + 'gn_args': 'target_cpu="x64" v8_target_cpu="loong64"', }, 'simulate_mips64el': { @@ -868,6 +880,10 @@ 'gn_args': 'target_cpu="x64" v8_target_cpu="ppc64"', }, + 'simulate_riscv32': { + 'gn_args': 'target_cpu="x86" v8_target_cpu="riscv32"', + }, + 'simulate_riscv64': { 'gn_args': 'target_cpu="x64" v8_target_cpu="riscv64"', }, @@ -925,6 +941,10 @@ 'gn_args': 'v8_enable_sandbox_future=true', }, + 'v8_expose_memory_corruption_api': { + 'gn_args': 'v8_expose_memory_corruption_api=true', + }, + 'v8_enable_lite_mode': { 'gn_args': 'v8_enable_lite_mode=true', }, @@ -1010,7 +1030,11 @@ }, 'x64': { - 'gn_args': 'target_cpu="x64"', + 'gn_args': 'target_cpu="x64" v8_enable_sandbox=true', + }, + + 'x64_no_sandbox': { + 'gn_args': 'target_cpu="x64" v8_enable_sandbox=false', }, 'x86': { diff --git a/deps/v8/infra/testing/builders.pyl b/deps/v8/infra/testing/builders.pyl index 11db9b11f714a3..ca2fab5eac8e90 100644 --- a/deps/v8/infra/testing/builders.pyl +++ b/deps/v8/infra/testing/builders.pyl @@ -77,8 +77,8 @@ {'name': 'mozilla', 'variant': 'extra'}, {'name': 'test262', 'variant': 'default', 'shards': 2}, {'name': 'test262', 'variant': 'extra', 'shards': 5}, - {'name': 'v8testing', 'shards': 3}, - {'name': 'v8testing', 'variant': 'extra', 'shards': 2}, + {'name': 'v8testing', 'shards': 4}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 4}, # Noavx. { 'name': 'mozilla', @@ -95,7 +95,17 @@ 'name': 'v8testing', 'suffix': 'noavx', 'test_args': ['--extra-flags', '--noenable-avx'], - 'shards': 2 + 'shards': 4 + }, + # Nosse3. + { + 'name': 'v8testing', + 'suffix': 'nosse3', + 'test_args': [ + '--extra-flags', + '--noenable-sse3 --noenable-ssse3 --noenable-sse4-1 --noenable-avx', + ], + 'shards': 4, }, ], }, @@ -108,14 +118,6 @@ {'name': 'd8testing', 'test_args': ['--gc-stress'], 'shards': 5}, ], }, - 'v8_linux_gcc_rel_ng_triggered': { - 'swarming_dimensions' : { - 'os': 'Ubuntu-18.04', - }, - 'tests': [ - {'name': 'v8testing'}, - ], - }, 'v8_linux_nodcheck_rel_ng_triggered': { 'swarming_dimensions' : { 'cpu': 'x86-64-avx2', @@ -130,6 +132,15 @@ {'name': 'test262', 'variant': 'extra', 'shards': 2}, {'name': 'v8testing', 'shards': 2}, {'name': 'v8testing', 'variant': 'extra'}, + { + 'name': 'v8testing', + 'suffix': 'nosse3', + 'test_args': [ + '--extra-flags', + '--noenable-sse3 --noenable-ssse3 --noenable-sse4-1 --noenable-avx', + ], + 'shards': 2, + }, ], }, 'v8_linux_noi18n_rel_ng_triggered': { @@ -156,10 +167,19 @@ {'name': 'mozilla', 'variant': 'extra'}, {'name': 'optimize_for_size'}, {'name': 'test262', 'shards': 4}, - {'name': 'test262', 'variant': 'extra', 'shards': 3}, - {'name': 'v8testing', 'shards': 2}, - {'name': 'v8testing', 'suffix': 'isolates', 'test_args': ['--isolates'], 'shards': 2}, - {'name': 'v8testing', 'variant': 'extra', 'shards': 2}, + {'name': 'test262', 'variant': 'extra', 'shards': 6}, + {'name': 'v8testing', 'shards': 4}, + {'name': 'v8testing', 'suffix': 'isolates', 'test_args': ['--isolates'], 'shards': 4}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 4}, + { + 'name': 'v8testing', + 'suffix': 'nosse3', + 'test_args': [ + '--extra-flags', + '--noenable-sse3 --noenable-ssse3 --noenable-sse4-1 --noenable-avx', + ], + 'shards': 4, + }, ], }, 'v8_linux_optional_rel_ng_triggered': { @@ -314,9 +334,9 @@ 'os': 'Ubuntu-18.04', }, 'tests': [ - {'name': 'test262', 'shards': 7}, - {'name': 'v8testing', 'shards': 3}, - {'name': 'v8testing', 'variant': 'extra', 'shards': 3}, + {'name': 'test262', 'shards': 12}, + {'name': 'v8testing', 'shards': 5}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 5}, {'name': 'v8testing', 'variant': 'slow_path'}, ], }, @@ -361,6 +381,8 @@ {'name': 'v8testing', 'variant': 'stress_instruction_scheduling'}, {'name': 'v8testing', 'variant': 'stress_concurrent_allocation'}, {'name': 'v8testing', 'variant': 'stress_concurrent_inlining'}, + # Maglev -- move to extra once more architectures are supported. + {'name': 'mjsunit', 'variant': 'maglev'}, ], }, 'v8_linux64_dict_tracking_dbg_ng_triggered': { @@ -408,6 +430,10 @@ {'name': 'webkit', 'variant': 'stress_sampling'}, # Stress snapshot. {'name': 'mjsunit', 'variant': 'stress_snapshot'}, + # Maglev. + {'name': 'mjsunit', 'variant': 'maglev'}, + # Stress maglev. + {'name': 'mjsunit', 'variant': 'stress_maglev'}, # Experimental regexp engine. {'name': 'mjsunit', 'variant': 'experimental_regexp'}, # Wasm write protect code space. @@ -426,6 +452,35 @@ }, ], }, + 'v8_linux64_gc_stress_dbg_ng_triggered': { + 'swarming_dimensions' : { + 'cpu': 'x86-64-avx2', + 'os': 'Ubuntu-18.04', + }, + 'tests': [ + {'name': 'd8testing', 'test_args': ['--gc-stress'], 'shards': 5}, + { + 'name': 'mjsunit', + 'variant': 'slow_path', + 'test_args': ['--gc-stress'], + 'shards': 2 + }, + { + 'name': 'mjsunit', + 'variant': 'maglev', + 'test_args': ['--gc-stress'], + 'shards': 2 + }, + ], + }, + 'v8_linux64_gcc_rel_ng_triggered': { + 'swarming_dimensions' : { + 'os': 'Ubuntu-20.04', + }, + 'tests': [ + {'name': 'v8testing'}, + ], + }, 'v8_linux64_gcov_coverage': { 'swarming_dimensions' : { 'os': 'Ubuntu-18.04', @@ -439,7 +494,20 @@ 'os': 'Ubuntu-18.04', }, 'tests': [ - {'name': 'v8testing', 'shards': 2}, + {'name': 'v8testing', 'shards': 4}, + ], + }, + 'v8_linux64_minor_mc_dbg_ng_triggered': { + 'swarming_dimensions' : { + 'cpu': 'x86-64-avx2', + 'os': 'Ubuntu-18.04', + }, + 'tests': [ + {'name': 'v8testing', 'variant': 'minor_mc'}, + {'name': 'benchmarks', 'variant': 'minor_mc'}, + {'name': 'mozilla', 'variant': 'minor_mc'}, + {'name': 'test262', 'variant': 'minor_mc', 'shards': 2}, + {'name': 'mjsunit', 'variant': 'minor_mc'}, ], }, 'v8_linux64_msan_rel_ng_triggered': { @@ -473,6 +541,8 @@ {'name': 'v8testing', 'variant': 'extra'}, {'name': 'v8testing', 'variant': 'no_lfa'}, {'name': 'v8testing', 'variant': 'stress_instruction_scheduling'}, + # Maglev -- move to extra once more architectures are supported. + {'name': 'mjsunit', 'variant': 'maglev'}, ], }, 'v8_linux64_perfetto_dbg_ng_triggered': { @@ -483,7 +553,7 @@ {'name': 'v8testing', 'shards': 3}, ], }, - 'v8_linux64_pointer_compression_rel_ng_triggered': { + 'v8_linux64_no_pointer_compression_rel_ng_triggered': { 'swarming_dimensions' : { 'os': 'Ubuntu-18.04', }, @@ -491,6 +561,15 @@ {'name': 'v8testing', 'shards': 3}, ], }, + 'v8_linux64_no_sandbox_dbg_ng_triggered': { + 'swarming_dimensions' : { + 'cpu': 'x86-64-avx2', + 'os': 'Ubuntu-18.04', + }, + 'tests': [ + {'name': 'v8testing', 'shards': 5}, + ], + }, 'v8_linux64_single_generation_dbg_ng_triggered': { 'swarming_dimensions' : { 'os': 'Ubuntu-18.04', @@ -518,6 +597,28 @@ {'name': 'v8testing', 'variant': 'no_lfa'}, {'name': 'v8testing', 'variant': 'slow_path'}, {'name': 'v8testing', 'variant': 'stress_instruction_scheduling'}, + # Maglev -- move to extra once more architectures are supported. + {'name': 'mjsunit', 'variant': 'maglev'}, + ], + }, + 'v8_linux64_predictable_rel_ng_triggered': { + 'swarming_dimensions': { + 'cpu': 'x86-64-avx2', + 'os': 'Ubuntu-18.04', + }, + 'tests': [ + {'name': 'benchmarks'}, + {'name': 'd8testing'}, + {'name': 'mozilla'}, + ], + }, + 'v8_linux64_no_sandbox_rel_ng_triggered': { + 'swarming_dimensions' : { + 'cpu': 'x86-64-avx2', + 'os': 'Ubuntu-18.04', + }, + 'tests': [ + {'name': 'v8testing', 'shards': 2}, ], }, 'v8_linux64_tsan_rel_ng_triggered': { @@ -587,7 +688,7 @@ {'name': 'mozilla', 'shards': 4}, {'name': 'test262', 'variant': 'default', 'shards': 4}, {'name': 'v8testing', 'shards': 14}, - {'name': 'v8testing', 'variant': 'extra', 'shards': 12}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 14}, ], }, 'v8_linux_arm64_gc_stress_dbg_ng_triggered': { @@ -615,7 +716,7 @@ {'name': 'mozilla', 'shards': 4}, {'name': 'test262', 'variant': 'default', 'shards': 4}, {'name': 'v8testing', 'shards': 14}, - {'name': 'v8testing', 'variant': 'extra', 'shards': 12}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 14}, ], }, 'v8_linux_arm64_cfi_rel_ng_triggered': { @@ -627,7 +728,7 @@ {'name': 'v8testing', 'shards': 4}, ], }, - 'v8_linux64_arm64_pointer_compression_rel_ng_triggered': { + 'v8_linux64_arm64_no_pointer_compression_rel_ng_triggered': { 'swarming_dimensions' : { 'os': 'Ubuntu-18.04', }, @@ -646,7 +747,15 @@ ], }, ############################################################################## - # Linux64 with RISC-V simulators + # Linux with RISC-V simulators + 'v8_linux_riscv32_rel_ng_triggered': { + 'swarming_dimensions': { + 'os': 'Ubuntu-18.04', + }, + 'tests': [ + {'name': 'v8testing', 'shards': 3}, + ], + }, 'v8_linux64_riscv64_rel_ng_triggered': { 'swarming_dimensions': { 'os': 'Ubuntu-18.04', @@ -700,7 +809,7 @@ # Win64 'v8_win64_asan_rel_ng_triggered': { 'swarming_dimensions' : { - 'os': 'Windows-10-15063', + 'os': 'Windows-10-19042', }, 'tests': [ {'name': 'v8testing', 'shards': 5}, @@ -709,11 +818,11 @@ 'v8_win64_dbg_ng_triggered': { 'swarming_dimensions' : { 'cpu': 'x86-64', - 'os': 'Windows-10-15063', + 'os': 'Windows-10-19042', }, 'tests': [ {'name': 'mozilla'}, - {'name': 'test262', 'variant': 'default', 'shards': 2}, + {'name': 'test262', 'variant': 'default', 'shards': 4}, {'name': 'v8testing', 'shards': 3}, {'name': 'v8testing', 'variant': 'extra', 'shards': 2}, ], @@ -721,22 +830,22 @@ 'v8_win64_msvc_rel_ng_triggered': { 'swarming_dimensions' : { 'cpu': 'x86-64', - 'os': 'Windows-10-15063', + 'os': 'Windows-10-19042', }, 'tests': [ {'name': 'mozilla'}, - {'name': 'test262', 'variant': 'default'}, + {'name': 'test262', 'variant': 'default', 'shards': 2}, {'name': 'v8testing', 'shards': 2}, ], }, 'v8_win64_rel_ng_triggered': { 'swarming_dimensions' : { 'cpu': 'x86-64', - 'os': 'Windows-10-15063', + 'os': 'Windows-10-19042', }, 'tests': [ {'name': 'mozilla'}, - {'name': 'test262', 'variant': 'default'}, + {'name': 'test262', 'variant': 'default', 'shards': 2}, {'name': 'v8testing', 'shards': 2}, {'name': 'v8testing', 'variant': 'extra'}, ], @@ -815,6 +924,16 @@ {'name': 'v8testing'}, ], }, + 'v8_mac_arm64_no_pointer_compression_dbg_ng_triggered': { + 'swarming_dimensions' : { + 'cpu': 'arm64', + 'os': 'Mac-11', + 'pool': 'chromium.tests', + }, + 'tests': [ + {'name': 'v8testing'}, + ], + }, 'v8_mac_arm64_sim_rel_ng_triggered': { 'swarming_dimensions' : { 'cpu': 'x86-64', @@ -1088,8 +1207,9 @@ {'name': 'v8testing', 'variant': 'default'}, ], }, - 'V8 Linux - predictable': { + 'V8 Linux64 - predictable': { 'swarming_dimensions': { + 'cpu': 'x86-64-avx2', 'os': 'Ubuntu-18.04', }, 'tests': [ @@ -1116,14 +1236,6 @@ {'name': 'v8testing'}, ], }, - 'V8 Linux gcc': { - 'swarming_dimensions' : { - 'os': 'Ubuntu-18.04', - }, - 'tests': [ - {'name': 'v8testing'}, - ], - }, 'V8 Linux64': { 'swarming_dimensions': { 'cpu': 'x86-64-avx2', @@ -1150,6 +1262,8 @@ {'name': 'v8testing', 'variant': 'minor_mc'}, {'name': 'v8testing', 'variant': 'no_lfa'}, {'name': 'v8testing', 'variant': 'stress_instruction_scheduling'}, + # Maglev -- move to extra once more architectures are supported. + {'name': 'mjsunit', 'variant': 'maglev'}, # Noavx. { 'name': 'mozilla', @@ -1211,6 +1325,8 @@ {'name': 'v8testing', 'variant': 'stress_instruction_scheduling'}, {'name': 'v8testing', 'variant': 'stress_concurrent_allocation'}, {'name': 'v8testing', 'variant': 'stress_concurrent_inlining'}, + # Maglev -- move to extra once more architectures are supported. + {'name': 'mjsunit', 'variant': 'maglev'}, # Noavx. { 'name': 'mozilla', @@ -1231,13 +1347,17 @@ }, ], }, - 'V8 Linux64 - dict tracking - debug': { + 'V8 Linux64 - minor mc - debug': { 'swarming_dimensions': { 'cpu': 'x86-64-avx2', 'os': 'Ubuntu-18.04', }, 'tests': [ - {'name': 'v8testing', 'shards': 3}, + {'name': 'v8testing', 'variant': 'minor_mc'}, + {'name': 'benchmarks', 'variant': 'minor_mc'}, + {'name': 'mozilla', 'variant': 'minor_mc'}, + {'name': 'test262', 'variant': 'minor_mc', 'shards': 2}, + {'name': 'mjsunit', 'variant': 'minor_mc'}, ], }, 'V8 Linux64 - disable runtime call stats': { @@ -1260,6 +1380,10 @@ {'name': 'webkit', 'variant': 'stress_sampling'}, # Stress snapshot. {'name': 'mjsunit', 'variant': 'stress_snapshot'}, + # Maglev. + {'name': 'mjsunit', 'variant': 'maglev'}, + # Stress maglev. + {'name': 'mjsunit', 'variant': 'stress_maglev'}, # Experimental regexp engine. {'name': 'mjsunit', 'variant': 'experimental_regexp'}, # Wasm write protect code space. @@ -1322,12 +1446,49 @@ {'name': 'webkit', 'variant': 'stress_sampling'}, # Stress snapshot. {'name': 'mjsunit', 'variant': 'stress_snapshot'}, + # Maglev. + {'name': 'mjsunit', 'variant': 'maglev'}, + # Stress maglev. + {'name': 'mjsunit', 'variant': 'stress_maglev'}, # Experimental regexp engine. {'name': 'mjsunit', 'variant': 'experimental_regexp'}, # Wasm write protect code space. {'name': 'mjsunit', 'variant': 'wasm_write_protect_code'}, ], }, + 'V8 Linux64 gcc': { + 'swarming_dimensions' : { + 'os': 'Ubuntu-20.04', + }, + 'tests': [ + {'name': 'v8testing'}, + ], + }, + 'V8 Linux64 - gc stress': { + 'swarming_dimensions': { + 'cpu': 'x86-64-avx2', + 'os': 'Ubuntu-18.04', + }, + 'tests': [ + { + 'name': 'd8testing', + 'test_args': ['--gc-stress'], + 'shards': 5, + }, + { + 'name': 'mjsunit', + 'variant': 'slow_path', + 'test_args': ['--gc-stress'], + 'shards': 2, + }, + { + 'name': 'mjsunit', + 'variant': 'maglev', + 'test_args': ['--gc-stress'], + 'shards': 2 + }, + ], + }, 'V8 Linux64 - gcov coverage': { 'swarming_dimensions' : { 'os': 'Ubuntu-18.04', @@ -1352,7 +1513,7 @@ {'name': 'v8testing'}, ], }, - 'V8 Linux64 - pointer compression': { + 'V8 Linux64 - no pointer compression': { 'swarming_dimensions' : { 'os': 'Ubuntu-18.04', }, @@ -1360,6 +1521,24 @@ {'name': 'v8testing', 'shards': 2}, ], }, + 'V8 Linux64 - no sandbox': { + 'swarming_dimensions': { + 'cpu': 'x86-64-avx2', + 'os': 'Ubuntu-18.04', + }, + 'tests': [ + {'name': 'v8testing'}, + ], + }, + 'V8 Linux64 - no sandbox - debug': { + 'swarming_dimensions': { + 'cpu': 'x86-64-avx2', + 'os': 'Ubuntu-18.04', + }, + 'tests': [ + {'name': 'v8testing', 'shards': 2}, + ], + }, 'V8 Linux64 - shared': { 'swarming_dimensions' : { 'os': 'Ubuntu-18.04', @@ -1559,6 +1738,16 @@ {'name': 'v8testing', 'variant': 'extra', 'shards': 2}, ], }, + 'V8 Mac - arm64 - no pointer compression debug': { + 'swarming_dimensions' : { + 'cpu': 'arm64', + 'os': 'Mac-11', + 'pool': 'chromium.tests', + }, + 'tests': [ + {'name': 'v8testing'}, + ], + }, 'V8 Mac - arm64 - sim - debug': { 'swarming_dimensions' : { 'cpu': 'x86-64', @@ -1613,7 +1802,7 @@ }, 'V8 Win64': { 'swarming_dimensions': { - 'os': 'Windows-10-15063', + 'os': 'Windows-10-19042', }, 'tests': [ {'name': 'mozilla'}, @@ -1624,18 +1813,18 @@ }, 'V8 Win64 - debug': { 'swarming_dimensions': { - 'os': 'Windows-10-15063', + 'os': 'Windows-10-19042', }, 'tests': [ {'name': 'mozilla'}, - {'name': 'test262', 'variant': 'default'}, + {'name': 'test262', 'variant': 'default', 'shards': 2}, {'name': 'v8testing', 'shards': 4}, {'name': 'v8testing', 'variant': 'extra', 'shards': 3}, ], }, 'V8 Win64 - msvc': { 'swarming_dimensions': { - 'os': 'Windows-10-15063', + 'os': 'Windows-10-19042', }, 'tests': [ {'name': 'mozilla'}, @@ -1645,7 +1834,7 @@ }, 'V8 Win64 ASAN': { 'swarming_dimensions': { - 'os': 'Windows-10-15063', + 'os': 'Windows-10-19042', }, 'tests': [ {'name': 'v8testing', 'shards': 5}, @@ -1818,7 +2007,7 @@ 'name': 'v8testing', 'suffix': 'armv8-a', 'test_args': ['--extra-flags', '--enable-armv8'], - 'shards': 8 + 'shards': 10 }, # Novfp3. { @@ -1839,7 +2028,7 @@ 'suffix': 'novfp3', 'variant': 'default', 'test_args': ['--novfp3'], - 'shards': 8 + 'shards': 3 }, ], }, @@ -1884,7 +2073,7 @@ {'name': 'mozilla', 'shards': 2}, {'name': 'test262', 'variant': 'default', 'shards': 2}, {'name': 'v8testing', 'shards': 12}, - {'name': 'v8testing', 'variant': 'extra', 'shards': 11}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 14}, ], }, 'V8 Linux - arm64 - sim - gc stress': { @@ -1900,7 +2089,7 @@ { 'name': 'd8testing', 'test_args': ['--gc-stress', '--extra-flags=--verify-heap-skip-remembered-set'], - 'shards': 5 + 'shards': 7 }, ], }, @@ -1944,7 +2133,7 @@ {'name': 'v8testing', 'shards': 4}, ], }, - 'V8 Linux - mipsel - sim': { + 'V8 Linux - ppc64 - sim': { 'swarming_dimensions': { 'os': 'Ubuntu-18.04', }, @@ -1954,11 +2143,10 @@ 'priority': 35, }, 'tests': [ - {'name': 'test262', 'variant': 'default'}, - {'name': 'v8testing', 'shards': 4}, + {'name': 'v8testing', 'shards': 3}, ], }, - 'V8 Linux - ppc64 - sim': { + 'V8 Linux - riscv32 - sim': { 'swarming_dimensions': { 'os': 'Ubuntu-18.04', }, @@ -1997,7 +2185,7 @@ {'name': 'v8testing', 'shards': 3}, ], }, - 'V8 Linux64 - arm64 - sim - pointer compression': { + 'V8 Linux64 - arm64 - sim - no pointer compression': { 'swarming_dimensions': { 'os': 'Ubuntu-18.04', }, diff --git a/deps/v8/samples/hello-world.cc b/deps/v8/samples/hello-world.cc index 3ca9ff68024566..557ba63e0fd85e 100644 --- a/deps/v8/samples/hello-world.cc +++ b/deps/v8/samples/hello-world.cc @@ -20,12 +20,6 @@ int main(int argc, char* argv[]) { v8::V8::InitializeExternalStartupData(argv[0]); std::unique_ptr platform = v8::platform::NewDefaultPlatform(); v8::V8::InitializePlatform(platform.get()); -#ifdef V8_SANDBOX - if (!v8::V8::InitializeSandbox()) { - fprintf(stderr, "Error initializing the V8 sandbox\n"); - return 1; - } -#endif v8::V8::Initialize(); // Create a new Isolate and make it the current one. diff --git a/deps/v8/samples/process.cc b/deps/v8/samples/process.cc index 1e9498038836d8..28b6f119c3acd2 100644 --- a/deps/v8/samples/process.cc +++ b/deps/v8/samples/process.cc @@ -703,12 +703,6 @@ int main(int argc, char* argv[]) { v8::V8::InitializeExternalStartupData(argv[0]); std::unique_ptr platform = v8::platform::NewDefaultPlatform(); v8::V8::InitializePlatform(platform.get()); -#ifdef V8_SANDBOX - if (!v8::V8::InitializeSandbox()) { - fprintf(stderr, "Error initializing the V8 sandbox\n"); - return 1; - } -#endif v8::V8::Initialize(); map options; string file; diff --git a/deps/v8/samples/shell.cc b/deps/v8/samples/shell.cc index 7e6be6f8723d19..046ed1e4eb53b7 100644 --- a/deps/v8/samples/shell.cc +++ b/deps/v8/samples/shell.cc @@ -73,14 +73,8 @@ int main(int argc, char* argv[]) { v8::V8::InitializeExternalStartupData(argv[0]); std::unique_ptr platform = v8::platform::NewDefaultPlatform(); v8::V8::InitializePlatform(platform.get()); -#ifdef V8_SANDBOX - if (!v8::V8::InitializeSandbox()) { - fprintf(stderr, "Error initializing the V8 sandbox\n"); - return 1; - } -#endif - v8::V8::Initialize(); v8::V8::SetFlagsFromCommandLine(&argc, argv, true); + v8::V8::Initialize(); v8::Isolate::CreateParams create_params; create_params.array_buffer_allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator(); diff --git a/deps/v8/src/DEPS b/deps/v8/src/DEPS index 9846e7695c125b..1edad011be189c 100644 --- a/deps/v8/src/DEPS +++ b/deps/v8/src/DEPS @@ -12,6 +12,7 @@ include_rules = [ "-src/compiler", "+src/compiler/pipeline.h", "+src/compiler/code-assembler.h", + "+src/compiler/wasm-compiler-definitions.h", "+src/compiler/wasm-compiler.h", "-src/heap", "+src/heap/basic-memory-chunk.h", @@ -23,6 +24,7 @@ include_rules = [ # TODO(v8:10496): Don't expose so much (through transitive includes) outside # of heap/. "+src/heap/heap.h", + "+src/heap/heap-verifier.h", "+src/heap/heap-inl.h", "+src/heap/heap-write-barrier-inl.h", "+src/heap/heap-write-barrier.h", @@ -33,6 +35,7 @@ include_rules = [ # TODO(v8:10496): Don't expose memory chunk outside of heap/. "+src/heap/memory-chunk.h", "+src/heap/memory-chunk-inl.h", + "+src/heap/paged-spaces-inl.h", "+src/heap/parked-scope.h", "+src/heap/read-only-heap-inl.h", "+src/heap/read-only-heap.h", @@ -88,7 +91,10 @@ specific_include_rules = { "builtins-trace\.cc": [ "+protos/perfetto", ], - "system-jit-win\.cc": [ + "etw-jit-win\.cc": [ "+src/libplatform/tracing/recorder.h", ], + "etw-jit-metadata-win\.h": [ + "+src/libplatform/etw/etw-provider-win.h", + ] } diff --git a/deps/v8/src/api/api-arguments-inl.h b/deps/v8/src/api/api-arguments-inl.h index 5d437370bc0a08..470ab95e181e84 100644 --- a/deps/v8/src/api/api-arguments-inl.h +++ b/deps/v8/src/api/api-arguments-inl.h @@ -12,7 +12,6 @@ #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" namespace v8 { namespace internal { @@ -134,7 +133,7 @@ Handle FunctionCallbackArguments::Call(CallHandlerInfo handler) { Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kFunctionCallback); v8::FunctionCallback f = - v8::ToCData(handler.callback()); + reinterpret_cast(handler.callback()); Handle receiver_check_unsupported; if (isolate->debug_execution_mode() == DebugInfo::kSideEffects && !isolate->debug()->PerformSideEffectCheckForCallback( @@ -148,6 +147,17 @@ Handle FunctionCallbackArguments::Call(CallHandlerInfo handler) { return GetReturnValue(isolate); } +PropertyCallbackArguments::~PropertyCallbackArguments(){ +#ifdef DEBUG +// TODO(chromium:1310062): enable this check. +// if (javascript_execution_counter_) { +// CHECK_WITH_MSG(javascript_execution_counter_ == +// isolate()->javascript_execution_counter(), +// "Unexpected side effect detected"); +// } +#endif // DEBUG +} + Handle PropertyCallbackArguments::CallNamedEnumerator( Handle interceptor) { DCHECK(interceptor->is_named()); @@ -296,8 +306,12 @@ Handle PropertyCallbackArguments::CallAccessorGetter( Handle info, Handle name) { Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kAccessorGetterCallback); + // Unlike interceptor callbacks we know that the property exists, so + // the callback is allowed to have side effects. + AcceptSideEffects(); + AccessorNameGetterCallback f = - ToCData(info->getter()); + reinterpret_cast(info->getter()); return BasicCallNamedGetterCallback(f, name, info, handle(receiver(), isolate)); } @@ -307,8 +321,12 @@ Handle PropertyCallbackArguments::CallAccessorSetter( Handle value) { Isolate* isolate = this->isolate(); RCS_SCOPE(isolate, RuntimeCallCounterId::kAccessorSetterCallback); + // Unlike interceptor callbacks we know that the property exists, so + // the callback is allowed to have side effects. + AcceptSideEffects(); + AccessorNameSetterCallback f = - ToCData(accessor_info->setter()); + reinterpret_cast(accessor_info->setter()); PREPARE_CALLBACK_INFO(isolate, f, Handle, void, accessor_info, handle(receiver(), isolate), Setter); f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), callback_info); diff --git a/deps/v8/src/api/api-arguments.cc b/deps/v8/src/api/api-arguments.cc index 51317fd0bf14bb..452588b394f087 100644 --- a/deps/v8/src/api/api-arguments.cc +++ b/deps/v8/src/api/api-arguments.cc @@ -12,7 +12,12 @@ namespace internal { PropertyCallbackArguments::PropertyCallbackArguments( Isolate* isolate, Object data, Object self, JSObject holder, Maybe should_throw) - : Super(isolate) { + : Super(isolate) +#ifdef DEBUG + , + javascript_execution_counter_(isolate->javascript_execution_counter()) +#endif // DEBUG +{ slot_at(T::kThisIndex).store(self); slot_at(T::kHolderIndex).store(holder); slot_at(T::kDataIndex).store(data); @@ -33,8 +38,7 @@ PropertyCallbackArguments::PropertyCallbackArguments( } FunctionCallbackArguments::FunctionCallbackArguments( - internal::Isolate* isolate, internal::Object data, - internal::HeapObject callee, internal::Object holder, + internal::Isolate* isolate, internal::Object data, internal::Object holder, internal::HeapObject new_target, internal::Address* argv, int argc) : Super(isolate), argv_(argv), argc_(argc) { slot_at(T::kDataIndex).store(data); diff --git a/deps/v8/src/api/api-arguments.h b/deps/v8/src/api/api-arguments.h index 98354757be6500..39958964fd4233 100644 --- a/deps/v8/src/api/api-arguments.h +++ b/deps/v8/src/api/api-arguments.h @@ -6,8 +6,6 @@ #define V8_API_API_ARGUMENTS_H_ #include "include/v8-template.h" -#include "src/api/api.h" -#include "src/debug/debug.h" #include "src/execution/isolate.h" #include "src/objects/slots.h" #include "src/objects/visitors.h" @@ -58,7 +56,15 @@ class CustomArguments : public CustomArgumentsBase { // Note: Calling args.Call() sets the return value on args. For multiple // Call()'s, a new args should be used every time. -class PropertyCallbackArguments +// This class also serves as a side effects detection scope (JavaScript code +// execution). It is used for ensuring correctness of the interceptor callback +// implementations. The idea is that the interceptor callback that does not +// intercept an operation must not produce side effects. If the callback +// signals that it has handled the operation (by either returning a respective +// result or by throwing an exception) then the AcceptSideEffects() method +// must be called to "accept" the side effects that have happened during the +// lifetime of the PropertyCallbackArguments object. +class PropertyCallbackArguments final : public CustomArguments > { public: using T = PropertyCallbackInfo; @@ -74,6 +80,7 @@ class PropertyCallbackArguments PropertyCallbackArguments(Isolate* isolate, Object data, Object self, JSObject holder, Maybe should_throw); + inline ~PropertyCallbackArguments(); // Don't copy PropertyCallbackArguments, because they would both have the // same prev_ pointer. @@ -128,6 +135,14 @@ class PropertyCallbackArguments inline Handle CallIndexedEnumerator( Handle interceptor); + // Accept potential JavaScript side effects that might occurr during life + // time of this object. + inline void AcceptSideEffects() { +#ifdef DEBUG + javascript_execution_counter_ = 0; +#endif // DEBUG + } + private: /* * The following Call functions wrap the calling of all callbacks to handle @@ -148,6 +163,13 @@ class PropertyCallbackArguments inline JSObject holder(); inline Object receiver(); + +#ifdef DEBUG + // This stores current value of Isolate::javascript_execution_counter(). + // It's used for detecting whether JavaScript code was executed between + // PropertyCallbackArguments's constructior and destructor. + uint32_t javascript_execution_counter_; +#endif // DEBUG }; class FunctionCallbackArguments @@ -163,9 +185,8 @@ class FunctionCallbackArguments static const int kIsolateIndex = T::kIsolateIndex; static const int kNewTargetIndex = T::kNewTargetIndex; - FunctionCallbackArguments(Isolate* isolate, Object data, HeapObject callee, - Object holder, HeapObject new_target, Address* argv, - int argc); + FunctionCallbackArguments(Isolate* isolate, Object data, Object holder, + HeapObject new_target, Address* argv, int argc); /* * The following Call function wraps the calling of all callbacks to handle diff --git a/deps/v8/src/api/api-inl.h b/deps/v8/src/api/api-inl.h index 975976ae096ae2..ac675a87fc82ba 100644 --- a/deps/v8/src/api/api-inl.h +++ b/deps/v8/src/api/api-inl.h @@ -9,18 +9,16 @@ #include "src/api/api.h" #include "src/execution/interrupts-scope.h" #include "src/execution/microtask-queue.h" -#include "src/execution/protectors.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" namespace v8 { template inline T ToCData(v8::internal::Object obj) { - STATIC_ASSERT(sizeof(T) == sizeof(v8::internal::Address)); + static_assert(sizeof(T) == sizeof(v8::internal::Address)); if (obj == v8::internal::Smi::zero()) return nullptr; return reinterpret_cast( v8::internal::Foreign::cast(obj).foreign_address()); @@ -35,7 +33,7 @@ inline v8::internal::Address ToCData(v8::internal::Object obj) { template inline v8::internal::Handle FromCData( v8::internal::Isolate* isolate, T obj) { - STATIC_ASSERT(sizeof(T) == sizeof(v8::internal::Address)); + static_assert(sizeof(T) == sizeof(v8::internal::Address)); if (obj == nullptr) return handle(v8::internal::Smi::zero(), isolate); return isolate->factory()->NewForeign( reinterpret_cast(obj)); @@ -96,7 +94,6 @@ TYPED_ARRAYS(MAKE_TO_LOCAL_TYPED_ARRAY) MAKE_TO_LOCAL(ToLocal, FunctionTemplateInfo, FunctionTemplate) MAKE_TO_LOCAL(ToLocal, ObjectTemplateInfo, ObjectTemplate) MAKE_TO_LOCAL(SignatureToLocal, FunctionTemplateInfo, Signature) -MAKE_TO_LOCAL(AccessorSignatureToLocal, FunctionTemplateInfo, AccessorSignature) MAKE_TO_LOCAL(MessageToLocal, Object, Message) MAKE_TO_LOCAL(PromiseToLocal, JSObject, Promise) MAKE_TO_LOCAL(StackTraceToLocal, FixedArray, StackTrace) @@ -185,8 +182,8 @@ class V8_NODISCARD CallDepthScope { !microtask_queue->DebugMicrotasksScopeDepthIsZero()); } } -#endif DCHECK(CheckKeptObjectsClearedAfterMicrotaskCheckpoint(microtask_queue)); +#endif isolate_->set_next_v8_call_is_safe_for_termination(safe_for_termination_); } @@ -204,6 +201,7 @@ class V8_NODISCARD CallDepthScope { } private: +#ifdef DEBUG bool CheckKeptObjectsClearedAfterMicrotaskCheckpoint( i::MicrotaskQueue* microtask_queue) { bool did_perform_microtask_checkpoint = @@ -213,6 +211,7 @@ class V8_NODISCARD CallDepthScope { return !did_perform_microtask_checkpoint || isolate_->heap()->weak_refs_keep_during_job().IsUndefined(isolate_); } +#endif i::Isolate* const isolate_; Local context_; @@ -233,14 +232,6 @@ class V8_NODISCARD InternalEscapableScope : public EscapableHandleScope { : EscapableHandleScope(reinterpret_cast(isolate)) {} }; -inline bool IsExecutionTerminatingCheck(i::Isolate* isolate) { - if (isolate->has_scheduled_exception()) { - return isolate->scheduled_exception() == - i::ReadOnlyRoots(isolate).termination_exception(); - } - return false; -} - template void CopySmiElementsToTypedBuffer(T* dst, uint32_t length, i::FixedArray elements) { diff --git a/deps/v8/src/api/api-macros-undef.h b/deps/v8/src/api/api-macros-undef.h index d3eea83a5f0c21..ab1116d9cee7b7 100644 --- a/deps/v8/src/api/api-macros-undef.h +++ b/deps/v8/src/api/api-macros-undef.h @@ -5,8 +5,8 @@ // PRESUBMIT_INTENTIONALLY_MISSING_INCLUDE_GUARD #undef LOG_API -#undef ENTER_V8_DO_NOT_USE -#undef ENTER_V8_HELPER_DO_NOT_USE +#undef ENTER_V8_BASIC +#undef ENTER_V8_HELPER_INTERNAL #undef PREPARE_FOR_DEBUG_INTERFACE_EXECUTION_WITH_ISOLATE #undef PREPARE_FOR_EXECUTION_WITH_CONTEXT #undef PREPARE_FOR_EXECUTION diff --git a/deps/v8/src/api/api-macros.h b/deps/v8/src/api/api-macros.h index 9fbe9a973903ae..149dd0555a69be 100644 --- a/deps/v8/src/api/api-macros.h +++ b/deps/v8/src/api/api-macros.h @@ -35,98 +35,117 @@ * TODO(verwaest): Remove calls form API methods to DO_NOT_USE macros. */ -#define API_RCS_SCOPE(isolate, class_name, function_name) \ - RCS_SCOPE(isolate, \ +#define API_RCS_SCOPE(i_isolate, class_name, function_name) \ + RCS_SCOPE(i_isolate, \ i::RuntimeCallCounterId::kAPI_##class_name##_##function_name); -#define ENTER_V8_DO_NOT_USE(isolate) i::VMState __state__((isolate)) - -#define ENTER_V8_HELPER_DO_NOT_USE(isolate, context, class_name, \ - function_name, bailout_value, \ - HandleScopeClass, do_callback) \ - if (IsExecutionTerminatingCheck(isolate)) { \ - return bailout_value; \ - } \ - HandleScopeClass handle_scope(isolate); \ - CallDepthScope call_depth_scope(isolate, context); \ - API_RCS_SCOPE(isolate, class_name, function_name); \ - i::VMState __state__((isolate)); \ +#define ENTER_V8_BASIC(i_isolate) \ + /* Embedders should never enter V8 after terminating it */ \ + DCHECK(!i_isolate->is_execution_terminating()); \ + i::VMState __state__((i_isolate)) + +#define ENTER_V8_HELPER_INTERNAL(i_isolate, context, class_name, \ + function_name, bailout_value, \ + HandleScopeClass, do_callback) \ + if (i_isolate->is_execution_terminating()) { \ + return bailout_value; \ + } \ + HandleScopeClass handle_scope(i_isolate); \ + CallDepthScope call_depth_scope(i_isolate, context); \ + API_RCS_SCOPE(i_isolate, class_name, function_name); \ + i::VMState __state__((i_isolate)); \ bool has_pending_exception = false -#define PREPARE_FOR_DEBUG_INTERFACE_EXECUTION_WITH_ISOLATE(isolate, T) \ - if (IsExecutionTerminatingCheck(isolate)) { \ - return MaybeLocal(); \ - } \ - InternalEscapableScope handle_scope(isolate); \ - CallDepthScope call_depth_scope(isolate, v8::Local()); \ - i::VMState __state__((isolate)); \ +#define PREPARE_FOR_DEBUG_INTERFACE_EXECUTION_WITH_ISOLATE(i_isolate, T) \ + if (i_isolate->is_execution_terminating()) { \ + return MaybeLocal(); \ + } \ + InternalEscapableScope handle_scope(i_isolate); \ + CallDepthScope call_depth_scope(i_isolate, v8::Local()); \ + i::VMState __state__((i_isolate)); \ bool has_pending_exception = false #define PREPARE_FOR_EXECUTION_WITH_CONTEXT(context, class_name, function_name, \ bailout_value, HandleScopeClass, \ do_callback) \ - auto isolate = context.IsEmpty() \ - ? i::Isolate::Current() \ - : reinterpret_cast(context->GetIsolate()); \ - ENTER_V8_HELPER_DO_NOT_USE(isolate, context, class_name, function_name, \ - bailout_value, HandleScopeClass, do_callback); + auto i_isolate = context.IsEmpty() \ + ? i::Isolate::Current() \ + : reinterpret_cast(context->GetIsolate()); \ + ENTER_V8_HELPER_INTERNAL(i_isolate, context, class_name, function_name, \ + bailout_value, HandleScopeClass, do_callback); #define PREPARE_FOR_EXECUTION(context, class_name, function_name, T) \ PREPARE_FOR_EXECUTION_WITH_CONTEXT(context, class_name, function_name, \ MaybeLocal(), InternalEscapableScope, \ false) -#define ENTER_V8(isolate, context, class_name, function_name, bailout_value, \ - HandleScopeClass) \ - ENTER_V8_HELPER_DO_NOT_USE(isolate, context, class_name, function_name, \ - bailout_value, HandleScopeClass, true) +#define ENTER_V8(i_isolate, context, class_name, function_name, bailout_value, \ + HandleScopeClass) \ + ENTER_V8_HELPER_INTERNAL(i_isolate, context, class_name, function_name, \ + bailout_value, HandleScopeClass, true) #ifdef DEBUG -#define ENTER_V8_NO_SCRIPT(isolate, context, class_name, function_name, \ +#define ENTER_V8_NO_SCRIPT(i_isolate, context, class_name, function_name, \ bailout_value, HandleScopeClass) \ - ENTER_V8_HELPER_DO_NOT_USE(isolate, context, class_name, function_name, \ - bailout_value, HandleScopeClass, false); \ - i::DisallowJavascriptExecutionDebugOnly __no_script__((isolate)) + ENTER_V8_HELPER_INTERNAL(i_isolate, context, class_name, function_name, \ + bailout_value, HandleScopeClass, false); \ + i::DisallowJavascriptExecutionDebugOnly __no_script__((i_isolate)) + +#define DCHECK_NO_SCRIPT_NO_EXCEPTION_MAYBE_TEARDOWN(i_isolate) \ + i::DisallowJavascriptExecutionDebugOnly __no_script__((i_isolate)); \ + i::DisallowExceptions __no_exceptions__((i_isolate)) // Lightweight version for APIs that don't require an active context. -#define ASSERT_NO_SCRIPT_NO_EXCEPTION(isolate) \ - i::DisallowJavascriptExecutionDebugOnly __no_script__((isolate)); \ - i::DisallowExceptions __no_exceptions__((isolate)) - -#define ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate) \ - i::VMState __state__((isolate)); \ - ASSERT_NO_SCRIPT_NO_EXCEPTION(isolate) - -#define ENTER_V8_FOR_NEW_CONTEXT(isolate) \ - i::VMState __state__((isolate)); \ - i::DisallowExceptions __no_exceptions__((isolate)) -#else -#define ENTER_V8_NO_SCRIPT(isolate, context, class_name, function_name, \ +#define DCHECK_NO_SCRIPT_NO_EXCEPTION(i_isolate) \ + /* Embedders should never enter V8 after terminating it */ \ + DCHECK(!i_isolate->is_execution_terminating()); \ + DCHECK_NO_SCRIPT_NO_EXCEPTION_MAYBE_TEARDOWN(i_isolate) + +#define ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate) \ + i::VMState __state__((i_isolate)); \ + DCHECK_NO_SCRIPT_NO_EXCEPTION(i_isolate) + +// Used instead of ENTER_V8_NO_SCRIPT_NO_EXCEPTION where the V8 Api is entered +// during termination sequences. +#define ENTER_V8_MAYBE_TEARDOWN(i_isolate) \ + i::VMState __state__((i_isolate)); \ + DCHECK_NO_SCRIPT_NO_EXCEPTION_MAYBE_TEARDOWN(i_isolate) + +#define ENTER_V8_FOR_NEW_CONTEXT(i_isolate) \ + DCHECK(!(i_isolate)->is_execution_terminating()); \ + i::VMState __state__((i_isolate)); \ + i::DisallowExceptions __no_exceptions__((i_isolate)) +#else // DEBUG +#define ENTER_V8_NO_SCRIPT(i_isolate, context, class_name, function_name, \ bailout_value, HandleScopeClass) \ - ENTER_V8_HELPER_DO_NOT_USE(isolate, context, class_name, function_name, \ - bailout_value, HandleScopeClass, false) + ENTER_V8_HELPER_INTERNAL(i_isolate, context, class_name, function_name, \ + bailout_value, HandleScopeClass, false) + +#define DCHECK_NO_SCRIPT_NO_EXCEPTION(i_isolate) +#define DCHECK_NO_SCRIPT_NO_EXCEPTION_MAYBE_TEARDOWN(i_isolate) -#define ASSERT_NO_SCRIPT_NO_EXCEPTION(isolate) +#define ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate) \ + i::VMState __state__((i_isolate)); -#define ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate) \ - i::VMState __state__((isolate)); +#define ENTER_V8_MAYBE_TEARDOWN(i_isolate) \ + i::VMState __state__((i_isolate)); -#define ENTER_V8_FOR_NEW_CONTEXT(isolate) \ - i::VMState __state__((isolate)); +#define ENTER_V8_FOR_NEW_CONTEXT(i_isolate) \ + i::VMState __state__((i_isolate)); #endif // DEBUG -#define EXCEPTION_BAILOUT_CHECK_SCOPED_DO_NOT_USE(isolate, value) \ - do { \ - if (has_pending_exception) { \ - call_depth_scope.Escape(); \ - return value; \ - } \ +#define EXCEPTION_BAILOUT_CHECK_SCOPED_DO_NOT_USE(i_isolate, value) \ + do { \ + if (has_pending_exception) { \ + call_depth_scope.Escape(); \ + return value; \ + } \ } while (false) #define RETURN_ON_FAILED_EXECUTION(T) \ - EXCEPTION_BAILOUT_CHECK_SCOPED_DO_NOT_USE(isolate, MaybeLocal()) + EXCEPTION_BAILOUT_CHECK_SCOPED_DO_NOT_USE(i_isolate, MaybeLocal()) #define RETURN_ON_FAILED_EXECUTION_PRIMITIVE(T) \ - EXCEPTION_BAILOUT_CHECK_SCOPED_DO_NOT_USE(isolate, Nothing()) + EXCEPTION_BAILOUT_CHECK_SCOPED_DO_NOT_USE(i_isolate, Nothing()) #define RETURN_ESCAPED(value) return handle_scope.Escape(value); diff --git a/deps/v8/src/api/api-natives.cc b/deps/v8/src/api/api-natives.cc index 29b94d8dea1d71..562b7849b4061d 100644 --- a/deps/v8/src/api/api-natives.cc +++ b/deps/v8/src/api/api-natives.cc @@ -4,15 +4,12 @@ #include "src/api/api-natives.h" -#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" -#include "src/objects/property-cell.h" #include "src/objects/templates.h" namespace v8 { diff --git a/deps/v8/src/api/api-natives.h b/deps/v8/src/api/api-natives.h index 38a8a7b9171e7c..034aad830c4186 100644 --- a/deps/v8/src/api/api-natives.h +++ b/deps/v8/src/api/api-natives.h @@ -6,7 +6,6 @@ #define V8_API_API_NATIVES_H_ #include "include/v8-template.h" -#include "src/base/macros.h" #include "src/handles/handles.h" #include "src/handles/maybe-handles.h" #include "src/objects/objects.h" diff --git a/deps/v8/src/api/api.cc b/deps/v8/src/api/api.cc index 580ba47f1a727d..608da3369fabaf 100644 --- a/deps/v8/src/api/api.cc +++ b/deps/v8/src/api/api.cc @@ -30,6 +30,7 @@ #include "src/api/api-natives.h" #include "src/base/functional.h" #include "src/base/logging.h" +#include "src/base/platform/memory.h" #include "src/base/platform/platform.h" #include "src/base/platform/time.h" #include "src/base/safe_conversions.h" @@ -61,6 +62,7 @@ #include "src/execution/vm-state-inl.h" #include "src/handles/global-handles.h" #include "src/handles/persistent-handles.h" +#include "src/handles/shared-object-conveyor-handles.h" #include "src/heap/embedder-tracing.h" #include "src/heap/heap-inl.h" #include "src/heap/heap-write-barrier.h" @@ -140,9 +142,13 @@ #if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD #include + +#if V8_ENABLE_WEBASSEMBLY #include "include/v8-wasm-trap-handler-posix.h" #include "src/trap-handler/handler-inside-posix.h" -#endif +#endif // V8_ENABLE_WEBASSEMBLY + +#endif // V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD #if V8_OS_WIN #include @@ -158,31 +164,30 @@ #endif // V8_OS_WIN64 #endif // V8_OS_WIN +#if defined(V8_OS_WIN) && defined(V8_ENABLE_ETW_STACK_WALKING) +#include "src/diagnostics/etw-jit-win.h" +#endif + // Has to be the last include (doesn't have include guards): #include "src/api/api-macros.h" -#define TRACE_BS(...) \ - do { \ - if (i::FLAG_trace_backing_store) PrintF(__VA_ARGS__); \ - } while (false) - namespace v8 { static OOMErrorCallback g_oom_error_callback = nullptr; -static ScriptOrigin GetScriptOriginForScript(i::Isolate* isolate, +static ScriptOrigin GetScriptOriginForScript(i::Isolate* i_isolate, i::Handle script) { - i::Handle scriptName(script->GetNameOrSourceURL(), isolate); - i::Handle source_map_url(script->source_mapping_url(), isolate); + i::Handle scriptName(script->GetNameOrSourceURL(), i_isolate); + i::Handle source_map_url(script->source_mapping_url(), i_isolate); i::Handle host_defined_options(script->host_defined_options(), - isolate); + i_isolate); ScriptOriginOptions options(script->origin_options()); bool is_wasm = false; #if V8_ENABLE_WEBASSEMBLY is_wasm = script->type() == i::Script::TYPE_WASM; #endif // V8_ENABLE_WEBASSEMBLY v8::ScriptOrigin origin( - reinterpret_cast(isolate), Utils::ToLocal(scriptName), + reinterpret_cast(i_isolate), Utils::ToLocal(scriptName), script->line_offset(), script->column_offset(), options.IsSharedCrossOrigin(), script->id(), Utils::ToLocal(source_map_url), options.IsOpaque(), is_wasm, @@ -190,36 +195,21 @@ static ScriptOrigin GetScriptOriginForScript(i::Isolate* isolate, return origin; } -Local ScriptOrigin::HostDefinedOptions() const { - // TODO(cbruni, chromium:1244145): remove once migrated to the context. - Utils::ApiCheck(!host_defined_options_->IsFixedArray(), - "ScriptOrigin::HostDefinedOptions", - "HostDefinedOptions is not a PrimitiveArray, please use " - "ScriptOrigin::GetHostDefinedOptions()"); - i::Handle options = - Utils::OpenHandle(*host_defined_options_.As()); - return Utils::PrimitiveArrayToLocal(options); -} - // --- E x c e p t i o n B e h a v i o r --- -void i::FatalProcessOutOfMemory(i::Isolate* isolate, const char* location) { - i::V8::FatalProcessOutOfMemory(isolate, location, false); -} - // When V8 cannot allocate memory FatalProcessOutOfMemory is called. The default // OOM error handler is called and execution is stopped. -void i::V8::FatalProcessOutOfMemory(i::Isolate* isolate, const char* location, - bool is_heap_oom) { +void i::V8::FatalProcessOutOfMemory(i::Isolate* i_isolate, const char* location, + const OOMDetails& details) { char last_few_messages[Heap::kTraceRingBufferSize + 1]; char js_stacktrace[Heap::kStacktraceBufferSize + 1]; i::HeapStats heap_stats; - if (isolate == nullptr) { - isolate = Isolate::TryGetCurrent(); + if (i_isolate == nullptr) { + i_isolate = Isolate::TryGetCurrent(); } - if (isolate == nullptr) { + if (i_isolate == nullptr) { // If the Isolate is not available for the current thread we cannot retrieve // memory information from the Isolate. Write easy-to-recognize values on // the stack. @@ -228,7 +218,7 @@ void i::V8::FatalProcessOutOfMemory(i::Isolate* isolate, const char* location, memset(&heap_stats, 0xBADC0DE, sizeof(heap_stats)); // Give the embedder a chance to handle the condition. If it doesn't, // just crash. - if (g_oom_error_callback) g_oom_error_callback(location, is_heap_oom); + if (g_oom_error_callback) g_oom_error_callback(location, details); FATAL("Fatal process out of memory: %s", location); UNREACHABLE(); } @@ -290,10 +280,10 @@ void i::V8::FatalProcessOutOfMemory(i::Isolate* isolate, const char* location, heap_stats.js_stacktrace = js_stacktrace; intptr_t end_marker; heap_stats.end_marker = &end_marker; - if (isolate->heap()->HasBeenSetUp()) { + if (i_isolate->heap()->HasBeenSetUp()) { // BUG(1718): Don't use the take_snapshot since we don't support // HeapObjectIterator here without doing a special GC. - isolate->heap()->RecordStats(&heap_stats, false); + i_isolate->heap()->RecordStats(&heap_stats, false); if (!FLAG_correctness_fuzzer_suppressions) { char* first_newline = strchr(last_few_messages, '\n'); if (first_newline == nullptr || first_newline[1] == '\0') @@ -302,17 +292,24 @@ void i::V8::FatalProcessOutOfMemory(i::Isolate* isolate, const char* location, base::OS::PrintError("\n<--- JS stacktrace --->\n%s\n", js_stacktrace); } } - Utils::ReportOOMFailure(isolate, location, is_heap_oom); - if (g_oom_error_callback) g_oom_error_callback(location, is_heap_oom); + Utils::ReportOOMFailure(i_isolate, location, details); + if (g_oom_error_callback) g_oom_error_callback(location, details); // If the fatal error handler returns, we stop execution. FATAL("API fatal error handler returned after process out of memory"); } +void i::V8::FatalProcessOutOfMemory(i::Isolate* i_isolate, const char* location, + const char* detail) { + OOMDetails details; + details.detail = detail; + FatalProcessOutOfMemory(i_isolate, location, details); +} + void Utils::ReportApiFailure(const char* location, const char* message) { - i::Isolate* isolate = i::Isolate::TryGetCurrent(); + i::Isolate* i_isolate = i::Isolate::TryGetCurrent(); FatalErrorCallback callback = nullptr; - if (isolate != nullptr) { - callback = isolate->exception_behavior(); + if (i_isolate != nullptr) { + callback = i_isolate->exception_behavior(); } if (callback == nullptr) { base::OS::PrintError("\n#\n# Fatal error in %s\n# %s\n#\n\n", location, @@ -321,34 +318,36 @@ void Utils::ReportApiFailure(const char* location, const char* message) { } else { callback(location, message); } - isolate->SignalFatalError(); + i_isolate->SignalFatalError(); } -void Utils::ReportOOMFailure(i::Isolate* isolate, const char* location, - bool is_heap_oom) { - OOMErrorCallback oom_callback = isolate->oom_behavior(); - if (oom_callback == nullptr) { +void Utils::ReportOOMFailure(i::Isolate* i_isolate, const char* location, + const OOMDetails& details) { + if (auto oom_callback = i_isolate->oom_behavior()) { + oom_callback(location, details); + } else { // TODO(wfh): Remove this fallback once Blink is setting OOM handler. See // crbug.com/614440. - FatalErrorCallback fatal_callback = isolate->exception_behavior(); + FatalErrorCallback fatal_callback = i_isolate->exception_behavior(); if (fatal_callback == nullptr) { base::OS::PrintError("\n#\n# Fatal %s OOM in %s\n#\n\n", - is_heap_oom ? "javascript" : "process", location); + details.is_heap_oom ? "javascript" : "process", + location); #ifdef V8_FUZZILLI - exit(0); + // Ignore OOM crashes for fuzzing but exit with an error such that + // samples are discarded by Fuzzilli. + exit(1); #else base::OS::Abort(); #endif // V8_FUZZILLI } else { fatal_callback(location, - is_heap_oom + details.is_heap_oom ? "Allocation failed - JavaScript heap out of memory" : "Allocation failed - process out of memory"); } - } else { - oom_callback(location, is_heap_oom); } - isolate->SignalFatalError(); + i_isolate->SignalFatalError(); } void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { @@ -357,7 +356,7 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { namespace { -#ifdef V8_SANDBOXED_POINTERS +#ifdef V8_ENABLE_SANDBOX // ArrayBufferAllocator to use when sandboxed pointers are used in which case // all ArrayBuffer backing stores need to be allocated inside the sandbox. // Note, the current implementation is extremely inefficient as it uses the @@ -390,38 +389,16 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { public: - void* Allocate(size_t length) override { -#if V8_OS_AIX && _LINUX_SOURCE_COMPAT - // Work around for GCC bug on AIX - // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79839 - void* data = __linux_calloc(length, 1); -#else - void* data = base::Calloc(length, 1); -#endif - return data; - } + void* Allocate(size_t length) override { return base::Calloc(length, 1); } void* AllocateUninitialized(size_t length) override { -#if V8_OS_AIX && _LINUX_SOURCE_COMPAT - // Work around for GCC bug on AIX - // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79839 - void* data = __linux_malloc(length); -#else - void* data = base::Malloc(length); -#endif - return data; + return base::Malloc(length); } void Free(void* data, size_t) override { base::Free(data); } void* Reallocate(void* data, size_t old_length, size_t new_length) override { -#if V8_OS_AIX && _LINUX_SOURCE_COMPAT - // Work around for GCC bug on AIX - // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79839 - void* new_data = __linux_realloc(data, new_length); -#else void* new_data = base::Realloc(data, new_length); -#endif if (new_length > old_length) { memset(reinterpret_cast(new_data) + old_length, 0, new_length - old_length); @@ -429,14 +406,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { return new_data; } }; -#endif // V8_SANDBOXED_POINTERS +#endif // V8_ENABLE_SANDBOX struct SnapshotCreatorData { - explicit SnapshotCreatorData(Isolate* isolate) - : isolate_(isolate), - default_context_(), - contexts_(isolate), - created_(false) {} + explicit SnapshotCreatorData(Isolate* v8_isolate) : isolate_(v8_isolate) {} static SnapshotCreatorData* cast(void* data) { return reinterpret_cast(data); @@ -446,34 +419,34 @@ struct SnapshotCreatorData { Isolate* isolate_; Persistent default_context_; SerializeInternalFieldsCallback default_embedder_fields_serializer_; - PersistentValueVector contexts_; + std::vector> contexts_; std::vector embedder_fields_serializers_; - bool created_; + bool created_ = false; }; } // namespace -SnapshotCreator::SnapshotCreator(Isolate* isolate, +SnapshotCreator::SnapshotCreator(Isolate* v8_isolate, const intptr_t* external_references, StartupData* existing_snapshot) { - SnapshotCreatorData* data = new SnapshotCreatorData(isolate); - i::Isolate* internal_isolate = reinterpret_cast(isolate); - internal_isolate->set_array_buffer_allocator(&data->allocator_); - internal_isolate->set_api_external_references(external_references); - internal_isolate->enable_serializer(); - isolate->Enter(); + SnapshotCreatorData* data = new SnapshotCreatorData(v8_isolate); + i::Isolate* i_isolate = reinterpret_cast(v8_isolate); + i_isolate->set_array_buffer_allocator(&data->allocator_); + i_isolate->set_api_external_references(external_references); + i_isolate->enable_serializer(); + v8_isolate->Enter(); const StartupData* blob = existing_snapshot ? existing_snapshot : i::Snapshot::DefaultSnapshotBlob(); if (blob && blob->raw_size > 0) { - internal_isolate->set_snapshot_blob(blob); - i::Snapshot::Initialize(internal_isolate); + i_isolate->set_snapshot_blob(blob); + i::Snapshot::Initialize(i_isolate); } else { - internal_isolate->InitWithoutSnapshot(); + i_isolate->InitWithoutSnapshot(); } data_ = data; // Disable batch compilation during snapshot creation. - internal_isolate->baseline_batch_compiler()->set_enabled(false); + i_isolate->baseline_batch_compiler()->set_enabled(false); } SnapshotCreator::SnapshotCreator(const intptr_t* external_references, @@ -483,9 +456,9 @@ SnapshotCreator::SnapshotCreator(const intptr_t* external_references, SnapshotCreator::~SnapshotCreator() { SnapshotCreatorData* data = SnapshotCreatorData::cast(data_); - Isolate* isolate = data->isolate_; - isolate->Exit(); - isolate->Dispose(); + Isolate* v8_isolate = data->isolate_; + v8_isolate->Exit(); + v8_isolate->Dispose(); delete data; } @@ -499,9 +472,9 @@ void SnapshotCreator::SetDefaultContext( SnapshotCreatorData* data = SnapshotCreatorData::cast(data_); DCHECK(!data->created_); DCHECK(data->default_context_.IsEmpty()); - Isolate* isolate = data->isolate_; - CHECK_EQ(isolate, context->GetIsolate()); - data->default_context_.Reset(isolate, context); + Isolate* v8_isolate = data->isolate_; + CHECK_EQ(v8_isolate, context->GetIsolate()); + data->default_context_.Reset(v8_isolate, context); data->default_embedder_fields_serializer_ = callback; } @@ -510,10 +483,10 @@ size_t SnapshotCreator::AddContext(Local context, DCHECK(!context.IsEmpty()); SnapshotCreatorData* data = SnapshotCreatorData::cast(data_); DCHECK(!data->created_); - Isolate* isolate = data->isolate_; - CHECK_EQ(isolate, context->GetIsolate()); - size_t index = data->contexts_.Size(); - data->contexts_.Append(context); + Isolate* v8_isolate = data->isolate_; + CHECK_EQ(v8_isolate, context->GetIsolate()); + size_t index = data->contexts_.size(); + data->contexts_.emplace_back(v8_isolate, context); data->embedder_fields_serializers_.push_back(callback); return index; } @@ -522,19 +495,19 @@ size_t SnapshotCreator::AddData(i::Address object) { DCHECK_NE(object, i::kNullAddress); SnapshotCreatorData* data = SnapshotCreatorData::cast(data_); DCHECK(!data->created_); - i::Isolate* isolate = reinterpret_cast(data->isolate_); - i::HandleScope scope(isolate); - i::Handle obj(i::Object(object), isolate); + i::Isolate* i_isolate = reinterpret_cast(data->isolate_); + i::HandleScope scope(i_isolate); + i::Handle obj(i::Object(object), i_isolate); i::Handle list; - if (!isolate->heap()->serialized_objects().IsArrayList()) { - list = i::ArrayList::New(isolate, 1); + if (!i_isolate->heap()->serialized_objects().IsArrayList()) { + list = i::ArrayList::New(i_isolate, 1); } else { list = i::Handle( - i::ArrayList::cast(isolate->heap()->serialized_objects()), isolate); + i::ArrayList::cast(i_isolate->heap()->serialized_objects()), i_isolate); } size_t index = static_cast(list->Length()); - list = i::ArrayList::Add(isolate, list, obj); - isolate->heap()->SetSerializedObjects(*list); + list = i::ArrayList::Add(i_isolate, list, obj); + i_isolate->heap()->SetSerializedObjects(*list); return index; } @@ -542,18 +515,18 @@ size_t SnapshotCreator::AddData(Local context, i::Address object) { DCHECK_NE(object, i::kNullAddress); DCHECK(!SnapshotCreatorData::cast(data_)->created_); i::Handle ctx = Utils::OpenHandle(*context); - i::Isolate* isolate = ctx->GetIsolate(); - i::HandleScope scope(isolate); - i::Handle obj(i::Object(object), isolate); + i::Isolate* i_isolate = ctx->GetIsolate(); + i::HandleScope scope(i_isolate); + i::Handle obj(i::Object(object), i_isolate); i::Handle list; if (!ctx->serialized_objects().IsArrayList()) { - list = i::ArrayList::New(isolate, 1); + list = i::ArrayList::New(i_isolate, 1); } else { list = i::Handle( - i::ArrayList::cast(ctx->serialized_objects()), isolate); + i::ArrayList::cast(ctx->serialized_objects()), i_isolate); } size_t index = static_cast(list->Length()); - list = i::ArrayList::Add(isolate, list, obj); + list = i::ArrayList::Add(i_isolate, list, obj); ctx->set_serialized_objects(*list); return index; } @@ -561,26 +534,27 @@ size_t SnapshotCreator::AddData(Local context, i::Address object) { namespace { void ConvertSerializedObjectsToFixedArray(Local context) { i::Handle ctx = Utils::OpenHandle(*context); - i::Isolate* isolate = ctx->GetIsolate(); + i::Isolate* i_isolate = ctx->GetIsolate(); if (!ctx->serialized_objects().IsArrayList()) { - ctx->set_serialized_objects(i::ReadOnlyRoots(isolate).empty_fixed_array()); + ctx->set_serialized_objects( + i::ReadOnlyRoots(i_isolate).empty_fixed_array()); } else { i::Handle list(i::ArrayList::cast(ctx->serialized_objects()), - isolate); - i::Handle elements = i::ArrayList::Elements(isolate, list); + i_isolate); + i::Handle elements = i::ArrayList::Elements(i_isolate, list); ctx->set_serialized_objects(*elements); } } -void ConvertSerializedObjectsToFixedArray(i::Isolate* isolate) { - if (!isolate->heap()->serialized_objects().IsArrayList()) { - isolate->heap()->SetSerializedObjects( - i::ReadOnlyRoots(isolate).empty_fixed_array()); +void ConvertSerializedObjectsToFixedArray(i::Isolate* i_isolate) { + if (!i_isolate->heap()->serialized_objects().IsArrayList()) { + i_isolate->heap()->SetSerializedObjects( + i::ReadOnlyRoots(i_isolate).empty_fixed_array()); } else { i::Handle list( - i::ArrayList::cast(isolate->heap()->serialized_objects()), isolate); - i::Handle elements = i::ArrayList::Elements(isolate, list); - isolate->heap()->SetSerializedObjects(*elements); + i::ArrayList::cast(i_isolate->heap()->serialized_objects()), i_isolate); + i::Handle elements = i::ArrayList::Elements(i_isolate, list); + i_isolate->heap()->SetSerializedObjects(*elements); } } } // anonymous namespace @@ -588,61 +562,61 @@ void ConvertSerializedObjectsToFixedArray(i::Isolate* isolate) { StartupData SnapshotCreator::CreateBlob( SnapshotCreator::FunctionCodeHandling function_code_handling) { SnapshotCreatorData* data = SnapshotCreatorData::cast(data_); - i::Isolate* isolate = reinterpret_cast(data->isolate_); + Isolate* isolate = data->isolate_; + i::Isolate* i_isolate = reinterpret_cast(isolate); Utils::ApiCheck(!data->created_, "v8::SnapshotCreator::CreateBlob", "CreateBlob() cannot be called more than once on the same " - "SnapshotCreator."); + "SnapshotCreator"); Utils::ApiCheck( !data->default_context_.IsEmpty(), "v8::SnapshotCreator::CreateBlob", - "CreateBlob() cannot be called before the default context is set."); - - const int num_additional_contexts = static_cast(data->contexts_.Size()); + "CreateBlob() cannot be called before the default context is set"); + const int num_additional_contexts = static_cast(data->contexts_.size()); const int num_contexts = num_additional_contexts + 1; // The default context. // Create and store lists of embedder-provided data needed during // serialization. { - i::HandleScope scope(isolate); + i::HandleScope scope(i_isolate); // Convert list of context-independent data to FixedArray. - ConvertSerializedObjectsToFixedArray(isolate); + ConvertSerializedObjectsToFixedArray(i_isolate); // Convert lists of context-dependent data to FixedArray. ConvertSerializedObjectsToFixedArray( data->default_context_.Get(data->isolate_)); for (int i = 0; i < num_additional_contexts; i++) { - ConvertSerializedObjectsToFixedArray(data->contexts_.Get(i)); + ConvertSerializedObjectsToFixedArray(data->contexts_[i].Get(isolate)); } // We need to store the global proxy size upfront in case we need the // bootstrapper to create a global proxy before we deserialize the context. i::Handle global_proxy_sizes = - isolate->factory()->NewFixedArray(num_additional_contexts, - i::AllocationType::kOld); + i_isolate->factory()->NewFixedArray(num_additional_contexts, + i::AllocationType::kOld); for (int i = 0; i < num_additional_contexts; i++) { i::Handle context = - v8::Utils::OpenHandle(*data->contexts_.Get(i)); + v8::Utils::OpenHandle(*data->contexts_[i].Get(isolate)); global_proxy_sizes->set(i, i::Smi::FromInt(context->global_proxy().Size())); } - isolate->heap()->SetSerializedGlobalProxySizes(*global_proxy_sizes); + i_isolate->heap()->SetSerializedGlobalProxySizes(*global_proxy_sizes); } // We might rehash strings and re-sort descriptors. Clear the lookup cache. - isolate->descriptor_lookup_cache()->Clear(); + i_isolate->descriptor_lookup_cache()->Clear(); // If we don't do this then we end up with a stray root pointing at the // context even after we have disposed of the context. - isolate->heap()->CollectAllAvailableGarbage( + i_isolate->heap()->CollectAllAvailableGarbage( i::GarbageCollectionReason::kSnapshotCreator); { - i::HandleScope scope(isolate); - isolate->heap()->CompactWeakArrayLists(); + i::HandleScope scope(i_isolate); + i_isolate->heap()->CompactWeakArrayLists(); } i::Snapshot::ClearReconstructableDataForSerialization( - isolate, function_code_handling == FunctionCodeHandling::kClear); + i_isolate, function_code_handling == FunctionCodeHandling::kClear); - i::GlobalSafepointScope global_safepoint(isolate); + i::GlobalSafepointScope global_safepoint(i_isolate); i::DisallowGarbageCollection no_gc_from_here_on; // Create a vector with all contexts and clear associated Persistent fields. @@ -652,20 +626,20 @@ StartupData SnapshotCreator::CreateBlob( std::vector contexts; contexts.reserve(num_contexts); { - i::HandleScope scope(isolate); + i::HandleScope scope(i_isolate); contexts.push_back( *v8::Utils::OpenHandle(*data->default_context_.Get(data->isolate_))); data->default_context_.Reset(); for (int i = 0; i < num_additional_contexts; i++) { i::Handle context = - v8::Utils::OpenHandle(*data->contexts_.Get(i)); + v8::Utils::OpenHandle(*data->contexts_[i].Get(isolate)); contexts.push_back(*context); } - data->contexts_.Clear(); + data->contexts_.clear(); } // Check that values referenced by global/eternal handles are accounted for. - i::SerializedHandleChecker handle_checker(isolate, &contexts); + i::SerializedHandleChecker handle_checker(i_isolate, &contexts); CHECK(handle_checker.CheckGlobalAndEternalHandles()); // Create a vector with all embedder fields serializers. @@ -679,7 +653,7 @@ StartupData SnapshotCreator::CreateBlob( } data->created_ = true; - return i::Snapshot::Create(isolate, &contexts, embedder_fields_serializers, + return i::Snapshot::Create(i_isolate, &contexts, embedder_fields_serializers, global_safepoint, no_gc_from_here_on); } @@ -810,19 +784,19 @@ void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory, namespace internal { -i::Address* GlobalizeTracedReference(i::Isolate* isolate, i::Address* obj, +i::Address* GlobalizeTracedReference(i::Isolate* i_isolate, i::Address* obj, internal::Address* slot, GlobalHandleStoreMode store_mode) { - API_RCS_SCOPE(isolate, TracedGlobal, New); + API_RCS_SCOPE(i_isolate, TracedGlobal, New); #ifdef DEBUG Utils::ApiCheck((slot != nullptr), "v8::GlobalizeTracedReference", "the address slot must be not null"); #endif i::Handle result = - isolate->global_handles()->CreateTraced(*obj, slot, store_mode); + i_isolate->global_handles()->CreateTraced(*obj, slot, store_mode); #ifdef VERIFY_HEAP if (i::FLAG_verify_heap) { - i::Object(*obj).ObjectVerify(isolate); + i::Object(*obj).ObjectVerify(i_isolate); } #endif // VERIFY_HEAP return result.location(); @@ -845,12 +819,12 @@ void DisposeTracedReference(internal::Address* location) { namespace api_internal { -i::Address* GlobalizeReference(i::Isolate* isolate, i::Address* obj) { - API_RCS_SCOPE(isolate, Persistent, New); - i::Handle result = isolate->global_handles()->Create(*obj); +i::Address* GlobalizeReference(i::Isolate* i_isolate, i::Address* obj) { + API_RCS_SCOPE(i_isolate, Persistent, New); + i::Handle result = i_isolate->global_handles()->Create(*obj); #ifdef VERIFY_HEAP if (i::FLAG_verify_heap) { - i::Object(*obj).ObjectVerify(isolate); + i::Object(*obj).ObjectVerify(i_isolate); } #endif // VERIFY_HEAP return result.location(); @@ -888,56 +862,55 @@ void DisposeGlobal(i::Address* location) { } Value* Eternalize(Isolate* v8_isolate, Value* value) { - i::Isolate* isolate = reinterpret_cast(v8_isolate); + i::Isolate* i_isolate = reinterpret_cast(v8_isolate); i::Object object = *Utils::OpenHandle(value); int index = -1; - isolate->eternal_handles()->Create(isolate, object, &index); + i_isolate->eternal_handles()->Create(i_isolate, object, &index); return reinterpret_cast( - isolate->eternal_handles()->Get(index).location()); + i_isolate->eternal_handles()->Get(index).location()); } void FromJustIsNothing() { - Utils::ApiCheck(false, "v8::FromJust", "Maybe value is Nothing."); + Utils::ApiCheck(false, "v8::FromJust", "Maybe value is Nothing"); } void ToLocalEmpty() { - Utils::ApiCheck(false, "v8::ToLocalChecked", "Empty MaybeLocal."); + Utils::ApiCheck(false, "v8::ToLocalChecked", "Empty MaybeLocal"); } void InternalFieldOutOfBounds(int index) { Utils::ApiCheck(0 <= index && index < kInternalFieldsInWeakCallback, "WeakCallbackInfo::GetInternalField", - "Internal field out of bounds."); + "Internal field out of bounds"); } } // namespace api_internal // --- H a n d l e s --- -HandleScope::HandleScope(Isolate* isolate) { Initialize(isolate); } +HandleScope::HandleScope(Isolate* v8_isolate) { Initialize(v8_isolate); } -void HandleScope::Initialize(Isolate* isolate) { - i::Isolate* internal_isolate = reinterpret_cast(isolate); +void HandleScope::Initialize(Isolate* v8_isolate) { + i::Isolate* i_isolate = reinterpret_cast(v8_isolate); // We do not want to check the correct usage of the Locker class all over the // place, so we do it only here: Without a HandleScope, an embedder can do // almost nothing, so it is enough to check in this central place. // We make an exception if the serializer is enabled, which means that the // Isolate is exclusively used to create a snapshot. - Utils::ApiCheck( - !internal_isolate->was_locker_ever_used() || - internal_isolate->thread_manager()->IsLockedByCurrentThread() || - internal_isolate->serializer_enabled(), - "HandleScope::HandleScope", - "Entering the V8 API without proper locking in place"); - i::HandleScopeData* current = internal_isolate->handle_scope_data(); - isolate_ = internal_isolate; + Utils::ApiCheck(!i_isolate->was_locker_ever_used() || + i_isolate->thread_manager()->IsLockedByCurrentThread() || + i_isolate->serializer_enabled(), + "HandleScope::HandleScope", + "Entering the V8 API without proper locking in place"); + i::HandleScopeData* current = i_isolate->handle_scope_data(); + i_isolate_ = i_isolate; prev_next_ = current->next; prev_limit_ = current->limit; current->level++; } HandleScope::~HandleScope() { - i::HandleScope::CloseScope(isolate_, prev_next_, prev_limit_); + i::HandleScope::CloseScope(i_isolate_, prev_next_, prev_limit_); } void* HandleScope::operator new(size_t) { base::OS::Abort(); } @@ -945,19 +918,19 @@ void* HandleScope::operator new[](size_t) { base::OS::Abort(); } void HandleScope::operator delete(void*, size_t) { base::OS::Abort(); } void HandleScope::operator delete[](void*, size_t) { base::OS::Abort(); } -int HandleScope::NumberOfHandles(Isolate* isolate) { +int HandleScope::NumberOfHandles(Isolate* v8_isolate) { return i::HandleScope::NumberOfHandles( - reinterpret_cast(isolate)); + reinterpret_cast(v8_isolate)); } -i::Address* HandleScope::CreateHandle(i::Isolate* isolate, i::Address value) { - return i::HandleScope::CreateHandle(isolate, value); +i::Address* HandleScope::CreateHandle(i::Isolate* i_isolate, i::Address value) { + return i::HandleScope::CreateHandle(i_isolate, value); } EscapableHandleScope::EscapableHandleScope(Isolate* v8_isolate) { - i::Isolate* isolate = reinterpret_cast(v8_isolate); - escape_slot_ = - CreateHandle(isolate, i::ReadOnlyRoots(isolate).the_hole_value().ptr()); + i::Isolate* i_isolate = reinterpret_cast(v8_isolate); + escape_slot_ = CreateHandle( + i_isolate, i::ReadOnlyRoots(i_isolate).the_hole_value().ptr()); Initialize(v8_isolate); } @@ -980,9 +953,9 @@ void EscapableHandleScope::operator delete[](void*, size_t) { base::OS::Abort(); } -SealHandleScope::SealHandleScope(Isolate* isolate) - : isolate_(reinterpret_cast(isolate)) { - i::HandleScopeData* current = isolate_->handle_scope_data(); +SealHandleScope::SealHandleScope(Isolate* v8_isolate) + : i_isolate_(reinterpret_cast(v8_isolate)) { + i::HandleScopeData* current = i_isolate_->handle_scope_data(); prev_limit_ = current->limit; current->limit = current->next; prev_sealed_level_ = current->sealed_level; @@ -990,7 +963,7 @@ SealHandleScope::SealHandleScope(Isolate* isolate) } SealHandleScope::~SealHandleScope() { - i::HandleScopeData* current = isolate_->handle_scope_data(); + i::HandleScopeData* current = i_isolate_->handle_scope_data(); DCHECK_EQ(current->next, current->limit); current->limit = prev_limit_; DCHECK_EQ(current->level, current->sealed_level); @@ -1034,26 +1007,30 @@ bool Data::IsFunctionTemplate() const { bool Data::IsContext() const { return Utils::OpenHandle(this)->IsContext(); } void Context::Enter() { - i::Handle env = Utils::OpenHandle(this); - i::Isolate* isolate = env->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::HandleScopeImplementer* impl = isolate->handle_scope_implementer(); - impl->EnterContext(*env); - impl->SaveContext(isolate->context()); - isolate->set_context(*env); + i::DisallowGarbageCollection no_gc; + i::Context env = *Utils::OpenHandle(this); + i::Isolate* i_isolate = env.GetIsolate(); + // TODO(cbruni): Use ENTER_V8_NO_SCRIPT_NO_EXCEPTION which also checks + // Isolate::is_execution_terminating + // ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + ENTER_V8_MAYBE_TEARDOWN(i_isolate); + i::HandleScopeImplementer* impl = i_isolate->handle_scope_implementer(); + impl->EnterContext(env); + impl->SaveContext(i_isolate->context()); + i_isolate->set_context(env); } void Context::Exit() { i::Handle env = Utils::OpenHandle(this); - i::Isolate* isolate = env->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::HandleScopeImplementer* impl = isolate->handle_scope_implementer(); + i::Isolate* i_isolate = env->GetIsolate(); + ENTER_V8_MAYBE_TEARDOWN(i_isolate); + i::HandleScopeImplementer* impl = i_isolate->handle_scope_implementer(); if (!Utils::ApiCheck(impl->LastEnteredContextWas(*env), "v8::Context::Exit()", "Cannot exit non-entered context")) { return; } impl->LeaveContext(); - isolate->set_context(impl->RestoreContext()); + i_isolate->set_context(impl->RestoreContext()); } Context::BackupIncumbentScope::BackupIncumbentScope( @@ -1062,52 +1039,54 @@ Context::BackupIncumbentScope::BackupIncumbentScope( DCHECK(!backup_incumbent_context_.IsEmpty()); i::Handle env = Utils::OpenHandle(*backup_incumbent_context_); - i::Isolate* isolate = env->GetIsolate(); + i::Isolate* i_isolate = env->GetIsolate(); js_stack_comparable_address_ = - i::SimulatorStack::RegisterJSStackComparableAddress(isolate); + i::SimulatorStack::RegisterJSStackComparableAddress(i_isolate); - prev_ = isolate->top_backup_incumbent_scope(); - isolate->set_top_backup_incumbent_scope(this); + prev_ = i_isolate->top_backup_incumbent_scope(); + i_isolate->set_top_backup_incumbent_scope(this); } Context::BackupIncumbentScope::~BackupIncumbentScope() { i::Handle env = Utils::OpenHandle(*backup_incumbent_context_); - i::Isolate* isolate = env->GetIsolate(); + i::Isolate* i_isolate = env->GetIsolate(); - i::SimulatorStack::UnregisterJSStackComparableAddress(isolate); + i::SimulatorStack::UnregisterJSStackComparableAddress(i_isolate); - isolate->set_top_backup_incumbent_scope(prev_); + i_isolate->set_top_backup_incumbent_scope(prev_); } -STATIC_ASSERT(i::Internals::kEmbedderDataSlotSize == i::kEmbedderDataSlotSize); +static_assert(i::Internals::kEmbedderDataSlotSize == i::kEmbedderDataSlotSize); +static_assert(i::Internals::kEmbedderDataSlotExternalPointerOffset == + i::EmbedderDataSlot::kExternalPointerOffset); static i::Handle EmbedderDataFor(Context* context, int index, bool can_grow, const char* location) { i::Handle env = Utils::OpenHandle(context); - i::Isolate* isolate = env->GetIsolate(); - ASSERT_NO_SCRIPT_NO_EXCEPTION(isolate); + i::Isolate* i_isolate = env->GetIsolate(); + DCHECK_NO_SCRIPT_NO_EXCEPTION_MAYBE_TEARDOWN(i_isolate); bool ok = Utils::ApiCheck(env->IsNativeContext(), location, "Not a native context") && Utils::ApiCheck(index >= 0, location, "Negative index"); if (!ok) return i::Handle(); // TODO(ishell): remove cast once embedder_data slot has a proper type. i::Handle data( - i::EmbedderDataArray::cast(env->embedder_data()), isolate); + i::EmbedderDataArray::cast(env->embedder_data()), i_isolate); if (index < data->length()) return data; if (!Utils::ApiCheck(can_grow && index < i::EmbedderDataArray::kMaxLength, location, "Index too large")) { return i::Handle(); } - data = i::EmbedderDataArray::EnsureCapacity(isolate, data, index); + data = i::EmbedderDataArray::EnsureCapacity(i_isolate, data, index); env->set_embedder_data(*data); return data; } uint32_t Context::GetNumberOfEmbedderDataFields() { i::Handle context = Utils::OpenHandle(this); - ASSERT_NO_SCRIPT_NO_EXCEPTION(context->GetIsolate()); + DCHECK_NO_SCRIPT_NO_EXCEPTION(context->GetIsolate()); Utils::ApiCheck(context->IsNativeContext(), "Context::GetNumberOfEmbedderDataFields", "Not a native context"); @@ -1121,9 +1100,9 @@ v8::Local Context::SlowGetEmbedderData(int index) { i::Handle data = EmbedderDataFor(this, index, false, location); if (data.is_null()) return Local(); - i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); + i::Isolate* i_isolate = Utils::OpenHandle(this)->GetIsolate(); i::Handle result(i::EmbedderDataSlot(*data, index).load_tagged(), - isolate); + i_isolate); return Utils::ToLocal(result); } @@ -1140,25 +1119,25 @@ void Context::SetEmbedderData(int index, v8::Local value) { void* Context::SlowGetAlignedPointerFromEmbedderData(int index) { const char* location = "v8::Context::GetAlignedPointerFromEmbedderData()"; - i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); - i::HandleScope handle_scope(isolate); + i::Isolate* i_isolate = Utils::OpenHandle(this)->GetIsolate(); + i::HandleScope handle_scope(i_isolate); i::Handle data = EmbedderDataFor(this, index, false, location); if (data.is_null()) return nullptr; void* result; Utils::ApiCheck( - i::EmbedderDataSlot(*data, index).ToAlignedPointer(isolate, &result), + i::EmbedderDataSlot(*data, index).ToAlignedPointer(i_isolate, &result), location, "Pointer is not aligned"); return result; } void Context::SetAlignedPointerInEmbedderData(int index, void* value) { const char* location = "v8::Context::SetAlignedPointerInEmbedderData()"; - i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); + i::Isolate* i_isolate = Utils::OpenHandle(this)->GetIsolate(); i::Handle data = EmbedderDataFor(this, index, true, location); bool ok = - i::EmbedderDataSlot(*data, index).store_aligned_pointer(isolate, value); + i::EmbedderDataSlot(*data, index).store_aligned_pointer(i_isolate, value); Utils::ApiCheck(ok, location, "Pointer is not aligned"); DCHECK_EQ(value, GetAlignedPointerFromEmbedderData(index)); } @@ -1177,9 +1156,9 @@ static void InitializeTemplate(i::TemplateInfo that, int type, void Template::Set(v8::Local name, v8::Local value, v8::PropertyAttribute attribute) { auto templ = Utils::OpenHandle(this); - i::Isolate* isolate = templ->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::HandleScope scope(isolate); + i::Isolate* i_isolate = templ->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + i::HandleScope scope(i_isolate); auto value_obj = Utils::OpenHandle(*value); Utils::ApiCheck(!value_obj->IsJSReceiver() || value_obj->IsTemplateInfo(), @@ -1193,7 +1172,7 @@ void Template::Set(v8::Local name, v8::Local value, templ->set_serial_number(i::TemplateInfo::kDoNotCache); } - i::ApiNatives::AddDataProperty(isolate, templ, Utils::OpenHandle(*name), + i::ApiNatives::AddDataProperty(i_isolate, templ, Utils::OpenHandle(*name), value_obj, static_cast(attribute)); } @@ -1209,16 +1188,25 @@ void Template::SetAccessorProperty(v8::Local name, v8::Local setter, v8::PropertyAttribute attribute, v8::AccessControl access_control) { + Utils::ApiCheck( + getter.IsEmpty() || + !Utils::OpenHandle(*getter)->call_code(kAcquireLoad).IsUndefined(), + "v8::Template::SetAccessorProperty", "Getter must have a call handler"); + Utils::ApiCheck( + setter.IsEmpty() || + !Utils::OpenHandle(*setter)->call_code(kAcquireLoad).IsUndefined(), + "v8::Template::SetAccessorProperty", "Setter must have a call handler"); + // TODO(verwaest): Remove |access_control|. DCHECK_EQ(v8::DEFAULT, access_control); auto templ = Utils::OpenHandle(this); - auto isolate = templ->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); + auto i_isolate = templ->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); DCHECK(!name.IsEmpty()); DCHECK(!getter.IsEmpty() || !setter.IsEmpty()); - i::HandleScope scope(isolate); + i::HandleScope scope(i_isolate); i::ApiNatives::AddAccessorProperty( - isolate, templ, Utils::OpenHandle(*name), + i_isolate, templ, Utils::OpenHandle(*name), Utils::OpenHandle(*getter, true), Utils::OpenHandle(*setter, true), static_cast(attribute)); } @@ -1230,9 +1218,29 @@ static void InitializeFunctionTemplate(i::FunctionTemplateInfo info, info.set_flag(0); } -static Local ObjectTemplateNew( - i::Isolate* isolate, v8::Local constructor, - bool do_not_cache); +namespace { +Local ObjectTemplateNew(i::Isolate* i_isolate, + v8::Local constructor, + bool do_not_cache) { + API_RCS_SCOPE(i_isolate, ObjectTemplate, New); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + i::Handle struct_obj = i_isolate->factory()->NewStruct( + i::OBJECT_TEMPLATE_INFO_TYPE, i::AllocationType::kOld); + i::Handle obj = + i::Handle::cast(struct_obj); + { + // Disallow GC until all fields of obj have acceptable types. + i::DisallowGarbageCollection no_gc; + i::ObjectTemplateInfo raw = *obj; + InitializeTemplate(raw, Consts::OBJECT_TEMPLATE, do_not_cache); + raw.set_data(0); + if (!constructor.IsEmpty()) { + raw.set_constructor(*Utils::OpenHandle(*constructor)); + } + } + return Utils::ToLocal(obj); +} +} // namespace Local FunctionTemplate::PrototypeTemplate() { auto self = Utils::OpenHandle(this); @@ -1265,6 +1273,7 @@ void FunctionTemplate::SetPrototypeProviderTemplate( result); } +namespace { static void EnsureNotPublished(i::Handle info, const char* func) { DCHECK_IMPLIES(info->instantiated(), info->published()); @@ -1272,20 +1281,8 @@ static void EnsureNotPublished(i::Handle info, "FunctionTemplate already instantiated"); } -void FunctionTemplate::Inherit(v8::Local value) { - auto info = Utils::OpenHandle(this); - EnsureNotPublished(info, "v8::FunctionTemplate::Inherit"); - i::Isolate* i_isolate = info->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); - Utils::ApiCheck(info->GetPrototypeProviderTemplate().IsUndefined(i_isolate), - "v8::FunctionTemplate::Inherit", - "Protoype provider must be empty"); - i::FunctionTemplateInfo::SetParentTemplate(i_isolate, info, - Utils::OpenHandle(*value)); -} - -static Local FunctionTemplateNew( - i::Isolate* isolate, FunctionCallback callback, v8::Local data, +Local FunctionTemplateNew( + i::Isolate* i_isolate, FunctionCallback callback, v8::Local data, v8::Local signature, int length, ConstructorBehavior behavior, bool do_not_cache, v8::Local cached_property_name = v8::Local(), @@ -1294,7 +1291,7 @@ static Local FunctionTemplateNew( uint8_t instance_type = 0, uint8_t allowed_receiver_instance_type_range_start = 0, uint8_t allowed_receiver_instance_type_range_end = 0) { - i::Handle struct_obj = isolate->factory()->NewStruct( + i::Handle struct_obj = i_isolate->factory()->NewStruct( i::FUNCTION_TEMPLATE_INFO_TYPE, i::AllocationType::kOld); i::Handle obj = i::Handle::cast(struct_obj); @@ -1312,7 +1309,7 @@ static Local FunctionTemplateNew( } raw.set_cached_property_name( cached_property_name.IsEmpty() - ? i::ReadOnlyRoots(isolate).the_hole_value() + ? i::ReadOnlyRoots(i_isolate).the_hole_value() : *Utils::OpenHandle(*cached_property_name)); if (behavior == ConstructorBehavior::kThrow) raw.set_remove_prototype(true); raw.SetInstanceType(instance_type); @@ -1327,14 +1324,27 @@ static Local FunctionTemplateNew( } return Utils::ToLocal(obj); } +} // namespace + +void FunctionTemplate::Inherit(v8::Local value) { + auto info = Utils::OpenHandle(this); + EnsureNotPublished(info, "v8::FunctionTemplate::Inherit"); + i::Isolate* i_isolate = info->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + Utils::ApiCheck(info->GetPrototypeProviderTemplate().IsUndefined(i_isolate), + "v8::FunctionTemplate::Inherit", + "Protoype provider must be empty"); + i::FunctionTemplateInfo::SetParentTemplate(i_isolate, info, + Utils::OpenHandle(*value)); +} Local FunctionTemplate::New( - Isolate* isolate, FunctionCallback callback, v8::Local data, + Isolate* v8_isolate, FunctionCallback callback, v8::Local data, v8::Local signature, int length, ConstructorBehavior behavior, SideEffectType side_effect_type, const CFunction* c_function, uint16_t instance_type, uint16_t allowed_receiver_instance_type_range_start, uint16_t allowed_receiver_instance_type_range_end) { - i::Isolate* i_isolate = reinterpret_cast(isolate); + i::Isolate* i_isolate = reinterpret_cast(v8_isolate); // Changes to the environment cannot be captured in the snapshot. Expect no // function templates when the isolate is created for serialization. API_RCS_SCOPE(i_isolate, FunctionTemplate, New); @@ -1342,10 +1352,20 @@ Local FunctionTemplate::New( if (!Utils::ApiCheck( !c_function || behavior == ConstructorBehavior::kThrow, "FunctionTemplate::New", - "Fast API calls are not supported for constructor functions.")) { + "Fast API calls are not supported for constructor functions")) { return Local(); } + if (instance_type != 0) { + if (!Utils::ApiCheck( + instance_type >= i::Internals::kFirstJSApiObjectType && + instance_type <= i::Internals::kLastJSApiObjectType, + "FunctionTemplate::New", + "instance_type is outside the range of valid JSApiObject types")) { + return Local(); + } + } + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); return FunctionTemplateNew( i_isolate, callback, data, signature, length, behavior, false, @@ -1357,18 +1377,18 @@ Local FunctionTemplate::New( } Local FunctionTemplate::NewWithCFunctionOverloads( - Isolate* isolate, FunctionCallback callback, v8::Local data, + Isolate* v8_isolate, FunctionCallback callback, v8::Local data, v8::Local signature, int length, ConstructorBehavior behavior, SideEffectType side_effect_type, const MemorySpan& c_function_overloads) { - i::Isolate* i_isolate = reinterpret_cast(isolate); + i::Isolate* i_isolate = reinterpret_cast(v8_isolate); API_RCS_SCOPE(i_isolate, FunctionTemplate, New); if (!Utils::ApiCheck( c_function_overloads.size() == 0 || behavior == ConstructorBehavior::kThrow, "FunctionTemplate::NewWithCFunctionOverloads", - "Fast API calls are not supported for constructor functions.")) { + "Fast API calls are not supported for constructor functions")) { return Local(); } @@ -1379,10 +1399,10 @@ Local FunctionTemplate::NewWithCFunctionOverloads( } Local FunctionTemplate::NewWithCache( - Isolate* isolate, FunctionCallback callback, Local cache_property, - Local data, Local signature, int length, - SideEffectType side_effect_type) { - i::Isolate* i_isolate = reinterpret_cast(isolate); + Isolate* v8_isolate, FunctionCallback callback, + Local cache_property, Local data, + Local signature, int length, SideEffectType side_effect_type) { + i::Isolate* i_isolate = reinterpret_cast(v8_isolate); API_RCS_SCOPE(i_isolate, FunctionTemplate, NewWithCache); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); return FunctionTemplateNew(i_isolate, callback, data, signature, length, @@ -1390,20 +1410,15 @@ Local FunctionTemplate::NewWithCache( side_effect_type); } -Local Signature::New(Isolate* isolate, +Local Signature::New(Isolate* v8_isolate, Local receiver) { return Utils::SignatureToLocal(Utils::OpenHandle(*receiver)); } -Local AccessorSignature::New( - Isolate* isolate, Local receiver) { - return Utils::AccessorSignatureToLocal(Utils::OpenHandle(*receiver)); -} - -#define SET_FIELD_WRAPPED(isolate, obj, setter, cdata) \ - do { \ - i::Handle foreign = FromCData(isolate, cdata); \ - (obj)->setter(*foreign); \ +#define SET_FIELD_WRAPPED(i_isolate, obj, setter, cdata) \ + do { \ + i::Handle foreign = FromCData(i_isolate, cdata); \ + (obj)->setter(*foreign); \ } while (false) void FunctionTemplate::SetCallHandler( @@ -1412,38 +1427,37 @@ void FunctionTemplate::SetCallHandler( const MemorySpan& c_function_overloads) { auto info = Utils::OpenHandle(this); EnsureNotPublished(info, "v8::FunctionTemplate::SetCallHandler"); - i::Isolate* isolate = info->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::HandleScope scope(isolate); - i::Handle obj = isolate->factory()->NewCallHandlerInfo( + i::Isolate* i_isolate = info->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + i::HandleScope scope(i_isolate); + i::Handle obj = i_isolate->factory()->NewCallHandlerInfo( side_effect_type == SideEffectType::kHasNoSideEffect); - SET_FIELD_WRAPPED(isolate, obj, set_callback, callback); - SET_FIELD_WRAPPED(isolate, obj, set_js_callback, obj->redirected_callback()); + obj->set_callback(i_isolate, reinterpret_cast(callback)); if (data.IsEmpty()) { - data = v8::Undefined(reinterpret_cast(isolate)); + data = v8::Undefined(reinterpret_cast(i_isolate)); } obj->set_data(*Utils::OpenHandle(*data)); if (c_function_overloads.size() > 0) { // Stores the data for a sequence of CFunction overloads into a single // FixedArray, as [address_0, signature_0, ... address_n-1, signature_n-1]. i::Handle function_overloads = - isolate->factory()->NewFixedArray(static_cast( + i_isolate->factory()->NewFixedArray(static_cast( c_function_overloads.size() * i::FunctionTemplateInfo::kFunctionOverloadEntrySize)); int function_count = static_cast(c_function_overloads.size()); for (int i = 0; i < function_count; i++) { const CFunction& c_function = c_function_overloads.data()[i]; i::Handle address = - FromCData(isolate, c_function.GetAddress()); + FromCData(i_isolate, c_function.GetAddress()); function_overloads->set( i::FunctionTemplateInfo::kFunctionOverloadEntrySize * i, *address); i::Handle signature = - FromCData(isolate, c_function.GetTypeInfo()); + FromCData(i_isolate, c_function.GetTypeInfo()); function_overloads->set( i::FunctionTemplateInfo::kFunctionOverloadEntrySize * i + 1, *signature); } - i::FunctionTemplateInfo::SetCFunctionOverloads(isolate, info, + i::FunctionTemplateInfo::SetCFunctionOverloads(i_isolate, info, function_overloads); } info->set_call_code(*obj, kReleaseStore); @@ -1453,32 +1467,27 @@ namespace { template i::Handle MakeAccessorInfo( - i::Isolate* isolate, v8::Local name, Getter getter, Setter setter, + i::Isolate* i_isolate, v8::Local name, Getter getter, Setter setter, v8::Local data, v8::AccessControl settings, - v8::Local signature, bool is_special_data_property, - bool replace_on_access) { - i::Handle obj = isolate->factory()->NewAccessorInfo(); - SET_FIELD_WRAPPED(isolate, obj, set_getter, getter); + bool is_special_data_property, bool replace_on_access) { + i::Handle obj = i_isolate->factory()->NewAccessorInfo(); + obj->set_getter(i_isolate, reinterpret_cast(getter)); DCHECK_IMPLIES(replace_on_access, is_special_data_property && setter == nullptr); if (is_special_data_property && setter == nullptr) { setter = reinterpret_cast(&i::Accessors::ReconfigureToDataProperty); } - SET_FIELD_WRAPPED(isolate, obj, set_setter, setter); - i::Address redirected = obj->redirected_getter(); - if (redirected != i::kNullAddress) { - SET_FIELD_WRAPPED(isolate, obj, set_js_getter, redirected); - } + obj->set_setter(i_isolate, reinterpret_cast(setter)); i::Handle accessor_name = Utils::OpenHandle(*name); if (!accessor_name->IsUniqueName()) { - accessor_name = isolate->factory()->InternalizeString( + accessor_name = i_isolate->factory()->InternalizeString( i::Handle::cast(accessor_name)); } i::DisallowGarbageCollection no_gc; i::AccessorInfo raw_obj = *obj; if (data.IsEmpty()) { - raw_obj.set_data(i::ReadOnlyRoots(isolate).undefined_value()); + raw_obj.set_data(i::ReadOnlyRoots(i_isolate).undefined_value()); } else { raw_obj.set_data(*Utils::OpenHandle(*data)); } @@ -1488,9 +1497,6 @@ i::Handle MakeAccessorInfo( if (settings & ALL_CAN_READ) raw_obj.set_all_can_read(true); if (settings & ALL_CAN_WRITE) raw_obj.set_all_can_write(true); raw_obj.set_initial_property_attributes(i::NONE); - if (!signature.IsEmpty()) { - raw_obj.set_expected_receiver_type(*Utils::OpenHandle(*signature)); - } return obj; } @@ -1503,124 +1509,103 @@ Local FunctionTemplate::InstanceTemplate() { "Reading from empty handle")) { return Local(); } - i::Isolate* isolate = handle->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - if (handle->GetInstanceTemplate().IsUndefined(isolate)) { + i::Isolate* i_isolate = handle->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + if (handle->GetInstanceTemplate().IsUndefined(i_isolate)) { Local templ = - ObjectTemplate::New(isolate, ToApiHandle(handle)); - i::FunctionTemplateInfo::SetInstanceTemplate(isolate, handle, + ObjectTemplate::New(i_isolate, ToApiHandle(handle)); + i::FunctionTemplateInfo::SetInstanceTemplate(i_isolate, handle, Utils::OpenHandle(*templ)); } i::Handle result( - i::ObjectTemplateInfo::cast(handle->GetInstanceTemplate()), isolate); + i::ObjectTemplateInfo::cast(handle->GetInstanceTemplate()), i_isolate); return Utils::ToLocal(result); } void FunctionTemplate::SetLength(int length) { auto info = Utils::OpenHandle(this); EnsureNotPublished(info, "v8::FunctionTemplate::SetLength"); - auto isolate = info->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); + auto i_isolate = info->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); info->set_length(length); } void FunctionTemplate::SetClassName(Local name) { auto info = Utils::OpenHandle(this); EnsureNotPublished(info, "v8::FunctionTemplate::SetClassName"); - auto isolate = info->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); + auto i_isolate = info->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); info->set_class_name(*Utils::OpenHandle(*name)); } void FunctionTemplate::SetAcceptAnyReceiver(bool value) { auto info = Utils::OpenHandle(this); EnsureNotPublished(info, "v8::FunctionTemplate::SetAcceptAnyReceiver"); - auto isolate = info->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); + auto i_isolate = info->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); info->set_accept_any_receiver(value); } void FunctionTemplate::ReadOnlyPrototype() { auto info = Utils::OpenHandle(this); EnsureNotPublished(info, "v8::FunctionTemplate::ReadOnlyPrototype"); - auto isolate = info->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); + auto i_isolate = info->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); info->set_read_only_prototype(true); } void FunctionTemplate::RemovePrototype() { auto info = Utils::OpenHandle(this); EnsureNotPublished(info, "v8::FunctionTemplate::RemovePrototype"); - auto isolate = info->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); + auto i_isolate = info->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); info->set_remove_prototype(true); } // --- O b j e c t T e m p l a t e --- Local ObjectTemplate::New( - Isolate* isolate, v8::Local constructor) { - return New(reinterpret_cast(isolate), constructor); -} - -static Local ObjectTemplateNew( - i::Isolate* isolate, v8::Local constructor, - bool do_not_cache) { - API_RCS_SCOPE(isolate, ObjectTemplate, New); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::Handle struct_obj = isolate->factory()->NewStruct( - i::OBJECT_TEMPLATE_INFO_TYPE, i::AllocationType::kOld); - i::Handle obj = - i::Handle::cast(struct_obj); - { - // Disallow GC until all fields of obj have acceptable types. - i::DisallowGarbageCollection no_gc; - i::ObjectTemplateInfo raw = *obj; - InitializeTemplate(raw, Consts::OBJECT_TEMPLATE, do_not_cache); - raw.set_data(0); - if (!constructor.IsEmpty()) { - raw.set_constructor(*Utils::OpenHandle(*constructor)); - } - } - return Utils::ToLocal(obj); + Isolate* v8_isolate, v8::Local constructor) { + return New(reinterpret_cast(v8_isolate), constructor); } Local ObjectTemplate::New( - i::Isolate* isolate, v8::Local constructor) { - return ObjectTemplateNew(isolate, constructor, false); + i::Isolate* i_isolate, v8::Local constructor) { + return ObjectTemplateNew(i_isolate, constructor, false); } +namespace { // Ensure that the object template has a constructor. If no // constructor is available we create one. -static i::Handle EnsureConstructor( - i::Isolate* isolate, ObjectTemplate* object_template) { +i::Handle EnsureConstructor( + i::Isolate* i_isolate, ObjectTemplate* object_template) { i::Object obj = Utils::OpenHandle(object_template)->constructor(); - if (!obj.IsUndefined(isolate)) { + if (!obj.IsUndefined(i_isolate)) { i::FunctionTemplateInfo info = i::FunctionTemplateInfo::cast(obj); - return i::Handle(info, isolate); + return i::Handle(info, i_isolate); } Local templ = - FunctionTemplate::New(reinterpret_cast(isolate)); + FunctionTemplate::New(reinterpret_cast(i_isolate)); i::Handle constructor = Utils::OpenHandle(*templ); i::FunctionTemplateInfo::SetInstanceTemplate( - isolate, constructor, Utils::OpenHandle(object_template)); + i_isolate, constructor, Utils::OpenHandle(object_template)); Utils::OpenHandle(object_template)->set_constructor(*constructor); return constructor; } template -static void TemplateSetAccessor( - Template* template_obj, v8::Local name, Getter getter, Setter setter, - Data data, AccessControl settings, PropertyAttribute attribute, - v8::Local signature, bool is_special_data_property, - bool replace_on_access, SideEffectType getter_side_effect_type, - SideEffectType setter_side_effect_type) { +void TemplateSetAccessor(Template* template_obj, v8::Local name, + Getter getter, Setter setter, Data data, + AccessControl settings, PropertyAttribute attribute, + bool is_special_data_property, bool replace_on_access, + SideEffectType getter_side_effect_type, + SideEffectType setter_side_effect_type) { auto info = Utils::OpenHandle(template_obj); - auto isolate = info->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::HandleScope scope(isolate); + auto i_isolate = info->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + i::HandleScope scope(i_isolate); i::Handle accessor_info = - MakeAccessorInfo(isolate, name, getter, setter, data, settings, signature, + MakeAccessorInfo(i_isolate, name, getter, setter, data, settings, is_special_data_property, replace_on_access); { i::DisallowGarbageCollection no_gc; @@ -1630,8 +1615,9 @@ static void TemplateSetAccessor( raw.set_getter_side_effect_type(getter_side_effect_type); raw.set_setter_side_effect_type(setter_side_effect_type); } - i::ApiNatives::AddNativeDataProperty(isolate, info, accessor_info); + i::ApiNatives::AddNativeDataProperty(i_isolate, info, accessor_info); } +} // namespace void Template::SetNativeDataProperty(v8::Local name, AccessorGetterCallback getter, @@ -1642,18 +1628,7 @@ void Template::SetNativeDataProperty(v8::Local name, SideEffectType getter_side_effect_type, SideEffectType setter_side_effect_type) { TemplateSetAccessor(this, name, getter, setter, data, settings, attribute, - Local(), true, false, - getter_side_effect_type, setter_side_effect_type); -} - -void Template::SetNativeDataProperty( - v8::Local name, AccessorGetterCallback getter, - AccessorSetterCallback setter, v8::Local data, - PropertyAttribute attribute, v8::Local signature, - AccessControl settings, SideEffectType getter_side_effect_type, - SideEffectType setter_side_effect_type) { - TemplateSetAccessor(this, name, getter, setter, data, settings, attribute, - signature, true, false, getter_side_effect_type, + true, false, getter_side_effect_type, setter_side_effect_type); } @@ -1666,18 +1641,7 @@ void Template::SetNativeDataProperty(v8::Local name, SideEffectType getter_side_effect_type, SideEffectType setter_side_effect_type) { TemplateSetAccessor(this, name, getter, setter, data, settings, attribute, - Local(), true, false, - getter_side_effect_type, setter_side_effect_type); -} - -void Template::SetNativeDataProperty( - v8::Local name, AccessorNameGetterCallback getter, - AccessorNameSetterCallback setter, v8::Local data, - PropertyAttribute attribute, v8::Local signature, - AccessControl settings, SideEffectType getter_side_effect_type, - SideEffectType setter_side_effect_type) { - TemplateSetAccessor(this, name, getter, setter, data, settings, attribute, - signature, true, false, getter_side_effect_type, + true, false, getter_side_effect_type, setter_side_effect_type); } @@ -1689,17 +1653,17 @@ void Template::SetLazyDataProperty(v8::Local name, SideEffectType setter_side_effect_type) { TemplateSetAccessor(this, name, getter, static_cast(nullptr), data, - DEFAULT, attribute, Local(), true, - true, getter_side_effect_type, setter_side_effect_type); + DEFAULT, attribute, true, true, getter_side_effect_type, + setter_side_effect_type); } void Template::SetIntrinsicDataProperty(Local name, Intrinsic intrinsic, PropertyAttribute attribute) { auto templ = Utils::OpenHandle(this); - i::Isolate* isolate = templ->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::HandleScope scope(isolate); - i::ApiNatives::AddDataProperty(isolate, templ, Utils::OpenHandle(*name), + i::Isolate* i_isolate = templ->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + i::HandleScope scope(i_isolate); + i::ApiNatives::AddDataProperty(i_isolate, templ, Utils::OpenHandle(*name), intrinsic, static_cast(attribute)); } @@ -1712,7 +1676,6 @@ void ObjectTemplate::SetAccessor(v8::Local name, SideEffectType getter_side_effect_type, SideEffectType setter_side_effect_type) { TemplateSetAccessor(this, name, getter, setter, data, settings, attribute, - Local(), i::FLAG_disable_old_api_accessors, false, getter_side_effect_type, setter_side_effect_type); } @@ -1725,56 +1688,33 @@ void ObjectTemplate::SetAccessor(v8::Local name, SideEffectType getter_side_effect_type, SideEffectType setter_side_effect_type) { TemplateSetAccessor(this, name, getter, setter, data, settings, attribute, - Local(), i::FLAG_disable_old_api_accessors, false, getter_side_effect_type, setter_side_effect_type); } -void ObjectTemplate::SetAccessor(v8::Local name, - AccessorGetterCallback getter, - AccessorSetterCallback setter, - v8::Local data, AccessControl settings, - PropertyAttribute attribute, - v8::Local signature, - SideEffectType getter_side_effect_type, - SideEffectType setter_side_effect_type) { - TemplateSetAccessor(this, name, getter, setter, data, settings, attribute, - signature, i::FLAG_disable_old_api_accessors, false, - getter_side_effect_type, setter_side_effect_type); -} - -void ObjectTemplate::SetAccessor(v8::Local name, - AccessorNameGetterCallback getter, - AccessorNameSetterCallback setter, - v8::Local data, AccessControl settings, - PropertyAttribute attribute, - v8::Local signature, - SideEffectType getter_side_effect_type, - SideEffectType setter_side_effect_type) { - TemplateSetAccessor(this, name, getter, setter, data, settings, attribute, - signature, i::FLAG_disable_old_api_accessors, false, - getter_side_effect_type, setter_side_effect_type); -} - +namespace { template -static i::Handle CreateInterceptorInfo( - i::Isolate* isolate, Getter getter, Setter setter, Query query, +i::Handle CreateInterceptorInfo( + i::Isolate* i_isolate, Getter getter, Setter setter, Query query, Descriptor descriptor, Deleter remover, Enumerator enumerator, Definer definer, Local data, PropertyHandlerFlags flags) { - auto obj = i::Handle::cast(isolate->factory()->NewStruct( - i::INTERCEPTOR_INFO_TYPE, i::AllocationType::kOld)); + auto obj = + i::Handle::cast(i_isolate->factory()->NewStruct( + i::INTERCEPTOR_INFO_TYPE, i::AllocationType::kOld)); obj->set_flags(0); - if (getter != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_getter, getter); - if (setter != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_setter, setter); - if (query != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_query, query); + if (getter != nullptr) SET_FIELD_WRAPPED(i_isolate, obj, set_getter, getter); + if (setter != nullptr) SET_FIELD_WRAPPED(i_isolate, obj, set_setter, setter); + if (query != nullptr) SET_FIELD_WRAPPED(i_isolate, obj, set_query, query); if (descriptor != nullptr) - SET_FIELD_WRAPPED(isolate, obj, set_descriptor, descriptor); - if (remover != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_deleter, remover); + SET_FIELD_WRAPPED(i_isolate, obj, set_descriptor, descriptor); + if (remover != nullptr) + SET_FIELD_WRAPPED(i_isolate, obj, set_deleter, remover); if (enumerator != nullptr) - SET_FIELD_WRAPPED(isolate, obj, set_enumerator, enumerator); - if (definer != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_definer, definer); + SET_FIELD_WRAPPED(i_isolate, obj, set_enumerator, enumerator); + if (definer != nullptr) + SET_FIELD_WRAPPED(i_isolate, obj, set_definer, definer); obj->set_can_intercept_symbols( !(static_cast(flags) & static_cast(PropertyHandlerFlags::kOnlyInterceptStrings))); @@ -1787,7 +1727,7 @@ static i::Handle CreateInterceptorInfo( static_cast(PropertyHandlerFlags::kHasNoSideEffect)); if (data.IsEmpty()) { - data = v8::Undefined(reinterpret_cast(isolate)); + data = v8::Undefined(reinterpret_cast(i_isolate)); } obj->set_data(*Utils::OpenHandle(*data)); return obj; @@ -1795,46 +1735,47 @@ static i::Handle CreateInterceptorInfo( template -static i::Handle CreateNamedInterceptorInfo( - i::Isolate* isolate, Getter getter, Setter setter, Query query, +i::Handle CreateNamedInterceptorInfo( + i::Isolate* i_isolate, Getter getter, Setter setter, Query query, Descriptor descriptor, Deleter remover, Enumerator enumerator, Definer definer, Local data, PropertyHandlerFlags flags) { auto interceptor = - CreateInterceptorInfo(isolate, getter, setter, query, descriptor, remover, - enumerator, definer, data, flags); + CreateInterceptorInfo(i_isolate, getter, setter, query, descriptor, + remover, enumerator, definer, data, flags); interceptor->set_is_named(true); return interceptor; } template -static i::Handle CreateIndexedInterceptorInfo( - i::Isolate* isolate, Getter getter, Setter setter, Query query, +i::Handle CreateIndexedInterceptorInfo( + i::Isolate* i_isolate, Getter getter, Setter setter, Query query, Descriptor descriptor, Deleter remover, Enumerator enumerator, Definer definer, Local data, PropertyHandlerFlags flags) { auto interceptor = - CreateInterceptorInfo(isolate, getter, setter, query, descriptor, remover, - enumerator, definer, data, flags); + CreateInterceptorInfo(i_isolate, getter, setter, query, descriptor, + remover, enumerator, definer, data, flags); interceptor->set_is_named(false); return interceptor; } template -static void ObjectTemplateSetNamedPropertyHandler( +void ObjectTemplateSetNamedPropertyHandler( ObjectTemplate* templ, Getter getter, Setter setter, Query query, Descriptor descriptor, Deleter remover, Enumerator enumerator, Definer definer, Local data, PropertyHandlerFlags flags) { - i::Isolate* isolate = Utils::OpenHandle(templ)->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::HandleScope scope(isolate); - auto cons = EnsureConstructor(isolate, templ); + i::Isolate* i_isolate = Utils::OpenHandle(templ)->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + i::HandleScope scope(i_isolate); + auto cons = EnsureConstructor(i_isolate, templ); EnsureNotPublished(cons, "ObjectTemplateSetNamedPropertyHandler"); auto obj = - CreateNamedInterceptorInfo(isolate, getter, setter, query, descriptor, + CreateNamedInterceptorInfo(i_isolate, getter, setter, query, descriptor, remover, enumerator, definer, data, flags); - i::FunctionTemplateInfo::SetNamedPropertyHandler(isolate, cons, obj); + i::FunctionTemplateInfo::SetNamedPropertyHandler(i_isolate, cons, obj); } +} // namespace void ObjectTemplate::SetHandler( const NamedPropertyHandlerConfiguration& config) { @@ -1845,37 +1786,37 @@ void ObjectTemplate::SetHandler( } void ObjectTemplate::MarkAsUndetectable() { - i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::HandleScope scope(isolate); - auto cons = EnsureConstructor(isolate, this); + i::Isolate* i_isolate = Utils::OpenHandle(this)->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + i::HandleScope scope(i_isolate); + auto cons = EnsureConstructor(i_isolate, this); EnsureNotPublished(cons, "v8::ObjectTemplate::MarkAsUndetectable"); cons->set_undetectable(true); } void ObjectTemplate::SetAccessCheckCallback(AccessCheckCallback callback, Local data) { - i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::HandleScope scope(isolate); - auto cons = EnsureConstructor(isolate, this); + i::Isolate* i_isolate = Utils::OpenHandle(this)->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + i::HandleScope scope(i_isolate); + auto cons = EnsureConstructor(i_isolate, this); EnsureNotPublished(cons, "v8::ObjectTemplate::SetAccessCheckCallback"); - i::Handle struct_info = isolate->factory()->NewStruct( + i::Handle struct_info = i_isolate->factory()->NewStruct( i::ACCESS_CHECK_INFO_TYPE, i::AllocationType::kOld); i::Handle info = i::Handle::cast(struct_info); - SET_FIELD_WRAPPED(isolate, info, set_callback, callback); + SET_FIELD_WRAPPED(i_isolate, info, set_callback, callback); info->set_named_interceptor(i::Object()); info->set_indexed_interceptor(i::Object()); if (data.IsEmpty()) { - data = v8::Undefined(reinterpret_cast(isolate)); + data = v8::Undefined(reinterpret_cast(i_isolate)); } info->set_data(*Utils::OpenHandle(*data)); - i::FunctionTemplateInfo::SetAccessCheckInfo(isolate, cons, info); + i::FunctionTemplateInfo::SetAccessCheckInfo(i_isolate, cons, info); cons->set_needs_access_check(true); } @@ -1884,69 +1825,70 @@ void ObjectTemplate::SetAccessCheckCallbackAndHandler( const NamedPropertyHandlerConfiguration& named_handler, const IndexedPropertyHandlerConfiguration& indexed_handler, Local data) { - i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::HandleScope scope(isolate); - auto cons = EnsureConstructor(isolate, this); + i::Isolate* i_isolate = Utils::OpenHandle(this)->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + i::HandleScope scope(i_isolate); + auto cons = EnsureConstructor(i_isolate, this); EnsureNotPublished(cons, "v8::ObjectTemplate::SetAccessCheckCallbackWithHandler"); - i::Handle struct_info = isolate->factory()->NewStruct( + i::Handle struct_info = i_isolate->factory()->NewStruct( i::ACCESS_CHECK_INFO_TYPE, i::AllocationType::kOld); i::Handle info = i::Handle::cast(struct_info); - SET_FIELD_WRAPPED(isolate, info, set_callback, callback); + SET_FIELD_WRAPPED(i_isolate, info, set_callback, callback); auto named_interceptor = CreateNamedInterceptorInfo( - isolate, named_handler.getter, named_handler.setter, named_handler.query, - named_handler.descriptor, named_handler.deleter, named_handler.enumerator, - named_handler.definer, named_handler.data, named_handler.flags); + i_isolate, named_handler.getter, named_handler.setter, + named_handler.query, named_handler.descriptor, named_handler.deleter, + named_handler.enumerator, named_handler.definer, named_handler.data, + named_handler.flags); info->set_named_interceptor(*named_interceptor); auto indexed_interceptor = CreateIndexedInterceptorInfo( - isolate, indexed_handler.getter, indexed_handler.setter, + i_isolate, indexed_handler.getter, indexed_handler.setter, indexed_handler.query, indexed_handler.descriptor, indexed_handler.deleter, indexed_handler.enumerator, indexed_handler.definer, indexed_handler.data, indexed_handler.flags); info->set_indexed_interceptor(*indexed_interceptor); if (data.IsEmpty()) { - data = v8::Undefined(reinterpret_cast(isolate)); + data = v8::Undefined(reinterpret_cast(i_isolate)); } info->set_data(*Utils::OpenHandle(*data)); - i::FunctionTemplateInfo::SetAccessCheckInfo(isolate, cons, info); + i::FunctionTemplateInfo::SetAccessCheckInfo(i_isolate, cons, info); cons->set_needs_access_check(true); } void ObjectTemplate::SetHandler( const IndexedPropertyHandlerConfiguration& config) { - i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::HandleScope scope(isolate); - auto cons = EnsureConstructor(isolate, this); + i::Isolate* i_isolate = Utils::OpenHandle(this)->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + i::HandleScope scope(i_isolate); + auto cons = EnsureConstructor(i_isolate, this); EnsureNotPublished(cons, "v8::ObjectTemplate::SetHandler"); auto obj = CreateIndexedInterceptorInfo( - isolate, config.getter, config.setter, config.query, config.descriptor, + i_isolate, config.getter, config.setter, config.query, config.descriptor, config.deleter, config.enumerator, config.definer, config.data, config.flags); - i::FunctionTemplateInfo::SetIndexedPropertyHandler(isolate, cons, obj); + i::FunctionTemplateInfo::SetIndexedPropertyHandler(i_isolate, cons, obj); } void ObjectTemplate::SetCallAsFunctionHandler(FunctionCallback callback, Local data) { - i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::HandleScope scope(isolate); - auto cons = EnsureConstructor(isolate, this); + i::Isolate* i_isolate = Utils::OpenHandle(this)->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + i::HandleScope scope(i_isolate); + auto cons = EnsureConstructor(i_isolate, this); EnsureNotPublished(cons, "v8::ObjectTemplate::SetCallAsFunctionHandler"); - i::Handle obj = isolate->factory()->NewCallHandlerInfo(); - SET_FIELD_WRAPPED(isolate, obj, set_callback, callback); - SET_FIELD_WRAPPED(isolate, obj, set_js_callback, obj->redirected_callback()); + i::Handle obj = + i_isolate->factory()->NewCallHandlerInfo(); + obj->set_callback(i_isolate, reinterpret_cast(callback)); if (data.IsEmpty()) { - data = v8::Undefined(reinterpret_cast(isolate)); + data = v8::Undefined(reinterpret_cast(i_isolate)); } obj->set_data(*Utils::OpenHandle(*data)); - i::FunctionTemplateInfo::SetInstanceCallHandler(isolate, cons, obj); + i::FunctionTemplateInfo::SetInstanceCallHandler(i_isolate, cons, obj); } int ObjectTemplate::InternalFieldCount() const { @@ -1954,18 +1896,18 @@ int ObjectTemplate::InternalFieldCount() const { } void ObjectTemplate::SetInternalFieldCount(int value) { - i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); + i::Isolate* i_isolate = Utils::OpenHandle(this)->GetIsolate(); if (!Utils::ApiCheck(i::Smi::IsValid(value), "v8::ObjectTemplate::SetInternalFieldCount()", "Invalid embedder field count")) { return; } - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); if (value > 0) { // The embedder field count is set by the constructor function's // construct code, so we ensure that there is a constructor // function to do the setting. - EnsureConstructor(isolate, this); + EnsureConstructor(i_isolate, this); } Utils::OpenHandle(this)->set_embedder_field_count(value); } @@ -1976,8 +1918,8 @@ bool ObjectTemplate::IsImmutableProto() const { void ObjectTemplate::SetImmutableProto() { auto self = Utils::OpenHandle(this); - i::Isolate* isolate = self->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); + i::Isolate* i_isolate = self->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); self->set_immutable_proto(true); } @@ -1987,8 +1929,8 @@ bool ObjectTemplate::IsCodeLike() const { void ObjectTemplate::SetCodeLike() { auto self = Utils::OpenHandle(this); - i::Isolate* isolate = self->GetIsolate(); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); + i::Isolate* i_isolate = self->GetIsolate(); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); self->set_code_like(true); } @@ -2019,11 +1961,11 @@ ScriptCompiler::StreamedSource::~StreamedSource() = default; Local