From cbcfb975bd19fc9bda5af8ea40ba24429e6faeb4 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Tue, 22 Nov 2022 09:57:37 -0500 Subject: [PATCH 01/12] deps: update V8 to 10.9.194.4 --- deps/v8/.ycm_extra_conf.py | 37 +- deps/v8/AUTHORS | 2 + deps/v8/BUILD.bazel | 32 +- deps/v8/BUILD.gn | 47 +- deps/v8/DEPS | 45 +- deps/v8/OWNERS | 1 + deps/v8/bazel/defs.bzl | 9 +- deps/v8/gni/snapshot_toolchain.gni | 23 +- deps/v8/include/cppgc/README.md | 2 + deps/v8/include/cppgc/heap-handle.h | 5 + deps/v8/include/cppgc/platform.h | 10 +- deps/v8/include/js_protocol.pdl | 5 +- deps/v8/include/v8-array-buffer.h | 18 + deps/v8/include/v8-callbacks.h | 3 +- deps/v8/include/v8-context.h | 3 + deps/v8/include/v8-cppgc.h | 7 +- deps/v8/include/v8-data.h | 2 +- deps/v8/include/v8-embedder-heap.h | 2 +- deps/v8/include/v8-internal.h | 2 + deps/v8/include/v8-isolate.h | 10 +- deps/v8/include/v8-microtask-queue.h | 5 + deps/v8/include/v8-persistent-handle.h | 2 +- deps/v8/include/v8-platform.h | 1 + deps/v8/include/v8-profiler.h | 79 +- deps/v8/include/v8-traced-handle.h | 4 +- deps/v8/include/v8-value.h | 5 + deps/v8/include/v8-version.h | 6 +- deps/v8/include/v8config.h | 15 + deps/v8/infra/testing/builders.pyl | 12 +- deps/v8/src/api/api-natives.cc | 4 + deps/v8/src/api/api.cc | 104 +- deps/v8/src/asmjs/asm-js.cc | 10 +- deps/v8/src/asmjs/asm-parser.cc | 2 +- deps/v8/src/asmjs/asm-scanner.cc | 2 +- deps/v8/src/ast/scopes.cc | 4 +- deps/v8/src/base/container-utils.h | 28 + deps/v8/src/base/logging.h | 7 + deps/v8/src/base/platform/memory.h | 15 +- deps/v8/src/base/platform/mutex.h | 1 - .../baseline/ppc/baseline-assembler-ppc-inl.h | 16 +- deps/v8/src/builtins/arm/builtins-arm.cc | 127 +- deps/v8/src/builtins/arm64/builtins-arm64.cc | 161 +- deps/v8/src/builtins/array-to-sorted.tq | 3 +- deps/v8/src/builtins/base.tq | 5 +- deps/v8/src/builtins/builtins-arraybuffer.cc | 11 +- deps/v8/src/builtins/builtins-bigint-gen.h | 15 + deps/v8/src/builtins/builtins-bigint.tq | 66 + .../src/builtins/builtins-collections-gen.cc | 2 +- deps/v8/src/builtins/builtins-definitions.h | 5 +- deps/v8/src/builtins/builtins-intl-gen.cc | 127 +- deps/v8/src/builtins/builtins-intl.cc | 45 +- deps/v8/src/builtins/builtins-object-gen.cc | 33 +- deps/v8/src/builtins/builtins-struct.cc | 47 +- .../src/builtins/builtins-typed-array-gen.cc | 2 + deps/v8/src/builtins/builtins-wasm-gen.cc | 54 - deps/v8/src/builtins/builtins.cc | 3 - deps/v8/src/builtins/ia32/builtins-ia32.cc | 178 +- .../src/builtins/loong64/builtins-loong64.cc | 139 +- .../v8/src/builtins/mips64/builtins-mips64.cc | 140 +- deps/v8/src/builtins/number.tq | 3 +- deps/v8/src/builtins/ppc/builtins-ppc.cc | 144 +- .../builtins/promise-all-element-closure.tq | 6 + deps/v8/src/builtins/promise-all.tq | 21 +- deps/v8/src/builtins/riscv/builtins-riscv.cc | 141 +- deps/v8/src/builtins/s390/builtins-s390.cc | 133 +- .../builtins/typed-array-createtypedarray.tq | 17 +- deps/v8/src/builtins/typed-array-from.tq | 6 +- deps/v8/src/builtins/wasm.tq | 36 +- deps/v8/src/builtins/x64/builtins-x64.cc | 153 +- deps/v8/src/codegen/OWNERS | 1 + .../v8/src/codegen/arm/macro-assembler-arm.cc | 7 - .../codegen/arm64/macro-assembler-arm64.cc | 19 +- deps/v8/src/codegen/background-merge-task.h | 10 +- deps/v8/src/codegen/code-stub-assembler.cc | 56 +- deps/v8/src/codegen/code-stub-assembler.h | 33 +- deps/v8/src/codegen/compiler.cc | 29 +- deps/v8/src/codegen/external-reference.cc | 24 +- deps/v8/src/codegen/external-reference.h | 9 +- .../src/codegen/ia32/macro-assembler-ia32.cc | 7 - .../src/codegen/interface-descriptors-inl.h | 8 + deps/v8/src/codegen/interface-descriptors.h | 35 +- .../src/codegen/loong64/constants-loong64.h | 3 +- .../loong64/macro-assembler-loong64.cc | 10 +- deps/v8/src/codegen/mips64/constants-mips64.h | 164 +- .../codegen/mips64/macro-assembler-mips64.cc | 10 +- .../src/codegen/pending-optimization-table.cc | 119 +- .../src/codegen/pending-optimization-table.h | 46 +- deps/v8/src/codegen/ppc/assembler-ppc.cc | 7 +- .../v8/src/codegen/ppc/macro-assembler-ppc.cc | 298 +- deps/v8/src/codegen/ppc/macro-assembler-ppc.h | 121 +- deps/v8/src/codegen/ppc/register-ppc.h | 30 +- .../codegen/riscv/macro-assembler-riscv.cc | 9 +- .../src/codegen/s390/macro-assembler-s390.cc | 7 - deps/v8/src/codegen/tnode.h | 21 +- deps/v8/src/codegen/x64/assembler-x64.cc | 10 + deps/v8/src/codegen/x64/assembler-x64.h | 1 + .../v8/src/codegen/x64/macro-assembler-x64.cc | 76 +- deps/v8/src/codegen/x64/macro-assembler-x64.h | 6 +- deps/v8/src/common/checks.h | 2 +- deps/v8/src/common/code-memory-access-inl.h | 4 +- deps/v8/src/common/globals.h | 21 +- deps/v8/src/common/message-template.h | 2 + deps/v8/src/compiler/access-builder.cc | 29 + deps/v8/src/compiler/access-builder.h | 6 + .../backend/arm64/code-generator-arm64.cc | 14 +- .../arm64/instruction-selector-arm64.cc | 12 +- .../v8/src/compiler/backend/bitcast-elider.cc | 62 + deps/v8/src/compiler/backend/bitcast-elider.h | 41 + .../compiler/backend/instruction-selector.cc | 5 + .../backend/ppc/code-generator-ppc.cc | 441 +-- deps/v8/src/compiler/branch-elimination.cc | 30 +- deps/v8/src/compiler/branch-elimination.h | 2 + .../v8/src/compiler/bytecode-graph-builder.cc | 8 + deps/v8/src/compiler/code-assembler.h | 1 + deps/v8/src/compiler/common-operator.cc | 103 +- deps/v8/src/compiler/common-operator.h | 71 +- deps/v8/src/compiler/diamond.h | 6 +- .../src/compiler/effect-control-linearizer.cc | 274 +- deps/v8/src/compiler/fast-api-calls.cc | 16 + deps/v8/src/compiler/frame-states.cc | 16 + deps/v8/src/compiler/frame-states.h | 5 + deps/v8/src/compiler/graph-assembler.cc | 472 +++- deps/v8/src/compiler/graph-assembler.h | 546 +++- deps/v8/src/compiler/heap-refs.cc | 7 + deps/v8/src/compiler/heap-refs.h | 29 +- deps/v8/src/compiler/js-call-reducer.cc | 699 ++--- deps/v8/src/compiler/js-call-reducer.h | 11 +- .../js-native-context-specialization.cc | 93 +- .../js-native-context-specialization.h | 6 +- deps/v8/src/compiler/js-operator.cc | 22 +- deps/v8/src/compiler/js-operator.h | 9 +- deps/v8/src/compiler/js-type-hint-lowering.cc | 3 + deps/v8/src/compiler/js-typed-lowering.cc | 3 +- deps/v8/src/compiler/linkage.cc | 1 + deps/v8/src/compiler/loop-analysis.cc | 5 +- .../src/compiler/machine-operator-reducer.cc | 54 +- .../src/compiler/machine-operator-reducer.h | 2 + deps/v8/src/compiler/memory-optimizer.cc | 3 +- deps/v8/src/compiler/node.cc | 1 - deps/v8/src/compiler/node.h | 7 + deps/v8/src/compiler/opcodes.h | 82 +- deps/v8/src/compiler/operation-typer.cc | 22 +- deps/v8/src/compiler/operation-typer.h | 21 + deps/v8/src/compiler/pipeline.cc | 101 +- deps/v8/src/compiler/raw-machine-assembler.h | 1 + .../v8/src/compiler/redundancy-elimination.cc | 13 +- deps/v8/src/compiler/representation-change.cc | 75 +- deps/v8/src/compiler/representation-change.h | 2 + .../compiler/simplified-lowering-verifier.cc | 158 +- .../compiler/simplified-lowering-verifier.h | 47 +- deps/v8/src/compiler/simplified-lowering.cc | 413 +-- deps/v8/src/compiler/simplified-operator.cc | 27 +- deps/v8/src/compiler/simplified-operator.h | 15 +- deps/v8/src/compiler/turboshaft/assembler.h | 441 ++- .../turboshaft/decompression-optimization.cc | 21 +- .../src/compiler/turboshaft/graph-builder.cc | 196 +- .../compiler/turboshaft/graph-visualizer.cc | 14 +- deps/v8/src/compiler/turboshaft/graph.h | 39 +- ...mbler.h => machine-optimization-reducer.h} | 1128 ++++---- .../compiler/turboshaft/operation-matching.h | 8 +- deps/v8/src/compiler/turboshaft/operations.cc | 88 +- deps/v8/src/compiler/turboshaft/operations.h | 306 +- .../compiler/turboshaft/optimization-phase.h | 517 ++-- .../compiler/turboshaft/recreate-schedule.cc | 128 +- .../turboshaft/select-lowering-reducer.h | 93 + deps/v8/src/compiler/turboshaft/sidetable.h | 2 +- .../src/compiler/turboshaft/snapshot-table.h | 411 +++ deps/v8/src/compiler/turboshaft/utils.cc | 4 +- ...-assembler.h => value-numbering-reducer.h} | 77 +- deps/v8/src/compiler/typer.cc | 155 +- deps/v8/src/compiler/types.h | 5 +- deps/v8/src/compiler/verifier.cc | 48 +- .../src/compiler/wasm-compiler-definitions.h | 18 +- deps/v8/src/compiler/wasm-compiler.cc | 363 ++- deps/v8/src/compiler/wasm-compiler.h | 33 +- deps/v8/src/compiler/wasm-gc-lowering.cc | 144 +- deps/v8/src/compiler/wasm-gc-lowering.h | 5 +- .../src/compiler/wasm-gc-operator-reducer.cc | 62 +- deps/v8/src/compiler/wasm-graph-assembler.h | 9 +- deps/v8/src/compiler/wasm-inlining.cc | 49 +- deps/v8/src/compiler/wasm-typer.cc | 17 +- deps/v8/src/d8/d8-platforms.h | 2 +- deps/v8/src/d8/d8-test.cc | 76 +- deps/v8/src/d8/d8.cc | 29 +- deps/v8/src/d8/d8.h | 4 +- deps/v8/src/debug/debug-evaluate.cc | 6 +- deps/v8/src/debug/debug-frames.h | 2 +- deps/v8/src/debug/debug-interface.cc | 21 +- deps/v8/src/debug/debug-interface.h | 23 +- deps/v8/src/debug/debug-scopes.cc | 41 +- deps/v8/src/debug/debug-scopes.h | 2 +- deps/v8/src/debug/debug.cc | 121 +- deps/v8/src/debug/debug.h | 21 +- deps/v8/src/debug/liveedit.cc | 4 +- deps/v8/src/deoptimizer/OWNERS | 1 + deps/v8/src/deoptimizer/deoptimize-reason.h | 1 + deps/v8/src/deoptimizer/deoptimizer.cc | 4 +- deps/v8/src/diagnostics/ia32/disasm-ia32.cc | 8 +- deps/v8/src/diagnostics/objects-debug.cc | 4 +- deps/v8/src/diagnostics/objects-printer.cc | 3 +- deps/v8/src/diagnostics/x64/disasm-x64.cc | 8 +- deps/v8/src/execution/arguments-inl.h | 8 + deps/v8/src/execution/arguments.h | 2 + .../src/execution/arm/frame-constants-arm.h | 13 +- .../execution/arm64/frame-constants-arm64.h | 18 +- deps/v8/src/execution/frames-inl.h | 2 +- deps/v8/src/execution/frames.cc | 72 +- deps/v8/src/execution/frames.h | 20 +- .../src/execution/ia32/frame-constants-ia32.h | 11 +- deps/v8/src/execution/isolate-inl.h | 18 + deps/v8/src/execution/isolate.cc | 92 +- deps/v8/src/execution/isolate.h | 41 +- .../loong64/frame-constants-loong64.h | 8 +- deps/v8/src/execution/microtask-queue.cc | 2 +- .../execution/mips64/frame-constants-mips64.h | 8 +- .../src/execution/ppc/frame-constants-ppc.h | 17 +- .../execution/riscv/frame-constants-riscv.h | 4 +- .../src/execution/s390/frame-constants-s390.h | 11 +- deps/v8/src/execution/thread-local-top.cc | 2 + deps/v8/src/execution/thread-local-top.h | 6 +- deps/v8/src/execution/tiering-manager.cc | 50 +- .../src/execution/x64/frame-constants-x64.h | 13 +- deps/v8/src/flags/flag-definitions.h | 94 +- deps/v8/src/flags/flags.h | 4 - deps/v8/src/handles/global-handles-inl.h | 6 - deps/v8/src/handles/global-handles.cc | 416 +-- deps/v8/src/handles/global-handles.h | 56 - deps/v8/src/handles/traced-handles.cc | 1014 +++++++ deps/v8/src/handles/traced-handles.h | 96 + deps/v8/src/heap/OWNERS | 1 + deps/v8/src/heap/base-space.cc | 2 - .../heap/base/asm/arm/push_registers_asm.cc | 39 - .../heap/base/asm/arm/save_registers_asm.cc | 36 + .../heap/base/asm/arm64/push_registers_asm.cc | 62 - .../heap/base/asm/arm64/push_registers_masm.S | 32 - .../heap/base/asm/arm64/save_registers_asm.cc | 50 + .../heap/base/asm/arm64/save_registers_masm.S | 24 + .../heap/base/asm/ia32/push_registers_asm.cc | 53 - .../base/asm/ia32/push_registers_masm.asm | 48 - .../heap/base/asm/ia32/save_registers_asm.cc | 48 + .../base/asm/ia32/save_registers_masm.asm | 36 + .../base/asm/loong64/push_registers_asm.cc | 48 - .../base/asm/loong64/save_registers_asm.cc | 40 + .../base/asm/mips64/push_registers_asm.cc | 49 - .../base/asm/mips64/save_registers_asm.cc | 41 + .../heap/base/asm/ppc/push_registers_asm.cc | 94 - .../heap/base/asm/ppc/save_registers_asm.cc | 110 + .../heap/base/asm/riscv/push_registers_asm.cc | 93 - .../heap/base/asm/riscv/save_registers_asm.cc | 68 + .../heap/base/asm/s390/push_registers_asm.cc | 35 - .../heap/base/asm/s390/save_registers_asm.cc | 32 + .../heap/base/asm/x64/push_registers_asm.cc | 106 - .../heap/base/asm/x64/push_registers_masm.asm | 57 - .../heap/base/asm/x64/save_registers_asm.cc | 94 + .../heap/base/asm/x64/save_registers_masm.asm | 43 + deps/v8/src/heap/base/stack.cc | 143 +- deps/v8/src/heap/base/stack.h | 74 +- deps/v8/src/heap/combined-heap.h | 2 +- deps/v8/src/heap/concurrent-allocator.cc | 2 +- deps/v8/src/heap/cppgc-js/cpp-heap.cc | 61 +- deps/v8/src/heap/cppgc-js/cpp-heap.h | 4 +- .../cppgc-js/unified-heap-marking-state-inl.h | 11 +- deps/v8/src/heap/cppgc/heap-base.cc | 45 +- deps/v8/src/heap/cppgc/heap-base.h | 4 +- deps/v8/src/heap/cppgc/heap.cc | 3 - deps/v8/src/heap/cppgc/marker.cc | 4 +- deps/v8/src/heap/cppgc/marking-verifier.cc | 3 +- deps/v8/src/heap/cppgc/marking-visitor.cc | 8 + deps/v8/src/heap/cppgc/platform.cc | 54 +- deps/v8/src/heap/cppgc/platform.h | 10 +- deps/v8/src/heap/cppgc/remembered-set.cc | 59 +- deps/v8/src/heap/cppgc/remembered-set.h | 14 +- deps/v8/src/heap/cppgc/visitor.cc | 20 +- deps/v8/src/heap/cppgc/visitor.h | 1 + deps/v8/src/heap/evacuation-allocator-inl.h | 6 - deps/v8/src/heap/evacuation-allocator.h | 4 - deps/v8/src/heap/evacuation-verifier.cc | 7 +- deps/v8/src/heap/factory-base.cc | 4 +- deps/v8/src/heap/factory.cc | 38 +- deps/v8/src/heap/factory.h | 8 +- deps/v8/src/heap/free-list.cc | 69 +- deps/v8/src/heap/free-list.h | 45 +- deps/v8/src/heap/gc-tracer-inl.h | 4 +- deps/v8/src/heap/gc-tracer.cc | 77 +- deps/v8/src/heap/gc-tracer.h | 14 +- .../src/heap/global-handle-marking-visitor.cc | 5 +- .../src/heap/global-handle-marking-visitor.h | 4 +- deps/v8/src/heap/heap-allocator-inl.h | 11 +- deps/v8/src/heap/heap-allocator.cc | 7 - deps/v8/src/heap/heap-allocator.h | 3 - deps/v8/src/heap/heap-inl.h | 21 +- deps/v8/src/heap/heap-verifier.cc | 47 +- deps/v8/src/heap/heap-verifier.h | 9 + deps/v8/src/heap/heap.cc | 399 ++- deps/v8/src/heap/heap.h | 80 +- deps/v8/src/heap/incremental-marking.cc | 7 +- deps/v8/src/heap/large-spaces.cc | 3 +- deps/v8/src/heap/local-heap.cc | 10 +- deps/v8/src/heap/local-heap.h | 7 +- deps/v8/src/heap/mark-compact-inl.h | 3 + deps/v8/src/heap/mark-compact.cc | 711 ++--- deps/v8/src/heap/mark-compact.h | 8 +- deps/v8/src/heap/marking-barrier.cc | 214 +- deps/v8/src/heap/marking-barrier.h | 6 - deps/v8/src/heap/marking-visitor-inl.h | 6 +- deps/v8/src/heap/memory-chunk.cc | 16 + deps/v8/src/heap/memory-chunk.h | 3 + deps/v8/src/heap/new-spaces.cc | 3 +- deps/v8/src/heap/new-spaces.h | 2 +- deps/v8/src/heap/paged-spaces-inl.h | 50 +- deps/v8/src/heap/paged-spaces.cc | 70 +- deps/v8/src/heap/paged-spaces.h | 89 - deps/v8/src/heap/pretenuring-handler-inl.h | 9 +- deps/v8/src/heap/pretenuring-handler.cc | 39 +- deps/v8/src/heap/pretenuring-handler.h | 2 - deps/v8/src/heap/safepoint.cc | 32 +- deps/v8/src/heap/safepoint.h | 20 +- deps/v8/src/heap/scavenger-inl.h | 29 +- deps/v8/src/heap/scavenger.cc | 30 +- deps/v8/src/heap/scavenger.h | 28 +- deps/v8/src/heap/setup-heap-internal.cc | 2 +- deps/v8/src/heap/spaces-inl.h | 9 - deps/v8/src/heap/sweeper.cc | 139 +- deps/v8/src/heap/sweeper.h | 17 +- deps/v8/src/ic/accessor-assembler.cc | 11 +- deps/v8/src/ic/binary-op-assembler.cc | 128 +- deps/v8/src/init/bootstrapper.cc | 60 +- deps/v8/src/init/heap-symbols.h | 78 +- deps/v8/src/init/v8.cc | 6 +- deps/v8/src/inspector/custom-preview.cc | 2 +- deps/v8/src/inspector/injected-script.cc | 2 +- deps/v8/src/inspector/inspected-context.cc | 6 +- deps/v8/src/inspector/v8-console.cc | 10 +- .../src/inspector/v8-debugger-agent-impl.cc | 16 +- .../v8/src/inspector/v8-debugger-agent-impl.h | 3 - deps/v8/src/inspector/v8-debugger.cc | 27 +- deps/v8/src/inspector/v8-debugger.h | 8 +- deps/v8/src/inspector/v8-inspector-impl.cc | 4 +- deps/v8/src/inspector/v8-regex.cc | 2 +- .../v8/src/inspector/v8-runtime-agent-impl.cc | 17 +- deps/v8/src/inspector/v8-runtime-agent-impl.h | 1 + deps/v8/src/inspector/value-mirror.cc | 10 +- deps/v8/src/interpreter/bytecode-register.h | 3 +- deps/v8/src/logging/counters-definitions.h | 5 +- deps/v8/src/logging/log.cc | 7 +- deps/v8/src/logging/runtime-call-stats.h | 1 + deps/v8/src/maglev/maglev-assembler-inl.h | 17 +- deps/v8/src/maglev/maglev-assembler.cc | 339 +++ deps/v8/src/maglev/maglev-assembler.h | 99 +- deps/v8/src/maglev/maglev-basic-block.h | 31 +- deps/v8/src/maglev/maglev-code-gen-state.h | 7 +- deps/v8/src/maglev/maglev-code-generator.cc | 857 ++++-- deps/v8/src/maglev/maglev-code-generator.h | 44 +- deps/v8/src/maglev/maglev-compilation-info.cc | 18 +- deps/v8/src/maglev/maglev-compilation-info.h | 27 +- deps/v8/src/maglev/maglev-compilation-unit.cc | 2 - deps/v8/src/maglev/maglev-compilation-unit.h | 4 - deps/v8/src/maglev/maglev-compiler.cc | 393 +-- .../maglev/maglev-concurrent-dispatcher.cc | 5 + deps/v8/src/maglev/maglev-graph-builder.cc | 1462 ++++++++-- deps/v8/src/maglev/maglev-graph-builder.h | 361 ++- deps/v8/src/maglev/maglev-graph-printer.cc | 169 +- deps/v8/src/maglev/maglev-graph-verifier.h | 45 +- .../maglev/maglev-interpreter-frame-state.cc | 16 +- .../maglev/maglev-interpreter-frame-state.h | 246 +- deps/v8/src/maglev/maglev-ir-inl.h | 63 +- deps/v8/src/maglev/maglev-ir.cc | 1025 ++++--- deps/v8/src/maglev/maglev-ir.h | 1049 +++++-- deps/v8/src/maglev/maglev-regalloc.cc | 89 +- deps/v8/src/maglev/maglev-regalloc.h | 36 + deps/v8/src/numbers/math-random.cc | 4 +- deps/v8/src/objects/bigint.cc | 23 + deps/v8/src/objects/bigint.h | 3 + deps/v8/src/objects/call-site-info-inl.h | 2 +- deps/v8/src/objects/code-inl.h | 136 +- deps/v8/src/objects/code.h | 24 +- deps/v8/src/objects/contexts.cc | 1 - deps/v8/src/objects/descriptor-array.h | 8 +- deps/v8/src/objects/elements-kind.cc | 99 +- deps/v8/src/objects/elements-kind.h | 60 +- deps/v8/src/objects/elements.cc | 6 +- deps/v8/src/objects/feedback-vector.cc | 2 +- deps/v8/src/objects/fixed-array-inl.h | 2 - deps/v8/src/objects/fixed-array.h | 13 - deps/v8/src/objects/hash-table-inl.h | 1 + deps/v8/src/objects/heap-object.h | 4 + deps/v8/src/objects/instance-type-inl.h | 3 +- deps/v8/src/objects/instance-type.h | 2 - deps/v8/src/objects/js-array-buffer-inl.h | 13 +- deps/v8/src/objects/js-array-buffer.cc | 48 +- deps/v8/src/objects/js-array-buffer.h | 14 +- deps/v8/src/objects/js-array-buffer.tq | 1 + deps/v8/src/objects/js-array-inl.h | 9 +- deps/v8/src/objects/js-array.h | 11 +- deps/v8/src/objects/js-array.tq | 8 + deps/v8/src/objects/js-function.cc | 1 + deps/v8/src/objects/js-regexp.h | 2 +- deps/v8/src/objects/js-temporal-objects.cc | 33 +- deps/v8/src/objects/keys.cc | 121 +- deps/v8/src/objects/keys.h | 17 +- deps/v8/src/objects/lookup.cc | 4 +- deps/v8/src/objects/object-list-macros.h | 2 +- .../objects/objects-body-descriptors-inl.h | 2 +- deps/v8/src/objects/objects-definitions.h | 2 - deps/v8/src/objects/objects-inl.h | 32 +- deps/v8/src/objects/objects.cc | 13 +- deps/v8/src/objects/objects.h | 2 +- deps/v8/src/objects/scope-info.cc | 11 +- deps/v8/src/objects/scope-info.h | 10 +- deps/v8/src/objects/shared-function-info.cc | 25 +- .../v8/src/objects/string-forwarding-table.cc | 2 +- deps/v8/src/objects/string-table.cc | 2 +- .../v8/src/objects/swiss-hash-table-helpers.h | 83 - deps/v8/src/objects/tagged-field.h | 2 +- deps/v8/src/objects/template-objects-inl.h | 1 - deps/v8/src/objects/template-objects.cc | 128 +- deps/v8/src/objects/template-objects.h | 15 - deps/v8/src/objects/template-objects.tq | 6 - deps/v8/src/objects/turbofan-types.tq | 9 +- deps/v8/src/objects/value-serializer.cc | 18 +- deps/v8/src/objects/visitors.h | 1 + .../src/profiler/heap-snapshot-generator.cc | 115 +- .../v8/src/profiler/heap-snapshot-generator.h | 4 +- deps/v8/src/profiler/output-stream-writer.h | 129 + deps/v8/src/profiler/profile-generator.cc | 156 ++ deps/v8/src/profiler/profile-generator.h | 26 + deps/v8/src/regexp/gen-regexp-special-case.cc | 48 + deps/v8/src/regexp/regexp-ast.h | 9 + deps/v8/src/regexp/regexp-compiler-tonode.cc | 36 +- deps/v8/src/regexp/regexp-parser.cc | 3 +- deps/v8/src/regexp/special-case.h | 10 + deps/v8/src/roots/roots.h | 4 +- deps/v8/src/runtime/runtime-debug.cc | 8 + deps/v8/src/runtime/runtime-intl.cc | 12 + deps/v8/src/runtime/runtime-scopes.cc | 14 +- deps/v8/src/runtime/runtime-test.cc | 192 +- deps/v8/src/runtime/runtime-typedarray.cc | 21 +- deps/v8/src/runtime/runtime-wasm.cc | 47 +- deps/v8/src/runtime/runtime.h | 13 +- .../src/sandbox/external-pointer-table-inl.h | 9 +- deps/v8/src/snapshot/context-serializer.cc | 11 +- deps/v8/src/snapshot/deserializer.cc | 35 +- deps/v8/src/snapshot/deserializer.h | 5 - deps/v8/src/snapshot/references.h | 3 +- .../v8/src/snapshot/serializer-deserializer.h | 4 +- deps/v8/src/snapshot/serializer.cc | 27 +- deps/v8/src/snapshot/snapshot.cc | 20 +- deps/v8/src/snapshot/snapshot.h | 8 +- deps/v8/src/snapshot/startup-serializer.cc | 1 + .../src/trap-handler/handler-inside-posix.cc | 4 + .../v8/src/trap-handler/handler-inside-win.cc | 4 + .../trap-handler/handler-outside-simulator.cc | 15 +- deps/v8/src/trap-handler/trap-handler.h | 16 +- deps/v8/src/utils/allocation.cc | 12 +- deps/v8/src/utils/allocation.h | 4 + deps/v8/src/utils/ostreams.h | 11 + .../wasm/baseline/arm/liftoff-assembler-arm.h | 21 + .../baseline/arm64/liftoff-assembler-arm64.h | 66 +- .../baseline/ia32/liftoff-assembler-ia32.h | 16 + .../wasm/baseline/liftoff-assembler-defs.h | 38 +- deps/v8/src/wasm/baseline/liftoff-assembler.h | 1 + deps/v8/src/wasm/baseline/liftoff-compiler.cc | 562 ++-- .../loong64/liftoff-assembler-loong64.h | 25 +- .../mips64/liftoff-assembler-mips64.h | 25 +- .../wasm/baseline/ppc/liftoff-assembler-ppc.h | 520 ++-- .../baseline/riscv/liftoff-assembler-riscv.h | 20 + .../riscv/liftoff-assembler-riscv32.h | 5 +- .../riscv/liftoff-assembler-riscv64.h | 5 +- .../baseline/s390/liftoff-assembler-s390.h | 35 +- .../wasm/baseline/x64/liftoff-assembler-x64.h | 26 +- .../src/wasm/constant-expression-interface.cc | 43 +- .../src/wasm/constant-expression-interface.h | 9 +- deps/v8/src/wasm/constant-expression.cc | 4 +- deps/v8/src/wasm/decoder.h | 196 +- deps/v8/src/wasm/function-body-decoder-impl.h | 1932 +++++++------ deps/v8/src/wasm/function-body-decoder.cc | 68 +- deps/v8/src/wasm/function-body-decoder.h | 13 +- deps/v8/src/wasm/function-compiler.cc | 11 + deps/v8/src/wasm/graph-builder-interface.cc | 326 ++- deps/v8/src/wasm/module-compiler.cc | 255 +- deps/v8/src/wasm/module-compiler.h | 7 +- deps/v8/src/wasm/module-decoder-impl.h | 384 +-- deps/v8/src/wasm/module-decoder.cc | 5 +- deps/v8/src/wasm/module-decoder.h | 3 +- deps/v8/src/wasm/module-instantiate.cc | 29 +- deps/v8/src/wasm/names-provider.cc | 8 +- deps/v8/src/wasm/names-provider.h | 8 +- deps/v8/src/wasm/pgo.cc | 82 +- deps/v8/src/wasm/pgo.h | 32 +- deps/v8/src/wasm/string-builder-multiline.h | 4 +- deps/v8/src/wasm/string-builder.h | 5 + deps/v8/src/wasm/value-type.h | 35 +- deps/v8/src/wasm/wasm-arguments.h | 4 +- deps/v8/src/wasm/wasm-code-manager.cc | 5 +- deps/v8/src/wasm/wasm-code-manager.h | 9 +- deps/v8/src/wasm/wasm-constants.h | 16 +- deps/v8/src/wasm/wasm-disassembler-impl.h | 14 +- deps/v8/src/wasm/wasm-disassembler.cc | 140 +- deps/v8/src/wasm/wasm-engine.cc | 94 +- deps/v8/src/wasm/wasm-engine.h | 9 + deps/v8/src/wasm/wasm-external-refs.cc | 77 +- deps/v8/src/wasm/wasm-external-refs.h | 6 +- deps/v8/src/wasm/wasm-feature-flags.h | 28 +- deps/v8/src/wasm/wasm-features.cc | 7 +- deps/v8/src/wasm/wasm-features.h | 7 +- deps/v8/src/wasm/wasm-import-wrapper-cache.h | 4 +- deps/v8/src/wasm/wasm-js.cc | 165 +- deps/v8/src/wasm/wasm-module.h | 54 +- deps/v8/src/wasm/wasm-objects-inl.h | 4 +- deps/v8/src/wasm/wasm-objects.cc | 99 +- deps/v8/src/wasm/wasm-objects.h | 5 +- deps/v8/src/wasm/wasm-opcodes.h | 16 +- deps/v8/src/wasm/wasm-subtyping.cc | 74 +- deps/v8/src/web-snapshot/web-snapshot.cc | 2 +- deps/v8/src/zone/accounting-allocator.cc | 6 +- deps/v8/src/zone/zone-handle-set.h | 6 + deps/v8/test/cctest/BUILD.gn | 1 + deps/v8/test/cctest/cctest.cc | 24 +- deps/v8/test/cctest/cctest.h | 23 +- deps/v8/test/cctest/cctest.status | 1 + .../compiler/test-representation-change.cc | 2 + deps/v8/test/cctest/heap/heap-utils.cc | 90 +- deps/v8/test/cctest/heap/test-alloc.cc | 2 +- .../cctest/heap/test-array-buffer-tracker.cc | 2 +- .../cctest/heap/test-concurrent-allocation.cc | 67 +- deps/v8/test/cctest/heap/test-heap.cc | 70 +- .../cctest/heap/test-incremental-marking.cc | 2 +- deps/v8/test/cctest/heap/test-iterators.cc | 32 +- deps/v8/test/cctest/heap/test-mark-compact.cc | 6 +- deps/v8/test/cctest/heap/test-spaces.cc | 3 +- deps/v8/test/cctest/jsonstream-helper.h | 61 + deps/v8/test/cctest/test-allocation.cc | 6 +- deps/v8/test/cctest/test-api-array-buffer.cc | 6 +- deps/v8/test/cctest/test-api.cc | 94 +- .../test/cctest/test-code-stub-assembler.cc | 2 +- deps/v8/test/cctest/test-cpu-profiler.cc | 60 + deps/v8/test/cctest/test-debug.cc | 170 +- deps/v8/test/cctest/test-heap-profiler.cc | 120 +- deps/v8/test/cctest/test-serialize.cc | 122 +- .../v8/test/cctest/wasm/test-backing-store.cc | 2 +- deps/v8/test/cctest/wasm/test-gc.cc | 160 +- .../cctest/wasm/test-liftoff-inspection.cc | 8 +- .../test/cctest/wasm/test-run-wasm-atomics.cc | 27 - .../cctest/wasm/test-run-wasm-atomics64.cc | 42 - .../cctest/wasm/test-run-wasm-exceptions.cc | 25 - .../cctest/wasm/test-run-wasm-relaxed-simd.cc | 30 + .../cctest/wasm/test-run-wasm-simd-liftoff.cc | 26 +- .../v8/test/cctest/wasm/test-run-wasm-simd.cc | 634 ++--- deps/v8/test/cctest/wasm/wasm-run-utils.cc | 11 +- deps/v8/test/common/flag-utils.h | 6 +- deps/v8/test/common/wasm/wasm-interpreter.cc | 250 +- deps/v8/test/common/wasm/wasm-interpreter.h | 5 +- deps/v8/test/common/wasm/wasm-macro-gen.h | 14 +- deps/v8/test/fuzzer/fuzzer-support.cc | 6 +- deps/v8/test/fuzzer/multi-return.cc | 2 +- deps/v8/test/fuzzer/regexp-builtins.cc | 2 +- deps/v8/test/fuzzer/wasm-compile.cc | 28 +- deps/v8/test/fuzzer/wasm-fuzzer-common.cc | 51 +- .../console-profile-wasm-expected.txt | 12 +- .../cpu-profiler/console-profile-wasm.js | 129 +- .../debugger/break-on-exception-expected.txt | 21 +- .../inspector/debugger/break-on-exception.js | 9 + ...uate-on-call-frame-new-target-expected.txt | 42 + .../evaluate-on-call-frame-new-target.js | 83 + .../pause-on-instrumentation-expected.txt | 10 + .../debugger/pause-on-instrumentation.js | 56 + ...locklists-not-inside-function-expected.txt | 17 + ...e-locals-blocklists-not-inside-function.js | 71 + .../set-breakpoint-on-instrumentation.js | 2 +- .../set-script-source-repl-mode-expected.txt | 2 + .../debugger/set-script-source-repl-mode.js | 30 + deps/v8/test/inspector/frontend-channel.h | 4 +- deps/v8/test/inspector/inspector-test.cc | 2 +- deps/v8/test/inspector/isolate-data.cc | 2 +- .../regress-crbug-1085693-expected.txt | 15 + .../regress/regress-crbug-1085693.js | 43 + .../regress-crbug-1209117-expected.txt | 16 + .../regress/regress-crbug-1209117.js | 75 + .../regress-crbug-1246897-expected.txt | 7 + .../regress/regress-crbug-1246897.js | 27 + .../regress-crbug-1352303-expected.txt | 8 + .../regress/regress-crbug-1352303.js | 21 + .../runtime/get-properties-expected.txt | 5 + .../test/inspector/runtime/get-properties.js | 4 + deps/v8/test/inspector/task-runner.cc | 2 +- deps/v8/test/inspector/tasks.cc | 4 +- deps/v8/test/inspector/tasks.h | 4 +- .../message/fail/wasm-exception-rethrow.js | 2 - .../test/message/fail/wasm-exception-throw.js | 2 - .../test/message/wasm-trace-memory-liftoff.js | 3 +- deps/v8/test/message/wasm-trace-memory.js | 1 - deps/v8/test/mjsunit/allocation-site-info.js | 2 +- .../test/mjsunit/array-buffer-detach-key.js | 78 + .../test/mjsunit/code-coverage-block-async.js | 204 +- .../test/mjsunit/code-coverage-block-noopt.js | 44 +- .../test/mjsunit/code-coverage-block-opt.js | 58 +- deps/v8/test/mjsunit/code-coverage-block.js | 1158 ++++---- .../mjsunit/code-coverage-class-fields.js | 225 +- deps/v8/test/mjsunit/code-coverage-precise.js | 79 +- deps/v8/test/mjsunit/code-coverage-utils.js | 16 +- .../compiler/array-multiple-receiver-maps.js | 8 +- .../v8/test/mjsunit/compiler/bigint-asintn.js | 2 + .../test/mjsunit/compiler/bigint-asuintn.js | 2 + .../test/mjsunit/compiler/bigint-modulus.js | 44 + .../compiler/bigint64-add-no-deopt-loop.js | 54 +- .../compiler/bigint64-div-no-deopt-loop.js | 67 + .../compiler/bigint64-mod-no-deopt-loop.js | 65 + .../compiler/bigint64-mul-no-deopt-loop.js | 37 + .../compiler/bigint64-sub-no-deopt-loop.js | 37 + .../compiler/call-with-arraylike-or-spread.js | 56 + .../mjsunit/compiler/fast-api-annotations.js | 108 - .../mjsunit/compiler/fast-api-calls-8args.js | 50 + .../compiler/fast-api-clamp-annotations.js | 127 + .../test/mjsunit/compiler/regress-905555-2.js | 2 +- .../mjsunit/compiler/stress-deopt-count-1.js | 4 +- .../mjsunit/compiler/stress-deopt-count-2.js | 12 +- .../typedarray-resizablearraybuffer.js | 828 +++++- .../concurrent-initial-prototype-change-1.js | 2 +- .../test/mjsunit/es6/array-iterator-turbo.js | 12 +- deps/v8/test/mjsunit/es6/collections.js | 1 - deps/v8/test/mjsunit/es6/templates.js | 32 + .../mjsunit/es6/unicode-regexp-ignore-case.js | 9 + .../harmony/regress/regress-crbug-1381656.js | 14 + .../test/mjsunit/harmony/weakrefs/basics.js | 3 - .../test/mjsunit/interrupt-budget-override.js | 2 +- .../mjsunit/maglev/int32_constants_in_phi.js | 20 + .../mjsunit/maglev/regress/regress-1364074.js | 2 +- .../mjsunit/maglev/regress/regress-1381663.js | 16 + .../mjsunit/maglev/regress/regress-6373.js | 46 + deps/v8/test/mjsunit/maglev/string-at.js | 68 + deps/v8/test/mjsunit/maglev/throw-in-cstr.js | 27 + .../mjsunit/maglev/unstable-map-transition.js | 17 + deps/v8/test/mjsunit/mjsunit.js | 15 +- deps/v8/test/mjsunit/mjsunit.status | 22 + deps/v8/test/mjsunit/regress-1358505.js | 51 + ...ress-13123.js => regress-crbug-1374042.js} | 10 +- .../test/mjsunit/regress/regress-1364429.js | 20 + .../test/mjsunit/regress/regress-1371935.js | 2 +- .../test/mjsunit/regress/regress-1376784.js | 32 + .../test/mjsunit/regress/regress-1378439.js | 21 + .../test/mjsunit/regress/regress-1379738.js | 15 + .../test/mjsunit/regress/regress-1380337.js | 19 + .../test/mjsunit/regress/regress-1380398.js | 19 + .../mjsunit/regress/regress-crbug-1374746.js | 17 + .../mjsunit/regress/regress-crbug-1374995.js | 14 + .../mjsunit/regress/regress-crbug-1375073.js | 15 + .../mjsunit/regress/regress-crbug-1377840.js | 19 + .../mjsunit/regress/regress-crbug-1381064.js | 19 + .../test/mjsunit/regress/regress-v8-13190.js | 48 + .../test/mjsunit/regress/regress-v8-13445.js | 16 + .../mjsunit/regress/wasm/regress-1010272.js | 2 +- .../mjsunit/regress/wasm/regress-10309.js | 2 - .../mjsunit/regress/wasm/regress-1054466.js | 2 - .../mjsunit/regress/wasm/regress-1065599.js | 2 - .../mjsunit/regress/wasm/regress-1067621.js | 2 - .../mjsunit/regress/wasm/regress-1070078.js | 2 - .../mjsunit/regress/wasm/regress-1080902.js | 2 - .../mjsunit/regress/wasm/regress-1081030.js | 2 - .../mjsunit/regress/wasm/regress-10831.js | 2 - .../mjsunit/regress/wasm/regress-1111522.js | 2 - .../mjsunit/regress/wasm/regress-1112124.js | 2 - .../mjsunit/regress/wasm/regress-1116019.js | 2 - .../mjsunit/regress/wasm/regress-1124885.js | 2 - .../mjsunit/regress/wasm/regress-1125951.js | 1 - .../mjsunit/regress/wasm/regress-1137608.js | 2 +- .../mjsunit/regress/wasm/regress-11472.js | 2 - .../mjsunit/regress/wasm/regress-1153442.js | 2 - .../mjsunit/regress/wasm/regress-1161555.js | 2 +- .../mjsunit/regress/wasm/regress-1188825.js | 1 - .../mjsunit/regress/wasm/regress-1188975.js | 2 - .../mjsunit/regress/wasm/regress-1189454.js | 2 +- .../mjsunit/regress/wasm/regress-12789.js | 2 +- .../mjsunit/regress/wasm/regress-12874.js | 4 +- .../mjsunit/regress/wasm/regress-13061.js | 2 +- .../mjsunit/regress/wasm/regress-1374535.js | 18 + .../mjsunit/regress/wasm/regress-1379364.js | 11 + .../mjsunit/regress/wasm/regress-1380498.js | 23 + .../mjsunit/regress/wasm/regress-1380646.js | 28 + .../mjsunit/regress/wasm/regress-763697.js | 14 - .../test/mjsunit/regress/wasm/regress-8094.js | 2 - .../test/mjsunit/regress/wasm/regress-8095.js | 2 - .../test/mjsunit/regress/wasm/regress-8533.js | 2 +- .../mjsunit/regress/wasm/regress-853453.js | 2 - .../test/mjsunit/regress/wasm/regress-8846.js | 2 +- .../test/mjsunit/regress/wasm/regress-8896.js | 2 +- .../test/mjsunit/regress/wasm/regress-9425.js | 1 - .../test/mjsunit/regress/wasm/regress-9447.js | 2 - .../test/mjsunit/regress/wasm/regress-9832.js | 2 - .../mjsunit/regress/wasm/regress1192313.js | 2 - .../regress/wasm/typecheck-null-undefined.js | 2 +- .../shared-struct-property-storage.js | 23 + .../shared-memory/shared-struct-surface.js | 24 +- .../shared-struct-without-map-space.js | 12 - .../mjsunit/temporal/calendar-constructor.js | 3 +- .../typedarray-growablesharedarraybuffer.js | 91 +- deps/v8/test/mjsunit/typedarray-helpers.js | 12 + .../typedarray-resizablearraybuffer-detach.js | 42 + .../typedarray-resizablearraybuffer.js | 117 + .../mjsunit/wasm/array-init-from-segment.js | 2 +- .../test/mjsunit/wasm/atomics-non-shared.js | 2 - deps/v8/test/mjsunit/wasm/atomics-stress.js | 2 - deps/v8/test/mjsunit/wasm/atomics.js | 15 +- deps/v8/test/mjsunit/wasm/atomics64-stress.js | 2 - deps/v8/test/mjsunit/wasm/bulk-memory.js | 23 + .../mjsunit/wasm/compare-exchange-stress.js | 2 - .../mjsunit/wasm/compare-exchange64-stress.js | 2 - deps/v8/test/mjsunit/wasm/exceptions-api.js | 2 - .../v8/test/mjsunit/wasm/exceptions-export.js | 2 - .../test/mjsunit/wasm/exceptions-externref.js | 2 +- .../v8/test/mjsunit/wasm/exceptions-import.js | 2 - .../test/mjsunit/wasm/exceptions-rethrow.js | 2 +- .../v8/test/mjsunit/wasm/exceptions-shared.js | 2 - deps/v8/test/mjsunit/wasm/exceptions-simd.js | 2 +- .../wasm/exceptions-type-reflection.js | 2 +- deps/v8/test/mjsunit/wasm/exceptions.js | 2 +- deps/v8/test/mjsunit/wasm/futex.js | 1 - .../v8/test/mjsunit/wasm/gc-casts-from-any.js | 190 +- deps/v8/test/mjsunit/wasm/gc-casts-invalid.js | 5 +- .../v8/test/mjsunit/wasm/gc-casts-subtypes.js | 144 +- .../gc-experimental-string-conversions.js | 2 +- deps/v8/test/mjsunit/wasm/gc-experiments.js | 2 +- .../test/mjsunit/wasm/gc-js-interop-async.js | 2 +- .../mjsunit/wasm/gc-js-interop-collections.js | 2 +- .../wasm/gc-js-interop-global-constructors.js | 2 +- .../mjsunit/wasm/gc-js-interop-import.mjs | 4 +- .../mjsunit/wasm/gc-js-interop-numeric.js | 2 +- .../mjsunit/wasm/gc-js-interop-objects.js | 6 +- .../test/mjsunit/wasm/gc-js-interop-wasm.js | 4 +- deps/v8/test/mjsunit/wasm/gc-js-interop.js | 2 +- deps/v8/test/mjsunit/wasm/gc-optimizations.js | 70 +- deps/v8/test/mjsunit/wasm/inlining.js | 26 + .../wasm/lazy-feedback-vector-allocation.js | 21 + .../test/mjsunit/wasm/liftoff-simd-params.js | 2 - deps/v8/test/mjsunit/wasm/loop-unrolling.js | 2 +- deps/v8/test/mjsunit/wasm/memory64.js | 93 + deps/v8/test/mjsunit/wasm/multi-value-simd.js | 2 - .../mjsunit/wasm/reference-globals-import.js | 47 +- .../v8/test/mjsunit/wasm/reference-globals.js | 4 +- .../wasm/reference-table-js-interop.js | 45 +- deps/v8/test/mjsunit/wasm/reference-tables.js | 4 +- .../wasm/runtime-type-canonicalization.js | 6 +- ...shared-memory-worker-explicit-gc-stress.js | 2 +- .../wasm/shared-memory-worker-gc-stress.js | 2 - .../mjsunit/wasm/shared-memory-worker-gc.js | 2 +- .../wasm/shared-memory-worker-simple-gc.js | 2 +- .../wasm/shared-memory-worker-stress.js | 2 - deps/v8/test/mjsunit/wasm/shared-memory.js | 2 - deps/v8/test/mjsunit/wasm/simd-call.js | 2 - deps/v8/test/mjsunit/wasm/simd-errors.js | 2 - deps/v8/test/mjsunit/wasm/simd-globals.js | 2 - .../test/mjsunit/wasm/stringrefs-invalid.js | 2 +- .../mjsunit/wasm/test-wasm-module-builder.js | 2 +- .../wasm/wasm-gc-externalize-internalize.js | 4 +- .../test/mjsunit/wasm/wasm-gc-js-roundtrip.js | 32 +- .../test/mjsunit/wasm/wasm-module-builder.js | 74 +- deps/v8/test/mjsunit/wasm/worker-memory.js | 2 - deps/v8/test/mkgrokdump/mkgrokdump.cc | 10 +- deps/v8/test/test262/test262.status | 501 +++- deps/v8/test/test262/testcfg.py | 27 +- deps/v8/test/unittests/BUILD.gn | 8 + .../test/unittests/api/api-wasm-unittest.cc | 66 - .../unittests/api/deserialize-unittest.cc | 104 + .../v8/test/unittests/api/isolate-unittest.cc | 7 +- .../turboshaft/snapshot-table-unittest.cc | 213 ++ .../debug/debug-property-iterator-unittest.cc | 34 + .../deoptimizer/deoptimization-unittest.cc | 242 +- .../execution/microtask-queue-unittest.cc | 3 +- .../conservative-stack-visitor-unittest.cc | 14 +- .../heap/cppgc-js/unified-heap-unittest.cc | 2 + .../unittests/heap/cppgc/minor-gc-unittest.cc | 192 +- .../heap/embedder-tracing-unittest.cc | 42 +- .../test/unittests/heap/gc-tracer-unittest.cc | 14 +- .../unittests/heap/global-handles-unittest.cc | 12 +- deps/v8/test/unittests/heap/heap-unittest.cc | 9 +- deps/v8/test/unittests/heap/heap-utils.cc | 80 +- deps/v8/test/unittests/heap/heap-utils.h | 41 +- .../unittests/heap/local-heap-unittest.cc | 3 +- ...rking-inner-pointer-resolution-unittest.cc | 2 +- .../test/unittests/heap/safepoint-unittest.cc | 6 +- .../test/unittests/heap/unmapper-unittest.cc | 5 - .../unittests/inspector/inspector-unittest.cc | 1 - .../ClassAndSuperClass.golden | 28 +- .../PrivateAccessorAccess.golden | 8 +- .../PrivateMethodAccess.golden | 4 +- .../StaticPrivateMethodAccess.golden | 30 +- .../SuperCallAndSpread.golden | 45 +- .../swiss-hash-table-helpers-unittest.cc | 36 - .../objects/value-serializer-unittest.cc | 5 - .../test/unittests/parser/decls-unittest.cc | 2 + deps/v8/test/unittests/test-utils.cc | 7 +- deps/v8/test/unittests/test-utils.h | 42 +- deps/v8/test/unittests/unittests.status | 13 + .../wasm/control-transfer-unittest.cc | 22 +- .../test/unittests/wasm/decoder-unittest.cc | 114 +- .../wasm/function-body-decoder-unittest.cc | 206 +- .../unittests/wasm/leb-helper-unittest.cc | 2 +- .../wasm/memory-protection-unittest.cc | 3 +- .../unittests/wasm/module-decoder-unittest.cc | 45 +- .../test/unittests/wasm/subtyping-unittest.cc | 65 +- .../wasm-disassembler-unittest-mvp.wasm.inc | 568 ++++ .../wasm-disassembler-unittest-mvp.wat.inc | 489 ++++ .../wasm-disassembler-unittest-names.wasm.inc | 201 ++ .../wasm-disassembler-unittest-names.wat.inc | 42 + .../wasm-disassembler-unittest-simd.wasm.inc | 507 ++++ .../wasm-disassembler-unittest-simd.wat.inc | 506 ++++ .../wasm/wasm-disassembler-unittest.cc | 104 + deps/v8/test/wasm-api-tests/callbacks.cc | 115 +- deps/v8/test/wasm-api-tests/serialize.cc | 16 +- deps/v8/test/wasm-js/tests.tar.gz.sha1 | 2 +- .../v8/test/wasm-spec-tests/tests.tar.gz.sha1 | 2 +- .../wasm-spec-tests/wasm-spec-tests.status | 5 - .../include/fortran/posix/x86/ittfortran.o | Bin 0 -> 22992 bytes .../include/fortran/posix/x86/ittnotify.mod | Bin 0 -> 9893 bytes .../include/fortran/posix/x86_64/ittfortran.o | Bin 0 -> 33016 bytes .../fortran/posix/x86_64/ittnotify.mod | Bin 0 -> 10561 bytes .../include/fortran/win32/x86/ittfortran.obj | Bin 0 -> 8136 bytes .../include/fortran/win32/x86/ittnotify.mod | Bin 0 -> 9985 bytes .../fortran/win32/x86_64/ittfortran.obj | Bin 0 -> 9630 bytes .../fortran/win32/x86_64/ittnotify.mod | Bin 0 -> 10665 bytes deps/v8/third_party/jinja2/jinja2.gni | 58 +- .../v8/third_party/markupsafe/README.chromium | 1 + deps/v8/third_party/markupsafe/markupsafe.gni | 6 + deps/v8/third_party/v8/builtins/OWNERS | 1 + deps/v8/third_party/zlib/README.chromium | 6 +- deps/v8/third_party/zlib/compress.c | 6 +- .../zlib/contrib/optimizations/chunkcopy.h | 16 +- .../contrib/optimizations/inffast_chunk.c | 1 - .../zlib/contrib/optimizations/inflate.c | 2 + deps/v8/third_party/zlib/crc32.c | 17 +- deps/v8/third_party/zlib/deflate.c | 210 +- deps/v8/third_party/zlib/gzlib.c | 2 +- deps/v8/third_party/zlib/gzread.c | 8 +- deps/v8/third_party/zlib/gzwrite.c | 2 +- deps/v8/third_party/zlib/inflate.c | 2 + deps/v8/third_party/zlib/inftrees.c | 4 +- deps/v8/third_party/zlib/trees.c | 115 +- deps/v8/third_party/zlib/uncompr.c | 4 +- deps/v8/third_party/zlib/zconf.h | 19 +- deps/v8/third_party/zlib/zlib.h | 12 +- deps/v8/third_party/zlib/zutil.c | 16 +- deps/v8/third_party/zlib/zutil.h | 1 + deps/v8/tools/builtins-pgo/arm.profile | 1746 ++++++------ deps/v8/tools/builtins-pgo/arm64.profile | 2467 ++++++++-------- deps/v8/tools/builtins-pgo/x64.profile | 2473 +++++++++-------- .../clusterfuzz/foozzie/v8_fuzz_flags.json | 1 - .../trials/clusterfuzz_trials_config.json | 2 - deps/v8/tools/memory/rss.py | 95 + deps/v8/tools/profiling/linux-perf-d8.py | 9 +- deps/v8/tools/system-analyzer/index.html | 21 +- deps/v8/tools/system-analyzer/index.mjs | 11 +- deps/v8/tools/system-analyzer/view/events.mjs | 7 +- deps/v8/tools/system-analyzer/view/helper.mjs | 22 + .../tools/system-analyzer/view/list-panel.mjs | 2 +- .../view/map-panel/map-transitions.mjs | 4 +- .../system-analyzer/view/profiler-panel.mjs | 2 +- .../view/property-link-table.mjs | 10 +- .../system-analyzer/view/script-panel.mjs | 6 +- .../view/timeline/timeline-overview.mjs | 3 +- .../view/timeline/timeline-track-base.mjs | 22 +- .../timeline/timeline-track-stacked-base.mjs | 4 +- .../timeline/timeline-track-template.html | 3 +- .../tools/system-analyzer/view/tool-tip.mjs | 269 +- deps/v8/tools/testrunner/base_runner.py | 4 + deps/v8/tools/testrunner/build_config.py | 3 + .../testroot1/out/build/v8_build_config.json | 1 + .../testroot2/out/build/v8_build_config.json | 1 + .../testroot3/out/build/v8_build_config.json | 1 + .../out.gn/build/v8_build_config.json | 1 + .../testroot6/out/build/v8_build_config.json | 1 + deps/v8/tools/testrunner/testproc/fuzzer.py | 2 - deps/v8/tools/testrunner/testproc/progress.py | 6 +- deps/v8/tools/testrunner/testproc/resultdb.py | 62 +- deps/v8/tools/v8heapconst.py | 542 ++-- deps/v8/tools/wasm/module-inspector.cc | 17 +- deps/v8/tools/whitespace.txt | 3 +- deps/v8/tools/zone-stats/categories.js | 1 + 876 files changed, 35936 insertions(+), 19111 deletions(-) create mode 100644 deps/v8/src/compiler/backend/bitcast-elider.cc create mode 100644 deps/v8/src/compiler/backend/bitcast-elider.h rename deps/v8/src/compiler/turboshaft/{machine-optimization-assembler.h => machine-optimization-reducer.h} (60%) create mode 100644 deps/v8/src/compiler/turboshaft/select-lowering-reducer.h create mode 100644 deps/v8/src/compiler/turboshaft/snapshot-table.h rename deps/v8/src/compiler/turboshaft/{value-numbering-assembler.h => value-numbering-reducer.h} (78%) create mode 100644 deps/v8/src/handles/traced-handles.cc create mode 100644 deps/v8/src/handles/traced-handles.h delete mode 100644 deps/v8/src/heap/base/asm/arm/push_registers_asm.cc create mode 100644 deps/v8/src/heap/base/asm/arm/save_registers_asm.cc delete mode 100644 deps/v8/src/heap/base/asm/arm64/push_registers_asm.cc delete mode 100644 deps/v8/src/heap/base/asm/arm64/push_registers_masm.S create mode 100644 deps/v8/src/heap/base/asm/arm64/save_registers_asm.cc create mode 100644 deps/v8/src/heap/base/asm/arm64/save_registers_masm.S delete mode 100644 deps/v8/src/heap/base/asm/ia32/push_registers_asm.cc delete mode 100644 deps/v8/src/heap/base/asm/ia32/push_registers_masm.asm create mode 100644 deps/v8/src/heap/base/asm/ia32/save_registers_asm.cc create mode 100644 deps/v8/src/heap/base/asm/ia32/save_registers_masm.asm delete mode 100644 deps/v8/src/heap/base/asm/loong64/push_registers_asm.cc create mode 100644 deps/v8/src/heap/base/asm/loong64/save_registers_asm.cc delete mode 100644 deps/v8/src/heap/base/asm/mips64/push_registers_asm.cc create mode 100644 deps/v8/src/heap/base/asm/mips64/save_registers_asm.cc delete mode 100644 deps/v8/src/heap/base/asm/ppc/push_registers_asm.cc create mode 100644 deps/v8/src/heap/base/asm/ppc/save_registers_asm.cc delete mode 100644 deps/v8/src/heap/base/asm/riscv/push_registers_asm.cc create mode 100644 deps/v8/src/heap/base/asm/riscv/save_registers_asm.cc delete mode 100644 deps/v8/src/heap/base/asm/s390/push_registers_asm.cc create mode 100644 deps/v8/src/heap/base/asm/s390/save_registers_asm.cc delete mode 100644 deps/v8/src/heap/base/asm/x64/push_registers_asm.cc delete mode 100644 deps/v8/src/heap/base/asm/x64/push_registers_masm.asm create mode 100644 deps/v8/src/heap/base/asm/x64/save_registers_asm.cc create mode 100644 deps/v8/src/heap/base/asm/x64/save_registers_masm.asm create mode 100644 deps/v8/src/maglev/maglev-assembler.cc create mode 100644 deps/v8/src/profiler/output-stream-writer.h create mode 100644 deps/v8/test/cctest/jsonstream-helper.h create mode 100644 deps/v8/test/inspector/debugger/evaluate-on-call-frame-new-target-expected.txt create mode 100644 deps/v8/test/inspector/debugger/evaluate-on-call-frame-new-target.js create mode 100644 deps/v8/test/inspector/debugger/pause-on-instrumentation-expected.txt create mode 100644 deps/v8/test/inspector/debugger/pause-on-instrumentation.js create mode 100644 deps/v8/test/inspector/debugger/reuse-locals-blocklists-not-inside-function-expected.txt create mode 100644 deps/v8/test/inspector/debugger/reuse-locals-blocklists-not-inside-function.js create mode 100644 deps/v8/test/inspector/debugger/set-script-source-repl-mode-expected.txt create mode 100644 deps/v8/test/inspector/debugger/set-script-source-repl-mode.js create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1085693-expected.txt create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1085693.js create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1209117-expected.txt create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1209117.js create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1246897-expected.txt create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1246897.js create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1352303-expected.txt create mode 100644 deps/v8/test/inspector/regress/regress-crbug-1352303.js create mode 100644 deps/v8/test/mjsunit/array-buffer-detach-key.js create mode 100644 deps/v8/test/mjsunit/compiler/bigint-modulus.js create mode 100644 deps/v8/test/mjsunit/compiler/bigint64-div-no-deopt-loop.js create mode 100644 deps/v8/test/mjsunit/compiler/bigint64-mod-no-deopt-loop.js create mode 100644 deps/v8/test/mjsunit/compiler/bigint64-mul-no-deopt-loop.js create mode 100644 deps/v8/test/mjsunit/compiler/bigint64-sub-no-deopt-loop.js create mode 100644 deps/v8/test/mjsunit/compiler/fast-api-calls-8args.js create mode 100644 deps/v8/test/mjsunit/compiler/fast-api-clamp-annotations.js create mode 100644 deps/v8/test/mjsunit/harmony/regress/regress-crbug-1381656.js create mode 100644 deps/v8/test/mjsunit/maglev/int32_constants_in_phi.js create mode 100644 deps/v8/test/mjsunit/maglev/regress/regress-1381663.js create mode 100644 deps/v8/test/mjsunit/maglev/regress/regress-6373.js create mode 100644 deps/v8/test/mjsunit/maglev/string-at.js create mode 100644 deps/v8/test/mjsunit/maglev/throw-in-cstr.js create mode 100644 deps/v8/test/mjsunit/maglev/unstable-map-transition.js create mode 100644 deps/v8/test/mjsunit/regress-1358505.js rename deps/v8/test/mjsunit/{regress/wasm/regress-13123.js => regress-crbug-1374042.js} (52%) create mode 100644 deps/v8/test/mjsunit/regress/regress-1364429.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1376784.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1378439.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1379738.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1380337.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1380398.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1374746.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1374995.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1375073.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1377840.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-1381064.js create mode 100644 deps/v8/test/mjsunit/regress/regress-v8-13190.js create mode 100644 deps/v8/test/mjsunit/regress/regress-v8-13445.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-1374535.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-1379364.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-1380498.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-1380646.js delete mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-763697.js create mode 100644 deps/v8/test/mjsunit/shared-memory/shared-struct-property-storage.js delete mode 100644 deps/v8/test/mjsunit/shared-memory/shared-struct-without-map-space.js create mode 100644 deps/v8/test/mjsunit/wasm/lazy-feedback-vector-allocation.js create mode 100644 deps/v8/test/unittests/compiler/turboshaft/snapshot-table-unittest.cc create mode 100644 deps/v8/test/unittests/wasm/wasm-disassembler-unittest-mvp.wasm.inc create mode 100644 deps/v8/test/unittests/wasm/wasm-disassembler-unittest-mvp.wat.inc create mode 100644 deps/v8/test/unittests/wasm/wasm-disassembler-unittest-names.wasm.inc create mode 100644 deps/v8/test/unittests/wasm/wasm-disassembler-unittest-names.wat.inc create mode 100644 deps/v8/test/unittests/wasm/wasm-disassembler-unittest-simd.wasm.inc create mode 100644 deps/v8/test/unittests/wasm/wasm-disassembler-unittest-simd.wat.inc create mode 100644 deps/v8/test/unittests/wasm/wasm-disassembler-unittest.cc create mode 100644 deps/v8/third_party/ittapi/include/fortran/posix/x86/ittfortran.o create mode 100644 deps/v8/third_party/ittapi/include/fortran/posix/x86/ittnotify.mod create mode 100644 deps/v8/third_party/ittapi/include/fortran/posix/x86_64/ittfortran.o create mode 100644 deps/v8/third_party/ittapi/include/fortran/posix/x86_64/ittnotify.mod create mode 100644 deps/v8/third_party/ittapi/include/fortran/win32/x86/ittfortran.obj create mode 100644 deps/v8/third_party/ittapi/include/fortran/win32/x86/ittnotify.mod create mode 100644 deps/v8/third_party/ittapi/include/fortran/win32/x86_64/ittfortran.obj create mode 100644 deps/v8/third_party/ittapi/include/fortran/win32/x86_64/ittnotify.mod create mode 100644 deps/v8/third_party/markupsafe/markupsafe.gni create mode 100755 deps/v8/tools/memory/rss.py diff --git a/deps/v8/.ycm_extra_conf.py b/deps/v8/.ycm_extra_conf.py index 6d79c46245eb4e..793beda7955990 100644 --- a/deps/v8/.ycm_extra_conf.py +++ b/deps/v8/.ycm_extra_conf.py @@ -42,7 +42,6 @@ # Flags from YCM's default config. flags = [ '-DUSE_CLANG_COMPLETER', -'-std=gnu++14', '-x', 'c++', ] @@ -143,25 +142,27 @@ def GetClangCommandFromNinjaForFilename(v8_root, filename): # Parse flags that are important for YCM's purposes. for flag in clang_line.split(' '): if flag.startswith('-I'): - # Relative paths need to be resolved, because they're relative to the - # output dir, not the source. - if flag[2] == '/': - v8_flags.append(flag) - else: - abs_path = os.path.normpath(os.path.join(out_dir, flag[2:])) - v8_flags.append('-I' + abs_path) - elif flag.startswith('-std'): + v8_flags.append(MakeIncludePathAbsolute(flag, "-I", out_dir)) + elif flag.startswith('-isystem'): + v8_flags.append(MakeIncludePathAbsolute(flag, "-isystem", out_dir)) + elif flag.startswith('-std') or flag.startswith( + '-pthread') or flag.startswith('-no'): v8_flags.append(flag) - elif flag.startswith('-') and flag[1] in 'DWFfmO': - if flag == '-Wno-deprecated-register' or flag == '-Wno-header-guard': - # These flags causes libclang (3.3) to crash. Remove it until things - # are fixed. - continue + elif flag.startswith('-') and flag[1] in 'DWFfmgOX': v8_flags.append(flag) - return v8_flags +def MakeIncludePathAbsolute(flag, prefix, out_dir): + # Relative paths need to be resolved, because they're relative to the + # output dir, not the source. + if flag[len(prefix)] == '/': + return flag + else: + abs_path = os.path.normpath(os.path.join(out_dir, flag[len(prefix):])) + return prefix + abs_path + + def FlagsForFile(filename): """This is the main entry point for YCM. Its interface is fixed. @@ -180,3 +181,9 @@ def FlagsForFile(filename): 'flags': final_flags, 'do_cache': True } + + +def Settings(**kwargs): + if kwargs['language'] == 'cfamily': + return FlagsForFile(kwargs['filename']) + return {} diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index af37f8db25121e..9696fc61d54d8f 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -114,6 +114,7 @@ Fedor Indutny Felix Geisendörfer Feng Yu Filipe David Manana +Frank Lemanschik Franziska Hinkelmann Gao Sheng Geoffrey Garside @@ -152,6 +153,7 @@ Jiaxun Yang Joel Stanley Johan Bergström Jonathan Liu +Juan Arboleda Julien Brianceau JunHo Seo Junha Park diff --git a/deps/v8/BUILD.bazel b/deps/v8/BUILD.bazel index f216a1811da852..3be7da8f3bb11f 100644 --- a/deps/v8/BUILD.bazel +++ b/deps/v8/BUILD.bazel @@ -39,6 +39,7 @@ load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression # v8_enable_trace_baseline_exec # v8_enable_trace_feedback_updates # v8_enable_atomic_object_field_writes +# v8_enable_conservative_stack_scanning # v8_enable_concurrent_marking # v8_enable_ignition_dispatch_counting # v8_enable_builtins_profiling @@ -1381,6 +1382,8 @@ filegroup( "src/handles/global-handles-inl.h", "src/handles/global-handles.cc", "src/handles/global-handles.h", + "src/handles/traced-handles.cc", + "src/handles/traced-handles.h", "src/handles/handles-inl.h", "src/handles/handles.cc", "src/handles/handles.h", @@ -1963,6 +1966,7 @@ filegroup( "src/profiler/heap-snapshot-generator-inl.h", "src/profiler/heap-snapshot-generator.cc", "src/profiler/heap-snapshot-generator.h", + "src/profiler/output-stream-writer.h", "src/profiler/profile-generator-inl.h", "src/profiler/profile-generator.cc", "src/profiler/profile-generator.h", @@ -2664,6 +2668,8 @@ filegroup( "src/compiler/all-nodes.h", "src/compiler/allocation-builder.h", "src/compiler/allocation-builder-inl.h", + "src/compiler/backend/bitcast-elider.cc", + "src/compiler/backend/bitcast-elider.h", "src/compiler/backend/code-generator.cc", "src/compiler/backend/code-generator.h", "src/compiler/backend/code-generator-impl.h", @@ -2887,7 +2893,7 @@ filegroup( "src/compiler/turboshaft/graph.h", "src/compiler/turboshaft/graph-visualizer.cc", "src/compiler/turboshaft/graph-visualizer.h", - "src/compiler/turboshaft/machine-optimization-assembler.h", + "src/compiler/turboshaft/machine-optimization-reducer.h", "src/compiler/turboshaft/operations.cc", "src/compiler/turboshaft/operations.h", "src/compiler/turboshaft/operation-matching.h", @@ -2897,12 +2903,14 @@ filegroup( "src/compiler/turboshaft/recreate-schedule.h", "src/compiler/turboshaft/representations.cc", "src/compiler/turboshaft/representations.h", + "src/compiler/turboshaft/select-lowering-reducer.h", "src/compiler/turboshaft/sidetable.h", "src/compiler/turboshaft/simplify-tf-loops.cc", "src/compiler/turboshaft/simplify-tf-loops.h", + "src/compiler/turboshaft/snapshot-table.h", "src/compiler/turboshaft/utils.cc", "src/compiler/turboshaft/utils.h", - "src/compiler/turboshaft/value-numbering-assembler.h", + "src/compiler/turboshaft/value-numbering-reducer.h", "src/compiler/type-cache.cc", "src/compiler/type-cache.h", "src/compiler/type-narrowing-reducer.cc", @@ -3152,16 +3160,16 @@ filegroup( # Note these cannot be v8_target_is_* selects because these contain # inline assembly that runs inside the executable. Since these are # linked directly into mksnapshot, they must use the actual target cpu. - "@v8//bazel/config:is_inline_asm_ia32": ["src/heap/base/asm/ia32/push_registers_asm.cc"], - "@v8//bazel/config:is_inline_asm_x64": ["src/heap/base/asm/x64/push_registers_asm.cc"], - "@v8//bazel/config:is_inline_asm_arm": ["src/heap/base/asm/arm/push_registers_asm.cc"], - "@v8//bazel/config:is_inline_asm_arm64": ["src/heap/base/asm/arm64/push_registers_asm.cc"], - "@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.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"], + "@v8//bazel/config:is_inline_asm_ia32": ["src/heap/base/asm/ia32/save_registers_asm.cc"], + "@v8//bazel/config:is_inline_asm_x64": ["src/heap/base/asm/x64/save_registers_asm.cc"], + "@v8//bazel/config:is_inline_asm_arm": ["src/heap/base/asm/arm/save_registers_asm.cc"], + "@v8//bazel/config:is_inline_asm_arm64": ["src/heap/base/asm/arm64/save_registers_asm.cc"], + "@v8//bazel/config:is_inline_asm_s390x": ["src/heap/base/asm/s390/save_registers_asm.cc"], + "@v8//bazel/config:is_inline_asm_riscv64": ["src/heap/base/asm/riscv64/save_registers_asm.cc"], + "@v8//bazel/config:is_inline_asm_ppc64le": ["src/heap/base/asm/ppc/save_registers_asm.cc"], + "@v8//bazel/config:is_msvc_asm_ia32": ["src/heap/base/asm/ia32/save_registers_masm.asm"], + "@v8//bazel/config:is_msvc_asm_x64": ["src/heap/base/asm/x64/save_registers_masm.asm"], + "@v8//bazel/config:is_msvc_asm_arm64": ["src/heap/base/asm/arm64/save_registers_masm.S"], }), ) diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 61187af3053a02..78fd8cd2d38790 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -1460,6 +1460,10 @@ config("toolchain") { "/wd4715", # 'function' : not all control paths return a value' # MSVC does not analyze switch (enum) for completeness. ] + + # TODO(https://crbug.com/1377771): Keep MSVC on C++17 until source code is + # made compatible with C++20. + cflags_cc = [ "/std:c++17" ] } if (!is_clang && !is_win) { @@ -1476,6 +1480,11 @@ config("toolchain") { # Disable gcc warnings for using enum constant in boolean context. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97266 "-Wno-int-in-bool-context", + + # Disable gcc deprecation warnings, which are firing on implicit capture + # of `this` in capture-by-value lambdas and preventing a build roll which + # enables C++20 (see https://crbug.com/1374227). + "-Wno-deprecated", ] } @@ -2268,6 +2277,8 @@ action("v8_dump_build_config") { "v8_current_cpu=\"$v8_current_cpu\"", "v8_enable_atomic_object_field_writes=" + "$v8_enable_atomic_object_field_writes", + "v8_enable_conservative_stack_scanning=" + + "$v8_enable_conservative_stack_scanning", "v8_enable_concurrent_marking=$v8_enable_concurrent_marking", "v8_enable_single_generation=$v8_enable_single_generation", "v8_enable_i18n_support=$v8_enable_i18n_support", @@ -2803,6 +2814,7 @@ v8_header_set("v8_internal_headers") { "src/compiler/all-nodes.h", "src/compiler/allocation-builder-inl.h", "src/compiler/allocation-builder.h", + "src/compiler/backend/bitcast-elider.h", "src/compiler/backend/code-generator-impl.h", "src/compiler/backend/code-generator.h", "src/compiler/backend/frame-elider.h", @@ -2923,16 +2935,18 @@ v8_header_set("v8_internal_headers") { "src/compiler/turboshaft/graph-builder.h", "src/compiler/turboshaft/graph-visualizer.h", "src/compiler/turboshaft/graph.h", - "src/compiler/turboshaft/machine-optimization-assembler.h", + "src/compiler/turboshaft/machine-optimization-reducer.h", "src/compiler/turboshaft/operation-matching.h", "src/compiler/turboshaft/operations.h", "src/compiler/turboshaft/optimization-phase.h", "src/compiler/turboshaft/recreate-schedule.h", "src/compiler/turboshaft/representations.h", + "src/compiler/turboshaft/select-lowering-reducer.h", "src/compiler/turboshaft/sidetable.h", "src/compiler/turboshaft/simplify-tf-loops.h", + "src/compiler/turboshaft/snapshot-table.h", "src/compiler/turboshaft/utils.h", - "src/compiler/turboshaft/value-numbering-assembler.h", + "src/compiler/turboshaft/value-numbering-reducer.h", "src/compiler/type-cache.h", "src/compiler/type-narrowing-reducer.h", "src/compiler/typed-optimization.h", @@ -3024,6 +3038,7 @@ v8_header_set("v8_internal_headers") { "src/handles/maybe-handles.h", "src/handles/persistent-handles.h", "src/handles/shared-object-conveyor-handles.h", + "src/handles/traced-handles.h", "src/heap/allocation-observer.h", "src/heap/allocation-result.h", "src/heap/allocation-stats.h", @@ -3422,6 +3437,7 @@ v8_header_set("v8_internal_headers") { "src/profiler/heap-profiler.h", "src/profiler/heap-snapshot-generator-inl.h", "src/profiler/heap-snapshot-generator.h", + "src/profiler/output-stream-writer.h", "src/profiler/profile-generator-inl.h", "src/profiler/profile-generator.h", "src/profiler/profiler-listener.h", @@ -4041,6 +4057,7 @@ v8_compiler_sources = [ "src/compiler/access-info.cc", "src/compiler/add-type-assertions-reducer.cc", "src/compiler/all-nodes.cc", + "src/compiler/backend/bitcast-elider.cc", "src/compiler/backend/code-generator.cc", "src/compiler/backend/frame-elider.cc", "src/compiler/backend/gap-resolver.cc", @@ -4429,6 +4446,7 @@ v8_source_set("v8_base_without_compiler") { "src/handles/local-handles.cc", "src/handles/persistent-handles.cc", "src/handles/shared-object-conveyor-handles.cc", + "src/handles/traced-handles.cc", "src/heap/allocation-observer.cc", "src/heap/array-buffer-sweeper.cc", "src/heap/base-space.cc", @@ -4737,6 +4755,7 @@ v8_source_set("v8_base_without_compiler") { if (v8_enable_maglev) { sources += [ + "src/maglev/maglev-assembler.cc", "src/maglev/maglev-code-generator.cc", "src/maglev/maglev-compilation-info.cc", "src/maglev/maglev-compilation-unit.cc", @@ -5745,31 +5764,31 @@ v8_source_set("v8_heap_base") { if (is_clang || !is_win) { if (current_cpu == "x64") { - sources += [ "src/heap/base/asm/x64/push_registers_asm.cc" ] + sources += [ "src/heap/base/asm/x64/save_registers_asm.cc" ] } else if (current_cpu == "x86") { - sources += [ "src/heap/base/asm/ia32/push_registers_asm.cc" ] + sources += [ "src/heap/base/asm/ia32/save_registers_asm.cc" ] } else if (current_cpu == "arm") { - sources += [ "src/heap/base/asm/arm/push_registers_asm.cc" ] + sources += [ "src/heap/base/asm/arm/save_registers_asm.cc" ] } else if (current_cpu == "arm64") { - sources += [ "src/heap/base/asm/arm64/push_registers_asm.cc" ] + sources += [ "src/heap/base/asm/arm64/save_registers_asm.cc" ] } else if (current_cpu == "ppc64") { - sources += [ "src/heap/base/asm/ppc/push_registers_asm.cc" ] + sources += [ "src/heap/base/asm/ppc/save_registers_asm.cc" ] } else if (current_cpu == "s390x") { - sources += [ "src/heap/base/asm/s390/push_registers_asm.cc" ] + sources += [ "src/heap/base/asm/s390/save_registers_asm.cc" ] } else if (current_cpu == "mips64el") { - sources += [ "src/heap/base/asm/mips64/push_registers_asm.cc" ] + sources += [ "src/heap/base/asm/mips64/save_registers_asm.cc" ] } else if (current_cpu == "loong64") { - sources += [ "src/heap/base/asm/loong64/push_registers_asm.cc" ] + sources += [ "src/heap/base/asm/loong64/save_registers_asm.cc" ] } else if (current_cpu == "riscv64" || current_cpu == "riscv32") { - sources += [ "src/heap/base/asm/riscv/push_registers_asm.cc" ] + sources += [ "src/heap/base/asm/riscv/save_registers_asm.cc" ] } } else if (is_win) { if (current_cpu == "x64") { - sources += [ "src/heap/base/asm/x64/push_registers_masm.asm" ] + sources += [ "src/heap/base/asm/x64/save_registers_masm.asm" ] } else if (current_cpu == "x86") { - sources += [ "src/heap/base/asm/ia32/push_registers_masm.asm" ] + sources += [ "src/heap/base/asm/ia32/save_registers_masm.asm" ] } else if (current_cpu == "arm64") { - sources += [ "src/heap/base/asm/arm64/push_registers_masm.S" ] + sources += [ "src/heap/base/asm/arm64/save_registers_masm.S" ] } } diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 6304c386414450..ab0a9bf5431112 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -26,6 +26,7 @@ vars = { # most commonly useful for developers. Bots and developers that need to use # other images (e.g., qemu.arm64) can override this with additional images. 'checkout_fuchsia_boot_images': "qemu.x64", + 'checkout_fuchsia_product_bundles': '"{checkout_fuchsia_boot_images}" != ""', 'checkout_instrumented_libraries': False, 'checkout_ittapi': False, @@ -42,22 +43,22 @@ vars = { 'fuchsia_sdk_cipd_prefix': 'fuchsia/sdk/gn/', # reclient CIPD package version - 'reclient_version': 're_client_version:0.69.0.458df98-gomaip', + 'reclient_version': 're_client_version:0.83.0.da55f4f-gomaip', # GN CIPD package version. - 'gn_version': 'git_revision:cc28efe62ef0c2fb32455f414a29c4a55bb7fbc4', + 'gn_version': 'git_revision:a4d67be044b42963de801001e7146f9657c7fad4', # ninja CIPD package version # https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/ninja 'ninja_version': 'version:2@1.8.2.chromium.3', # luci-go CIPD package version. - 'luci_go': 'git_revision:20c50aa39686d91330c2daceccaa4ef1a0a72ee4', + 'luci_go': 'git_revision:f8f64a8c560d2bf68a3ad1137979d17cffb36d30', # 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.20220919.2.1', + 'fuchsia_version': 'version:10.20221109.1.1', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_build-tools_version @@ -97,9 +98,9 @@ deps = { 'base/trace_event/common': Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + '521ac34ebd795939c7e16b37d9d3ddb40e8ed556', 'build': - Var('chromium_url') + '/chromium/src/build.git' + '@' + '7e7c21a9ac34c4fc2b255aa44d639efec9c33b90', + Var('chromium_url') + '/chromium/src/build.git' + '@' + '875cb19167f2e0d7b1eca89a4d5b5693421424c6', 'buildtools': - Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '9174abb6ac087b46f22248dc713b6c0328b8f774', + Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '49ac7cf34ab2e59a10629a7a722cfb94348c4996', 'buildtools/clang_format/script': Var('chromium_url') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + '8b525d2747f2584fc35d8c7e612e66f377858df7', 'buildtools/linux64': { @@ -123,11 +124,11 @@ deps = { 'condition': 'host_os == "mac"', }, 'buildtools/third_party/libc++/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '2e919977e0030ce61bd19c40cefe31b995f1e2d4', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '4218f3525ad438b22b0e173d963515a09d143398', 'buildtools/third_party/libc++abi/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + 'db2a783a7d1ef0f0ef31da4b6e3de0c31fcfd93f', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '1a32724f721e1c3b6c590a07fe4a954344f15e48', 'buildtools/third_party/libunwind/trunk': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + '08ebcbe7b672a04e341cb3a88d8bf4276f96ac6e', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'a318d6a4c283a9d342d2a1e20292c1496fe12997', 'buildtools/win': { 'packages': [ { @@ -153,13 +154,13 @@ deps = { 'test/mozilla/data': Var('chromium_url') + '/v8/deps/third_party/mozilla-tests.git' + '@' + 'f6c578a10ea707b1a8ab0b88943fe5115ce2b9be', 'test/test262/data': - Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + '58b7a2358286b918efd38eac4b2facbc8ada1206', + Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + 'ade328d530525333751e8a3b58f02e18624da085', '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' + '@' + '04b33506bfd9d0e866bd8bd62f4cbf323d84dc79', + 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + '1bf9b932433ebb78828bf3c8cd0ccc86b9ef4787', 'condition': 'checkout_android', }, 'third_party/android_sdk/public': { @@ -201,7 +202,7 @@ deps = { 'dep_type': 'cipd', }, 'third_party/catapult': { - 'url': Var('chromium_url') + '/catapult.git' + '@' + 'ff03621a71c01a6f2b0f3bf2677cf815291a9e85', + 'url': Var('chromium_url') + '/catapult.git' + '@' + 'f0b11967c94cba8f7cca91d2da20c98d4420fc25', 'condition': 'checkout_android', }, 'third_party/colorama/src': { @@ -209,7 +210,7 @@ deps = { 'condition': 'checkout_android', }, 'third_party/depot_tools': - Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + 'a724859f7a9b3531c0373d86886a42314e772532', + Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + 'ae1a70891738fb14f64fbb884e00b87ac663aa15', 'third_party/fuchsia-sdk/sdk': { 'packages': [ { @@ -226,9 +227,9 @@ deps = { 'third_party/googletest/src': Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + 'af29db7ec28d6df1c7f0f745186884091e602e07', 'third_party/icu': - Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '20f8ac695af59b6c830def7d4e95bfeb13dd7be5', + Var('chromium_url') + '/chromium/deps/icu.git' + '@' + 'da07448619763d1cde255b361324242646f5b268', 'third_party/instrumented_libraries': - Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + 'e09c4b66b6e87116eb190651421f1a6e2f3b9c52', + Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + '7bb87a375ffc3effd17a50f690099dcfb9ee280b', 'third_party/ittapi': { # Force checkout ittapi libraries to pass v8 header includes check on # bots that has check_v8_header_includes enabled. @@ -236,13 +237,13 @@ deps = { 'condition': "checkout_ittapi or check_v8_header_includes", }, 'third_party/jinja2': - Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + 'ee69aa00ee8536f61db6a451f3858745cf587de6', + Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + '4633bf431193690c3491244f5a0acbe9ac776233', 'third_party/jsoncpp/source': 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', + Var('chromium_url') + '/chromium/src/third_party/markupsafe.git' + '@' + '13f4e8c9e206567eeb13bf585406ddc574005748', 'third_party/ninja': { 'packages': [ { @@ -262,9 +263,9 @@ deps = { 'condition': 'checkout_android', }, 'third_party/zlib': - Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + 'd689fca54d7b43154f7cf77f785d19f2628fa133', + Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + '8bbd6c3129b5146489f2321f054e855c347857f4', 'tools/clang': - Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + 'a5e0d72349d028a4023927d6d166a8478355fac3', + Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + 'd3df9cc5362e0af4cda798b0612dde39783b3dc0', 'tools/luci-go': { 'packages': [ { @@ -573,11 +574,11 @@ hooks = [ { 'name': 'Download Fuchsia system images', 'pattern': '.', - 'condition': 'checkout_fuchsia', + 'condition': 'checkout_fuchsia and checkout_fuchsia_product_bundles', 'action': [ 'python3', - 'build/fuchsia/update_images.py', - '--boot-images={checkout_fuchsia_boot_images}', + 'build/fuchsia/update_product_bundles.py', + '{checkout_fuchsia_boot_images}', ], }, { diff --git a/deps/v8/OWNERS b/deps/v8/OWNERS index db579fb0e6a2d3..cd95b48bac3eba 100644 --- a/deps/v8/OWNERS +++ b/deps/v8/OWNERS @@ -5,6 +5,7 @@ file:ENG_REVIEW_OWNERS per-file .*=file:INFRA_OWNERS per-file .bazelrc=file:COMMON_OWNERS per-file .mailmap=file:COMMON_OWNERS +per-file .ycm_extra_conf.py=file:COMMON_OWNERS per-file codereview.settings=file:INFRA_OWNERS per-file AUTHORS=file:COMMON_OWNERS per-file BUILD.bazel=file:COMMON_OWNERS diff --git a/deps/v8/bazel/defs.bzl b/deps/v8/bazel/defs.bzl index d8db3fe8ba9a62..77e86ef6f2e646 100644 --- a/deps/v8/bazel/defs.bzl +++ b/deps/v8/bazel/defs.bzl @@ -151,14 +151,6 @@ def _default_args(): "-fno-integrated-as", ], "//conditions:default": [], - }) + select({ - "@v8//bazel/config:is_debug":[ - "-fvisibility=default", - ], - "//conditions:default": [ - "-fvisibility=hidden", - "-fvisibility-inlines-hidden", - ], }), includes = ["include"], linkopts = select({ @@ -518,6 +510,7 @@ def build_config_content(cpu, icu): ("v8_current_cpu", cpu), ("v8_dict_property_const_tracking", "false"), ("v8_enable_atomic_object_field_writes", "false"), + ("v8_enable_conservative_stack_scanning", "false"), ("v8_enable_concurrent_marking", "false"), ("v8_enable_i18n_support", icu), ("v8_enable_verify_predictable", "false"), diff --git a/deps/v8/gni/snapshot_toolchain.gni b/deps/v8/gni/snapshot_toolchain.gni index 5f5e53a30d0789..99de816372bf9c 100644 --- a/deps/v8/gni/snapshot_toolchain.gni +++ b/deps/v8/gni/snapshot_toolchain.gni @@ -44,10 +44,6 @@ declare_args() { # # There are test cases for this code posted as an attachment to # https://crbug.com/625353. -# -# TODO(GYP): Currently only regular (non-cross) compiles, and cross-compiles -# from x64 hosts to Intel, ARM, or MIPS targets, are implemented. Add support -# for the other supported configurations. if (v8_snapshot_toolchain == "") { if (current_os == host_os && current_cpu == host_cpu) { @@ -69,22 +65,21 @@ if (v8_snapshot_toolchain == "") { # therefore snapshots will need to be built using native mksnapshot # in combination with qemu v8_snapshot_toolchain = current_toolchain + } else if (host_cpu == current_cpu) { + # Cross-build from same ISA on one OS to another. For example: + # * targeting win/x64 on a linux/x64 host + # * targeting win/arm64 on a mac/arm64 host + v8_snapshot_toolchain = host_toolchain } else if (host_cpu == "arm64" && current_cpu == "x64") { # Cross-build from arm64 to intel (likely on an Apple Silicon mac). v8_snapshot_toolchain = "//build/toolchain/${host_os}:clang_arm64_v8_$v8_current_cpu" } else if (host_cpu == "x64") { # This is a cross-compile from an x64 host to either a non-Intel target - # cpu or a different target OS. Clang will always be used by default on the - # host, unless this is a ChromeOS build, in which case the same toolchain - # (Clang or GCC) will be used for target and host by default. - if (is_chromeos && !is_clang) { - _clang = "" - } else { - _clang = "clang_" - } + # cpu or to 32-bit x86 on a different target OS. - if (v8_current_cpu == "x64" || v8_current_cpu == "x86") { + assert(v8_current_cpu != "x64", "handled by host_cpu == current_cpu branch") + if (v8_current_cpu == "x86") { _cpus = v8_current_cpu } else if (v8_current_cpu == "arm64" || v8_current_cpu == "mips64el" || v8_current_cpu == "riscv64" || v8_current_cpu == "loong64") { @@ -104,7 +99,7 @@ if (v8_snapshot_toolchain == "") { } if (_cpus != "") { - v8_snapshot_toolchain = "//build/toolchain/${host_os}:${_clang}${_cpus}" + v8_snapshot_toolchain = "//build/toolchain/${host_os}:clang_${_cpus}" } else if (is_win && v8_current_cpu == "arm64") { # cross compile Windows arm64 with host toolchain. v8_snapshot_toolchain = host_toolchain diff --git a/deps/v8/include/cppgc/README.md b/deps/v8/include/cppgc/README.md index a7d08f86b32a39..d825ea5bd5ba9b 100644 --- a/deps/v8/include/cppgc/README.md +++ b/deps/v8/include/cppgc/README.md @@ -26,6 +26,8 @@ This allows Oilpan to run garbage collection in parallel with mutators running i References to objects belonging to another thread's heap are modeled using cross-thread roots. This is even true for on-heap to on-heap references. +Oilpan heaps may generally not be accessed from different threads unless otherwise noted. + ## Heap partitioning Oilpan's heaps are partitioned into spaces. diff --git a/deps/v8/include/cppgc/heap-handle.h b/deps/v8/include/cppgc/heap-handle.h index 8d825133b065d6..0d1d21e65daafd 100644 --- a/deps/v8/include/cppgc/heap-handle.h +++ b/deps/v8/include/cppgc/heap-handle.h @@ -19,6 +19,11 @@ class WriteBarrierTypeForNonCagedHeapPolicy; * Opaque handle used for additional heap APIs. */ class HeapHandle { + public: + // Deleted copy ctor to avoid treating the type by value. + HeapHandle(const HeapHandle&) = delete; + HeapHandle& operator=(const HeapHandle&) = delete; + private: HeapHandle() = default; diff --git a/deps/v8/include/cppgc/platform.h b/deps/v8/include/cppgc/platform.h index d2fe7b124c99fb..5a0a40ec8c0eb0 100644 --- a/deps/v8/include/cppgc/platform.h +++ b/deps/v8/include/cppgc/platform.h @@ -33,8 +33,9 @@ class V8_EXPORT Platform { virtual ~Platform() = default; /** - * Returns the allocator used by cppgc to allocate its heap and various - * support structures. + * \returns the allocator used by cppgc to allocate its heap and various + * support structures. Returning nullptr results in using the `PageAllocator` + * provided by `cppgc::InitializeProcess()` instead. */ virtual PageAllocator* GetPageAllocator() = 0; @@ -133,9 +134,10 @@ class V8_EXPORT Platform { * Can be called multiple times when paired with `ShutdownProcess()`. * * \param page_allocator The allocator used for maintaining meta data. Must stay - * always alive and not change between multiple calls to InitializeProcess. + * always alive and not change between multiple calls to InitializeProcess. If + * no allocator is provided, a default internal version will be used. */ -V8_EXPORT void InitializeProcess(PageAllocator* page_allocator); +V8_EXPORT void InitializeProcess(PageAllocator* page_allocator = nullptr); /** * Must be called after destroying the last used heap. Some process-global diff --git a/deps/v8/include/js_protocol.pdl b/deps/v8/include/js_protocol.pdl index b3b97fa11768e6..6efcf787854dac 100644 --- a/deps/v8/include/js_protocol.pdl +++ b/deps/v8/include/js_protocol.pdl @@ -458,13 +458,14 @@ domain Debugger # New value for breakpoints active state. boolean active - # Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or - # no exceptions. Initial pause on exceptions state is `none`. + # Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions, + # or caught exceptions, no exceptions. Initial pause on exceptions state is `none`. command setPauseOnExceptions parameters # Pause on exceptions mode. enum state none + caught uncaught all diff --git a/deps/v8/include/v8-array-buffer.h b/deps/v8/include/v8-array-buffer.h index cc5d2d4323000a..841bd02a793333 100644 --- a/deps/v8/include/v8-array-buffer.h +++ b/deps/v8/include/v8-array-buffer.h @@ -251,8 +251,26 @@ class V8_EXPORT ArrayBuffer : public Object { * preventing JavaScript from ever accessing underlying backing store. * ArrayBuffer should have been externalized and must be detachable. */ + V8_DEPRECATE_SOON( + "Use the version which takes a key parameter (passing a null handle is " + "ok).") void Detach(); + /** + * Detaches this ArrayBuffer and all its views (typed arrays). + * Detaching sets the byte length of the buffer and all typed arrays to zero, + * preventing JavaScript from ever accessing underlying backing store. + * ArrayBuffer should have been externalized and must be detachable. Returns + * Nothing if the key didn't pass the [[ArrayBufferDetachKey]] check, + * Just(true) otherwise. + */ + V8_WARN_UNUSED_RESULT Maybe Detach(v8::Local key); + + /** + * Sets the ArrayBufferDetachKey. + */ + void SetDetachKey(v8::Local key); + /** * Get a shared pointer to the backing store of this array buffer. This * pointer coordinates the lifetime management of the internal storage diff --git a/deps/v8/include/v8-callbacks.h b/deps/v8/include/v8-callbacks.h index c02059a5891a74..0ffdfb6656fc64 100644 --- a/deps/v8/include/v8-callbacks.h +++ b/deps/v8/include/v8-callbacks.h @@ -237,7 +237,8 @@ using LogEventCallback = void (*)(const char* name, enum class CrashKeyId { kIsolateAddress, kReadonlySpaceFirstPageAddress, - kMapSpaceFirstPageAddress, + kMapSpaceFirstPageAddress V8_ENUM_DEPRECATE_SOON("Map space got removed"), + kOldSpaceFirstPageAddress, kCodeRangeBaseAddress, kCodeSpaceFirstPageAddress, kDumpType, diff --git a/deps/v8/include/v8-context.h b/deps/v8/include/v8-context.h index 427f3a738607bb..3ce0eb0af38c67 100644 --- a/deps/v8/include/v8-context.h +++ b/deps/v8/include/v8-context.h @@ -169,6 +169,9 @@ class V8_EXPORT Context : public Data { /** Returns the microtask queue associated with a current context. */ MicrotaskQueue* GetMicrotaskQueue(); + /** Sets the microtask queue associated with the current context. */ + void SetMicrotaskQueue(MicrotaskQueue* queue); + /** * The field at kDebugIdIndex used to be reserved for the inspector. * It now serves no purpose. diff --git a/deps/v8/include/v8-cppgc.h b/deps/v8/include/v8-cppgc.h index 00ea5c5ae502ef..139af8fdac26c3 100644 --- a/deps/v8/include/v8-cppgc.h +++ b/deps/v8/include/v8-cppgc.h @@ -77,9 +77,6 @@ struct WrapperDescriptor final { }; struct V8_EXPORT CppHeapCreateParams { - CppHeapCreateParams(const CppHeapCreateParams&) = delete; - CppHeapCreateParams& operator=(const CppHeapCreateParams&) = delete; - std::vector> custom_spaces; WrapperDescriptor wrapper_descriptor; /** @@ -98,6 +95,10 @@ struct V8_EXPORT CppHeapCreateParams { /** * A heap for allocating managed C++ objects. + * + * Similar to v8::Isolate, the heap may only be accessed from one thread at a + * time. The heap may be used from different threads using the + * v8::Locker/v8::Unlocker APIs which is different from generic Oilpan. */ class V8_EXPORT CppHeap { public: diff --git a/deps/v8/include/v8-data.h b/deps/v8/include/v8-data.h index cc51fefe105bbe..fc4dea92f3d8cc 100644 --- a/deps/v8/include/v8-data.h +++ b/deps/v8/include/v8-data.h @@ -53,7 +53,7 @@ class V8_EXPORT Data { bool IsContext() const; private: - Data(); + Data() = delete; }; /** diff --git a/deps/v8/include/v8-embedder-heap.h b/deps/v8/include/v8-embedder-heap.h index d3920c5f3b5580..f994cdfdf34376 100644 --- a/deps/v8/include/v8-embedder-heap.h +++ b/deps/v8/include/v8-embedder-heap.h @@ -72,7 +72,7 @@ class V8_EXPORT EmbedderRootsHandler { class V8_EXPORT // GCC doesn't like combining __attribute__(()) with [[deprecated]]. #ifdef __clang__ -V8_DEPRECATE_SOON("Use CppHeap when working with v8::TracedReference.") +V8_DEPRECATED("Use CppHeap when working with v8::TracedReference.") #endif // __clang__ EmbedderHeapTracer { public: diff --git a/deps/v8/include/v8-internal.h b/deps/v8/include/v8-internal.h index a52d066c835e2d..704e89e2dc27b6 100644 --- a/deps/v8/include/v8-internal.h +++ b/deps/v8/include/v8-internal.h @@ -581,6 +581,8 @@ class Internals { static const int kNodeStateMask = 0x3; static const int kNodeStateIsWeakValue = 2; + static const int kTracedNodeClassIdOffset = kApiSystemPointerSize; + static const int kFirstNonstringType = 0x80; static const int kOddballType = 0x83; static const int kForeignType = 0xcc; diff --git a/deps/v8/include/v8-isolate.h b/deps/v8/include/v8-isolate.h index 2f8acc88682e38..e9f531973b2eef 100644 --- a/deps/v8/include/v8-isolate.h +++ b/deps/v8/include/v8-isolate.h @@ -954,22 +954,20 @@ class V8_EXPORT Isolate { * Attaches a managed C++ heap as an extension to the JavaScript heap. The * embedder maintains ownership of the CppHeap. At most one C++ heap can be * attached to V8. + * * AttachCppHeap cannot be used simultaneously with SetEmbedderHeapTracer. * - * This is an experimental feature and may still change significantly. + * Multi-threaded use requires the use of v8::Locker/v8::Unlocker, see + * CppHeap. */ void AttachCppHeap(CppHeap*); /** * Detaches a managed C++ heap if one was attached using `AttachCppHeap()`. - * - * This is an experimental feature and may still change significantly. */ void DetachCppHeap(); /** - * This is an experimental feature and may still change significantly. - * \returns the C++ heap managed by V8. Only available if such a heap has been * attached using `AttachCppHeap()`. */ @@ -1526,8 +1524,10 @@ class V8_EXPORT Isolate { void SetWasmLoadSourceMapCallback(WasmLoadSourceMapCallback callback); + V8_DEPRECATED("Wasm SIMD is always enabled") void SetWasmSimdEnabledCallback(WasmSimdEnabledCallback callback); + V8_DEPRECATED("Wasm exceptions are always enabled") void SetWasmExceptionsEnabledCallback(WasmExceptionsEnabledCallback callback); void SetSharedArrayBufferConstructorEnabledCallback( diff --git a/deps/v8/include/v8-microtask-queue.h b/deps/v8/include/v8-microtask-queue.h index f1624b903b13c1..85d227fa3fdce6 100644 --- a/deps/v8/include/v8-microtask-queue.h +++ b/deps/v8/include/v8-microtask-queue.h @@ -118,7 +118,12 @@ class V8_EXPORT V8_NODISCARD MicrotasksScope { public: enum Type { kRunMicrotasks, kDoNotRunMicrotasks }; + V8_DEPRECATE_SOON( + "May be incorrect if context was created with non-default microtask " + "queue") MicrotasksScope(Isolate* isolate, Type type); + + MicrotasksScope(Local context, Type type); MicrotasksScope(Isolate* isolate, MicrotaskQueue* microtask_queue, Type type); ~MicrotasksScope(); diff --git a/deps/v8/include/v8-persistent-handle.h b/deps/v8/include/v8-persistent-handle.h index dbda4edb9baf4e..4fe79862e400f9 100644 --- a/deps/v8/include/v8-persistent-handle.h +++ b/deps/v8/include/v8-persistent-handle.h @@ -252,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 7b2c81d136401c..32a82f881e7f93 100644 --- a/deps/v8/include/v8-platform.h +++ b/deps/v8/include/v8-platform.h @@ -923,6 +923,7 @@ class Platform { /** * Allows the embedder to manage memory page allocations. + * Returning nullptr will cause V8 to use the default page allocator. */ virtual PageAllocator* GetPageAllocator() = 0; diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h index 6145a2257ad05b..6b73fc60bf2c21 100644 --- a/deps/v8/include/v8-profiler.h +++ b/deps/v8/include/v8-profiler.h @@ -175,6 +175,32 @@ class V8_EXPORT CpuProfileNode { static const int kNoColumnNumberInfo = Message::kNoColumnInfo; }; +/** + * An interface for exporting data from V8, using "push" model. + */ +class V8_EXPORT OutputStream { + public: + enum WriteResult { kContinue = 0, kAbort = 1 }; + virtual ~OutputStream() = default; + /** Notify about the end of stream. */ + virtual void EndOfStream() = 0; + /** Get preferred output chunk size. Called only once. */ + virtual int GetChunkSize() { return 1024; } + /** + * Writes the next chunk of snapshot data into the stream. Writing + * can be stopped by returning kAbort as function result. EndOfStream + * will not be called in case writing was aborted. + */ + virtual WriteResult WriteAsciiChunk(char* data, int size) = 0; + /** + * Writes the next chunk of heap stats data into the stream. Writing + * can be stopped by returning kAbort as function result. EndOfStream + * will not be called in case writing was aborted. + */ + virtual WriteResult WriteHeapStatsChunk(HeapStatsUpdate* data, int count) { + return kAbort; + } +}; /** * CpuProfile contains a CPU profile in a form of top-down call tree @@ -182,6 +208,9 @@ class V8_EXPORT CpuProfileNode { */ class V8_EXPORT CpuProfile { public: + enum SerializationFormat { + kJSON = 0 // See format description near 'Serialize' method. + }; /** Returns CPU profile title. */ Local GetTitle() const; @@ -235,6 +264,25 @@ class V8_EXPORT CpuProfile { * All pointers to nodes previously returned become invalid. */ void Delete(); + + /** + * Prepare a serialized representation of the profile. The result + * is written into the stream provided in chunks of specified size. + * + * For the JSON format, heap contents are represented as an object + * with the following structure: + * + * { + * nodes: [nodes array], + * startTime: number, + * endTime: number + * samples: [strings array] + * timeDeltas: [numbers array] + * } + * + */ + void Serialize(OutputStream* stream, + SerializationFormat format = kJSON) const; }; enum CpuProfilingMode { @@ -576,37 +624,6 @@ class V8_EXPORT HeapGraphNode { const HeapGraphEdge* GetChild(int index) const; }; - -/** - * An interface for exporting data from V8, using "push" model. - */ -class V8_EXPORT OutputStream { - public: - enum WriteResult { - kContinue = 0, - kAbort = 1 - }; - virtual ~OutputStream() = default; - /** Notify about the end of stream. */ - virtual void EndOfStream() = 0; - /** Get preferred output chunk size. Called only once. */ - virtual int GetChunkSize() { return 1024; } - /** - * Writes the next chunk of snapshot data into the stream. Writing - * can be stopped by returning kAbort as function result. EndOfStream - * will not be called in case writing was aborted. - */ - virtual WriteResult WriteAsciiChunk(char* data, int size) = 0; - /** - * Writes the next chunk of heap stats data into the stream. Writing - * can be stopped by returning kAbort as function result. EndOfStream - * will not be called in case writing was aborted. - */ - virtual WriteResult WriteHeapStatsChunk(HeapStatsUpdate* data, int count) { - return kAbort; - } -}; - /** * HeapSnapshots record the state of the JS heap at some moment. */ diff --git a/deps/v8/include/v8-traced-handle.h b/deps/v8/include/v8-traced-handle.h index 7719b9bc0167f2..e0fd57c49d4c55 100644 --- a/deps/v8/include/v8-traced-handle.h +++ b/deps/v8/include/v8-traced-handle.h @@ -403,7 +403,7 @@ void TracedReferenceBase::SetWrapperClassId(uint16_t class_id) { using I = internal::Internals; if (IsEmpty()) return; internal::Address* obj = reinterpret_cast(val_); - uint8_t* addr = reinterpret_cast(obj) + I::kNodeClassIdOffset; + uint8_t* addr = reinterpret_cast(obj) + I::kTracedNodeClassIdOffset; *reinterpret_cast(addr) = class_id; } @@ -411,7 +411,7 @@ uint16_t TracedReferenceBase::WrapperClassId() const { using I = internal::Internals; if (IsEmpty()) return 0; internal::Address* obj = reinterpret_cast(val_); - uint8_t* addr = reinterpret_cast(obj) + I::kNodeClassIdOffset; + uint8_t* addr = reinterpret_cast(obj) + I::kTracedNodeClassIdOffset; return *reinterpret_cast(addr); } diff --git a/deps/v8/include/v8-value.h b/deps/v8/include/v8-value.h index adca989e0022d1..866da201245877 100644 --- a/deps/v8/include/v8-value.h +++ b/deps/v8/include/v8-value.h @@ -244,6 +244,11 @@ class V8_EXPORT Value : public Data { */ bool IsWeakSet() const; + /** + * Returns true if this value is a WeakRef. + */ + bool IsWeakRef() const; + /** * Returns true if this value is an ArrayBuffer. */ diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 027a13a3b239bc..a7552d91e1807f 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 8 -#define V8_BUILD_NUMBER 168 -#define V8_PATCH_LEVEL 20 +#define V8_MINOR_VERSION 9 +#define V8_BUILD_NUMBER 194 +#define V8_PATCH_LEVEL 4 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h index a959be130d5319..2ac27b36b47ee3 100644 --- a/deps/v8/include/v8config.h +++ b/deps/v8/include/v8config.h @@ -288,6 +288,9 @@ path. Add it with -I to the command line // // V8_HAS_ATTRIBUTE_ALWAYS_INLINE - __attribute__((always_inline)) // supported +// V8_HAS_ATTRIBUTE_CONSTINIT - __attribute__((require_constant_ +// initialization)) +// supported // V8_HAS_ATTRIBUTE_NONNULL - __attribute__((nonnull)) supported // V8_HAS_ATTRIBUTE_NOINLINE - __attribute__((noinline)) supported // V8_HAS_ATTRIBUTE_UNUSED - __attribute__((unused)) supported @@ -334,6 +337,8 @@ path. Add it with -I to the command line #endif # define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (__has_attribute(always_inline)) +# define V8_HAS_ATTRIBUTE_CONSTINIT \ + (__has_attribute(require_constant_initialization)) # define V8_HAS_ATTRIBUTE_NONNULL (__has_attribute(nonnull)) # define V8_HAS_ATTRIBUTE_NOINLINE (__has_attribute(noinline)) # define V8_HAS_ATTRIBUTE_UNUSED (__has_attribute(unused)) @@ -450,6 +455,16 @@ path. Add it with -I to the command line #endif +// A macro to mark a declaration as requiring constant initialization. +// Use like: +// int* foo V8_CONSTINIT; +#if V8_HAS_ATTRIBUTE_CONSTINIT +# define V8_CONSTINIT __attribute__((require_constant_initialization)) +#else +# define V8_CONSTINIT +#endif + + // A macro to mark specific arguments as non-null. // Use like: // int add(int* x, int y, int* z) V8_NONNULL(1, 3) { return *x + y + *z; } diff --git a/deps/v8/infra/testing/builders.pyl b/deps/v8/infra/testing/builders.pyl index 516905539cf72c..19d5e1845249ec 100644 --- a/deps/v8/infra/testing/builders.pyl +++ b/deps/v8/infra/testing/builders.pyl @@ -161,7 +161,6 @@ 'tests': [ {'name': 'benchmarks'}, {'name': 'benchmarks', 'variant': 'extra'}, - {'name': 'gcmole'}, {'name': 'mjsunit_sp_frame_access'}, {'name': 'mozilla'}, {'name': 'mozilla', 'variant': 'extra'}, @@ -180,6 +179,7 @@ ], 'shards': 4, }, + {'name': 'gcmole'}, ], }, 'v8_linux_optional_rel': { @@ -847,7 +847,7 @@ {'name': 'mozilla'}, {'name': 'test262', 'variant': 'default', 'shards': 2}, {'name': 'v8testing', 'shards': 2}, - {'name': 'v8testing', 'variant': 'extra'}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 2}, ], }, ############################################################################## @@ -989,7 +989,6 @@ 'tests': [ {'name': 'benchmarks'}, {'name': 'benchmarks', 'variant': 'extra'}, - {'name': 'gcmole'}, {'name': 'mjsunit_sp_frame_access'}, {'name': 'mozilla'}, {'name': 'mozilla', 'variant': 'extra'}, @@ -1051,6 +1050,7 @@ 'test_args': ['--extra-flags', '--noenable-avx'], 'shards': 2 }, + {'name': 'gcmole'}, ], }, 'V8 Linux - arm64 - sim - CFI': { @@ -1807,8 +1807,8 @@ 'tests': [ {'name': 'mozilla'}, {'name': 'test262', 'variant': 'default'}, - {'name': 'v8testing'}, - {'name': 'v8testing', 'variant': 'extra'}, + {'name': 'v8testing', 'shards': 2}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 2}, ], }, 'V8 Win64 - debug': { @@ -1829,7 +1829,7 @@ 'tests': [ {'name': 'mozilla'}, {'name': 'test262', 'variant': 'default'}, - {'name': 'v8testing'}, + {'name': 'v8testing', 'shards': 2}, ], }, 'V8 Win64 ASAN': { diff --git a/deps/v8/src/api/api-natives.cc b/deps/v8/src/api/api-natives.cc index 8624c279d66e4f..d0b298723423e9 100644 --- a/deps/v8/src/api/api-natives.cc +++ b/deps/v8/src/api/api-natives.cc @@ -83,6 +83,8 @@ MaybeHandle DefineAccessorProperty(Isolate* isolate, InstantiateFunction(isolate, Handle::cast(getter)), Object); + Handle trampoline = BUILTIN_CODE(isolate, DebugBreakTrampoline); + Handle::cast(getter)->set_code(*trampoline); } if (setter->IsFunctionTemplateInfo() && FunctionTemplateInfo::cast(*setter).BreakAtEntry()) { @@ -91,6 +93,8 @@ MaybeHandle DefineAccessorProperty(Isolate* isolate, InstantiateFunction(isolate, Handle::cast(setter)), Object); + Handle trampoline = BUILTIN_CODE(isolate, DebugBreakTrampoline); + Handle::cast(setter)->set_code(*trampoline); } RETURN_ON_EXCEPTION( isolate, diff --git a/deps/v8/src/api/api.cc b/deps/v8/src/api/api.cc index a4a4381614e1fd..da75db119baf10 100644 --- a/deps/v8/src/api/api.cc +++ b/deps/v8/src/api/api.cc @@ -63,6 +63,7 @@ #include "src/handles/global-handles.h" #include "src/handles/persistent-handles.h" #include "src/handles/shared-object-conveyor-handles.h" +#include "src/handles/traced-handles.h" #include "src/heap/embedder-tracing.h" #include "src/heap/heap-inl.h" #include "src/heap/heap-write-barrier.h" @@ -616,7 +617,10 @@ StartupData SnapshotCreator::CreateBlob( i::Snapshot::ClearReconstructableDataForSerialization( i_isolate, function_code_handling == FunctionCodeHandling::kClear); - i::GlobalSafepointScope global_safepoint(i_isolate); + i::SafepointKind safepoint_kind = i_isolate->has_shared_heap() + ? i::SafepointKind::kGlobal + : i::SafepointKind::kIsolate; + i::SafepointScope safepoint_scope(i_isolate, safepoint_kind); i::DisallowGarbageCollection no_gc_from_here_on; // Create a vector with all contexts and clear associated Persistent fields. @@ -654,7 +658,7 @@ StartupData SnapshotCreator::CreateBlob( data->created_ = true; return i::Snapshot::Create(i_isolate, &contexts, embedder_fields_serializers, - global_safepoint, no_gc_from_here_on); + safepoint_scope, no_gc_from_here_on); } bool StartupData::CanBeRehashed() const { @@ -792,8 +796,7 @@ i::Address* GlobalizeTracedReference(i::Isolate* i_isolate, i::Address* obj, Utils::ApiCheck((slot != nullptr), "v8::GlobalizeTracedReference", "the address slot must be not null"); #endif - i::Handle result = - i_isolate->global_handles()->CreateTraced(*obj, slot, store_mode); + auto result = i_isolate->traced_handles()->Create(*obj, slot, store_mode); #ifdef VERIFY_HEAP if (i::v8_flags.verify_heap) { i::Object(*obj).ObjectVerify(i_isolate); @@ -803,16 +806,16 @@ i::Address* GlobalizeTracedReference(i::Isolate* i_isolate, i::Address* obj, } void MoveTracedReference(internal::Address** from, internal::Address** to) { - GlobalHandles::MoveTracedReference(from, to); + TracedHandles::Move(from, to); } void CopyTracedReference(const internal::Address* const* from, internal::Address** to) { - GlobalHandles::CopyTracedReference(from, to); + TracedHandles::Copy(from, to); } void DisposeTracedReference(internal::Address* location) { - GlobalHandles::DestroyTracedReference(location); + TracedHandles::Destroy(location); } } // namespace internal @@ -3732,6 +3735,7 @@ bool Value::IsWasmModuleObject() const { return false; } #endif // V8_ENABLE_WEBASSEMBLY VALUE_IS_SPECIFIC_TYPE(WeakMap, JSWeakMap) VALUE_IS_SPECIFIC_TYPE(WeakSet, JSWeakSet) +VALUE_IS_SPECIFIC_TYPE(WeakRef, JSWeakRef) #undef VALUE_IS_SPECIFIC_TYPE @@ -6611,10 +6615,31 @@ v8::Isolate* Context::GetIsolate() { v8::MicrotaskQueue* Context::GetMicrotaskQueue() { i::Handle env = Utils::OpenHandle(this); Utils::ApiCheck(env->IsNativeContext(), "v8::Context::GetMicrotaskQueue", - "Must be calld on a native context"); + "Must be called on a native context"); return i::Handle::cast(env)->microtask_queue(); } +void Context::SetMicrotaskQueue(v8::MicrotaskQueue* queue) { + i::Handle context = Utils::OpenHandle(this); + i::Isolate* i_isolate = context->GetIsolate(); + Utils::ApiCheck(context->IsNativeContext(), "v8::Context::SetMicrotaskQueue", + "Must be called on a native context"); + i::Handle native_context = + i::Handle::cast(context); + i::HandleScopeImplementer* impl = i_isolate->handle_scope_implementer(); + Utils::ApiCheck(!native_context->microtask_queue()->IsRunningMicrotasks(), + "v8::Context::SetMicrotaskQueue", + "Must not be running microtasks"); + Utils::ApiCheck( + native_context->microtask_queue()->GetMicrotasksScopeDepth() == 0, + "v8::Context::SetMicrotaskQueue", "Must not have microtask scope pushed"); + Utils::ApiCheck(impl->EnteredContextCount() == 0, + "v8::Context::SetMicrotaskQueue()", + "Cannot set Microtask Queue with an entered context"); + native_context->set_microtask_queue( + i_isolate, static_cast(queue)); +} + v8::Local Context::Global() { i::Handle context = Utils::OpenHandle(this); i::Isolate* i_isolate = context->GetIsolate(); @@ -8086,14 +8111,32 @@ std::shared_ptr ToInternal( } } // namespace -void v8::ArrayBuffer::Detach() { +Maybe v8::ArrayBuffer::Detach(v8::Local key) { i::Handle obj = Utils::OpenHandle(this); i::Isolate* i_isolate = obj->GetIsolate(); Utils::ApiCheck(obj->is_detachable(), "v8::ArrayBuffer::Detach", "Only detachable ArrayBuffers can be detached"); - API_RCS_SCOPE(i_isolate, ArrayBuffer, Detach); - ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); - obj->Detach(); + ENTER_V8_NO_SCRIPT( + i_isolate, reinterpret_cast(i_isolate)->GetCurrentContext(), + ArrayBuffer, Detach, Nothing(), i::HandleScope); + if (!key.IsEmpty()) { + i::Handle i_key = Utils::OpenHandle(*key); + constexpr bool kForceForWasmMemory = false; + has_pending_exception = + i::JSArrayBuffer::Detach(obj, kForceForWasmMemory, i_key).IsNothing(); + } else { + has_pending_exception = i::JSArrayBuffer::Detach(obj).IsNothing(); + } + RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool); + return Just(true); +} + +void v8::ArrayBuffer::Detach() { Detach(Local()).Check(); } + +void v8::ArrayBuffer::SetDetachKey(v8::Local key) { + i::Handle obj = Utils::OpenHandle(this); + i::Handle i_key = Utils::OpenHandle(*key); + obj->set_detach_key(*i_key); } size_t v8::ArrayBuffer::ByteLength() const { @@ -9557,16 +9600,19 @@ CALLBACK_SETTER(WasmAsyncResolvePromiseCallback, CALLBACK_SETTER(WasmLoadSourceMapCallback, WasmLoadSourceMapCallback, wasm_load_source_map_callback) -CALLBACK_SETTER(WasmSimdEnabledCallback, WasmSimdEnabledCallback, - wasm_simd_enabled_callback) - -CALLBACK_SETTER(WasmExceptionsEnabledCallback, WasmExceptionsEnabledCallback, - wasm_exceptions_enabled_callback) - CALLBACK_SETTER(SharedArrayBufferConstructorEnabledCallback, SharedArrayBufferConstructorEnabledCallback, sharedarraybuffer_constructor_enabled_callback) +void Isolate::SetWasmExceptionsEnabledCallback( + WasmExceptionsEnabledCallback callback) { + // Exceptions are always enabled +} + +void Isolate::SetWasmSimdEnabledCallback(WasmSimdEnabledCallback callback) { + // SIMD is always enabled +} + void Isolate::InstallConditionalFeatures(Local context) { v8::HandleScope handle_scope(this); v8::Context::Scope context_scope(context); @@ -9725,6 +9771,11 @@ MicrotasksScope::MicrotasksScope(Isolate* v8_isolate, MicrotasksScope::Type type) : MicrotasksScope(v8_isolate, nullptr, type) {} +MicrotasksScope::MicrotasksScope(Local v8_context, + MicrotasksScope::Type type) + : MicrotasksScope(v8_context->GetIsolate(), v8_context->GetMicrotaskQueue(), + type) {} + MicrotasksScope::MicrotasksScope(Isolate* v8_isolate, MicrotaskQueue* microtask_queue, MicrotasksScope::Type type) @@ -10046,6 +10097,21 @@ int64_t CpuProfile::GetEndTime() const { return profile->end_time().since_origin().InMicroseconds(); } +static i::CpuProfile* ToInternal(const CpuProfile* profile) { + return const_cast( + reinterpret_cast(profile)); +} + +void CpuProfile::Serialize(OutputStream* stream, + CpuProfile::SerializationFormat format) const { + Utils::ApiCheck(format == kJSON, "v8::CpuProfile::Serialize", + "Unknown serialization format"); + Utils::ApiCheck(stream->GetChunkSize() > 0, "v8::CpuProfile::Serialize", + "Invalid stream chunk size"); + i::CpuProfileJSONSerializer serializer(ToInternal(this)); + serializer.Serialize(stream); +} + int CpuProfile::GetSamplesCount() const { return reinterpret_cast(this)->samples_count(); } @@ -10508,7 +10574,7 @@ void EmbedderHeapTracer::IterateTracedGlobalHandles( TracedGlobalHandleVisitor* visitor) { i::Isolate* i_isolate = reinterpret_cast(v8_isolate_); i::DisallowGarbageCollection no_gc; - i_isolate->global_handles()->IterateTracedNodes(visitor); + i_isolate->traced_handles()->Iterate(visitor); } bool EmbedderHeapTracer::IsRootForNonTracingGC( diff --git a/deps/v8/src/asmjs/asm-js.cc b/deps/v8/src/asmjs/asm-js.cc index a6973bd385c682..cb904a0be0db9a 100644 --- a/deps/v8/src/asmjs/asm-js.cc +++ b/deps/v8/src/asmjs/asm-js.cc @@ -133,7 +133,7 @@ void Report(Handle