From 9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 4 Dec 2018 08:20:37 +0100 Subject: [PATCH] deps: update V8 to 7.1.302.28 PR-URL: https://github.com/nodejs/node/pull/23423 Reviewed-By: Colin Ihrig Reviewed-By: Gus Caplan Reviewed-By: Myles Borins --- deps/v8/.clang-tidy | 20 + deps/v8/.gitattributes | 2 + deps/v8/.gitignore | 1 - deps/v8/AUTHORS | 2 + deps/v8/BUILD.gn | 198 +- deps/v8/ChangeLog | 1640 +++++++++++ deps/v8/DEPS | 62 +- deps/v8/PRESUBMIT.py | 16 +- deps/v8/gni/v8.gni | 10 +- deps/v8/include/libplatform/v8-tracing.h | 10 +- deps/v8/include/v8-inspector.h | 14 +- deps/v8/include/v8-internal.h | 316 ++ deps/v8/include/v8-platform.h | 15 +- deps/v8/include/v8-profiler.h | 24 +- deps/v8/include/v8-util.h | 8 +- deps/v8/include/v8-version.h | 6 +- deps/v8/include/v8.h | 764 ++--- deps/v8/include/v8config.h | 30 + deps/v8/infra/config/cq.cfg | 17 + deps/v8/infra/mb/mb_config.pyl | 121 +- deps/v8/src/DEPS | 2 + deps/v8/src/accessors.cc | 5 +- deps/v8/src/accessors.h | 57 +- deps/v8/src/address-map.cc | 9 +- deps/v8/src/address-map.h | 11 +- deps/v8/src/allocation-site-scopes-inl.h | 52 + deps/v8/src/allocation-site-scopes.h | 34 +- deps/v8/src/allocation.cc | 169 +- deps/v8/src/allocation.h | 78 +- deps/v8/src/api-arguments-inl.h | 85 +- deps/v8/src/api-arguments.h | 7 +- deps/v8/src/api-inl.h | 1 + deps/v8/src/api-natives.cc | 54 +- deps/v8/src/api-natives.h | 9 +- deps/v8/src/api.cc | 456 ++- deps/v8/src/api.h | 1 + deps/v8/src/arguments.h | 2 +- deps/v8/src/arm/assembler-arm.cc | 27 +- deps/v8/src/arm/assembler-arm.h | 11 +- deps/v8/src/arm/code-stubs-arm.cc | 10 +- deps/v8/src/arm/codegen-arm.cc | 46 +- deps/v8/src/arm/interface-descriptors-arm.cc | 14 +- deps/v8/src/arm/macro-assembler-arm.cc | 17 +- deps/v8/src/arm/macro-assembler-arm.h | 21 +- deps/v8/src/arm/simulator-arm.cc | 10 +- deps/v8/src/arm64/assembler-arm64-inl.h | 4 +- deps/v8/src/arm64/assembler-arm64.cc | 43 +- deps/v8/src/arm64/assembler-arm64.h | 4 +- deps/v8/src/arm64/code-stubs-arm64.cc | 9 +- deps/v8/src/arm64/codegen-arm64.cc | 5 +- deps/v8/src/arm64/constants-arm64.h | 2 - .../src/arm64/interface-descriptors-arm64.cc | 14 +- deps/v8/src/arm64/macro-assembler-arm64.cc | 33 +- deps/v8/src/arm64/macro-assembler-arm64.h | 23 +- deps/v8/src/asmjs/asm-js.cc | 2 +- deps/v8/src/assembler.cc | 32 +- deps/v8/src/assembler.h | 56 +- deps/v8/src/assert-scope.h | 4 +- .../ast/ast-function-literal-id-reindexer.cc | 2 +- deps/v8/src/ast/ast-source-ranges.h | 25 +- deps/v8/src/ast/ast-value-factory.cc | 11 + deps/v8/src/ast/ast-value-factory.h | 96 +- deps/v8/src/ast/ast.cc | 6 - deps/v8/src/ast/ast.h | 36 +- deps/v8/src/ast/prettyprinter.cc | 4 +- deps/v8/src/ast/scopes-inl.h | 66 + deps/v8/src/ast/scopes.cc | 231 +- deps/v8/src/ast/scopes.h | 73 +- deps/v8/src/ast/variables.h | 3 +- deps/v8/src/base/address-region.h | 70 + deps/v8/src/base/atomic-utils.h | 16 + deps/v8/src/base/bits.h | 8 + deps/v8/src/base/bounded-page-allocator.cc | 101 + deps/v8/src/base/bounded-page-allocator.h | 79 + deps/v8/src/base/build_config.h | 4 +- deps/v8/src/base/debug/stack_trace.cc | 2 +- deps/v8/src/base/debug/stack_trace_posix.cc | 8 +- deps/v8/src/base/debug/stack_trace_win.cc | 7 - deps/v8/src/base/ieee754.cc | 20 +- deps/v8/src/base/logging.h | 10 +- deps/v8/src/base/lsan-page-allocator.cc | 59 + deps/v8/src/base/lsan-page-allocator.h | 56 + deps/v8/src/base/macros.h | 48 +- deps/v8/src/base/optional.h | 2 +- deps/v8/src/base/page-allocator.cc | 8 +- deps/v8/src/base/page-allocator.h | 11 +- deps/v8/src/base/platform/OWNERS | 2 + deps/v8/src/base/platform/platform-fuchsia.cc | 12 +- deps/v8/src/base/platform/platform-linux.cc | 8 - .../src/base/platform/platform-posix-time.h | 2 +- deps/v8/src/base/platform/platform-posix.cc | 13 +- deps/v8/src/base/platform/platform-posix.h | 2 +- deps/v8/src/base/platform/platform-win32.cc | 6 +- deps/v8/src/base/platform/platform.h | 2 +- deps/v8/src/base/platform/semaphore.cc | 4 +- deps/v8/src/base/platform/time.h | 5 +- deps/v8/src/base/region-allocator.cc | 291 ++ deps/v8/src/base/region-allocator.h | 164 ++ deps/v8/src/base/safe_math.h | 2 +- deps/v8/src/base/threaded-list.h | 267 ++ deps/v8/src/base/timezone-cache.h | 2 +- .../src/base/utils/random-number-generator.cc | 2 +- .../src/base/utils/random-number-generator.h | 9 +- deps/v8/src/basic-block-profiler.cc | 7 - deps/v8/src/basic-block-profiler.h | 4 +- deps/v8/src/bit-vector.h | 9 +- deps/v8/src/bootstrapper.cc | 566 ++-- deps/v8/src/bootstrapper.h | 5 +- deps/v8/src/builtins/arm/builtins-arm.cc | 158 +- deps/v8/src/builtins/arm64/builtins-arm64.cc | 157 +- deps/v8/src/builtins/array-copywithin.tq | 26 +- deps/v8/src/builtins/array-foreach.tq | 69 +- deps/v8/src/builtins/array-lastindexof.tq | 159 + deps/v8/src/builtins/array-reverse.tq | 77 +- deps/v8/src/builtins/array-splice.tq | 395 +++ deps/v8/src/builtins/array-unshift.tq | 107 + deps/v8/src/builtins/array.tq | 321 +- deps/v8/src/builtins/base.tq | 653 +++-- deps/v8/src/builtins/builtins-api.cc | 2 +- .../v8/src/builtins/builtins-arguments-gen.cc | 6 +- deps/v8/src/builtins/builtins-array-gen.cc | 65 +- deps/v8/src/builtins/builtins-array.cc | 318 +- deps/v8/src/builtins/builtins-arraybuffer.cc | 20 +- .../builtins/builtins-async-function-gen.cc | 92 +- deps/v8/src/builtins/builtins-async-gen.cc | 93 +- deps/v8/src/builtins/builtins-async-gen.h | 53 +- .../builtins/builtins-async-generator-gen.cc | 55 +- .../builtins/builtins-async-iterator-gen.cc | 54 - deps/v8/src/builtins/builtins-boolean.cc | 5 +- deps/v8/src/builtins/builtins-call-gen.cc | 61 +- deps/v8/src/builtins/builtins-callsite.cc | 8 + .../src/builtins/builtins-collections-gen.cc | 25 +- deps/v8/src/builtins/builtins-console.cc | 3 +- .../src/builtins/builtins-constructor-gen.cc | 25 +- .../src/builtins/builtins-conversion-gen.cc | 72 +- deps/v8/src/builtins/builtins-data-view-gen.h | 14 +- deps/v8/src/builtins/builtins-dataview.cc | 29 +- deps/v8/src/builtins/builtins-date-gen.cc | 6 +- deps/v8/src/builtins/builtins-date.cc | 63 + deps/v8/src/builtins/builtins-definitions.h | 199 +- deps/v8/src/builtins/builtins-descriptors.h | 3 +- deps/v8/src/builtins/builtins-function-gen.cc | 5 +- deps/v8/src/builtins/builtins-function.cc | 33 +- deps/v8/src/builtins/builtins-handler-gen.cc | 2 +- deps/v8/src/builtins/builtins-ic-gen.cc | 8 +- deps/v8/src/builtins/builtins-internal-gen.cc | 210 +- .../src/builtins/builtins-interpreter-gen.cc | 18 + deps/v8/src/builtins/builtins-intl-gen.cc | 15 +- deps/v8/src/builtins/builtins-intl.cc | 1296 ++++----- deps/v8/src/builtins/builtins-intl.h | 30 - deps/v8/src/builtins/builtins-iterator-gen.cc | 141 +- deps/v8/src/builtins/builtins-iterator-gen.h | 5 +- deps/v8/src/builtins/builtins-lazy-gen.cc | 2 +- deps/v8/src/builtins/builtins-math-gen.cc | 11 +- deps/v8/src/builtins/builtins-number-gen.cc | 10 +- deps/v8/src/builtins/builtins-number.cc | 3 + deps/v8/src/builtins/builtins-object-gen.cc | 204 +- deps/v8/src/builtins/builtins-promise-gen.cc | 36 +- deps/v8/src/builtins/builtins-promise-gen.h | 5 +- deps/v8/src/builtins/builtins-proxy-gen.cc | 8 +- deps/v8/src/builtins/builtins-reflect.cc | 2 +- deps/v8/src/builtins/builtins-regexp-gen.cc | 41 +- .../builtins-sharedarraybuffer-gen.cc | 298 +- .../builtins/builtins-sharedarraybuffer.cc | 55 +- deps/v8/src/builtins/builtins-string-gen.cc | 273 +- deps/v8/src/builtins/builtins-string-gen.h | 14 +- deps/v8/src/builtins/builtins-string.cc | 3 + deps/v8/src/builtins/builtins-symbol.cc | 2 +- .../src/builtins/builtins-typed-array-gen.cc | 184 +- .../src/builtins/builtins-typed-array-gen.h | 6 +- deps/v8/src/builtins/builtins-wasm-gen.cc | 52 +- deps/v8/src/builtins/builtins.cc | 43 +- deps/v8/src/builtins/builtins.h | 52 +- .../src/builtins/constants-table-builder.cc | 6 +- deps/v8/src/builtins/data-view.tq | 951 +++--- .../generate-bytecodes-builtins-list.cc | 97 + deps/v8/src/builtins/ia32/builtins-ia32.cc | 973 ++++--- deps/v8/src/builtins/mips/builtins-mips.cc | 122 +- .../v8/src/builtins/mips64/builtins-mips64.cc | 120 +- deps/v8/src/builtins/ppc/builtins-ppc.cc | 121 +- deps/v8/src/builtins/s390/builtins-s390.cc | 125 +- .../src/builtins/setup-builtins-internal.cc | 64 +- deps/v8/src/builtins/typed-array.tq | 162 +- deps/v8/src/builtins/x64/builtins-x64.cc | 173 +- deps/v8/src/callable.h | 2 +- deps/v8/src/cancelable-task.h | 54 +- deps/v8/src/char-predicates-inl.h | 11 +- deps/v8/src/checks.h | 2 +- deps/v8/src/code-events.h | 4 +- deps/v8/src/code-factory.cc | 30 +- deps/v8/src/code-factory.h | 3 +- deps/v8/src/code-stub-assembler.cc | 1556 ++++++---- deps/v8/src/code-stub-assembler.h | 326 ++- deps/v8/src/code-stubs.h | 7 +- deps/v8/src/codegen.cc | 24 +- deps/v8/src/codegen.h | 10 +- deps/v8/src/collector.h | 6 +- deps/v8/src/compilation-cache.cc | 2 - deps/v8/src/compilation-cache.h | 2 +- deps/v8/src/compilation-statistics.h | 2 +- .../compiler-dispatcher-job.h | 28 +- .../compiler-dispatcher-tracer.cc | 2 +- .../compiler-dispatcher.cc | 450 +-- .../compiler-dispatcher/compiler-dispatcher.h | 37 +- .../optimizing-compile-dispatcher.cc | 18 +- .../unoptimized-compile-job.cc | 342 +-- .../unoptimized-compile-job.h | 49 +- deps/v8/src/compiler.cc | 418 +-- deps/v8/src/compiler.h | 93 +- deps/v8/src/compiler/access-builder.cc | 52 +- deps/v8/src/compiler/access-builder.h | 1 + deps/v8/src/compiler/access-info.cc | 49 +- deps/v8/src/compiler/access-info.h | 7 +- deps/v8/src/compiler/allocation-builder.h | 2 +- .../v8/src/compiler/arm/code-generator-arm.cc | 140 +- .../src/compiler/arm/instruction-codes-arm.h | 557 ++-- .../compiler/arm/instruction-scheduler-arm.cc | 21 - .../compiler/arm/instruction-selector-arm.cc | 235 +- .../compiler/arm64/code-generator-arm64.cc | 5 +- .../arm64/instruction-selector-arm64.cc | 2 + deps/v8/src/compiler/branch-elimination.cc | 2 +- deps/v8/src/compiler/bytecode-analysis.cc | 6 +- deps/v8/src/compiler/bytecode-analysis.h | 2 +- .../v8/src/compiler/bytecode-graph-builder.cc | 77 +- deps/v8/src/compiler/c-linkage.cc | 17 +- deps/v8/src/compiler/checkpoint-elimination.h | 2 +- deps/v8/src/compiler/code-assembler.cc | 104 +- deps/v8/src/compiler/code-assembler.h | 134 +- deps/v8/src/compiler/code-generator.cc | 44 +- deps/v8/src/compiler/code-generator.h | 28 +- deps/v8/src/compiler/common-node-cache.h | 2 +- .../v8/src/compiler/common-operator-reducer.h | 2 +- deps/v8/src/compiler/common-operator.cc | 21 +- deps/v8/src/compiler/common-operator.h | 11 +- .../src/compiler/compilation-dependencies.cc | 23 +- .../src/compiler/constant-folding-reducer.cc | 2 +- deps/v8/src/compiler/dead-code-elimination.h | 2 +- .../src/compiler/effect-control-linearizer.cc | 549 +++- .../src/compiler/effect-control-linearizer.h | 13 +- deps/v8/src/compiler/escape-analysis.cc | 78 +- deps/v8/src/compiler/escape-analysis.h | 8 +- deps/v8/src/compiler/frame-states.cc | 6 + deps/v8/src/compiler/gap-resolver.cc | 13 +- deps/v8/src/compiler/gap-resolver.h | 2 +- deps/v8/src/compiler/graph-assembler.cc | 30 +- deps/v8/src/compiler/graph-assembler.h | 19 +- deps/v8/src/compiler/graph-reducer.cc | 2 +- deps/v8/src/compiler/graph-reducer.h | 6 +- deps/v8/src/compiler/graph-trimmer.cc | 2 +- deps/v8/src/compiler/graph-visualizer.cc | 307 +- deps/v8/src/compiler/graph-visualizer.h | 41 +- deps/v8/src/compiler/graph.h | 2 +- .../src/compiler/ia32/code-generator-ia32.cc | 215 +- .../compiler/ia32/instruction-codes-ia32.h | 721 +++-- .../ia32/instruction-scheduler-ia32.cc | 21 - .../ia32/instruction-selector-ia32.cc | 235 +- .../src/compiler/instruction-selector-impl.h | 9 + deps/v8/src/compiler/instruction-selector.cc | 153 +- deps/v8/src/compiler/instruction.cc | 12 +- deps/v8/src/compiler/instruction.h | 24 +- deps/v8/src/compiler/int64-lowering.cc | 19 +- deps/v8/src/compiler/js-call-reducer.cc | 470 ++- deps/v8/src/compiler/js-call-reducer.h | 11 +- .../src/compiler/js-context-specialization.cc | 8 +- deps/v8/src/compiler/js-create-lowering.cc | 262 +- deps/v8/src/compiler/js-create-lowering.h | 20 +- deps/v8/src/compiler/js-generic-lowering.cc | 52 +- deps/v8/src/compiler/js-graph.cc | 16 +- deps/v8/src/compiler/js-graph.h | 6 - deps/v8/src/compiler/js-heap-broker.cc | 2280 +++++++++++---- deps/v8/src/compiler/js-heap-broker.h | 251 +- deps/v8/src/compiler/js-heap-copy-reducer.cc | 43 +- deps/v8/src/compiler/js-heap-copy-reducer.h | 2 +- deps/v8/src/compiler/js-inlining.cc | 23 +- deps/v8/src/compiler/js-inlining.h | 3 +- deps/v8/src/compiler/js-intrinsic-lowering.cc | 46 - deps/v8/src/compiler/js-intrinsic-lowering.h | 7 +- .../js-native-context-specialization.cc | 269 +- .../js-native-context-specialization.h | 19 +- deps/v8/src/compiler/js-operator.cc | 11 +- deps/v8/src/compiler/js-operator.h | 4 +- deps/v8/src/compiler/js-typed-lowering.cc | 370 +-- deps/v8/src/compiler/js-typed-lowering.h | 12 +- deps/v8/src/compiler/linkage.cc | 14 +- deps/v8/src/compiler/load-elimination.cc | 117 +- deps/v8/src/compiler/load-elimination.h | 44 +- deps/v8/src/compiler/loop-peeling.h | 2 +- .../src/compiler/loop-variable-optimizer.cc | 4 + .../v8/src/compiler/machine-graph-verifier.cc | 57 + .../src/compiler/machine-operator-reducer.cc | 55 +- .../src/compiler/machine-operator-reducer.h | 2 +- deps/v8/src/compiler/machine-operator.cc | 118 +- deps/v8/src/compiler/machine-operator.h | 16 +- deps/v8/src/compiler/memory-optimizer.cc | 56 +- deps/v8/src/compiler/memory-optimizer.h | 12 +- .../src/compiler/mips/code-generator-mips.cc | 98 +- .../compiler/mips/instruction-codes-mips.h | 11 +- .../mips/instruction-scheduler-mips.cc | 9 + .../mips/instruction-selector-mips.cc | 136 + .../compiler/mips64/code-generator-mips64.cc | 354 ++- .../mips64/instruction-codes-mips64.h | 628 ++-- .../mips64/instruction-scheduler-mips64.cc | 37 + .../mips64/instruction-selector-mips64.cc | 324 ++- deps/v8/src/compiler/move-optimizer.cc | 8 +- deps/v8/src/compiler/node-cache.cc | 4 +- deps/v8/src/compiler/node-cache.h | 4 +- deps/v8/src/compiler/node-properties.cc | 1 - deps/v8/src/compiler/node.h | 17 +- deps/v8/src/compiler/opcodes.h | 35 +- deps/v8/src/compiler/operation-typer.cc | 130 +- deps/v8/src/compiler/operation-typer.h | 6 +- deps/v8/src/compiler/operator-properties.cc | 106 +- deps/v8/src/compiler/operator-properties.h | 2 + deps/v8/src/compiler/operator.h | 4 +- .../src/compiler/per-isolate-compiler-cache.h | 64 + deps/v8/src/compiler/pipeline.cc | 275 +- deps/v8/src/compiler/pipeline.h | 10 +- .../v8/src/compiler/ppc/code-generator-ppc.cc | 112 +- .../src/compiler/ppc/instruction-codes-ppc.h | 268 +- .../compiler/ppc/instruction-scheduler-ppc.cc | 40 + .../compiler/ppc/instruction-selector-ppc.cc | 299 +- .../src/compiler/property-access-builder.cc | 8 +- deps/v8/src/compiler/raw-machine-assembler.h | 70 +- .../v8/src/compiler/redundancy-elimination.cc | 178 +- deps/v8/src/compiler/redundancy-elimination.h | 6 +- deps/v8/src/compiler/refs-map.cc | 35 + deps/v8/src/compiler/refs-map.h | 54 + deps/v8/src/compiler/register-allocator.cc | 14 +- deps/v8/src/compiler/representation-change.cc | 260 +- deps/v8/src/compiler/representation-change.h | 59 +- .../src/compiler/s390/code-generator-s390.cc | 617 +++- .../compiler/s390/instruction-codes-s390.h | 338 ++- .../s390/instruction-scheduler-s390.cc | 40 + .../s390/instruction-selector-s390.cc | 319 +- deps/v8/src/compiler/schedule.cc | 80 +- deps/v8/src/compiler/schedule.h | 28 +- deps/v8/src/compiler/select-lowering.cc | 2 +- deps/v8/src/compiler/select-lowering.h | 2 +- deps/v8/src/compiler/simd-scalar-lowering.cc | 3 +- deps/v8/src/compiler/simplified-lowering.cc | 665 +++-- deps/v8/src/compiler/simplified-lowering.h | 2 +- .../compiler/simplified-operator-reducer.cc | 2 +- deps/v8/src/compiler/simplified-operator.cc | 23 +- deps/v8/src/compiler/simplified-operator.h | 14 +- .../src/compiler/store-store-elimination.cc | 14 +- deps/v8/src/compiler/type-cache.h | 17 + .../v8/src/compiler/type-narrowing-reducer.cc | 4 +- deps/v8/src/compiler/typed-optimization.cc | 41 +- deps/v8/src/compiler/typed-optimization.h | 4 +- deps/v8/src/compiler/typer.cc | 45 +- deps/v8/src/compiler/typer.h | 3 +- deps/v8/src/compiler/types.cc | 57 +- deps/v8/src/compiler/types.h | 22 +- .../src/compiler/value-numbering-reducer.cc | 2 +- .../v8/src/compiler/value-numbering-reducer.h | 2 +- deps/v8/src/compiler/verifier.cc | 42 +- deps/v8/src/compiler/wasm-compiler.cc | 671 +++-- deps/v8/src/compiler/wasm-compiler.h | 73 +- .../v8/src/compiler/x64/code-generator-x64.cc | 213 +- .../src/compiler/x64/instruction-codes-x64.h | 22 + .../compiler/x64/instruction-scheduler-x64.cc | 22 + .../compiler/x64/instruction-selector-x64.cc | 110 +- deps/v8/src/contexts-inl.h | 4 + deps/v8/src/contexts.h | 114 +- deps/v8/src/conversions.cc | 16 +- deps/v8/src/counters.cc | 62 +- deps/v8/src/counters.h | 73 +- deps/v8/src/d8-console.cc | 13 +- deps/v8/src/d8-posix.cc | 2 +- deps/v8/src/d8.cc | 159 +- deps/v8/src/d8.h | 7 +- deps/v8/src/d8.js | 2 +- deps/v8/src/date.cc | 2 +- deps/v8/src/dateparser.h | 8 +- deps/v8/src/debug/debug-coverage.cc | 44 +- deps/v8/src/debug/debug-coverage.h | 2 +- deps/v8/src/debug/debug-evaluate.cc | 102 +- deps/v8/src/debug/debug-evaluate.h | 1 - deps/v8/src/debug/debug-frames.cc | 1 + deps/v8/src/debug/debug-frames.h | 2 +- deps/v8/src/debug/debug-interface.h | 24 +- .../src/debug/debug-stack-trace-iterator.cc | 6 +- deps/v8/src/debug/debug-type-profile.h | 2 +- deps/v8/src/debug/debug.cc | 94 +- deps/v8/src/debug/debug.h | 18 +- deps/v8/src/debug/ia32/debug-ia32.cc | 20 +- deps/v8/src/debug/interface-types.h | 4 +- deps/v8/src/deoptimizer.cc | 108 +- deps/v8/src/deoptimizer.h | 27 +- deps/v8/src/disasm.h | 2 +- deps/v8/src/disassembler.cc | 75 +- deps/v8/src/elements-kind.h | 2 +- deps/v8/src/elements.cc | 140 +- deps/v8/src/elements.h | 6 +- .../externalize-string-extension.cc | 11 +- .../extensions/externalize-string-extension.h | 4 +- .../v8/src/extensions/free-buffer-extension.h | 4 +- deps/v8/src/extensions/gc-extension.cc | 4 +- deps/v8/src/extensions/gc-extension.h | 4 +- .../v8/src/extensions/statistics-extension.cc | 5 +- deps/v8/src/extensions/statistics-extension.h | 4 +- .../extensions/trigger-failure-extension.h | 4 +- deps/v8/src/external-reference-table.cc | 6 +- deps/v8/src/external-reference-table.h | 5 +- deps/v8/src/external-reference.cc | 64 +- deps/v8/src/external-reference.h | 17 +- deps/v8/src/feedback-vector-inl.h | 18 +- deps/v8/src/feedback-vector.cc | 130 +- deps/v8/src/feedback-vector.h | 53 +- deps/v8/src/flag-definitions.h | 57 +- deps/v8/src/frames.cc | 2 +- deps/v8/src/frames.h | 21 +- deps/v8/src/futex-emulation.cc | 8 +- deps/v8/src/gdb-jit.cc | 42 +- deps/v8/src/global-handles.cc | 24 +- deps/v8/src/global-handles.h | 1 - deps/v8/src/globals.h | 116 +- deps/v8/src/handles.cc | 16 +- deps/v8/src/handles.h | 2 +- deps/v8/src/heap-symbols.h | 609 ++-- deps/v8/src/heap/array-buffer-collector.cc | 64 +- deps/v8/src/heap/array-buffer-collector.h | 23 +- deps/v8/src/heap/array-buffer-tracker-inl.h | 9 +- deps/v8/src/heap/array-buffer-tracker.cc | 28 +- deps/v8/src/heap/array-buffer-tracker.h | 4 + deps/v8/src/heap/concurrent-marking.cc | 121 +- deps/v8/src/heap/concurrent-marking.h | 5 +- deps/v8/src/heap/embedder-tracing.cc | 7 - deps/v8/src/heap/embedder-tracing.h | 3 +- deps/v8/src/heap/factory-inl.h | 67 +- deps/v8/src/heap/factory.cc | 182 +- deps/v8/src/heap/factory.h | 58 +- deps/v8/src/heap/gc-tracer.cc | 7 +- deps/v8/src/heap/gc-tracer.h | 3 +- deps/v8/src/heap/heap-controller.cc | 82 +- deps/v8/src/heap/heap-controller.h | 47 +- deps/v8/src/heap/heap-inl.h | 60 +- deps/v8/src/heap/heap-write-barrier-inl.h | 4 +- deps/v8/src/heap/heap.cc | 703 ++--- deps/v8/src/heap/heap.h | 416 ++- deps/v8/src/heap/incremental-marking-inl.h | 21 +- deps/v8/src/heap/incremental-marking-job.cc | 5 +- deps/v8/src/heap/incremental-marking.cc | 47 +- deps/v8/src/heap/incremental-marking.h | 21 +- deps/v8/src/heap/item-parallel-job.cc | 2 +- deps/v8/src/heap/item-parallel-job.h | 4 +- deps/v8/src/heap/mark-compact-inl.h | 98 +- deps/v8/src/heap/mark-compact.cc | 136 +- deps/v8/src/heap/mark-compact.h | 62 +- deps/v8/src/heap/marking.cc | 52 +- deps/v8/src/heap/object-stats.cc | 22 +- deps/v8/src/heap/objects-visiting-inl.h | 9 - deps/v8/src/heap/objects-visiting.h | 6 +- deps/v8/src/heap/scavenge-job.cc | 5 +- deps/v8/src/heap/scavenger-inl.h | 279 +- deps/v8/src/heap/scavenger.cc | 286 +- deps/v8/src/heap/scavenger.h | 142 +- deps/v8/src/heap/setup-heap-internal.cc | 98 +- deps/v8/src/heap/spaces-inl.h | 45 + deps/v8/src/heap/spaces.cc | 516 ++-- deps/v8/src/heap/spaces.h | 295 +- deps/v8/src/heap/store-buffer.cc | 8 +- deps/v8/src/heap/store-buffer.h | 2 +- deps/v8/src/heap/sweeper.cc | 13 +- deps/v8/src/ia32/assembler-ia32-inl.h | 4 + deps/v8/src/ia32/assembler-ia32.cc | 128 +- deps/v8/src/ia32/assembler-ia32.h | 153 +- deps/v8/src/ia32/code-stubs-ia32.cc | 38 +- deps/v8/src/ia32/codegen-ia32.cc | 32 +- deps/v8/src/ia32/deoptimizer-ia32.cc | 42 +- .../v8/src/ia32/interface-descriptors-ia32.cc | 65 +- deps/v8/src/ia32/macro-assembler-ia32.cc | 175 +- deps/v8/src/ia32/macro-assembler-ia32.h | 67 +- deps/v8/src/ic/accessor-assembler.cc | 383 ++- deps/v8/src/ic/accessor-assembler.h | 14 +- deps/v8/src/ic/binary-op-assembler.cc | 5 +- deps/v8/src/ic/call-optimization.h | 2 +- deps/v8/src/ic/handler-configuration.cc | 4 +- deps/v8/src/ic/handler-configuration.h | 2 +- deps/v8/src/ic/ic-inl.h | 7 +- deps/v8/src/ic/ic-stats.cc | 2 +- deps/v8/src/ic/ic.cc | 60 +- deps/v8/src/ic/ic.h | 11 +- deps/v8/src/ic/keyed-store-generic.cc | 306 +- deps/v8/src/ic/keyed-store-generic.h | 5 + deps/v8/src/identity-map.h | 2 +- .../src/inspector/injected-script-source.js | 17 +- deps/v8/src/inspector/injected-script.cc | 6 +- deps/v8/src/inspector/injected-script.h | 8 +- deps/v8/src/inspector/remote-object-id.h | 6 +- deps/v8/src/inspector/string-16.cc | 23 +- .../v8/src/inspector/v8-console-agent-impl.cc | 2 +- deps/v8/src/inspector/v8-console-message.cc | 32 +- deps/v8/src/inspector/v8-console-message.h | 1 + deps/v8/src/inspector/v8-console.cc | 40 +- deps/v8/src/inspector/v8-console.h | 2 + .../src/inspector/v8-debugger-agent-impl.cc | 31 +- .../v8/src/inspector/v8-debugger-agent-impl.h | 4 +- deps/v8/src/inspector/v8-debugger-script.cc | 56 +- deps/v8/src/inspector/v8-debugger-script.h | 3 +- deps/v8/src/inspector/v8-debugger.cc | 43 +- deps/v8/src/inspector/v8-debugger.h | 14 +- .../inspector/v8-heap-profiler-agent-impl.cc | 2 +- deps/v8/src/inspector/v8-inspector-impl.cc | 10 +- deps/v8/src/inspector/v8-inspector-impl.h | 7 +- .../src/inspector/v8-inspector-session-impl.h | 2 +- deps/v8/src/inspector/v8-regex.h | 3 +- .../v8/src/inspector/v8-runtime-agent-impl.cc | 2 +- deps/v8/src/inspector/v8-schema-agent-impl.cc | 2 +- deps/v8/src/inspector/v8-stack-trace-impl.cc | 6 +- deps/v8/src/inspector/wasm-translation.cc | 6 +- deps/v8/src/instruction-stream.cc | 16 +- deps/v8/src/interface-descriptors.cc | 18 +- deps/v8/src/interface-descriptors.h | 96 +- .../src/interpreter/bytecode-array-builder.cc | 28 +- .../src/interpreter/bytecode-array-builder.h | 16 + deps/v8/src/interpreter/bytecode-decoder.cc | 19 +- deps/v8/src/interpreter/bytecode-generator.cc | 338 ++- deps/v8/src/interpreter/bytecode-generator.h | 13 +- deps/v8/src/interpreter/bytecode-operands.h | 13 + .../interpreter/bytecode-register-allocator.h | 4 +- .../interpreter/bytecode-register-optimizer.h | 6 +- deps/v8/src/interpreter/bytecodes.cc | 8 +- deps/v8/src/interpreter/bytecodes.h | 21 +- .../src/interpreter/constant-array-builder.h | 2 +- .../src/interpreter/control-flow-builders.h | 16 +- .../src/interpreter/handler-table-builder.h | 2 +- .../src/interpreter/interpreter-assembler.cc | 36 +- .../src/interpreter/interpreter-generator.cc | 77 +- .../src/interpreter/interpreter-generator.h | 11 +- .../interpreter-intrinsics-generator.cc | 33 - .../src/interpreter/interpreter-intrinsics.h | 5 - deps/v8/src/interpreter/interpreter.cc | 98 +- deps/v8/src/interpreter/interpreter.h | 9 +- .../interpreter/setup-interpreter-internal.cc | 102 - deps/v8/src/interpreter/setup-interpreter.h | 33 - deps/v8/src/intl.h | 6 +- deps/v8/src/isolate-inl.h | 22 +- deps/v8/src/isolate.cc | 535 +++- deps/v8/src/isolate.h | 117 +- deps/v8/src/js/array.js | 321 -- deps/v8/src/js/intl.js | 1082 +------ deps/v8/src/js/macros.py | 2 - deps/v8/src/json-parser.h | 4 +- deps/v8/src/json-stringifier.cc | 88 +- deps/v8/src/keys.cc | 7 +- deps/v8/src/keys.h | 4 +- deps/v8/src/libplatform/default-platform.cc | 8 +- deps/v8/src/libplatform/default-platform.h | 2 +- .../default-worker-threads-task-runner.cc | 1 + .../default-worker-threads-task-runner.h | 2 +- .../src/libplatform/tracing/trace-buffer.cc | 2 - .../v8/src/libplatform/tracing/trace-buffer.h | 2 +- .../v8/src/libplatform/tracing/trace-writer.h | 2 +- .../libplatform/tracing/tracing-controller.cc | 2 +- deps/v8/src/libplatform/worker-thread.h | 2 +- deps/v8/src/libsampler/sampler.cc | 12 +- deps/v8/src/locked-queue.h | 2 +- deps/v8/src/log-utils.h | 4 +- deps/v8/src/log.cc | 64 +- deps/v8/src/log.h | 50 +- deps/v8/src/lookup.cc | 27 +- deps/v8/src/lookup.h | 4 +- deps/v8/src/machine-type.h | 6 + deps/v8/src/macro-assembler.h | 2 +- deps/v8/src/math-random.cc | 70 + deps/v8/src/math-random.h | 33 + deps/v8/src/maybe-handles-inl.h | 6 +- deps/v8/src/maybe-handles.h | 2 +- deps/v8/src/messages.cc | 96 +- deps/v8/src/messages.h | 25 +- deps/v8/src/mips/assembler-mips.cc | 36 +- deps/v8/src/mips/assembler-mips.h | 9 +- deps/v8/src/mips/code-stubs-mips.cc | 10 +- deps/v8/src/mips/codegen-mips.cc | 32 +- deps/v8/src/mips/disasm-mips.cc | 10 + .../v8/src/mips/interface-descriptors-mips.cc | 16 +- deps/v8/src/mips/macro-assembler-mips.cc | 42 +- deps/v8/src/mips/macro-assembler-mips.h | 31 +- deps/v8/src/mips/simulator-mips.cc | 15 + deps/v8/src/mips64/assembler-mips64.cc | 66 +- deps/v8/src/mips64/assembler-mips64.h | 18 +- deps/v8/src/mips64/code-stubs-mips64.cc | 10 +- deps/v8/src/mips64/codegen-mips64.cc | 33 +- .../mips64/interface-descriptors-mips64.cc | 16 +- deps/v8/src/mips64/macro-assembler-mips64.cc | 22 +- deps/v8/src/mips64/macro-assembler-mips64.h | 25 +- deps/v8/src/objects-body-descriptors-inl.h | 119 +- deps/v8/src/objects-body-descriptors.h | 11 +- deps/v8/src/objects-debug.cc | 147 +- deps/v8/src/objects-definitions.h | 568 ++-- deps/v8/src/objects-inl.h | 1236 +------- deps/v8/src/objects-printer.cc | 152 +- deps/v8/src/objects.cc | 814 +++--- deps/v8/src/objects.h | 2110 +------------- deps/v8/src/objects/allocation-site-inl.h | 197 ++ deps/v8/src/objects/allocation-site.h | 186 ++ deps/v8/src/objects/api-callbacks-inl.h | 18 +- deps/v8/src/objects/api-callbacks.h | 23 +- deps/v8/src/objects/arguments-inl.h | 3 +- deps/v8/src/objects/arguments.h | 28 +- deps/v8/src/objects/bigint.cc | 42 +- deps/v8/src/objects/bigint.h | 3 +- deps/v8/src/objects/builtin-function-id.h | 217 ++ deps/v8/src/objects/code-inl.h | 10 +- deps/v8/src/objects/code.h | 48 +- deps/v8/src/objects/compilation-cache.h | 11 - deps/v8/src/objects/debug-objects.cc | 2 +- deps/v8/src/objects/debug-objects.h | 3 - deps/v8/src/objects/dictionary.h | 12 +- deps/v8/src/objects/fixed-array-inl.h | 4 +- deps/v8/src/objects/fixed-array.h | 15 +- deps/v8/src/objects/frame-array.h | 3 +- deps/v8/src/objects/hash-table-inl.h | 8 +- deps/v8/src/objects/hash-table.h | 6 +- deps/v8/src/objects/intl-objects.cc | 1543 ++-------- deps/v8/src/objects/intl-objects.h | 276 +- deps/v8/src/objects/js-array-buffer-inl.h | 88 +- deps/v8/src/objects/js-array-buffer.cc | 45 +- deps/v8/src/objects/js-array-buffer.h | 106 +- deps/v8/src/objects/js-array.h | 3 +- deps/v8/src/objects/js-break-iterator-inl.h | 49 + deps/v8/src/objects/js-break-iterator.cc | 170 ++ deps/v8/src/objects/js-break-iterator.h | 87 + deps/v8/src/objects/js-collator-inl.h | 12 - deps/v8/src/objects/js-collator.cc | 212 +- deps/v8/src/objects/js-collator.h | 37 +- deps/v8/src/objects/js-collection.h | 3 - deps/v8/src/objects/js-date-time-format-inl.h | 33 + deps/v8/src/objects/js-date-time-format.cc | 980 +++++++ deps/v8/src/objects/js-date-time-format.h | 100 + deps/v8/src/objects/js-generator.h | 2 +- deps/v8/src/objects/js-list-format-inl.h | 3 +- deps/v8/src/objects/js-list-format.cc | 12 +- deps/v8/src/objects/js-list-format.h | 13 +- deps/v8/src/objects/js-locale-inl.h | 37 +- deps/v8/src/objects/js-locale.cc | 170 +- deps/v8/src/objects/js-locale.h | 80 +- deps/v8/src/objects/js-number-format-inl.h | 58 + deps/v8/src/objects/js-number-format.cc | 709 +++++ deps/v8/src/objects/js-number-format.h | 135 + deps/v8/src/objects/js-objects-inl.h | 904 ++++++ deps/v8/src/objects/js-objects.h | 1408 +++++++++ deps/v8/src/objects/js-plural-rules.cc | 7 +- deps/v8/src/objects/js-plural-rules.h | 9 +- deps/v8/src/objects/js-promise.h | 2 +- deps/v8/src/objects/js-proxy.h | 4 +- .../src/objects/js-regexp-string-iterator.h | 2 +- .../src/objects/js-relative-time-format-inl.h | 3 +- .../v8/src/objects/js-relative-time-format.cc | 220 +- deps/v8/src/objects/js-relative-time-format.h | 21 +- deps/v8/src/objects/js-segmenter-inl.h | 56 + deps/v8/src/objects/js-segmenter.cc | 214 ++ deps/v8/src/objects/js-segmenter.h | 118 + deps/v8/src/objects/map-inl.h | 51 +- deps/v8/src/objects/map.h | 36 +- deps/v8/src/objects/maybe-object-inl.h | 54 +- deps/v8/src/objects/maybe-object.h | 56 +- deps/v8/src/objects/microtask-queue-inl.h | 28 + deps/v8/src/objects/microtask-queue.cc | 40 + deps/v8/src/objects/microtask-queue.h | 55 + deps/v8/src/objects/module.cc | 12 +- deps/v8/src/objects/module.h | 7 +- deps/v8/src/objects/name-inl.h | 26 +- deps/v8/src/objects/name.h | 39 +- deps/v8/src/objects/object-macros-undef.h | 2 + deps/v8/src/objects/object-macros.h | 6 + deps/v8/src/objects/ordered-hash-table-inl.h | 16 +- deps/v8/src/objects/ordered-hash-table.cc | 2 +- deps/v8/src/objects/ordered-hash-table.h | 12 +- deps/v8/src/objects/promise.h | 2 + deps/v8/src/objects/property-array-inl.h | 83 + deps/v8/src/objects/property-array.h | 73 + deps/v8/src/objects/prototype-info-inl.h | 6 +- deps/v8/src/objects/scope-info.cc | 1 - deps/v8/src/objects/scope-info.h | 3 +- deps/v8/src/objects/script.h | 3 - .../v8/src/objects/shared-function-info-inl.h | 69 - deps/v8/src/objects/shared-function-info.h | 20 +- deps/v8/src/objects/stack-frame-info-inl.h | 38 + deps/v8/src/objects/stack-frame-info.h | 62 + deps/v8/src/objects/string-inl.h | 26 +- deps/v8/src/objects/string-table.h | 2 +- deps/v8/src/objects/string.h | 55 +- deps/v8/src/objects/templates.h | 3 - deps/v8/src/optimized-compilation-info.cc | 86 +- deps/v8/src/optimized-compilation-info.h | 37 +- deps/v8/src/ostreams.cc | 7 - deps/v8/src/ostreams.h | 6 +- deps/v8/src/parsing/OWNERS | 1 + deps/v8/src/parsing/duplicate-finder.h | 2 +- deps/v8/src/parsing/expression-classifier.h | 528 ++-- deps/v8/src/parsing/func-name-inferrer.h | 8 +- deps/v8/src/parsing/parse-info.cc | 96 +- deps/v8/src/parsing/parse-info.h | 30 +- deps/v8/src/parsing/parser-base.h | 1324 ++++----- deps/v8/src/parsing/parser.cc | 343 +-- deps/v8/src/parsing/parser.h | 109 +- deps/v8/src/parsing/pattern-rewriter.cc | 242 +- .../src/parsing/preparsed-scope-data-impl.h | 259 ++ deps/v8/src/parsing/preparsed-scope-data.cc | 433 +-- deps/v8/src/parsing/preparsed-scope-data.h | 163 +- deps/v8/src/parsing/preparser.cc | 92 +- deps/v8/src/parsing/preparser.h | 232 +- .../src/parsing/scanner-character-streams.cc | 276 +- .../src/parsing/scanner-character-streams.h | 3 +- deps/v8/src/parsing/scanner-inl.h | 530 +++- deps/v8/src/parsing/scanner.cc | 620 +--- deps/v8/src/parsing/scanner.h | 151 +- deps/v8/src/parsing/token.cc | 1 - deps/v8/src/parsing/token.h | 205 +- .../src/pending-compilation-error-handler.h | 7 + deps/v8/src/perf-jit.h | 2 +- deps/v8/src/ppc/assembler-ppc.cc | 32 +- deps/v8/src/ppc/assembler-ppc.h | 24 +- deps/v8/src/ppc/code-stubs-ppc.cc | 10 +- deps/v8/src/ppc/codegen-ppc.cc | 17 +- deps/v8/src/ppc/constants-ppc.h | 24 +- deps/v8/src/ppc/disasm-ppc.cc | 8 + deps/v8/src/ppc/interface-descriptors-ppc.cc | 14 +- deps/v8/src/ppc/macro-assembler-ppc.cc | 16 +- deps/v8/src/ppc/macro-assembler-ppc.h | 21 +- deps/v8/src/ppc/simulator-ppc.cc | 44 +- deps/v8/src/ppc/simulator-ppc.h | 2 + deps/v8/src/profiler/allocation-tracker.cc | 5 - deps/v8/src/profiler/allocation-tracker.h | 2 +- deps/v8/src/profiler/circular-queue-inl.h | 7 +- deps/v8/src/profiler/cpu-profiler.h | 6 +- deps/v8/src/profiler/heap-profiler.cc | 14 +- deps/v8/src/profiler/heap-profiler.h | 4 +- .../profiler/heap-snapshot-generator-inl.h | 40 +- .../src/profiler/heap-snapshot-generator.cc | 1130 +++----- .../v8/src/profiler/heap-snapshot-generator.h | 314 +- .../v8/src/profiler/sampling-heap-profiler.cc | 46 +- deps/v8/src/profiler/sampling-heap-profiler.h | 18 +- deps/v8/src/profiler/tick-sample.cc | 2 +- deps/v8/src/profiler/tracing-cpu-profiler.h | 2 +- deps/v8/src/profiler/unbound-queue.h | 4 +- deps/v8/src/property-details.h | 2 +- deps/v8/src/property.cc | 8 +- deps/v8/src/property.h | 14 +- deps/v8/src/prototype.h | 2 +- deps/v8/src/regexp/jsregexp.cc | 5 +- deps/v8/src/regexp/jsregexp.h | 179 +- deps/v8/src/regexp/property-sequences.cc | 1115 +++++++ deps/v8/src/regexp/property-sequences.h | 28 + deps/v8/src/regexp/regexp-ast.h | 15 +- .../regexp/regexp-macro-assembler-tracer.cc | 5 +- .../regexp/regexp-macro-assembler-tracer.h | 121 +- deps/v8/src/regexp/regexp-macro-assembler.cc | 10 +- deps/v8/src/regexp/regexp-macro-assembler.h | 4 +- deps/v8/src/regexp/regexp-parser.cc | 149 +- deps/v8/src/regexp/regexp-parser.h | 12 +- .../regexp/x64/regexp-macro-assembler-x64.h | 117 +- deps/v8/src/register-configuration.h | 2 +- deps/v8/src/reloc-info.h | 3 +- deps/v8/src/roots-inl.h | 125 +- deps/v8/src/roots.cc | 54 + deps/v8/src/roots.h | 241 +- deps/v8/src/runtime/runtime-array.cc | 12 +- deps/v8/src/runtime/runtime-atomics.cc | 401 ++- deps/v8/src/runtime/runtime-classes.cc | 8 +- deps/v8/src/runtime/runtime-collections.cc | 38 - deps/v8/src/runtime/runtime-date.cc | 7 - deps/v8/src/runtime/runtime-debug.cc | 23 +- deps/v8/src/runtime/runtime-function.cc | 80 - deps/v8/src/runtime/runtime-futex.cc | 3 +- deps/v8/src/runtime/runtime-generator.cc | 6 - deps/v8/src/runtime/runtime-internal.cc | 55 +- deps/v8/src/runtime/runtime-interpreter.cc | 1 - deps/v8/src/runtime/runtime-intl.cc | 399 +-- deps/v8/src/runtime/runtime-literals.cc | 8 +- deps/v8/src/runtime/runtime-maths.cc | 72 - deps/v8/src/runtime/runtime-numbers.cc | 73 +- deps/v8/src/runtime/runtime-object.cc | 298 +- deps/v8/src/runtime/runtime-proxy.cc | 4 +- deps/v8/src/runtime/runtime-regexp.cc | 4 +- deps/v8/src/runtime/runtime-scopes.cc | 12 +- deps/v8/src/runtime/runtime-strings.cc | 22 +- deps/v8/src/runtime/runtime-test.cc | 70 +- deps/v8/src/runtime/runtime-typedarray.cc | 4 +- deps/v8/src/runtime/runtime-wasm.cc | 155 +- deps/v8/src/runtime/runtime.cc | 43 +- deps/v8/src/runtime/runtime.h | 581 ++-- deps/v8/src/s390/assembler-s390.cc | 38 +- deps/v8/src/s390/assembler-s390.h | 7 +- deps/v8/src/s390/code-stubs-s390.cc | 10 +- deps/v8/src/s390/codegen-s390.cc | 17 +- .../v8/src/s390/interface-descriptors-s390.cc | 14 +- deps/v8/src/s390/macro-assembler-s390.cc | 27 +- deps/v8/src/s390/macro-assembler-s390.h | 28 +- deps/v8/src/s390/simulator-s390.cc | 60 +- deps/v8/src/safepoint-table.h | 11 +- deps/v8/src/setup-isolate-deserialize.cc | 13 - deps/v8/src/setup-isolate-full.cc | 10 - deps/v8/src/setup-isolate.h | 4 +- .../builtin-deserializer-allocator.cc | 137 +- .../snapshot/builtin-deserializer-allocator.h | 33 +- deps/v8/src/snapshot/builtin-deserializer.cc | 117 +- deps/v8/src/snapshot/builtin-deserializer.h | 11 +- deps/v8/src/snapshot/builtin-serializer.cc | 62 +- deps/v8/src/snapshot/builtin-serializer.h | 16 +- .../v8/src/snapshot/builtin-snapshot-utils.cc | 67 - deps/v8/src/snapshot/builtin-snapshot-utils.h | 56 - deps/v8/src/snapshot/code-serializer.cc | 63 +- deps/v8/src/snapshot/code-serializer.h | 15 +- .../default-deserializer-allocator.cc | 5 +- .../snapshot/default-deserializer-allocator.h | 2 +- deps/v8/src/snapshot/deserializer.cc | 36 +- deps/v8/src/snapshot/deserializer.h | 5 + deps/v8/src/snapshot/mksnapshot.cc | 97 +- deps/v8/src/snapshot/object-deserializer.cc | 15 + deps/v8/src/snapshot/partial-serializer.cc | 8 +- deps/v8/src/snapshot/serializer-common.h | 42 +- deps/v8/src/snapshot/serializer.cc | 47 +- deps/v8/src/snapshot/serializer.h | 8 +- deps/v8/src/snapshot/snapshot-common.cc | 122 +- deps/v8/src/snapshot/snapshot-source-sink.h | 6 +- deps/v8/src/snapshot/snapshot.h | 34 +- deps/v8/src/snapshot/startup-deserializer.cc | 6 +- deps/v8/src/snapshot/startup-serializer.cc | 12 +- deps/v8/src/snapshot/startup-serializer.h | 10 +- deps/v8/src/splay-tree.h | 10 +- deps/v8/src/string-constants.cc | 186 ++ deps/v8/src/string-constants.h | 115 + deps/v8/src/string-stream.h | 7 +- deps/v8/src/torque-assembler.h | 58 + deps/v8/src/torque/ast.h | 74 +- deps/v8/src/torque/cfg.cc | 134 + deps/v8/src/torque/cfg.h | 149 + deps/v8/src/torque/csa-generator.cc | 487 ++++ deps/v8/src/torque/csa-generator.h | 53 + deps/v8/src/torque/declarable.cc | 12 - deps/v8/src/torque/declarable.h | 84 +- deps/v8/src/torque/declaration-visitor.cc | 136 +- deps/v8/src/torque/declaration-visitor.h | 29 +- deps/v8/src/torque/declarations.cc | 37 +- deps/v8/src/torque/declarations.h | 16 +- deps/v8/src/torque/file-visitor.cc | 2 +- deps/v8/src/torque/file-visitor.h | 4 - deps/v8/src/torque/global-context.h | 36 +- deps/v8/src/torque/implementation-visitor.cc | 1589 +++++----- deps/v8/src/torque/implementation-visitor.h | 258 +- deps/v8/src/torque/instructions.cc | 204 ++ deps/v8/src/torque/instructions.h | 354 +++ deps/v8/src/torque/source-positions.h | 2 +- deps/v8/src/torque/torque-parser.cc | 191 +- deps/v8/src/torque/torque.cc | 5 + deps/v8/src/torque/types.cc | 74 +- deps/v8/src/torque/types.h | 39 +- deps/v8/src/torque/utils.cc | 85 +- deps/v8/src/torque/utils.h | 176 +- deps/v8/src/tracing/trace-event.h | 13 +- deps/v8/src/transitions-inl.h | 22 +- deps/v8/src/transitions.cc | 50 +- deps/v8/src/trap-handler/trap-handler.h | 10 +- deps/v8/src/turbo-assembler.cc | 11 +- deps/v8/src/turbo-assembler.h | 18 +- deps/v8/src/unicode-cache.h | 2 +- deps/v8/src/unicode-decoder.h | 2 +- deps/v8/src/unicode.h | 4 +- deps/v8/src/utils.cc | 26 +- deps/v8/src/utils.h | 125 +- deps/v8/src/v8.cc | 8 + deps/v8/src/v8threads.h | 2 +- deps/v8/src/value-serializer.cc | 55 +- deps/v8/src/vector-slot-pair.cc | 14 +- deps/v8/src/vector-slot-pair.h | 10 +- deps/v8/src/visitors.h | 20 +- deps/v8/src/vm-state.h | 5 +- .../wasm/baseline/arm/liftoff-assembler-arm.h | 34 + .../baseline/arm64/liftoff-assembler-arm64.h | 52 +- .../baseline/ia32/liftoff-assembler-ia32.h | 87 +- .../v8/src/wasm/baseline/liftoff-assembler.cc | 2 +- deps/v8/src/wasm/baseline/liftoff-assembler.h | 31 +- deps/v8/src/wasm/baseline/liftoff-compiler.cc | 117 +- deps/v8/src/wasm/baseline/liftoff-register.h | 17 +- .../baseline/mips/liftoff-assembler-mips.h | 132 +- .../mips64/liftoff-assembler-mips64.h | 79 +- .../wasm/baseline/ppc/liftoff-assembler-ppc.h | 34 + .../baseline/s390/liftoff-assembler-s390.h | 34 + .../wasm/baseline/x64/liftoff-assembler-x64.h | 67 +- deps/v8/src/wasm/decoder.h | 23 +- deps/v8/src/wasm/function-body-decoder-impl.h | 53 +- deps/v8/src/wasm/function-body-decoder.cc | 93 +- deps/v8/src/wasm/function-compiler.cc | 9 +- deps/v8/src/wasm/function-compiler.h | 3 +- deps/v8/src/wasm/module-compiler.cc | 348 ++- deps/v8/src/wasm/module-compiler.h | 3 +- deps/v8/src/wasm/module-decoder.cc | 147 +- deps/v8/src/wasm/object-access.h | 48 + deps/v8/src/wasm/value-type.h | 3 + deps/v8/src/wasm/wasm-code-manager.cc | 451 +-- deps/v8/src/wasm/wasm-code-manager.h | 126 +- deps/v8/src/wasm/wasm-constants.h | 12 +- deps/v8/src/wasm/wasm-debug.cc | 27 +- deps/v8/src/wasm/wasm-engine.cc | 25 +- deps/v8/src/wasm/wasm-engine.h | 12 +- deps/v8/src/wasm/wasm-interpreter.cc | 95 +- deps/v8/src/wasm/wasm-interpreter.h | 2 +- deps/v8/src/wasm/wasm-js.cc | 43 +- deps/v8/src/wasm/wasm-linkage.h | 41 +- deps/v8/src/wasm/wasm-memory.cc | 136 +- deps/v8/src/wasm/wasm-memory.h | 7 +- deps/v8/src/wasm/wasm-module.cc | 31 +- deps/v8/src/wasm/wasm-module.h | 44 +- deps/v8/src/wasm/wasm-objects-inl.h | 15 +- deps/v8/src/wasm/wasm-objects.cc | 126 +- deps/v8/src/wasm/wasm-objects.h | 41 +- deps/v8/src/wasm/wasm-opcodes.h | 3 - deps/v8/src/wasm/wasm-result.cc | 2 +- deps/v8/src/wasm/wasm-serialization.cc | 35 +- deps/v8/src/wasm/wasm-serialization.h | 12 +- deps/v8/src/x64/assembler-x64.cc | 53 +- deps/v8/src/x64/assembler-x64.h | 13 +- deps/v8/src/x64/code-stubs-x64.cc | 20 +- deps/v8/src/x64/codegen-x64.cc | 17 +- deps/v8/src/x64/disasm-x64.cc | 21 +- deps/v8/src/x64/interface-descriptors-x64.cc | 14 +- deps/v8/src/x64/macro-assembler-x64.cc | 25 +- deps/v8/src/x64/macro-assembler-x64.h | 35 +- deps/v8/src/zone/zone-allocator.h | 4 +- deps/v8/src/zone/zone-chunk-list.h | 4 +- deps/v8/src/zone/zone-containers.h | 4 +- deps/v8/src/zone/zone.cc | 7 +- deps/v8/src/zone/zone.h | 17 +- deps/v8/test/benchmarks/testcfg.py | 2 +- deps/v8/test/cctest/BUILD.gn | 3 + deps/v8/test/cctest/cctest.cc | 21 +- deps/v8/test/cctest/cctest.h | 45 +- deps/v8/test/cctest/cctest.status | 36 +- deps/v8/test/cctest/compiler/call-tester.h | 4 +- deps/v8/test/cctest/compiler/codegen-tester.h | 28 +- .../cctest/compiler/graph-builder-tester.h | 2 +- .../cctest/compiler/test-branch-combine.cc | 8 +- .../cctest/compiler/test-code-assembler.cc | 2 +- .../cctest/compiler/test-code-generator.cc | 44 +- .../cctest/compiler/test-js-typed-lowering.cc | 2 +- .../cctest/compiler/test-multiple-return.cc | 15 +- .../compiler/test-representation-change.cc | 160 +- .../test-run-bytecode-graph-builder.cc | 4 +- .../cctest/compiler/test-run-intrinsics.cc | 54 - .../test/cctest/compiler/test-run-machops.cc | 24 +- .../cctest/compiler/test-run-native-calls.cc | 92 +- deps/v8/test/cctest/compiler/value-helper.h | 20 +- deps/v8/test/cctest/heap/heap-utils.cc | 7 +- deps/v8/test/cctest/heap/test-alloc.cc | 76 +- .../cctest/heap/test-array-buffer-tracker.cc | 6 +- .../cctest/heap/test-concurrent-marking.cc | 15 +- .../heap/test-external-string-tracker.cc | 6 +- deps/v8/test/cctest/heap/test-heap.cc | 89 +- .../cctest/heap/test-incremental-marking.cc | 51 +- deps/v8/test/cctest/heap/test-lab.cc | 2 +- deps/v8/test/cctest/heap/test-spaces.cc | 100 +- deps/v8/test/cctest/heap/test-unmapper.cc | 2 +- .../test/cctest/heap/test-weak-references.cc | 90 +- .../ArrayLiterals.golden | 150 +- .../AsyncGenerators.golden | 40 +- .../CallAndSpread.golden | 34 +- .../ClassDeclarations.golden | 8 +- .../bytecode_expectations/ForAwaitOf.golden | 458 +-- .../bytecode_expectations/ForOf.golden | 8 +- .../bytecode_expectations/ForOfLoop.golden | 220 +- .../bytecode_expectations/Generators.golden | 2 +- .../IIFEWithOneshotOpt.golden | 423 ++- .../IIFEWithoutOneshotOpt.golden | 183 ++ .../bytecode_expectations/NewAndSpread.golden | 34 +- .../ObjectLiterals.golden | 2 +- .../PropertyLoadStoreOneShot.golden | 86 +- .../PublicClassFields.golden | 10 +- .../StandardForLoop.golden | 116 +- .../StaticClassFields.golden | 20 +- .../SuperCallAndSpread.golden | 50 +- .../cctest/interpreter/interpreter-tester.cc | 2 +- .../cctest/interpreter/interpreter-tester.h | 2 +- .../interpreter/test-bytecode-generator.cc | 97 + .../test-interpreter-intrinsics.cc | 34 +- .../cctest/interpreter/test-interpreter.cc | 66 +- .../interpreter/test-source-positions.cc | 2 +- .../v8/test/cctest/libsampler/test-sampler.cc | 2 +- deps/v8/test/cctest/parsing/test-preparser.cc | 90 +- .../cctest/parsing/test-scanner-streams.cc | 227 +- deps/v8/test/cctest/print-extension.h | 4 +- deps/v8/test/cctest/profiler-extension.h | 4 +- deps/v8/test/cctest/scope-test-helper.h | 2 +- .../v8/test/cctest/setup-isolate-for-tests.cc | 9 - deps/v8/test/cctest/setup-isolate-for-tests.h | 4 +- deps/v8/test/cctest/test-accessors.cc | 2 +- deps/v8/test/cctest/test-allocation.cc | 20 +- deps/v8/test/cctest/test-api-accessors.cc | 79 +- deps/v8/test/cctest/test-api-interceptors.cc | 152 +- deps/v8/test/cctest/test-api.cc | 949 +++--- deps/v8/test/cctest/test-assembler-arm64.cc | 8 +- deps/v8/test/cctest/test-assembler-mips64.cc | 20 +- deps/v8/test/cctest/test-assembler-x64.cc | 8 +- deps/v8/test/cctest/test-circular-queue.cc | 2 +- .../test/cctest/test-code-stub-assembler.cc | 40 +- deps/v8/test/cctest/test-code-stubs-ia32.cc | 4 +- deps/v8/test/cctest/test-compiler.cc | 13 +- deps/v8/test/cctest/test-cpu-profiler.cc | 56 - deps/v8/test/cctest/test-date.cc | 4 +- deps/v8/test/cctest/test-debug.cc | 45 +- deps/v8/test/cctest/test-decls.cc | 26 +- deps/v8/test/cctest/test-deoptimization.cc | 42 +- deps/v8/test/cctest/test-disasm-mips64.cc | 13 - deps/v8/test/cctest/test-disasm-x64.cc | 8 +- deps/v8/test/cctest/test-feedback-vector.cc | 70 +- .../test/cctest/test-field-type-tracking.cc | 31 +- deps/v8/test/cctest/test-heap-profiler.cc | 109 +- .../cctest/test-inobject-slack-tracking.cc | 2 - deps/v8/test/cctest/test-inspector.cc | 2 +- deps/v8/test/cctest/test-intl.cc | 43 +- deps/v8/test/cctest/test-javascript-arm64.cc | 2 +- deps/v8/test/cctest/test-lockers.cc | 28 +- deps/v8/test/cctest/test-log.cc | 25 +- .../test/cctest/test-macro-assembler-mips.cc | 2 +- .../cctest/test-macro-assembler-mips64.cc | 2 +- deps/v8/test/cctest/test-mementos.cc | 4 +- deps/v8/test/cctest/test-parsing.cc | 872 ++++-- deps/v8/test/cctest/test-platform.cc | 2 +- deps/v8/test/cctest/test-poison-disasm-arm.cc | 123 + deps/v8/test/cctest/test-regexp.cc | 8 +- deps/v8/test/cctest/test-roots.cc | 65 +- deps/v8/test/cctest/test-sampler-api.cc | 2 +- deps/v8/test/cctest/test-serialize.cc | 34 +- .../cctest/test-smi-lexicographic-compare.cc | 79 + deps/v8/test/cctest/test-strings.cc | 118 +- .../v8/test/cctest/test-thread-termination.cc | 4 +- deps/v8/test/cctest/test-threads.cc | 2 +- deps/v8/test/cctest/test-trace-event.cc | 17 +- deps/v8/test/cctest/test-typedarrays.cc | 2 - deps/v8/test/cctest/test-usecounters.cc | 21 + deps/v8/test/cctest/test-weakmaps.cc | 6 +- deps/v8/test/cctest/test-weaksets.cc | 6 +- deps/v8/test/cctest/testcfg.py | 12 + deps/v8/test/cctest/torque/test-torque.cc | 27 + deps/v8/test/cctest/trace-extension.h | 4 +- deps/v8/test/cctest/unicode-helpers.cc | 31 + deps/v8/test/cctest/unicode-helpers.h | 27 +- deps/v8/test/cctest/wasm/test-c-wasm-entry.cc | 9 +- .../test/cctest/wasm/test-run-wasm-atomics.cc | 72 +- .../cctest/wasm/test-run-wasm-atomics64.cc | 262 +- .../test/cctest/wasm/test-run-wasm-module.cc | 10 +- .../v8/test/cctest/wasm/test-run-wasm-simd.cc | 16 +- .../test/cctest/wasm/test-wasm-breakpoints.cc | 4 +- .../cctest/wasm/test-wasm-shared-engine.cc | 12 +- deps/v8/test/cctest/wasm/test-wasm-stack.cc | 5 +- .../cctest/wasm/test-wasm-trap-position.cc | 6 +- deps/v8/test/cctest/wasm/wasm-atomics-utils.h | 8 + deps/v8/test/cctest/wasm/wasm-run-utils.cc | 28 +- deps/v8/test/cctest/wasm/wasm-run-utils.h | 4 +- deps/v8/test/common/assembler-tester.h | 21 +- deps/v8/test/common/wasm/wasm-macro-gen.h | 1 + deps/v8/test/debugger/debug/debug-bigint.js | 2 - .../debug/debug-break-class-fields.js | 139 + ...cursion.js => debug-liveedit-recursion.js} | 0 .../debug/es6/generators-debug-scopes.js | 3 +- .../debug-evaluate-no-side-effect-builtins.js | 2 + ...g-evaluate-no-side-effect-runtime-check.js | 3 +- .../debug-evaluate-no-side-effect.js | 22 +- deps/v8/test/debugger/debugger.status | 19 + deps/v8/test/debugger/testcfg.py | 2 +- deps/v8/test/fuzzer/multi-return.cc | 19 +- deps/v8/test/fuzzer/wasm-fuzzer-common.h | 2 +- ...-on-exception-compiler-errors-expected.txt | 4 +- .../debugger/es6-module-liveedit-expected.txt | 17 + .../inspector/debugger/es6-module-liveedit.js | 50 + .../es6-module-set-script-source-expected.txt | 8 - .../debugger/es6-module-set-script-source.js | 33 - .../debugger/eval-scopes-expected.txt | 6 + ...evaluate-at-first-module-line-expected.txt | 11 + .../debugger/evaluate-at-first-module-line.js | 31 + ...ible-breakpoints-class-fields-expected.txt | 206 ++ .../get-possible-breakpoints-class-fields.js | 37 + .../object-preview-internal-properties.js | 2 - .../pause-on-promise-rejections-expected.txt | 22 + .../debugger/pause-on-promise-rejections.js | 68 + .../resources/break-locations-class-fields.js | 204 ++ ...kip-variables-with-empty-name-expected.txt | 6 + .../script-on-after-compile-expected.txt | 18 + .../debugger/script-on-after-compile.js | 2 + .../this-in-arrow-function-expected.txt | 6 +- ...wasm-stepping-with-source-map-expected.txt | 308 ++ .../debugger/wasm-stepping-with-source-map.js | 123 + deps/v8/test/inspector/inspector-test.cc | 13 +- deps/v8/test/inspector/inspector.status | 21 +- deps/v8/test/inspector/isolate-data.cc | 2 +- deps/v8/test/inspector/protocol-test.js | 16 +- .../runtime/call-function-on-async.js | 2 - .../runtime/compile-script-expected.txt | 2 +- .../runtime/console-context-expected.txt | 7 +- .../runtime/console-time-log-expected.txt | 37 + .../inspector/runtime/console-time-log.js | 29 + .../runtime/error-preview-expected.txt | 8 + .../test/inspector/runtime/error-preview.js | 15 + .../inspector/runtime/es6-module-expected.txt | 6 + .../runtime/evaluate-unserializable.js | 2 - .../runtime/evaluate-with-generate-preview.js | 2 - .../runtime/get-properties-expected.txt | 20 + .../get-properties-on-proxy-expected.txt | 12 + .../test/inspector/runtime/get-properties.js | 5 +- .../internal-properties-entries-expected.txt | 108 + .../runtime/internal-properties-expected.txt | 82 +- .../inspector/runtime/internal-properties.js | 2 - .../runtime/stable-object-id-expected.txt | 15 + .../inspector/runtime/stable-object-id.js | 87 + .../runtime-remote-object-expected.txt | 18 + deps/v8/test/inspector/task-runner.h | 4 +- deps/v8/test/inspector/testcfg.py | 7 + deps/v8/test/intl/break-iterator/options.js | 13 + deps/v8/test/intl/break-iterator/subclass.js | 29 + .../supported-locales-is-method.js} | 19 +- deps/v8/test/intl/collator/de-sort.js | 14 + deps/v8/test/intl/collator/options.js | 121 + .../intl/date-format/constructor-order.js | 100 + .../intl/date-format/date-format-to-parts.js | 10 +- .../test/intl/date-format/format-is-bound.js | 7 + .../date-format/resolved-options-unwrap.js | 11 + .../intl/date-format/timezone-conversion.js | 17 + .../test/intl/general/getCanonicalLocales.js | 5 +- ...ndfathered_tags_without_preferred_value.js | 2 +- .../language_tags_with_preferred_values.js | 4 +- .../test/intl/general/supported-locales-of.js | 90 +- deps/v8/test/intl/intl.status | 15 + .../test/intl/list-format/supported-locale.js | 19 + deps/v8/test/intl/locale/locale-properties.js | 2 +- .../intl/number-format/format-is-bound.js | 6 + .../number-format/resolved-options-unwrap.js | 11 + .../number-format/wont-crash-by-1-or-false.js | 12 + .../test/intl/plural-rules/check-to-number.js | 21 + deps/v8/test/intl/regress-7982.js | 36 + deps/v8/test/intl/regress-888299.js | 7 + .../intl/relative-time-format/format-en.js | 23 +- .../format-to-parts-plural.js | 28 + .../relative-time-format/supported-locale.js | 19 + deps/v8/test/intl/segmenter/constructor.js | 216 ++ .../test/intl/segmenter/resolved-options.js | 299 ++ .../segmenter/segment-iterator-following.js | 17 + .../intl/segmenter/segment-iterator-next.js | 11 + .../segmenter/segment-iterator-preceding.js | 21 + .../test/intl/segmenter/segment-iterator.js | 13 + deps/v8/test/intl/segmenter/segment.js | 7 + .../test/intl/segmenter/supported-locale.js | 22 + deps/v8/test/intl/testcfg.py | 2 +- .../run.js | 11 +- .../run.js | 13 +- .../run.js | 2 +- deps/v8/test/js-perf-test/JSTests.json | 101 +- .../js-perf-test/Parsing/arrowfunctions.js | 12 +- .../js-perf-test/SpreadCallsGeneral/run.js | 2 +- .../js-perf-test/TurboFan/typedLowering.js | 4 +- deps/v8/test/message/README.md | 12 +- .../message/fail/class-fields-computed.js | 9 + .../message/fail/class-fields-computed.out | 5 + .../message/fail/class-fields-static-throw.js | 11 + .../fail/class-fields-static-throw.out | 6 + .../test/message/fail/class-fields-throw.js | 11 + .../test/message/fail/class-fields-throw.out | 7 + .../message/fail/map-arg-non-iterable.out | 4 +- .../message/fail/undefined-keyed-property.out | 4 +- deps/v8/test/message/message.status | 6 + deps/v8/test/message/testcfg.py | 7 +- .../message/wasm-trace-memory-interpreted.js | 2 +- .../test/message/wasm-trace-memory-liftoff.js | 2 +- deps/v8/test/message/wasm-trace-memory.js | 2 +- .../mjsunit/array-functions-prototype-misc.js | 40 +- deps/v8/test/mjsunit/array-splice.js | 18 + deps/v8/test/mjsunit/array-unshift.js | 11 +- ...async-stack-traces-prepare-stacktrace-1.js | 31 + ...async-stack-traces-prepare-stacktrace-2.js | 31 + ...async-stack-traces-prepare-stacktrace-3.js | 31 + deps/v8/test/mjsunit/async-stack-traces.js | 270 ++ deps/v8/test/mjsunit/code-coverage-block.js | 44 +- .../mjsunit/code-coverage-class-fields.js | 199 ++ .../mjsunit/compiler/abstract-equal-symbol.js | 135 + .../mjsunit/compiler/array-buffer-is-view.js | 64 + .../test/mjsunit/compiler/array-is-array.js | 105 + .../mjsunit/compiler/context-sensitivity.js | 550 ++++ .../mjsunit/compiler/dataview-constant.js | 173 ++ .../mjsunit/compiler/dataview-neutered.js | 376 +++ .../mjsunit/compiler/dataview-nonconstant.js | 173 ++ .../compiler/escape-analysis-arguments.js | 53 + .../mjsunit/compiler/escape-analysis-array.js | 32 + .../escape-analysis-rest-parameters.js | 31 + deps/v8/test/mjsunit/compiler/instanceof2.js | 233 ++ deps/v8/test/mjsunit/compiler/instanceof3.js | 233 ++ deps/v8/test/mjsunit/compiler/int64.js | 91 + deps/v8/test/mjsunit/compiler/math-imul.js | 76 + deps/v8/test/mjsunit/compiler/math-max.js | 38 + deps/v8/test/mjsunit/compiler/math-min.js | 38 + deps/v8/test/mjsunit/compiler/number-abs.js | 76 + deps/v8/test/mjsunit/compiler/number-add.js | 62 + deps/v8/test/mjsunit/compiler/number-ceil.js | 22 + .../compiler/number-comparison-truncations.js | 152 + .../v8/test/mjsunit/compiler/number-divide.js | 207 ++ deps/v8/test/mjsunit/compiler/number-floor.js | 22 + .../mjsunit/compiler/number-issafeinteger.js | 22 +- deps/v8/test/mjsunit/compiler/number-max.js | 23 + deps/v8/test/mjsunit/compiler/number-min.js | 23 + .../test/mjsunit/compiler/number-modulus.js | 256 ++ deps/v8/test/mjsunit/compiler/number-round.js | 22 + .../test/mjsunit/compiler/number-subtract.js | 34 + .../test/mjsunit/compiler/number-toboolean.js | 45 + deps/v8/test/mjsunit/compiler/number-trunc.js | 22 + .../compiler/redundancy-elimination.js | 194 ++ deps/v8/test/mjsunit/compiler/regress-7121.js | 2 +- .../test/mjsunit/compiler/regress-884052.js | 16 + .../test/mjsunit/compiler/regress-890057.js | 16 + .../test/mjsunit/compiler/regress-890620.js | 25 + .../test/mjsunit/compiler/regress-895799.js | 26 + .../mjsunit/compiler/strict-equal-symbol.js | 50 + .../mjsunit/compiler/string-add-try-catch.js | 57 + .../compiler/string-from-code-point.js | 32 + .../compiler/typed-array-constructor.js | 2 +- deps/v8/test/mjsunit/d8/d8-worker-script.js | 39 + deps/v8/test/mjsunit/d8/d8-worker-script.txt | 8 + .../mjsunit/d8/d8-worker-sharedarraybuffer.js | 4 +- .../test/mjsunit/d8/d8-worker-spawn-worker.js | 4 +- deps/v8/test/mjsunit/d8/d8-worker.js | 24 +- .../v8/test/mjsunit/es6/array-spread-holey.js | 52 + .../mjsunit/es6/proxy-function-tostring.js | 5 +- deps/v8/test/mjsunit/es6/string-iterator2.js | 26 + deps/v8/test/mjsunit/es6/string-iterator3.js | 20 + deps/v8/test/mjsunit/es6/string-iterator4.js | 30 + deps/v8/test/mjsunit/es6/string-iterator5.js | 15 + deps/v8/test/mjsunit/es6/string-iterator6.js | 11 + deps/v8/test/mjsunit/es6/string-iterator7.js | 13 + deps/v8/test/mjsunit/es6/string-iterator8.js | 14 + .../es6/typedarray-construct-by-array-like.js | 4 +- .../typedarray-construct-offset-not-smi.js | 4 +- .../es6/typedarray-set-bytelength-not-smi.js | 4 +- .../object-spread-ic-dontenum-transition.js | 26 + .../object-spread-ic-multiple-transitions.js | 16 + .../test/mjsunit/external-backing-store-gc.js | 13 + deps/v8/test/mjsunit/for-in-special-cases.js | 72 +- .../harmony/async-await-optimization.js | 124 + .../v8/test/mjsunit/harmony/atomics-notify.js | 8 + .../mjsunit/harmony/atomics-value-check.js | 2 +- deps/v8/test/mjsunit/harmony/bigint/add.js | 2 - deps/v8/test/mjsunit/harmony/bigint/and.js | 2 - .../test/mjsunit/harmony/bigint/as-int-n.js | 2 - deps/v8/test/mjsunit/harmony/bigint/basics.js | 2 +- .../mjsunit/harmony/bigint/comparisons.js | 26 +- .../test/mjsunit/harmony/bigint/dataview.js | 2 - deps/v8/test/mjsunit/harmony/bigint/dec.js | 2 - deps/v8/test/mjsunit/harmony/bigint/div.js | 2 - deps/v8/test/mjsunit/harmony/bigint/exp.js | 2 +- deps/v8/test/mjsunit/harmony/bigint/inc.js | 2 - deps/v8/test/mjsunit/harmony/bigint/json.js | 2 +- deps/v8/test/mjsunit/harmony/bigint/mod.js | 2 - deps/v8/test/mjsunit/harmony/bigint/mul.js | 2 - deps/v8/test/mjsunit/harmony/bigint/neg.js | 2 - deps/v8/test/mjsunit/harmony/bigint/not.js | 2 - deps/v8/test/mjsunit/harmony/bigint/or.js | 2 - .../harmony/bigint/regress-tonumbercode.js | 2 +- .../mjsunit/harmony/bigint/regressions.js | 2 - deps/v8/test/mjsunit/harmony/bigint/sar.js | 2 - deps/v8/test/mjsunit/harmony/bigint/shl.js | 2 - deps/v8/test/mjsunit/harmony/bigint/sub.js | 2 - .../test/mjsunit/harmony/bigint/tonumber.js | 2 - deps/v8/test/mjsunit/harmony/bigint/turbo.js | 2 +- .../test/mjsunit/harmony/bigint/typedarray.js | 2 +- deps/v8/test/mjsunit/harmony/bigint/xor.js | 2 - .../bigintarray-keyedstore-tobigint.js | 2 - .../test/mjsunit/harmony/function-tostring.js | 2 - deps/v8/test/mjsunit/harmony/futex.js | 8 +- deps/v8/test/mjsunit/harmony/global.js | 2 +- .../test/mjsunit/harmony/modules-import-13.js | 1 + ...-property-emoji-flag-sequence-generated.js | 266 ++ ...roperty-emoji-keycap-sequence-generated.js | 20 + ...perty-emoji-modifier-sequence-generated.js | 538 ++++ ...p-property-emoji-tag-sequence-generated.js | 11 + ...p-property-emoji-zwj-sequence-generated.js | 782 +++++ .../harmony/regexp-property-invalid.js | 2 + .../harmony/regexp-property-sequence.js | 88 + deps/v8/test/mjsunit/harmony/to-number.js | 15 - deps/v8/test/mjsunit/harmony/to-primitive.js | 54 - .../well-formed-json-stringify-checked.js | 2575 +++++++++++++++++ .../well-formed-json-stringify-unchecked.js | 2575 +++++++++++++++++ .../test/mjsunit/ignition/regress-616064.js | 2 +- deps/v8/test/mjsunit/json.js | 18 +- deps/v8/test/mjsunit/lexicographic-compare.js | 62 - deps/v8/test/mjsunit/mjsunit.js | 10 +- deps/v8/test/mjsunit/mjsunit.status | 54 +- .../regress/regress-319722-ArrayBuffer.js | 2 +- .../regress/regress-319722-TypedArrays.js | 2 +- deps/v8/test/mjsunit/regress/regress-3255.js | 2 +- deps/v8/test/mjsunit/regress/regress-4271.js | 2 +- deps/v8/test/mjsunit/regress/regress-4279.js | 2 +- .../v8/test/mjsunit/regress/regress-707066.js | 2 - .../v8/test/mjsunit/regress/regress-8133-1.js | 16 + .../v8/test/mjsunit/regress/regress-8133-2.js | 17 + .../v8/test/mjsunit/regress/regress-821368.js | 2 +- deps/v8/test/mjsunit/regress/regress-8237.js | 57 + deps/v8/test/mjsunit/regress/regress-8265.js | 12 + deps/v8/test/mjsunit/regress/regress-8449.js | 25 + .../v8/test/mjsunit/regress/regress-883059.js | 7 + .../v8/test/mjsunit/regress/regress-889722.js | 11 + .../v8/test/mjsunit/regress/regress-890553.js | 11 + .../{regress-2185.js => regress-892858.js} | 14 +- .../regress-arrow-single-expression-eval.js | 5 + .../mjsunit/regress/regress-crbug-380671.js | 14 - .../mjsunit/regress/regress-crbug-503578.js | 2 +- .../mjsunit/regress/regress-crbug-503698.js | 2 +- .../mjsunit/regress/regress-crbug-503968.js | 2 +- .../mjsunit/regress/regress-crbug-503991.js | 2 +- .../mjsunit/regress/regress-crbug-504136.js | 2 +- .../mjsunit/regress/regress-crbug-504727.js | 2 +- .../mjsunit/regress/regress-crbug-504729.js | 2 +- .../mjsunit/regress/regress-crbug-505778.js | 2 +- .../mjsunit/regress/regress-crbug-506549.js | 2 +- .../mjsunit/regress/regress-crbug-511880.js | 4 +- .../mjsunit/regress/regress-crbug-514081.js | 2 +- .../mjsunit/regress/regress-crbug-518747.js | 2 +- .../mjsunit/regress/regress-crbug-522496.js | 2 +- .../mjsunit/regress/regress-crbug-687063.js | 31 + .../mjsunit/regress/regress-crbug-722871.js | 2 +- .../mjsunit/regress/regress-crbug-876443.js | 9 + .../mjsunit/regress/regress-crbug-878845.js | 11 + .../mjsunit/regress/regress-crbug-879560.js | 14 + .../mjsunit/regress/regress-crbug-879898.js | 12 + .../mjsunit/regress/regress-crbug-880207.js | 37 + .../mjsunit/regress/regress-crbug-882233-1.js | 17 + .../mjsunit/regress/regress-crbug-882233-2.js | 32 + .../mjsunit/regress/regress-crbug-884933.js | 85 + .../mjsunit/regress/regress-crbug-885404.js | 11 + .../mjsunit/regress/regress-crbug-887891.js | 10 + .../mjsunit/regress/regress-crbug-888825.js | 5 + .../mjsunit/regress/regress-crbug-890243.js | 27 + .../mjsunit/regress/regress-crbug-891627.js | 43 + .../mjsunit/regress/regress-crbug-892472-1.js | 9 + .../mjsunit/regress/regress-crbug-892472-2.js | 7 + .../mjsunit/regress/regress-crbug-897514.js | 26 + .../mjsunit/regress/regress-crbug-899524.js | 33 + .../mjsunit/regress/regress-crbug-90771.js | 15 + .../test/mjsunit/regress/regress-v8-7682.js | 8 +- .../mjsunit/regress/wasm/regress-801850.js | 2 +- .../mjsunit/regress/wasm/regress-803427.js | 2 +- .../test/mjsunit/regress/wasm/regress-8059.js | 2 +- .../mjsunit/regress/wasm/regress-808012.js | 2 +- .../mjsunit/regress/wasm/regress-808848.js | 2 +- .../test/mjsunit/regress/wasm/regress-8094.js | 30 + .../test/mjsunit/regress/wasm/regress-8095.js | 25 + .../mjsunit/regress/wasm/regress-810973.js | 5 +- .../mjsunit/regress/wasm/regress-810973b.js | 1209 ++++++++ deps/v8/test/mjsunit/samevalue.js | 5 +- .../test/mjsunit/stack-traces-class-fields.js | 246 ++ deps/v8/test/mjsunit/string-trim.js | 2 - deps/v8/test/mjsunit/test-async.js | 2 +- deps/v8/test/mjsunit/testcfg.py | 66 +- deps/v8/test/mjsunit/typeof.js | 65 +- deps/v8/test/mjsunit/wasm/anyref.js | 13 +- deps/v8/test/mjsunit/wasm/atomics.js | 30 + .../test/mjsunit/wasm/bounds-check-64bit.js | 2 +- .../mjsunit/wasm/compare-exchange-stress.js | 207 ++ .../mjsunit/wasm/compare-exchange64-stress.js | 213 ++ deps/v8/test/mjsunit/wasm/data-segments.js | 2 - .../v8/test/mjsunit/wasm/exceptions-export.js | 81 + .../v8/test/mjsunit/wasm/exceptions-import.js | 96 + .../v8/test/mjsunit/wasm/exceptions-shared.js | 158 + deps/v8/test/mjsunit/wasm/exceptions.js | 930 +++--- .../mjsunit/wasm/grow-memory-detaching.js | 2 +- deps/v8/test/mjsunit/wasm/grow-memory.js | 34 +- deps/v8/test/mjsunit/wasm/import-memory.js | 3 + .../mjsunit/wasm/import-mutable-global.js | 2 +- deps/v8/test/mjsunit/wasm/table.js | 6 +- .../mjsunit/wasm/trap-handler-fallback.js | 21 +- deps/v8/test/mjsunit/wasm/unicode.js | 2 +- deps/v8/test/mjsunit/wasm/wasm-constants.js | 65 +- .../test/mjsunit/wasm/wasm-module-builder.js | 66 +- .../test/mjsunit/wasm/worker-interpreter.js | 2 +- deps/v8/test/mjsunit/wasm/worker-memory.js | 9 +- deps/v8/test/mjsunit/wasm/worker-module.js | 2 +- deps/v8/test/mkgrokdump/mkgrokdump.cc | 54 +- deps/v8/test/mozilla/mozilla.status | 15 + deps/v8/test/mozilla/testcfg.py | 2 +- deps/v8/test/preparser/testcfg.py | 2 +- deps/v8/test/test262/harness-agent.js | 2 +- deps/v8/test/test262/test262.status | 322 ++- deps/v8/test/test262/testcfg.py | 15 +- deps/v8/test/torque/test-torque.tq | 274 +- deps/v8/test/unittests/BUILD.gn | 6 + deps/v8/test/unittests/allocation-unittest.cc | 41 +- .../unittests/api/interceptor-unittest.cc | 2 +- .../v8/test/unittests/api/isolate-unittest.cc | 69 + .../unittests/asmjs/asm-types-unittest.cc | 4 +- .../unittests/base/address-region-unittest.cc | 66 + .../unittests/base/functional-unittest.cc | 2 +- .../platform/condition-variable-unittest.cc | 4 +- .../base/platform/platform-unittest.cc | 2 +- .../base/region-allocator-unittest.cc | 356 +++ .../unittests/base/threaded-list-unittest.cc | 309 ++ .../unittests/cancelable-tasks-unittest.cc | 2 +- .../unittests/code-stub-assembler-unittest.h | 4 +- .../compiler-dispatcher-unittest.cc | 590 ++-- .../unoptimized-compile-job-unittest.cc | 227 +- .../compiler/bytecode-analysis-unittest.cc | 4 +- .../checkpoint-elimination-unittest.cc | 2 +- .../compiler/code-assembler-unittest.h | 4 +- .../common-operator-reducer-unittest.cc | 2 +- .../compiler/common-operator-unittest.cc | 2 +- .../constant-folding-reducer-unittest.cc | 2 +- .../control-flow-optimizer-unittest.cc | 2 +- .../dead-code-elimination-unittest.cc | 2 +- .../compiler/graph-reducer-unittest.cc | 2 +- .../test/unittests/compiler/graph-unittest.cc | 19 +- .../test/unittests/compiler/graph-unittest.h | 4 +- .../compiler/instruction-selector-unittest.cc | 5 +- .../compiler/instruction-unittest.cc | 4 +- .../compiler/js-call-reducer-unittest.cc | 19 +- .../compiler/js-create-lowering-unittest.cc | 11 +- .../js-intrinsic-lowering-unittest.cc | 2 +- ...-native-context-specialization-unittest.cc | 50 + .../compiler/js-typed-lowering-unittest.cc | 9 +- .../compiler/load-elimination-unittest.cc | 2 +- .../compiler/loop-peeling-unittest.cc | 2 +- .../machine-operator-reducer-unittest.cc | 76 +- .../unittests/compiler/node-cache-unittest.cc | 8 +- .../compiler/node-matchers-unittest.cc | 468 +-- .../unittests/compiler/node-test-utils.cc | 51 +- .../test/unittests/compiler/node-test-utils.h | 19 +- .../redundancy-elimination-unittest.cc | 1170 ++++++++ .../compiler/scheduler-rpo-unittest.cc | 2 +- .../compiler/simplified-lowering-unittest.cc | 4 +- .../simplified-operator-reducer-unittest.cc | 4 +- .../compiler/typed-optimization-unittest.cc | 2 +- .../test/unittests/compiler/typer-unittest.cc | 3 +- deps/v8/test/unittests/counters-unittest.cc | 4 +- .../v8/test/unittests/heap/bitmap-unittest.cc | 2 +- .../heap/embedder-tracing-unittest.cc | 19 - .../heap/gc-idle-time-handler-unittest.cc | 4 +- .../test/unittests/heap/gc-tracer-unittest.cc | 16 +- .../heap/heap-controller-unittest.cc | 60 +- deps/v8/test/unittests/heap/heap-unittest.cc | 12 + .../heap/item-parallel-job-unittest.cc | 8 +- .../v8/test/unittests/heap/spaces-unittest.cc | 16 +- .../bytecode-array-builder-unittest.cc | 11 +- .../bytecode-array-iterator-unittest.cc | 4 +- ...bytecode-array-random-iterator-unittest.cc | 4 +- .../bytecode-array-writer-unittest.cc | 2 +- .../interpreter/bytecode-decoder-unittest.cc | 4 +- .../bytecode-register-allocator-unittest.cc | 2 +- .../bytecode-register-optimizer-unittest.cc | 2 +- .../constant-array-builder-unittest.cc | 4 +- .../interpreter-assembler-unittest.h | 4 +- .../libplatform/default-platform-unittest.cc | 10 +- .../libplatform/worker-thread-unittest.cc | 3 +- deps/v8/test/unittests/object-unittest.cc | 4 +- .../objects/microtask-queue-unittest.cc | 55 + .../unittests/parser/preparser-unittest.cc | 2 +- .../register-configuration-unittest.cc | 4 +- deps/v8/test/unittests/run-all-unittests.cc | 6 +- .../source-position-table-unittest.cc | 4 +- deps/v8/test/unittests/test-helpers.cc | 32 +- deps/v8/test/unittests/test-helpers.h | 2 + deps/v8/test/unittests/test-utils.cc | 41 +- deps/v8/test/unittests/test-utils.h | 24 +- deps/v8/test/unittests/unittests.status | 5 + .../unittests/value-serializer-unittest.cc | 20 +- .../test/unittests/wasm/decoder-unittest.cc | 2 +- .../wasm/function-body-decoder-unittest.cc | 87 +- .../unittests/wasm/module-decoder-unittest.cc | 153 +- .../unittests/wasm/trap-handler-unittest.cc | 4 +- .../wasm/wasm-code-manager-unittest.cc | 139 +- .../wasm/wasm-module-builder-unittest.cc | 2 +- deps/v8/test/wasm-spec-tests/testcfg.py | 2 +- .../v8/test/wasm-spec-tests/tests.tar.gz.sha1 | 2 +- deps/v8/test/webkit/array-splice.js | 5 - .../fast/js/toString-overrides-expected.txt | 4 +- deps/v8/test/webkit/string-trim.js | 2 - deps/v8/test/webkit/testcfg.py | 2 +- deps/v8/test/webkit/webkit.status | 4 +- .../binutils/Linux_ia32/binutils.tar.bz2.sha1 | 2 +- .../binutils/Linux_x64/binutils.tar.bz2.sha1 | 2 +- .../src/googletest/include/gtest/gtest_prod.h | 3 +- deps/v8/third_party/v8/builtins/array-sort.tq | 1119 ++++--- deps/v8/tools/BUILD.gn | 4 +- deps/v8/tools/bigint-tester.py | 4 +- deps/v8/tools/blink_tests/TestExpectations | 2 + deps/v8/tools/callstats.html | 7 +- deps/v8/tools/callstats.py | 37 +- deps/v8/tools/gen-postmortem-metadata.py | 9 +- .../tools/generate-header-include-checks.py | 1 - deps/v8/tools/grokdump.py | 6 +- deps/v8/tools/heap-stats/categories.js | 8 +- deps/v8/tools/node/fetch_deps.py | 3 + deps/v8/tools/node/update_node.py | 13 +- deps/v8/tools/perf-to-html.py | 381 --- deps/v8/tools/profile.js | 16 +- deps/v8/tools/profview/index.html | 6 +- deps/v8/tools/profview/profile-utils.js | 62 +- deps/v8/tools/profview/profview.css | 53 + deps/v8/tools/profview/profview.js | 277 +- deps/v8/tools/release/create_release.py | 2 +- deps/v8/tools/release/filter_build_files.py | 2 +- deps/v8/tools/release/git_recipes.py | 8 +- deps/v8/tools/release/test_scripts.py | 2 +- deps/v8/tools/run-clang-tidy.py | 420 +++ deps/v8/tools/run_perf.py | 4 +- .../v8/tools/sanitizers/tsan_suppressions.txt | 4 + deps/v8/tools/test262-results-parser.js | 41 + deps/v8/tools/testrunner/base_runner.py | 15 +- deps/v8/tools/testrunner/local/android.py | 7 +- deps/v8/tools/testrunner/local/command.py | 2 +- deps/v8/tools/testrunner/local/pool.py | 3 + deps/v8/tools/testrunner/num_fuzzer.py | 2 +- .../tools/testrunner/objects/predictable.py | 3 +- deps/v8/tools/testrunner/objects/testcase.py | 90 +- deps/v8/tools/testrunner/standard_runner.py | 2 +- deps/v8/tools/testrunner/testproc/progress.py | 7 +- deps/v8/tools/torque/format-torque.py | 61 +- .../syntaxes/torque.tmLanguage.json | 4 +- deps/v8/tools/try_perf.py | 2 + deps/v8/tools/turbolizer/README.md | 4 +- deps/v8/tools/turbolizer/rollup.config.js | 5 +- .../v8/tools/turbolizer/src/graphmultiview.ts | 5 + deps/v8/tools/turbolizer/src/sequence-view.ts | 235 ++ .../tools/turbolizer/src/source-resolver.ts | 13 +- deps/v8/tools/turbolizer/turbo-visualizer.css | 62 +- deps/v8/tools/unittests/run_tests_test.py | 23 + .../testdata/expected_test_results1.json | 24 +- .../testroot1/test/sweet/sweet.status | 1 + .../testdata/testroot1/test/sweet/testcfg.py | 8 +- deps/v8/tools/v8_presubmit.py | 83 +- deps/v8/tools/v8heapconst.py | 463 +-- deps/v8/tools/whitespace.txt | 4 +- 1526 files changed, 78425 insertions(+), 41694 deletions(-) create mode 100644 deps/v8/.clang-tidy create mode 100644 deps/v8/include/v8-internal.h create mode 100644 deps/v8/src/allocation-site-scopes-inl.h create mode 100644 deps/v8/src/ast/scopes-inl.h create mode 100644 deps/v8/src/base/address-region.h create mode 100644 deps/v8/src/base/bounded-page-allocator.cc create mode 100644 deps/v8/src/base/bounded-page-allocator.h create mode 100644 deps/v8/src/base/lsan-page-allocator.cc create mode 100644 deps/v8/src/base/lsan-page-allocator.h create mode 100644 deps/v8/src/base/region-allocator.cc create mode 100644 deps/v8/src/base/region-allocator.h create mode 100644 deps/v8/src/base/threaded-list.h create mode 100644 deps/v8/src/builtins/array-lastindexof.tq create mode 100644 deps/v8/src/builtins/array-splice.tq create mode 100644 deps/v8/src/builtins/array-unshift.tq delete mode 100644 deps/v8/src/builtins/builtins-intl.h create mode 100644 deps/v8/src/builtins/generate-bytecodes-builtins-list.cc create mode 100644 deps/v8/src/compiler/per-isolate-compiler-cache.h create mode 100644 deps/v8/src/compiler/refs-map.cc create mode 100644 deps/v8/src/compiler/refs-map.h delete mode 100644 deps/v8/src/interpreter/setup-interpreter-internal.cc delete mode 100644 deps/v8/src/interpreter/setup-interpreter.h create mode 100644 deps/v8/src/math-random.cc create mode 100644 deps/v8/src/math-random.h create mode 100644 deps/v8/src/objects/allocation-site-inl.h create mode 100644 deps/v8/src/objects/allocation-site.h create mode 100644 deps/v8/src/objects/builtin-function-id.h create mode 100644 deps/v8/src/objects/js-break-iterator-inl.h create mode 100644 deps/v8/src/objects/js-break-iterator.cc create mode 100644 deps/v8/src/objects/js-break-iterator.h create mode 100644 deps/v8/src/objects/js-date-time-format-inl.h create mode 100644 deps/v8/src/objects/js-date-time-format.cc create mode 100644 deps/v8/src/objects/js-date-time-format.h create mode 100644 deps/v8/src/objects/js-number-format-inl.h create mode 100644 deps/v8/src/objects/js-number-format.cc create mode 100644 deps/v8/src/objects/js-number-format.h create mode 100644 deps/v8/src/objects/js-objects-inl.h create mode 100644 deps/v8/src/objects/js-objects.h create mode 100644 deps/v8/src/objects/js-segmenter-inl.h create mode 100644 deps/v8/src/objects/js-segmenter.cc create mode 100644 deps/v8/src/objects/js-segmenter.h create mode 100644 deps/v8/src/objects/microtask-queue-inl.h create mode 100644 deps/v8/src/objects/microtask-queue.cc create mode 100644 deps/v8/src/objects/microtask-queue.h create mode 100644 deps/v8/src/objects/property-array-inl.h create mode 100644 deps/v8/src/objects/property-array.h create mode 100644 deps/v8/src/objects/stack-frame-info-inl.h create mode 100644 deps/v8/src/objects/stack-frame-info.h create mode 100644 deps/v8/src/parsing/preparsed-scope-data-impl.h create mode 100644 deps/v8/src/regexp/property-sequences.cc create mode 100644 deps/v8/src/regexp/property-sequences.h create mode 100644 deps/v8/src/roots.cc delete mode 100644 deps/v8/src/runtime/runtime-maths.cc delete mode 100644 deps/v8/src/snapshot/builtin-snapshot-utils.cc delete mode 100644 deps/v8/src/snapshot/builtin-snapshot-utils.h create mode 100644 deps/v8/src/string-constants.cc create mode 100644 deps/v8/src/string-constants.h create mode 100644 deps/v8/src/torque-assembler.h create mode 100644 deps/v8/src/torque/cfg.cc create mode 100644 deps/v8/src/torque/cfg.h create mode 100644 deps/v8/src/torque/csa-generator.cc create mode 100644 deps/v8/src/torque/csa-generator.h create mode 100644 deps/v8/src/torque/instructions.cc create mode 100644 deps/v8/src/torque/instructions.h create mode 100644 deps/v8/src/wasm/object-access.h create mode 100644 deps/v8/test/cctest/test-poison-disasm-arm.cc create mode 100644 deps/v8/test/cctest/test-smi-lexicographic-compare.cc create mode 100644 deps/v8/test/cctest/unicode-helpers.cc create mode 100644 deps/v8/test/debugger/debug/debug-break-class-fields.js rename deps/v8/test/debugger/debug/{debug-live-edit-recursion.js => debug-liveedit-recursion.js} (100%) create mode 100644 deps/v8/test/inspector/debugger/es6-module-liveedit-expected.txt create mode 100644 deps/v8/test/inspector/debugger/es6-module-liveedit.js delete mode 100644 deps/v8/test/inspector/debugger/es6-module-set-script-source-expected.txt delete mode 100644 deps/v8/test/inspector/debugger/es6-module-set-script-source.js create mode 100644 deps/v8/test/inspector/debugger/evaluate-at-first-module-line-expected.txt create mode 100644 deps/v8/test/inspector/debugger/evaluate-at-first-module-line.js create mode 100644 deps/v8/test/inspector/debugger/get-possible-breakpoints-class-fields-expected.txt create mode 100644 deps/v8/test/inspector/debugger/get-possible-breakpoints-class-fields.js create mode 100644 deps/v8/test/inspector/debugger/pause-on-promise-rejections-expected.txt create mode 100644 deps/v8/test/inspector/debugger/pause-on-promise-rejections.js create mode 100644 deps/v8/test/inspector/debugger/resources/break-locations-class-fields.js create mode 100644 deps/v8/test/inspector/debugger/wasm-stepping-with-source-map-expected.txt create mode 100644 deps/v8/test/inspector/debugger/wasm-stepping-with-source-map.js create mode 100644 deps/v8/test/inspector/runtime/console-time-log-expected.txt create mode 100644 deps/v8/test/inspector/runtime/console-time-log.js create mode 100644 deps/v8/test/inspector/runtime/error-preview-expected.txt create mode 100644 deps/v8/test/inspector/runtime/error-preview.js create mode 100644 deps/v8/test/inspector/runtime/stable-object-id-expected.txt create mode 100644 deps/v8/test/inspector/runtime/stable-object-id.js create mode 100644 deps/v8/test/intl/break-iterator/options.js create mode 100644 deps/v8/test/intl/break-iterator/subclass.js rename deps/v8/test/{mjsunit/regress/regress-splice-large-index.js => intl/break-iterator/supported-locales-is-method.js} (75%) create mode 100644 deps/v8/test/intl/collator/options.js create mode 100644 deps/v8/test/intl/date-format/constructor-order.js create mode 100644 deps/v8/test/intl/date-format/resolved-options-unwrap.js create mode 100644 deps/v8/test/intl/date-format/timezone-conversion.js create mode 100644 deps/v8/test/intl/list-format/supported-locale.js create mode 100644 deps/v8/test/intl/number-format/resolved-options-unwrap.js create mode 100644 deps/v8/test/intl/number-format/wont-crash-by-1-or-false.js create mode 100644 deps/v8/test/intl/plural-rules/check-to-number.js create mode 100644 deps/v8/test/intl/regress-7982.js create mode 100644 deps/v8/test/intl/regress-888299.js create mode 100644 deps/v8/test/intl/relative-time-format/format-to-parts-plural.js create mode 100644 deps/v8/test/intl/relative-time-format/supported-locale.js create mode 100644 deps/v8/test/intl/segmenter/constructor.js create mode 100644 deps/v8/test/intl/segmenter/resolved-options.js create mode 100644 deps/v8/test/intl/segmenter/segment-iterator-following.js create mode 100644 deps/v8/test/intl/segmenter/segment-iterator-next.js create mode 100644 deps/v8/test/intl/segmenter/segment-iterator-preceding.js create mode 100644 deps/v8/test/intl/segmenter/segment-iterator.js create mode 100644 deps/v8/test/intl/segmenter/segment.js create mode 100644 deps/v8/test/intl/segmenter/supported-locale.js rename deps/v8/test/js-perf-test/{ArrayLiteralInitialSpreadLarge => ArrayLiteralInitialSpreadLargePacked}/run.js (92%) rename deps/v8/test/js-perf-test/{ArrayLiteralInitialSpreadSmall => ArrayLiteralInitialSpreadSmallPacked}/run.js (98%) create mode 100644 deps/v8/test/message/fail/class-fields-computed.js create mode 100644 deps/v8/test/message/fail/class-fields-computed.out create mode 100644 deps/v8/test/message/fail/class-fields-static-throw.js create mode 100644 deps/v8/test/message/fail/class-fields-static-throw.out create mode 100644 deps/v8/test/message/fail/class-fields-throw.js create mode 100644 deps/v8/test/message/fail/class-fields-throw.out create mode 100644 deps/v8/test/mjsunit/async-stack-traces-prepare-stacktrace-1.js create mode 100644 deps/v8/test/mjsunit/async-stack-traces-prepare-stacktrace-2.js create mode 100644 deps/v8/test/mjsunit/async-stack-traces-prepare-stacktrace-3.js create mode 100644 deps/v8/test/mjsunit/async-stack-traces.js create mode 100644 deps/v8/test/mjsunit/code-coverage-class-fields.js create mode 100644 deps/v8/test/mjsunit/compiler/abstract-equal-symbol.js create mode 100644 deps/v8/test/mjsunit/compiler/array-buffer-is-view.js create mode 100644 deps/v8/test/mjsunit/compiler/array-is-array.js create mode 100644 deps/v8/test/mjsunit/compiler/context-sensitivity.js create mode 100644 deps/v8/test/mjsunit/compiler/dataview-constant.js create mode 100644 deps/v8/test/mjsunit/compiler/dataview-neutered.js create mode 100644 deps/v8/test/mjsunit/compiler/dataview-nonconstant.js create mode 100644 deps/v8/test/mjsunit/compiler/escape-analysis-array.js create mode 100644 deps/v8/test/mjsunit/compiler/escape-analysis-rest-parameters.js create mode 100644 deps/v8/test/mjsunit/compiler/instanceof2.js create mode 100644 deps/v8/test/mjsunit/compiler/instanceof3.js create mode 100644 deps/v8/test/mjsunit/compiler/int64.js create mode 100644 deps/v8/test/mjsunit/compiler/math-imul.js create mode 100644 deps/v8/test/mjsunit/compiler/math-max.js create mode 100644 deps/v8/test/mjsunit/compiler/math-min.js create mode 100644 deps/v8/test/mjsunit/compiler/number-abs.js create mode 100644 deps/v8/test/mjsunit/compiler/number-add.js create mode 100644 deps/v8/test/mjsunit/compiler/number-ceil.js create mode 100644 deps/v8/test/mjsunit/compiler/number-comparison-truncations.js create mode 100644 deps/v8/test/mjsunit/compiler/number-divide.js create mode 100644 deps/v8/test/mjsunit/compiler/number-floor.js create mode 100644 deps/v8/test/mjsunit/compiler/number-max.js create mode 100644 deps/v8/test/mjsunit/compiler/number-min.js create mode 100644 deps/v8/test/mjsunit/compiler/number-modulus.js create mode 100644 deps/v8/test/mjsunit/compiler/number-round.js create mode 100644 deps/v8/test/mjsunit/compiler/number-subtract.js create mode 100644 deps/v8/test/mjsunit/compiler/number-toboolean.js create mode 100644 deps/v8/test/mjsunit/compiler/number-trunc.js create mode 100644 deps/v8/test/mjsunit/compiler/redundancy-elimination.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-884052.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-890057.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-890620.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-895799.js create mode 100644 deps/v8/test/mjsunit/compiler/strict-equal-symbol.js create mode 100644 deps/v8/test/mjsunit/compiler/string-from-code-point.js create mode 100644 deps/v8/test/mjsunit/d8/d8-worker-script.js create mode 100644 deps/v8/test/mjsunit/d8/d8-worker-script.txt create mode 100644 deps/v8/test/mjsunit/es6/array-spread-holey.js create mode 100644 deps/v8/test/mjsunit/es6/string-iterator2.js create mode 100644 deps/v8/test/mjsunit/es6/string-iterator3.js create mode 100644 deps/v8/test/mjsunit/es6/string-iterator4.js create mode 100644 deps/v8/test/mjsunit/es6/string-iterator5.js create mode 100644 deps/v8/test/mjsunit/es6/string-iterator6.js create mode 100644 deps/v8/test/mjsunit/es6/string-iterator7.js create mode 100644 deps/v8/test/mjsunit/es6/string-iterator8.js create mode 100644 deps/v8/test/mjsunit/es9/object-spread-ic-dontenum-transition.js create mode 100644 deps/v8/test/mjsunit/es9/object-spread-ic-multiple-transitions.js create mode 100644 deps/v8/test/mjsunit/external-backing-store-gc.js create mode 100644 deps/v8/test/mjsunit/harmony/async-await-optimization.js create mode 100644 deps/v8/test/mjsunit/harmony/atomics-notify.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-emoji-flag-sequence-generated.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-emoji-keycap-sequence-generated.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-emoji-modifier-sequence-generated.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-emoji-tag-sequence-generated.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-emoji-zwj-sequence-generated.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-sequence.js delete mode 100644 deps/v8/test/mjsunit/harmony/to-primitive.js create mode 100644 deps/v8/test/mjsunit/harmony/well-formed-json-stringify-checked.js create mode 100644 deps/v8/test/mjsunit/harmony/well-formed-json-stringify-unchecked.js delete mode 100644 deps/v8/test/mjsunit/lexicographic-compare.js create mode 100644 deps/v8/test/mjsunit/regress/regress-8133-1.js create mode 100644 deps/v8/test/mjsunit/regress/regress-8133-2.js create mode 100644 deps/v8/test/mjsunit/regress/regress-8237.js create mode 100644 deps/v8/test/mjsunit/regress/regress-8265.js create mode 100644 deps/v8/test/mjsunit/regress/regress-8449.js create mode 100644 deps/v8/test/mjsunit/regress/regress-883059.js create mode 100644 deps/v8/test/mjsunit/regress/regress-889722.js create mode 100644 deps/v8/test/mjsunit/regress/regress-890553.js rename deps/v8/test/mjsunit/regress/{regress-2185.js => regress-892858.js} (86%) create mode 100644 deps/v8/test/mjsunit/regress/regress-arrow-single-expression-eval.js delete mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-380671.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-687063.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-876443.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-878845.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-879560.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-879898.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-880207.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-882233-1.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-882233-2.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-884933.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-885404.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-887891.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-888825.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-890243.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-891627.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-892472-1.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-892472-2.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-897514.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-899524.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-90771.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-8094.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-8095.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-810973b.js create mode 100644 deps/v8/test/mjsunit/stack-traces-class-fields.js create mode 100644 deps/v8/test/mjsunit/wasm/compare-exchange-stress.js create mode 100644 deps/v8/test/mjsunit/wasm/compare-exchange64-stress.js create mode 100644 deps/v8/test/mjsunit/wasm/exceptions-export.js create mode 100644 deps/v8/test/mjsunit/wasm/exceptions-import.js create mode 100644 deps/v8/test/mjsunit/wasm/exceptions-shared.js create mode 100644 deps/v8/test/unittests/base/address-region-unittest.cc create mode 100644 deps/v8/test/unittests/base/region-allocator-unittest.cc create mode 100644 deps/v8/test/unittests/base/threaded-list-unittest.cc create mode 100644 deps/v8/test/unittests/compiler/js-native-context-specialization-unittest.cc create mode 100644 deps/v8/test/unittests/compiler/redundancy-elimination-unittest.cc create mode 100644 deps/v8/test/unittests/objects/microtask-queue-unittest.cc delete mode 100755 deps/v8/tools/perf-to-html.py create mode 100755 deps/v8/tools/run-clang-tidy.py create mode 100644 deps/v8/tools/test262-results-parser.js create mode 100644 deps/v8/tools/turbolizer/src/sequence-view.ts diff --git a/deps/v8/.clang-tidy b/deps/v8/.clang-tidy new file mode 100644 index 00000000000000..31d7ddc750011f --- /dev/null +++ b/deps/v8/.clang-tidy @@ -0,0 +1,20 @@ +--- +--- + Checks: '-*, + modernize-redundant-void-arg, + modernize-replace-random-shuffle, + modernize-shrink-to-fit, + modernize-use-auto, + modernize-use-bool-literals, + modernize-use-equals-default, + modernize-use-equals-delete, + modernize-use-nullptr, + modernize-use-override, + google-build-explicit-make-pair, + google-explicit-constructor, + google-readability-casting' +WarningsAsErrors: '' +HeaderFilterRegex: '' +AnalyzeTemporaryDtors: false +... + diff --git a/deps/v8/.gitattributes b/deps/v8/.gitattributes index 7ef1e1b74b01e0..b3e9762a9392a1 100644 --- a/deps/v8/.gitattributes +++ b/deps/v8/.gitattributes @@ -3,3 +3,5 @@ # Do not modify line endings for binary files (which are sometimes auto # detected as text files by git). *.png binary +# Don't include minified JS in git grep/diff output +test/mjsunit/asm/sqlite3/*.js -diff diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index 511e24d90c740f..7f09c89e360f8e 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -73,7 +73,6 @@ /tools/clang /tools/gcmole/gcmole-tools /tools/gcmole/gcmole-tools.tar.gz -/tools/gyp /tools/jsfunfuzz/jsfunfuzz /tools/jsfunfuzz/jsfunfuzz.tar.gz /tools/luci-go diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index 898bc8feaecd08..b935565945dad7 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -132,6 +132,7 @@ Peter Rybin Peter Varga Peter Wong Paul Lind +PhistucK Qingyan Li Qiuyi Zhang Rafal Krypa @@ -162,6 +163,7 @@ Vladimir Krivosheev Vladimir Shutoff Wiktor Garbacz Xiaoyin Liu +Yannic Bonenberger Yong Wang Yu Yin Zac Hansen diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 7e3406fb6760b6..83f1fdb0bf75dd 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -76,9 +76,6 @@ declare_args() { v8_enable_embedded_builtins = v8_use_snapshot && v8_current_cpu != "x86" && !is_aix && (!is_win || is_clang) - # Enable embedded bytecode handlers. - v8_enable_embedded_bytecode_handlers = false - # Enable code-generation-time checking of types in the CodeStubAssembler. v8_enable_verify_csa = false @@ -164,6 +161,17 @@ declare_args() { # setting the "check_v8_header_includes" gclient variable to run a # specific hook). v8_check_header_includes = false + + # We reuse the snapshot toolchain for building torque and other generators to + # avoid building v8_libbase on the host more than once. On mips with big + # endian, the snapshot toolchain is the target toolchain and, hence, can't be + # used. +} + +v8_generator_toolchain = v8_snapshot_toolchain +if (host_cpu == "x64" && + (v8_current_cpu == "mips" || v8_current_cpu == "mips64")) { + v8_generator_toolchain = "//build/toolchain/linux:clang_x64" } # Derived defaults. @@ -197,9 +205,6 @@ assert( !v8_untrusted_code_mitigations, "Embedded builtins on ia32 and untrusted code mitigations are incompatible") -assert(!v8_enable_embedded_bytecode_handlers || v8_enable_embedded_builtins, - "Embedded bytecode handlers only work with embedded builtins") - # Specifies if the target build is a simulator build. Comparing target cpu # with v8 target cpu to not affect simulator builds for making cross-compile # snapshots. @@ -377,10 +382,10 @@ config("features") { defines += [ "V8_CHECK_MICROTASKS_SCOPES_CONSISTENCY" ] } if (v8_enable_embedded_builtins) { - defines += [ "V8_EMBEDDED_BUILTINS" ] - } - if (v8_enable_embedded_bytecode_handlers) { - defines += [ "V8_EMBEDDED_BYTECODE_HANDLERS" ] + defines += [ + "V8_EMBEDDED_BUILTINS", + "V8_EMBEDDED_BYTECODE_HANDLERS", + ] } if (v8_use_multi_snapshots) { defines += [ "V8_MULTI_SNAPSHOTS" ] @@ -849,6 +854,8 @@ action("postmortem-metadata") { sources = [ "src/objects.h", "src/objects-inl.h", + "src/objects/allocation-site-inl.h", + "src/objects/allocation-site.h", "src/objects/code-inl.h", "src/objects/code.h", "src/objects/data-handler.h", @@ -859,6 +866,8 @@ action("postmortem-metadata") { "src/objects/js-array.h", "src/objects/js-array-buffer-inl.h", "src/objects/js-array-buffer.h", + "src/objects/js-objects-inl.h", + "src/objects/js-objects.h", "src/objects/js-regexp-inl.h", "src/objects/js-regexp.h", "src/objects/js-regexp-string-iterator-inl.h", @@ -889,7 +898,10 @@ torque_files = [ "src/builtins/array.tq", "src/builtins/array-copywithin.tq", "src/builtins/array-foreach.tq", + "src/builtins/array-lastindexof.tq", "src/builtins/array-reverse.tq", + "src/builtins/array-splice.tq", + "src/builtins/array-unshift.tq", "src/builtins/typed-array.tq", "src/builtins/data-view.tq", "test/torque/test-torque.tq", @@ -911,17 +923,8 @@ action("run_torque") { "test/cctest/:*", ] - # We reuse the snapshot toolchain for building torque to not build v8_libbase - # on the host more than once. On mips with big endian, the snapshot toolchain - # is the target toolchain and, hence, can't be used. - v8_torque_toolchain = v8_snapshot_toolchain - if (host_cpu == "x64" && - (v8_current_cpu == "mips" || v8_current_cpu == "mips64")) { - v8_torque_toolchain = "//build/toolchain/linux:clang_x64" - } - deps = [ - ":torque($v8_torque_toolchain)", + ":torque($v8_generator_toolchain)", ] script = "tools/run.py" @@ -939,7 +942,7 @@ action("run_torque") { } args = [ - "./" + rebase_path(get_label_info(":torque($v8_torque_toolchain)", + "./" + rebase_path(get_label_info(":torque($v8_generator_toolchain)", "root_out_dir") + "/torque", root_build_dir), "-o", @@ -969,6 +972,7 @@ v8_source_set("torque_generated_initializers") { visibility = [ ":*" ] # Only targets in this file can depend on this. deps = [ + ":generate_bytecode_builtins_list", ":run_torque", ] @@ -989,6 +993,24 @@ v8_source_set("torque_generated_initializers") { configs = [ ":internal_config" ] } +action("generate_bytecode_builtins_list") { + script = "tools/run.py" + outputs = [ + "$target_gen_dir/builtins-generated/bytecodes-builtins-list.h", + ] + deps = [ + ":bytecode_builtins_list_generator($v8_generator_toolchain)", + ] + args = [ + "./" + rebase_path( + get_label_info( + ":bytecode_builtins_list_generator($v8_generator_toolchain)", + "root_out_dir") + "/bytecode_builtins_list_generator", + root_build_dir), + rebase_path("$target_gen_dir/builtins-generated/bytecodes-builtins-list.h"), + ] +} + # Template to generate different V8 snapshots based on different runtime flags. # Can be invoked with run_mksnapshot(). The target will resolve to # run_mksnapshot_. If is "default", no file suffixes will be used. @@ -1382,8 +1404,6 @@ v8_source_set("v8_initializers") { "src/interpreter/interpreter-generator.h", "src/interpreter/interpreter-intrinsics-generator.cc", "src/interpreter/interpreter-intrinsics-generator.h", - "src/interpreter/setup-interpreter-internal.cc", - "src/interpreter/setup-interpreter.h", ] if (use_jumbo_build == true) { @@ -1485,6 +1505,7 @@ v8_header_set("v8_headers") { configs = [ ":internal_config" ] sources = [ + "include/v8-internal.h", "include/v8.h", "include/v8config.h", ] @@ -1504,8 +1525,10 @@ v8_source_set("v8_base") { "//base/trace_event/common/trace_event_common.h", ### gcmole(all) ### + "$target_gen_dir/builtins-generated/bytecodes-builtins-list.h", "include/v8-inspector-protocol.h", "include/v8-inspector.h", + "include/v8-internal.h", "include/v8-platform.h", "include/v8-profiler.h", "include/v8-testing.h", @@ -1516,6 +1539,7 @@ v8_source_set("v8_base") { "src/accessors.h", "src/address-map.cc", "src/address-map.h", + "src/allocation-site-scopes-inl.h", "src/allocation-site-scopes.h", "src/allocation.cc", "src/allocation.h", @@ -1562,6 +1586,7 @@ v8_source_set("v8_base") { "src/ast/modules.h", "src/ast/prettyprinter.cc", "src/ast/prettyprinter.h", + "src/ast/scopes-inl.h", "src/ast/scopes.cc", "src/ast/scopes.h", "src/ast/variables.cc", @@ -1599,7 +1624,6 @@ v8_source_set("v8_base") { "src/builtins/builtins-internal.cc", "src/builtins/builtins-interpreter.cc", "src/builtins/builtins-intl.cc", - "src/builtins/builtins-intl.h", "src/builtins/builtins-json.cc", "src/builtins/builtins-math.cc", "src/builtins/builtins-number.cc", @@ -1813,6 +1837,7 @@ v8_source_set("v8_base") { "src/compiler/operator.h", "src/compiler/osr.cc", "src/compiler/osr.h", + "src/compiler/per-isolate-compiler-cache.h", "src/compiler/persistent-map.h", "src/compiler/pipeline-statistics.cc", "src/compiler/pipeline-statistics.h", @@ -1824,6 +1849,8 @@ v8_source_set("v8_base") { "src/compiler/raw-machine-assembler.h", "src/compiler/redundancy-elimination.cc", "src/compiler/redundancy-elimination.h", + "src/compiler/refs-map.cc", + "src/compiler/refs-map.h", "src/compiler/register-allocator-verifier.cc", "src/compiler/register-allocator-verifier.h", "src/compiler/register-allocator.cc", @@ -2140,6 +2167,8 @@ v8_source_set("v8_base") { "src/macro-assembler.h", "src/map-updater.cc", "src/map-updater.h", + "src/math-random.cc", + "src/math-random.h", "src/maybe-handles-inl.h", "src/maybe-handles.h", "src/messages.cc", @@ -2158,6 +2187,7 @@ v8_source_set("v8_base") { "src/objects/arguments.h", "src/objects/bigint.cc", "src/objects/bigint.h", + "src/objects/builtin-function-id.h", "src/objects/code-inl.h", "src/objects/code.h", "src/objects/compilation-cache-inl.h", @@ -2181,11 +2211,17 @@ v8_source_set("v8_base") { "src/objects/js-array-buffer.h", "src/objects/js-array-inl.h", "src/objects/js-array.h", + "src/objects/js-break-iterator-inl.h", + "src/objects/js-break-iterator.cc", + "src/objects/js-break-iterator.h", "src/objects/js-collator-inl.h", "src/objects/js-collator.cc", "src/objects/js-collator.h", "src/objects/js-collection-inl.h", "src/objects/js-collection.h", + "src/objects/js-date-time-format-inl.h", + "src/objects/js-date-time-format.cc", + "src/objects/js-date-time-format.h", "src/objects/js-generator-inl.h", "src/objects/js-generator.h", "src/objects/js-list-format-inl.h", @@ -2194,6 +2230,11 @@ v8_source_set("v8_base") { "src/objects/js-locale-inl.h", "src/objects/js-locale.cc", "src/objects/js-locale.h", + "src/objects/js-number-format-inl.h", + "src/objects/js-number-format.cc", + "src/objects/js-number-format.h", + "src/objects/js-objects-inl.h", + "src/objects/js-objects.h", "src/objects/js-plural-rules-inl.h", "src/objects/js-plural-rules.cc", "src/objects/js-plural-rules.h", @@ -2208,6 +2249,9 @@ v8_source_set("v8_base") { "src/objects/js-relative-time-format-inl.h", "src/objects/js-relative-time-format.cc", "src/objects/js-relative-time-format.h", + "src/objects/js-segmenter-inl.h", + "src/objects/js-segmenter.cc", + "src/objects/js-segmenter.h", "src/objects/literal-objects-inl.h", "src/objects/literal-objects.cc", "src/objects/literal-objects.h", @@ -2218,6 +2262,9 @@ v8_source_set("v8_base") { "src/objects/maybe-object-inl.h", "src/objects/maybe-object.h", "src/objects/microtask-inl.h", + "src/objects/microtask-queue-inl.h", + "src/objects/microtask-queue.cc", + "src/objects/microtask-queue.h", "src/objects/microtask.h", "src/objects/module-inl.h", "src/objects/module.cc", @@ -2231,6 +2278,8 @@ v8_source_set("v8_base") { "src/objects/ordered-hash-table.h", "src/objects/promise-inl.h", "src/objects/promise.h", + "src/objects/property-array-inl.h", + "src/objects/property-array.h", "src/objects/property-descriptor-object-inl.h", "src/objects/property-descriptor-object.h", "src/objects/prototype-info-inl.h", @@ -2242,6 +2291,8 @@ v8_source_set("v8_base") { "src/objects/script.h", "src/objects/shared-function-info-inl.h", "src/objects/shared-function-info.h", + "src/objects/stack-frame-info-inl.h", + "src/objects/stack-frame-info.h", "src/objects/string-inl.h", "src/objects/string-table.h", "src/objects/string.h", @@ -2267,6 +2318,7 @@ v8_source_set("v8_base") { "src/parsing/parsing.cc", "src/parsing/parsing.h", "src/parsing/pattern-rewriter.cc", + "src/parsing/preparsed-scope-data-impl.h", "src/parsing/preparsed-scope-data.cc", "src/parsing/preparsed-scope-data.h", "src/parsing/preparser-logger.h", @@ -2323,6 +2375,8 @@ v8_source_set("v8_base") { "src/regexp/jsregexp-inl.h", "src/regexp/jsregexp.cc", "src/regexp/jsregexp.h", + "src/regexp/property-sequences.cc", + "src/regexp/property-sequences.h", "src/regexp/regexp-ast.cc", "src/regexp/regexp-ast.h", "src/regexp/regexp-macro-assembler-irregexp-inl.h", @@ -2344,6 +2398,7 @@ v8_source_set("v8_base") { "src/reloc-info.cc", "src/reloc-info.h", "src/roots-inl.h", + "src/roots.cc", "src/roots.h", "src/runtime-profiler.cc", "src/runtime-profiler.h", @@ -2363,7 +2418,6 @@ v8_source_set("v8_base") { "src/runtime/runtime-interpreter.cc", "src/runtime/runtime-intl.cc", "src/runtime/runtime-literals.cc", - "src/runtime/runtime-maths.cc", "src/runtime/runtime-module.cc", "src/runtime/runtime-numbers.cc", "src/runtime/runtime-object.cc", @@ -2395,8 +2449,6 @@ v8_source_set("v8_base") { "src/snapshot/builtin-serializer-allocator.h", "src/snapshot/builtin-serializer.cc", "src/snapshot/builtin-serializer.h", - "src/snapshot/builtin-snapshot-utils.cc", - "src/snapshot/builtin-snapshot-utils.h", "src/snapshot/code-serializer.cc", "src/snapshot/code-serializer.h", "src/snapshot/default-deserializer-allocator.cc", @@ -2439,6 +2491,8 @@ v8_source_set("v8_base") { "src/string-builder.cc", "src/string-case.cc", "src/string-case.h", + "src/string-constants.cc", + "src/string-constants.h", "src/string-hasher-inl.h", "src/string-hasher.h", "src/string-search.h", @@ -2447,6 +2501,7 @@ v8_source_set("v8_base") { "src/strtod.cc", "src/strtod.h", "src/third_party/utf8-decoder/utf8-decoder.h", + "src/torque-assembler.h", "src/tracing/trace-event.cc", "src/tracing/trace-event.h", "src/tracing/traced-value.cc", @@ -2518,6 +2573,7 @@ v8_source_set("v8_base") { "src/wasm/module-compiler.h", "src/wasm/module-decoder.cc", "src/wasm/module-decoder.h", + "src/wasm/object-access.h", "src/wasm/signature-map.cc", "src/wasm/signature-map.h", "src/wasm/streaming-decoder.cc", @@ -2869,6 +2925,7 @@ v8_source_set("v8_base") { defines = [] deps = [ + ":generate_bytecode_builtins_list", ":torque_generated_core", ":v8_headers", ":v8_libbase", @@ -2886,28 +2943,39 @@ v8_source_set("v8_base") { } else { sources -= [ "src/builtins/builtins-intl.cc", - "src/builtins/builtins-intl.h", "src/char-predicates.cc", "src/intl.cc", "src/intl.h", "src/objects/intl-objects-inl.h", "src/objects/intl-objects.cc", "src/objects/intl-objects.h", + "src/objects/js-break-iterator-inl.h", + "src/objects/js-break-iterator.cc", + "src/objects/js-break-iterator.h", "src/objects/js-collator-inl.h", "src/objects/js-collator.cc", "src/objects/js-collator.h", + "src/objects/js-date-time-format-inl.h", + "src/objects/js-date-time-format.cc", + "src/objects/js-date-time-format.h", "src/objects/js-list-format-inl.h", "src/objects/js-list-format.cc", "src/objects/js-list-format.h", "src/objects/js-locale-inl.h", "src/objects/js-locale.cc", "src/objects/js-locale.h", + "src/objects/js-number-format-inl.h", + "src/objects/js-number-format.cc", + "src/objects/js-number-format.h", "src/objects/js-plural-rules-inl.h", "src/objects/js-plural-rules.cc", "src/objects/js-plural-rules.h", "src/objects/js-relative-time-format-inl.h", "src/objects/js-relative-time-format.cc", "src/objects/js-relative-time-format.h", + "src/objects/js-segmenter-inl.h", + "src/objects/js-segmenter.cc", + "src/objects/js-segmenter.h", "src/runtime/runtime-intl.cc", ] } @@ -2916,6 +2984,15 @@ v8_source_set("v8_base") { sources += [ "$target_gen_dir/debug-support.cc" ] deps += [ ":postmortem-metadata" ] } + + # Platforms that don't have CAS support need to link atomic library + # to implement atomic memory access + if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" || + v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" || + v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" || + v8_current_cpu == "s390" || v8_current_cpu == "s390x") { + libs = [ "atomic" ] + } } v8_source_set("torque_base") { @@ -2923,7 +3000,11 @@ v8_source_set("torque_base") { sources = [ "src/torque/ast.h", + "src/torque/cfg.cc", + "src/torque/cfg.h", "src/torque/contextual.h", + "src/torque/csa-generator.cc", + "src/torque/csa-generator.h", "src/torque/declarable.cc", "src/torque/declarable.h", "src/torque/declaration-visitor.cc", @@ -2937,6 +3018,8 @@ v8_source_set("torque_base") { "src/torque/global-context.h", "src/torque/implementation-visitor.cc", "src/torque/implementation-visitor.h", + "src/torque/instructions.cc", + "src/torque/instructions.h", "src/torque/scope.cc", "src/torque/scope.h", "src/torque/source-positions.cc", @@ -2956,11 +3039,15 @@ v8_source_set("torque_base") { ] configs = [ ":internal_config" ] + if (is_win && is_asan) { + remove_configs = [ "//build/config/sanitizers:default_sanitizer_flags" ] + } } v8_component("v8_libbase") { sources = [ "src/base/adapters.h", + "src/base/address-region.h", "src/base/atomic-utils.h", "src/base/atomicops.h", "src/base/atomicops_internals_atomicword_compat.h", @@ -2969,6 +3056,8 @@ v8_component("v8_libbase") { "src/base/base-export.h", "src/base/bits.cc", "src/base/bits.h", + "src/base/bounded-page-allocator.cc", + "src/base/bounded-page-allocator.h", "src/base/build_config.h", "src/base/compiler-specific.h", "src/base/cpu.cc", @@ -2994,6 +3083,8 @@ v8_component("v8_libbase") { "src/base/list.h", "src/base/logging.cc", "src/base/logging.h", + "src/base/lsan-page-allocator.cc", + "src/base/lsan-page-allocator.h", "src/base/macros.h", "src/base/once.cc", "src/base/once.h", @@ -3010,6 +3101,8 @@ v8_component("v8_libbase") { "src/base/platform/semaphore.h", "src/base/platform/time.cc", "src/base/platform/time.h", + "src/base/region-allocator.cc", + "src/base/region-allocator.h", "src/base/ring-buffer.h", "src/base/safe_conversions.h", "src/base/safe_conversions_impl.h", @@ -3237,6 +3330,29 @@ if (v8_monolithic) { # Executables # +if (current_toolchain == v8_generator_toolchain) { + v8_executable("bytecode_builtins_list_generator") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + include_dirs = [ "." ] + + sources = [ + "src/builtins/generate-bytecodes-builtins-list.cc", + "src/interpreter/bytecode-operands.cc", + "src/interpreter/bytecode-operands.h", + "src/interpreter/bytecodes.cc", + "src/interpreter/bytecodes.h", + ] + + configs = [ ":internal_config" ] + + deps = [ + ":v8_libbase", + "//build/win:default_exe_manifest", + ] + } +} + if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { visibility = [ ":*" ] # Only targets in this file can depend on this. @@ -3272,6 +3388,9 @@ if (current_toolchain == v8_snapshot_toolchain) { ] configs = [ ":internal_config" ] + if (is_win && is_asan) { + remove_configs = [ "//build/config/sanitizers:default_sanitizer_flags" ] + } } } @@ -3325,11 +3444,32 @@ group("v8_clusterfuzz") { } group("v8_archive") { + testonly = true + deps = [ ":d8", + "test/cctest:cctest", ] } +# TODO(dglazkov): Remove the "!build_with_chromium" condition once this clause +# is removed from Chromium. +if (is_fuchsia && !build_with_chromium) { + import("//build/config/fuchsia/rules.gni") + + fuchsia_package("d8_fuchsia_pkg") { + testonly = true + binary = ":d8" + package_name_override = "d8" + } + + fuchsia_package_runner("d8_fuchsia") { + testonly = true + package = ":d8_fuchsia_pkg" + package_name_override = "d8" + } +} + group("v8_fuzzers") { testonly = true data_deps = [ @@ -3636,6 +3776,7 @@ v8_source_set("wasm_module_runner") { ] deps = [ + ":generate_bytecode_builtins_list", ":torque_generated_core", ] @@ -3719,6 +3860,7 @@ v8_source_set("lib_wasm_fuzzer_common") { ] deps = [ + ":generate_bytecode_builtins_list", ":torque_generated_core", ] diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index 428325ad58c974..a3377ab473cdf4 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,1643 @@ +2018-10-09: Version 7.1.302 + + Performance and stability improvements on all platforms. + + +2018-10-09: Version 7.1.301 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.300 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.299 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.298 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.297 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.296 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.295 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.294 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.293 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.292 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.291 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.290 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.289 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.288 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.287 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.286 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.285 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.284 + + Performance and stability improvements on all platforms. + + +2018-10-08: Version 7.1.283 + + Performance and stability improvements on all platforms. + + +2018-10-07: Version 7.1.282 + + Performance and stability improvements on all platforms. + + +2018-10-07: Version 7.1.281 + + Performance and stability improvements on all platforms. + + +2018-10-07: Version 7.1.280 + + Performance and stability improvements on all platforms. + + +2018-10-06: Version 7.1.279 + + Performance and stability improvements on all platforms. + + +2018-10-06: Version 7.1.278 + + Performance and stability improvements on all platforms. + + +2018-10-06: Version 7.1.277 + + Performance and stability improvements on all platforms. + + +2018-10-06: Version 7.1.276 + + Performance and stability improvements on all platforms. + + +2018-10-06: Version 7.1.275 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.274 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.273 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.272 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.271 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.270 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.269 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.268 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.267 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.266 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.265 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.264 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.263 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.262 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.261 + + Performance and stability improvements on all platforms. + + +2018-10-05: Version 7.1.260 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.259 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.258 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.257 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.256 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.255 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.254 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.253 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.252 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.251 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.250 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.249 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.248 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.247 + + Performance and stability improvements on all platforms. + + +2018-10-04: Version 7.1.246 + + Performance and stability improvements on all platforms. + + +2018-10-03: Version 7.1.245 + + Performance and stability improvements on all platforms. + + +2018-10-03: Version 7.1.244 + + Performance and stability improvements on all platforms. + + +2018-10-03: Version 7.1.243 + + Performance and stability improvements on all platforms. + + +2018-10-03: Version 7.1.242 + + Performance and stability improvements on all platforms. + + +2018-10-03: Version 7.1.241 + + Performance and stability improvements on all platforms. + + +2018-10-03: Version 7.1.240 + + Performance and stability improvements on all platforms. + + +2018-10-03: Version 7.1.239 + + Performance and stability improvements on all platforms. + + +2018-10-03: Version 7.1.238 + + Performance and stability improvements on all platforms. + + +2018-10-03: Version 7.1.237 + + Performance and stability improvements on all platforms. + + +2018-10-03: Version 7.1.236 + + Performance and stability improvements on all platforms. + + +2018-10-03: Version 7.1.235 + + Performance and stability improvements on all platforms. + + +2018-10-02: Version 7.1.234 + + Performance and stability improvements on all platforms. + + +2018-10-02: Version 7.1.233 + + Performance and stability improvements on all platforms. + + +2018-10-02: Version 7.1.232 + + Performance and stability improvements on all platforms. + + +2018-10-02: Version 7.1.231 + + Performance and stability improvements on all platforms. + + +2018-10-02: Version 7.1.230 + + Performance and stability improvements on all platforms. + + +2018-10-02: Version 7.1.229 + + Performance and stability improvements on all platforms. + + +2018-10-02: Version 7.1.228 + + Performance and stability improvements on all platforms. + + +2018-10-02: Version 7.1.227 + + Performance and stability improvements on all platforms. + + +2018-10-01: Version 7.1.226 + + Performance and stability improvements on all platforms. + + +2018-10-01: Version 7.1.225 + + Performance and stability improvements on all platforms. + + +2018-10-01: Version 7.1.224 + + Performance and stability improvements on all platforms. + + +2018-10-01: Version 7.1.223 + + Performance and stability improvements on all platforms. + + +2018-10-01: Version 7.1.222 + + Performance and stability improvements on all platforms. + + +2018-10-01: Version 7.1.221 + + Performance and stability improvements on all platforms. + + +2018-10-01: Version 7.1.220 + + Performance and stability improvements on all platforms. + + +2018-10-01: Version 7.1.219 + + Performance and stability improvements on all platforms. + + +2018-09-30: Version 7.1.218 + + Performance and stability improvements on all platforms. + + +2018-09-29: Version 7.1.217 + + Performance and stability improvements on all platforms. + + +2018-09-29: Version 7.1.216 + + Performance and stability improvements on all platforms. + + +2018-09-29: Version 7.1.215 + + Performance and stability improvements on all platforms. + + +2018-09-28: Version 7.1.214 + + Performance and stability improvements on all platforms. + + +2018-09-28: Version 7.1.213 + + Performance and stability improvements on all platforms. + + +2018-09-28: Version 7.1.212 + + Performance and stability improvements on all platforms. + + +2018-09-28: Version 7.1.211 + + Performance and stability improvements on all platforms. + + +2018-09-28: Version 7.1.210 + + Performance and stability improvements on all platforms. + + +2018-09-28: Version 7.1.209 + + Performance and stability improvements on all platforms. + + +2018-09-28: Version 7.1.208 + + Performance and stability improvements on all platforms. + + +2018-09-28: Version 7.1.207 + + Performance and stability improvements on all platforms. + + +2018-09-28: Version 7.1.206 + + Performance and stability improvements on all platforms. + + +2018-09-28: Version 7.1.205 + + Performance and stability improvements on all platforms. + + +2018-09-28: Version 7.1.204 + + Performance and stability improvements on all platforms. + + +2018-09-28: Version 7.1.203 + + Performance and stability improvements on all platforms. + + +2018-09-28: Version 7.1.202 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.201 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.200 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.199 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.198 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.197 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.196 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.195 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.194 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.193 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.192 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.191 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.190 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.189 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.188 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.187 + + Performance and stability improvements on all platforms. + + +2018-09-27: Version 7.1.186 + + Performance and stability improvements on all platforms. + + +2018-09-26: Version 7.1.185 + + Performance and stability improvements on all platforms. + + +2018-09-26: Version 7.1.184 + + Performance and stability improvements on all platforms. + + +2018-09-26: Version 7.1.183 + + Performance and stability improvements on all platforms. + + +2018-09-26: Version 7.1.182 + + Performance and stability improvements on all platforms. + + +2018-09-26: Version 7.1.181 + + Performance and stability improvements on all platforms. + + +2018-09-26: Version 7.1.180 + + Performance and stability improvements on all platforms. + + +2018-09-26: Version 7.1.179 + + Performance and stability improvements on all platforms. + + +2018-09-25: Version 7.1.178 + + Performance and stability improvements on all platforms. + + +2018-09-25: Version 7.1.177 + + Performance and stability improvements on all platforms. + + +2018-09-25: Version 7.1.176 + + Performance and stability improvements on all platforms. + + +2018-09-25: Version 7.1.175 + + Performance and stability improvements on all platforms. + + +2018-09-25: Version 7.1.174 + + Performance and stability improvements on all platforms. + + +2018-09-25: Version 7.1.173 + + Performance and stability improvements on all platforms. + + +2018-09-25: Version 7.1.172 + + Performance and stability improvements on all platforms. + + +2018-09-24: Version 7.1.171 + + Performance and stability improvements on all platforms. + + +2018-09-24: Version 7.1.170 + + Performance and stability improvements on all platforms. + + +2018-09-24: Version 7.1.169 + + Performance and stability improvements on all platforms. + + +2018-09-24: Version 7.1.168 + + Performance and stability improvements on all platforms. + + +2018-09-24: Version 7.1.167 + + Performance and stability improvements on all platforms. + + +2018-09-24: Version 7.1.166 + + Performance and stability improvements on all platforms. + + +2018-09-24: Version 7.1.165 + + Performance and stability improvements on all platforms. + + +2018-09-24: Version 7.1.164 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.163 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.162 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.161 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.160 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.159 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.158 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.157 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.156 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.155 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.154 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.153 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.152 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.151 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.150 + + Performance and stability improvements on all platforms. + + +2018-09-21: Version 7.1.149 + + Performance and stability improvements on all platforms. + + +2018-09-20: Version 7.1.148 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.147 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.146 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.145 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.144 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.143 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.142 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.141 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.140 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.139 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.138 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.137 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.136 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.135 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.134 + + Performance and stability improvements on all platforms. + + +2018-09-19: Version 7.1.133 + + Performance and stability improvements on all platforms. + + +2018-09-18: Version 7.1.132 + + Performance and stability improvements on all platforms. + + +2018-09-18: Version 7.1.131 + + Performance and stability improvements on all platforms. + + +2018-09-18: Version 7.1.130 + + Performance and stability improvements on all platforms. + + +2018-09-18: Version 7.1.129 + + Performance and stability improvements on all platforms. + + +2018-09-18: Version 7.1.128 + + Performance and stability improvements on all platforms. + + +2018-09-18: Version 7.1.127 + + Performance and stability improvements on all platforms. + + +2018-09-18: Version 7.1.126 + + Performance and stability improvements on all platforms. + + +2018-09-18: Version 7.1.125 + + Performance and stability improvements on all platforms. + + +2018-09-18: Version 7.1.124 + + Performance and stability improvements on all platforms. + + +2018-09-18: Version 7.1.123 + + Performance and stability improvements on all platforms. + + +2018-09-18: Version 7.1.122 + + Performance and stability improvements on all platforms. + + +2018-09-18: Version 7.1.121 + + Performance and stability improvements on all platforms. + + +2018-09-17: Version 7.1.120 + + Performance and stability improvements on all platforms. + + +2018-09-17: Version 7.1.119 + + Performance and stability improvements on all platforms. + + +2018-09-17: Version 7.1.118 + + Performance and stability improvements on all platforms. + + +2018-09-17: Version 7.1.117 + + Performance and stability improvements on all platforms. + + +2018-09-17: Version 7.1.116 + + Performance and stability improvements on all platforms. + + +2018-09-17: Version 7.1.115 + + Performance and stability improvements on all platforms. + + +2018-09-17: Version 7.1.114 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.113 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.112 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.111 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.110 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.109 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.108 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.107 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.106 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.105 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.104 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.103 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.102 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.101 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.100 + + Performance and stability improvements on all platforms. + + +2018-09-14: Version 7.1.99 + + Performance and stability improvements on all platforms. + + +2018-09-13: Version 7.1.98 + + Performance and stability improvements on all platforms. + + +2018-09-13: Version 7.1.97 + + Performance and stability improvements on all platforms. + + +2018-09-13: Version 7.1.96 + + Performance and stability improvements on all platforms. + + +2018-09-13: Version 7.1.95 + + Performance and stability improvements on all platforms. + + +2018-09-13: Version 7.1.94 + + Performance and stability improvements on all platforms. + + +2018-09-13: Version 7.1.93 + + Performance and stability improvements on all platforms. + + +2018-09-13: Version 7.1.92 + + Performance and stability improvements on all platforms. + + +2018-09-12: Version 7.1.91 + + Performance and stability improvements on all platforms. + + +2018-09-12: Version 7.1.90 + + Performance and stability improvements on all platforms. + + +2018-09-12: Version 7.1.89 + + Performance and stability improvements on all platforms. + + +2018-09-12: Version 7.1.88 + + Performance and stability improvements on all platforms. + + +2018-09-12: Version 7.1.87 + + Performance and stability improvements on all platforms. + + +2018-09-12: Version 7.1.86 + + Performance and stability improvements on all platforms. + + +2018-09-11: Version 7.1.85 + + Performance and stability improvements on all platforms. + + +2018-09-11: Version 7.1.84 + + Performance and stability improvements on all platforms. + + +2018-09-11: Version 7.1.83 + + Performance and stability improvements on all platforms. + + +2018-09-11: Version 7.1.82 + + Performance and stability improvements on all platforms. + + +2018-09-11: Version 7.1.81 + + Performance and stability improvements on all platforms. + + +2018-09-11: Version 7.1.80 + + Performance and stability improvements on all platforms. + + +2018-09-10: Version 7.1.79 + + Performance and stability improvements on all platforms. + + +2018-09-10: Version 7.1.78 + + Performance and stability improvements on all platforms. + + +2018-09-10: Version 7.1.77 + + Performance and stability improvements on all platforms. + + +2018-09-10: Version 7.1.76 + + Performance and stability improvements on all platforms. + + +2018-09-10: Version 7.1.75 + + Performance and stability improvements on all platforms. + + +2018-09-10: Version 7.1.74 + + Performance and stability improvements on all platforms. + + +2018-09-10: Version 7.1.73 + + Performance and stability improvements on all platforms. + + +2018-09-10: Version 7.1.72 + + Performance and stability improvements on all platforms. + + +2018-09-10: Version 7.1.71 + + Performance and stability improvements on all platforms. + + +2018-09-09: Version 7.1.70 + + Performance and stability improvements on all platforms. + + +2018-09-08: Version 7.1.69 + + Performance and stability improvements on all platforms. + + +2018-09-07: Version 7.1.68 + + Performance and stability improvements on all platforms. + + +2018-09-07: Version 7.1.67 + + Performance and stability improvements on all platforms. + + +2018-09-07: Version 7.1.66 + + Performance and stability improvements on all platforms. + + +2018-09-07: Version 7.1.65 + + Performance and stability improvements on all platforms. + + +2018-09-07: Version 7.1.64 + + Performance and stability improvements on all platforms. + + +2018-09-07: Version 7.1.63 + + Performance and stability improvements on all platforms. + + +2018-09-07: Version 7.1.62 + + Performance and stability improvements on all platforms. + + +2018-09-07: Version 7.1.61 + + Performance and stability improvements on all platforms. + + +2018-09-07: Version 7.1.60 + + Performance and stability improvements on all platforms. + + +2018-09-07: Version 7.1.59 + + Performance and stability improvements on all platforms. + + +2018-09-07: Version 7.1.58 + + Performance and stability improvements on all platforms. + + +2018-09-07: Version 7.1.57 + + Performance and stability improvements on all platforms. + + +2018-09-07: Version 7.1.56 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.55 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.54 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.53 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.52 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.51 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.50 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.49 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.48 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.47 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.46 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.45 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.44 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.43 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.42 + + Performance and stability improvements on all platforms. + + +2018-09-06: Version 7.1.41 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.40 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.39 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.38 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.37 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.36 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.35 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.34 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.33 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.32 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.31 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.30 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.29 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.28 + + Performance and stability improvements on all platforms. + + +2018-09-05: Version 7.1.27 + + Performance and stability improvements on all platforms. + + +2018-09-04: Version 7.1.26 + + Performance and stability improvements on all platforms. + + +2018-09-04: Version 7.1.25 + + Performance and stability improvements on all platforms. + + +2018-09-04: Version 7.1.24 + + Performance and stability improvements on all platforms. + + +2018-09-04: Version 7.1.23 + + Performance and stability improvements on all platforms. + + +2018-09-04: Version 7.1.22 + + Performance and stability improvements on all platforms. + + +2018-09-04: Version 7.1.21 + + Performance and stability improvements on all platforms. + + +2018-09-04: Version 7.1.20 + + Performance and stability improvements on all platforms. + + +2018-09-04: Version 7.1.19 + + Performance and stability improvements on all platforms. + + +2018-09-04: Version 7.1.18 + + Performance and stability improvements on all platforms. + + +2018-09-04: Version 7.1.17 + + Performance and stability improvements on all platforms. + + +2018-09-04: Version 7.1.16 + + Performance and stability improvements on all platforms. + + +2018-09-03: Version 7.1.15 + + Performance and stability improvements on all platforms. + + +2018-09-03: Version 7.1.14 + + Performance and stability improvements on all platforms. + + +2018-09-03: Version 7.1.13 + + Performance and stability improvements on all platforms. + + +2018-09-03: Version 7.1.12 + + Performance and stability improvements on all platforms. + + +2018-09-03: Version 7.1.11 + + Performance and stability improvements on all platforms. + + +2018-09-03: Version 7.1.10 + + Performance and stability improvements on all platforms. + + +2018-09-02: Version 7.1.9 + + Performance and stability improvements on all platforms. + + +2018-09-02: Version 7.1.8 + + Performance and stability improvements on all platforms. + + +2018-09-02: Version 7.1.7 + + Performance and stability improvements on all platforms. + + +2018-09-01: Version 7.1.6 + + Performance and stability improvements on all platforms. + + +2018-08-31: Version 7.1.5 + + Performance and stability improvements on all platforms. + + +2018-08-31: Version 7.1.4 + + Performance and stability improvements on all platforms. + + +2018-08-31: Version 7.1.3 + + Performance and stability improvements on all platforms. + + +2018-08-31: Version 7.1.2 + + Performance and stability improvements on all platforms. + + +2018-08-31: Version 7.1.1 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.302 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.301 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.300 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.299 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.298 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.297 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.296 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.295 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.294 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.293 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.292 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.291 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.290 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.289 + + Performance and stability improvements on all platforms. + + +2018-08-29: Version 7.0.288 + + Performance and stability improvements on all platforms. + + +2018-08-28: Version 7.0.287 + + Performance and stability improvements on all platforms. + + +2018-08-28: Version 7.0.286 + + Performance and stability improvements on all platforms. + + +2018-08-28: Version 7.0.285 + + Performance and stability improvements on all platforms. + + +2018-08-28: Version 7.0.284 + + Performance and stability improvements on all platforms. + + +2018-08-28: Version 7.0.283 + + Performance and stability improvements on all platforms. + + +2018-08-28: Version 7.0.282 + + Performance and stability improvements on all platforms. + + +2018-08-28: Version 7.0.281 + + Performance and stability improvements on all platforms. + + +2018-08-28: Version 7.0.280 + + Performance and stability improvements on all platforms. + + +2018-08-28: Version 7.0.279 + + Performance and stability improvements on all platforms. + + +2018-08-28: Version 7.0.278 + + Performance and stability improvements on all platforms. + + +2018-08-28: Version 7.0.277 + + Performance and stability improvements on all platforms. + + 2018-08-27: Version 7.0.276 Performance and stability improvements on all platforms. diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 42e7a40baa5980..fdd96f9b820f3d 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -13,15 +13,13 @@ vars = { deps = { 'v8/build': - Var('chromium_url') + '/chromium/src/build.git' + '@' + 'dd6b994b32b498e9e766ce60c44da0aec3a2a188', - 'v8/tools/gyp': - Var('chromium_url') + '/external/gyp.git' + '@' + 'd61a9397e668fa9843c4aa7da9e79460fe590bfb', + Var('chromium_url') + '/chromium/src/build.git' + '@' + 'a7674eacc34947257c78fe6ba5cf0da17f60696c', 'v8/third_party/depot_tools': - Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + 'aaf2cc09c6874e394c6c1e4692360cc400d6b388', + Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '71e3be7a50c21faeee91ed99a8d5addfb7594e7c', 'v8/third_party/icu': - Var('chromium_url') + '/chromium/deps/icu.git' + '@' + 'a191af9d025859e8368b8b469120d78006e9f5f6', + Var('chromium_url') + '/chromium/deps/icu.git' + '@' + 'c52a2a250d6c5f5cbdd015dff36af7c5d0ae1150', 'v8/third_party/instrumented_libraries': - Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + 'd8cf40c4592dcec7fb01fcbdf1f6d4958b3fbf11', + Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + 'a90cbf3b4216430a437991fb53ede8e048dea454', 'v8/buildtools': Var('chromium_url') + '/chromium/buildtools.git' + '@' + '2dff9c9c74e9d732e6fe57c84ef7fd044cc45d96', 'v8/base/trace_event/common': @@ -35,7 +33,7 @@ deps = { 'condition': 'checkout_android', }, 'v8/third_party/catapult': { - 'url': Var('chromium_url') + '/catapult.git' + '@' + 'bc2c0a9307285fa36e03e7cdb6bf8623390ff855', + 'url': Var('chromium_url') + '/catapult.git' + '@' + '9ec8468cfde0868ce5f3893e819087278c5af988', 'condition': 'checkout_android', }, 'v8/third_party/colorama/src': { @@ -43,17 +41,15 @@ deps = { 'condition': 'checkout_android', }, 'v8/third_party/fuchsia-sdk': { - 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-sdk.git' + '@' + '3ec92c896bcbddc46e2a073ebfdd25aa1194656e', + 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-sdk.git' + '@' + '6e1868c9083769d489d3fc25657339d50c22b1d8', 'condition': 'checkout_fuchsia', }, 'v8/third_party/googletest/src': - Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + 'd5266326752f0a1dadbd310932d8f4fd8c3c5e7d', + Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + '2e68926a9d4929e9289373cd49e40ddcb9a628f7', 'v8/third_party/jinja2': Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + 'b41863e42637544c2941b574c7877d3e1f663e25', 'v8/third_party/markupsafe': Var('chromium_url') + '/chromium/src/third_party/markupsafe.git' + '@' + '8f45f5cfa0009d2a70589bcda0349b8cb2b72783', - 'v8/third_party/proguard': - Var('chromium_url') + '/chromium/src/third_party/proguard.git' + '@' + 'a3729bea473bb5ffc5eaf289f5733bc5e2861c07', 'v8/tools/swarming_client': Var('chromium_url') + '/infra/luci/client-py.git' + '@' + '486c9b53c4d54dd4b95bb6ce0e31160e600dfc11', 'v8/test/benchmarks/data': @@ -61,25 +57,35 @@ deps = { 'v8/test/mozilla/data': Var('chromium_url') + '/v8/deps/third_party/mozilla-tests.git' + '@' + 'f6c578a10ea707b1a8ab0b88943fe5115ce2b9be', 'v8/test/test262/data': - Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + 'a6c1d05ac4fed084fa047e4c52ab2a8c9c2a8aef', + Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + '00cfe1628cc03164dcf03f01ba9c84376e9be735', 'v8/test/test262/harness': Var('chromium_url') + '/external/github.com/test262-utils/test262-harness-py.git' + '@' + '0f2acdd882c84cff43b9d60df7574a1901e2cdcd', - 'v8/third_party/qemu': { + 'v8/third_party/qemu-linux-x64': { 'packages': [ { 'package': 'fuchsia/qemu/linux-amd64', 'version': '9cc486c5b18a0be515c39a280ca9a309c54cf994' }, ], - 'condition': 'checkout_fuchsia', + 'condition': 'host_os == "linux" and checkout_fuchsia', + 'dep_type': 'cipd', + }, + 'v8/third_party/qemu-mac-x64': { + 'packages': [ + { + 'package': 'fuchsia/qemu/mac-amd64', + 'version': '2d3358ae9a569b2d4a474f498b32b202a152134f' + }, + ], + 'condition': 'host_os == "mac" and checkout_fuchsia', 'dep_type': 'cipd', }, 'v8/tools/clang': - Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + 'bb4146fb8a9dde405b71914657bb461dc93912ab', + Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '7792d28b069af6dd3a86d1ba83b7f5c4ede605dc', 'v8/tools/luci-go': Var('chromium_url') + '/chromium/src/tools/luci-go.git' + '@' + '445d7c4b6a4f10e188edb395b132e3996b127691', 'v8/test/wasm-js': - Var('chromium_url') + '/external/github.com/WebAssembly/spec.git' + '@' + '240ea673de6e75d78ae472f66127301ecab22a99', + Var('chromium_url') + '/external/github.com/WebAssembly/spec.git' + '@' + 'db9cd40808a90ecc5f4a23e88fb375c8f60b8d52', } recursedeps = [ @@ -344,13 +350,6 @@ hooks = [ 'condition': 'checkout_win', 'action': ['python', 'v8/build/vs_toolchain.py', 'update'], }, - { - # Update the Mac toolchain if necessary. - 'name': 'mac_toolchain', - 'pattern': '.', - 'condition': 'checkout_mac', - 'action': ['python', 'v8/build/mac_toolchain.py'], - }, # Pull binutils for linux, enabled debug fission for faster linking / # debugging when used with clang on Ubuntu Precise. # https://code.google.com/p/chromium/issues/detail?id=352046 @@ -387,6 +386,23 @@ hooks = [ 'v8/build/fuchsia/update_sdk.py', ], }, + { + # Mac doesn't use lld so it's not included in the default clang bundle + # there. However, lld is need in Fuchsia cross builds, so + # download it there. + # Should run after the clang hook. + 'name': 'lld/mac', + 'pattern': '.', + 'condition': 'host_os == "mac" and checkout_fuchsia', + 'action': ['python', 'v8/tools/clang/scripts/download_lld_mac.py'], + }, + { + # Mac does not have llvm-objdump, download it for cross builds in Fuchsia. + 'name': 'llvm-objdump', + 'pattern': '.', + 'condition': 'host_os == "mac" and checkout_fuchsia', + 'action': ['python', 'v8/tools/clang/scripts/download_objdump.py'], + }, { 'name': 'mips_toolchain', 'pattern': '.', diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index bd780ce62f7a78..88a64e727b2b8c 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -73,9 +73,10 @@ def _V8PresubmitChecks(input_api, output_api): import sys sys.path.append(input_api.os_path.join( input_api.PresubmitLocalPath(), 'tools')) - from presubmit import CppLintProcessor - from presubmit import SourceProcessor - from presubmit import StatusFilesProcessor + from v8_presubmit import CppLintProcessor + from v8_presubmit import TorqueFormatProcessor + from v8_presubmit import SourceProcessor + from v8_presubmit import StatusFilesProcessor def FilterFile(affected_file): return input_api.FilterSourceFile( @@ -83,10 +84,19 @@ def FilterFile(affected_file): white_list=None, black_list=_NO_LINT_PATHS) + def FilterTorqueFile(affected_file): + return input_api.FilterSourceFile( + affected_file, + white_list=(r'.+\.tq')) + results = [] if not CppLintProcessor().RunOnFiles( input_api.AffectedFiles(file_filter=FilterFile, include_deletes=False)): results.append(output_api.PresubmitError("C++ lint check failed")) + if not TorqueFormatProcessor().RunOnFiles( + input_api.AffectedFiles(file_filter=FilterTorqueFile, + include_deletes=False)): + results.append(output_api.PresubmitError("Torque format check failed")) if not SourceProcessor().RunOnFiles( input_api.AffectedFiles(include_deletes=False)): results.append(output_api.PresubmitError( diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index a5312f76acd9dd..6cb248f160dbd6 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -143,7 +143,15 @@ template("v8_source_set") { } } target(link_target_type, target_name) { - forward_variables_from(invoker, "*", [ "configs" ]) + forward_variables_from(invoker, + "*", + [ + "configs", + "remove_configs", + ]) + if (defined(invoker.remove_configs)) { + configs -= invoker.remove_configs + } configs += invoker.configs configs -= v8_remove_configs configs += v8_add_configs diff --git a/deps/v8/include/libplatform/v8-tracing.h b/deps/v8/include/libplatform/v8-tracing.h index e430e7c3502741..250d5fbdb9f07f 100644 --- a/deps/v8/include/libplatform/v8-tracing.h +++ b/deps/v8/include/libplatform/v8-tracing.h @@ -35,7 +35,7 @@ class V8_PLATFORM_EXPORT TraceObject { const char* as_string; }; - TraceObject() {} + TraceObject() = default; ~TraceObject(); void Initialize( char phase, const uint8_t* category_enabled_flag, const char* name, @@ -106,8 +106,8 @@ class V8_PLATFORM_EXPORT TraceObject { class V8_PLATFORM_EXPORT TraceWriter { public: - TraceWriter() {} - virtual ~TraceWriter() {} + TraceWriter() = default; + virtual ~TraceWriter() = default; virtual void AppendTraceEvent(TraceObject* trace_event) = 0; virtual void Flush() = 0; @@ -147,8 +147,8 @@ class V8_PLATFORM_EXPORT TraceBufferChunk { class V8_PLATFORM_EXPORT TraceBuffer { public: - TraceBuffer() {} - virtual ~TraceBuffer() {} + TraceBuffer() = default; + virtual ~TraceBuffer() = default; virtual TraceObject* AddTraceEvent(uint64_t* handle) = 0; virtual TraceObject* GetEventByHandle(uint64_t handle) = 0; diff --git a/deps/v8/include/v8-inspector.h b/deps/v8/include/v8-inspector.h index e06963949a5620..f0a8b5f1635adf 100644 --- a/deps/v8/include/v8-inspector.h +++ b/deps/v8/include/v8-inspector.h @@ -62,7 +62,7 @@ class V8_EXPORT StringView { class V8_EXPORT StringBuffer { public: - virtual ~StringBuffer() {} + virtual ~StringBuffer() = default; virtual const StringView& string() = 0; // This method copies contents. static std::unique_ptr create(const StringView&); @@ -107,7 +107,7 @@ class V8_EXPORT V8StackTrace { virtual StringView topScriptId() const = 0; virtual StringView topFunctionName() const = 0; - virtual ~V8StackTrace() {} + virtual ~V8StackTrace() = default; virtual std::unique_ptr buildInspectorObject() const = 0; virtual std::unique_ptr toString() const = 0; @@ -118,13 +118,13 @@ class V8_EXPORT V8StackTrace { class V8_EXPORT V8InspectorSession { public: - virtual ~V8InspectorSession() {} + virtual ~V8InspectorSession() = default; // Cross-context inspectable values (DOM nodes in different worlds, etc.). class V8_EXPORT Inspectable { public: virtual v8::Local get(v8::Local) = 0; - virtual ~Inspectable() {} + virtual ~Inspectable() = default; }; virtual void addInspectedObject(std::unique_ptr) = 0; @@ -162,7 +162,7 @@ class V8_EXPORT V8InspectorSession { class V8_EXPORT V8InspectorClient { public: - virtual ~V8InspectorClient() {} + virtual ~V8InspectorClient() = default; virtual void runMessageLoopOnPause(int contextGroupId) {} virtual void quitMessageLoopOnPause() {} @@ -239,7 +239,7 @@ struct V8_EXPORT V8StackTraceId { class V8_EXPORT V8Inspector { public: static std::unique_ptr create(v8::Isolate*, V8InspectorClient*); - virtual ~V8Inspector() {} + virtual ~V8Inspector() = default; // Contexts instrumentation. virtual void contextCreated(const V8ContextInfo&) = 0; @@ -277,7 +277,7 @@ class V8_EXPORT V8Inspector { // Connection. class V8_EXPORT Channel { public: - virtual ~Channel() {} + virtual ~Channel() = default; virtual void sendResponse(int callId, std::unique_ptr message) = 0; virtual void sendNotification(std::unique_ptr message) = 0; diff --git a/deps/v8/include/v8-internal.h b/deps/v8/include/v8-internal.h new file mode 100644 index 00000000000000..80f7367bfee3e6 --- /dev/null +++ b/deps/v8/include/v8-internal.h @@ -0,0 +1,316 @@ +// Copyright 2018 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef INCLUDE_V8_INTERNAL_H_ +#define INCLUDE_V8_INTERNAL_H_ + +#include +#include +#include + +#include "v8-version.h" // NOLINT(build/include) +#include "v8config.h" // NOLINT(build/include) + +namespace v8 { + +class Context; +class Data; +class Isolate; + +namespace internal { + +class Object; + +/** + * Configuration of tagging scheme. + */ +const int kApiPointerSize = sizeof(void*); // NOLINT +const int kApiDoubleSize = sizeof(double); // NOLINT +const int kApiIntSize = sizeof(int); // NOLINT +const int kApiInt64Size = sizeof(int64_t); // NOLINT + +// Tag information for HeapObject. +const int kHeapObjectTag = 1; +const int kWeakHeapObjectTag = 3; +const int kHeapObjectTagSize = 2; +const intptr_t kHeapObjectTagMask = (1 << kHeapObjectTagSize) - 1; + +// Tag information for Smi. +const int kSmiTag = 0; +const int kSmiTagSize = 1; +const intptr_t kSmiTagMask = (1 << kSmiTagSize) - 1; + +template +struct SmiTagging; + +template +V8_INLINE internal::Object* IntToSmi(int value) { + int smi_shift_bits = kSmiTagSize + kSmiShiftSize; + intptr_t tagged_value = + (static_cast(value) << smi_shift_bits) | kSmiTag; + return reinterpret_cast(tagged_value); +} + +// Smi constants for systems where tagged pointer is a 32-bit value. +template <> +struct SmiTagging<4> { + enum { kSmiShiftSize = 0, kSmiValueSize = 31 }; + static int SmiShiftSize() { return kSmiShiftSize; } + static int SmiValueSize() { return kSmiValueSize; } + V8_INLINE static int SmiToInt(const internal::Object* value) { + int shift_bits = kSmiTagSize + kSmiShiftSize; + // Throw away top 32 bits and shift down (requires >> to be sign extending). + return static_cast(reinterpret_cast(value)) >> shift_bits; + } + V8_INLINE static internal::Object* IntToSmi(int value) { + return internal::IntToSmi(value); + } + V8_INLINE static constexpr bool IsValidSmi(intptr_t value) { + // To be representable as an tagged small integer, the two + // most-significant bits of 'value' must be either 00 or 11 due to + // sign-extension. To check this we add 01 to the two + // most-significant bits, and check if the most-significant bit is 0 + // + // CAUTION: The original code below: + // bool result = ((value + 0x40000000) & 0x80000000) == 0; + // may lead to incorrect results according to the C language spec, and + // in fact doesn't work correctly with gcc4.1.1 in some cases: The + // compiler may produce undefined results in case of signed integer + // overflow. The computation must be done w/ unsigned ints. + return static_cast(value) + 0x40000000U < 0x80000000U; + } +}; + +// Smi constants for systems where tagged pointer is a 64-bit value. +template <> +struct SmiTagging<8> { + enum { kSmiShiftSize = 31, kSmiValueSize = 32 }; + static int SmiShiftSize() { return kSmiShiftSize; } + static int SmiValueSize() { return kSmiValueSize; } + V8_INLINE static int SmiToInt(const internal::Object* value) { + int shift_bits = kSmiTagSize + kSmiShiftSize; + // Shift down and throw away top 32 bits. + return static_cast(reinterpret_cast(value) >> shift_bits); + } + V8_INLINE static internal::Object* IntToSmi(int value) { + return internal::IntToSmi(value); + } + V8_INLINE static constexpr bool IsValidSmi(intptr_t value) { + // To be representable as a long smi, the value must be a 32-bit integer. + return (value == static_cast(value)); + } +}; + +#if V8_COMPRESS_POINTERS +static_assert( + kApiPointerSize == kApiInt64Size, + "Pointer compression can be enabled only for 64-bit architectures"); +typedef SmiTagging<4> PlatformSmiTagging; +#else +typedef SmiTagging PlatformSmiTagging; +#endif + +const int kSmiShiftSize = PlatformSmiTagging::kSmiShiftSize; +const int kSmiValueSize = PlatformSmiTagging::kSmiValueSize; +const int kSmiMinValue = (static_cast(-1)) << (kSmiValueSize - 1); +const int kSmiMaxValue = -(kSmiMinValue + 1); +constexpr bool SmiValuesAre31Bits() { return kSmiValueSize == 31; } +constexpr bool SmiValuesAre32Bits() { return kSmiValueSize == 32; } + +/** + * This class exports constants and functionality from within v8 that + * is necessary to implement inline functions in the v8 api. Don't + * depend on functions and constants defined here. + */ +class Internals { + public: + // These values match non-compiler-dependent values defined within + // the implementation of v8. + static const int kHeapObjectMapOffset = 0; + static const int kMapInstanceTypeOffset = 1 * kApiPointerSize + kApiIntSize; + static const int kStringResourceOffset = + 1 * kApiPointerSize + 2 * kApiIntSize; + + static const int kOddballKindOffset = 4 * kApiPointerSize + kApiDoubleSize; + static const int kForeignAddressOffset = kApiPointerSize; + static const int kJSObjectHeaderSize = 3 * kApiPointerSize; + static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; + static const int kContextHeaderSize = 2 * kApiPointerSize; + static const int kContextEmbedderDataIndex = 5; + static const int kFullStringRepresentationMask = 0x0f; + static const int kStringEncodingMask = 0x8; + static const int kExternalTwoByteRepresentationTag = 0x02; + static const int kExternalOneByteRepresentationTag = 0x0a; + + static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; + static const int kExternalMemoryOffset = 4 * kApiPointerSize; + static const int kExternalMemoryLimitOffset = + kExternalMemoryOffset + kApiInt64Size; + static const int kExternalMemoryAtLastMarkCompactOffset = + kExternalMemoryLimitOffset + kApiInt64Size; + static const int kIsolateRootsOffset = kExternalMemoryLimitOffset + + kApiInt64Size + kApiInt64Size + + kApiPointerSize + kApiPointerSize; + static const int kUndefinedValueRootIndex = 4; + static const int kTheHoleValueRootIndex = 5; + static const int kNullValueRootIndex = 6; + static const int kTrueValueRootIndex = 7; + static const int kFalseValueRootIndex = 8; + static const int kEmptyStringRootIndex = 9; + + static const int kNodeClassIdOffset = 1 * kApiPointerSize; + static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3; + static const int kNodeStateMask = 0x7; + static const int kNodeStateIsWeakValue = 2; + static const int kNodeStateIsPendingValue = 3; + static const int kNodeStateIsNearDeathValue = 4; + static const int kNodeIsIndependentShift = 3; + static const int kNodeIsActiveShift = 4; + + static const int kFirstNonstringType = 0x80; + static const int kOddballType = 0x83; + static const int kForeignType = 0x87; + static const int kJSSpecialApiObjectType = 0x410; + static const int kJSApiObjectType = 0x420; + static const int kJSObjectType = 0x421; + + static const int kUndefinedOddballKind = 5; + static const int kNullOddballKind = 3; + + static const uint32_t kNumIsolateDataSlots = 4; + + // Soft limit for AdjustAmountofExternalAllocatedMemory. Trigger an + // incremental GC once the external memory reaches this limit. + static constexpr int kExternalAllocationSoftLimit = 64 * 1024 * 1024; + + V8_EXPORT static void CheckInitializedImpl(v8::Isolate* isolate); + V8_INLINE static void CheckInitialized(v8::Isolate* isolate) { +#ifdef V8_ENABLE_CHECKS + CheckInitializedImpl(isolate); +#endif + } + + V8_INLINE static bool HasHeapObjectTag(const internal::Object* value) { + return ((reinterpret_cast(value) & kHeapObjectTagMask) == + kHeapObjectTag); + } + + V8_INLINE static int SmiValue(const internal::Object* value) { + return PlatformSmiTagging::SmiToInt(value); + } + + V8_INLINE static internal::Object* IntToSmi(int value) { + return PlatformSmiTagging::IntToSmi(value); + } + + V8_INLINE static constexpr bool IsValidSmi(intptr_t value) { + return PlatformSmiTagging::IsValidSmi(value); + } + + V8_INLINE static int GetInstanceType(const internal::Object* obj) { + typedef internal::Object O; + O* map = ReadField(obj, kHeapObjectMapOffset); + return ReadField(map, kMapInstanceTypeOffset); + } + + V8_INLINE static int GetOddballKind(const internal::Object* obj) { + typedef internal::Object O; + return SmiValue(ReadField(obj, kOddballKindOffset)); + } + + V8_INLINE static bool IsExternalTwoByteString(int instance_type) { + int representation = (instance_type & kFullStringRepresentationMask); + return representation == kExternalTwoByteRepresentationTag; + } + + V8_INLINE static uint8_t GetNodeFlag(internal::Object** obj, int shift) { + uint8_t* addr = reinterpret_cast(obj) + kNodeFlagsOffset; + return *addr & static_cast(1U << shift); + } + + V8_INLINE static void UpdateNodeFlag(internal::Object** obj, bool value, + int shift) { + uint8_t* addr = reinterpret_cast(obj) + kNodeFlagsOffset; + uint8_t mask = static_cast(1U << shift); + *addr = static_cast((*addr & ~mask) | (value << shift)); + } + + V8_INLINE static uint8_t GetNodeState(internal::Object** obj) { + uint8_t* addr = reinterpret_cast(obj) + kNodeFlagsOffset; + return *addr & kNodeStateMask; + } + + V8_INLINE static void UpdateNodeState(internal::Object** obj, uint8_t value) { + uint8_t* addr = reinterpret_cast(obj) + kNodeFlagsOffset; + *addr = static_cast((*addr & ~kNodeStateMask) | value); + } + + V8_INLINE static void SetEmbedderData(v8::Isolate* isolate, uint32_t slot, + void* data) { + uint8_t* addr = reinterpret_cast(isolate) + + kIsolateEmbedderDataOffset + slot * kApiPointerSize; + *reinterpret_cast(addr) = data; + } + + V8_INLINE static void* GetEmbedderData(const v8::Isolate* isolate, + uint32_t slot) { + const uint8_t* addr = reinterpret_cast(isolate) + + kIsolateEmbedderDataOffset + slot * kApiPointerSize; + return *reinterpret_cast(addr); + } + + V8_INLINE static internal::Object** GetRoot(v8::Isolate* isolate, int index) { + uint8_t* addr = reinterpret_cast(isolate) + kIsolateRootsOffset; + return reinterpret_cast(addr + index * kApiPointerSize); + } + + template + V8_INLINE static T ReadField(const internal::Object* ptr, int offset) { + const uint8_t* addr = + reinterpret_cast(ptr) + offset - kHeapObjectTag; + return *reinterpret_cast(addr); + } + + template + V8_INLINE static T ReadEmbedderData(const v8::Context* context, int index) { + typedef internal::Object O; + typedef internal::Internals I; + O* ctx = *reinterpret_cast(context); + int embedder_data_offset = + I::kContextHeaderSize + + (internal::kApiPointerSize * I::kContextEmbedderDataIndex); + O* embedder_data = I::ReadField(ctx, embedder_data_offset); + int value_offset = + I::kFixedArrayHeaderSize + (internal::kApiPointerSize * index); + return I::ReadField(embedder_data, value_offset); + } +}; + +// Only perform cast check for types derived from v8::Data since +// other types do not implement the Cast method. +template +struct CastCheck { + template + static void Perform(T* data); +}; + +template <> +template +void CastCheck::Perform(T* data) { + T::Cast(data); +} + +template <> +template +void CastCheck::Perform(T* data) {} + +template +V8_INLINE void PerformCastCheck(T* data) { + CastCheck::value>::Perform(data); +} + +} // namespace internal +} // namespace v8 + +#endif // INCLUDE_V8_INTERNAL_H_ diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h index cfeb13b65829f9..d983c30249591b 100644 --- a/deps/v8/include/v8-platform.h +++ b/deps/v8/include/v8-platform.h @@ -322,7 +322,9 @@ class Platform { * |isolate|. Tasks posted for the same isolate should be execute in order of * scheduling. The definition of "foreground" is opaque to V8. */ - virtual void CallOnForegroundThread(Isolate* isolate, Task* task) = 0; + V8_DEPRECATE_SOON( + "Use a taskrunner acquired by GetForegroundTaskRunner instead.", + virtual void CallOnForegroundThread(Isolate* isolate, Task* task)) = 0; /** * Schedules a task to be invoked on a foreground thread wrt a specific @@ -330,8 +332,10 @@ class Platform { * Tasks posted for the same isolate should be execute in order of * scheduling. The definition of "foreground" is opaque to V8. */ - virtual void CallDelayedOnForegroundThread(Isolate* isolate, Task* task, - double delay_in_seconds) = 0; + V8_DEPRECATE_SOON( + "Use a taskrunner acquired by GetForegroundTaskRunner instead.", + virtual void CallDelayedOnForegroundThread(Isolate* isolate, Task* task, + double delay_in_seconds)) = 0; /** * Schedules a task to be invoked on a foreground thread wrt a specific @@ -341,7 +345,10 @@ class Platform { * starved for an arbitrarily long time if no idle time is available. * The definition of "foreground" is opaque to V8. */ - virtual void CallIdleOnForegroundThread(Isolate* isolate, IdleTask* task) { + V8_DEPRECATE_SOON( + "Use a taskrunner acquired by GetForegroundTaskRunner instead.", + virtual void CallIdleOnForegroundThread(Isolate* isolate, + IdleTask* task)) { // This must be overriden if |IdleTasksEnabled()|. abort(); } diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h index 3689a122725f89..c034518defdd96 100644 --- a/deps/v8/include/v8-profiler.h +++ b/deps/v8/include/v8-profiler.h @@ -341,12 +341,6 @@ class V8_EXPORT CpuProfiler { V8_DEPRECATED("Use Isolate::SetIdle(bool) instead.", void SetIdle(bool is_idle)); - /** - * Generate more detailed source positions to code objects. This results in - * better results when mapping profiling samples to script source. - */ - static void UseDetailedSourcePositionsForProfiling(Isolate* isolate); - private: CpuProfiler(); ~CpuProfiler(); @@ -451,7 +445,7 @@ class V8_EXPORT OutputStream { // NOLINT kContinue = 0, kAbort = 1 }; - virtual ~OutputStream() {} + virtual ~OutputStream() = default; /** Notify about the end of stream. */ virtual void EndOfStream() = 0; /** Get preferred output chunk size. Called only once. */ @@ -545,7 +539,7 @@ class V8_EXPORT ActivityControl { // NOLINT kContinue = 0, kAbort = 1 }; - virtual ~ActivityControl() {} + virtual ~ActivityControl() = default; /** * Notify about current progress. The activity can be stopped by * returning kAbort as the callback result. @@ -631,7 +625,7 @@ class V8_EXPORT AllocationProfile { */ virtual Node* GetRootNode() = 0; - virtual ~AllocationProfile() {} + virtual ~AllocationProfile() = default; static const int kNoLineNumberInfo = Message::kNoLineNumberInfo; static const int kNoColumnNumberInfo = Message::kNoColumnInfo; @@ -799,15 +793,15 @@ class V8_EXPORT HeapProfiler { virtual const char* GetName(Local object) = 0; protected: - virtual ~ObjectNameResolver() {} + virtual ~ObjectNameResolver() = default; }; /** * Takes a heap snapshot and returns it. */ const HeapSnapshot* TakeHeapSnapshot( - ActivityControl* control = NULL, - ObjectNameResolver* global_object_name_resolver = NULL); + ActivityControl* control = nullptr, + ObjectNameResolver* global_object_name_resolver = nullptr); /** * Starts tracking of heap objects population statistics. After calling @@ -834,7 +828,7 @@ class V8_EXPORT HeapProfiler { * method. */ SnapshotObjectId GetHeapStats(OutputStream* stream, - int64_t* timestamp_us = NULL); + int64_t* timestamp_us = nullptr); /** * Stops tracking of heap objects population statistics, cleans up all @@ -991,8 +985,8 @@ class V8_EXPORT RetainedObjectInfo { // NOLINT virtual intptr_t GetSizeInBytes() { return -1; } protected: - RetainedObjectInfo() {} - virtual ~RetainedObjectInfo() {} + RetainedObjectInfo() = default; + virtual ~RetainedObjectInfo() = default; private: RetainedObjectInfo(const RetainedObjectInfo&); diff --git a/deps/v8/include/v8-util.h b/deps/v8/include/v8-util.h index a3069651222ee0..96c9acbbdc2b29 100644 --- a/deps/v8/include/v8-util.h +++ b/deps/v8/include/v8-util.h @@ -94,11 +94,11 @@ class DefaultPersistentValueMapTraits : public StdMapTraits { static WeakCallbackDataType* WeakCallbackParameter( MapType* map, const K& key, Local value) { - return NULL; + return nullptr; } static MapType* MapFromWeakCallbackInfo( const WeakCallbackInfo& data) { - return NULL; + return nullptr; } static K KeyFromWeakCallbackInfo( const WeakCallbackInfo& data) { @@ -302,7 +302,7 @@ class PersistentValueMapBase { static PersistentContainerValue ClearAndLeak(Global* persistent) { V* v = persistent->val_; - persistent->val_ = 0; + persistent->val_ = nullptr; return reinterpret_cast(v); } @@ -633,7 +633,7 @@ class PersistentValueVector { private: static PersistentContainerValue ClearAndLeak(Global* persistent) { V* v = persistent->val_; - persistent->val_ = 0; + persistent->val_ = nullptr; return reinterpret_cast(v); } diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 63dc5e7a7bab0f..8624767047c2f1 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 7 -#define V8_MINOR_VERSION 0 -#define V8_BUILD_NUMBER 276 -#define V8_PATCH_LEVEL 38 +#define V8_MINOR_VERSION 1 +#define V8_BUILD_NUMBER 302 +#define V8_PATCH_LEVEL 28 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index e1951ec270597d..a4bbe1b0c43d66 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -22,42 +22,13 @@ #include #include -#include "v8-version.h" // NOLINT(build/include) -#include "v8config.h" // NOLINT(build/include) +#include "v8-internal.h" // NOLINT(build/include) +#include "v8-version.h" // NOLINT(build/include) +#include "v8config.h" // NOLINT(build/include) // We reserve the V8_* prefix for macros defined in V8 public API and // assume there are no name conflicts with the embedder's code. -#ifdef V8_OS_WIN - -// Setup for Windows DLL export/import. When building the V8 DLL the -// BUILDING_V8_SHARED needs to be defined. When building a program which uses -// the V8 DLL USING_V8_SHARED needs to be defined. When either building the V8 -// static library or building a program which uses the V8 static library neither -// BUILDING_V8_SHARED nor USING_V8_SHARED should be defined. -#ifdef BUILDING_V8_SHARED -# define V8_EXPORT __declspec(dllexport) -#elif USING_V8_SHARED -# define V8_EXPORT __declspec(dllimport) -#else -# define V8_EXPORT -#endif // BUILDING_V8_SHARED - -#else // V8_OS_WIN - -// Setup for Linux shared library export. -#if V8_HAS_ATTRIBUTE_VISIBILITY -# ifdef BUILDING_V8_SHARED -# define V8_EXPORT __attribute__ ((visibility("default"))) -# else -# define V8_EXPORT -# endif -#else -# define V8_EXPORT -#endif - -#endif // V8_OS_WIN - /** * The v8 JavaScript engine. */ @@ -153,108 +124,13 @@ template class CustomArguments; class PropertyCallbackArguments; class FunctionCallbackArguments; class GlobalHandles; +class ScopedExternalStringLock; namespace wasm { class NativeModule; class StreamingDecoder; } // namespace wasm -/** - * Configuration of tagging scheme. - */ -const int kApiPointerSize = sizeof(void*); // NOLINT -const int kApiDoubleSize = sizeof(double); // NOLINT -const int kApiIntSize = sizeof(int); // NOLINT -const int kApiInt64Size = sizeof(int64_t); // NOLINT - -// Tag information for HeapObject. -const int kHeapObjectTag = 1; -const int kWeakHeapObjectTag = 3; -const int kHeapObjectTagSize = 2; -const intptr_t kHeapObjectTagMask = (1 << kHeapObjectTagSize) - 1; - -// Tag information for Smi. -const int kSmiTag = 0; -const int kSmiTagSize = 1; -const intptr_t kSmiTagMask = (1 << kSmiTagSize) - 1; - -template -struct SmiTagging; - -template -V8_INLINE internal::Object* IntToSmi(int value) { - int smi_shift_bits = kSmiTagSize + kSmiShiftSize; - intptr_t tagged_value = - (static_cast(value) << smi_shift_bits) | kSmiTag; - return reinterpret_cast(tagged_value); -} - -// Smi constants for systems where tagged pointer is a 32-bit value. -template <> -struct SmiTagging<4> { - enum { kSmiShiftSize = 0, kSmiValueSize = 31 }; - static int SmiShiftSize() { return kSmiShiftSize; } - static int SmiValueSize() { return kSmiValueSize; } - V8_INLINE static int SmiToInt(const internal::Object* value) { - int shift_bits = kSmiTagSize + kSmiShiftSize; - // Throw away top 32 bits and shift down (requires >> to be sign extending). - return static_cast(reinterpret_cast(value)) >> shift_bits; - } - V8_INLINE static internal::Object* IntToSmi(int value) { - return internal::IntToSmi(value); - } - V8_INLINE static constexpr bool IsValidSmi(intptr_t value) { - // To be representable as an tagged small integer, the two - // most-significant bits of 'value' must be either 00 or 11 due to - // sign-extension. To check this we add 01 to the two - // most-significant bits, and check if the most-significant bit is 0 - // - // CAUTION: The original code below: - // bool result = ((value + 0x40000000) & 0x80000000) == 0; - // may lead to incorrect results according to the C language spec, and - // in fact doesn't work correctly with gcc4.1.1 in some cases: The - // compiler may produce undefined results in case of signed integer - // overflow. The computation must be done w/ unsigned ints. - return static_cast(value) + 0x40000000U < 0x80000000U; - } -}; - -// Smi constants for systems where tagged pointer is a 64-bit value. -template <> -struct SmiTagging<8> { - enum { kSmiShiftSize = 31, kSmiValueSize = 32 }; - static int SmiShiftSize() { return kSmiShiftSize; } - static int SmiValueSize() { return kSmiValueSize; } - V8_INLINE static int SmiToInt(const internal::Object* value) { - int shift_bits = kSmiTagSize + kSmiShiftSize; - // Shift down and throw away top 32 bits. - return static_cast(reinterpret_cast(value) >> shift_bits); - } - V8_INLINE static internal::Object* IntToSmi(int value) { - return internal::IntToSmi(value); - } - V8_INLINE static constexpr bool IsValidSmi(intptr_t value) { - // To be representable as a long smi, the value must be a 32-bit integer. - return (value == static_cast(value)); - } -}; - -#if V8_COMPRESS_POINTERS -static_assert( - kApiPointerSize == kApiInt64Size, - "Pointer compression can be enabled only for 64-bit architectures"); -typedef SmiTagging<4> PlatformSmiTagging; -#else -typedef SmiTagging PlatformSmiTagging; -#endif - -const int kSmiShiftSize = PlatformSmiTagging::kSmiShiftSize; -const int kSmiValueSize = PlatformSmiTagging::kSmiValueSize; -const int kSmiMinValue = (static_cast(-1)) << (kSmiValueSize - 1); -const int kSmiMaxValue = -(kSmiMinValue + 1); -constexpr bool SmiValuesAre31Bits() { return kSmiValueSize == 31; } -constexpr bool SmiValuesAre32Bits() { return kSmiValueSize == 32; } - } // namespace internal namespace debug { @@ -302,7 +178,7 @@ class ConsoleCallArguments; template class Local { public: - V8_INLINE Local() : val_(0) {} + V8_INLINE Local() : val_(nullptr) {} template V8_INLINE Local(Local that) : val_(reinterpret_cast(*that)) { @@ -317,12 +193,12 @@ class Local { /** * Returns true if the handle is empty. */ - V8_INLINE bool IsEmpty() const { return val_ == 0; } + V8_INLINE bool IsEmpty() const { return val_ == nullptr; } /** * Sets the handle to be empty. IsEmpty() will then return true. */ - V8_INLINE void Clear() { val_ = 0; } + V8_INLINE void Clear() { val_ = nullptr; } V8_INLINE T* operator->() const { return val_; } @@ -338,8 +214,8 @@ class Local { V8_INLINE bool operator==(const Local& that) const { internal::Object** a = reinterpret_cast(this->val_); internal::Object** b = reinterpret_cast(that.val_); - if (a == 0) return b == 0; - if (b == 0) return false; + if (a == nullptr) return b == nullptr; + if (b == nullptr) return false; return *a == *b; } @@ -347,8 +223,8 @@ class Local { const PersistentBase& that) const { internal::Object** a = reinterpret_cast(this->val_); internal::Object** b = reinterpret_cast(that.val_); - if (a == 0) return b == 0; - if (b == 0) return false; + if (a == nullptr) return b == nullptr; + if (b == nullptr) return false; return *a == *b; } @@ -592,7 +468,7 @@ template class PersistentBase { template V8_INLINE void Reset(Isolate* isolate, const PersistentBase& other); - V8_INLINE bool IsEmpty() const { return val_ == NULL; } + V8_INLINE bool IsEmpty() const { return val_ == nullptr; } V8_INLINE void Empty() { val_ = 0; } V8_INLINE Local Get(Isolate* isolate) const { @@ -603,8 +479,8 @@ template class PersistentBase { V8_INLINE bool operator==(const PersistentBase& that) const { internal::Object** a = reinterpret_cast(this->val_); internal::Object** b = reinterpret_cast(that.val_); - if (a == NULL) return b == NULL; - if (b == NULL) return false; + if (a == nullptr) return b == nullptr; + if (b == nullptr) return false; return *a == *b; } @@ -612,8 +488,8 @@ template class PersistentBase { V8_INLINE bool operator==(const Local& that) const { internal::Object** a = reinterpret_cast(this->val_); internal::Object** b = reinterpret_cast(that.val_); - if (a == NULL) return b == NULL; - if (b == NULL) return false; + if (a == nullptr) return b == nullptr; + if (b == nullptr) return false; return *a == *b; } @@ -786,7 +662,7 @@ template class Persistent : public PersistentBase { /** * A Persistent with no storage cell. */ - V8_INLINE Persistent() : PersistentBase(0) { } + V8_INLINE Persistent() : PersistentBase(nullptr) {} /** * Construct a Persistent from a Local. * When the Local is non-empty, a new storage cell is created @@ -813,7 +689,7 @@ template class Persistent : public PersistentBase { * traits class is called, allowing the setting of flags based on the * copied Persistent. */ - V8_INLINE Persistent(const Persistent& that) : PersistentBase(0) { + V8_INLINE Persistent(const Persistent& that) : PersistentBase(nullptr) { Copy(that); } template @@ -979,7 +855,7 @@ class V8_EXPORT HandleScope { void operator=(const HandleScope&) = delete; protected: - V8_INLINE HandleScope() {} + V8_INLINE HandleScope() = default; void Initialize(Isolate* isolate); @@ -1019,7 +895,7 @@ class V8_EXPORT HandleScope { class V8_EXPORT EscapableHandleScope : public HandleScope { public: explicit EscapableHandleScope(Isolate* isolate); - V8_INLINE ~EscapableHandleScope() {} + V8_INLINE ~EscapableHandleScope() = default; /** * Pushes the value into the previous scope and returns a handle to it. @@ -1123,10 +999,6 @@ class V8_EXPORT PrimitiveArray { public: static Local New(Isolate* isolate, int length); int Length() const; - V8_DEPRECATED("Use Isolate* version", - void Set(int index, Local item)); - V8_DEPRECATED("Use Isolate* version", - Local Get(int index)); void Set(Isolate* isolate, int index, Local item); Local Get(Isolate* isolate, int index); }; @@ -1393,7 +1265,7 @@ class V8_EXPORT ScriptCompiler { }; CachedData() - : data(NULL), + : data(nullptr), length(0), rejected(false), buffer_policy(BufferNotOwned) {} @@ -1424,9 +1296,9 @@ class V8_EXPORT ScriptCompiler { public: // Source takes ownership of CachedData. V8_INLINE Source(Local source_string, const ScriptOrigin& origin, - CachedData* cached_data = NULL); + CachedData* cached_data = nullptr); V8_INLINE Source(Local source_string, - CachedData* cached_data = NULL); + CachedData* cached_data = nullptr); V8_INLINE ~Source(); // Ownership of the CachedData or its buffers is *not* transferred to the @@ -1465,7 +1337,7 @@ class V8_EXPORT ScriptCompiler { */ class V8_EXPORT ExternalSourceStream { public: - virtual ~ExternalSourceStream() {} + virtual ~ExternalSourceStream() = default; /** * V8 calls this to request the next chunk of data from the embedder. This @@ -1508,12 +1380,11 @@ class V8_EXPORT ScriptCompiler { virtual void ResetToBookmark(); }; - /** * Source code which can be streamed into V8 in pieces. It will be parsed - * while streaming. It can be compiled after the streaming is complete. - * StreamedSource must be kept alive while the streaming task is ran (see - * ScriptStreamingTask below). + * while streaming and compiled after parsing has completed. StreamedSource + * must be kept alive while the streaming task is run (see ScriptStreamingTask + * below). */ class V8_EXPORT StreamedSource { public: @@ -1522,29 +1393,35 @@ class V8_EXPORT ScriptCompiler { StreamedSource(ExternalSourceStream* source_stream, Encoding encoding); ~StreamedSource(); - // Ownership of the CachedData or its buffers is *not* transferred to the - // caller. The CachedData object is alive as long as the StreamedSource - // object is alive. - const CachedData* GetCachedData() const; + V8_DEPRECATED("No longer used", const CachedData* GetCachedData() const) { + return nullptr; + } - internal::ScriptStreamingData* impl() const { return impl_; } + internal::ScriptStreamingData* impl() const { return impl_.get(); } // Prevent copying. StreamedSource(const StreamedSource&) = delete; StreamedSource& operator=(const StreamedSource&) = delete; private: - internal::ScriptStreamingData* impl_; + std::unique_ptr impl_; }; /** * A streaming task which the embedder must run on a background thread to * stream scripts into V8. Returned by ScriptCompiler::StartStreamingScript. */ - class ScriptStreamingTask { + class V8_EXPORT ScriptStreamingTask final { public: - virtual ~ScriptStreamingTask() {} - virtual void Run() = 0; + void Run(); + + private: + friend class ScriptCompiler; + + explicit ScriptStreamingTask(internal::ScriptStreamingData* data) + : data_(data) {} + + internal::ScriptStreamingData* data_; }; enum CompileOptions { @@ -1833,8 +1710,6 @@ class V8_EXPORT StackTrace { /** * Returns a StackFrame at a particular index. */ - V8_DEPRECATED("Use Isolate version", - Local GetFrame(uint32_t index) const); Local GetFrame(Isolate* isolate, uint32_t index) const; /** @@ -1951,6 +1826,11 @@ struct SampleInfo { // executing an external callback. }; +struct MemoryRange { + const void* start; + size_t length_in_bytes; +}; + /** * A JSON Parser and Stringifier. */ @@ -1993,7 +1873,7 @@ class V8_EXPORT ValueSerializer { public: class V8_EXPORT Delegate { public: - virtual ~Delegate() {} + virtual ~Delegate() = default; /** * Handles the case where a DataCloneError would be thrown in the structured @@ -2130,7 +2010,7 @@ class V8_EXPORT ValueDeserializer { public: class V8_EXPORT Delegate { public: - virtual ~Delegate() {} + virtual ~Delegate() = default; /** * The embedder overrides this method to read some kind of host object, if @@ -2514,8 +2394,9 @@ class V8_EXPORT Value : public Data { V8_WARN_UNUSED_RESULT MaybeLocal ToBigInt( Local context) const; - V8_WARN_UNUSED_RESULT MaybeLocal ToBoolean( - Local context) const; + V8_DEPRECATE_SOON("ToBoolean can never throw. Use Local version.", + V8_WARN_UNUSED_RESULT MaybeLocal ToBoolean( + Local context) const); V8_WARN_UNUSED_RESULT MaybeLocal ToNumber( Local context) const; V8_WARN_UNUSED_RESULT MaybeLocal ToString( @@ -2530,25 +2411,17 @@ class V8_EXPORT Value : public Data { Local context) const; V8_WARN_UNUSED_RESULT MaybeLocal ToInt32(Local context) const; - V8_DEPRECATED("Use maybe version", - Local ToBoolean(Isolate* isolate) const); - V8_DEPRECATED("Use maybe version", - Local ToNumber(Isolate* isolate) const); - V8_DEPRECATED("Use maybe version", - Local ToString(Isolate* isolate) const); - V8_DEPRECATED("Use maybe version", - Local ToObject(Isolate* isolate) const); - V8_DEPRECATED("Use maybe version", - Local ToInteger(Isolate* isolate) const); - V8_DEPRECATED("Use maybe version", - Local ToInt32(Isolate* isolate) const); - - inline V8_DEPRECATED("Use maybe version", - Local ToBoolean() const); - inline V8_DEPRECATED("Use maybe version", Local ToString() const); - inline V8_DEPRECATED("Use maybe version", Local ToObject() const); - inline V8_DEPRECATED("Use maybe version", - Local ToInteger() const); + Local ToBoolean(Isolate* isolate) const; + V8_DEPRECATE_SOON("Use maybe version", + Local ToNumber(Isolate* isolate) const); + V8_DEPRECATE_SOON("Use maybe version", + Local ToString(Isolate* isolate) const); + V8_DEPRECATE_SOON("Use maybe version", + Local ToObject(Isolate* isolate) const); + V8_DEPRECATE_SOON("Use maybe version", + Local ToInteger(Isolate* isolate) const); + V8_DEPRECATE_SOON("Use maybe version", + Local ToInt32(Isolate* isolate) const); /** * Attempts to convert a string to an array index. @@ -2557,7 +2430,11 @@ class V8_EXPORT Value : public Data { V8_WARN_UNUSED_RESULT MaybeLocal ToArrayIndex( Local context) const; - V8_WARN_UNUSED_RESULT Maybe BooleanValue(Local context) const; + bool BooleanValue(Isolate* isolate) const; + + V8_DEPRECATE_SOON("BooleanValue can never throw. Use Isolate version.", + V8_WARN_UNUSED_RESULT Maybe BooleanValue( + Local context) const); V8_WARN_UNUSED_RESULT Maybe NumberValue(Local context) const; V8_WARN_UNUSED_RESULT Maybe IntegerValue( Local context) const; @@ -2565,14 +2442,7 @@ class V8_EXPORT Value : public Data { Local context) const; V8_WARN_UNUSED_RESULT Maybe Int32Value(Local context) const; - V8_DEPRECATED("Use maybe version", bool BooleanValue() const); - V8_DEPRECATED("Use maybe version", double NumberValue() const); - V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const); - V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const); - V8_DEPRECATED("Use maybe version", int32_t Int32Value() const); - /** JS == */ - V8_DEPRECATED("Use maybe version", bool Equals(Local that) const); V8_WARN_UNUSED_RESULT Maybe Equals(Local context, Local that) const; bool StrictEquals(Local that) const; @@ -2679,8 +2549,6 @@ class V8_EXPORT String : public Name { * Returns the number of bytes in the UTF-8 encoded * representation of this string. */ - V8_DEPRECATED("Use Isolate version instead", int Utf8Length() const); - int Utf8Length(Isolate* isolate) const; /** @@ -2737,23 +2605,12 @@ class V8_EXPORT String : public Name { // 16-bit character codes. int Write(Isolate* isolate, uint16_t* buffer, int start = 0, int length = -1, int options = NO_OPTIONS) const; - V8_DEPRECATED("Use Isolate* version", - int Write(uint16_t* buffer, int start = 0, int length = -1, - int options = NO_OPTIONS) const); // One byte characters. int WriteOneByte(Isolate* isolate, uint8_t* buffer, int start = 0, int length = -1, int options = NO_OPTIONS) const; - V8_DEPRECATED("Use Isolate* version", - int WriteOneByte(uint8_t* buffer, int start = 0, - int length = -1, int options = NO_OPTIONS) - const); // UTF-8 encoded characters. int WriteUtf8(Isolate* isolate, char* buffer, int length = -1, - int* nchars_ref = NULL, int options = NO_OPTIONS) const; - V8_DEPRECATED("Use Isolate* version", - int WriteUtf8(char* buffer, int length = -1, - int* nchars_ref = NULL, - int options = NO_OPTIONS) const); + int* nchars_ref = nullptr, int options = NO_OPTIONS) const; /** * A zero length string. @@ -2772,12 +2629,31 @@ class V8_EXPORT String : public Name { class V8_EXPORT ExternalStringResourceBase { // NOLINT public: - virtual ~ExternalStringResourceBase() {} + virtual ~ExternalStringResourceBase() = default; - virtual bool IsCompressible() const { return false; } + V8_DEPRECATE_SOON("Use IsCacheable().", + virtual bool IsCompressible() const) { + return false; + } + + /** + * If a string is cacheable, the value returned by + * ExternalStringResource::data() may be cached, otherwise it is not + * expected to be stable beyond the current top-level task. + */ + virtual bool IsCacheable() const { +#if __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif + return !IsCompressible(); +#if __clang__ +#pragma clang diagnostic pop +#endif + } protected: - ExternalStringResourceBase() {} + ExternalStringResourceBase() = default; /** * Internally V8 will call this Dispose method when the external string @@ -2787,6 +2663,24 @@ class V8_EXPORT String : public Name { */ virtual void Dispose() { delete this; } + /** + * For a non-cacheable string, the value returned by + * |ExternalStringResource::data()| has to be stable between |Lock()| and + * |Unlock()|, that is the string must behave as is |IsCacheable()| returned + * true. + * + * These two functions must be thread-safe, and can be called from anywhere. + * They also must handle lock depth, in the sense that each can be called + * several times, from different threads, and unlocking should only happen + * when the balance of Lock() and Unlock() calls is 0. + */ + virtual void Lock() const {} + + /** + * Unlocks the string. + */ + virtual void Unlock() const {} + // Disallow copying and assigning. ExternalStringResourceBase(const ExternalStringResourceBase&) = delete; void operator=(const ExternalStringResourceBase&) = delete; @@ -2794,6 +2688,7 @@ class V8_EXPORT String : public Name { private: friend class internal::Heap; friend class v8::String; + friend class internal::ScopedExternalStringLock; }; /** @@ -2809,7 +2704,7 @@ class V8_EXPORT String : public Name { * Override the destructor to manage the life cycle of the underlying * buffer. */ - virtual ~ExternalStringResource() {} + ~ExternalStringResource() override = default; /** * The string data from the underlying buffer. @@ -2822,7 +2717,7 @@ class V8_EXPORT String : public Name { virtual size_t length() const = 0; protected: - ExternalStringResource() {} + ExternalStringResource() = default; }; /** @@ -2842,13 +2737,13 @@ class V8_EXPORT String : public Name { * Override the destructor to manage the life cycle of the underlying * buffer. */ - virtual ~ExternalOneByteStringResource() {} + ~ExternalOneByteStringResource() override = default; /** The string data from the underlying buffer.*/ virtual const char* data() const = 0; /** The number of Latin-1 characters in the string.*/ virtual size_t length() const = 0; protected: - ExternalOneByteStringResource() {} + ExternalOneByteStringResource() = default; }; /** @@ -2917,9 +2812,6 @@ class V8_EXPORT String : public Name { */ static Local Concat(Isolate* isolate, Local left, Local right); - static V8_DEPRECATED("Use Isolate* version", - Local Concat(Local left, - Local right)); /** * Creates a new external string using the data defined in the given @@ -2988,8 +2880,6 @@ class V8_EXPORT String : public Name { */ class V8_EXPORT Utf8Value { public: - V8_DEPRECATED("Use Isolate version", - explicit Utf8Value(Local obj)); Utf8Value(Isolate* isolate, Local obj); ~Utf8Value(); char* operator*() { return str_; } @@ -3013,7 +2903,6 @@ class V8_EXPORT String : public Name { */ class V8_EXPORT Value { public: - V8_DEPRECATED("Use Isolate version", explicit Value(Local obj)); Value(Isolate* isolate, Local obj); ~Value(); uint16_t* operator*() { return str_; } @@ -3075,6 +2964,7 @@ class V8_EXPORT Symbol : public Name { static Local ForApi(Isolate *isolate, Local name); // Well-known symbols + static Local GetAsyncIterator(Isolate* isolate); static Local GetHasInstance(Isolate* isolate); static Local GetIsConcatSpreadable(Isolate* isolate); static Local GetIterator(Isolate* isolate); @@ -3312,10 +3202,17 @@ enum PropertyFilter { * Options for marking whether callbacks may trigger JS-observable side effects. * Side-effect-free callbacks are whitelisted during debug evaluation with * throwOnSideEffect. It applies when calling a Function, FunctionTemplate, - * or an Accessor's getter callback. For Interceptors, please see + * or an Accessor callback. For Interceptors, please see * PropertyHandlerFlags's kHasNoSideEffect. + * Callbacks that only cause side effects to the receiver are whitelisted if + * invoked on receiver objects that are created within the same debug-evaluate + * call, as these objects are temporary and the side effect does not escape. */ -enum class SideEffectType { kHasSideEffect, kHasNoSideEffect }; +enum class SideEffectType { + kHasSideEffect, + kHasNoSideEffect, + kHasSideEffectToReceiver +}; /** * Keys/Properties filter enums: @@ -3439,7 +3336,7 @@ class V8_EXPORT Object : public Value { V8_WARN_UNUSED_RESULT Maybe Has(Local context, Local key); - V8_DEPRECATED("Use maybe version", bool Delete(Local key)); + V8_DEPRECATE_SOON("Use maybe version", bool Delete(Local key)); V8_WARN_UNUSED_RESULT Maybe Delete(Local context, Local key); @@ -3453,10 +3350,12 @@ class V8_EXPORT Object : public Value { */ V8_WARN_UNUSED_RESULT Maybe SetAccessor( Local context, Local name, - AccessorNameGetterCallback getter, AccessorNameSetterCallback setter = 0, + AccessorNameGetterCallback getter, + AccessorNameSetterCallback setter = nullptr, MaybeLocal data = MaybeLocal(), AccessControl settings = DEFAULT, PropertyAttribute attribute = None, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect); + SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, + SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); void SetAccessorProperty(Local name, Local getter, Local setter = Local(), @@ -3472,7 +3371,8 @@ class V8_EXPORT Object : public Value { AccessorNameGetterCallback getter, AccessorNameSetterCallback setter = nullptr, Local data = Local(), PropertyAttribute attributes = None, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect); + SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, + SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); /** * Attempts to create a property with the given name which behaves like a data @@ -3486,7 +3386,8 @@ class V8_EXPORT Object : public Value { Local context, Local name, AccessorNameGetterCallback getter, Local data = Local(), PropertyAttribute attributes = None, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect); + SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, + SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); /** * Functionality for private properties. @@ -3779,12 +3680,6 @@ class V8_EXPORT Array : public Object { */ static Local New(Isolate* isolate, int length = 0); - /** - * Creates a JavaScript array out of a Local array in C++ - * with a known length. - */ - static Local New(Isolate* isolate, Local* elements, - size_t length); V8_INLINE static Array* Cast(Value* obj); private: Array(); @@ -4518,7 +4413,7 @@ class V8_EXPORT WasmModuleObjectBuilderStreaming final { void Abort(MaybeLocal exception); Local GetPromise(); - ~WasmModuleObjectBuilderStreaming(); + ~WasmModuleObjectBuilderStreaming() = default; private: WasmModuleObjectBuilderStreaming(const WasmModuleObjectBuilderStreaming&) = @@ -4577,7 +4472,7 @@ class V8_EXPORT ArrayBuffer : public Object { */ class V8_EXPORT Allocator { // NOLINT public: - virtual ~Allocator() {} + virtual ~Allocator() = default; /** * Allocate |length| bytes. Return NULL if allocation is not successful. @@ -5238,8 +5133,6 @@ class V8_EXPORT BooleanObject : public Object { class V8_EXPORT StringObject : public Object { public: static Local New(Isolate* isolate, Local value); - V8_DEPRECATED("Use Isolate* version", - static Local New(Local value)); Local ValueOf() const; @@ -5400,20 +5293,22 @@ class V8_EXPORT Template : public Data { */ void SetNativeDataProperty( Local name, AccessorGetterCallback getter, - AccessorSetterCallback setter = 0, + AccessorSetterCallback setter = nullptr, // TODO(dcarney): gcc can't handle Local below Local data = Local(), PropertyAttribute attribute = None, Local signature = Local(), AccessControl settings = DEFAULT, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect); + SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, + SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); void SetNativeDataProperty( Local name, AccessorNameGetterCallback getter, - AccessorNameSetterCallback setter = 0, + AccessorNameSetterCallback setter = nullptr, // TODO(dcarney): gcc can't handle Local below Local data = Local(), PropertyAttribute attribute = None, Local signature = Local(), AccessControl settings = DEFAULT, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect); + SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, + SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); /** * Like SetNativeDataProperty, but V8 will replace the native data property @@ -5422,7 +5317,8 @@ class V8_EXPORT Template : public Data { void SetLazyDataProperty( Local name, AccessorNameGetterCallback getter, Local data = Local(), PropertyAttribute attribute = None, - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect); + SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, + SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); /** * During template instantiation, sets the value with the intrinsic property @@ -5783,7 +5679,7 @@ class V8_EXPORT FunctionTemplate : public Template { public: /** Creates a function template.*/ static Local New( - Isolate* isolate, FunctionCallback callback = 0, + Isolate* isolate, FunctionCallback callback = nullptr, Local data = Local(), Local signature = Local(), int length = 0, ConstructorBehavior behavior = ConstructorBehavior::kAllow, @@ -5964,11 +5860,11 @@ struct NamedPropertyHandlerConfiguration { NamedPropertyHandlerConfiguration( /** Note: getter is required */ - GenericNamedPropertyGetterCallback getter = 0, - GenericNamedPropertySetterCallback setter = 0, - GenericNamedPropertyQueryCallback query = 0, - GenericNamedPropertyDeleterCallback deleter = 0, - GenericNamedPropertyEnumeratorCallback enumerator = 0, + GenericNamedPropertyGetterCallback getter = nullptr, + GenericNamedPropertySetterCallback setter = nullptr, + GenericNamedPropertyQueryCallback query = nullptr, + GenericNamedPropertyDeleterCallback deleter = nullptr, + GenericNamedPropertyEnumeratorCallback enumerator = nullptr, Local data = Local(), PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) : getter(getter), @@ -5976,8 +5872,8 @@ struct NamedPropertyHandlerConfiguration { query(query), deleter(deleter), enumerator(enumerator), - definer(0), - descriptor(0), + definer(nullptr), + descriptor(nullptr), data(data), flags(flags) {} @@ -5992,7 +5888,7 @@ struct NamedPropertyHandlerConfiguration { PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) : getter(getter), setter(setter), - query(0), + query(nullptr), deleter(deleter), enumerator(enumerator), definer(definer), @@ -6034,11 +5930,11 @@ struct IndexedPropertyHandlerConfiguration { IndexedPropertyHandlerConfiguration( /** Note: getter is required */ - IndexedPropertyGetterCallback getter = 0, - IndexedPropertySetterCallback setter = 0, - IndexedPropertyQueryCallback query = 0, - IndexedPropertyDeleterCallback deleter = 0, - IndexedPropertyEnumeratorCallback enumerator = 0, + IndexedPropertyGetterCallback getter = nullptr, + IndexedPropertySetterCallback setter = nullptr, + IndexedPropertyQueryCallback query = nullptr, + IndexedPropertyDeleterCallback deleter = nullptr, + IndexedPropertyEnumeratorCallback enumerator = nullptr, Local data = Local(), PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) : getter(getter), @@ -6046,8 +5942,8 @@ struct IndexedPropertyHandlerConfiguration { query(query), deleter(deleter), enumerator(enumerator), - definer(0), - descriptor(0), + definer(nullptr), + descriptor(nullptr), data(data), flags(flags) {} @@ -6062,7 +5958,7 @@ struct IndexedPropertyHandlerConfiguration { PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) : getter(getter), setter(setter), - query(0), + query(nullptr), deleter(deleter), enumerator(enumerator), definer(definer), @@ -6134,16 +6030,20 @@ class V8_EXPORT ObjectTemplate : public Template { */ void SetAccessor( Local name, AccessorGetterCallback getter, - AccessorSetterCallback setter = 0, Local data = Local(), - AccessControl settings = DEFAULT, PropertyAttribute attribute = None, + AccessorSetterCallback setter = nullptr, + Local data = Local(), AccessControl settings = DEFAULT, + PropertyAttribute attribute = None, Local signature = Local(), - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect); + SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, + SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); void SetAccessor( Local name, AccessorNameGetterCallback getter, - AccessorNameSetterCallback setter = 0, Local data = Local(), - AccessControl settings = DEFAULT, PropertyAttribute attribute = None, + AccessorNameSetterCallback setter = nullptr, + Local data = Local(), AccessControl settings = DEFAULT, + PropertyAttribute attribute = None, Local signature = Local(), - SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect); + SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, + SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect); /** * Sets a named property handler on the object template. @@ -6177,10 +6077,10 @@ class V8_EXPORT ObjectTemplate : public Template { // TODO(dcarney): deprecate void SetIndexedPropertyHandler( IndexedPropertyGetterCallback getter, - IndexedPropertySetterCallback setter = 0, - IndexedPropertyQueryCallback query = 0, - IndexedPropertyDeleterCallback deleter = 0, - IndexedPropertyEnumeratorCallback enumerator = 0, + IndexedPropertySetterCallback setter = nullptr, + IndexedPropertyQueryCallback query = nullptr, + IndexedPropertyDeleterCallback deleter = nullptr, + IndexedPropertyEnumeratorCallback enumerator = nullptr, Local data = Local()) { SetHandler(IndexedPropertyHandlerConfiguration(getter, setter, query, deleter, enumerator, data)); @@ -6320,11 +6220,11 @@ V8_DEPRECATE_SOON("Implementation detail", class) V8_EXPORT ExternalOneByteStringResourceImpl : public String::ExternalOneByteStringResource { public: - ExternalOneByteStringResourceImpl() : data_(0), length_(0) {} + ExternalOneByteStringResourceImpl() : data_(nullptr), length_(0) {} ExternalOneByteStringResourceImpl(const char* data, size_t length) : data_(data), length_(length) {} - const char* data() const { return data_; } - size_t length() const { return length_; } + const char* data() const override { return data_; } + size_t length() const override { return length_; } private: const char* data_; @@ -6338,11 +6238,8 @@ class V8_EXPORT Extension { // NOLINT public: // Note that the strings passed into this constructor must live as long // as the Extension itself. - Extension(const char* name, - const char* source = 0, - int dep_count = 0, - const char** deps = 0, - int source_length = -1); + Extension(const char* name, const char* source = nullptr, int dep_count = 0, + const char** deps = nullptr, int source_length = -1); virtual ~Extension() { delete source_; } virtual Local GetNativeFunctionTemplate( Isolate* isolate, Local name) { @@ -6566,6 +6463,15 @@ typedef void (*HostInitializeImportMetaObjectCallback)(Local context, Local module, Local meta); +/** + * PrepareStackTraceCallback is called when the stack property of an error is + * first accessed. The return value will be used as the stack value. If this + * callback is registed, the |Error.prepareStackTrace| API will be disabled. + */ +typedef MaybeLocal (*PrepareStackTraceCallback)(Local context, + Local error, + Local trace); + /** * PromiseHook with type kInit is called when a new promise is * created. When a new promise is created as part of the chain in the @@ -6994,7 +6900,7 @@ typedef void (*JitCodeEventHandler)(const JitCodeEvent* event); */ class V8_EXPORT ExternalResourceVisitor { // NOLINT public: - virtual ~ExternalResourceVisitor() {} + virtual ~ExternalResourceVisitor() = default; virtual void VisitExternalString(Local string) {} }; @@ -7004,7 +6910,7 @@ class V8_EXPORT ExternalResourceVisitor { // NOLINT */ class V8_EXPORT PersistentHandleVisitor { // NOLINT public: - virtual ~PersistentHandleVisitor() {} + virtual ~PersistentHandleVisitor() = default; virtual void VisitPersistentHandle(Persistent* value, uint16_t class_id) {} }; @@ -7074,8 +6980,8 @@ class V8_EXPORT EmbedderHeapTracer { * embedder. */ V8_DEPRECATED("Use void AdvanceTracing(deadline_in_ms)", - virtual bool AdvanceTracing( - double deadline_in_ms, AdvanceTracingActions actions)) { + virtual bool AdvanceTracing(double deadline_in_ms, + AdvanceTracingActions actions)) { return false; } @@ -7124,7 +7030,8 @@ class V8_EXPORT EmbedderHeapTracer { * The embedder is expected to throw away all intermediate data and reset to * the initial state. */ - virtual void AbortTracing() = 0; + V8_DEPRECATE_SOON("Obsolete as V8 will not abort tracing anymore.", + virtual void AbortTracing()) {} /* * Called by the embedder to request immediate finalization of the currently @@ -7153,8 +7060,7 @@ class V8_EXPORT EmbedderHeapTracer { /** * Returns the number of wrappers that are still to be traced by the embedder. */ - V8_DEPRECATE_SOON("Use IsTracingDone", - virtual size_t NumberOfWrappersToTrace()) { + V8_DEPRECATED("Use IsTracingDone", virtual size_t NumberOfWrappersToTrace()) { return 0; } @@ -7458,6 +7364,23 @@ class V8_EXPORT Isolate { kFunctionTokenOffsetTooLongForToString = 49, kWasmSharedMemory = 50, kWasmThreadOpcodes = 51, + kAtomicsNotify = 52, + kAtomicsWake = 53, + kCollator = 54, + kNumberFormat = 55, + kDateTimeFormat = 56, + kPluralRules = 57, + kRelativeTimeFormat = 58, + kLocale = 59, + kListFormat = 60, + kSegmenter = 61, + kStringLocaleCompare = 62, + kStringToLocaleUpperCase = 63, + kStringToLocaleLowerCase = 64, + kNumberToLocaleString = 65, + kDateToLocaleString = 66, + kDateToLocaleDateString = 67, + kDateToLocaleTimeString = 68, // If you add new values here, you'll also need to update Chromium's: // web_feature.mojom, UseCounterCallback.cpp, and enums.xml. V8 changes to @@ -7545,6 +7468,12 @@ class V8_EXPORT Isolate { void SetHostInitializeImportMetaObjectCallback( HostInitializeImportMetaObjectCallback callback); + /** + * This specifies the callback called when the stack property of Error + * is accessed. + */ + void SetPrepareStackTraceCallback(PrepareStackTraceCallback callback); + /** * Optional notification that the system is running low on memory. * V8 uses these notifications to guide heuristics. @@ -7782,6 +7711,11 @@ class V8_EXPORT Isolate { */ void SetEmbedderHeapTracer(EmbedderHeapTracer* tracer); + /* + * Gets the currently active heap tracer for the isolate. + */ + EmbedderHeapTracer* GetEmbedderHeapTracer(); + /** * Use for |AtomicsWaitCallback| to indicate the type of event it receives. */ @@ -8180,7 +8114,9 @@ class V8_EXPORT Isolate { void SetStackLimit(uintptr_t stack_limit); /** - * Returns a memory range that can potentially contain jitted code. + * Returns a memory range that can potentially contain jitted code. Code for + * V8's 'builtins' will not be in this range if embedded builtins is enabled. + * Instead, see GetEmbeddedCodeRange. * * On Win64, embedders are advised to install function table callbacks for * these ranges, as default SEH won't be able to unwind through jitted code. @@ -8194,6 +8130,15 @@ class V8_EXPORT Isolate { */ void GetCodeRange(void** start, size_t* length_in_bytes); + /** + * Returns a memory range containing the code for V8's embedded functions + * (e.g. builtins) which are shared across isolates. + * + * If embedded builtins are disabled, then the memory range will be a null + * pointer with 0 length. + */ + MemoryRange GetEmbeddedCodeRange(); + /** Set the callback to invoke in case of fatal errors. */ void SetFatalErrorHandler(FatalErrorCallback that); @@ -8933,7 +8878,7 @@ class V8_EXPORT TryCatch { * of the C++ try catch handler itself. */ static void* JSStackComparableAddress(TryCatch* handler) { - if (handler == NULL) return NULL; + if (handler == nullptr) return nullptr; return handler->js_stack_comparable_address_; } @@ -8973,7 +8918,7 @@ class V8_EXPORT TryCatch { */ class V8_EXPORT ExtensionConfiguration { public: - ExtensionConfiguration() : name_count_(0), names_(NULL) { } + ExtensionConfiguration() : name_count_(0), names_(nullptr) {} ExtensionConfiguration(int name_count, const char* names[]) : name_count_(name_count), names_(names) { } @@ -9030,7 +8975,7 @@ class V8_EXPORT Context { * and only object identify will remain. */ static Local New( - Isolate* isolate, ExtensionConfiguration* extensions = NULL, + Isolate* isolate, ExtensionConfiguration* extensions = nullptr, MaybeLocal global_template = MaybeLocal(), MaybeLocal global_object = MaybeLocal(), DeserializeInternalFieldsCallback internal_fields_deserializer = @@ -9369,201 +9314,6 @@ class V8_EXPORT Locker { // --- Implementation --- - -namespace internal { - -/** - * This class exports constants and functionality from within v8 that - * is necessary to implement inline functions in the v8 api. Don't - * depend on functions and constants defined here. - */ -class Internals { - public: - // These values match non-compiler-dependent values defined within - // the implementation of v8. - static const int kHeapObjectMapOffset = 0; - static const int kMapInstanceTypeOffset = 1 * kApiPointerSize + kApiIntSize; - static const int kStringResourceOffset = 3 * kApiPointerSize; - - static const int kOddballKindOffset = 4 * kApiPointerSize + kApiDoubleSize; - static const int kForeignAddressOffset = kApiPointerSize; - static const int kJSObjectHeaderSize = 3 * kApiPointerSize; - static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; - static const int kContextHeaderSize = 2 * kApiPointerSize; - static const int kContextEmbedderDataIndex = 5; - static const int kFullStringRepresentationMask = 0x0f; - static const int kStringEncodingMask = 0x8; - static const int kExternalTwoByteRepresentationTag = 0x02; - static const int kExternalOneByteRepresentationTag = 0x0a; - - static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; - static const int kExternalMemoryOffset = 4 * kApiPointerSize; - static const int kExternalMemoryLimitOffset = - kExternalMemoryOffset + kApiInt64Size; - static const int kExternalMemoryAtLastMarkCompactOffset = - kExternalMemoryLimitOffset + kApiInt64Size; - static const int kIsolateRootsOffset = kExternalMemoryLimitOffset + - kApiInt64Size + kApiInt64Size + - kApiPointerSize + kApiPointerSize; - static const int kUndefinedValueRootIndex = 4; - static const int kTheHoleValueRootIndex = 5; - static const int kNullValueRootIndex = 6; - static const int kTrueValueRootIndex = 7; - static const int kFalseValueRootIndex = 8; - static const int kEmptyStringRootIndex = 9; - - static const int kNodeClassIdOffset = 1 * kApiPointerSize; - static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3; - static const int kNodeStateMask = 0x7; - static const int kNodeStateIsWeakValue = 2; - static const int kNodeStateIsPendingValue = 3; - static const int kNodeStateIsNearDeathValue = 4; - static const int kNodeIsIndependentShift = 3; - static const int kNodeIsActiveShift = 4; - - static const int kFirstNonstringType = 0x80; - static const int kOddballType = 0x83; - static const int kForeignType = 0x87; - static const int kJSSpecialApiObjectType = 0x410; - static const int kJSApiObjectType = 0x420; - static const int kJSObjectType = 0x421; - - static const int kUndefinedOddballKind = 5; - static const int kNullOddballKind = 3; - - static const uint32_t kNumIsolateDataSlots = 4; - - V8_EXPORT static void CheckInitializedImpl(v8::Isolate* isolate); - V8_INLINE static void CheckInitialized(v8::Isolate* isolate) { -#ifdef V8_ENABLE_CHECKS - CheckInitializedImpl(isolate); -#endif - } - - V8_INLINE static bool HasHeapObjectTag(const internal::Object* value) { - return ((reinterpret_cast(value) & kHeapObjectTagMask) == - kHeapObjectTag); - } - - V8_INLINE static int SmiValue(const internal::Object* value) { - return PlatformSmiTagging::SmiToInt(value); - } - - V8_INLINE static internal::Object* IntToSmi(int value) { - return PlatformSmiTagging::IntToSmi(value); - } - - V8_INLINE static constexpr bool IsValidSmi(intptr_t value) { - return PlatformSmiTagging::IsValidSmi(value); - } - - V8_INLINE static int GetInstanceType(const internal::Object* obj) { - typedef internal::Object O; - O* map = ReadField(obj, kHeapObjectMapOffset); - return ReadField(map, kMapInstanceTypeOffset); - } - - V8_INLINE static int GetOddballKind(const internal::Object* obj) { - typedef internal::Object O; - return SmiValue(ReadField(obj, kOddballKindOffset)); - } - - V8_INLINE static bool IsExternalTwoByteString(int instance_type) { - int representation = (instance_type & kFullStringRepresentationMask); - return representation == kExternalTwoByteRepresentationTag; - } - - V8_INLINE static uint8_t GetNodeFlag(internal::Object** obj, int shift) { - uint8_t* addr = reinterpret_cast(obj) + kNodeFlagsOffset; - return *addr & static_cast(1U << shift); - } - - V8_INLINE static void UpdateNodeFlag(internal::Object** obj, - bool value, int shift) { - uint8_t* addr = reinterpret_cast(obj) + kNodeFlagsOffset; - uint8_t mask = static_cast(1U << shift); - *addr = static_cast((*addr & ~mask) | (value << shift)); - } - - V8_INLINE static uint8_t GetNodeState(internal::Object** obj) { - uint8_t* addr = reinterpret_cast(obj) + kNodeFlagsOffset; - return *addr & kNodeStateMask; - } - - V8_INLINE static void UpdateNodeState(internal::Object** obj, - uint8_t value) { - uint8_t* addr = reinterpret_cast(obj) + kNodeFlagsOffset; - *addr = static_cast((*addr & ~kNodeStateMask) | value); - } - - V8_INLINE static void SetEmbedderData(v8::Isolate* isolate, - uint32_t slot, - void* data) { - uint8_t* addr = reinterpret_cast(isolate) + - kIsolateEmbedderDataOffset + slot * kApiPointerSize; - *reinterpret_cast(addr) = data; - } - - V8_INLINE static void* GetEmbedderData(const v8::Isolate* isolate, - uint32_t slot) { - const uint8_t* addr = reinterpret_cast(isolate) + - kIsolateEmbedderDataOffset + slot * kApiPointerSize; - return *reinterpret_cast(addr); - } - - V8_INLINE static internal::Object** GetRoot(v8::Isolate* isolate, - int index) { - uint8_t* addr = reinterpret_cast(isolate) + kIsolateRootsOffset; - return reinterpret_cast(addr + index * kApiPointerSize); - } - - template - V8_INLINE static T ReadField(const internal::Object* ptr, int offset) { - const uint8_t* addr = - reinterpret_cast(ptr) + offset - kHeapObjectTag; - return *reinterpret_cast(addr); - } - - template - V8_INLINE static T ReadEmbedderData(const v8::Context* context, int index) { - typedef internal::Object O; - typedef internal::Internals I; - O* ctx = *reinterpret_cast(context); - int embedder_data_offset = I::kContextHeaderSize + - (internal::kApiPointerSize * I::kContextEmbedderDataIndex); - O* embedder_data = I::ReadField(ctx, embedder_data_offset); - int value_offset = - I::kFixedArrayHeaderSize + (internal::kApiPointerSize * index); - return I::ReadField(embedder_data, value_offset); - } -}; - -// Only perform cast check for types derived from v8::Data since -// other types do not implement the Cast method. -template -struct CastCheck { - template - static void Perform(T* data); -}; - -template <> -template -void CastCheck::Perform(T* data) { - T::Cast(data); -} - -template <> -template -void CastCheck::Perform(T* data) {} - -template -V8_INLINE void PerformCastCheck(T* data) { - CastCheck::value>::Perform(data); -} - -} // namespace internal - - template Local Local::New(Isolate* isolate, Local that) { return New(isolate, that.val_); @@ -9577,7 +9327,7 @@ Local Local::New(Isolate* isolate, const PersistentBase& that) { template Local Local::New(Isolate* isolate, T* that) { - if (that == NULL) return Local(); + if (that == nullptr) return Local(); T* that_ptr = that; internal::Object** p = reinterpret_cast(that_ptr); return Local(reinterpret_cast(HandleScope::CreateHandle( @@ -9621,7 +9371,7 @@ void* WeakCallbackInfo::GetInternalField(int index) const { template T* PersistentBase::New(Isolate* isolate, T* that) { - if (that == NULL) return NULL; + if (that == nullptr) return nullptr; internal::Object** p = reinterpret_cast(that); return reinterpret_cast( V8::GlobalizeReference(reinterpret_cast(isolate), @@ -9672,7 +9422,7 @@ template void PersistentBase::Reset() { if (this->IsEmpty()) return; V8::DisposeGlobal(reinterpret_cast(this->val_)); - val_ = 0; + val_ = nullptr; } @@ -10239,30 +9989,6 @@ template Value* Value::Cast(T* value) { } -Local Value::ToBoolean() const { - return ToBoolean(Isolate::GetCurrent()->GetCurrentContext()) - .FromMaybe(Local()); -} - - -Local Value::ToString() const { - return ToString(Isolate::GetCurrent()->GetCurrentContext()) - .FromMaybe(Local()); -} - - -Local Value::ToObject() const { - return ToObject(Isolate::GetCurrent()->GetCurrentContext()) - .FromMaybe(Local()); -} - - -Local Value::ToInteger() const { - return ToInteger(Isolate::GetCurrent()->GetCurrentContext()) - .FromMaybe(Local()); -} - - Boolean* Boolean::Cast(v8::Value* value) { #ifdef V8_ENABLE_CHECKS CheckCast(value); @@ -10711,10 +10437,10 @@ int64_t Isolate::AdjustAmountOfExternalAllocatedMemory( } if (change_in_bytes < 0) { - *external_memory_limit += change_in_bytes; - } - - if (change_in_bytes > 0 && amount > *external_memory_limit) { + const int64_t lower_limit = *external_memory_limit + change_in_bytes; + if (lower_limit > I::kExternalAllocationSoftLimit) + *external_memory_limit = lower_limit; + } else if (change_in_bytes > 0 && amount > *external_memory_limit) { ReportExternalAllocationLimitReached(); } return *external_memory; diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h index 75fd5aa7e743f7..93c4629825b255 100644 --- a/deps/v8/include/v8config.h +++ b/deps/v8/include/v8config.h @@ -420,6 +420,36 @@ namespace v8 { template class AlignOfHelper { char c; T t; }; } #define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */ #endif +#ifdef V8_OS_WIN + +// Setup for Windows DLL export/import. When building the V8 DLL the +// BUILDING_V8_SHARED needs to be defined. When building a program which uses +// the V8 DLL USING_V8_SHARED needs to be defined. When either building the V8 +// static library or building a program which uses the V8 static library neither +// BUILDING_V8_SHARED nor USING_V8_SHARED should be defined. +#ifdef BUILDING_V8_SHARED +# define V8_EXPORT __declspec(dllexport) +#elif USING_V8_SHARED +# define V8_EXPORT __declspec(dllimport) +#else +# define V8_EXPORT +#endif // BUILDING_V8_SHARED + +#else // V8_OS_WIN + +// Setup for Linux shared library export. +#if V8_HAS_ATTRIBUTE_VISIBILITY +# ifdef BUILDING_V8_SHARED +# define V8_EXPORT __attribute__ ((visibility("default"))) +# else +# define V8_EXPORT +# endif +#else +# define V8_EXPORT +#endif + +#endif // V8_OS_WIN + // clang-format on #endif // V8CONFIG_H_ diff --git a/deps/v8/infra/config/cq.cfg b/deps/v8/infra/config/cq.cfg index a0ede58b911a79..53ea0cdd44182d 100644 --- a/deps/v8/infra/config/cq.cfg +++ b/deps/v8/infra/config/cq.cfg @@ -108,6 +108,23 @@ verifiers { triggered_by: "v8_win_rel_ng" } } + # TODO(machenbach): Remove after testing in practice and migrate to + # PRESUBMIT.py scripts. + buckets { + name: "luci.chromium.try" + builders { + name: "cast_shell_android" + experiment_percentage: 20 + } + builders { + name: "cast_shell_linux" + experiment_percentage: 20 + } + builders { + name: "linux-chromeos-rel" + experiment_percentage: 20 + } + } } } diff --git a/deps/v8/infra/mb/mb_config.pyl b/deps/v8/infra/mb/mb_config.pyl index 095aeefc5c4631..124524c552f3c3 100644 --- a/deps/v8/infra/mb/mb_config.pyl +++ b/deps/v8/infra/mb/mb_config.pyl @@ -27,24 +27,12 @@ 'mips64el.debug': 'default_debug_mips64el', 'mips64el.optdebug': 'default_optdebug_mips64el', 'mips64el.release': 'default_release_mips64el', - 'ppc.debug': 'default_debug_ppc', - 'ppc.optdebug': 'default_optdebug_ppc', - 'ppc.release': 'default_release_ppc', - 'ppc.debug.sim': 'default_debug_ppc_sim', - 'ppc.optdebug.sim': 'default_optdebug_ppc_sim', - 'ppc.release.sim': 'default_release_ppc_sim', 'ppc64.debug': 'default_debug_ppc64', 'ppc64.optdebug': 'default_optdebug_ppc64', 'ppc64.release': 'default_release_ppc64', 'ppc64.debug.sim': 'default_debug_ppc64_sim', 'ppc64.optdebug.sim': 'default_optdebug_ppc64_sim', 'ppc64.release.sim': 'default_release_ppc64_sim', - 's390.debug': 'default_debug_s390', - 's390.optdebug': 'default_optdebug_s390', - 's390.release': 'default_release_s390', - 's390.debug.sim': 'default_debug_s390_sim', - 's390.optdebug.sim': 'default_optdebug_s390_sim', - 's390.release.sim': 'default_release_s390_sim', 's390x.debug': 'default_debug_s390x', 's390x.optdebug': 'default_optdebug_s390x', 's390x.release': 'default_release_s390x', @@ -54,6 +42,7 @@ 'x64.debug': 'default_debug_x64', 'x64.optdebug': 'default_optdebug_x64', 'x64.release': 'default_release_x64', + 'x64.release.sample': 'release_x64_sample', }, 'client.dynamorio': { 'linux-v8-dr': 'release_x64', @@ -102,6 +91,8 @@ 'V8 Linux gcc 4.8': 'release_x86_gcc', 'V8 Linux64 gcc 4.8 - debug': 'debug_x64_gcc', # FYI. + 'V8 Linux - embedded builtins': 'release_x86_embedded_builtins', + 'V8 Linux - embedded builtins - debug': 'debug_x86_embedded_builtins', 'V8 Fuchsia': 'release_x64_fuchsia', 'V8 Fuchsia - debug': 'debug_x64_fuchsia', 'V8 Linux64 - cfi': 'release_x64_cfi', @@ -138,8 +129,6 @@ 'debug_simulate_arm64_asan_edge', 'V8 Clusterfuzz Linux ASAN arm - debug builder': 'debug_simulate_arm_asan_edge', - 'V8 Clusterfuzz Linux ASAN mipsel - debug builder': - 'debug_simulate_mipsel_asan_edge', 'V8 Clusterfuzz Linux64 CFI - release builder': 'release_x64_cfi_clusterfuzz', 'V8 Clusterfuzz Linux MSAN no origins': @@ -169,11 +158,8 @@ 'V8 Mips - builder': 'release_mips_no_snap_no_i18n', 'V8 Linux - mipsel - sim - builder': 'release_simulate_mipsel', 'V8 Linux - mips64el - sim - builder': 'release_simulate_mips64el', - # PPC. - 'V8 Linux - ppc - sim': 'release_simulate_ppc', + # IBM. 'V8 Linux - ppc64 - sim': 'release_simulate_ppc64', - # S390. - 'V8 Linux - s390 - sim': 'release_simulate_s390', 'V8 Linux - s390x - sim': 'release_simulate_s390x', }, 'client.v8.branches': { @@ -193,12 +179,8 @@ 'V8 mips64el - sim - stable branch': 'release_simulate_mips64el', 'V8 mipsel - sim - beta branch': 'release_simulate_mipsel', 'V8 mipsel - sim - stable branch': 'release_simulate_mipsel', - 'V8 ppc - sim - beta branch': 'release_simulate_ppc', - 'V8 ppc - sim - stable branch': 'release_simulate_ppc', 'V8 ppc64 - sim - beta branch': 'release_simulate_ppc64', 'V8 ppc64 - sim - stable branch': 'release_simulate_ppc64', - 'V8 s390 - sim - beta branch': 'release_simulate_s390', - 'V8 s390 - sim - stable branch': 'release_simulate_s390', 'V8 s390x - sim - beta branch': 'release_simulate_s390x', 'V8 s390x - sim - stable branch': 'release_simulate_s390x', }, @@ -207,7 +189,9 @@ 'v8_android_arm64_compile_dbg': 'debug_android_arm64', 'v8_android_arm64_n5x_rel_ng': 'release_android_arm64', 'v8_fuchsia_rel_ng': 'release_x64_fuchsia_trybot', + 'v8_linux_embedded_builtins_rel_ng': 'release_x86_embedded_builtins_trybot', 'v8_linux_rel_ng': 'release_x86_gcmole_trybot', + 'v8_linux_optional_rel_ng': 'release_x86_trybot', 'v8_linux_verify_csa_rel_ng': 'release_x86_verify_csa', 'v8_linux_nodcheck_rel_ng': 'release_x86_minimal_symbols', 'v8_linux_dbg_ng': 'debug_x86_trybot', @@ -218,6 +202,7 @@ 'v8_linux_gcc_compile_rel': 'release_x86_gcc_minimal_symbols', 'v8_linux_gcc_rel': 'release_x86_gcc_minimal_symbols', 'v8_linux_shared_compile_rel': 'release_x86_shared_verify_heap', + 'v8_linux64_compile_rel_xg': 'release_x64_test_features_trybot', 'v8_linux64_dbg_ng': 'debug_x64_trybot', 'v8_linux64_gcc_compile_dbg': 'debug_x64_gcc', 'v8_linux64_header_includes_dbg': 'debug_x64_header_includes', @@ -235,6 +220,7 @@ 'v8_linux64_tsan_isolates_rel_ng': 'release_x64_tsan_minimal_symbols', 'v8_linux64_ubsan_rel_ng': 'release_x64_ubsan_vptr_minimal_symbols', + 'v8_odroid_arm_rel_ng': 'release_arm', # TODO(machenbach): Remove after switching to x64 on infra side. 'v8_win_dbg': 'debug_x86_trybot', 'v8_win_compile_dbg': 'debug_x86_trybot', @@ -280,7 +266,7 @@ 'default_optdebug_android_arm': [ 'debug', 'arm', 'android', 'v8_enable_slow_dchecks' ], 'default_release_android_arm': [ - 'release', 'arm', 'android'], + 'release', 'arm', 'android', 'android_strip_outputs'], 'default_debug_arm64': [ 'debug', 'simulate_arm64', 'v8_enable_slow_dchecks', 'v8_full_debug'], 'default_optdebug_arm64': [ @@ -299,18 +285,6 @@ 'debug', 'simulate_mips64el', 'v8_enable_slow_dchecks'], 'default_release_mips64el': [ 'release', 'simulate_mips64el'], - 'default_debug_ppc': [ - 'debug', 'ppc', 'v8_enable_slow_dchecks', 'v8_full_debug'], - 'default_optdebug_ppc': [ - 'debug', 'ppc', 'v8_enable_slow_dchecks'], - 'default_release_ppc': [ - 'release', 'ppc'], - 'default_debug_ppc_sim': [ - 'debug', 'simulate_ppc', 'v8_enable_slow_dchecks', 'v8_full_debug'], - 'default_optdebug_ppc_sim': [ - 'debug', 'simulate_ppc', 'v8_enable_slow_dchecks'], - 'default_release_ppc_sim': [ - 'release', 'simulate_ppc'], 'default_debug_ppc64': [ 'debug', 'ppc64', 'gcc', 'v8_enable_slow_dchecks', 'v8_full_debug'], 'default_optdebug_ppc64': [ @@ -323,18 +297,6 @@ 'debug', 'simulate_ppc64', 'v8_enable_slow_dchecks'], 'default_release_ppc64_sim': [ 'release', 'simulate_ppc64'], - 'default_debug_s390': [ - 'debug', 's390', 'v8_enable_slow_dchecks', 'v8_full_debug'], - 'default_optdebug_s390': [ - 'debug', 's390', 'v8_enable_slow_dchecks'], - 'default_release_s390': [ - 'release', 's390'], - 'default_debug_s390_sim': [ - 'debug', 'simulate_s390', 'v8_enable_slow_dchecks', 'v8_full_debug'], - 'default_optdebug_s390_sim': [ - 'debug', 'simulate_s390', 'v8_enable_slow_dchecks'], - 'default_release_s390_sim': [ - 'release', 'simulate_s390'], 'default_debug_s390x': [ 'debug', 's390x', 'v8_enable_slow_dchecks', 'v8_full_debug'], 'default_optdebug_s390x': [ @@ -353,6 +315,8 @@ 'debug', 'x64', 'v8_enable_slow_dchecks'], 'default_release_x64': [ 'release', 'x64'], + 'release_x64_sample': [ + 'release', 'x64', 'sample'], 'default_debug_x86': [ 'debug', 'x86', 'v8_enable_slow_dchecks', 'v8_full_debug'], 'default_optdebug_x86': [ @@ -373,8 +337,6 @@ 'debug_simulate_arm64_no_snap': [ 'debug', 'simulate_arm64', 'shared', 'goma', 'v8_optimized_debug', 'v8_snapshot_none'], - 'debug_simulate_mipsel_asan_edge': [ - 'debug_bot', 'simulate_mipsel', 'asan', 'edge'], # Release configs for simulators. 'release_simulate_arm': [ @@ -397,12 +359,8 @@ 'release_bot', 'simulate_mipsel'], 'release_simulate_mips64el': [ 'release_bot', 'simulate_mips64el'], - 'release_simulate_ppc': [ - 'release_bot', 'simulate_ppc'], 'release_simulate_ppc64': [ 'release_bot', 'simulate_ppc64'], - 'release_simulate_s390': [ - 'release_bot', 'simulate_s390'], 'release_simulate_s390x': [ 'release_bot', 'simulate_s390x'], @@ -416,9 +374,11 @@ 'release_arm': [ 'release_bot', 'arm', 'hard_float'], 'release_android_arm': [ - 'release_bot', 'arm', 'android', 'minimal_symbols'], + 'release_bot', 'arm', 'android', 'minimal_symbols', + 'android_strip_outputs'], 'release_android_arm64': [ - 'release_bot', 'arm64', 'android', 'minimal_symbols'], + 'release_bot', 'arm64', 'android', 'minimal_symbols', + 'android_strip_outputs'], # Release configs for x64. 'release_x64': [ @@ -519,6 +479,9 @@ # Debug configs for x86. 'debug_x86': [ 'debug_bot', 'x86'], + 'debug_x86_embedded_builtins': [ + 'debug_bot', 'x86', 'v8_enable_embedded_builtins', + 'v8_no_untrusted_code_mitigations'], 'debug_x86_minimal_symbols': [ 'debug_bot', 'x86', 'minimal_symbols'], 'debug_x86_no_i18n': [ @@ -538,6 +501,12 @@ # Release configs for x86. 'release_x86': [ 'release_bot', 'x86'], + 'release_x86_embedded_builtins': [ + 'release_bot', 'x86', 'v8_enable_embedded_builtins', + 'v8_no_untrusted_code_mitigations'], + 'release_x86_embedded_builtins_trybot': [ + 'release_trybot', 'x86', 'v8_enable_embedded_builtins', + 'v8_no_untrusted_code_mitigations'], 'release_x86_gcc': [ 'release_bot', 'x86', 'gcc'], 'release_x86_gcc_minimal_symbols': [ @@ -580,6 +549,10 @@ 'gn_args': 'target_os="android" v8_android_log_stdout=true', }, + 'android_strip_outputs': { + 'gn_args': 'android_unstripped_runtime_outputs=false', + }, + 'arm': { 'gn_args': 'target_cpu="arm"', }, @@ -625,14 +598,10 @@ 'gn_args': 'is_debug=true v8_enable_backtrace=true', }, - 'v8_use_multi_snapshots': { - 'gn_args': 'v8_use_multi_snapshots=true', - }, - 'debug_bot': { 'mixins': [ 'debug', 'shared', 'goma', 'v8_enable_slow_dchecks', - 'v8_use_multi_snapshots', 'v8_optimized_debug'], + 'v8_optimized_debug'], }, 'debug_trybot': { @@ -715,11 +684,11 @@ }, 'release': { - 'gn_args': 'is_debug=false android_unstripped_runtime_outputs=false', + 'gn_args': 'is_debug=false', }, 'release_bot': { - 'mixins': ['release', 'static', 'goma', 'v8_use_multi_snapshots'], + 'mixins': ['release', 'static', 'goma'], }, 'release_trybot': { @@ -747,18 +716,10 @@ 'gn_args': 'target_cpu="x64" v8_target_cpu="mips64el"', }, - 'simulate_ppc': { - 'gn_args': 'target_cpu="x86" v8_target_cpu="ppc"', - }, - 'simulate_ppc64': { 'gn_args': 'target_cpu="x64" v8_target_cpu="ppc64"', }, - 'simulate_s390': { - 'gn_args': 'target_cpu="x86" v8_target_cpu="s390"', - }, - 'simulate_s390x': { 'gn_args': 'target_cpu="x64" v8_target_cpu="s390x"', }, @@ -808,6 +769,10 @@ 'gn_args': 'v8_correctness_fuzzer=true v8_multi_arch_build=true', }, + 'v8_enable_embedded_builtins': { + 'gn_args': 'v8_enable_embedded_builtins=true', + }, + 'v8_enable_slow_dchecks': { 'gn_args': 'v8_enable_slow_dchecks=true', }, @@ -853,6 +818,10 @@ 'gn_args': 'v8_use_snapshot=false', }, + 'v8_no_untrusted_code_mitigations': { + 'gn_args': 'v8_untrusted_code_mitigations=false', + }, + 'v8_verify_heap': { 'gn_args': 'v8_enable_verify_heap=true', }, @@ -861,18 +830,10 @@ 'gn_args': 'v8_enable_verify_csa=true', }, - 's390': { - 'gn_args': 'target_cpu="s390x" v8_target_cpu="s390"', - }, - 's390x': { 'gn_args': 'target_cpu="s390x" v8_target_cpu="s390x"', }, - 'ppc': { - 'gn_args': 'target_cpu="ppc"', - }, - 'ppc64': { 'gn_args': 'target_cpu="ppc64" use_custom_libcxx=false', }, @@ -885,5 +846,9 @@ 'gn_args': 'target_cpu="x86"', }, + 'sample': { + 'gn_args': 'v8_monolithic=true is_component_build=false ' + 'v8_use_external_startup_data=false use_custom_libcxx=false', + }, }, } diff --git a/deps/v8/src/DEPS b/deps/v8/src/DEPS index 90cfd737f21bd6..99873803c99fc1 100644 --- a/deps/v8/src/DEPS +++ b/deps/v8/src/DEPS @@ -13,6 +13,7 @@ include_rules = [ "+src/heap/heap.h", "+src/heap/heap-inl.h", "+src/heap/heap-write-barrier-inl.h", + "+src/heap/heap-write-barrier.h", "-src/inspector", "-src/interpreter", "+src/interpreter/bytecode-array-accessor.h", @@ -30,6 +31,7 @@ include_rules = [ "+testing/gtest/include/gtest/gtest_prod.h", "-src/libplatform", "-include/libplatform", + "+builtins-generated", "+torque-generated" ] diff --git a/deps/v8/src/accessors.cc b/deps/v8/src/accessors.cc index da935f3652812c..226178394db1bf 100644 --- a/deps/v8/src/accessors.cc +++ b/deps/v8/src/accessors.cc @@ -31,7 +31,8 @@ Handle Accessors::MakeAccessor( info->set_is_special_data_property(true); info->set_is_sloppy(false); info->set_replace_on_access(false); - info->set_has_no_side_effect(false); + info->set_getter_side_effect_type(SideEffectType::kHasSideEffect); + info->set_setter_side_effect_type(SideEffectType::kHasSideEffect); name = factory->InternalizeName(name); info->set_name(*name); Handle get = v8::FromCData(isolate, getter); @@ -70,7 +71,7 @@ bool Accessors::IsJSObjectFieldAccessor(Isolate* isolate, Handle map, default: if (map->instance_type() < FIRST_NONSTRING_TYPE) { return CheckForName(isolate, name, isolate->factory()->length_string(), - String::kLengthOffset, FieldIndex::kTagged, index); + String::kLengthOffset, FieldIndex::kWord32, index); } return false; diff --git a/deps/v8/src/accessors.h b/deps/v8/src/accessors.h index 69fdbbb74e329a..15c4773ec3cc3d 100644 --- a/deps/v8/src/accessors.h +++ b/deps/v8/src/accessors.h @@ -22,27 +22,28 @@ class JavaScriptFrame; // The list of accessor descriptors. This is a second-order macro // taking a macro to be applied to all accessor descriptor names. -#define ACCESSOR_INFO_LIST(V) \ - V(arguments_iterator, ArgumentsIterator) \ - V(array_length, ArrayLength) \ - V(bound_function_length, BoundFunctionLength) \ - V(bound_function_name, BoundFunctionName) \ - V(error_stack, ErrorStack) \ - V(function_arguments, FunctionArguments) \ - V(function_caller, FunctionCaller) \ - V(function_name, FunctionName) \ - V(function_length, FunctionLength) \ - V(function_prototype, FunctionPrototype) \ - V(string_length, StringLength) - -#define SIDE_EFFECT_FREE_ACCESSOR_INFO_LIST(V) \ - V(ArrayLength) \ - V(BoundFunctionLength) \ - V(BoundFunctionName) \ - V(FunctionName) \ - V(FunctionLength) \ - V(FunctionPrototype) \ - V(StringLength) +// V(accessor_name, AccessorName, GetterSideEffectType, SetterSideEffectType) +#define ACCESSOR_INFO_LIST_GENERATOR(V, _) \ + V(_, arguments_iterator, ArgumentsIterator, kHasNoSideEffect, \ + kHasSideEffectToReceiver) \ + V(_, array_length, ArrayLength, kHasNoSideEffect, kHasSideEffectToReceiver) \ + V(_, bound_function_length, BoundFunctionLength, kHasNoSideEffect, \ + kHasSideEffectToReceiver) \ + V(_, bound_function_name, BoundFunctionName, kHasNoSideEffect, \ + kHasSideEffectToReceiver) \ + V(_, error_stack, ErrorStack, kHasSideEffectToReceiver, \ + kHasSideEffectToReceiver) \ + V(_, function_arguments, FunctionArguments, kHasNoSideEffect, \ + kHasSideEffectToReceiver) \ + V(_, function_caller, FunctionCaller, kHasNoSideEffect, \ + kHasSideEffectToReceiver) \ + V(_, function_name, FunctionName, kHasNoSideEffect, \ + kHasSideEffectToReceiver) \ + V(_, function_length, FunctionLength, kHasNoSideEffect, \ + kHasSideEffectToReceiver) \ + V(_, function_prototype, FunctionPrototype, kHasNoSideEffect, \ + kHasSideEffectToReceiver) \ + V(_, string_length, StringLength, kHasNoSideEffect, kHasSideEffectToReceiver) #define ACCESSOR_SETTER_LIST(V) \ V(ArrayLengthSetter) \ @@ -55,11 +56,11 @@ class JavaScriptFrame; class Accessors : public AllStatic { public: -#define ACCESSOR_GETTER_DECLARATION(accessor_name, AccessorName) \ - static void AccessorName##Getter( \ - v8::Local name, \ +#define ACCESSOR_GETTER_DECLARATION(_, accessor_name, AccessorName, ...) \ + static void AccessorName##Getter( \ + v8::Local name, \ const v8::PropertyCallbackInfo& info); - ACCESSOR_INFO_LIST(ACCESSOR_GETTER_DECLARATION) + ACCESSOR_INFO_LIST_GENERATOR(ACCESSOR_GETTER_DECLARATION, /* not used */) #undef ACCESSOR_GETTER_DECLARATION #define ACCESSOR_SETTER_DECLARATION(accessor_name) \ @@ -71,7 +72,7 @@ class Accessors : public AllStatic { static constexpr int kAccessorInfoCount = #define COUNT_ACCESSOR(...) +1 - ACCESSOR_INFO_LIST(COUNT_ACCESSOR); + ACCESSOR_INFO_LIST_GENERATOR(COUNT_ACCESSOR, /* not used */); #undef COUNT_ACCESSOR static constexpr int kAccessorSetterCount = @@ -118,9 +119,9 @@ class Accessors : public AllStatic { AccessorNameBooleanSetterCallback setter); private: -#define ACCESSOR_INFO_DECLARATION(accessor_name, AccessorName) \ +#define ACCESSOR_INFO_DECLARATION(_, accessor_name, AccessorName, ...) \ static Handle Make##AccessorName##Info(Isolate* isolate); - ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION) + ACCESSOR_INFO_LIST_GENERATOR(ACCESSOR_INFO_DECLARATION, /* not used */) #undef ACCESSOR_INFO_DECLARATION friend class Heap; diff --git a/deps/v8/src/address-map.cc b/deps/v8/src/address-map.cc index 2b0bf727e5b31a..ad71a25a99de0c 100644 --- a/deps/v8/src/address-map.cc +++ b/deps/v8/src/address-map.cc @@ -14,8 +14,8 @@ RootIndexMap::RootIndexMap(Isolate* isolate) { map_ = isolate->root_index_map(); if (map_ != nullptr) return; map_ = new HeapObjectToIndexHashMap(); - for (uint32_t i = 0; i < Heap::kStrongRootListLength; i++) { - Heap::RootListIndex root_index = static_cast(i); + for (RootIndex root_index = RootIndex::kFirstStrongRoot; + root_index <= RootIndex::kLastStrongRoot; ++root_index) { Object* root = isolate->heap()->root(root_index); if (!root->IsHeapObject()) continue; // Omit root entries that can be written after initialization. They must @@ -25,11 +25,12 @@ RootIndexMap::RootIndexMap(Isolate* isolate) { if (isolate->heap()->RootCanBeTreatedAsConstant(root_index)) { HeapObject* heap_object = HeapObject::cast(root); Maybe maybe_index = map_->Get(heap_object); + uint32_t index = static_cast(root_index); if (maybe_index.IsJust()) { // Some are initialized to a previous value in the root list. - DCHECK_LT(maybe_index.FromJust(), i); + DCHECK_LT(maybe_index.FromJust(), index); } else { - map_->Set(heap_object, i); + map_->Set(heap_object, index); } } else { // Immortal immovable root objects are constant and allocated on the first diff --git a/deps/v8/src/address-map.h b/deps/v8/src/address-map.h index 599e44724ab1d9..f7a1cc2ad9aabd 100644 --- a/deps/v8/src/address-map.h +++ b/deps/v8/src/address-map.h @@ -56,11 +56,14 @@ class RootIndexMap { public: explicit RootIndexMap(Isolate* isolate); - static const int kInvalidRootIndex = -1; - - int Lookup(HeapObject* obj) { + // Returns true on successful lookup and sets *|out_root_list|. + bool Lookup(HeapObject* obj, RootIndex* out_root_list) { Maybe maybe_index = map_->Get(obj); - return maybe_index.IsJust() ? maybe_index.FromJust() : kInvalidRootIndex; + if (maybe_index.IsJust()) { + *out_root_list = static_cast(maybe_index.FromJust()); + return true; + } + return false; } private: diff --git a/deps/v8/src/allocation-site-scopes-inl.h b/deps/v8/src/allocation-site-scopes-inl.h new file mode 100644 index 00000000000000..e114bb3885c202 --- /dev/null +++ b/deps/v8/src/allocation-site-scopes-inl.h @@ -0,0 +1,52 @@ +// Copyright 2018 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef V8_ALLOCATION_SITE_SCOPES_INL_H_ +#define V8_ALLOCATION_SITE_SCOPES_INL_H_ + +#include "src/allocation-site-scopes.h" + +#include "src/objects/allocation-site-inl.h" + +namespace v8 { +namespace internal { + +Handle AllocationSiteUsageContext::EnterNewScope() { + if (top().is_null()) { + InitializeTraversal(top_site_); + } else { + // Advance current site + Object* nested_site = current()->nested_site(); + // Something is wrong if we advance to the end of the list here. + update_current_site(AllocationSite::cast(nested_site)); + } + return Handle(*current(), isolate()); +} + +void AllocationSiteUsageContext::ExitScope(Handle scope_site, + Handle object) { + // This assert ensures that we are pointing at the right sub-object in a + // recursive walk of a nested literal. + DCHECK(object.is_null() || *object == scope_site->boilerplate()); +} + +bool AllocationSiteUsageContext::ShouldCreateMemento(Handle object) { + if (activated_ && AllocationSite::CanTrack(object->map()->instance_type())) { + if (FLAG_allocation_site_pretenuring || + AllocationSite::ShouldTrack(object->GetElementsKind())) { + if (FLAG_trace_creation_allocation_sites) { + PrintF("*** Creating Memento for %s %p\n", + object->IsJSArray() ? "JSArray" : "JSObject", + static_cast(*object)); + } + return true; + } + } + return false; +} + +} // namespace internal +} // namespace v8 + +#endif // V8_ALLOCATION_SITE_SCOPES_INL_H_ diff --git a/deps/v8/src/allocation-site-scopes.h b/deps/v8/src/allocation-site-scopes.h index 60614c5e01cd12..0a729948db2f59 100644 --- a/deps/v8/src/allocation-site-scopes.h +++ b/deps/v8/src/allocation-site-scopes.h @@ -56,40 +56,12 @@ class AllocationSiteUsageContext : public AllocationSiteContext { top_site_(site), activated_(activated) { } - inline Handle EnterNewScope() { - if (top().is_null()) { - InitializeTraversal(top_site_); - } else { - // Advance current site - Object* nested_site = current()->nested_site(); - // Something is wrong if we advance to the end of the list here. - update_current_site(AllocationSite::cast(nested_site)); - } - return Handle(*current(), isolate()); - } + inline Handle EnterNewScope(); inline void ExitScope(Handle scope_site, - Handle object) { - // This assert ensures that we are pointing at the right sub-object in a - // recursive walk of a nested literal. - DCHECK(object.is_null() || *object == scope_site->boilerplate()); - } + Handle object); - bool ShouldCreateMemento(Handle object) { - if (activated_ && - AllocationSite::CanTrack(object->map()->instance_type())) { - if (FLAG_allocation_site_pretenuring || - AllocationSite::ShouldTrack(object->GetElementsKind())) { - if (FLAG_trace_creation_allocation_sites) { - PrintF("*** Creating Memento for %s %p\n", - object->IsJSArray() ? "JSArray" : "JSObject", - static_cast(*object)); - } - return true; - } - } - return false; - } + inline bool ShouldCreateMemento(Handle object); static const bool kCopying = true; diff --git a/deps/v8/src/allocation.cc b/deps/v8/src/allocation.cc index 55c68dea89482e..6327a9c965abe7 100644 --- a/deps/v8/src/allocation.cc +++ b/deps/v8/src/allocation.cc @@ -8,6 +8,7 @@ #include "src/base/bits.h" #include "src/base/lazy-instance.h" #include "src/base/logging.h" +#include "src/base/lsan-page-allocator.h" #include "src/base/page-allocator.h" #include "src/base/platform/platform.h" #include "src/utils.h" @@ -17,10 +18,6 @@ #include // NOLINT #endif -#if defined(LEAK_SANITIZER) -#include -#endif - namespace v8 { namespace internal { @@ -51,21 +48,29 @@ struct InitializePageAllocator { static v8::base::PageAllocator default_allocator; page_allocator = &default_allocator; } +#if defined(LEAK_SANITIZER) + { + static v8::base::LsanPageAllocator lsan_allocator(page_allocator); + page_allocator = &lsan_allocator; + } +#endif *page_allocator_ptr = page_allocator; } }; static base::LazyInstance::type page_allocator = LAZY_INSTANCE_INITIALIZER; - -v8::PageAllocator* GetPageAllocator() { return page_allocator.Get(); } - // We will attempt allocation this many times. After each failure, we call // OnCriticalMemoryPressure to try to free some memory. const int kAllocationTries = 2; } // namespace +v8::PageAllocator* GetPlatformPageAllocator() { + DCHECK_NOT_NULL(page_allocator.Get()); + return page_allocator.Get(); +} + void* Malloced::New(size_t size) { void* result = AllocWithRetry(size); if (result == nullptr) { @@ -131,68 +136,62 @@ void AlignedFree(void *ptr) { #endif } -size_t AllocatePageSize() { return GetPageAllocator()->AllocatePageSize(); } +size_t AllocatePageSize() { + return GetPlatformPageAllocator()->AllocatePageSize(); +} -size_t CommitPageSize() { return GetPageAllocator()->CommitPageSize(); } +size_t CommitPageSize() { return GetPlatformPageAllocator()->CommitPageSize(); } void SetRandomMmapSeed(int64_t seed) { - GetPageAllocator()->SetRandomMmapSeed(seed); + GetPlatformPageAllocator()->SetRandomMmapSeed(seed); } -void* GetRandomMmapAddr() { return GetPageAllocator()->GetRandomMmapAddr(); } +void* GetRandomMmapAddr() { + return GetPlatformPageAllocator()->GetRandomMmapAddr(); +} -void* AllocatePages(void* address, size_t size, size_t alignment, +void* AllocatePages(v8::PageAllocator* page_allocator, void* address, + size_t size, size_t alignment, PageAllocator::Permission access) { + DCHECK_NOT_NULL(page_allocator); DCHECK_EQ(address, AlignedAddress(address, alignment)); - DCHECK_EQ(0UL, size & (GetPageAllocator()->AllocatePageSize() - 1)); + DCHECK_EQ(0UL, size & (page_allocator->AllocatePageSize() - 1)); void* result = nullptr; for (int i = 0; i < kAllocationTries; ++i) { - result = - GetPageAllocator()->AllocatePages(address, size, alignment, access); + result = page_allocator->AllocatePages(address, size, alignment, access); if (result != nullptr) break; - size_t request_size = size + alignment - AllocatePageSize(); + size_t request_size = size + alignment - page_allocator->AllocatePageSize(); if (!OnCriticalMemoryPressure(request_size)) break; } -#if defined(LEAK_SANITIZER) - if (result != nullptr) { - __lsan_register_root_region(result, size); - } -#endif return result; } -bool FreePages(void* address, const size_t size) { - DCHECK_EQ(0UL, size & (GetPageAllocator()->AllocatePageSize() - 1)); - bool result = GetPageAllocator()->FreePages(address, size); -#if defined(LEAK_SANITIZER) - if (result) { - __lsan_unregister_root_region(address, size); - } -#endif - return result; +bool FreePages(v8::PageAllocator* page_allocator, void* address, + const size_t size) { + DCHECK_NOT_NULL(page_allocator); + DCHECK_EQ(0UL, size & (page_allocator->AllocatePageSize() - 1)); + return page_allocator->FreePages(address, size); } -bool ReleasePages(void* address, size_t size, size_t new_size) { +bool ReleasePages(v8::PageAllocator* page_allocator, void* address, size_t size, + size_t new_size) { + DCHECK_NOT_NULL(page_allocator); DCHECK_LT(new_size, size); - bool result = GetPageAllocator()->ReleasePages(address, size, new_size); -#if defined(LEAK_SANITIZER) - if (result) { - __lsan_unregister_root_region(address, size); - __lsan_register_root_region(address, new_size); - } -#endif - return result; + return page_allocator->ReleasePages(address, size, new_size); } -bool SetPermissions(void* address, size_t size, - PageAllocator::Permission access) { - return GetPageAllocator()->SetPermissions(address, size, access); +bool SetPermissions(v8::PageAllocator* page_allocator, void* address, + size_t size, PageAllocator::Permission access) { + DCHECK_NOT_NULL(page_allocator); + return page_allocator->SetPermissions(address, size, access); } -byte* AllocatePage(void* address, size_t* allocated) { - size_t page_size = AllocatePageSize(); - void* result = - AllocatePages(address, page_size, page_size, PageAllocator::kReadWrite); +byte* AllocatePage(v8::PageAllocator* page_allocator, void* address, + size_t* allocated) { + DCHECK_NOT_NULL(page_allocator); + size_t page_size = page_allocator->AllocatePageSize(); + void* result = AllocatePages(page_allocator, address, page_size, page_size, + PageAllocator::kReadWrite); if (result != nullptr) *allocated = page_size; return static_cast(result); } @@ -206,16 +205,17 @@ bool OnCriticalMemoryPressure(size_t length) { return true; } -VirtualMemory::VirtualMemory() : address_(kNullAddress), size_(0) {} - -VirtualMemory::VirtualMemory(size_t size, void* hint, size_t alignment) - : address_(kNullAddress), size_(0) { - size_t page_size = AllocatePageSize(); - size_t alloc_size = RoundUp(size, page_size); - address_ = reinterpret_cast
( - AllocatePages(hint, alloc_size, alignment, PageAllocator::kNoAccess)); - if (address_ != kNullAddress) { - size_ = alloc_size; +VirtualMemory::VirtualMemory(v8::PageAllocator* page_allocator, size_t size, + void* hint, size_t alignment) + : page_allocator_(page_allocator) { + DCHECK_NOT_NULL(page_allocator); + size_t page_size = page_allocator_->AllocatePageSize(); + alignment = RoundUp(alignment, page_size); + size = RoundUp(size, page_size); + Address address = reinterpret_cast
(AllocatePages( + page_allocator_, hint, size, alignment, PageAllocator::kNoAccess)); + if (address != kNullAddress) { + region_ = base::AddressRegion(address, size); } } @@ -226,30 +226,31 @@ VirtualMemory::~VirtualMemory() { } void VirtualMemory::Reset() { - address_ = kNullAddress; - size_ = 0; + page_allocator_ = nullptr; + region_ = base::AddressRegion(); } bool VirtualMemory::SetPermissions(Address address, size_t size, PageAllocator::Permission access) { CHECK(InVM(address, size)); - bool result = v8::internal::SetPermissions(address, size, access); + bool result = + v8::internal::SetPermissions(page_allocator_, address, size, access); DCHECK(result); return result; } size_t VirtualMemory::Release(Address free_start) { DCHECK(IsReserved()); - DCHECK(IsAddressAligned(free_start, CommitPageSize())); + DCHECK(IsAddressAligned(free_start, page_allocator_->CommitPageSize())); // Notice: Order is important here. The VirtualMemory object might live // inside the allocated region. - const size_t free_size = size_ - (free_start - address_); + + const size_t old_size = region_.size(); + const size_t free_size = old_size - (free_start - region_.begin()); CHECK(InVM(free_start, free_size)); - DCHECK_LT(address_, free_start); - DCHECK_LT(free_start, address_ + size_); - CHECK(ReleasePages(reinterpret_cast(address_), size_, - size_ - free_size)); - size_ -= free_size; + region_.set_size(old_size - free_size); + CHECK(ReleasePages(page_allocator_, reinterpret_cast(region_.begin()), + old_size, region_.size())); return free_size; } @@ -257,41 +258,21 @@ void VirtualMemory::Free() { DCHECK(IsReserved()); // Notice: Order is important here. The VirtualMemory object might live // inside the allocated region. - Address address = address_; - size_t size = size_; - CHECK(InVM(address, size)); + v8::PageAllocator* page_allocator = page_allocator_; + base::AddressRegion region = region_; Reset(); - // FreePages expects size to be aligned to allocation granularity. Trimming - // may leave size at only commit granularity. Align it here. - CHECK(FreePages(reinterpret_cast(address), - RoundUp(size, AllocatePageSize()))); + // FreePages expects size to be aligned to allocation granularity however + // ReleasePages may leave size at only commit granularity. Align it here. + CHECK(FreePages(page_allocator, reinterpret_cast(region.begin()), + RoundUp(region.size(), page_allocator->AllocatePageSize()))); } void VirtualMemory::TakeControl(VirtualMemory* from) { DCHECK(!IsReserved()); - address_ = from->address_; - size_ = from->size_; + page_allocator_ = from->page_allocator_; + region_ = from->region_; from->Reset(); } -bool AllocVirtualMemory(size_t size, void* hint, VirtualMemory* result) { - VirtualMemory vm(size, hint); - if (vm.IsReserved()) { - result->TakeControl(&vm); - return true; - } - return false; -} - -bool AlignedAllocVirtualMemory(size_t size, size_t alignment, void* hint, - VirtualMemory* result) { - VirtualMemory vm(size, hint, alignment); - if (vm.IsReserved()) { - result->TakeControl(&vm); - return true; - } - return false; -} - } // namespace internal } // namespace v8 diff --git a/deps/v8/src/allocation.h b/deps/v8/src/allocation.h index 8e17a35514e4bf..3a21310af8e698 100644 --- a/deps/v8/src/allocation.h +++ b/deps/v8/src/allocation.h @@ -6,6 +6,7 @@ #define V8_ALLOCATION_H_ #include "include/v8-platform.h" +#include "src/base/address-region.h" #include "src/base/compiler-specific.h" #include "src/base/platform/platform.h" #include "src/globals.h" @@ -82,6 +83,9 @@ void* AllocWithRetry(size_t size); void* AlignedAlloc(size_t size, size_t alignment); void AlignedFree(void *ptr); +// Returns platfrom page allocator instance. Guaranteed to be a valid pointer. +V8_EXPORT_PRIVATE v8::PageAllocator* GetPlatformPageAllocator(); + // Gets the page granularity for AllocatePages and FreePages. Addresses returned // by AllocatePages and AllocatePage are aligned to this size. V8_EXPORT_PRIVATE size_t AllocatePageSize(); @@ -101,14 +105,16 @@ V8_EXPORT_PRIVATE void* GetRandomMmapAddr(); // AllocatePageSize(). Returns the address of the allocated memory, with the // specified size and alignment, or nullptr on failure. V8_EXPORT_PRIVATE -V8_WARN_UNUSED_RESULT void* AllocatePages(void* address, size_t size, +V8_WARN_UNUSED_RESULT void* AllocatePages(v8::PageAllocator* page_allocator, + void* address, size_t size, size_t alignment, PageAllocator::Permission access); // Frees memory allocated by a call to AllocatePages. |address| and |size| must // be multiples of AllocatePageSize(). Returns true on success, otherwise false. V8_EXPORT_PRIVATE -V8_WARN_UNUSED_RESULT bool FreePages(void* address, const size_t size); +V8_WARN_UNUSED_RESULT bool FreePages(v8::PageAllocator* page_allocator, + void* address, const size_t size); // Releases memory that is no longer needed. The range specified by |address| // and |size| must be an allocated memory region. |size| and |new_size| must be @@ -116,7 +122,8 @@ V8_WARN_UNUSED_RESULT bool FreePages(void* address, const size_t size); // Released memory is left in an undefined state, so it should not be accessed. // Returns true on success, otherwise false. V8_EXPORT_PRIVATE -V8_WARN_UNUSED_RESULT bool ReleasePages(void* address, size_t size, +V8_WARN_UNUSED_RESULT bool ReleasePages(v8::PageAllocator* page_allocator, + void* address, size_t size, size_t new_size); // Sets permissions according to |access|. |address| and |size| must be @@ -124,18 +131,21 @@ V8_WARN_UNUSED_RESULT bool ReleasePages(void* address, size_t size, // cause the memory contents to be lost. Returns true on success, otherwise // false. V8_EXPORT_PRIVATE -V8_WARN_UNUSED_RESULT bool SetPermissions(void* address, size_t size, +V8_WARN_UNUSED_RESULT bool SetPermissions(v8::PageAllocator* page_allocator, + void* address, size_t size, PageAllocator::Permission access); -inline bool SetPermissions(Address address, size_t size, - PageAllocator::Permission access) { - return SetPermissions(reinterpret_cast(address), size, access); +inline bool SetPermissions(v8::PageAllocator* page_allocator, Address address, + size_t size, PageAllocator::Permission access) { + return SetPermissions(page_allocator, reinterpret_cast(address), size, + access); } // Convenience function that allocates a single system page with read and write // permissions. |address| is a hint. Returns the base address of the memory and // the page size via |allocated| on success. Returns nullptr on failure. V8_EXPORT_PRIVATE -V8_WARN_UNUSED_RESULT byte* AllocatePage(void* address, size_t* allocated); +V8_WARN_UNUSED_RESULT byte* AllocatePage(v8::PageAllocator* page_allocator, + void* address, size_t* allocated); // Function that may release reserved memory regions to allow failed allocations // to succeed. |length| is the amount of memory needed. Returns |true| if memory @@ -143,50 +153,67 @@ V8_WARN_UNUSED_RESULT byte* AllocatePage(void* address, size_t* allocated); V8_EXPORT_PRIVATE bool OnCriticalMemoryPressure(size_t length); // Represents and controls an area of reserved memory. -class V8_EXPORT_PRIVATE VirtualMemory { +class V8_EXPORT_PRIVATE VirtualMemory final { public: // Empty VirtualMemory object, controlling no reserved memory. - VirtualMemory(); + VirtualMemory() = default; // Reserves virtual memory containing an area of the given size that is - // aligned per alignment. This may not be at the position returned by - // address(). - VirtualMemory(size_t size, void* hint, size_t alignment = AllocatePageSize()); + // aligned per |alignment| rounded up to the |page_allocator|'s allocate page + // size. + // This may not be at the position returned by address(). + VirtualMemory(v8::PageAllocator* page_allocator, size_t size, void* hint, + size_t alignment = 1); // Construct a virtual memory by assigning it some already mapped address // and size. - VirtualMemory(Address address, size_t size) - : address_(address), size_(size) {} + VirtualMemory(v8::PageAllocator* page_allocator, Address address, size_t size) + : page_allocator_(page_allocator), region_(address, size) { + DCHECK_NOT_NULL(page_allocator); + } // Releases the reserved memory, if any, controlled by this VirtualMemory // object. ~VirtualMemory(); + // Move constructor. + VirtualMemory(VirtualMemory&& other) V8_NOEXCEPT { TakeControl(&other); } + + // Move assignment operator. + VirtualMemory& operator=(VirtualMemory&& other) V8_NOEXCEPT { + TakeControl(&other); + return *this; + } + // Returns whether the memory has been reserved. - bool IsReserved() const { return address_ != kNullAddress; } + bool IsReserved() const { return region_.begin() != kNullAddress; } // Initialize or resets an embedded VirtualMemory object. void Reset(); + v8::PageAllocator* page_allocator() { return page_allocator_; } + + const base::AddressRegion& region() const { return region_; } + // Returns the start address of the reserved memory. // If the memory was reserved with an alignment, this address is not // necessarily aligned. The user might need to round it up to a multiple of // the alignment to get the start of the aligned block. Address address() const { DCHECK(IsReserved()); - return address_; + return region_.begin(); } Address end() const { DCHECK(IsReserved()); - return address_ + size_; + return region_.end(); } // Returns the size of the reserved memory. The returned value is only // meaningful when IsReserved() returns true. // If the memory was reserved with an alignment, this size may be larger // than the requested size. - size_t size() const { return size_; } + size_t size() const { return region_.size(); } // Sets permissions according to the access argument. address and size must be // multiples of CommitPageSize(). Returns true on success, otherwise false. @@ -204,17 +231,16 @@ class V8_EXPORT_PRIVATE VirtualMemory { void TakeControl(VirtualMemory* from); bool InVM(Address address, size_t size) { - return (address_ <= address) && ((address_ + size_) >= (address + size)); + return region_.contains(address, size); } private: - Address address_; // Start address of the virtual memory. - size_t size_; // Size of the virtual memory. -}; + // Page allocator that controls the virtual memory. + v8::PageAllocator* page_allocator_ = nullptr; + base::AddressRegion region_; -bool AllocVirtualMemory(size_t size, void* hint, VirtualMemory* result); -bool AlignedAllocVirtualMemory(size_t size, size_t alignment, void* hint, - VirtualMemory* result); + DISALLOW_COPY_AND_ASSIGN(VirtualMemory); +}; } // namespace internal } // namespace v8 diff --git a/deps/v8/src/api-arguments-inl.h b/deps/v8/src/api-arguments-inl.h index 89f606ed410a51..1e5d6b2aaa7ceb 100644 --- a/deps/v8/src/api-arguments-inl.h +++ b/deps/v8/src/api-arguments-inl.h @@ -8,6 +8,7 @@ #include "src/api-arguments.h" #include "src/api-inl.h" +#include "src/debug/debug.h" #include "src/objects/api-callbacks.h" #include "src/tracing/trace-event.h" #include "src/vm-state-inl.h" @@ -34,6 +35,10 @@ inline JSObject* PropertyCallbackArguments::holder() { return JSObject::cast(this->begin()[T::kHolderIndex]); } +inline Object* PropertyCallbackArguments::receiver() { + return Object::cast(this->begin()[T::kThisIndex]); +} + inline JSObject* FunctionCallbackArguments::holder() { return JSObject::cast(this->begin()[T::kHolderIndex]); } @@ -47,14 +52,24 @@ inline JSObject* FunctionCallbackArguments::holder() { DCHECK(!name->IsPrivate()); \ DCHECK_IMPLIES(name->IsSymbol(), interceptor->can_intercept_symbols()); -#define PREPARE_CALLBACK_INFO(ISOLATE, F, RETURN_VALUE, API_RETURN_TYPE, \ - CALLBACK_INFO) \ - if (ISOLATE->debug_execution_mode() == DebugInfo::kSideEffects && \ - !ISOLATE->debug()->PerformSideEffectCheckForCallback(CALLBACK_INFO)) { \ - return RETURN_VALUE(); \ - } \ - VMState state(ISOLATE); \ - ExternalCallbackScope call_scope(ISOLATE, FUNCTION_ADDR(F)); \ +#define PREPARE_CALLBACK_INFO(ISOLATE, F, RETURN_VALUE, API_RETURN_TYPE, \ + CALLBACK_INFO, RECEIVER, ACCESSOR_KIND) \ + if (ISOLATE->debug_execution_mode() == DebugInfo::kSideEffects && \ + !ISOLATE->debug()->PerformSideEffectCheckForCallback( \ + CALLBACK_INFO, RECEIVER, Debug::k##ACCESSOR_KIND)) { \ + return RETURN_VALUE(); \ + } \ + VMState state(ISOLATE); \ + ExternalCallbackScope call_scope(ISOLATE, FUNCTION_ADDR(F)); \ + PropertyCallbackInfo callback_info(begin()); + +#define PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK(ISOLATE, F, RETURN_VALUE, \ + API_RETURN_TYPE) \ + if (ISOLATE->debug_execution_mode() == DebugInfo::kSideEffects) { \ + return RETURN_VALUE(); \ + } \ + VMState state(ISOLATE); \ + ExternalCallbackScope call_scope(ISOLATE, FUNCTION_ADDR(F)); \ PropertyCallbackInfo callback_info(begin()); #define CREATE_NAMED_CALLBACK(FUNCTION, TYPE, RETURN_TYPE, API_RETURN_TYPE, \ @@ -65,11 +80,13 @@ inline JSObject* FunctionCallbackArguments::holder() { Isolate* isolate = this->isolate(); \ RuntimeCallTimerScope timer( \ isolate, RuntimeCallCounterId::kNamed##FUNCTION##Callback); \ + Handle receiver_check_unsupported; \ GenericNamedProperty##FUNCTION##Callback f = \ ToCData( \ interceptor->TYPE()); \ PREPARE_CALLBACK_INFO(isolate, f, Handle, API_RETURN_TYPE, \ - INFO_FOR_SIDE_EFFECT); \ + INFO_FOR_SIDE_EFFECT, receiver_check_unsupported, \ + NotAccessor); \ LOG(isolate, \ ApiNamedPropertyAccess("interceptor-named-" #TYPE, holder(), *name)); \ f(v8::Utils::ToLocal(name), callback_info); \ @@ -87,10 +104,12 @@ FOR_EACH_CALLBACK(CREATE_NAMED_CALLBACK) Isolate* isolate = this->isolate(); \ RuntimeCallTimerScope timer( \ isolate, RuntimeCallCounterId::kIndexed##FUNCTION##Callback); \ + Handle receiver_check_unsupported; \ IndexedProperty##FUNCTION##Callback f = \ ToCData(interceptor->TYPE()); \ PREPARE_CALLBACK_INFO(isolate, f, Handle, API_RETURN_TYPE, \ - INFO_FOR_SIDE_EFFECT); \ + INFO_FOR_SIDE_EFFECT, receiver_check_unsupported, \ + NotAccessor); \ LOG(isolate, ApiIndexedPropertyAccess("interceptor-indexed-" #TYPE, \ holder(), index)); \ f(index, callback_info); \ @@ -108,9 +127,11 @@ Handle FunctionCallbackArguments::Call(CallHandlerInfo* handler) { RuntimeCallTimerScope timer(isolate, RuntimeCallCounterId::kFunctionCallback); v8::FunctionCallback f = v8::ToCData(handler->callback()); + Handle receiver_check_unsupported; if (isolate->debug_execution_mode() == DebugInfo::kSideEffects && !isolate->debug()->PerformSideEffectCheckForCallback( - handle(handler, isolate))) { + handle(handler, isolate), receiver_check_unsupported, + Debug::kNotAccessor)) { return Handle(); } VMState state(isolate); @@ -167,10 +188,11 @@ Handle PropertyCallbackArguments::CallNamedDescriptor( Handle PropertyCallbackArguments::BasicCallNamedGetterCallback( GenericNamedPropertyGetterCallback f, Handle name, - Handle info) { + Handle info, Handle receiver) { DCHECK(!name->IsPrivate()); Isolate* isolate = this->isolate(); - PREPARE_CALLBACK_INFO(isolate, f, Handle, v8::Value, info); + PREPARE_CALLBACK_INFO(isolate, f, Handle, v8::Value, info, receiver, + Getter); f(v8::Utils::ToLocal(name), callback_info); return GetReturnValue(isolate); } @@ -184,9 +206,8 @@ Handle PropertyCallbackArguments::CallNamedSetter( Isolate* isolate = this->isolate(); RuntimeCallTimerScope timer(isolate, RuntimeCallCounterId::kNamedSetterCallback); - Handle side_effect_check_not_supported; - PREPARE_CALLBACK_INFO(isolate, f, Handle, v8::Value, - side_effect_check_not_supported); + PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK(isolate, f, Handle, + v8::Value); LOG(isolate, ApiNamedPropertyAccess("interceptor-named-set", holder(), *name)); f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), callback_info); @@ -202,9 +223,8 @@ Handle PropertyCallbackArguments::CallNamedDefiner( RuntimeCallCounterId::kNamedDefinerCallback); GenericNamedPropertyDefinerCallback f = ToCData(interceptor->definer()); - Handle side_effect_check_not_supported; - PREPARE_CALLBACK_INFO(isolate, f, Handle, v8::Value, - side_effect_check_not_supported); + PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK(isolate, f, Handle, + v8::Value); LOG(isolate, ApiNamedPropertyAccess("interceptor-named-define", holder(), *name)); f(v8::Utils::ToLocal(name), desc, callback_info); @@ -219,9 +239,8 @@ Handle PropertyCallbackArguments::CallIndexedSetter( RuntimeCallCounterId::kIndexedSetterCallback); IndexedPropertySetterCallback f = ToCData(interceptor->setter()); - Handle side_effect_check_not_supported; - PREPARE_CALLBACK_INFO(isolate, f, Handle, v8::Value, - side_effect_check_not_supported); + PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK(isolate, f, Handle, + v8::Value); LOG(isolate, ApiIndexedPropertyAccess("interceptor-indexed-set", holder(), index)); f(index, v8::Utils::ToLocal(value), callback_info); @@ -237,9 +256,8 @@ Handle PropertyCallbackArguments::CallIndexedDefiner( RuntimeCallCounterId::kIndexedDefinerCallback); IndexedPropertyDefinerCallback f = ToCData(interceptor->definer()); - Handle side_effect_check_not_supported; - PREPARE_CALLBACK_INFO(isolate, f, Handle, v8::Value, - side_effect_check_not_supported); + PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK(isolate, f, Handle, + v8::Value); LOG(isolate, ApiIndexedPropertyAccess("interceptor-indexed-define", holder(), index)); f(index, desc, callback_info); @@ -275,7 +293,9 @@ Handle PropertyCallbackArguments::CallIndexedDescriptor( Handle PropertyCallbackArguments::BasicCallIndexedGetterCallback( IndexedPropertyGetterCallback f, uint32_t index, Handle info) { Isolate* isolate = this->isolate(); - PREPARE_CALLBACK_INFO(isolate, f, Handle, v8::Value, info); + Handle receiver_check_unsupported; + PREPARE_CALLBACK_INFO(isolate, f, Handle, v8::Value, info, + receiver_check_unsupported, Getter); f(index, callback_info); return GetReturnValue(isolate); } @@ -287,7 +307,9 @@ Handle PropertyCallbackArguments::CallPropertyEnumerator( v8::ToCData(interceptor->enumerator()); // TODO(cbruni): assert same type for indexed and named callback. Isolate* isolate = this->isolate(); - PREPARE_CALLBACK_INFO(isolate, f, Handle, v8::Array, interceptor); + Handle receiver_check_unsupported; + PREPARE_CALLBACK_INFO(isolate, f, Handle, v8::Array, interceptor, + receiver_check_unsupported, NotAccessor); f(callback_info); return GetReturnValue(isolate); } @@ -303,7 +325,8 @@ Handle PropertyCallbackArguments::CallAccessorGetter( LOG(isolate, ApiNamedPropertyAccess("accessor-getter", holder(), *name)); AccessorNameGetterCallback f = ToCData(info->getter()); - return BasicCallNamedGetterCallback(f, name, info); + return BasicCallNamedGetterCallback(f, name, info, + handle(receiver(), isolate)); } Handle PropertyCallbackArguments::CallAccessorSetter( @@ -314,15 +337,15 @@ Handle PropertyCallbackArguments::CallAccessorSetter( RuntimeCallCounterId::kAccessorSetterCallback); AccessorNameSetterCallback f = ToCData(accessor_info->setter()); - Handle side_effect_check_not_supported; - PREPARE_CALLBACK_INFO(isolate, f, Handle, void, - side_effect_check_not_supported); + PREPARE_CALLBACK_INFO(isolate, f, Handle, void, accessor_info, + handle(receiver(), isolate), Setter); LOG(isolate, ApiNamedPropertyAccess("accessor-setter", holder(), *name)); f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), callback_info); return GetReturnValue(isolate); } #undef PREPARE_CALLBACK_INFO +#undef PREPARE_CALLBACK_INFO_FAIL_SIDE_EFFECT_CHECK } // namespace internal } // namespace v8 diff --git a/deps/v8/src/api-arguments.h b/deps/v8/src/api-arguments.h index 0a0a7362c7c687..d8fc2b49ab2824 100644 --- a/deps/v8/src/api-arguments.h +++ b/deps/v8/src/api-arguments.h @@ -26,12 +26,12 @@ class CustomArguments : public CustomArgumentsBase { public: static const int kReturnValueOffset = T::kReturnValueIndex; - ~CustomArguments() { + ~CustomArguments() override { this->begin()[kReturnValueOffset] = reinterpret_cast(kHandleZapValue); } - virtual inline void IterateInstance(RootVisitor* v) { + inline void IterateInstance(RootVisitor* v) override { v->VisitRootPointers(Root::kRelocatable, nullptr, values_, values_ + T::kArgsLength); } @@ -133,9 +133,10 @@ class PropertyCallbackArguments IndexedPropertyGetterCallback f, uint32_t index, Handle info); inline Handle BasicCallNamedGetterCallback( GenericNamedPropertyGetterCallback f, Handle name, - Handle info); + Handle info, Handle receiver = Handle()); inline JSObject* holder(); + inline Object* receiver(); // Don't copy PropertyCallbackArguments, because they would both have the // same prev_ pointer. diff --git a/deps/v8/src/api-inl.h b/deps/v8/src/api-inl.h index 50586814d8d1a3..5758729dd32e7f 100644 --- a/deps/v8/src/api-inl.h +++ b/deps/v8/src/api-inl.h @@ -7,6 +7,7 @@ #include "src/api.h" #include "src/objects-inl.h" +#include "src/objects/stack-frame-info.h" namespace v8 { diff --git a/deps/v8/src/api-natives.cc b/deps/v8/src/api-natives.cc index 977d6cdafc95fc..11b63d56d8da2c 100644 --- a/deps/v8/src/api-natives.cc +++ b/deps/v8/src/api-natives.cc @@ -114,9 +114,8 @@ MaybeHandle DefineDataProperty(Isolate* isolate, } #endif - MAYBE_RETURN_NULL( - Object::AddDataProperty(&it, value, attributes, kThrowOnError, - Object::CERTAINLY_NOT_STORE_FROM_KEYED)); + MAYBE_RETURN_NULL(Object::AddDataProperty( + &it, value, attributes, kThrowOnError, StoreOrigin::kNamed)); return value; } @@ -403,8 +402,10 @@ MaybeHandle InstantiateObject(Isolate* isolate, } Handle object; - ASSIGN_RETURN_ON_EXCEPTION(isolate, object, - JSObject::New(constructor, new_target), JSObject); + ASSIGN_RETURN_ON_EXCEPTION( + isolate, object, + JSObject::New(constructor, new_target, Handle::null()), + JSObject); if (is_prototype) JSObject::OptimizeAsPrototype(object); @@ -495,8 +496,15 @@ MaybeHandle InstantiateFunction(Isolate* isolate, parent_prototype); } } + InstanceType function_type = + (!data->needs_access_check() && + data->named_property_handler()->IsUndefined(isolate) && + data->indexed_property_handler()->IsUndefined(isolate)) + ? JS_API_OBJECT_TYPE + : JS_SPECIAL_API_OBJECT_TYPE; + Handle function = ApiNatives::CreateApiFunction( - isolate, data, prototype, ApiNatives::JavaScriptObjectType, maybe_name); + isolate, data, prototype, function_type, maybe_name); if (serial_number) { // Cache the function. CacheTemplateInstantiation(isolate, serial_number, CachingMode::kUnlimited, @@ -625,8 +633,7 @@ void ApiNatives::AddNativeDataProperty(Isolate* isolate, Handle ApiNatives::CreateApiFunction( Isolate* isolate, Handle obj, - Handle prototype, ApiInstanceType instance_type, - MaybeHandle maybe_name) { + Handle prototype, InstanceType type, MaybeHandle maybe_name) { Handle shared = FunctionTemplateInfo::GetOrCreateSharedFunctionInfo(isolate, obj, maybe_name); @@ -670,33 +677,10 @@ Handle ApiNatives::CreateApiFunction( immutable_proto = instance_template->immutable_proto(); } - // TODO(svenpanne) Kill ApiInstanceType and refactor things by generalizing - // JSObject::GetHeaderSize. - int instance_size = kPointerSize * embedder_field_count; - InstanceType type; - switch (instance_type) { - case JavaScriptObjectType: - if (!obj->needs_access_check() && - obj->named_property_handler()->IsUndefined(isolate) && - obj->indexed_property_handler()->IsUndefined(isolate)) { - type = JS_API_OBJECT_TYPE; - } else { - type = JS_SPECIAL_API_OBJECT_TYPE; - } - instance_size += JSObject::kHeaderSize; - break; - case GlobalObjectType: - type = JS_GLOBAL_OBJECT_TYPE; - instance_size += JSGlobalObject::kSize; - break; - case GlobalProxyType: - type = JS_GLOBAL_PROXY_TYPE; - instance_size += JSGlobalProxy::kSize; - break; - default: - UNREACHABLE(); - break; - } + // JS_FUNCTION_TYPE requires information about the prototype slot. + DCHECK_NE(JS_FUNCTION_TYPE, type); + int instance_size = + JSObject::GetHeaderSize(type) + kPointerSize * embedder_field_count; Handle map = isolate->factory()->NewMap(type, instance_size, TERMINAL_FAST_ELEMENTS_KIND); diff --git a/deps/v8/src/api-natives.h b/deps/v8/src/api-natives.h index e8bb32d40a02fb..ff6cdc6c864537 100644 --- a/deps/v8/src/api-natives.h +++ b/deps/v8/src/api-natives.h @@ -9,6 +9,7 @@ #include "src/base/macros.h" #include "src/handles.h" #include "src/maybe-handles.h" +#include "src/objects.h" #include "src/property-details.h" namespace v8 { @@ -33,15 +34,9 @@ class ApiNatives { V8_WARN_UNUSED_RESULT static MaybeHandle InstantiateRemoteObject( Handle data); - enum ApiInstanceType { - JavaScriptObjectType, - GlobalObjectType, - GlobalProxyType - }; - static Handle CreateApiFunction( Isolate* isolate, Handle obj, - Handle prototype, ApiInstanceType instance_type, + Handle prototype, InstanceType type, MaybeHandle name = MaybeHandle()); static void AddDataProperty(Isolate* isolate, Handle info, diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index 5ac9aec0479277..3f62a23d43c1c8 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -58,7 +58,9 @@ #include "src/objects/js-regexp-inl.h" #include "src/objects/module-inl.h" #include "src/objects/ordered-hash-table-inl.h" +#include "src/objects/stack-frame-info-inl.h" #include "src/objects/templates.h" +#include "src/parsing/parse-info.h" #include "src/parsing/parser.h" #include "src/parsing/scanner-character-streams.h" #include "src/pending-compilation-error-handler.h" @@ -834,6 +836,7 @@ StartupData SnapshotCreator::CreateBlob( } data->created_ = true; + DCHECK(i::Snapshot::VerifyChecksum(&result)); return result; } @@ -876,12 +879,12 @@ void RegisteredExtension::UnregisterAll() { namespace { class ExtensionResource : public String::ExternalOneByteStringResource { public: - ExtensionResource() : data_(0), length_(0) {} + ExtensionResource() : data_(nullptr), length_(0) {} ExtensionResource(const char* data, size_t length) : data_(data), length_(length) {} - const char* data() const { return data_; } - size_t length() const { return length_; } - virtual void Dispose() {} + const char* data() const override { return data_; } + size_t length() const override { return length_; } + void Dispose() override {} private: const char* data_; @@ -1391,7 +1394,7 @@ static Local FunctionTemplateNew( next_serial_number = isolate->heap()->GetNextTemplateSerialNumber(); } obj->set_serial_number(i::Smi::FromInt(next_serial_number)); - if (callback != 0) { + if (callback != nullptr) { Utils::ToLocal(obj)->SetCallHandler(callback, data, side_effect_type); } obj->set_length(length); @@ -1676,7 +1679,8 @@ static void TemplateSetAccessor( Template* template_obj, v8::Local name, Getter getter, Setter setter, Data data, AccessControl settings, PropertyAttribute attribute, v8::Local signature, bool is_special_data_property, - bool replace_on_access, SideEffectType getter_side_effect_type) { + bool replace_on_access, SideEffectType getter_side_effect_type, + SideEffectType setter_side_effect_type) { auto info = Utils::OpenHandle(template_obj); auto isolate = info->GetIsolate(); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); @@ -1686,8 +1690,8 @@ static void TemplateSetAccessor( is_special_data_property, replace_on_access); accessor_info->set_initial_property_attributes( static_cast(attribute)); - accessor_info->set_has_no_side_effect(getter_side_effect_type == - SideEffectType::kHasNoSideEffect); + accessor_info->set_getter_side_effect_type(getter_side_effect_type); + accessor_info->set_setter_side_effect_type(setter_side_effect_type); i::ApiNatives::AddNativeDataProperty(isolate, info, accessor_info); } @@ -1695,29 +1699,34 @@ void Template::SetNativeDataProperty( v8::Local name, AccessorGetterCallback getter, AccessorSetterCallback setter, v8::Local data, PropertyAttribute attribute, v8::Local signature, - AccessControl settings, SideEffectType getter_side_effect_type) { + AccessControl settings, SideEffectType getter_side_effect_type, + SideEffectType setter_side_effect_type) { TemplateSetAccessor(this, name, getter, setter, data, settings, attribute, - signature, true, false, getter_side_effect_type); + signature, true, false, getter_side_effect_type, + setter_side_effect_type); } void Template::SetNativeDataProperty( v8::Local name, AccessorNameGetterCallback getter, AccessorNameSetterCallback setter, v8::Local data, PropertyAttribute attribute, v8::Local signature, - AccessControl settings, SideEffectType getter_side_effect_type) { + AccessControl settings, SideEffectType getter_side_effect_type, + SideEffectType setter_side_effect_type) { TemplateSetAccessor(this, name, getter, setter, data, settings, attribute, - signature, true, false, getter_side_effect_type); + signature, true, false, getter_side_effect_type, + setter_side_effect_type); } void Template::SetLazyDataProperty(v8::Local name, AccessorNameGetterCallback getter, v8::Local data, PropertyAttribute attribute, - SideEffectType getter_side_effect_type) { + SideEffectType getter_side_effect_type, + SideEffectType setter_side_effect_type) { TemplateSetAccessor(this, name, getter, static_cast(nullptr), data, DEFAULT, attribute, Local(), true, - true, getter_side_effect_type); + true, getter_side_effect_type, setter_side_effect_type); } void Template::SetIntrinsicDataProperty(Local name, Intrinsic intrinsic, @@ -1737,10 +1746,11 @@ void ObjectTemplate::SetAccessor(v8::Local name, v8::Local data, AccessControl settings, PropertyAttribute attribute, v8::Local signature, - SideEffectType getter_side_effect_type) { + SideEffectType getter_side_effect_type, + SideEffectType setter_side_effect_type) { TemplateSetAccessor(this, name, getter, setter, data, settings, attribute, signature, i::FLAG_disable_old_api_accessors, false, - getter_side_effect_type); + getter_side_effect_type, setter_side_effect_type); } void ObjectTemplate::SetAccessor(v8::Local name, @@ -1749,10 +1759,11 @@ void ObjectTemplate::SetAccessor(v8::Local name, v8::Local data, AccessControl settings, PropertyAttribute attribute, v8::Local signature, - SideEffectType getter_side_effect_type) { + SideEffectType getter_side_effect_type, + SideEffectType setter_side_effect_type) { TemplateSetAccessor(this, name, getter, setter, data, settings, attribute, signature, i::FLAG_disable_old_api_accessors, false, - getter_side_effect_type); + getter_side_effect_type, setter_side_effect_type); } template CreateInterceptorInfo( isolate->factory()->NewStruct(i::INTERCEPTOR_INFO_TYPE, i::TENURED)); obj->set_flags(0); - if (getter != 0) SET_FIELD_WRAPPED(isolate, obj, set_getter, getter); - if (setter != 0) SET_FIELD_WRAPPED(isolate, obj, set_setter, setter); - if (query != 0) SET_FIELD_WRAPPED(isolate, obj, set_query, query); - if (descriptor != 0) + if (getter != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_getter, getter); + if (setter != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_setter, setter); + if (query != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_query, query); + if (descriptor != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_descriptor, descriptor); - if (remover != 0) SET_FIELD_WRAPPED(isolate, obj, set_deleter, remover); - if (enumerator != 0) + if (remover != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_deleter, remover); + if (enumerator != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_enumerator, enumerator); - if (definer != 0) SET_FIELD_WRAPPED(isolate, obj, set_definer, definer); + if (definer != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_definer, definer); obj->set_can_intercept_symbols( !(static_cast(flags) & static_cast(PropertyHandlerFlags::kOnlyInterceptStrings))); @@ -2001,24 +2012,15 @@ ScriptCompiler::CachedData::~CachedData() { } } - bool ScriptCompiler::ExternalSourceStream::SetBookmark() { return false; } - void ScriptCompiler::ExternalSourceStream::ResetToBookmark() { UNREACHABLE(); } ScriptCompiler::StreamedSource::StreamedSource(ExternalSourceStream* stream, Encoding encoding) : impl_(new i::ScriptStreamingData(stream, encoding)) {} -ScriptCompiler::StreamedSource::~StreamedSource() { delete impl_; } - - -const ScriptCompiler::CachedData* -ScriptCompiler::StreamedSource::GetCachedData() const { - return impl_->cached_data.get(); -} - +ScriptCompiler::StreamedSource::~StreamedSource() = default; Local