From 4bdfea1cb0e0c0a6f159a294b74c2eb74bab9562 Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Fri, 16 Sep 2016 15:50:28 +0200 Subject: [PATCH 1/7] deps: update V8 to lkgr 6a72f3731bdb3a0f175b5dce7dcfad9faab4f4f7 --- deps/v8/.gitignore | 13 +- deps/v8/.gn | 5 +- deps/v8/AUTHORS | 3 + deps/v8/BUILD.gn | 221 +- deps/v8/DEPS | 48 +- deps/v8/OWNERS | 1 - deps/v8/WATCHLISTS | 1 - .../trace_event/common/trace_event_common.h | 1119 ------ deps/v8/build_overrides/build.gni | 8 + deps/v8/build_overrides/v8.gni | 16 +- .../config/win/msvs_dependencies.isolate | 77 - deps/v8/gypfiles/gyp_v8 | 14 +- deps/v8/gypfiles/standalone.gypi | 6 +- deps/v8/include/DEPS | 4 + deps/v8/include/OWNERS | 5 + deps/v8/include/v8-inspector-protocol.h | 13 + deps/v8/include/v8-inspector.h | 267 ++ deps/v8/include/v8-profiler.h | 14 + deps/v8/include/v8-version.h | 2 +- deps/v8/include/v8.h | 804 +++- deps/v8/infra/mb/mb_config.pyl | 254 +- deps/v8/src/api-arguments-inl.h | 41 +- deps/v8/src/api-arguments.cc | 4 - deps/v8/src/api-arguments.h | 7 + deps/v8/src/api-natives.cc | 7 +- deps/v8/src/api.cc | 541 ++- deps/v8/src/arguments.h | 7 +- deps/v8/src/arm/assembler-arm.cc | 353 +- deps/v8/src/arm/assembler-arm.h | 21 +- deps/v8/src/arm/code-stubs-arm.cc | 100 +- deps/v8/src/arm/constants-arm.h | 24 +- deps/v8/src/arm/disasm-arm.cc | 86 +- deps/v8/src/arm/interface-descriptors-arm.cc | 14 +- deps/v8/src/arm/macro-assembler-arm.cc | 157 +- deps/v8/src/arm/macro-assembler-arm.h | 40 +- deps/v8/src/arm/simulator-arm.cc | 152 +- deps/v8/src/arm/simulator-arm.h | 3 + deps/v8/src/arm64/code-stubs-arm64.cc | 110 +- .../src/arm64/interface-descriptors-arm64.cc | 14 +- deps/v8/src/arm64/macro-assembler-arm64.cc | 9 +- deps/v8/src/asmjs/asm-js.cc | 33 +- deps/v8/src/asmjs/asm-js.h | 19 +- deps/v8/src/asmjs/asm-typer.cc | 7 +- deps/v8/src/asmjs/asm-typer.h | 2 +- deps/v8/src/asmjs/asm-wasm-builder.cc | 34 +- deps/v8/src/assembler.cc | 11 +- deps/v8/src/ast/OWNERS | 1 + deps/v8/src/ast/ast-expression-rewriter.cc | 9 +- deps/v8/src/ast/ast-expression-rewriter.h | 2 +- deps/v8/src/ast/ast-literal-reindexer.cc | 9 +- deps/v8/src/ast/ast-literal-reindexer.h | 2 +- deps/v8/src/ast/ast-numbering.cc | 53 +- deps/v8/src/ast/ast-traversal-visitor.h | 4 +- deps/v8/src/ast/ast-type-bounds.h | 12 +- deps/v8/src/ast/ast-types.cc | 1268 +++++++ deps/v8/src/ast/ast-types.h | 1024 +++++ deps/v8/src/ast/ast-value-factory.h | 4 + deps/v8/src/ast/ast.cc | 82 +- deps/v8/src/ast/ast.h | 251 +- deps/v8/src/ast/compile-time-value.cc | 56 + deps/v8/src/ast/compile-time-value.h | 45 + deps/v8/src/ast/context-slot-cache.cc | 7 + deps/v8/src/ast/context-slot-cache.h | 1 - deps/v8/src/ast/modules.cc | 169 +- deps/v8/src/ast/modules.h | 81 +- deps/v8/src/ast/prettyprinter.cc | 75 +- deps/v8/src/ast/prettyprinter.h | 3 +- deps/v8/src/ast/scopeinfo.cc | 637 ++-- deps/v8/src/ast/scopeinfo.h | 18 - deps/v8/src/ast/scopes.cc | 910 +++-- deps/v8/src/ast/scopes.h | 255 +- deps/v8/src/ast/variables.cc | 45 +- deps/v8/src/ast/variables.h | 123 +- deps/v8/src/background-parsing-task.cc | 16 +- deps/v8/src/background-parsing-task.h | 14 +- deps/v8/src/bailout-reason.h | 8 +- deps/v8/src/base.isolate | 8 - deps/v8/src/base/build_config.h | 12 +- deps/v8/src/base/debug/stack_trace_posix.cc | 23 +- deps/v8/src/base/ieee754.cc | 2 +- deps/v8/src/base/macros.h | 6 - deps/v8/src/base/platform/platform-macos.cc | 5 +- deps/v8/src/base/platform/semaphore.cc | 13 - deps/v8/src/bootstrapper.cc | 79 +- deps/v8/src/builtins/arm/builtins-arm.cc | 220 +- deps/v8/src/builtins/arm64/builtins-arm64.cc | 261 +- deps/v8/src/builtins/builtins-array.cc | 286 +- deps/v8/src/builtins/builtins-callsite.cc | 150 +- deps/v8/src/builtins/builtins-conversion.cc | 125 +- deps/v8/src/builtins/builtins-dataview.cc | 204 + deps/v8/src/builtins/builtins-date.cc | 135 +- deps/v8/src/builtins/builtins-error.cc | 2 +- deps/v8/src/builtins/builtins-global.cc | 109 + deps/v8/src/builtins/builtins-handler.cc | 17 +- deps/v8/src/builtins/builtins-internal.cc | 19 +- deps/v8/src/builtins/builtins-interpreter.cc | 22 + deps/v8/src/builtins/builtins-number.cc | 138 + deps/v8/src/builtins/builtins-object.cc | 2 +- .../builtins/builtins-sharedarraybuffer.cc | 1 + deps/v8/src/builtins/builtins-string.cc | 85 + deps/v8/src/builtins/builtins-utils.h | 51 +- deps/v8/src/builtins/builtins.h | 87 +- deps/v8/src/builtins/ia32/builtins-ia32.cc | 374 +- deps/v8/src/builtins/mips/builtins-mips.cc | 254 +- .../v8/src/builtins/mips64/builtins-mips64.cc | 252 +- deps/v8/src/builtins/ppc/builtins-ppc.cc | 158 +- deps/v8/src/builtins/s390/builtins-s390.cc | 155 +- deps/v8/src/builtins/x64/builtins-x64.cc | 265 +- deps/v8/src/builtins/x87/builtins-x87.cc | 276 +- deps/v8/src/code-factory.cc | 22 +- deps/v8/src/code-factory.h | 4 +- deps/v8/src/code-stub-assembler.cc | 1716 +++++++-- deps/v8/src/code-stub-assembler.h | 236 +- deps/v8/src/code-stubs-hydrogen.cc | 346 +- deps/v8/src/code-stubs.cc | 381 +- deps/v8/src/code-stubs.h | 187 +- deps/v8/src/codegen.cc | 3 +- deps/v8/src/collector.h | 2 +- deps/v8/src/compilation-info.cc | 216 ++ deps/v8/src/compilation-info.h | 404 ++ .../compiler-dispatcher-job.cc | 122 +- .../compiler-dispatcher-job.h | 26 +- .../optimizing-compile-dispatcher.cc | 2 + deps/v8/src/compiler.cc | 620 ++- deps/v8/src/compiler.h | 448 +-- deps/v8/src/compiler/access-builder.cc | 149 +- deps/v8/src/compiler/access-builder.h | 15 +- deps/v8/src/compiler/access-info.cc | 114 +- deps/v8/src/compiler/access-info.h | 20 +- deps/v8/src/compiler/all-nodes.cc | 23 +- deps/v8/src/compiler/all-nodes.h | 12 +- .../v8/src/compiler/arm/code-generator-arm.cc | 234 +- .../compiler/arm/instruction-selector-arm.cc | 19 +- .../compiler/arm64/code-generator-arm64.cc | 29 +- .../arm64/instruction-selector-arm64.cc | 32 +- deps/v8/src/compiler/ast-graph-builder.cc | 173 +- deps/v8/src/compiler/ast-graph-builder.h | 12 +- .../compiler/ast-loop-assignment-analyzer.cc | 6 +- .../src/compiler/basic-block-instrumentor.cc | 3 +- .../v8/src/compiler/bytecode-graph-builder.cc | 380 +- deps/v8/src/compiler/bytecode-graph-builder.h | 46 +- deps/v8/src/compiler/code-assembler.cc | 27 + deps/v8/src/compiler/code-assembler.h | 22 +- deps/v8/src/compiler/code-generator.cc | 21 +- deps/v8/src/compiler/code-generator.h | 6 +- .../src/compiler/common-operator-reducer.cc | 8 +- deps/v8/src/compiler/common-operator.h | 2 +- .../src/compiler/effect-control-linearizer.cc | 185 +- .../src/compiler/effect-control-linearizer.h | 4 + deps/v8/src/compiler/escape-analysis.cc | 5 +- deps/v8/src/compiler/graph-visualizer.cc | 2 +- .../src/compiler/ia32/code-generator-ia32.cc | 5 +- .../ia32/instruction-selector-ia32.cc | 6 +- deps/v8/src/compiler/instruction-codes.h | 1 - deps/v8/src/compiler/instruction-scheduler.cc | 24 +- deps/v8/src/compiler/instruction-scheduler.h | 9 +- .../src/compiler/instruction-selector-impl.h | 6 + deps/v8/src/compiler/instruction-selector.cc | 87 +- deps/v8/src/compiler/instruction-selector.h | 12 +- deps/v8/src/compiler/instruction.cc | 104 +- deps/v8/src/compiler/instruction.h | 24 +- deps/v8/src/compiler/js-builtin-reducer.cc | 237 +- deps/v8/src/compiler/js-builtin-reducer.h | 10 +- deps/v8/src/compiler/js-call-reducer.cc | 39 +- deps/v8/src/compiler/js-create-lowering.cc | 65 +- deps/v8/src/compiler/js-generic-lowering.cc | 36 +- .../js-global-object-specialization.cc | 56 +- .../js-global-object-specialization.h | 4 +- deps/v8/src/compiler/js-inlining-heuristic.cc | 301 +- deps/v8/src/compiler/js-inlining-heuristic.h | 21 +- deps/v8/src/compiler/js-inlining.cc | 232 +- deps/v8/src/compiler/js-inlining.h | 5 +- deps/v8/src/compiler/js-intrinsic-lowering.cc | 8 +- .../js-native-context-specialization.cc | 194 +- .../js-native-context-specialization.h | 4 +- deps/v8/src/compiler/js-operator.cc | 75 +- deps/v8/src/compiler/js-operator.h | 68 +- deps/v8/src/compiler/js-typed-lowering.cc | 489 +-- deps/v8/src/compiler/js-typed-lowering.h | 15 +- deps/v8/src/compiler/linkage.cc | 83 +- deps/v8/src/compiler/live-range-separator.cc | 16 + deps/v8/src/compiler/load-elimination.cc | 344 +- deps/v8/src/compiler/load-elimination.h | 49 + .../src/compiler/loop-variable-optimizer.cc | 9 +- .../v8/src/compiler/loop-variable-optimizer.h | 2 +- .../src/compiler/machine-operator-reducer.cc | 5 +- deps/v8/src/compiler/machine-operator.cc | 31 +- deps/v8/src/compiler/machine-operator.h | 12 +- deps/v8/src/compiler/memory-optimizer.cc | 9 +- .../src/compiler/mips/code-generator-mips.cc | 5 +- .../mips/instruction-selector-mips.cc | 6 +- .../compiler/mips64/code-generator-mips64.cc | 5 +- .../mips64/instruction-selector-mips64.cc | 6 +- deps/v8/src/compiler/move-optimizer.cc | 2 +- deps/v8/src/compiler/node-properties.h | 2 +- deps/v8/src/compiler/node.h | 2 +- deps/v8/src/compiler/opcodes.h | 14 +- deps/v8/src/compiler/operation-typer.cc | 14 +- deps/v8/src/compiler/operation-typer.h | 6 +- deps/v8/src/compiler/osr.cc | 18 +- deps/v8/src/compiler/pipeline-statistics.cc | 3 +- deps/v8/src/compiler/pipeline.cc | 66 +- .../v8/src/compiler/ppc/code-generator-ppc.cc | 5 +- .../compiler/ppc/instruction-selector-ppc.cc | 4 + deps/v8/src/compiler/raw-machine-assembler.cc | 24 + deps/v8/src/compiler/raw-machine-assembler.h | 8 + deps/v8/src/compiler/register-allocator.cc | 16 +- deps/v8/src/compiler/representation-change.cc | 206 +- deps/v8/src/compiler/representation-change.h | 17 +- .../src/compiler/s390/code-generator-s390.cc | 5 +- .../s390/instruction-selector-s390.cc | 7 +- deps/v8/src/compiler/simplified-lowering.cc | 697 ++-- deps/v8/src/compiler/simplified-lowering.h | 9 +- .../compiler/simplified-operator-reducer.cc | 12 +- deps/v8/src/compiler/simplified-operator.cc | 12 +- deps/v8/src/compiler/simplified-operator.h | 8 +- .../src/compiler/store-store-elimination.cc | 20 +- deps/v8/src/{ => compiler}/type-cache.cc | 5 +- deps/v8/src/compiler/type-cache.h | 157 + deps/v8/src/compiler/type-hint-analyzer.cc | 21 +- deps/v8/src/compiler/type-hint-analyzer.h | 1 + deps/v8/src/compiler/typed-optimization.cc | 253 ++ deps/v8/src/compiler/typed-optimization.h | 73 + deps/v8/src/compiler/typer.cc | 789 +--- deps/v8/src/compiler/typer.h | 7 +- deps/v8/src/{ => compiler}/types.cc | 219 +- deps/v8/src/{ => compiler}/types.h | 282 +- deps/v8/src/compiler/verifier.cc | 218 +- deps/v8/src/compiler/wasm-compiler.cc | 172 +- deps/v8/src/compiler/wasm-compiler.h | 9 +- .../v8/src/compiler/x64/code-generator-x64.cc | 56 +- .../src/compiler/x64/instruction-codes-x64.h | 1 + .../compiler/x64/instruction-scheduler-x64.cc | 1 + .../compiler/x64/instruction-selector-x64.cc | 74 +- .../v8/src/compiler/x87/code-generator-x87.cc | 77 +- .../src/compiler/x87/instruction-codes-x87.h | 2 + .../compiler/x87/instruction-selector-x87.cc | 18 +- deps/v8/src/contexts.cc | 104 +- deps/v8/src/contexts.h | 123 +- deps/v8/src/counters-inl.h | 14 +- deps/v8/src/counters.cc | 49 +- deps/v8/src/counters.h | 107 +- deps/v8/src/crankshaft/arm/lithium-arm.cc | 2 +- .../src/crankshaft/arm/lithium-codegen-arm.cc | 8 +- deps/v8/src/crankshaft/arm64/lithium-arm64.cc | 2 +- .../crankshaft/arm64/lithium-codegen-arm64.cc | 8 +- deps/v8/src/crankshaft/compilation-phase.h | 3 +- .../src/crankshaft/hydrogen-instructions.cc | 24 +- .../v8/src/crankshaft/hydrogen-instructions.h | 9 +- deps/v8/src/crankshaft/hydrogen-types.cc | 20 +- deps/v8/src/crankshaft/hydrogen-types.h | 4 +- deps/v8/src/crankshaft/hydrogen.cc | 220 +- deps/v8/src/crankshaft/hydrogen.h | 21 +- .../crankshaft/ia32/lithium-codegen-ia32.cc | 8 +- deps/v8/src/crankshaft/ia32/lithium-ia32.cc | 2 +- deps/v8/src/crankshaft/lithium-codegen.cc | 2 + deps/v8/src/crankshaft/lithium-codegen.h | 4 +- .../crankshaft/mips/lithium-codegen-mips.cc | 10 +- deps/v8/src/crankshaft/mips/lithium-mips.cc | 2 +- .../mips64/lithium-codegen-mips64.cc | 10 +- .../src/crankshaft/mips64/lithium-mips64.cc | 2 +- .../src/crankshaft/ppc/lithium-codegen-ppc.cc | 8 +- deps/v8/src/crankshaft/ppc/lithium-ppc.cc | 2 +- .../crankshaft/s390/lithium-codegen-s390.cc | 8 +- deps/v8/src/crankshaft/s390/lithium-s390.cc | 2 +- deps/v8/src/crankshaft/typing.cc | 151 +- deps/v8/src/crankshaft/typing.h | 22 +- .../src/crankshaft/x64/lithium-codegen-x64.cc | 8 +- deps/v8/src/crankshaft/x64/lithium-x64.cc | 2 +- .../src/crankshaft/x87/lithium-codegen-x87.cc | 8 +- deps/v8/src/crankshaft/x87/lithium-x87.cc | 2 +- deps/v8/src/dateparser.h | 2 +- deps/v8/src/debug/arm/debug-arm.cc | 4 +- deps/v8/src/debug/arm64/debug-arm64.cc | 4 +- deps/v8/src/debug/debug-evaluate.cc | 15 +- deps/v8/src/debug/debug-scopes.cc | 18 +- deps/v8/src/debug/debug-scopes.h | 2 + deps/v8/src/debug/debug.cc | 33 +- deps/v8/src/debug/debug.h | 11 +- deps/v8/src/debug/ia32/debug-ia32.cc | 4 +- deps/v8/src/debug/liveedit.cc | 57 +- deps/v8/src/debug/liveedit.h | 14 - deps/v8/src/debug/mips/debug-mips.cc | 4 +- deps/v8/src/debug/mips64/debug-mips64.cc | 4 +- deps/v8/src/debug/ppc/debug-ppc.cc | 4 +- deps/v8/src/debug/s390/debug-s390.cc | 4 +- deps/v8/src/debug/x64/debug-x64.cc | 5 +- deps/v8/src/debug/x87/debug-x87.cc | 4 +- deps/v8/src/deoptimize-reason.cc | 2 +- deps/v8/src/deoptimize-reason.h | 2 +- deps/v8/src/deoptimizer.cc | 199 +- deps/v8/src/deoptimizer.h | 14 +- deps/v8/src/effects.h | 24 +- deps/v8/src/elements.cc | 49 +- deps/v8/src/elements.h | 3 + deps/v8/src/execution.cc | 27 - deps/v8/src/execution.h | 5 - .../v8/src/extensions/statistics-extension.cc | 3 +- deps/v8/src/factory.cc | 74 +- deps/v8/src/factory.h | 22 +- deps/v8/src/field-type.cc | 14 +- deps/v8/src/field-type.h | 3 +- deps/v8/src/flag-definitions.h | 101 +- deps/v8/src/frames-inl.h | 2 + deps/v8/src/frames.cc | 5 +- deps/v8/src/frames.h | 5 +- .../src/full-codegen/arm/full-codegen-arm.cc | 108 +- .../full-codegen/arm64/full-codegen-arm64.cc | 108 +- deps/v8/src/full-codegen/full-codegen.cc | 98 +- deps/v8/src/full-codegen/full-codegen.h | 45 +- .../full-codegen/ia32/full-codegen-ia32.cc | 108 +- .../full-codegen/mips/full-codegen-mips.cc | 108 +- .../mips64/full-codegen-mips64.cc | 108 +- .../src/full-codegen/ppc/full-codegen-ppc.cc | 111 +- .../full-codegen/s390/full-codegen-s390.cc | 108 +- .../src/full-codegen/x64/full-codegen-x64.cc | 106 +- .../src/full-codegen/x87/full-codegen-x87.cc | 97 +- deps/v8/src/gdb-jit.cc | 1 - deps/v8/src/globals.h | 135 +- deps/v8/src/handles.h | 8 +- deps/v8/src/heap-symbols.h | 32 +- deps/v8/src/heap/gc-tracer.cc | 453 ++- deps/v8/src/heap/gc-tracer.h | 161 +- deps/v8/src/heap/heap-inl.h | 180 +- deps/v8/src/heap/heap.cc | 550 +-- deps/v8/src/heap/heap.h | 493 +-- deps/v8/src/heap/incremental-marking-inl.h | 10 + deps/v8/src/heap/incremental-marking-job.cc | 122 +- deps/v8/src/heap/incremental-marking-job.h | 53 +- deps/v8/src/heap/incremental-marking.cc | 313 +- deps/v8/src/heap/incremental-marking.h | 49 +- deps/v8/src/heap/mark-compact.cc | 18 +- deps/v8/src/heap/mark-compact.h | 14 +- deps/v8/src/heap/memory-reducer.cc | 11 +- deps/v8/src/heap/object-stats.cc | 2 - deps/v8/src/heap/objects-visiting.h | 2 +- deps/v8/src/heap/scavenge-job.cc | 2 +- deps/v8/src/heap/spaces.cc | 97 +- deps/v8/src/heap/spaces.h | 245 +- deps/v8/src/i18n.cc | 12 +- deps/v8/src/ia32/code-stubs-ia32.cc | 96 +- .../v8/src/ia32/interface-descriptors-ia32.cc | 14 +- deps/v8/src/ia32/macro-assembler-ia32.cc | 7 +- deps/v8/src/ic/arm/handler-compiler-arm.cc | 18 - deps/v8/src/ic/arm/ic-arm.cc | 7 + .../v8/src/ic/arm64/handler-compiler-arm64.cc | 19 - deps/v8/src/ic/arm64/ic-arm64.cc | 8 + deps/v8/src/ic/handler-compiler.cc | 10 +- deps/v8/src/ic/handler-compiler.h | 2 - deps/v8/src/ic/ia32/handler-compiler-ia32.cc | 26 - deps/v8/src/ic/ia32/ic-ia32.cc | 7 + deps/v8/src/ic/ic-inl.h | 1 - deps/v8/src/ic/ic-state.cc | 44 +- deps/v8/src/ic/ic-state.h | 13 +- deps/v8/src/ic/mips/handler-compiler-mips.cc | 18 - deps/v8/src/ic/mips/ic-mips.cc | 8 + .../src/ic/mips64/handler-compiler-mips64.cc | 18 - deps/v8/src/ic/mips64/ic-mips64.cc | 8 + deps/v8/src/ic/ppc/handler-compiler-ppc.cc | 18 - deps/v8/src/ic/ppc/ic-ppc.cc | 7 + deps/v8/src/ic/s390/handler-compiler-s390.cc | 15 - deps/v8/src/ic/s390/ic-s390.cc | 8 + deps/v8/src/ic/stub-cache.cc | 1 + deps/v8/src/ic/stub-cache.h | 1 + deps/v8/src/ic/x64/handler-compiler-x64.cc | 28 - deps/v8/src/ic/x64/ic-x64.cc | 7 + deps/v8/src/ic/x87/handler-compiler-x87.cc | 26 - deps/v8/src/ic/x87/ic-x87.cc | 7 + deps/v8/src/inspector/Allocator.h | 33 + deps/v8/src/inspector/BUILD.gn | 232 +- deps/v8/src/inspector/DEPS | 8 + deps/v8/src/inspector/DebuggerScript.js | 711 ++++ deps/v8/src/inspector/InjectedScript.cpp | 571 +++ deps/v8/src/inspector/InjectedScript.h | 207 + .../v8/src/inspector/InjectedScriptNative.cpp | 90 + deps/v8/src/inspector/InjectedScriptNative.h | 46 + deps/v8/src/inspector/InjectedScriptSource.js | 1076 ++++++ deps/v8/src/inspector/InspectedContext.cpp | 84 + deps/v8/src/inspector/InspectedContext.h | 64 + deps/v8/src/inspector/JavaScriptCallFrame.cpp | 145 + deps/v8/src/inspector/JavaScriptCallFrame.h | 82 + deps/v8/src/inspector/OWNERS | 15 + deps/v8/src/inspector/ProtocolPlatform.h | 21 + deps/v8/src/inspector/RemoteObjectId.cpp | 76 + deps/v8/src/inspector/RemoteObjectId.h | 58 + deps/v8/src/inspector/ScriptBreakpoint.h | 52 + deps/v8/src/inspector/SearchUtil.cpp | 164 + deps/v8/src/inspector/SearchUtil.h | 24 + deps/v8/src/inspector/String16.cpp | 510 +++ deps/v8/src/inspector/String16.h | 132 + deps/v8/src/inspector/StringUtil.cpp | 195 + deps/v8/src/inspector/StringUtil.h | 71 + deps/v8/src/inspector/V8Console.cpp | 917 +++++ deps/v8/src/inspector/V8Console.h | 119 + deps/v8/src/inspector/V8ConsoleAgentImpl.cpp | 79 + deps/v8/src/inspector/V8ConsoleAgentImpl.h | 48 + deps/v8/src/inspector/V8ConsoleMessage.cpp | 466 +++ deps/v8/src/inspector/V8ConsoleMessage.h | 120 + deps/v8/src/inspector/V8Debugger.cpp | 916 +++++ deps/v8/src/inspector/V8Debugger.h | 158 + deps/v8/src/inspector/V8DebuggerAgentImpl.cpp | 1250 +++++++ deps/v8/src/inspector/V8DebuggerAgentImpl.h | 224 ++ deps/v8/src/inspector/V8DebuggerScript.cpp | 134 + deps/v8/src/inspector/V8DebuggerScript.h | 86 + deps/v8/src/inspector/V8FunctionCall.cpp | 111 + deps/v8/src/inspector/V8FunctionCall.h | 65 + .../src/inspector/V8HeapProfilerAgentImpl.cpp | 407 ++ .../src/inspector/V8HeapProfilerAgentImpl.h | 73 + .../v8/src/inspector/V8InjectedScriptHost.cpp | 213 ++ deps/v8/src/inspector/V8InjectedScriptHost.h | 46 + deps/v8/src/inspector/V8InspectorImpl.cpp | 367 ++ deps/v8/src/inspector/V8InspectorImpl.h | 148 + .../src/inspector/V8InspectorSessionImpl.cpp | 418 +++ .../v8/src/inspector/V8InspectorSessionImpl.h | 126 + deps/v8/src/inspector/V8InternalValueType.cpp | 77 + deps/v8/src/inspector/V8InternalValueType.h | 23 + deps/v8/src/inspector/V8ProfilerAgentImpl.cpp | 307 ++ deps/v8/src/inspector/V8ProfilerAgentImpl.h | 69 + deps/v8/src/inspector/V8Regex.cpp | 93 + deps/v8/src/inspector/V8Regex.h | 37 + deps/v8/src/inspector/V8RuntimeAgentImpl.cpp | 730 ++++ deps/v8/src/inspector/V8RuntimeAgentImpl.h | 131 + deps/v8/src/inspector/V8SchemaAgentImpl.cpp | 29 + deps/v8/src/inspector/V8SchemaAgentImpl.h | 37 + deps/v8/src/inspector/V8StackTraceImpl.cpp | 273 ++ deps/v8/src/inspector/V8StackTraceImpl.h | 99 + deps/v8/src/inspector/V8ValueCopier.cpp | 110 + deps/v8/src/inspector/V8ValueCopier.h | 24 + deps/v8/src/inspector/build/rjsmin.py | 295 ++ deps/v8/src/inspector/build/xxd.py | 28 + .../src/inspector/debugger_script_externs.js | 547 +++ .../src/inspector/injected_script_externs.js | 66 + deps/v8/src/inspector/inspector.gyp | 174 +- deps/v8/src/inspector/inspector.gypi | 96 + .../inspector/inspector_protocol_config.json | 25 + deps/v8/src/inspector/js_protocol-1.2.json | 997 +++++ deps/v8/src/inspector/js_protocol.json | 306 +- deps/v8/src/interface-descriptors.cc | 633 ++-- deps/v8/src/interface-descriptors.h | 264 +- deps/v8/src/interpreter/OWNERS | 1 - .../src/interpreter/bytecode-array-builder.cc | 94 +- .../src/interpreter/bytecode-array-builder.h | 52 +- .../interpreter/bytecode-array-iterator.cc | 7 + .../src/interpreter/bytecode-array-iterator.h | 1 + .../src/interpreter/bytecode-array-writer.cc | 4 +- deps/v8/src/interpreter/bytecode-decoder.cc | 1 + deps/v8/src/interpreter/bytecode-generator.cc | 319 +- deps/v8/src/interpreter/bytecode-generator.h | 15 +- deps/v8/src/interpreter/bytecodes.cc | 20 +- deps/v8/src/interpreter/bytecodes.h | 43 +- .../src/interpreter/control-flow-builders.cc | 14 +- .../src/interpreter/control-flow-builders.h | 6 +- .../src/interpreter/interpreter-assembler.cc | 328 +- .../src/interpreter/interpreter-assembler.h | 16 +- deps/v8/src/interpreter/interpreter.cc | 348 +- deps/v8/src/interpreter/interpreter.h | 25 +- deps/v8/src/isolate.cc | 333 +- deps/v8/src/isolate.h | 29 +- deps/v8/src/js/collection.js | 10 +- deps/v8/src/js/datetime-format-to-parts.js | 16 + deps/v8/src/js/harmony-async-await.js | 73 +- deps/v8/src/js/i18n.js | 67 +- deps/v8/src/js/intl-extra.js | 22 - deps/v8/src/js/prologue.js | 15 +- deps/v8/src/js/promise.js | 60 +- deps/v8/src/js/regexp.js | 218 +- deps/v8/src/js/string.js | 37 - deps/v8/src/js/typedarray.js | 73 +- deps/v8/src/js/v8natives.js | 56 - deps/v8/src/json-parser.cc | 2 +- deps/v8/src/json-stringifier.cc | 20 +- deps/v8/src/json-stringifier.h | 5 +- .../src/libplatform/tracing/trace-writer.cc | 51 +- deps/v8/src/lookup-cache-inl.h | 40 + deps/v8/src/lookup-cache.cc | 84 + deps/v8/src/lookup-cache.h | 117 + deps/v8/src/lookup.cc | 6 - deps/v8/src/lookup.h | 44 +- deps/v8/src/machine-type.h | 25 +- deps/v8/src/messages.cc | 819 ++-- deps/v8/src/messages.h | 177 +- deps/v8/src/mips/assembler-mips.cc | 38 +- deps/v8/src/mips/assembler-mips.h | 7 + deps/v8/src/mips/code-stubs-mips.cc | 94 +- deps/v8/src/mips/constants-mips.h | 8 + deps/v8/src/mips/disasm-mips.cc | 27 +- .../v8/src/mips/interface-descriptors-mips.cc | 14 +- deps/v8/src/mips/macro-assembler-mips.cc | 45 +- deps/v8/src/mips/simulator-mips.cc | 47 +- deps/v8/src/mips64/assembler-mips64.cc | 39 +- deps/v8/src/mips64/assembler-mips64.h | 7 + deps/v8/src/mips64/code-stubs-mips64.cc | 99 +- deps/v8/src/mips64/constants-mips64.h | 8 + deps/v8/src/mips64/disasm-mips64.cc | 31 +- .../mips64/interface-descriptors-mips64.cc | 14 +- deps/v8/src/mips64/macro-assembler-mips64.cc | 42 +- deps/v8/src/mips64/simulator-mips64.cc | 47 +- deps/v8/src/objects-debug.cc | 10 +- deps/v8/src/objects-inl.h | 75 +- deps/v8/src/objects-printer.cc | 34 +- deps/v8/src/objects.cc | 323 +- deps/v8/src/objects.h | 352 +- deps/v8/src/parsing/duplicate-finder.cc | 145 + deps/v8/src/parsing/duplicate-finder.h | 64 + deps/v8/src/parsing/expression-classifier.h | 114 +- .../parsing/parameter-initializer-rewriter.cc | 4 +- .../parsing/parameter-initializer-rewriter.h | 2 +- deps/v8/src/parsing/parse-info.cc | 13 +- deps/v8/src/parsing/parse-info.h | 17 +- deps/v8/src/parsing/parser-base.h | 3331 ++++++++++++----- deps/v8/src/parsing/parser.cc | 3238 ++++++---------- deps/v8/src/parsing/parser.h | 1032 ++--- deps/v8/src/parsing/pattern-rewriter.cc | 26 +- deps/v8/src/parsing/preparser.cc | 965 +---- deps/v8/src/parsing/preparser.h | 1091 +++--- .../src/parsing/scanner-character-streams.cc | 948 +++-- .../src/parsing/scanner-character-streams.h | 184 +- deps/v8/src/parsing/scanner.cc | 200 +- deps/v8/src/parsing/scanner.h | 231 +- .../src/pending-compilation-error-handler.cc | 1 + deps/v8/src/ppc/code-stubs-ppc.cc | 56 +- deps/v8/src/ppc/interface-descriptors-ppc.cc | 14 +- deps/v8/src/ppc/macro-assembler-ppc.cc | 8 +- deps/v8/src/profiler/OWNERS | 1 + deps/v8/src/profiler/cpu-profiler.h | 1 - .../src/profiler/heap-snapshot-generator.cc | 16 +- deps/v8/src/profiler/profile-generator.h | 3 +- .../v8/src/profiler/sampling-heap-profiler.cc | 4 +- deps/v8/src/profiler/tick-sample.cc | 5 +- deps/v8/src/property-details.h | 1 - deps/v8/src/regexp/jsregexp.cc | 1 - deps/v8/src/runtime-profiler.cc | 1 + deps/v8/src/runtime/runtime-array.cc | 8 +- deps/v8/src/runtime/runtime-classes.cc | 152 +- deps/v8/src/runtime/runtime-compiler.cc | 35 +- deps/v8/src/runtime/runtime-debug.cc | 4 +- deps/v8/src/runtime/runtime-forin.cc | 21 - deps/v8/src/runtime/runtime-i18n.cc | 136 +- deps/v8/src/runtime/runtime-internal.cc | 33 +- deps/v8/src/runtime/runtime-literals.cc | 3 +- deps/v8/src/runtime/runtime-object.cc | 51 + deps/v8/src/runtime/runtime-scopes.cc | 57 +- deps/v8/src/runtime/runtime-strings.cc | 44 - deps/v8/src/runtime/runtime-test.cc | 30 +- deps/v8/src/runtime/runtime-typedarray.cc | 212 -- deps/v8/src/runtime/runtime-wasm.cc | 65 +- deps/v8/src/runtime/runtime.cc | 72 +- deps/v8/src/runtime/runtime.h | 51 +- deps/v8/src/s390/code-stubs-s390.cc | 55 +- .../v8/src/s390/interface-descriptors-s390.cc | 14 +- deps/v8/src/s390/macro-assembler-s390.cc | 9 +- deps/v8/src/snapshot/code-serializer.cc | 4 + deps/v8/src/snapshot/code-serializer.h | 3 + deps/v8/src/snapshot/serializer.cc | 5 +- deps/v8/src/snapshot/snapshot-common.cc | 70 +- deps/v8/src/snapshot/snapshot.h | 16 +- deps/v8/src/tracing/trace-event.cc | 94 +- deps/v8/src/tracing/trace-event.h | 133 +- deps/v8/src/type-cache.h | 174 - deps/v8/src/type-feedback-vector-inl.h | 14 +- deps/v8/src/type-feedback-vector.cc | 35 +- deps/v8/src/type-feedback-vector.h | 16 +- deps/v8/src/type-info.cc | 25 +- deps/v8/src/type-info.h | 17 +- deps/v8/src/unicode.cc | 54 +- deps/v8/src/unicode.h | 6 + deps/v8/src/utils.h | 4 + deps/v8/src/v8.gyp | 54 +- deps/v8/src/value-serializer.cc | 856 ++++- deps/v8/src/value-serializer.h | 94 +- deps/v8/src/wasm/ast-decoder.cc | 524 +-- deps/v8/src/wasm/ast-decoder.h | 11 +- deps/v8/src/wasm/encoder.cc | 6 +- deps/v8/src/wasm/encoder.h | 44 + deps/v8/src/wasm/module-decoder.cc | 15 +- deps/v8/src/wasm/wasm-debug.cc | 6 +- deps/v8/src/wasm/wasm-external-refs.cc | 3 - deps/v8/src/wasm/wasm-interpreter.cc | 52 +- deps/v8/src/wasm/wasm-js.cc | 121 +- deps/v8/src/wasm/wasm-js.h | 4 + deps/v8/src/wasm/wasm-macro-gen.h | 10 +- deps/v8/src/wasm/wasm-module.cc | 730 ++-- deps/v8/src/wasm/wasm-module.h | 33 +- deps/v8/src/wasm/wasm-opcodes.cc | 29 +- deps/v8/src/wasm/wasm-opcodes.h | 276 +- deps/v8/src/x64/assembler-x64.cc | 278 +- deps/v8/src/x64/assembler-x64.h | 262 +- deps/v8/src/x64/code-stubs-x64.cc | 103 +- deps/v8/src/x64/disasm-x64.cc | 213 +- deps/v8/src/x64/interface-descriptors-x64.cc | 14 +- deps/v8/src/x64/macro-assembler-x64.cc | 7 +- deps/v8/src/x64/sse-instr.h | 69 + deps/v8/src/x87/code-stubs-x87.cc | 40 +- deps/v8/src/x87/interface-descriptors-x87.cc | 14 +- deps/v8/src/x87/macro-assembler-x87.cc | 7 +- deps/v8/src/zone-containers.h | 12 + deps/v8/test/cctest/BUILD.gn | 274 +- deps/v8/test/cctest/asmjs/test-asm-typer.cc | 4 +- deps/v8/test/cctest/ast-types-fuzz.h | 327 ++ deps/v8/test/cctest/cctest.cc | 74 + deps/v8/test/cctest/cctest.gyp | 7 +- deps/v8/test/cctest/cctest.h | 84 +- deps/v8/test/cctest/cctest.status | 116 +- deps/v8/test/cctest/compiler/codegen-tester.h | 5 +- .../test/cctest/compiler/function-tester.cc | 211 ++ .../v8/test/cctest/compiler/function-tester.h | 199 +- .../cctest/compiler/graph-builder-tester.h | 5 +- .../cctest/compiler/test-code-assembler.cc | 1 + .../cctest/compiler/test-js-constant-cache.cc | 87 +- .../cctest/compiler/test-js-typed-lowering.cc | 14 +- deps/v8/test/cctest/compiler/test-linkage.cc | 1 + .../compiler/test-loop-assignment-analysis.cc | 4 +- .../compiler/test-machine-operator-reducer.cc | 2 - .../cctest/compiler/test-multiple-return.cc | 2 +- .../compiler/test-representation-change.cc | 52 +- .../test-run-bytecode-graph-builder.cc | 2 +- .../test/cctest/compiler/test-run-inlining.cc | 1 + .../cctest/compiler/test-run-intrinsics.cc | 1 + .../cctest/compiler/test-run-jsbranches.cc | 1 + .../test/cctest/compiler/test-run-jscalls.cc | 4 + .../cctest/compiler/test-run-jsexceptions.cc | 1 + .../cctest/compiler/test-run-jsobjects.cc | 10 + .../v8/test/cctest/compiler/test-run-jsops.cc | 1 + .../cctest/compiler/test-run-native-calls.cc | 3 +- .../cctest/compiler/test-run-stackcheck.cc | 1 + .../v8/test/cctest/compiler/test-run-stubs.cc | 2 +- .../compiler/test-run-unwinding-info.cc | 4 + .../cctest/compiler/test-run-variables.cc | 1 + .../compiler/test-simplified-lowering.cc | 1756 --------- deps/v8/test/cctest/heap/heap-utils.cc | 52 +- deps/v8/test/cctest/heap/heap-utils.h | 8 +- deps/v8/test/cctest/heap/test-alloc.cc | 9 +- .../cctest/heap/test-array-buffer-tracker.cc | 6 +- deps/v8/test/cctest/heap/test-compaction.cc | 20 +- deps/v8/test/cctest/heap/test-heap.cc | 552 +-- .../cctest/heap/test-incremental-marking.cc | 104 +- deps/v8/test/cctest/heap/test-lab.cc | 3 + deps/v8/test/cctest/heap/test-mark-compact.cc | 36 +- .../test/cctest/heap/test-page-promotion.cc | 15 +- deps/v8/test/cctest/heap/test-spaces.cc | 144 +- .../bytecode-expectations-printer.cc | 43 +- .../bytecode-expectations-printer.h | 17 +- .../ArrayLiterals.golden | 41 +- .../ArrayLiteralsWide.golden | 517 ++- .../AssignmentsInBinaryExpression.golden | 49 +- .../BasicBlockToBoolean.golden | 19 +- .../bytecode_expectations/BasicLoops.golden | 235 +- .../BreakableBlocks.golden | 69 +- .../bytecode_expectations/CallGlobal.golden | 9 +- .../CallLookupSlot.golden | 19 +- .../bytecode_expectations/CallNew.golden | 19 +- .../bytecode_expectations/CallRuntime.golden | 7 +- .../ClassAndSuperClass.golden | 49 +- .../ClassDeclarations.golden | 61 +- .../CompoundExpressions.golden | 35 +- .../bytecode_expectations/Conditional.golden | 5 +- .../ConstVariable.golden | 7 +- .../ConstVariableContextSlot.golden | 45 +- .../ContextParameters.golden | 29 +- .../ContextVariables.golden | 564 +-- .../CountOperators.golden | 81 +- .../CreateArguments.golden | 17 +- .../CreateRestParameter.golden | 17 +- .../DeadCodeRemoval.golden | 1 - .../DeclareGlobals.golden | 19 +- .../bytecode_expectations/Delete.golden | 21 +- .../DeleteLookupSlotInEval.golden | 5 +- .../bytecode_expectations/DoDebugger.golden | 1 - .../bytecode_expectations/DoExpression.golden | 13 +- .../bytecode_expectations/Eval.golden | 13 +- .../bytecode_expectations/ForIn.golden | 115 +- .../bytecode_expectations/ForOf.golden | 489 +-- .../FunctionLiterals.golden | 11 +- .../bytecode_expectations/Generators.golden | 332 +- .../GlobalCompoundExpressions.golden | 17 +- .../GlobalCountOperators.golden | 33 +- .../bytecode_expectations/GlobalDelete.golden | 23 +- .../HeapNumberConstants.golden | 525 ++- .../bytecode_expectations/IfConditions.golden | 45 +- .../IntegerConstants.golden | 1 - .../JumpsRequiringConstantWideOperands.golden | 643 ++-- .../bytecode_expectations/LetVariable.golden | 7 +- .../LetVariableContextSlot.golden | 49 +- .../bytecode_expectations/LoadGlobal.golden | 269 +- .../LogicalExpressions.golden | 25 +- .../bytecode_expectations/LookupSlot.golden | 43 +- .../LookupSlotInEval.golden | 9 +- .../LookupSlotWideInEval.golden | 2057 +++++----- .../bytecode_expectations/NewTarget.golden | 7 +- .../ObjectLiterals.golden | 87 +- .../ObjectLiteralsWide.golden | 515 ++- .../OuterContextVariables.golden | 22 +- .../bytecode_expectations/Parameters.golden | 1 - .../PrimitiveExpressions.golden | 23 +- .../PrimitiveReturnStatements.golden | 1 - .../bytecode_expectations/PropertyCall.golden | 285 +- .../PropertyLoads.golden | 541 ++- .../PropertyStores.golden | 1081 +++--- .../RegExpLiterals.golden | 15 +- .../RegExpLiteralsWide.golden | 515 ++- .../RemoveRedundantLdar.golden | 19 +- .../bytecode_expectations/StoreGlobal.golden | 545 ++- .../StringConstants.golden | 9 +- .../bytecode_expectations/Switch.golden | 249 +- .../bytecode_expectations/ThisFunction.golden | 1 - .../bytecode_expectations/Throw.golden | 5 +- .../TopLevelObjectLiterals.golden | 13 +- .../bytecode_expectations/TryCatch.golden | 28 +- .../bytecode_expectations/TryFinally.golden | 38 +- .../bytecode_expectations/Typeof.golden | 3 +- .../UnaryOperators.golden | 30 +- .../WideRegisters.golden | 39 +- .../WithStatement.golden | 12 +- .../generate-bytecode-expectations.cc | 53 +- .../interpreter/test-bytecode-generator.cc | 222 +- .../cctest/interpreter/test-interpreter.cc | 67 +- .../interpreter/test-source-positions.cc | 1 - .../test/cctest/libplatform/test-tracing.cc | 20 +- .../v8/test/cctest/libsampler/test-sampler.cc | 1 + .../cctest/parsing/test-scanner-streams.cc | 364 ++ deps/v8/test/cctest/test-accessors.cc | 2 +- .../cctest/test-api-fast-accessor-builder.cc | 2 +- deps/v8/test/cctest/test-api-interceptors.cc | 871 ++++- deps/v8/test/cctest/test-api.cc | 738 +++- deps/v8/test/cctest/test-api.h | 1 + deps/v8/test/cctest/test-array-list.cc | 7 + deps/v8/test/cctest/test-assembler-arm.cc | 463 ++- deps/v8/test/cctest/test-assembler-mips.cc | 124 + deps/v8/test/cctest/test-assembler-mips64.cc | 123 + deps/v8/test/cctest/test-ast-types.cc | 1904 ++++++++++ deps/v8/test/cctest/test-code-cache.cc | 9 + deps/v8/test/cctest/test-code-layout.cc | 9 + .../test/cctest/test-code-stub-assembler.cc | 50 +- deps/v8/test/cctest/test-compiler.cc | 26 +- deps/v8/test/cctest/test-conversions.cc | 15 +- deps/v8/test/cctest/test-cpu-profiler.cc | 4 +- deps/v8/test/cctest/test-date.cc | 5 +- deps/v8/test/cctest/test-debug.cc | 16 +- deps/v8/test/cctest/test-decls.cc | 23 +- deps/v8/test/cctest/test-deoptimization.cc | 3 +- deps/v8/test/cctest/test-dictionary.cc | 4 +- deps/v8/test/cctest/test-disasm-arm.cc | 45 +- deps/v8/test/cctest/test-disasm-mips.cc | 17 + deps/v8/test/cctest/test-disasm-mips64.cc | 21 + deps/v8/test/cctest/test-disasm-x64.cc | 74 +- deps/v8/test/cctest/test-feedback-vector.cc | 34 +- .../test/cctest/test-field-type-tracking.cc | 67 +- deps/v8/test/cctest/test-flags.cc | 1 + deps/v8/test/cctest/test-global-handles.cc | 11 +- deps/v8/test/cctest/test-heap-profiler.cc | 43 +- deps/v8/test/cctest/test-identity-map.cc | 18 +- deps/v8/test/cctest/test-javascript-arm64.cc | 1 - .../v8/test/cctest/test-js-arm64-variables.cc | 1 - deps/v8/test/cctest/test-list.cc | 2 + deps/v8/test/cctest/test-lockers.cc | 1 - deps/v8/test/cctest/test-log.cc | 8 +- deps/v8/test/cctest/test-mementos.cc | 20 +- deps/v8/test/cctest/test-object.cc | 6 +- deps/v8/test/cctest/test-parsing.cc | 748 ++-- deps/v8/test/cctest/test-profile-generator.cc | 4 +- .../cctest/test-random-number-generator.cc | 2 + deps/v8/test/cctest/test-representation.cc | 1 - deps/v8/test/cctest/test-sampler-api.cc | 1 + deps/v8/test/cctest/test-serialize.cc | 39 +- deps/v8/test/cctest/test-simd.cc | 9 + deps/v8/test/cctest/test-strings.cc | 4 +- deps/v8/test/cctest/test-symbols.cc | 16 +- .../v8/test/cctest/test-thread-termination.cc | 2 + deps/v8/test/cctest/test-threads.cc | 2 +- deps/v8/test/cctest/test-transitions.cc | 4 + deps/v8/test/cctest/test-types.cc | 805 +--- deps/v8/test/cctest/test-unboxed-doubles.cc | 18 +- deps/v8/test/cctest/test-unique.cc | 7 + deps/v8/test/cctest/test-utils.cc | 1 + deps/v8/test/cctest/test-weakmaps.cc | 27 +- deps/v8/test/cctest/test-weaksets.cc | 25 +- deps/v8/test/cctest/types-fuzz.h | 119 +- .../test/cctest/wasm/test-run-wasm-asmjs.cc | 46 +- .../cctest/wasm/test-run-wasm-interpreter.cc | 39 + .../test/cctest/wasm/test-run-wasm-module.cc | 62 +- .../v8/test/cctest/wasm/test-run-wasm-simd.cc | 33 +- .../cctest/wasm/test-run-wasm-try-catch.cc | 317 -- deps/v8/test/cctest/wasm/test-run-wasm.cc | 40 - deps/v8/test/cctest/wasm/test-signatures.h | 6 + deps/v8/test/cctest/wasm/wasm-run-utils.h | 3 +- deps/v8/test/common/DEPS | 3 + .../v8/test/common/wasm/wasm-module-runner.cc | 205 + deps/v8/test/common/wasm/wasm-module-runner.h | 54 + deps/v8/test/fuzzer/fuzzer.gyp | 242 ++ deps/v8/test/fuzzer/fuzzer.isolate | 16 + deps/v8/test/fuzzer/testcfg.py | 5 +- deps/v8/test/fuzzer/wasm-asmjs.cc | 9 +- deps/v8/test/fuzzer/wasm-code.cc | 99 + deps/v8/test/fuzzer/wasm-data-section.cc | 10 + .../test/fuzzer/wasm-function-sigs-section.cc | 10 + deps/v8/test/fuzzer/wasm-globals-section.cc | 10 + deps/v8/test/fuzzer/wasm-imports-section.cc | 10 + deps/v8/test/fuzzer/wasm-memory-section.cc | 10 + deps/v8/test/fuzzer/wasm-names-section.cc | 10 + deps/v8/test/fuzzer/wasm-section-fuzzers.cc | 53 + deps/v8/test/fuzzer/wasm-section-fuzzers.h | 16 + deps/v8/test/fuzzer/wasm-types-section.cc | 10 + deps/v8/test/fuzzer/wasm.cc | 8 +- deps/v8/test/fuzzer/wasm.tar.gz.sha1 | 1 + deps/v8/test/fuzzer/wasm/foo.wasm | Bin 47 -> 0 bytes deps/v8/test/fuzzer/wasm_asmjs.tar.gz.sha1 | 1 + deps/v8/test/fuzzer/wasm_asmjs/foo.wasm | Bin 47 -> 0 bytes deps/v8/test/fuzzer/wasm_code/foo | 0 deps/v8/test/fuzzer/wasm_data_section/foo | 0 .../fuzzer/wasm_function_sigs_section/foo | 0 deps/v8/test/fuzzer/wasm_globals_section/foo | 0 deps/v8/test/fuzzer/wasm_imports_section/foo | 0 deps/v8/test/fuzzer/wasm_memory_section/foo | 0 deps/v8/test/fuzzer/wasm_names_section/foo | 0 deps/v8/test/fuzzer/wasm_types_section/foo | 0 deps/v8/test/intl/assert.js | 8 + .../intl/date-format/date-format-to-parts.js | 20 + deps/v8/test/intl/date-format/parse-MMMdy.js | 59 - .../intl/date-format/parse-invalid-input.js | 37 - deps/v8/test/intl/date-format/parse-mdy.js | 53 - deps/v8/test/intl/date-format/parse-mdyhms.js | 65 - deps/v8/test/intl/extra-flag.js | 23 - deps/v8/test/intl/no-extra-flag.js | 23 - .../test/intl/number-format/parse-currency.js | 35 - .../test/intl/number-format/parse-decimal.js | 52 - .../test/intl/number-format/parse-percent.js | 46 - deps/v8/test/message/arrow-invalid-rest-2.out | 6 +- deps/v8/test/message/arrow-invalid-rest.out | 6 +- deps/v8/test/message/export-duplicate-as.js | 4 +- deps/v8/test/message/export-duplicate-as.out | 4 +- .../test/message/export-duplicate-default.js | 1 + .../test/message/export-duplicate-default.out | 2 +- deps/v8/test/message/export-duplicate.js | 3 +- deps/v8/test/message/export-duplicate.out | 6 +- .../message/syntactic-tail-call-generator.js | 14 + .../message/syntactic-tail-call-generator.out | 4 + .../test/mjsunit/array-indexing-receiver.js | 10 +- deps/v8/test/mjsunit/asm/load-elimination.js | 26 + .../compiler/escape-analysis-materialize.js | 29 + .../mjsunit/compiler/inline-exception-1.js | 2219 +++++++++++ .../mjsunit/compiler/inline-exception-2.js | 2063 ++++++++++ deps/v8/test/mjsunit/compiler/math-sign.js | 51 + .../test/mjsunit/compiler/number-isfinite.js | 29 + .../test/mjsunit/compiler/number-isinteger.js | 30 + deps/v8/test/mjsunit/compiler/number-isnan.js | 28 + .../mjsunit/compiler/number-issafeinteger.js | 50 + .../compiler/regress-5320.js} | 36 +- .../test/mjsunit/compiler/regress-638132.js | 26 + .../test/mjsunit/compiler/regress-639210.js | 38 + .../test/mjsunit/compiler/regress-644048.js | 16 + .../test/mjsunit/compiler/regress-644633.js | 14 + .../test/mjsunit/compiler/regress-645851.js | 19 + .../compiler/regress-compare-negate.js | 18 + .../compiler/regress-math-sign-nan-type.js | 14 + .../test/mjsunit/compiler/unsigned-min-max.js | 37 + deps/v8/test/mjsunit/debug-print.js | 47 + deps/v8/test/mjsunit/debug-scopes.js | 96 + deps/v8/test/mjsunit/element-accessor.js | 17 + .../test/mjsunit/es6/block-sloppy-function.js | 18 + ...reject-caught-by-default-reject-handler.js | 20 +- .../throw-caught-by-default-reject-handler.js | 22 +- deps/v8/test/mjsunit/es6/function-name.js | 5 + .../test/mjsunit/es6/regress/regress-5337.js | 39 + deps/v8/test/mjsunit/es6/super.js | 32 + .../es8/syntactic-tail-call-parsing-sloppy.js | 16 +- .../es8/syntactic-tail-call-parsing.js | 27 +- .../async-debug-caught-exception-cases.js | 154 + .../default-parameter-do-expression.js | 21 + deps/v8/test/mjsunit/json-stringify-holder.js | 104 + deps/v8/test/mjsunit/keyed-load-generic.js | 20 + deps/v8/test/mjsunit/mjsunit.status | 42 +- deps/v8/test/mjsunit/modules-exports1.js | 55 + deps/v8/test/mjsunit/modules-exports2.js | 31 + deps/v8/test/mjsunit/modules-exports3.js | 48 + deps/v8/test/mjsunit/modules-this.js | 7 + deps/v8/test/mjsunit/regexp-lastIndex.js | 22 + deps/v8/test/mjsunit/regexp.js | 11 +- deps/v8/test/mjsunit/regress/regress-2437.js | 14 +- deps/v8/test/mjsunit/regress/regress-2438.js | 10 +- .../v8/test/mjsunit/regress/regress-353551.js | 2 +- .../bug-4577.js => regress/regress-4577.js} | 8 + deps/v8/test/mjsunit/regress/regress-5332.js | 31 + deps/v8/test/mjsunit/regress/regress-5342.js | 7 + deps/v8/test/mjsunit/regress/regress-5357.js | 17 + deps/v8/test/mjsunit/regress/regress-5380.js | 17 + .../v8/test/mjsunit/regress/regress-639270.js | 14 + .../v8/test/mjsunit/regress/regress-642409.js | 22 + .../v8/test/mjsunit/regress/regress-645680.js | 20 + .../mjsunit/regress/regress-crbug-621868.js | 20 + .../mjsunit/regress/regress-crbug-631027.js | 12 + .../mjsunit/regress/regress-crbug-635798.js | 2 +- .../mjsunit/regress/regress-crbug-635923.js | 21 + .../mjsunit/regress/regress-crbug-640369.js | 15 + .../mjsunit/regress/regress-crbug-642056.js | 17 + .../mjsunit/regress/regress-crbug-643073.js | 13 + .../mjsunit/regress/regress-crbug-644111.js | 11 + .../mjsunit/regress/regress-crbug-644215.js | 13 + .../mjsunit/regress/regress-crbug-644245.js | 18 + .../mjsunit/regress/regress-crbug-644631.js | 12 + .../mjsunit/regress/regress-crbug-644689-1.js | 14 + .../mjsunit/regress/regress-crbug-644689-2.js | 14 + .../mjsunit/regress/regress-crbug-645103.js | 17 + .../mjsunit/regress/regress-crbug-645888.js | 18 + .../mjsunit/regress/regress-crbug-647217.js | 13 + .../stack-overflow-arity-catch-noinline.js} | 38 +- deps/v8/test/mjsunit/stack-traces-overflow.js | 7 +- .../wasm/compiled-module-management.js | 50 + .../wasm/compiled-module-serialization.js | 22 +- .../v8/test/mjsunit/wasm/debug-disassembly.js | 11 - deps/v8/test/mjsunit/wasm/exceptions.js | 67 + deps/v8/test/mjsunit/wasm/ffi-error.js | 20 + deps/v8/test/mjsunit/wasm/grow-memory.js | 218 +- .../mjsunit/wasm/instantiate-module-basic.js | 49 + .../v8/test/mjsunit/wasm/regression-644682.js | 26 + deps/v8/test/mjsunit/wasm/wasm-constants.js | 20 + .../test/mjsunit/wasm/wasm-module-builder.js | 18 + deps/v8/test/test262/detachArrayBuffer.js | 2 + deps/v8/test/test262/harness-adapt.js | 4 + deps/v8/test/test262/test262.status | 194 +- deps/v8/test/unittests/BUILD.gn | 142 +- .../compiler-dispatcher-job-unittest.cc | 181 +- .../arm/instruction-selector-arm-unittest.cc | 25 +- .../instruction-selector-arm64-unittest.cc | 44 +- .../compiler/branch-elimination-unittest.cc | 2 +- .../common-operator-reducer-unittest.cc | 20 + .../effect-control-linearizer-unittest.cc | 4 +- .../compiler/escape-analysis-unittest.cc | 4 +- .../compiler/instruction-selector-unittest.cc | 3 +- .../compiler/js-builtin-reducer-unittest.cc | 185 + .../compiler/js-create-lowering-unittest.cc | 12 +- .../compiler/js-operator-unittest.cc | 1 - .../compiler/js-type-feedback-unittest.cc | 5 +- .../compiler/js-typed-lowering-unittest.cc | 206 +- .../compiler/load-elimination-unittest.cc | 263 ++ .../machine-operator-reducer-unittest.cc | 35 +- .../unittests/compiler/node-test-utils.cc | 34 + .../test/unittests/compiler/node-test-utils.h | 3 + .../unittests/compiler/opcodes-unittest.cc | 67 +- .../simplified-operator-reducer-unittest.cc | 29 +- .../compiler/simplified-operator-unittest.cc | 8 +- .../compiler/typed-optimization-unittest.cc | 226 ++ .../test/unittests/heap/gc-tracer-unittest.cc | 60 +- .../bytecode-array-builder-unittest.cc | 297 +- .../bytecode-array-writer-unittest.cc | 31 +- .../bytecode-peephole-optimizer-unittest.cc | 6 +- .../interpreter-assembler-unittest.cc | 4 + deps/v8/test/unittests/unittests.gyp | 1 + .../unittests/value-serializer-unittest.cc | 1102 +++++- .../unittests/wasm/ast-decoder-unittest.cc | 251 +- .../wasm/loop-assignment-analysis-unittest.cc | 8 + .../unittests/wasm/module-decoder-unittest.cc | 43 +- .../stack-overflow-arrity-catch-expected.txt | 33 - .../webkit/fast/regex/lastIndex-expected.txt | 4 +- .../testing/gtest/include/gtest/gtest_prod.h | 58 - deps/v8/tools/dev/v8gen.py | 182 +- deps/v8/tools/gen-inlining-tests.py | 566 +++ deps/v8/tools/gen-postmortem-metadata.py | 2 - deps/v8/tools/mb/OWNERS | 3 + deps/v8/tools/mb/PRESUBMIT.py | 41 + deps/v8/tools/mb/README.md | 22 + deps/v8/tools/mb/docs/README.md | 4 + deps/v8/tools/mb/docs/design_spec.md | 426 +++ deps/v8/tools/mb/docs/user_guide.md | 297 ++ deps/v8/tools/mb/mb | 8 + deps/v8/tools/mb/mb.bat | 6 + deps/v8/tools/mb/mb.py | 1500 ++++++++ deps/v8/tools/mb/mb_unittest.py | 572 +++ deps/v8/tools/presubmit.py | 18 +- deps/v8/tools/run-tests.py | 21 +- deps/v8/tools/turbolizer/constants.js | 10 +- deps/v8/tools/turbolizer/disassembly-view.js | 62 +- deps/v8/tools/turbolizer/index.html | 6 +- deps/v8/tools/turbolizer/text-view.js | 2 +- deps/v8/tools/turbolizer/turbo-visualizer.css | 12 +- deps/v8/tools/turbolizer/turbo-visualizer.js | 11 - deps/v8/tools/update-wasm-fuzzers.sh | 56 + deps/v8/tools/v8heapconst.py | 4 +- deps/v8/tools/verify_source_deps.py | 39 +- 978 files changed, 73957 insertions(+), 35713 deletions(-) delete mode 100644 deps/v8/base/trace_event/common/trace_event_common.h delete mode 100644 deps/v8/gypfiles/config/win/msvs_dependencies.isolate create mode 100644 deps/v8/include/DEPS create mode 100644 deps/v8/include/v8-inspector-protocol.h create mode 100644 deps/v8/include/v8-inspector.h create mode 100644 deps/v8/src/ast/ast-types.cc create mode 100644 deps/v8/src/ast/ast-types.h create mode 100644 deps/v8/src/ast/compile-time-value.cc create mode 100644 deps/v8/src/ast/compile-time-value.h delete mode 100644 deps/v8/src/ast/scopeinfo.h create mode 100644 deps/v8/src/compilation-info.cc create mode 100644 deps/v8/src/compilation-info.h rename deps/v8/src/{ => compiler}/type-cache.cc (84%) create mode 100644 deps/v8/src/compiler/type-cache.h create mode 100644 deps/v8/src/compiler/typed-optimization.cc create mode 100644 deps/v8/src/compiler/typed-optimization.h rename deps/v8/src/{ => compiler}/types.cc (85%) rename deps/v8/src/{ => compiler}/types.h (73%) create mode 100644 deps/v8/src/inspector/Allocator.h create mode 100644 deps/v8/src/inspector/DEPS create mode 100644 deps/v8/src/inspector/DebuggerScript.js create mode 100644 deps/v8/src/inspector/InjectedScript.cpp create mode 100644 deps/v8/src/inspector/InjectedScript.h create mode 100644 deps/v8/src/inspector/InjectedScriptNative.cpp create mode 100644 deps/v8/src/inspector/InjectedScriptNative.h create mode 100644 deps/v8/src/inspector/InjectedScriptSource.js create mode 100644 deps/v8/src/inspector/InspectedContext.cpp create mode 100644 deps/v8/src/inspector/InspectedContext.h create mode 100644 deps/v8/src/inspector/JavaScriptCallFrame.cpp create mode 100644 deps/v8/src/inspector/JavaScriptCallFrame.h create mode 100644 deps/v8/src/inspector/OWNERS create mode 100644 deps/v8/src/inspector/ProtocolPlatform.h create mode 100644 deps/v8/src/inspector/RemoteObjectId.cpp create mode 100644 deps/v8/src/inspector/RemoteObjectId.h create mode 100644 deps/v8/src/inspector/ScriptBreakpoint.h create mode 100644 deps/v8/src/inspector/SearchUtil.cpp create mode 100644 deps/v8/src/inspector/SearchUtil.h create mode 100644 deps/v8/src/inspector/String16.cpp create mode 100644 deps/v8/src/inspector/String16.h create mode 100644 deps/v8/src/inspector/StringUtil.cpp create mode 100644 deps/v8/src/inspector/StringUtil.h create mode 100644 deps/v8/src/inspector/V8Console.cpp create mode 100644 deps/v8/src/inspector/V8Console.h create mode 100644 deps/v8/src/inspector/V8ConsoleAgentImpl.cpp create mode 100644 deps/v8/src/inspector/V8ConsoleAgentImpl.h create mode 100644 deps/v8/src/inspector/V8ConsoleMessage.cpp create mode 100644 deps/v8/src/inspector/V8ConsoleMessage.h create mode 100644 deps/v8/src/inspector/V8Debugger.cpp create mode 100644 deps/v8/src/inspector/V8Debugger.h create mode 100644 deps/v8/src/inspector/V8DebuggerAgentImpl.cpp create mode 100644 deps/v8/src/inspector/V8DebuggerAgentImpl.h create mode 100644 deps/v8/src/inspector/V8DebuggerScript.cpp create mode 100644 deps/v8/src/inspector/V8DebuggerScript.h create mode 100644 deps/v8/src/inspector/V8FunctionCall.cpp create mode 100644 deps/v8/src/inspector/V8FunctionCall.h create mode 100644 deps/v8/src/inspector/V8HeapProfilerAgentImpl.cpp create mode 100644 deps/v8/src/inspector/V8HeapProfilerAgentImpl.h create mode 100644 deps/v8/src/inspector/V8InjectedScriptHost.cpp create mode 100644 deps/v8/src/inspector/V8InjectedScriptHost.h create mode 100644 deps/v8/src/inspector/V8InspectorImpl.cpp create mode 100644 deps/v8/src/inspector/V8InspectorImpl.h create mode 100644 deps/v8/src/inspector/V8InspectorSessionImpl.cpp create mode 100644 deps/v8/src/inspector/V8InspectorSessionImpl.h create mode 100644 deps/v8/src/inspector/V8InternalValueType.cpp create mode 100644 deps/v8/src/inspector/V8InternalValueType.h create mode 100644 deps/v8/src/inspector/V8ProfilerAgentImpl.cpp create mode 100644 deps/v8/src/inspector/V8ProfilerAgentImpl.h create mode 100644 deps/v8/src/inspector/V8Regex.cpp create mode 100644 deps/v8/src/inspector/V8Regex.h create mode 100644 deps/v8/src/inspector/V8RuntimeAgentImpl.cpp create mode 100644 deps/v8/src/inspector/V8RuntimeAgentImpl.h create mode 100644 deps/v8/src/inspector/V8SchemaAgentImpl.cpp create mode 100644 deps/v8/src/inspector/V8SchemaAgentImpl.h create mode 100644 deps/v8/src/inspector/V8StackTraceImpl.cpp create mode 100644 deps/v8/src/inspector/V8StackTraceImpl.h create mode 100644 deps/v8/src/inspector/V8ValueCopier.cpp create mode 100644 deps/v8/src/inspector/V8ValueCopier.h create mode 100755 deps/v8/src/inspector/build/rjsmin.py create mode 100644 deps/v8/src/inspector/build/xxd.py create mode 100644 deps/v8/src/inspector/debugger_script_externs.js create mode 100644 deps/v8/src/inspector/injected_script_externs.js create mode 100644 deps/v8/src/inspector/inspector.gypi create mode 100644 deps/v8/src/inspector/inspector_protocol_config.json create mode 100644 deps/v8/src/inspector/js_protocol-1.2.json create mode 100644 deps/v8/src/js/datetime-format-to-parts.js delete mode 100644 deps/v8/src/js/intl-extra.js create mode 100644 deps/v8/src/lookup-cache-inl.h create mode 100644 deps/v8/src/lookup-cache.cc create mode 100644 deps/v8/src/lookup-cache.h create mode 100644 deps/v8/src/parsing/duplicate-finder.cc create mode 100644 deps/v8/src/parsing/duplicate-finder.h create mode 100644 deps/v8/src/profiler/OWNERS delete mode 100644 deps/v8/src/type-cache.h create mode 100644 deps/v8/src/x64/sse-instr.h create mode 100644 deps/v8/test/cctest/ast-types-fuzz.h create mode 100644 deps/v8/test/cctest/compiler/function-tester.cc delete mode 100644 deps/v8/test/cctest/compiler/test-simplified-lowering.cc create mode 100644 deps/v8/test/cctest/parsing/test-scanner-streams.cc create mode 100644 deps/v8/test/cctest/test-ast-types.cc delete mode 100644 deps/v8/test/cctest/wasm/test-run-wasm-try-catch.cc create mode 100644 deps/v8/test/common/DEPS create mode 100644 deps/v8/test/common/wasm/wasm-module-runner.cc create mode 100644 deps/v8/test/common/wasm/wasm-module-runner.h create mode 100644 deps/v8/test/fuzzer/wasm-code.cc create mode 100644 deps/v8/test/fuzzer/wasm-data-section.cc create mode 100644 deps/v8/test/fuzzer/wasm-function-sigs-section.cc create mode 100644 deps/v8/test/fuzzer/wasm-globals-section.cc create mode 100644 deps/v8/test/fuzzer/wasm-imports-section.cc create mode 100644 deps/v8/test/fuzzer/wasm-memory-section.cc create mode 100644 deps/v8/test/fuzzer/wasm-names-section.cc create mode 100644 deps/v8/test/fuzzer/wasm-section-fuzzers.cc create mode 100644 deps/v8/test/fuzzer/wasm-section-fuzzers.h create mode 100644 deps/v8/test/fuzzer/wasm-types-section.cc create mode 100644 deps/v8/test/fuzzer/wasm.tar.gz.sha1 delete mode 100644 deps/v8/test/fuzzer/wasm/foo.wasm create mode 100644 deps/v8/test/fuzzer/wasm_asmjs.tar.gz.sha1 delete mode 100644 deps/v8/test/fuzzer/wasm_asmjs/foo.wasm create mode 100644 deps/v8/test/fuzzer/wasm_code/foo create mode 100644 deps/v8/test/fuzzer/wasm_data_section/foo create mode 100644 deps/v8/test/fuzzer/wasm_function_sigs_section/foo create mode 100644 deps/v8/test/fuzzer/wasm_globals_section/foo create mode 100644 deps/v8/test/fuzzer/wasm_imports_section/foo create mode 100644 deps/v8/test/fuzzer/wasm_memory_section/foo create mode 100644 deps/v8/test/fuzzer/wasm_names_section/foo create mode 100644 deps/v8/test/fuzzer/wasm_types_section/foo create mode 100644 deps/v8/test/intl/date-format/date-format-to-parts.js delete mode 100644 deps/v8/test/intl/date-format/parse-MMMdy.js delete mode 100644 deps/v8/test/intl/date-format/parse-invalid-input.js delete mode 100644 deps/v8/test/intl/date-format/parse-mdy.js delete mode 100644 deps/v8/test/intl/date-format/parse-mdyhms.js delete mode 100644 deps/v8/test/intl/extra-flag.js delete mode 100644 deps/v8/test/intl/no-extra-flag.js delete mode 100644 deps/v8/test/intl/number-format/parse-currency.js delete mode 100644 deps/v8/test/intl/number-format/parse-decimal.js delete mode 100644 deps/v8/test/intl/number-format/parse-percent.js create mode 100644 deps/v8/test/message/syntactic-tail-call-generator.js create mode 100644 deps/v8/test/message/syntactic-tail-call-generator.out create mode 100644 deps/v8/test/mjsunit/asm/load-elimination.js create mode 100644 deps/v8/test/mjsunit/compiler/escape-analysis-materialize.js create mode 100644 deps/v8/test/mjsunit/compiler/inline-exception-1.js create mode 100644 deps/v8/test/mjsunit/compiler/inline-exception-2.js create mode 100644 deps/v8/test/mjsunit/compiler/math-sign.js create mode 100644 deps/v8/test/mjsunit/compiler/number-isfinite.js create mode 100644 deps/v8/test/mjsunit/compiler/number-isinteger.js create mode 100644 deps/v8/test/mjsunit/compiler/number-isnan.js create mode 100644 deps/v8/test/mjsunit/compiler/number-issafeinteger.js rename deps/v8/test/{intl/number-format/parse-invalid-input.js => mjsunit/compiler/regress-5320.js} (66%) create mode 100644 deps/v8/test/mjsunit/compiler/regress-638132.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-639210.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-644048.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-644633.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-645851.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-compare-negate.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-math-sign-nan-type.js create mode 100644 deps/v8/test/mjsunit/compiler/unsigned-min-max.js create mode 100644 deps/v8/test/mjsunit/debug-print.js create mode 100644 deps/v8/test/mjsunit/es6/regress/regress-5337.js create mode 100644 deps/v8/test/mjsunit/harmony/async-debug-caught-exception-cases.js create mode 100644 deps/v8/test/mjsunit/harmony/default-parameter-do-expression.js create mode 100644 deps/v8/test/mjsunit/json-stringify-holder.js create mode 100644 deps/v8/test/mjsunit/keyed-load-generic.js create mode 100644 deps/v8/test/mjsunit/modules-exports1.js create mode 100644 deps/v8/test/mjsunit/modules-exports2.js create mode 100644 deps/v8/test/mjsunit/modules-exports3.js create mode 100644 deps/v8/test/mjsunit/modules-this.js create mode 100644 deps/v8/test/mjsunit/regexp-lastIndex.js rename deps/v8/test/mjsunit/{bugs/bug-4577.js => regress/regress-4577.js} (68%) create mode 100644 deps/v8/test/mjsunit/regress/regress-5332.js create mode 100644 deps/v8/test/mjsunit/regress/regress-5342.js create mode 100644 deps/v8/test/mjsunit/regress/regress-5357.js create mode 100644 deps/v8/test/mjsunit/regress/regress-5380.js create mode 100644 deps/v8/test/mjsunit/regress/regress-639270.js create mode 100644 deps/v8/test/mjsunit/regress/regress-642409.js create mode 100644 deps/v8/test/mjsunit/regress/regress-645680.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-621868.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-631027.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-635923.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-640369.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-642056.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-643073.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-644111.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-644215.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-644245.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-644631.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-644689-1.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-644689-2.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-645103.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-645888.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-647217.js rename deps/v8/test/{webkit/fast/js/stack-overflow-arrity-catch.js => mjsunit/stack-overflow-arity-catch-noinline.js} (69%) create mode 100644 deps/v8/test/mjsunit/wasm/compiled-module-management.js create mode 100644 deps/v8/test/mjsunit/wasm/exceptions.js create mode 100644 deps/v8/test/mjsunit/wasm/regression-644682.js create mode 100644 deps/v8/test/unittests/compiler/typed-optimization-unittest.cc delete mode 100644 deps/v8/test/webkit/fast/js/stack-overflow-arrity-catch-expected.txt delete mode 100644 deps/v8/testing/gtest/include/gtest/gtest_prod.h create mode 100644 deps/v8/tools/gen-inlining-tests.py create mode 100644 deps/v8/tools/mb/OWNERS create mode 100644 deps/v8/tools/mb/PRESUBMIT.py create mode 100644 deps/v8/tools/mb/README.md create mode 100644 deps/v8/tools/mb/docs/README.md create mode 100644 deps/v8/tools/mb/docs/design_spec.md create mode 100644 deps/v8/tools/mb/docs/user_guide.md create mode 100755 deps/v8/tools/mb/mb create mode 100755 deps/v8/tools/mb/mb.bat create mode 100755 deps/v8/tools/mb/mb.py create mode 100755 deps/v8/tools/mb/mb_unittest.py create mode 100755 deps/v8/tools/update-wasm-fuzzers.sh diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index ac9b0bd9ac59c4..18ed0da289e822 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -40,6 +40,7 @@ gcsuspects shell shell_g /_* +/base /build /gypfiles/win_toolchain.json /buildtools @@ -59,12 +60,7 @@ shell_g /test/test262/data.tar /test/test262/harness /testing/gmock -/testing/gtest/* -!/testing/gtest/include -/testing/gtest/include/* -!/testing/gtest/include/gtest -/testing/gtest/include/gtest/* -!/testing/gtest/include/gtest/gtest_prod.h +/testing/gtest /third_party /third_party/android_tools /third_party/cygwin @@ -85,12 +81,13 @@ shell_g /tools/luci-go/linux64/isolate /tools/luci-go/mac64/isolate /tools/luci-go/win64/isolate.exe -/tools/mb /tools/oom_dump/oom_dump /tools/oom_dump/oom_dump.o /tools/swarming_client /tools/visual_studio/Debug /tools/visual_studio/Release +/test/fuzzer/wasm +/test/fuzzer/wasm_asmjs /v8.log.ll /xcodebuild TAGS @@ -105,3 +102,5 @@ turbo*.cfg turbo*.dot turbo*.json v8.ignition_dispatches_table.json +/test/fuzzer/wasm.tar.gz +/test/fuzzer/wasm_asmjs.tar.gz diff --git a/deps/v8/.gn b/deps/v8/.gn index a1c0ff8dceba56..aee1752d4be65e 100644 --- a/deps/v8/.gn +++ b/deps/v8/.gn @@ -14,8 +14,7 @@ secondary_source = "//build/secondary/" # matching these patterns (see "gn help label_pattern" for format) will have # their includes checked for proper dependencies when you run either # "gn check" or "gn gen --check". -check_targets = [ -] +check_targets = [] # These are the list of GN files that run exec_script. This whitelist exists # to force additional review for new uses of exec_script, which is strongly @@ -45,7 +44,5 @@ exec_script_whitelist = [ "//build/toolchain/win/BUILD.gn", "//build/util/branding.gni", "//build/util/version.gni", - "//test/cctest/BUILD.gn", "//test/test262/BUILD.gn", - "//test/unittests/BUILD.gn", ] diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index d70be77d86dccc..02562eff766b15 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -63,6 +63,7 @@ Felix Geisendörfer Filipe David Manana Franziska Hinkelmann Geoffrey Garside +Gwang Yoon Hwang Han Choongwoo Hirofumi Mako Honggyu Kim @@ -95,9 +96,11 @@ Mike Pennisi Milton Chiang Myeong-bo Shim Nicolas Antonius Ernst Leopold Maria Kaiser +Noj Vek Oleksandr Chekhovskyi Paolo Giarrusso Patrick Gansterer +Peter Rybin Peter Varga Paul Lind Rafal Krypa diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 94eb3897481602..e26d14e6fe2fd1 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -62,6 +62,9 @@ declare_args() { # tools/gen-postmortem-metadata.py for details. v8_postmortem_support = false + # Switches off inlining in V8. + v8_no_inline = false + # Similar to vfp but on MIPS. v8_can_use_fpu_instructions = true @@ -94,6 +97,11 @@ if (v8_enable_disassembler == "") { v8_enable_disassembler = is_debug && !v8_optimized_debug } +# 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. +is_target_simulator = target_cpu != v8_target_cpu + v8_generated_peephole_source = "$target_gen_dir/bytecode-peephole-table.cc" v8_random_seed = "314159265" v8_toolset_for_shell = "host" @@ -140,6 +148,9 @@ config("external_config") { ] } include_dirs = [ "include" ] + if (v8_enable_inspector_override) { + include_dirs += [ "$target_gen_dir/include" ] + } libs = [] if (is_android && current_toolchain != host_toolchain) { libs += [ "log" ] @@ -200,7 +211,7 @@ config("toolchain") { if (v8_current_cpu == "arm") { defines += [ "V8_TARGET_ARCH_ARM" ] - if (arm_version == 7) { + if (arm_version >= 7) { defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] } if (arm_fpu == "vfpv3-d16") { @@ -233,6 +244,12 @@ config("toolchain") { defines += [ "V8_TARGET_ARCH_ARM64" ] } + # Mips64el/mipsel simulators. + if (is_target_simulator && + (v8_current_cpu == "mipsel" || v8_current_cpu == "mips64el")) { + defines += [ "_MIPS_TARGET_SIMULATOR" ] + } + # TODO(jochen): Add support for mips. if (v8_current_cpu == "mipsel") { defines += [ "V8_TARGET_ARCH_MIPS" ] @@ -343,6 +360,13 @@ config("toolchain") { } else if (dcheck_always_on) { defines += [ "DEBUG" ] } + + if (v8_no_inline) { + cflags += [ + "-fno-inline-functions", + "-fno-inline", + ] + } } ############################################################################### @@ -439,8 +463,8 @@ action("js2c_experimental") { if (v8_enable_i18n_support) { sources += [ + "src/js/datetime-format-to-parts.js", "src/js/icu-case-mapping.js", - "src/js/intl-extra.js", ] } @@ -857,10 +881,14 @@ v8_source_set("v8_base") { "src/ast/ast-numbering.h", "src/ast/ast-traversal-visitor.h", "src/ast/ast-type-bounds.h", + "src/ast/ast-types.cc", + "src/ast/ast-types.h", "src/ast/ast-value-factory.cc", "src/ast/ast-value-factory.h", "src/ast/ast.cc", "src/ast/ast.h", + "src/ast/compile-time-value.cc", + "src/ast/compile-time-value.h", "src/ast/context-slot-cache.cc", "src/ast/context-slot-cache.h", "src/ast/modules.cc", @@ -868,7 +896,6 @@ v8_source_set("v8_base") { "src/ast/prettyprinter.cc", "src/ast/prettyprinter.h", "src/ast/scopeinfo.cc", - "src/ast/scopeinfo.h", "src/ast/scopes.cc", "src/ast/scopes.h", "src/ast/variables.cc", @@ -940,6 +967,8 @@ v8_source_set("v8_base") { "src/compilation-cache.h", "src/compilation-dependencies.cc", "src/compilation-dependencies.h", + "src/compilation-info.cc", + "src/compilation-info.h", "src/compilation-statistics.cc", "src/compilation-statistics.h", "src/compiler-dispatcher/compiler-dispatcher-job.cc", @@ -1132,12 +1161,18 @@ v8_source_set("v8_base") { "src/compiler/store-store-elimination.h", "src/compiler/tail-call-optimization.cc", "src/compiler/tail-call-optimization.h", + "src/compiler/type-cache.cc", + "src/compiler/type-cache.h", "src/compiler/type-hint-analyzer.cc", "src/compiler/type-hint-analyzer.h", "src/compiler/type-hints.cc", "src/compiler/type-hints.h", + "src/compiler/typed-optimization.cc", + "src/compiler/typed-optimization.h", "src/compiler/typer.cc", "src/compiler/typer.h", + "src/compiler/types.cc", + "src/compiler/types.h", "src/compiler/unwinding-info-writer.h", "src/compiler/value-numbering-reducer.cc", "src/compiler/value-numbering-reducer.h", @@ -1216,6 +1251,7 @@ v8_source_set("v8_base") { "src/crankshaft/lithium-allocator.h", "src/crankshaft/lithium-codegen.cc", "src/crankshaft/lithium-codegen.h", + "src/crankshaft/lithium-inl.h", "src/crankshaft/lithium.cc", "src/crankshaft/lithium.h", "src/crankshaft/typing.cc", @@ -1314,6 +1350,7 @@ v8_source_set("v8_base") { "src/heap/heap-inl.h", "src/heap/heap.cc", "src/heap/heap.h", + "src/heap/incremental-marking-inl.h", "src/heap/incremental-marking-job.cc", "src/heap/incremental-marking-job.h", "src/heap/incremental-marking.cc", @@ -1351,6 +1388,7 @@ v8_source_set("v8_base") { "src/ic/call-optimization.h", "src/ic/handler-compiler.cc", "src/ic/handler-compiler.h", + "src/ic/handler-configuration.h", "src/ic/ic-compiler.cc", "src/ic/ic-compiler.h", "src/ic/ic-inl.h", @@ -1422,11 +1460,16 @@ v8_source_set("v8_base") { "src/layout-descriptor.h", "src/list-inl.h", "src/list.h", + "src/locked-queue-inl.h", + "src/locked-queue.h", "src/log-inl.h", "src/log-utils.cc", "src/log-utils.h", "src/log.cc", "src/log.h", + "src/lookup-cache-inl.h", + "src/lookup-cache.cc", + "src/lookup-cache.h", "src/lookup.cc", "src/lookup.h", "src/machine-type.cc", @@ -1444,6 +1487,8 @@ v8_source_set("v8_base") { "src/objects.h", "src/ostreams.cc", "src/ostreams.h", + "src/parsing/duplicate-finder.cc", + "src/parsing/duplicate-finder.h", "src/parsing/expression-classifier.h", "src/parsing/func-name-inferrer.cc", "src/parsing/func-name-inferrer.h", @@ -1601,15 +1646,11 @@ v8_source_set("v8_base") { "src/transitions-inl.h", "src/transitions.cc", "src/transitions.h", - "src/type-cache.cc", - "src/type-cache.h", "src/type-feedback-vector-inl.h", "src/type-feedback-vector.cc", "src/type-feedback-vector.h", "src/type-info.cc", "src/type-info.h", - "src/types.cc", - "src/types.h", "src/unicode-cache-inl.h", "src/unicode-cache.h", "src/unicode-decoder.cc", @@ -1629,6 +1670,7 @@ v8_source_set("v8_base") { "src/v8threads.h", "src/value-serializer.cc", "src/value-serializer.h", + "src/vector.h", "src/version.cc", "src/version.h", "src/vm-state-inl.h", @@ -1696,6 +1738,8 @@ v8_source_set("v8_base") { "src/ia32/interface-descriptors-ia32.cc", "src/ia32/macro-assembler-ia32.cc", "src/ia32/macro-assembler-ia32.h", + "src/ia32/simulator-ia32.cc", + "src/ia32/simulator-ia32.h", "src/ic/ia32/access-compiler-ia32.cc", "src/ic/ia32/handler-compiler-ia32.cc", "src/ic/ia32/ic-compiler-ia32.cc", @@ -1744,6 +1788,9 @@ v8_source_set("v8_base") { "src/x64/interface-descriptors-x64.cc", "src/x64/macro-assembler-x64.cc", "src/x64/macro-assembler-x64.h", + "src/x64/simulator-x64.cc", + "src/x64/simulator-x64.h", + "src/x64/sse-instr.h", ] } else if (v8_current_cpu == "arm") { sources += [ @@ -2010,6 +2057,10 @@ v8_source_set("v8_base") { sources += [ "$target_gen_dir/debug-support.cc" ] deps += [ ":postmortem-metadata" ] } + + if (v8_enable_inspector_override) { + deps += [ "src/inspector:inspector" ] + } } v8_source_set("v8_libbase") { @@ -2035,6 +2086,7 @@ v8_source_set("v8_libbase") { "src/base/bits.cc", "src/base/bits.h", "src/base/build_config.h", + "src/base/compiler-specific.h", "src/base/cpu.cc", "src/base/cpu.h", "src/base/debug/stack_trace.cc", @@ -2552,6 +2604,15 @@ v8_source_set("regexp_fuzzer") { v8_fuzzer("regexp_fuzzer") { } +v8_source_set("wasm_module_runner") { + sources = [ + "test/common/wasm/wasm-module-runner.cc", + "test/common/wasm/wasm-module-runner.h", + ] + + configs = [ ":internal_config" ] +} + v8_source_set("wasm_fuzzer") { sources = [ "test/fuzzer/wasm.cc", @@ -2559,6 +2620,7 @@ v8_source_set("wasm_fuzzer") { deps = [ ":fuzzer_support", + ":wasm_module_runner", ] configs = [ ":internal_config" ] @@ -2574,6 +2636,7 @@ v8_source_set("wasm_asmjs_fuzzer") { deps = [ ":fuzzer_support", + ":wasm_module_runner", ] configs = [ ":internal_config" ] @@ -2581,3 +2644,147 @@ v8_source_set("wasm_asmjs_fuzzer") { v8_fuzzer("wasm_asmjs_fuzzer") { } + +v8_source_set("wasm_code_fuzzer") { + sources = [ + "test/fuzzer/wasm-code.cc", + ] + + deps = [ + ":fuzzer_support", + ":wasm_module_runner", + ] + + configs = [ ":internal_config" ] +} + +v8_fuzzer("wasm_code_fuzzer") { +} + +v8_source_set("lib_wasm_section_fuzzer") { + sources = [ + "test/fuzzer/wasm-section-fuzzers.cc", + "test/fuzzer/wasm-section-fuzzers.h", + ] + + configs = [ ":internal_config" ] +} + +v8_source_set("wasm_types_section_fuzzer") { + sources = [ + "test/fuzzer/wasm-types-section.cc", + ] + + deps = [ + ":fuzzer_support", + ":lib_wasm_section_fuzzer", + ":wasm_module_runner", + ] + + configs = [ ":internal_config" ] +} + +v8_fuzzer("wasm_types_section_fuzzer") { +} + +v8_source_set("wasm_names_section_fuzzer") { + sources = [ + "test/fuzzer/wasm-names-section.cc", + ] + + deps = [ + ":fuzzer_support", + ":lib_wasm_section_fuzzer", + ":wasm_module_runner", + ] + + configs = [ ":internal_config" ] +} + +v8_fuzzer("wasm_names_section_fuzzer") { +} + +v8_source_set("wasm_globals_section_fuzzer") { + sources = [ + "test/fuzzer/wasm-globals-section.cc", + ] + + deps = [ + ":fuzzer_support", + ":lib_wasm_section_fuzzer", + ":wasm_module_runner", + ] + + configs = [ ":internal_config" ] +} + +v8_fuzzer("wasm_globals_section_fuzzer") { +} + +v8_source_set("wasm_imports_section_fuzzer") { + sources = [ + "test/fuzzer/wasm-imports-section.cc", + ] + + deps = [ + ":fuzzer_support", + ":lib_wasm_section_fuzzer", + ":wasm_module_runner", + ] + + configs = [ ":internal_config" ] +} + +v8_fuzzer("wasm_imports_section_fuzzer") { +} + +v8_source_set("wasm_function_sigs_section_fuzzer") { + sources = [ + "test/fuzzer/wasm-function-sigs-section.cc", + ] + + deps = [ + ":fuzzer_support", + ":lib_wasm_section_fuzzer", + ":wasm_module_runner", + ] + + configs = [ ":internal_config" ] +} + +v8_fuzzer("wasm_function_sigs_section_fuzzer") { +} + +v8_source_set("wasm_memory_section_fuzzer") { + sources = [ + "test/fuzzer/wasm-memory-section.cc", + ] + + deps = [ + ":fuzzer_support", + ":lib_wasm_section_fuzzer", + ":wasm_module_runner", + ] + + configs = [ ":internal_config" ] +} + +v8_fuzzer("wasm_memory_section_fuzzer") { +} + +v8_source_set("wasm_data_section_fuzzer") { + sources = [ + "test/fuzzer/wasm-data-section.cc", + ] + + deps = [ + ":fuzzer_support", + ":lib_wasm_section_fuzzer", + ":wasm_module_runner", + ] + + configs = [ ":internal_config" ] +} + +v8_fuzzer("wasm_data_section_fuzzer") { +} diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 6cac01d5974c44..30be5b9bb7a1da 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -8,27 +8,25 @@ vars = { deps = { "v8/build": - Var("git_url") + "/chromium/src/build.git" + "@" + "59daf502c36f20b5c9292f4bd9af85791f8a5884", + Var("git_url") + "/chromium/src/build.git" + "@" + "3f47a5e106127ae4e2567d64c615dc706054c819", "v8/tools/gyp": Var("git_url") + "/external/gyp.git" + "@" + "702ac58e477214c635d9b541932e75a95d349352", "v8/third_party/icu": - Var("git_url") + "/chromium/deps/icu.git" + "@" + "2341038bf72869a5683a893a2b319a48ffec7f62", + Var("git_url") + "/chromium/deps/icu.git" + "@" + "b0bd3ee50bc2e768d7a17cbc60d87f517f024dbe", "v8/third_party/instrumented_libraries": - Var("git_url") + "/chromium/src/third_party/instrumented_libraries.git" + "@" + "f15768d7fdf68c0748d20738184120c8ab2e6db7", + Var("git_url") + "/chromium/src/third_party/instrumented_libraries.git" + "@" + "45f5814b1543e41ea0be54c771e3840ea52cca4a", "v8/buildtools": - Var("git_url") + "/chromium/buildtools.git" + "@" + "adb8bf4e8fc92aa1717bf151b862d58e6f27c4f2", + Var("git_url") + "/chromium/buildtools.git" + "@" + "b97d6c93a3e805c9ba5356dca872f1801639fbc5", "v8/base/trace_event/common": - Var("git_url") + "/chromium/src/base/trace_event/common.git" + "@" + "315bf1e2d45be7d53346c31cfcc37424a32c30c8", + Var("git_url") + "/chromium/src/base/trace_event/common.git" + "@" + "26eac53e73b09625e9b8f783b479e54fcae85f58", "v8/third_party/WebKit/Source/platform/inspector_protocol": - Var("git_url") + "/chromium/src/third_party/WebKit/Source/platform/inspector_protocol.git" + "@" + "547960151fb364dd9a382fa79ffc9abfb184e3d1", + Var("git_url") + "/chromium/src/third_party/WebKit/Source/platform/inspector_protocol.git" + "@" + "e240fdcdb5880deb48156dbb9ccee0c28664cf88", "v8/third_party/jinja2": - Var("git_url") + "/chromium/src/third_party/jinja2.git" + "@" + "2222b31554f03e62600cd7e383376a7c187967a1", + Var("git_url") + "/chromium/src/third_party/jinja2.git" + "@" + "b61a2c009a579593a259c1b300e0ad02bf48fd78", "v8/third_party/markupsafe": Var("git_url") + "/chromium/src/third_party/markupsafe.git" + "@" + "484a5661041cac13bfc688a26ec5434b05d18961", - "v8/tools/mb": - Var('git_url') + '/chromium/src/tools/mb.git' + '@' + "99788b8b516c44d7db25cfb68695bc234fdee5ed", "v8/tools/swarming_client": - Var('git_url') + '/external/swarming.client.git' + '@' + "e4288c3040a32f2e7ad92f957668f2ee3d36e5a6", + Var('git_url') + '/external/swarming.client.git' + '@' + "380e32662312eb107f06fcba6409b0409f8fef72", "v8/testing/gtest": Var("git_url") + "/external/github.com/google/googletest.git" + "@" + "6f8a66431cb592dad629028a50b3dd418a408c87", "v8/testing/gmock": @@ -39,17 +37,17 @@ deps = { Var("git_url") + "/v8/deps/third_party/mozilla-tests.git" + "@" + "f6c578a10ea707b1a8ab0b88943fe5115ce2b9be", "v8/test/simdjs/data": Var("git_url") + "/external/github.com/tc39/ecmascript_simd.git" + "@" + "baf493985cb9ea7cdbd0d68704860a8156de9556", "v8/test/test262/data": - Var("git_url") + "/external/github.com/tc39/test262.git" + "@" + "88bc7fe7586f161201c5f14f55c9c489f82b1b67", + Var("git_url") + "/external/github.com/tc39/test262.git" + "@" + "29c23844494a7cc2fbebc6948d2cb0bcaddb24e7", "v8/test/test262/harness": Var("git_url") + "/external/github.com/test262-utils/test262-harness-py.git" + "@" + "cbd968f54f7a95c6556d53ba852292a4c49d11d8", "v8/tools/clang": - Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "3afb04a8153e40ff00f9eaa14337851c3ab4a368", + Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "bd7e80b254a93d0a5cd8ecb994e47b1c827e253c", } deps_os = { "android": { "v8/third_party/android_tools": - Var("git_url") + "/android_tools.git" + "@" + "af1c5a4cd6329ccdcf8c2bc93d9eea02f9d74869", + Var("git_url") + "/android_tools.git" + "@" + "25d57ead05d3dfef26e9c19b13ed10b0a69829cf", }, "win": { "v8/third_party/cygwin": @@ -203,6 +201,28 @@ hooks = [ "-s", "v8/buildtools/linux64/gn.sha1", ], }, + { + "name": "wasm_fuzzer", + "pattern": ".", + "action": [ "download_from_google_storage", + "--no_resume", + "--no_auth", + "-u", + "--bucket", "v8-wasm-fuzzer", + "-s", "v8/test/fuzzer/wasm.tar.gz.sha1", + ], + }, + { + "name": "wasm_asmjs_fuzzer", + "pattern": ".", + "action": [ "download_from_google_storage", + "--no_resume", + "--no_auth", + "-u", + "--bucket", "v8-wasm-asmjs-fuzzer", + "-s", "v8/test/fuzzer/wasm_asmjs.tar.gz.sha1", + ], + }, { # Downloads the current stable linux sysroot to build/linux/ if needed. # This sysroot updates at about the same rate that the chrome build deps @@ -259,6 +279,6 @@ hooks = [ { # A change to a .gyp, .gypi, or to GYP itself should run the generator. "pattern": ".", - "action": ["python", "v8/gypfiles/gyp_v8"], + "action": ["python", "v8/gypfiles/gyp_v8", "--running-as-hook"], }, ] diff --git a/deps/v8/OWNERS b/deps/v8/OWNERS index 26701eef59b1b3..028f4ff12c5c89 100644 --- a/deps/v8/OWNERS +++ b/deps/v8/OWNERS @@ -22,7 +22,6 @@ mtrofin@chromium.org mvstanton@chromium.org mythria@chromium.org neis@chromium.org -oth@chromium.org rmcilroy@chromium.org rossberg@chromium.org titzer@chromium.org diff --git a/deps/v8/WATCHLISTS b/deps/v8/WATCHLISTS index 4c6b4fa4a08718..40ce3d865dc2a0 100644 --- a/deps/v8/WATCHLISTS +++ b/deps/v8/WATCHLISTS @@ -74,7 +74,6 @@ ], 'interpreter': [ 'rmcilroy@chromium.org', - 'oth@chromium.org', ], 'feature_shipping_status': [ 'hablich@chromium.org', diff --git a/deps/v8/base/trace_event/common/trace_event_common.h b/deps/v8/base/trace_event/common/trace_event_common.h deleted file mode 100644 index 0c16e7b72382d3..00000000000000 --- a/deps/v8/base/trace_event/common/trace_event_common.h +++ /dev/null @@ -1,1119 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This header file defines the set of trace_event macros without specifying -// how the events actually get collected and stored. If you need to expose trace -// events to some other universe, you can copy-and-paste this file as well as -// trace_event.h, modifying the macros contained there as necessary for the -// target platform. The end result is that multiple libraries can funnel events -// through to a shared trace event collector. - -// IMPORTANT: To avoid conflicts, if you need to modify this file for a library, -// land your change in base/ first, and then copy-and-paste it. - -// Trace events are for tracking application performance and resource usage. -// Macros are provided to track: -// Begin and end of function calls -// Counters -// -// Events are issued against categories. Whereas LOG's -// categories are statically defined, TRACE categories are created -// implicitly with a string. For example: -// TRACE_EVENT_INSTANT0("MY_SUBSYSTEM", "SomeImportantEvent", -// TRACE_EVENT_SCOPE_THREAD) -// -// It is often the case that one trace may belong in multiple categories at the -// same time. The first argument to the trace can be a comma-separated list of -// categories, forming a category group, like: -// -// TRACE_EVENT_INSTANT0("input,views", "OnMouseOver", TRACE_EVENT_SCOPE_THREAD) -// -// We can enable/disable tracing of OnMouseOver by enabling/disabling either -// category. -// -// Events can be INSTANT, or can be pairs of BEGIN and END in the same scope: -// TRACE_EVENT_BEGIN0("MY_SUBSYSTEM", "SomethingCostly") -// doSomethingCostly() -// TRACE_EVENT_END0("MY_SUBSYSTEM", "SomethingCostly") -// Note: our tools can't always determine the correct BEGIN/END pairs unless -// these are used in the same scope. Use ASYNC_BEGIN/ASYNC_END macros if you -// need them to be in separate scopes. -// -// A common use case is to trace entire function scopes. This -// issues a trace BEGIN and END automatically: -// void doSomethingCostly() { -// TRACE_EVENT0("MY_SUBSYSTEM", "doSomethingCostly"); -// ... -// } -// -// Additional parameters can be associated with an event: -// void doSomethingCostly2(int howMuch) { -// TRACE_EVENT1("MY_SUBSYSTEM", "doSomethingCostly", -// "howMuch", howMuch); -// ... -// } -// -// The trace system will automatically add to this information the -// current process id, thread id, and a timestamp in microseconds. -// -// To trace an asynchronous procedure such as an IPC send/receive, use -// ASYNC_BEGIN and ASYNC_END: -// [single threaded sender code] -// static int send_count = 0; -// ++send_count; -// TRACE_EVENT_ASYNC_BEGIN0("ipc", "message", send_count); -// Send(new MyMessage(send_count)); -// [receive code] -// void OnMyMessage(send_count) { -// TRACE_EVENT_ASYNC_END0("ipc", "message", send_count); -// } -// The third parameter is a unique ID to match ASYNC_BEGIN/ASYNC_END pairs. -// ASYNC_BEGIN and ASYNC_END can occur on any thread of any traced process. -// Pointers can be used for the ID parameter, and they will be mangled -// internally so that the same pointer on two different processes will not -// match. For example: -// class MyTracedClass { -// public: -// MyTracedClass() { -// TRACE_EVENT_ASYNC_BEGIN0("category", "MyTracedClass", this); -// } -// ~MyTracedClass() { -// TRACE_EVENT_ASYNC_END0("category", "MyTracedClass", this); -// } -// } -// -// Trace event also supports counters, which is a way to track a quantity -// as it varies over time. Counters are created with the following macro: -// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter", g_myCounterValue); -// -// Counters are process-specific. The macro itself can be issued from any -// thread, however. -// -// Sometimes, you want to track two counters at once. You can do this with two -// counter macros: -// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter0", g_myCounterValue[0]); -// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter1", g_myCounterValue[1]); -// Or you can do it with a combined macro: -// TRACE_COUNTER2("MY_SUBSYSTEM", "myCounter", -// "bytesPinned", g_myCounterValue[0], -// "bytesAllocated", g_myCounterValue[1]); -// This indicates to the tracing UI that these counters should be displayed -// in a single graph, as a summed area chart. -// -// Since counters are in a global namespace, you may want to disambiguate with a -// unique ID, by using the TRACE_COUNTER_ID* variations. -// -// By default, trace collection is compiled in, but turned off at runtime. -// Collecting trace data is the responsibility of the embedding -// application. In Chrome's case, navigating to about:tracing will turn on -// tracing and display data collected across all active processes. -// -// -// Memory scoping note: -// Tracing copies the pointers, not the string content, of the strings passed -// in for category_group, name, and arg_names. Thus, the following code will -// cause problems: -// char* str = strdup("importantName"); -// TRACE_EVENT_INSTANT0("SUBSYSTEM", str); // BAD! -// free(str); // Trace system now has dangling pointer -// -// To avoid this issue with the |name| and |arg_name| parameters, use the -// TRACE_EVENT_COPY_XXX overloads of the macros at additional runtime overhead. -// Notes: The category must always be in a long-lived char* (i.e. static const). -// The |arg_values|, when used, are always deep copied with the _COPY -// macros. -// -// When are string argument values copied: -// const char* arg_values are only referenced by default: -// TRACE_EVENT1("category", "name", -// "arg1", "literal string is only referenced"); -// Use TRACE_STR_COPY to force copying of a const char*: -// TRACE_EVENT1("category", "name", -// "arg1", TRACE_STR_COPY("string will be copied")); -// std::string arg_values are always copied: -// TRACE_EVENT1("category", "name", -// "arg1", std::string("string will be copied")); -// -// -// Convertable notes: -// Converting a large data type to a string can be costly. To help with this, -// the trace framework provides an interface ConvertableToTraceFormat. If you -// inherit from it and implement the AppendAsTraceFormat method the trace -// framework will call back to your object to convert a trace output time. This -// means, if the category for the event is disabled, the conversion will not -// happen. -// -// class MyData : public base::trace_event::ConvertableToTraceFormat { -// public: -// MyData() {} -// void AppendAsTraceFormat(std::string* out) const override { -// out->append("{\"foo\":1}"); -// } -// private: -// ~MyData() override {} -// DISALLOW_COPY_AND_ASSIGN(MyData); -// }; -// -// TRACE_EVENT1("foo", "bar", "data", -// std::unique_ptr(new MyData())); -// -// The trace framework will take ownership if the passed pointer and it will -// be free'd when the trace buffer is flushed. -// -// Note, we only do the conversion when the buffer is flushed, so the provided -// data object should not be modified after it's passed to the trace framework. -// -// -// Thread Safety: -// A thread safe singleton and mutex are used for thread safety. Category -// enabled flags are used to limit the performance impact when the system -// is not enabled. -// -// TRACE_EVENT macros first cache a pointer to a category. The categories are -// statically allocated and safe at all times, even after exit. Fetching a -// category is protected by the TraceLog::lock_. Multiple threads initializing -// the static variable is safe, as they will be serialized by the lock and -// multiple calls will return the same pointer to the category. -// -// Then the category_group_enabled flag is checked. This is a unsigned char, and -// not intended to be multithread safe. It optimizes access to AddTraceEvent -// which is threadsafe internally via TraceLog::lock_. The enabled flag may -// cause some threads to incorrectly call or skip calling AddTraceEvent near -// the time of the system being enabled or disabled. This is acceptable as -// we tolerate some data loss while the system is being enabled/disabled and -// because AddTraceEvent is threadsafe internally and checks the enabled state -// again under lock. -// -// Without the use of these static category pointers and enabled flags all -// trace points would carry a significant performance cost of acquiring a lock -// and resolving the category. - -#if defined(TRACE_EVENT0) -#error "Another copy of this file has already been included." -#endif - -// This will mark the trace event as disabled by default. The user will need -// to explicitly enable the event. -#define TRACE_DISABLED_BY_DEFAULT(name) "disabled-by-default-" name - -// Records a pair of begin and end events called "name" for the current -// scope, with 0, 1 or 2 associated arguments. If the category is not -// enabled, then this does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_EVENT0(category_group, name) \ - INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name) -#define TRACE_EVENT_WITH_FLOW0(category_group, name, bind_id, flow_flags) \ - INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id, \ - flow_flags) -#define TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val) -#define TRACE_EVENT_WITH_FLOW1(category_group, name, bind_id, flow_flags, \ - arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id, \ - flow_flags, arg1_name, arg1_val) -#define TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name, \ - arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) -#define TRACE_EVENT_WITH_FLOW2(category_group, name, bind_id, flow_flags, \ - arg1_name, arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id, \ - flow_flags, arg1_name, arg1_val, \ - arg2_name, arg2_val) - -// UNSHIPPED_TRACE_EVENT* are like TRACE_EVENT* except that they are not -// included in official builds. - -#if OFFICIAL_BUILD -#undef TRACING_IS_OFFICIAL_BUILD -#define TRACING_IS_OFFICIAL_BUILD 1 -#elif !defined(TRACING_IS_OFFICIAL_BUILD) -#define TRACING_IS_OFFICIAL_BUILD 0 -#endif - -#if TRACING_IS_OFFICIAL_BUILD -#define UNSHIPPED_TRACE_EVENT0(category_group, name) (void)0 -#define UNSHIPPED_TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \ - (void)0 -#define UNSHIPPED_TRACE_EVENT2(category_group, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - (void)0 -#define UNSHIPPED_TRACE_EVENT_INSTANT0(category_group, name, scope) (void)0 -#define UNSHIPPED_TRACE_EVENT_INSTANT1(category_group, name, scope, arg1_name, \ - arg1_val) \ - (void)0 -#define UNSHIPPED_TRACE_EVENT_INSTANT2(category_group, name, scope, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - (void)0 -#else -#define UNSHIPPED_TRACE_EVENT0(category_group, name) \ - TRACE_EVENT0(category_group, name) -#define UNSHIPPED_TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \ - TRACE_EVENT1(category_group, name, arg1_name, arg1_val) -#define UNSHIPPED_TRACE_EVENT2(category_group, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name, arg2_val) -#define UNSHIPPED_TRACE_EVENT_INSTANT0(category_group, name, scope) \ - TRACE_EVENT_INSTANT0(category_group, name, scope) -#define UNSHIPPED_TRACE_EVENT_INSTANT1(category_group, name, scope, arg1_name, \ - arg1_val) \ - TRACE_EVENT_INSTANT1(category_group, name, scope, arg1_name, arg1_val) -#define UNSHIPPED_TRACE_EVENT_INSTANT2(category_group, name, scope, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - TRACE_EVENT_INSTANT2(category_group, name, scope, arg1_name, arg1_val, \ - arg2_name, arg2_val) -#endif - -// Records a single event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_EVENT_INSTANT0(category_group, name, scope) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ - TRACE_EVENT_FLAG_NONE | scope) -#define TRACE_EVENT_INSTANT1(category_group, name, scope, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ - TRACE_EVENT_FLAG_NONE | scope, arg1_name, arg1_val) -#define TRACE_EVENT_INSTANT2(category_group, name, scope, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ - TRACE_EVENT_FLAG_NONE | scope, arg1_name, arg1_val, \ - arg2_name, arg2_val) -#define TRACE_EVENT_COPY_INSTANT0(category_group, name, scope) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ - TRACE_EVENT_FLAG_COPY | scope) -#define TRACE_EVENT_COPY_INSTANT1(category_group, name, scope, arg1_name, \ - arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ - TRACE_EVENT_FLAG_COPY | scope, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_INSTANT2(category_group, name, scope, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \ - TRACE_EVENT_FLAG_COPY | scope, arg1_name, arg1_val, \ - arg2_name, arg2_val) - -#define TRACE_EVENT_INSTANT_WITH_TIMESTAMP0(category_group, name, scope, \ - timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_INSTANT, category_group, name, 0, 0, timestamp, \ - TRACE_EVENT_FLAG_NONE | scope) - -// Syntactic sugars for the sampling tracing in the main thread. -#define TRACE_EVENT_SCOPED_SAMPLING_STATE(category, name) \ - TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(0, category, name) -#define TRACE_EVENT_GET_SAMPLING_STATE() \ - TRACE_EVENT_GET_SAMPLING_STATE_FOR_BUCKET(0) -#define TRACE_EVENT_SET_SAMPLING_STATE(category, name) \ - TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(0, category, name) -#define TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(categoryAndName) \ - TRACE_EVENT_SET_NONCONST_SAMPLING_STATE_FOR_BUCKET(0, categoryAndName) - -// Records a single BEGIN event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_EVENT_BEGIN0(category_group, name) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ - TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_BEGIN1(category_group, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_BEGIN2(category_group, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ - arg2_name, arg2_val) -#define TRACE_EVENT_COPY_BEGIN0(category_group, name) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ - TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_BEGIN1(category_group, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_BEGIN2(category_group, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ - arg2_name, arg2_val) - -// Similar to TRACE_EVENT_BEGINx but with a custom |at| timestamp provided. -// - |id| is used to match the _BEGIN event with the _END event. -// Events are considered to match if their category_group, name and id values -// all match. |id| must either be a pointer or an integer value up to 64 bits. -// If it's a pointer, the bits will be xored with a hash of the process ID so -// that the same pointer on two different processes will not collide. -#define TRACE_EVENT_BEGIN_WITH_ID_TID_AND_TIMESTAMP0(category_group, name, id, \ - thread_id, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP0( \ - category_group, name, id, thread_id, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP1( \ - category_group, name, id, thread_id, timestamp, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP2( \ - category_group, name, id, thread_id, timestamp, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, \ - arg2_val) - -// Records a single END event for "name" immediately. If the category -// is not enabled, then this does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_EVENT_END0(category_group, name) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \ - TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_END1(category_group, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_END2(category_group, name, arg1_name, arg1_val, arg2_name, \ - arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ - arg2_name, arg2_val) -#define TRACE_EVENT_COPY_END0(category_group, name) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \ - TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_END1(category_group, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_END2(category_group, name, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ - arg2_name, arg2_val) - -#define TRACE_EVENT_MARK_WITH_TIMESTAMP1(category_group, name, timestamp, \ - arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_MARK, category_group, name, 0, 0, timestamp, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) - -#define TRACE_EVENT_COPY_MARK(category_group, name) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_MARK, category_group, name, \ - TRACE_EVENT_FLAG_COPY) - -#define TRACE_EVENT_COPY_MARK_WITH_TIMESTAMP(category_group, name, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_MARK, category_group, name, 0, 0, timestamp, \ - TRACE_EVENT_FLAG_COPY) - -// Similar to TRACE_EVENT_ENDx but with a custom |at| timestamp provided. -// - |id| is used to match the _BEGIN event with the _END event. -// Events are considered to match if their category_group, name and id values -// all match. |id| must either be a pointer or an integer value up to 64 bits. -// If it's a pointer, the bits will be xored with a hash of the process ID so -// that the same pointer on two different processes will not collide. -#define TRACE_EVENT_END_WITH_ID_TID_AND_TIMESTAMP0(category_group, name, id, \ - thread_id, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP0( \ - category_group, name, id, thread_id, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP1( \ - category_group, name, id, thread_id, timestamp, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP2( \ - category_group, name, id, thread_id, timestamp, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \ - timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, \ - arg2_val) - -// Records the value of a counter called "name" immediately. Value -// must be representable as a 32 bit integer. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_COUNTER1(category_group, name, value) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, category_group, name, \ - TRACE_EVENT_FLAG_NONE, "value", \ - static_cast(value)) -#define TRACE_COPY_COUNTER1(category_group, name, value) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, category_group, name, \ - TRACE_EVENT_FLAG_COPY, "value", \ - static_cast(value)) - -// Records the values of a multi-parted counter called "name" immediately. -// The UI will treat value1 and value2 as parts of a whole, displaying their -// values as a stacked-bar chart. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define TRACE_COUNTER2(category_group, name, value1_name, value1_val, \ - value2_name, value2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, category_group, name, \ - TRACE_EVENT_FLAG_NONE, value1_name, \ - static_cast(value1_val), value2_name, \ - static_cast(value2_val)) -#define TRACE_COPY_COUNTER2(category_group, name, value1_name, value1_val, \ - value2_name, value2_val) \ - INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, category_group, name, \ - TRACE_EVENT_FLAG_COPY, value1_name, \ - static_cast(value1_val), value2_name, \ - static_cast(value2_val)) - -// Similar to TRACE_COUNTERx, but with a custom |timestamp| provided. -#define TRACE_COUNTER_WITH_TIMESTAMP1(category_group, name, timestamp, value) \ - INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ - TRACE_EVENT_PHASE_COUNTER, category_group, name, timestamp, \ - TRACE_EVENT_FLAG_NONE, "value", static_cast(value)) - -#define TRACE_COUNTER_WITH_TIMESTAMP2(category_group, name, timestamp, \ - value1_name, value1_val, value2_name, \ - value2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ - TRACE_EVENT_PHASE_COUNTER, category_group, name, timestamp, \ - TRACE_EVENT_FLAG_NONE, value1_name, static_cast(value1_val), \ - value2_name, static_cast(value2_val)) - -// Records the value of a counter called "name" immediately. Value -// must be representable as a 32 bit integer. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to disambiguate counters with the same name. It must either -// be a pointer or an integer value up to 64 bits. If it's a pointer, the bits -// will be xored with a hash of the process ID so that the same pointer on -// two different processes will not collide. -#define TRACE_COUNTER_ID1(category_group, name, id, value) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, category_group, \ - name, id, TRACE_EVENT_FLAG_NONE, "value", \ - static_cast(value)) -#define TRACE_COPY_COUNTER_ID1(category_group, name, id, value) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, category_group, \ - name, id, TRACE_EVENT_FLAG_COPY, "value", \ - static_cast(value)) - -// Records the values of a multi-parted counter called "name" immediately. -// The UI will treat value1 and value2 as parts of a whole, displaying their -// values as a stacked-bar chart. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to disambiguate counters with the same name. It must either -// be a pointer or an integer value up to 64 bits. If it's a pointer, the bits -// will be xored with a hash of the process ID so that the same pointer on -// two different processes will not collide. -#define TRACE_COUNTER_ID2(category_group, name, id, value1_name, value1_val, \ - value2_name, value2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, category_group, \ - name, id, TRACE_EVENT_FLAG_NONE, \ - value1_name, static_cast(value1_val), \ - value2_name, static_cast(value2_val)) -#define TRACE_COPY_COUNTER_ID2(category_group, name, id, value1_name, \ - value1_val, value2_name, value2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, category_group, \ - name, id, TRACE_EVENT_FLAG_COPY, \ - value1_name, static_cast(value1_val), \ - value2_name, static_cast(value2_val)) - -// TRACE_EVENT_SAMPLE_* events are injected by the sampling profiler. -#define TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP0(category_group, name, \ - thread_id, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_SAMPLE, category_group, name, 0, thread_id, timestamp, \ - TRACE_EVENT_FLAG_NONE) - -#define TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP1( \ - category_group, name, thread_id, timestamp, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_SAMPLE, category_group, name, 0, thread_id, timestamp, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) - -#define TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP2(category_group, name, \ - thread_id, timestamp, \ - arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_SAMPLE, category_group, name, 0, thread_id, timestamp, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) - -// ASYNC_STEP_* APIs should be only used by legacy code. New code should -// consider using NESTABLE_ASYNC_* APIs to describe substeps within an async -// event. -// Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event. ASYNC -// events are considered to match if their category_group, name and id values -// all match. |id| must either be a pointer or an integer value up to 64 bits. -// If it's a pointer, the bits will be xored with a hash of the process ID so -// that the same pointer on two different processes will not collide. -// -// An asynchronous operation can consist of multiple phases. The first phase is -// defined by the ASYNC_BEGIN calls. Additional phases can be defined using the -// ASYNC_STEP_INTO or ASYNC_STEP_PAST macros. The ASYNC_STEP_INTO macro will -// annotate the block following the call. The ASYNC_STEP_PAST macro will -// annotate the block prior to the call. Note that any particular event must use -// only STEP_INTO or STEP_PAST macros; they can not mix and match. When the -// operation completes, call ASYNC_END. -// -// An ASYNC trace typically occurs on a single thread (if not, they will only be -// drawn on the thread defined in the ASYNC_BEGIN event), but all events in that -// operation must use the same |name| and |id|. Each step can have its own -// args. -#define TRACE_EVENT_ASYNC_BEGIN0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_ASYNC_BEGIN1(category_group, name, id, arg1_name, \ - arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_ASYNC_BEGIN2(category_group, name, id, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_ASYNC_BEGIN0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_ASYNC_BEGIN1(category_group, name, id, arg1_name, \ - arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_ASYNC_BEGIN2(category_group, name, id, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, arg2_val) - -// Similar to TRACE_EVENT_ASYNC_BEGINx but with a custom |at| timestamp -// provided. -#define TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, id, \ - timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP1( \ - category_group, name, id, timestamp, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val) -#define TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP2(category_group, name, id, \ - timestamp, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, id, \ - timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY) - -// Records a single ASYNC_STEP_INTO event for |step| immediately. If the -// category is not enabled, then this does nothing. The |name| and |id| must -// match the ASYNC_BEGIN event above. The |step| param identifies this step -// within the async event. This should be called at the beginning of the next -// phase of an asynchronous operation. The ASYNC_BEGIN event must not have any -// ASYNC_STEP_PAST events. -#define TRACE_EVENT_ASYNC_STEP_INTO0(category_group, name, id, step) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_INTO, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, "step", step) -#define TRACE_EVENT_ASYNC_STEP_INTO1(category_group, name, id, step, \ - arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_ASYNC_STEP_INTO, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, "step", step, arg1_name, arg1_val) - -// Similar to TRACE_EVENT_ASYNC_STEP_INTOx but with a custom |at| timestamp -// provided. -#define TRACE_EVENT_ASYNC_STEP_INTO_WITH_TIMESTAMP0(category_group, name, id, \ - step, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_STEP_INTO, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ - "step", step) - -// Records a single ASYNC_STEP_PAST event for |step| immediately. If the -// category is not enabled, then this does nothing. The |name| and |id| must -// match the ASYNC_BEGIN event above. The |step| param identifies this step -// within the async event. This should be called at the beginning of the next -// phase of an asynchronous operation. The ASYNC_BEGIN event must not have any -// ASYNC_STEP_INTO events. -#define TRACE_EVENT_ASYNC_STEP_PAST0(category_group, name, id, step) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_PAST, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, "step", step) -#define TRACE_EVENT_ASYNC_STEP_PAST1(category_group, name, id, step, \ - arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_ASYNC_STEP_PAST, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, "step", step, arg1_name, arg1_val) - -// Records a single ASYNC_END event for "name" immediately. If the category -// is not enabled, then this does nothing. -#define TRACE_EVENT_ASYNC_END0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_ASYNC_END1(category_group, name, id, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_ASYNC_END2(category_group, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_ASYNC_END0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_ASYNC_END1(category_group, name, id, arg1_name, \ - arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_ASYNC_END2(category_group, name, id, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, arg2_val) - -// Similar to TRACE_EVENT_ASYNC_ENDx but with a custom |at| timestamp provided. -#define TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP0(category_group, name, id, \ - timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP1(category_group, name, id, \ - timestamp, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val) -#define TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP2(category_group, name, id, \ - timestamp, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ - arg1_name, arg1_val, arg2_name, arg2_val) - -// NESTABLE_ASYNC_* APIs are used to describe an async operation, which can -// be nested within a NESTABLE_ASYNC event and/or have inner NESTABLE_ASYNC -// events. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - A pair of NESTABLE_ASYNC_BEGIN event and NESTABLE_ASYNC_END event is -// considered as a match if their category_group, name and id all match. -// - |id| must either be a pointer or an integer value up to 64 bits. -// If it's a pointer, the bits will be xored with a hash of the process ID so -// that the same pointer on two different processes will not collide. -// - |id| is used to match a child NESTABLE_ASYNC event with its parent -// NESTABLE_ASYNC event. Therefore, events in the same nested event tree must -// be logged using the same id and category_group. -// -// Unmatched NESTABLE_ASYNC_END event will be parsed as an event that starts -// at the first NESTABLE_ASYNC event of that id, and unmatched -// NESTABLE_ASYNC_BEGIN event will be parsed as an event that ends at the last -// NESTABLE_ASYNC event of that id. Corresponding warning messages for -// unmatched events will be shown in the analysis view. - -// Records a single NESTABLE_ASYNC_BEGIN event called "name" immediately, with -// 0, 1 or 2 associated arguments. If the category is not enabled, then this -// does nothing. -#define TRACE_EVENT_NESTABLE_ASYNC_BEGIN0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_NESTABLE_ASYNC_BEGIN1(category_group, name, id, arg1_name, \ - arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_NESTABLE_ASYNC_BEGIN2(category_group, name, id, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) -// Records a single NESTABLE_ASYNC_END event called "name" immediately, with 0 -// or 2 associated arguments. If the category is not enabled, then this does -// nothing. -#define TRACE_EVENT_NESTABLE_ASYNC_END0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE) -// Records a single NESTABLE_ASYNC_END event called "name" immediately, with 1 -// associated argument. If the category is not enabled, then this does nothing. -#define TRACE_EVENT_NESTABLE_ASYNC_END1(category_group, name, id, arg1_name, \ - arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) - -// Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, -// with one associated argument. If the category is not enabled, then this -// does nothing. -#define TRACE_EVENT_NESTABLE_ASYNC_INSTANT1(category_group, name, id, \ - arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -// Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, -// with 2 associated arguments. If the category is not enabled, then this -// does nothing. -#define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2( \ - category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) - -#define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TTS2( \ - category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ - arg2_name, arg2_val) -#define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TTS2( \ - category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ - arg2_name, arg2_val) - -// Similar to TRACE_EVENT_NESTABLE_ASYNC_{BEGIN,END}x but with a custom -// |timestamp| provided. -#define TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, \ - id, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE) - -#define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP0(category_group, name, \ - id, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE) - -#define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP0( \ - category_group, name, id, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TIMESTAMP0( \ - category_group, name, id, timestamp) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ - TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY) - -// Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, -// with 2 associated arguments. If the category is not enabled, then this -// does nothing. -#define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2( \ - category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) - -// Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2 -// associated arguments. If the category is not enabled, then this -// does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -// - |id| is used to match the FLOW_BEGIN event with the FLOW_END event. FLOW -// events are considered to match if their category_group, name and id values -// all match. |id| must either be a pointer or an integer value up to 64 bits. -// If it's a pointer, the bits will be xored with a hash of the process ID so -// that the same pointer on two different processes will not collide. -// FLOW events are different from ASYNC events in how they are drawn by the -// tracing UI. A FLOW defines asynchronous data flow, such as posting a task -// (FLOW_BEGIN) and later executing that task (FLOW_END). Expect FLOWs to be -// drawn as lines or arrows from FLOW_BEGIN scopes to FLOW_END scopes. Similar -// to ASYNC, a FLOW can consist of multiple phases. The first phase is defined -// by the FLOW_BEGIN calls. Additional phases can be defined using the FLOW_STEP -// macros. When the operation completes, call FLOW_END. An async operation can -// span threads and processes, but all events in that operation must use the -// same |name| and |id|. Each event can have its own args. -#define TRACE_EVENT_FLOW_BEGIN0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_FLOW_BEGIN1(category_group, name, id, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) -#define TRACE_EVENT_FLOW_BEGIN2(category_group, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_FLOW_BEGIN, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_FLOW_BEGIN0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_FLOW_BEGIN1(category_group, name, id, arg1_name, \ - arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_BEGIN, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_FLOW_BEGIN2(category_group, name, id, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_FLOW_BEGIN, category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, arg2_val) - -// Records a single FLOW_STEP event for |step| immediately. If the category -// is not enabled, then this does nothing. The |name| and |id| must match the -// FLOW_BEGIN event above. The |step| param identifies this step within the -// async event. This should be called at the beginning of the next phase of an -// asynchronous operation. -#define TRACE_EVENT_FLOW_STEP0(category_group, name, id, step) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_STEP, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, "step", step) -#define TRACE_EVENT_FLOW_STEP1(category_group, name, id, step, arg1_name, \ - arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_FLOW_STEP, category_group, name, id, \ - TRACE_EVENT_FLAG_NONE, "step", step, arg1_name, arg1_val) -#define TRACE_EVENT_COPY_FLOW_STEP0(category_group, name, id, step) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_STEP, \ - category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, "step", step) -#define TRACE_EVENT_COPY_FLOW_STEP1(category_group, name, id, step, arg1_name, \ - arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_FLOW_STEP, category_group, name, id, \ - TRACE_EVENT_FLAG_COPY, "step", step, arg1_name, arg1_val) - -// Records a single FLOW_END event for "name" immediately. If the category -// is not enabled, then this does nothing. -#define TRACE_EVENT_FLOW_END0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, category_group, \ - name, id, TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_FLOW_END_BIND_TO_ENCLOSING0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, category_group, \ - name, id, \ - TRACE_EVENT_FLAG_BIND_TO_ENCLOSING) -#define TRACE_EVENT_FLOW_END1(category_group, name, id, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, category_group, \ - name, id, TRACE_EVENT_FLAG_NONE, arg1_name, \ - arg1_val) -#define TRACE_EVENT_FLOW_END2(category_group, name, id, arg1_name, arg1_val, \ - arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, category_group, \ - name, id, TRACE_EVENT_FLAG_NONE, arg1_name, \ - arg1_val, arg2_name, arg2_val) -#define TRACE_EVENT_COPY_FLOW_END0(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, category_group, \ - name, id, TRACE_EVENT_FLAG_COPY) -#define TRACE_EVENT_COPY_FLOW_END1(category_group, name, id, arg1_name, \ - arg1_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, category_group, \ - name, id, TRACE_EVENT_FLAG_COPY, arg1_name, \ - arg1_val) -#define TRACE_EVENT_COPY_FLOW_END2(category_group, name, id, arg1_name, \ - arg1_val, arg2_name, arg2_val) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_FLOW_END, category_group, \ - name, id, TRACE_EVENT_FLAG_COPY, arg1_name, \ - arg1_val, arg2_name, arg2_val) - -// Special trace event macro to trace task execution with the location where it -// was posted from. -#define TRACE_TASK_EXECUTION(run_function, task) \ - INTERNAL_TRACE_TASK_EXECUTION(run_function, task) - -// TRACE_EVENT_METADATA* events are information related to other -// injected events, not events in their own right. -#define TRACE_EVENT_METADATA1(category_group, name, arg1_name, arg1_val) \ - INTERNAL_TRACE_EVENT_METADATA_ADD(category_group, name, arg1_name, arg1_val) - -// Records a clock sync event. -#define TRACE_EVENT_CLOCK_SYNC_RECEIVER(sync_id) \ - INTERNAL_TRACE_EVENT_ADD( \ - TRACE_EVENT_PHASE_CLOCK_SYNC, "__metadata", "clock_sync", \ - TRACE_EVENT_FLAG_NONE, "sync_id", sync_id) -#define TRACE_EVENT_CLOCK_SYNC_ISSUER(sync_id, issue_ts, issue_end_ts) \ - INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ - TRACE_EVENT_PHASE_CLOCK_SYNC, "__metadata", "clock_sync", \ - issue_end_ts.ToInternalValue(), TRACE_EVENT_FLAG_NONE, \ - "sync_id", sync_id, "issue_ts", issue_ts.ToInternalValue()) - -// Macros to track the life time and value of arbitrary client objects. -// See also TraceTrackableObject. -#define TRACE_EVENT_OBJECT_CREATED_WITH_ID(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_CREATE_OBJECT, category_group, name, \ - TRACE_ID_DONT_MANGLE(id), TRACE_EVENT_FLAG_NONE) - -#define TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(category_group, name, id, \ - snapshot) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_SNAPSHOT_OBJECT, category_group, name, \ - TRACE_ID_DONT_MANGLE(id), TRACE_EVENT_FLAG_NONE, "snapshot", snapshot) - -#define TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID_AND_TIMESTAMP( \ - category_group, name, id, timestamp, snapshot) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ - TRACE_EVENT_PHASE_SNAPSHOT_OBJECT, category_group, name, \ - TRACE_ID_DONT_MANGLE(id), TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, \ - TRACE_EVENT_FLAG_NONE, "snapshot", snapshot) - -#define TRACE_EVENT_OBJECT_DELETED_WITH_ID(category_group, name, id) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_DELETE_OBJECT, category_group, name, \ - TRACE_ID_DONT_MANGLE(id), TRACE_EVENT_FLAG_NONE) - -// Records entering and leaving trace event contexts. |category_group| and -// |name| specify the context category and type. |context| is a -// snapshotted context object id. -#define TRACE_EVENT_ENTER_CONTEXT(category_group, name, context) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_ENTER_CONTEXT, category_group, name, \ - TRACE_ID_DONT_MANGLE(context), TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_LEAVE_CONTEXT(category_group, name, context) \ - INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ - TRACE_EVENT_PHASE_LEAVE_CONTEXT, category_group, name, \ - TRACE_ID_DONT_MANGLE(context), TRACE_EVENT_FLAG_NONE) -#define TRACE_EVENT_SCOPED_CONTEXT(category_group, name, context) \ - INTERNAL_TRACE_EVENT_SCOPED_CONTEXT(category_group, name, \ - TRACE_ID_DONT_MANGLE(context)) - -// Macro to specify that two trace IDs are identical. For example, -// TRACE_BIND_IDS( -// "category", "name", -// TRACE_ID_WITH_SCOPE("net::URLRequest", 0x1000), -// TRACE_ID_WITH_SCOPE("blink::ResourceFetcher::FetchRequest", 0x2000)) -// tells the trace consumer that events with ID ("net::URLRequest", 0x1000) from -// the current process have the same ID as events with ID -// ("blink::ResourceFetcher::FetchRequest", 0x2000). -#define TRACE_BIND_IDS(category_group, name, id, bind_id) \ - INTERNAL_TRACE_EVENT_ADD_BIND_IDS(category_group, name, id, bind_id); - -// Macro to efficiently determine if a given category group is enabled. -#define TRACE_EVENT_CATEGORY_GROUP_ENABLED(category_group, ret) \ - do { \ - INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \ - if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \ - *ret = true; \ - } else { \ - *ret = false; \ - } \ - } while (0) - -// Macro to explicitly warm up a given category group. This could be useful in -// cases where we want to initialize a category group before any trace events -// for that category group is reported. For example, to have a category group -// always show up in the "record categories" list for manually selecting -// settings in about://tracing. -#define TRACE_EVENT_WARMUP_CATEGORY(category_group) \ - INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group) - -// Macro to efficiently determine, through polling, if a new trace has begun. -#define TRACE_EVENT_IS_NEW_TRACE(ret) \ - do { \ - static int INTERNAL_TRACE_EVENT_UID(lastRecordingNumber) = 0; \ - int num_traces_recorded = TRACE_EVENT_API_GET_NUM_TRACES_RECORDED(); \ - if (num_traces_recorded != -1 && \ - num_traces_recorded != \ - INTERNAL_TRACE_EVENT_UID(lastRecordingNumber)) { \ - INTERNAL_TRACE_EVENT_UID(lastRecordingNumber) = num_traces_recorded; \ - *ret = true; \ - } else { \ - *ret = false; \ - } \ - } while (0) - -// Notes regarding the following definitions: -// New values can be added and propagated to third party libraries, but existing -// definitions must never be changed, because third party libraries may use old -// definitions. - -// Phase indicates the nature of an event entry. E.g. part of a begin/end pair. -#define TRACE_EVENT_PHASE_BEGIN ('B') -#define TRACE_EVENT_PHASE_END ('E') -#define TRACE_EVENT_PHASE_COMPLETE ('X') -#define TRACE_EVENT_PHASE_INSTANT ('I') -#define TRACE_EVENT_PHASE_ASYNC_BEGIN ('S') -#define TRACE_EVENT_PHASE_ASYNC_STEP_INTO ('T') -#define TRACE_EVENT_PHASE_ASYNC_STEP_PAST ('p') -#define TRACE_EVENT_PHASE_ASYNC_END ('F') -#define TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN ('b') -#define TRACE_EVENT_PHASE_NESTABLE_ASYNC_END ('e') -#define TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT ('n') -#define TRACE_EVENT_PHASE_FLOW_BEGIN ('s') -#define TRACE_EVENT_PHASE_FLOW_STEP ('t') -#define TRACE_EVENT_PHASE_FLOW_END ('f') -#define TRACE_EVENT_PHASE_METADATA ('M') -#define TRACE_EVENT_PHASE_COUNTER ('C') -#define TRACE_EVENT_PHASE_SAMPLE ('P') -#define TRACE_EVENT_PHASE_CREATE_OBJECT ('N') -#define TRACE_EVENT_PHASE_SNAPSHOT_OBJECT ('O') -#define TRACE_EVENT_PHASE_DELETE_OBJECT ('D') -#define TRACE_EVENT_PHASE_MEMORY_DUMP ('v') -#define TRACE_EVENT_PHASE_MARK ('R') -#define TRACE_EVENT_PHASE_CLOCK_SYNC ('c') -#define TRACE_EVENT_PHASE_ENTER_CONTEXT ('(') -#define TRACE_EVENT_PHASE_LEAVE_CONTEXT (')') -#define TRACE_EVENT_PHASE_BIND_IDS ('=') - -// Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. -#define TRACE_EVENT_FLAG_NONE (static_cast(0)) -#define TRACE_EVENT_FLAG_COPY (static_cast(1 << 0)) -#define TRACE_EVENT_FLAG_HAS_ID (static_cast(1 << 1)) -#define TRACE_EVENT_FLAG_MANGLE_ID (static_cast(1 << 2)) -#define TRACE_EVENT_FLAG_SCOPE_OFFSET (static_cast(1 << 3)) -#define TRACE_EVENT_FLAG_SCOPE_EXTRA (static_cast(1 << 4)) -#define TRACE_EVENT_FLAG_EXPLICIT_TIMESTAMP (static_cast(1 << 5)) -#define TRACE_EVENT_FLAG_ASYNC_TTS (static_cast(1 << 6)) -#define TRACE_EVENT_FLAG_BIND_TO_ENCLOSING (static_cast(1 << 7)) -#define TRACE_EVENT_FLAG_FLOW_IN (static_cast(1 << 8)) -#define TRACE_EVENT_FLAG_FLOW_OUT (static_cast(1 << 9)) -#define TRACE_EVENT_FLAG_HAS_CONTEXT_ID (static_cast(1 << 10)) -#define TRACE_EVENT_FLAG_HAS_PROCESS_ID (static_cast(1 << 11)) - -#define TRACE_EVENT_FLAG_SCOPE_MASK \ - (static_cast(TRACE_EVENT_FLAG_SCOPE_OFFSET | \ - TRACE_EVENT_FLAG_SCOPE_EXTRA)) - -// Type values for identifying types in the TraceValue union. -#define TRACE_VALUE_TYPE_BOOL (static_cast(1)) -#define TRACE_VALUE_TYPE_UINT (static_cast(2)) -#define TRACE_VALUE_TYPE_INT (static_cast(3)) -#define TRACE_VALUE_TYPE_DOUBLE (static_cast(4)) -#define TRACE_VALUE_TYPE_POINTER (static_cast(5)) -#define TRACE_VALUE_TYPE_STRING (static_cast(6)) -#define TRACE_VALUE_TYPE_COPY_STRING (static_cast(7)) -#define TRACE_VALUE_TYPE_CONVERTABLE (static_cast(8)) - -// Enum reflecting the scope of an INSTANT event. Must fit within -// TRACE_EVENT_FLAG_SCOPE_MASK. -#define TRACE_EVENT_SCOPE_GLOBAL (static_cast(0 << 3)) -#define TRACE_EVENT_SCOPE_PROCESS (static_cast(1 << 3)) -#define TRACE_EVENT_SCOPE_THREAD (static_cast(2 << 3)) - -#define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') -#define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') -#define TRACE_EVENT_SCOPE_NAME_THREAD ('t') diff --git a/deps/v8/build_overrides/build.gni b/deps/v8/build_overrides/build.gni index da6d3e0ded6e6e..6b8a4ff21921a1 100644 --- a/deps/v8/build_overrides/build.gni +++ b/deps/v8/build_overrides/build.gni @@ -16,3 +16,11 @@ build_with_chromium = false # Some non-Chromium builds don't support building java targets. enable_java_templates = false + +# Some non-Chromium builds don't use Chromium's third_party/binutils. +linux_use_bundled_binutils_override = true + +# Allows different projects to specify their own suppressions files. +asan_suppressions_file = "//build/sanitizers/asan_suppressions.cc" +lsan_suppressions_file = "//build/sanitizers/lsan_suppressions.cc" +tsan_suppressions_file = "//build/sanitizers/tsan_suppressions.cc" diff --git a/deps/v8/build_overrides/v8.gni b/deps/v8/build_overrides/v8.gni index fc4a70e579b78d..09ea4570b02032 100644 --- a/deps/v8/build_overrides/v8.gni +++ b/deps/v8/build_overrides/v8.gni @@ -11,10 +11,8 @@ if (is_android) { import("//build/config/android/config.gni") } -if (((v8_current_cpu == "x86" || - v8_current_cpu == "x64" || - v8_current_cpu=="x87") && - (is_linux || is_mac)) || +if (((v8_current_cpu == "x86" || v8_current_cpu == "x64" || + v8_current_cpu == "x87") && (is_linux || is_mac)) || (v8_current_cpu == "ppc64" && is_linux)) { v8_enable_gdbjit_default = true } @@ -23,4 +21,12 @@ v8_imminent_deprecation_warnings_default = true # Add simple extras solely for the purpose of the cctests. v8_extra_library_files = [ "//test/cctest/test-extra.js" ] -v8_experimental_extra_library_files = [ "//test/cctest/test-experimental-extra.js" ] +v8_experimental_extra_library_files = + [ "//test/cctest/test-experimental-extra.js" ] + +declare_args() { + # Enable inspector. See include/v8-inspector.h. + v8_enable_inspector = false +} + +v8_enable_inspector_override = v8_enable_inspector diff --git a/deps/v8/gypfiles/config/win/msvs_dependencies.isolate b/deps/v8/gypfiles/config/win/msvs_dependencies.isolate deleted file mode 100644 index ff922273634a9f..00000000000000 --- a/deps/v8/gypfiles/config/win/msvs_dependencies.isolate +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 2015 the V8 project authors. All rights reserved. -# Copyright 2015 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -{ - 'conditions': [ - # Copy the VS runtime DLLs into the isolate so that they - # don't have to be preinstalled on the target machine. - # - # VS2013 runtimes - ['OS=="win" and msvs_version==2013 and component=="shared_library" and CONFIGURATION_NAME=="Debug"', { - 'variables': { - 'files': [ - '<(PRODUCT_DIR)/x64/msvcp120d.dll', - '<(PRODUCT_DIR)/x64/msvcr120d.dll', - ], - }, - }], - ['OS=="win" and msvs_version==2013 and component=="shared_library" and CONFIGURATION_NAME=="Release"', { - 'variables': { - 'files': [ - '<(PRODUCT_DIR)/x64/msvcp120.dll', - '<(PRODUCT_DIR)/x64/msvcr120.dll', - ], - }, - }], - ['OS=="win" and msvs_version==2013 and component=="shared_library" and (CONFIGURATION_NAME=="Debug" or CONFIGURATION_NAME=="Debug_x64")', { - 'variables': { - 'files': [ - '<(PRODUCT_DIR)/msvcp120d.dll', - '<(PRODUCT_DIR)/msvcr120d.dll', - ], - }, - }], - ['OS=="win" and msvs_version==2013 and component=="shared_library" and (CONFIGURATION_NAME=="Release" or CONFIGURATION_NAME=="Release_x64")', { - 'variables': { - 'files': [ - '<(PRODUCT_DIR)/msvcp120.dll', - '<(PRODUCT_DIR)/msvcr120.dll', - ], - }, - }], - # VS2015 runtimes - ['OS=="win" and msvs_version==2015 and component=="shared_library" and CONFIGURATION_NAME=="Debug"', { - 'variables': { - 'files': [ - '<(PRODUCT_DIR)/x64/msvcp140d.dll', - '<(PRODUCT_DIR)/x64/vccorlib140d.dll', - ], - }, - }], - ['OS=="win" and msvs_version==2015 and component=="shared_library" and CONFIGURATION_NAME=="Release"', { - 'variables': { - 'files': [ - '<(PRODUCT_DIR)/x64/msvcp140.dll', - '<(PRODUCT_DIR)/x64/vccorlib140.dll', - ], - }, - }], - ['OS=="win" and msvs_version==2015 and component=="shared_library" and (CONFIGURATION_NAME=="Debug" or CONFIGURATION_NAME=="Debug_x64")', { - 'variables': { - 'files': [ - '<(PRODUCT_DIR)/msvcp140d.dll', - '<(PRODUCT_DIR)/vccorlib140d.dll', - ], - }, - }], - ['OS=="win" and msvs_version==2015 and component=="shared_library" and (CONFIGURATION_NAME=="Release" or CONFIGURATION_NAME=="Release_x64")', { - 'variables': { - 'files': [ - '<(PRODUCT_DIR)/msvcp140.dll', - '<(PRODUCT_DIR)/vccorlib140.dll', - ], - }, - }], - ], -} \ No newline at end of file diff --git a/deps/v8/gypfiles/gyp_v8 b/deps/v8/gypfiles/gyp_v8 index 8be39d961536f1..b8b5f742b1e27d 100755 --- a/deps/v8/gypfiles/gyp_v8 +++ b/deps/v8/gypfiles/gyp_v8 @@ -118,10 +118,22 @@ def run_gyp(args): if __name__ == '__main__': args = sys.argv[1:] - if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): + gyp_chromium_no_action = os.environ.get('GYP_CHROMIUM_NO_ACTION') + if gyp_chromium_no_action == '1': print 'Skipping gyp_v8 due to GYP_CHROMIUM_NO_ACTION env var.' sys.exit(0) + running_as_hook = '--running-as-hook' + if running_as_hook in args and gyp_chromium_no_action != '0': + print 'GYP is now disabled by default in runhooks.\n' + print 'If you really want to run this, either run ' + print '`python gypfiles/gyp_v8` explicitly by hand ' + print 'or set the environment variable GYP_CHROMIUM_NO_ACTION=0.' + sys.exit(0) + + if running_as_hook in args: + args.remove(running_as_hook) + gyp_environment.set_environment() # This could give false positives since it doesn't actually do real option diff --git a/deps/v8/gypfiles/standalone.gypi b/deps/v8/gypfiles/standalone.gypi index 6599bb83512173..7e41ce84aef96d 100644 --- a/deps/v8/gypfiles/standalone.gypi +++ b/deps/v8/gypfiles/standalone.gypi @@ -46,6 +46,7 @@ 'msvs_multi_core_compile%': '1', 'mac_deployment_target%': '10.7', 'release_extra_cflags%': '', + 'v8_enable_inspector%': 0, 'variables': { 'variables': { 'variables': { @@ -319,7 +320,7 @@ 'android_ndk_root%': '<(base_dir)/third_party/android_tools/ndk/', 'android_host_arch%': " +#include + +#include + +#include "v8.h" // NOLINT(build/include) + +namespace v8_inspector { + +namespace protocol { +namespace Debugger { +namespace API { +class SearchMatch; +} +} +namespace Runtime { +namespace API { +class RemoteObject; +class StackTrace; +} +} +namespace Schema { +namespace API { +class Domain; +} +} +} // namespace protocol + +class V8_EXPORT StringView { + public: + StringView() : m_is8Bit(true), m_length(0), m_characters8(nullptr) {} + + StringView(const uint8_t* characters, unsigned length) + : m_is8Bit(true), m_length(length), m_characters8(characters) {} + + StringView(const uint16_t* characters, unsigned length) + : m_is8Bit(false), m_length(length), m_characters16(characters) {} + + bool is8Bit() const { return m_is8Bit; } + unsigned length() const { return m_length; } + + // TODO(dgozman): add DCHECK(m_is8Bit) to accessors once platform can be used + // here. + const uint8_t* characters8() const { return m_characters8; } + const uint16_t* characters16() const { return m_characters16; } + + private: + bool m_is8Bit; + unsigned m_length; + union { + const uint8_t* m_characters8; + const uint16_t* m_characters16; + }; +}; + +class V8_EXPORT StringBuffer { + public: + virtual ~StringBuffer() {} + virtual const StringView& string() = 0; + // This method copies contents. + static std::unique_ptr create(const StringView&); +}; + +class V8_EXPORT V8ContextInfo { + public: + V8ContextInfo(v8::Local context, int contextGroupId, + const StringView& humanReadableName) + : context(context), + contextGroupId(contextGroupId), + humanReadableName(humanReadableName), + hasMemoryOnConsole(false) {} + + v8::Local context; + // Each v8::Context is a part of a group. The group id must be non-zero. + int contextGroupId; + StringView humanReadableName; + StringView origin; + StringView auxData; + bool hasMemoryOnConsole; + + private: + // Disallow copying and allocating this one. + enum NotNullTagEnum { NotNullLiteral }; + void* operator new(size_t) = delete; + void* operator new(size_t, NotNullTagEnum, void*) = delete; + void* operator new(size_t, void*) = delete; + V8ContextInfo(const V8ContextInfo&) = delete; + V8ContextInfo& operator=(const V8ContextInfo&) = delete; +}; + +class V8_EXPORT V8StackTrace { + public: + virtual bool isEmpty() const = 0; + virtual StringView topSourceURL() const = 0; + virtual int topLineNumber() const = 0; + virtual int topColumnNumber() const = 0; + virtual StringView topScriptId() const = 0; + virtual StringView topFunctionName() const = 0; + + virtual ~V8StackTrace() {} + virtual std::unique_ptr + buildInspectorObject() const = 0; + virtual std::unique_ptr toString() const = 0; + + // Safe to pass between threads, drops async chain. + virtual std::unique_ptr clone() = 0; +}; + +class V8_EXPORT V8InspectorSession { + public: + virtual ~V8InspectorSession() {} + + // 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 void addInspectedObject(std::unique_ptr) = 0; + + // Dispatching protocol messages. + static bool canDispatchMethod(const StringView& method); + virtual void dispatchProtocolMessage(const StringView& message) = 0; + virtual std::unique_ptr stateJSON() = 0; + virtual std::vector> + supportedDomains() = 0; + + // Debugger actions. + virtual void schedulePauseOnNextStatement(const StringView& breakReason, + const StringView& breakDetails) = 0; + virtual void cancelPauseOnNextStatement() = 0; + virtual void breakProgram(const StringView& breakReason, + const StringView& breakDetails) = 0; + virtual void setSkipAllPauses(bool) = 0; + virtual void resume() = 0; + virtual void stepOver() = 0; + virtual std::vector> + searchInTextByLines(const StringView& text, const StringView& query, + bool caseSensitive, bool isRegex) = 0; + + // Remote objects. + virtual std::unique_ptr wrapObject( + v8::Local, v8::Local, + const StringView& groupName) = 0; + virtual bool unwrapObject(std::unique_ptr* error, + const StringView& objectId, v8::Local*, + v8::Local*, + std::unique_ptr* objectGroup) = 0; + virtual void releaseObjectGroup(const StringView&) = 0; +}; + +enum class V8ConsoleAPIType { kClear, kDebug, kLog, kInfo, kWarning, kError }; + +class V8_EXPORT V8InspectorClient { + public: + virtual ~V8InspectorClient() {} + + virtual void runMessageLoopOnPause(int contextGroupId) {} + virtual void quitMessageLoopOnPause() {} + virtual void runIfWaitingForDebugger(int contextGroupId) {} + + virtual void muteMetrics(int contextGroupId) {} + virtual void unmuteMetrics(int contextGroupId) {} + + virtual void beginUserGesture() {} + virtual void endUserGesture() {} + + virtual std::unique_ptr valueSubtype(v8::Local) { + return nullptr; + } + virtual bool formatAccessorsAsProperties(v8::Local) { + return false; + } + virtual bool isInspectableHeapObject(v8::Local) { return true; } + + virtual v8::Local ensureDefaultContextInGroup( + int contextGroupId) { + return v8::Local(); + } + virtual void beginEnsureAllContextsInGroup(int contextGroupId) {} + virtual void endEnsureAllContextsInGroup(int contextGroupId) {} + + virtual void installAdditionalCommandLineAPI(v8::Local, + v8::Local) {} + virtual void consoleAPIMessage(int contextGroupId, V8ConsoleAPIType, + const StringView& message, + const StringView& url, unsigned lineNumber, + unsigned columnNumber, V8StackTrace*) {} + virtual v8::MaybeLocal memoryInfo(v8::Isolate*, + v8::Local) { + return v8::MaybeLocal(); + } + + virtual void consoleTime(const StringView& title) {} + virtual void consoleTimeEnd(const StringView& title) {} + virtual void consoleTimeStamp(const StringView& title) {} + virtual double currentTimeMS() { return 0; } + typedef void (*TimerCallback)(void*); + virtual void startRepeatingTimer(double, TimerCallback, void* data) {} + virtual void cancelTimer(void* data) {} + + // TODO(dgozman): this was added to support service worker shadow page. We + // should not connect at all. + virtual bool canExecuteScripts(int contextGroupId) { return true; } +}; + +class V8_EXPORT V8Inspector { + public: + static std::unique_ptr create(v8::Isolate*, V8InspectorClient*); + virtual ~V8Inspector() {} + + // Contexts instrumentation. + virtual void contextCreated(const V8ContextInfo&) = 0; + virtual void contextDestroyed(v8::Local) = 0; + virtual void resetContextGroup(int contextGroupId) = 0; + + // Various instrumentation. + virtual void willExecuteScript(v8::Local, int scriptId) = 0; + virtual void didExecuteScript(v8::Local) = 0; + virtual void idleStarted() = 0; + virtual void idleFinished() = 0; + + // Async stack traces instrumentation. + virtual void asyncTaskScheduled(const StringView& taskName, void* task, + bool recurring) = 0; + virtual void asyncTaskCanceled(void* task) = 0; + virtual void asyncTaskStarted(void* task) = 0; + virtual void asyncTaskFinished(void* task) = 0; + virtual void allAsyncTasksCanceled() = 0; + + // Exceptions instrumentation. + virtual unsigned exceptionThrown( + v8::Local, const StringView& message, + v8::Local exception, const StringView& detailedMessage, + const StringView& url, unsigned lineNumber, unsigned columnNumber, + std::unique_ptr, int scriptId) = 0; + virtual void exceptionRevoked(v8::Local, unsigned exceptionId, + const StringView& message) = 0; + + // Connection. + class V8_EXPORT Channel { + public: + virtual ~Channel() {} + virtual void sendProtocolResponse(int callId, + const StringView& message) = 0; + virtual void sendProtocolNotification(const StringView& message) = 0; + virtual void flushProtocolNotifications() = 0; + }; + virtual std::unique_ptr connect( + int contextGroupId, Channel*, const StringView& state) = 0; + + // API methods. + virtual std::unique_ptr createStackTrace( + v8::Local) = 0; + virtual std::unique_ptr captureStackTrace(bool fullStack) = 0; +}; + +} // namespace v8_inspector + +#endif // V8_V8_INSPECTOR_H_ diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h index bcb69f3763e1b7..55c8386bdeff4a 100644 --- a/deps/v8/include/v8-profiler.h +++ b/deps/v8/include/v8-profiler.h @@ -131,12 +131,26 @@ class V8_EXPORT CpuProfileNode { /** Returns function name (empty string for anonymous functions.) */ Local GetFunctionName() const; + /** + * Returns function name (empty string for anonymous functions.) + * The string ownership is *not* passed to the caller. It stays valid until + * profile is deleted. The function is thread safe. + */ + const char* GetFunctionNameStr() const; + /** Returns id of the script where function is located. */ int GetScriptId() const; /** Returns resource name for script from where the function originates. */ Local GetScriptResourceName() const; + /** + * Returns resource name for script from where the function originates. + * The string ownership is *not* passed to the caller. It stays valid until + * profile is deleted. The function is thread safe. + */ + const char* GetScriptResourceNameStr() const; + /** * Returns the number, 1-based, of the line where the function originates. * kNoLineNumberInfo if no line number information is available. diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 52e9d04584e4c8..e69271c00c5c62 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -9,7 +9,7 @@ // 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 5 -#define V8_MINOR_VERSION 4 +#define V8_MINOR_VERSION 5 #define V8_BUILD_NUMBER 0 #define V8_PATCH_LEVEL 0 diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index d7e39adbaee349..43325e20b201b9 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -70,6 +70,7 @@ namespace v8 { class AccessorSignature; class Array; +class ArrayBuffer; class Boolean; class BooleanObject; class Context; @@ -95,6 +96,7 @@ class ObjectTemplate; class Platform; class Primitive; class Promise; +class PropertyDescriptor; class Proxy; class RawOperationDescriptor; class Script; @@ -341,7 +343,7 @@ class Local { #if !defined(V8_IMMINENT_DEPRECATION_WARNINGS) -// Local is an alias for Local for historical reasons. +// Handle is an alias for Local for historical reasons. template using Handle = Local; #endif @@ -615,6 +617,9 @@ template class PersistentBase { */ V8_INLINE uint16_t WrapperClassId() const; + PersistentBase(const PersistentBase& other) = delete; // NOLINT + void operator=(const PersistentBase&) = delete; + private: friend class Isolate; friend class Utils; @@ -630,8 +635,6 @@ template class PersistentBase { friend class Object; explicit V8_INLINE PersistentBase(T* val) : val_(val) {} - PersistentBase(const PersistentBase& other) = delete; // NOLINT - void operator=(const PersistentBase&) = delete; V8_INLINE static T* New(Isolate* isolate, T* that); T* val_; @@ -835,11 +838,12 @@ class Global : public PersistentBase { */ typedef void MoveOnlyTypeForCPP03; + Global(const Global&) = delete; + void operator=(const Global&) = delete; + private: template friend class ReturnValue; - Global(const Global&) = delete; - void operator=(const Global&) = delete; V8_INLINE T* operator*() const { return this->val_; } }; @@ -878,6 +882,11 @@ class V8_EXPORT HandleScope { return reinterpret_cast(isolate_); } + HandleScope(const HandleScope&) = delete; + void operator=(const HandleScope&) = delete; + void* operator new(size_t size) = delete; + void operator delete(void*, size_t) = delete; + protected: V8_INLINE HandleScope() {} @@ -891,13 +900,6 @@ class V8_EXPORT HandleScope { static internal::Object** CreateHandle(internal::HeapObject* heap_object, internal::Object* value); - // Make it hard to create heap-allocated or illegal handle scopes by - // disallowing certain operations. - HandleScope(const HandleScope&); - void operator=(const HandleScope&); - void* operator new(size_t size); - void operator delete(void*, size_t); - internal::Isolate* isolate_; internal::Object** prev_next_; internal::Object** prev_limit_; @@ -932,16 +934,13 @@ class V8_EXPORT EscapableHandleScope : public HandleScope { return Local(reinterpret_cast(slot)); } + EscapableHandleScope(const EscapableHandleScope&) = delete; + void operator=(const EscapableHandleScope&) = delete; + void* operator new(size_t size) = delete; + void operator delete(void*, size_t) = delete; + private: internal::Object** Escape(internal::Object** escape_value); - - // Make it hard to create heap-allocated or illegal handle scopes by - // disallowing certain operations. - EscapableHandleScope(const EscapableHandleScope&); - void operator=(const EscapableHandleScope&); - void* operator new(size_t size); - void operator delete(void*, size_t); - internal::Object** escape_slot_; }; @@ -950,14 +949,12 @@ class V8_EXPORT SealHandleScope { SealHandleScope(Isolate* isolate); ~SealHandleScope(); - private: - // Make it hard to create heap-allocated or illegal handle scopes by - // disallowing certain operations. - SealHandleScope(const SealHandleScope&); - void operator=(const SealHandleScope&); - void* operator new(size_t size); - void operator delete(void*, size_t); + SealHandleScope(const SealHandleScope&) = delete; + void operator=(const SealHandleScope&) = delete; + void* operator new(size_t size) = delete; + void operator delete(void*, size_t) = delete; + private: internal::Isolate* const isolate_; internal::Object** prev_limit_; int prev_sealed_level_; @@ -1148,10 +1145,9 @@ class V8_EXPORT ScriptCompiler { bool rejected; BufferPolicy buffer_policy; - private: - // Prevent copying. Not implemented. - CachedData(const CachedData&); - CachedData& operator=(const CachedData&); + // Prevent copying. + CachedData(const CachedData&) = delete; + CachedData& operator=(const CachedData&) = delete; }; /** @@ -1171,11 +1167,12 @@ class V8_EXPORT ScriptCompiler { // alive. V8_INLINE const CachedData* GetCachedData() const; + // Prevent copying. + Source(const Source&) = delete; + Source& operator=(const Source&) = delete; + private: friend class ScriptCompiler; - // Prevent copying. Not implemented. - Source(const Source&); - Source& operator=(const Source&); Local source_string; @@ -1258,11 +1255,11 @@ class V8_EXPORT ScriptCompiler { internal::StreamedSource* impl() const { return impl_; } - private: - // Prevent copying. Not implemented. - StreamedSource(const StreamedSource&); - StreamedSource& operator=(const StreamedSource&); + // Prevent copying. + StreamedSource(const StreamedSource&) = delete; + StreamedSource& operator=(const StreamedSource&) = delete; + private: internal::StreamedSource* impl_; }; @@ -1664,6 +1661,172 @@ class V8_EXPORT JSON { Local gap = Local()); }; +/** + * Value serialization compatible with the HTML structured clone algorithm. + * The format is backward-compatible (i.e. safe to store to disk). + * + * WARNING: This API is under development, and changes (including incompatible + * changes to the API or wire format) may occur without notice until this + * warning is removed. + */ +class V8_EXPORT ValueSerializer { + public: + class V8_EXPORT Delegate { + public: + virtual ~Delegate() {} + + /* + * Handles the case where a DataCloneError would be thrown in the structured + * clone spec. Other V8 embedders may throw some other appropriate exception + * type. + */ + virtual void ThrowDataCloneError(Local message) = 0; + + /* + * The embedder overrides this method to write some kind of host object, if + * possible. If not, a suitable exception should be thrown and + * Nothing() returned. + */ + virtual Maybe WriteHostObject(Isolate* isolate, Local object); + }; + + explicit ValueSerializer(Isolate* isolate); + ValueSerializer(Isolate* isolate, Delegate* delegate); + ~ValueSerializer(); + + /* + * Writes out a header, which includes the format version. + */ + void WriteHeader(); + + /* + * Serializes a JavaScript value into the buffer. + */ + V8_WARN_UNUSED_RESULT Maybe WriteValue(Local context, + Local value); + + /* + * Returns the stored data. This serializer should not be used once the buffer + * is released. The contents are undefined if a previous write has failed. + */ + std::vector ReleaseBuffer(); + + /* + * Marks an ArrayBuffer as havings its contents transferred out of band. + * Pass the corresponding JSArrayBuffer in the deserializing context to + * ValueDeserializer::TransferArrayBuffer. + */ + void TransferArrayBuffer(uint32_t transfer_id, + Local array_buffer); + + /* + * Similar to TransferArrayBuffer, but for SharedArrayBuffer. + */ + void TransferSharedArrayBuffer(uint32_t transfer_id, + Local shared_array_buffer); + + /* + * Write raw data in various common formats to the buffer. + * Note that integer types are written in base-128 varint format, not with a + * binary copy. For use during an override of Delegate::WriteHostObject. + */ + void WriteUint32(uint32_t value); + void WriteUint64(uint64_t value); + void WriteRawBytes(const void* source, size_t length); + + private: + ValueSerializer(const ValueSerializer&) = delete; + void operator=(const ValueSerializer&) = delete; + + struct PrivateData; + PrivateData* private_; +}; + +/** + * Deserializes values from data written with ValueSerializer, or a compatible + * implementation. + * + * WARNING: This API is under development, and changes (including incompatible + * changes to the API or wire format) may occur without notice until this + * warning is removed. + */ +class V8_EXPORT ValueDeserializer { + public: + class V8_EXPORT Delegate { + public: + virtual ~Delegate() {} + + /* + * The embedder overrides this method to read some kind of host object, if + * possible. If not, a suitable exception should be thrown and + * MaybeLocal() returned. + */ + virtual MaybeLocal ReadHostObject(Isolate* isolate); + }; + + ValueDeserializer(Isolate* isolate, const uint8_t* data, size_t size); + ValueDeserializer(Isolate* isolate, const uint8_t* data, size_t size, + Delegate* delegate); + ~ValueDeserializer(); + + /* + * Reads and validates a header (including the format version). + * May, for example, reject an invalid or unsupported wire format. + */ + V8_WARN_UNUSED_RESULT Maybe ReadHeader(Local context); + V8_DEPRECATE_SOON("Use Local version", Maybe ReadHeader()); + + /* + * Deserializes a JavaScript value from the buffer. + */ + V8_WARN_UNUSED_RESULT MaybeLocal ReadValue(Local context); + + /* + * Accepts the array buffer corresponding to the one passed previously to + * ValueSerializer::TransferArrayBuffer. + */ + void TransferArrayBuffer(uint32_t transfer_id, + Local array_buffer); + + /* + * Similar to TransferArrayBuffer, but for SharedArrayBuffer. + * transfer_id exists in the same namespace as unshared ArrayBuffer objects. + */ + void TransferSharedArrayBuffer(uint32_t transfer_id, + Local shared_array_buffer); + + /* + * Must be called before ReadHeader to enable support for reading the legacy + * wire format (i.e., which predates this being shipped). + * + * Don't use this unless you need to read data written by previous versions of + * blink::ScriptValueSerializer. + */ + void SetSupportsLegacyWireFormat(bool supports_legacy_wire_format); + + /* + * Reads the underlying wire format version. Likely mostly to be useful to + * legacy code reading old wire format versions. Must be called after + * ReadHeader. + */ + uint32_t GetWireFormatVersion() const; + + /* + * Reads raw data in various common formats to the buffer. + * Note that integer types are read in base-128 varint format, not with a + * binary copy. For use during an override of Delegate::ReadHostObject. + */ + V8_WARN_UNUSED_RESULT bool ReadUint32(uint32_t* value); + V8_WARN_UNUSED_RESULT bool ReadUint64(uint64_t* value); + V8_WARN_UNUSED_RESULT bool ReadRawBytes(size_t length, const void** data); + + private: + ValueDeserializer(const ValueDeserializer&) = delete; + void operator=(const ValueDeserializer&) = delete; + + struct PrivateData; + PrivateData* private_; +}; /** * A map whose keys are referenced weakly. It is similar to JavaScript WeakMap @@ -2207,11 +2370,11 @@ class V8_EXPORT String : public Name { */ virtual void Dispose() { delete this; } - private: // Disallow copying and assigning. - ExternalStringResourceBase(const ExternalStringResourceBase&); - void operator=(const ExternalStringResourceBase&); + ExternalStringResourceBase(const ExternalStringResourceBase&) = delete; + void operator=(const ExternalStringResourceBase&) = delete; + private: friend class v8::internal::Heap; }; @@ -2413,13 +2576,14 @@ class V8_EXPORT String : public Name { char* operator*() { return str_; } const char* operator*() const { return str_; } int length() const { return length_; } + + // Disallow copying and assigning. + Utf8Value(const Utf8Value&) = delete; + void operator=(const Utf8Value&) = delete; + private: char* str_; int length_; - - // Disallow copying and assigning. - Utf8Value(const Utf8Value&); - void operator=(const Utf8Value&); }; /** @@ -2435,13 +2599,14 @@ class V8_EXPORT String : public Name { uint16_t* operator*() { return str_; } const uint16_t* operator*() const { return str_; } int length() const { return length_; } + + // Disallow copying and assigning. + Value(const Value&) = delete; + void operator=(const Value&) = delete; + private: uint16_t* str_; int length_; - - // Disallow copying and assigning. - Value(const Value&); - void operator=(const Value&); }; private: @@ -2575,11 +2740,17 @@ class V8_EXPORT Uint32 : public Integer { static void CheckCast(v8::Value* obj); }; - +/** + * PropertyAttribute. + */ enum PropertyAttribute { - None = 0, - ReadOnly = 1 << 0, - DontEnum = 1 << 1, + /** None. **/ + None = 0, + /** ReadOnly, i.e., not writable. **/ + ReadOnly = 1 << 0, + /** DontEnum, i.e., not enumerable. **/ + DontEnum = 1 << 1, + /** DontDelete, i.e., not configurable. **/ DontDelete = 1 << 2 }; @@ -2693,6 +2864,22 @@ class V8_EXPORT Object : public Value { Local context, Local key, Local value, PropertyAttribute attributes = None); + // Implements Object.DefineProperty(O, P, Attributes), see Ecma-262 19.1.2.4. + // + // The defineProperty function is used to add an own property or + // update the attributes of an existing own property of an object. + // + // Both data and accessor descriptors can be used. + // + // In general, CreateDataProperty is faster, however, does not allow + // for specifying attributes or an accessor descriptor. + // + // The PropertyDescriptor can change when redefining a property. + // + // Returns true on success. + V8_WARN_UNUSED_RESULT Maybe DefineProperty( + Local context, Local key, PropertyDescriptor& descriptor); + // Sets an own property on this object bypassing interceptors and // overriding accessors or read-only properties. // @@ -3236,12 +3423,91 @@ class FunctionCallbackInfo { template class PropertyCallbackInfo { public: + /** + * \return The isolate of the property access. + */ V8_INLINE Isolate* GetIsolate() const; + + /** + * \return The data set in the configuration, i.e., in + * `NamedPropertyHandlerConfiguration` or + * `IndexedPropertyHandlerConfiguration.` + */ V8_INLINE Local Data() const; + + /** + * \return The receiver. In many cases, this is the object on which the + * property access was intercepted. When using + * `Reflect.Get`, `Function.prototype.call`, or similar functions, it is the + * object passed in as receiver or thisArg. + * + * \code + * void GetterCallback(Local name, + * const v8::PropertyCallbackInfo& info) { + * auto context = info.GetIsolate()->GetCurrentContext(); + * + * v8::Local a_this = + * info.This() + * ->GetRealNamedProperty(context, v8_str("a")) + * .ToLocalChecked(); + * v8::Local a_holder = + * info.Holder() + * ->GetRealNamedProperty(context, v8_str("a")) + * .ToLocalChecked(); + * + * CHECK(v8_str("r")->Equals(context, a_this).FromJust()); + * CHECK(v8_str("obj")->Equals(context, a_holder).FromJust()); + * + * info.GetReturnValue().Set(name); + * } + * + * v8::Local templ = + * v8::FunctionTemplate::New(isolate); + * templ->InstanceTemplate()->SetHandler( + * v8::NamedPropertyHandlerConfiguration(GetterCallback)); + * LocalContext env; + * env->Global() + * ->Set(env.local(), v8_str("obj"), templ->GetFunction(env.local()) + * .ToLocalChecked() + * ->NewInstance(env.local()) + * .ToLocalChecked()) + * .FromJust(); + * + * CompileRun("obj.a = 'obj'; var r = {a: 'r'}; Reflect.get(obj, 'x', r)"); + * \endcode + */ V8_INLINE Local This() const; + + /** + * \return The object in the prototype chain of the receiver that has the + * interceptor. Suppose you have `x` and its prototype is `y`, and `y` + * has an interceptor. Then `info.This()` is `x` and `info.Holder()` is `y`. + * The Holder() could be a hidden object (the global object, rather + * than the global proxy). + * + * \note For security reasons, do not pass the object back into the runtime. + */ V8_INLINE Local Holder() const; + + /** + * \return The return value of the callback. + * Can be changed by calling Set(). + * \code + * info.GetReturnValue().Set(...) + * \endcode + * + */ V8_INLINE ReturnValue GetReturnValue() const; + + /** + * \return True if the intercepted function should throw if an error occurs. + * Usually, `true` corresponds to `'use strict'`. + * + * \note Always `false` when intercepting `Reflect.Set()` + * independent of the language mode. + */ V8_INLINE bool ShouldThrowOnError() const; + // This shouldn't be public, but the arm compiler needs it. static const int kArgsLength = 7; @@ -3431,6 +3697,78 @@ class V8_EXPORT Promise : public Object { static void CheckCast(Value* obj); }; +/** + * An instance of a Property Descriptor, see Ecma-262 6.2.4. + * + * Properties in a descriptor are present or absent. If you do not set + * `enumerable`, `configurable`, and `writable`, they are absent. If `value`, + * `get`, or `set` are absent, but you must specify them in the constructor, use + * empty handles. + * + * Accessors `get` and `set` must be callable or undefined if they are present. + * + * \note Only query properties if they are present, i.e., call `x()` only if + * `has_x()` returns true. + * + * \code + * // var desc = {writable: false} + * v8::PropertyDescriptor d(Local()), false); + * d.value(); // error, value not set + * if (d.has_writable()) { + * d.writable(); // false + * } + * + * // var desc = {value: undefined} + * v8::PropertyDescriptor d(v8::Undefined(isolate)); + * + * // var desc = {get: undefined} + * v8::PropertyDescriptor d(v8::Undefined(isolate), Local())); + * \endcode + */ +class V8_EXPORT PropertyDescriptor { + public: + // GenericDescriptor + PropertyDescriptor(); + + // DataDescriptor + PropertyDescriptor(Local value); + + // DataDescriptor with writable property + PropertyDescriptor(Local value, bool writable); + + // AccessorDescriptor + PropertyDescriptor(Local get, Local set); + + ~PropertyDescriptor(); + + Local value() const; + bool has_value() const; + + Local get() const; + bool has_get() const; + Local set() const; + bool has_set() const; + + void set_enumerable(bool enumerable); + bool enumerable() const; + bool has_enumerable() const; + + void set_configurable(bool configurable); + bool configurable() const; + bool has_configurable() const; + + bool writable() const; + bool has_writable() const; + + struct PrivateData; + PrivateData* get_private() const { return private_; } + + PropertyDescriptor(const PropertyDescriptor&) = delete; + void operator=(const PropertyDescriptor&) = delete; + + private: + PrivateData* private_; +}; /** * An instance of the built-in Proxy constructor (ECMA-262, 6th Edition, @@ -3444,7 +3782,7 @@ class V8_EXPORT Proxy : public Object { void Revoke(); /** - * Creates a new empty Map. + * Creates a new Proxy for the target object. */ static MaybeLocal New(Local context, Local local_target, @@ -4296,36 +4634,115 @@ typedef void (*NamedPropertyEnumeratorCallback)( // TODO(dcarney): Deprecate and remove previous typedefs, and replace // GenericNamedPropertyFooCallback with just NamedPropertyFooCallback. + /** - * GenericNamedProperty[Getter|Setter] are used as interceptors on object. - * See ObjectTemplate::SetNamedPropertyHandler. + * Interceptor for get requests on an object. + * + * Use `info.GetReturnValue().Set()` to set the return value of the + * intercepted get request. + * + * \param property The name of the property for which the request was + * intercepted. + * \param info Information about the intercepted request, such as + * isolate, receiver, return value, or whether running in `'use strict`' mode. + * See `PropertyCallbackInfo`. + * + * \code + * void GetterCallback( + * Local name, + * const v8::PropertyCallbackInfo& info) { + * info.GetReturnValue().Set(v8_num(42)); + * } + * + * v8::Local templ = + * v8::FunctionTemplate::New(isolate); + * templ->InstanceTemplate()->SetHandler( + * v8::NamedPropertyHandlerConfiguration(GetterCallback)); + * LocalContext env; + * env->Global() + * ->Set(env.local(), v8_str("obj"), templ->GetFunction(env.local()) + * .ToLocalChecked() + * ->NewInstance(env.local()) + * .ToLocalChecked()) + * .FromJust(); + * v8::Local result = CompileRun("obj.a = 17; obj.a"); + * CHECK(v8_num(42)->Equals(env.local(), result).FromJust()); + * \endcode + * + * See also `ObjectTemplate::SetHandler`. */ typedef void (*GenericNamedPropertyGetterCallback)( Local property, const PropertyCallbackInfo& info); - /** - * Returns the value if the setter intercepts the request. - * Otherwise, returns an empty handle. + * Interceptor for set requests on an object. + * + * Use `info.GetReturnValue()` to indicate whether the request was intercepted + * or not. If the setter successfully intercepts the request, i.e., if the + * request should not be further executed, call + * `info.GetReturnValue().Set(value)`. If the setter + * did not intercept the request, i.e., if the request should be handled as + * if no interceptor is present, do not not call `Set()`. + * + * \param property The name of the property for which the request was + * intercepted. + * \param value The value which the property will have if the request + * is not intercepted. + * \param info Information about the intercepted request, such as + * isolate, receiver, return value, or whether running in `'use strict'` mode. + * See `PropertyCallbackInfo`. + * + * See also + * `ObjectTemplate::SetHandler.` */ typedef void (*GenericNamedPropertySetterCallback)( Local property, Local value, const PropertyCallbackInfo& info); - /** - * Returns a non-empty handle if the interceptor intercepts the request. - * The result is an integer encoding property attributes (like v8::None, - * v8::DontEnum, etc.) + * Intercepts all requests that query the attributes of the + * property, e.g., getOwnPropertyDescriptor(), propertyIsEnumerable(), and + * defineProperty(). + * + * Use `info.GetReturnValue().Set(value)` to set the property attributes. The + * value is an interger encoding a `v8::PropertyAttribute`. + * + * \param property The name of the property for which the request was + * intercepted. + * \param info Information about the intercepted request, such as + * isolate, receiver, return value, or whether running in `'use strict'` mode. + * See `PropertyCallbackInfo`. + * + * \note Some functions query the property attributes internally, even though + * they do not return the attributes. For example, `hasOwnProperty()` can + * trigger this interceptor depending on the state of the object. + * + * See also + * `ObjectTemplate::SetHandler.` */ typedef void (*GenericNamedPropertyQueryCallback)( Local property, const PropertyCallbackInfo& info); - /** - * Returns a non-empty handle if the deleter intercepts the request. - * The return value is true if the property could be deleted and false - * otherwise. + * Interceptor for delete requests on an object. + * + * Use `info.GetReturnValue()` to indicate whether the request was intercepted + * or not. If the deleter successfully intercepts the request, i.e., if the + * request should not be further executed, call + * `info.GetReturnValue().Set(value)` with a boolean `value`. The `value` is + * used as the return value of `delete`. + * + * \param property The name of the property for which the request was + * intercepted. + * \param info Information about the intercepted request, such as + * isolate, receiver, return value, or whether running in `'use strict'` mode. + * See `PropertyCallbackInfo`. + * + * \note If you need to mimic the behavior of `delete`, i.e., throw in strict + * mode instead of returning false, use `info.ShouldThrowOnError()` to determine + * if you are in strict mode. + * + * See also `ObjectTemplate::SetHandler.` */ typedef void (*GenericNamedPropertyDeleterCallback)( Local property, const PropertyCallbackInfo& info); @@ -4338,52 +4755,99 @@ typedef void (*GenericNamedPropertyDeleterCallback)( typedef void (*GenericNamedPropertyEnumeratorCallback)( const PropertyCallbackInfo& info); +/** + * Interceptor for defineProperty requests on an object. + * + * Use `info.GetReturnValue()` to indicate whether the request was intercepted + * or not. If the definer successfully intercepts the request, i.e., if the + * request should not be further executed, call + * `info.GetReturnValue().Set(value)`. If the definer + * did not intercept the request, i.e., if the request should be handled as + * if no interceptor is present, do not not call `Set()`. + * + * \param property The name of the property for which the request was + * intercepted. + * \param desc The property descriptor which is used to define the + * property if the request is not intercepted. + * \param info Information about the intercepted request, such as + * isolate, receiver, return value, or whether running in `'use strict'` mode. + * See `PropertyCallbackInfo`. + * + * See also `ObjectTemplate::SetHandler`. + */ +typedef void (*GenericNamedPropertyDefinerCallback)( + Local property, const PropertyDescriptor& desc, + const PropertyCallbackInfo& info); /** - * Returns the value of the property if the getter intercepts the - * request. Otherwise, returns an empty handle. + * Interceptor for getOwnPropertyDescriptor requests on an object. + * + * Use `info.GetReturnValue().Set()` to set the return value of the + * intercepted request. The return value must be an object that + * can be converted to a PropertyDescriptor, e.g., a `v8::value` returned from + * `v8::Object::getOwnPropertyDescriptor`. + * + * \param property The name of the property for which the request was + * intercepted. + * \info Information about the intercepted request, such as + * isolate, receiver, return value, or whether running in `'use strict'` mode. + * See `PropertyCallbackInfo`. + * + * \note If GetOwnPropertyDescriptor is intercepted, it will + * always return true, i.e., indicate that the property was found. + * + * See also `ObjectTemplate::SetHandler`. + */ +typedef void (*GenericNamedPropertyDescriptorCallback)( + Local property, const PropertyCallbackInfo& info); + +/** + * See `v8::GenericNamedPropertyGetterCallback`. */ typedef void (*IndexedPropertyGetterCallback)( uint32_t index, const PropertyCallbackInfo& info); - /** - * Returns the value if the setter intercepts the request. - * Otherwise, returns an empty handle. + * See `v8::GenericNamedPropertySetterCallback`. */ typedef void (*IndexedPropertySetterCallback)( uint32_t index, Local value, const PropertyCallbackInfo& info); - /** - * Returns a non-empty handle if the interceptor intercepts the request. - * The result is an integer encoding property attributes. + * See `v8::GenericNamedPropertyQueryCallback`. */ typedef void (*IndexedPropertyQueryCallback)( uint32_t index, const PropertyCallbackInfo& info); - /** - * Returns a non-empty handle if the deleter intercepts the request. - * The return value is true if the property could be deleted and false - * otherwise. + * See `v8::GenericNamedPropertyDeleterCallback`. */ typedef void (*IndexedPropertyDeleterCallback)( uint32_t index, const PropertyCallbackInfo& info); - /** - * Returns an array containing the indices of the properties the - * indexed property getter intercepts. + * See `v8::GenericNamedPropertyEnumeratorCallback`. */ typedef void (*IndexedPropertyEnumeratorCallback)( const PropertyCallbackInfo& info); +/** + * See `v8::GenericNamedPropertyDefinerCallback`. + */ +typedef void (*IndexedPropertyDefinerCallback)( + uint32_t index, const PropertyDescriptor& desc, + const PropertyCallbackInfo& info); + +/** + * See `v8::GenericNamedPropertyDescriptorCallback`. + */ +typedef void (*IndexedPropertyDescriptorCallback)( + uint32_t index, const PropertyCallbackInfo& info); /** * Access type specification. @@ -4617,23 +5081,22 @@ class V8_EXPORT FunctionTemplate : public Template { friend class ObjectTemplate; }; - enum class PropertyHandlerFlags { kNone = 0, // See ALL_CAN_READ above. kAllCanRead = 1, // Will not call into interceptor for properties on the receiver or prototype - // chain. Currently only valid for named interceptors. + // chain, i.e., only call into interceptor for properties that do not exist. + // Currently only valid for named interceptors. kNonMasking = 1 << 1, // Will not call into interceptor for symbol lookup. Only meaningful for // named interceptors. kOnlyInterceptStrings = 1 << 2, }; - struct NamedPropertyHandlerConfiguration { NamedPropertyHandlerConfiguration( - /** Note: getter is required **/ + /** Note: getter is required */ GenericNamedPropertyGetterCallback getter = 0, GenericNamedPropertySetterCallback setter = 0, GenericNamedPropertyQueryCallback query = 0, @@ -4646,6 +5109,27 @@ struct NamedPropertyHandlerConfiguration { query(query), deleter(deleter), enumerator(enumerator), + definer(0), + descriptor(0), + data(data), + flags(flags) {} + + NamedPropertyHandlerConfiguration( + GenericNamedPropertyGetterCallback getter, + GenericNamedPropertySetterCallback setter, + GenericNamedPropertyDescriptorCallback descriptor, + GenericNamedPropertyDeleterCallback deleter, + GenericNamedPropertyEnumeratorCallback enumerator, + GenericNamedPropertyDefinerCallback definer, + Local data = Local(), + PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) + : getter(getter), + setter(setter), + query(0), + deleter(deleter), + enumerator(enumerator), + definer(definer), + descriptor(descriptor), data(data), flags(flags) {} @@ -4654,6 +5138,8 @@ struct NamedPropertyHandlerConfiguration { GenericNamedPropertyQueryCallback query; GenericNamedPropertyDeleterCallback deleter; GenericNamedPropertyEnumeratorCallback enumerator; + GenericNamedPropertyDefinerCallback definer; + GenericNamedPropertyDescriptorCallback descriptor; Local data; PropertyHandlerFlags flags; }; @@ -4661,7 +5147,7 @@ struct NamedPropertyHandlerConfiguration { struct IndexedPropertyHandlerConfiguration { IndexedPropertyHandlerConfiguration( - /** Note: getter is required **/ + /** Note: getter is required */ IndexedPropertyGetterCallback getter = 0, IndexedPropertySetterCallback setter = 0, IndexedPropertyQueryCallback query = 0, @@ -4674,6 +5160,27 @@ struct IndexedPropertyHandlerConfiguration { query(query), deleter(deleter), enumerator(enumerator), + definer(0), + descriptor(0), + data(data), + flags(flags) {} + + IndexedPropertyHandlerConfiguration( + IndexedPropertyGetterCallback getter, + IndexedPropertySetterCallback setter, + IndexedPropertyDescriptorCallback descriptor, + IndexedPropertyDeleterCallback deleter, + IndexedPropertyEnumeratorCallback enumerator, + IndexedPropertyDefinerCallback definer, + Local data = Local(), + PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) + : getter(getter), + setter(setter), + query(0), + deleter(deleter), + enumerator(enumerator), + definer(definer), + descriptor(descriptor), data(data), flags(flags) {} @@ -4682,6 +5189,8 @@ struct IndexedPropertyHandlerConfiguration { IndexedPropertyQueryCallback query; IndexedPropertyDeleterCallback deleter; IndexedPropertyEnumeratorCallback enumerator; + IndexedPropertyDefinerCallback definer; + IndexedPropertyDescriptorCallback descriptor; Local data; PropertyHandlerFlags flags; }; @@ -4977,6 +5486,10 @@ class V8_EXPORT Extension { // NOLINT void set_auto_enable(bool value) { auto_enable_ = value; } bool auto_enable() { return auto_enable_; } + // Disallow copying and assigning. + Extension(const Extension&) = delete; + void operator=(const Extension&) = delete; + private: const char* name_; size_t source_length_; // expected to initialize before source_ @@ -4984,10 +5497,6 @@ class V8_EXPORT Extension { // NOLINT int dep_count_; const char** deps_; bool auto_enable_; - - // Disallow copying and assigning. - Extension(const Extension&); - void operator=(const Extension&); }; @@ -5213,13 +5722,13 @@ class V8_EXPORT MicrotasksScope { */ static bool IsRunningMicrotasks(Isolate* isolate); + // Prevent copying. + MicrotasksScope(const MicrotasksScope&) = delete; + MicrotasksScope& operator=(const MicrotasksScope&) = delete; + private: internal::Isolate* const isolate_; bool run_; - - // Prevent copying. - MicrotasksScope(const MicrotasksScope&); - MicrotasksScope& operator=(const MicrotasksScope&); }; @@ -5530,23 +6039,27 @@ enum class MemoryPressureLevel { kNone, kModerate, kCritical }; class V8_EXPORT EmbedderHeapTracer { public: enum ForceCompletionAction { FORCE_COMPLETION, DO_NOT_FORCE_COMPLETION }; + struct AdvanceTracingActions { explicit AdvanceTracingActions(ForceCompletionAction force_completion_) : force_completion(force_completion_) {} ForceCompletionAction force_completion; }; + /** - * V8 will call this method with internal fields of found wrappers. - * Embedder is expected to store them in it's marking deque and trace - * reachable wrappers from them when asked by AdvanceTracing method. + * V8 will call this method with internal fields of found wrappers. The + * embedder is expected to store them in its marking deque and trace + * reachable wrappers from them when called through |AdvanceTracing|. */ virtual void RegisterV8References( const std::vector >& internal_fields) = 0; + /** - * V8 will call this method at the beginning of the gc cycle. + * V8 will call this method at the beginning of a GC cycle. */ virtual void TracePrologue() = 0; + /** * Embedder is expected to trace its heap starting from wrappers reported by * RegisterV8References method, and call @@ -5557,9 +6070,11 @@ class V8_EXPORT EmbedderHeapTracer { */ virtual bool AdvanceTracing(double deadline_in_ms, AdvanceTracingActions actions) = 0; + /** - * V8 will call this method at the end of the gc cycle. Allocation is *not* - * allowed in the TraceEpilogue. + * V8 will call this method at the end of a GC cycle. + * + * Note that allocation is *not* allowed within |TraceEpilogue|. */ virtual void TraceEpilogue() = 0; @@ -5574,6 +6089,11 @@ class V8_EXPORT EmbedderHeapTracer { */ virtual void AbortTracing() {} + /** + * Returns the number of wrappers that are still to be traced by the embedder. + */ + virtual size_t NumberOfWrappersToTrace() { return 0; } + protected: virtual ~EmbedderHeapTracer() = default; }; @@ -5671,12 +6191,12 @@ class V8_EXPORT Isolate { ~Scope() { isolate_->Exit(); } + // Prevent copying of Scope objects. + Scope(const Scope&) = delete; + Scope& operator=(const Scope&) = delete; + private: Isolate* const isolate_; - - // Prevent copying of Scope objects. - Scope(const Scope&); - Scope& operator=(const Scope&); }; @@ -5690,14 +6210,15 @@ class V8_EXPORT Isolate { DisallowJavascriptExecutionScope(Isolate* isolate, OnFailure on_failure); ~DisallowJavascriptExecutionScope(); + // Prevent copying of Scope objects. + DisallowJavascriptExecutionScope(const DisallowJavascriptExecutionScope&) = + delete; + DisallowJavascriptExecutionScope& operator=( + const DisallowJavascriptExecutionScope&) = delete; + private: bool on_failure_; void* internal_; - - // Prevent copying of Scope objects. - DisallowJavascriptExecutionScope(const DisallowJavascriptExecutionScope&); - DisallowJavascriptExecutionScope& operator=( - const DisallowJavascriptExecutionScope&); }; @@ -5709,14 +6230,15 @@ class V8_EXPORT Isolate { explicit AllowJavascriptExecutionScope(Isolate* isolate); ~AllowJavascriptExecutionScope(); + // Prevent copying of Scope objects. + AllowJavascriptExecutionScope(const AllowJavascriptExecutionScope&) = + delete; + AllowJavascriptExecutionScope& operator=( + const AllowJavascriptExecutionScope&) = delete; + private: void* internal_throws_; void* internal_assert_; - - // Prevent copying of Scope objects. - AllowJavascriptExecutionScope(const AllowJavascriptExecutionScope&); - AllowJavascriptExecutionScope& operator=( - const AllowJavascriptExecutionScope&); }; /** @@ -5728,13 +6250,14 @@ class V8_EXPORT Isolate { explicit SuppressMicrotaskExecutionScope(Isolate* isolate); ~SuppressMicrotaskExecutionScope(); - private: - internal::Isolate* const isolate_; - // Prevent copying of Scope objects. - SuppressMicrotaskExecutionScope(const SuppressMicrotaskExecutionScope&); + SuppressMicrotaskExecutionScope(const SuppressMicrotaskExecutionScope&) = + delete; SuppressMicrotaskExecutionScope& operator=( - const SuppressMicrotaskExecutionScope&); + const SuppressMicrotaskExecutionScope&) = delete; + + private: + internal::Isolate* const isolate_; }; /** @@ -6460,17 +6983,17 @@ class V8_EXPORT Isolate { */ bool IsInUse(); + Isolate() = delete; + ~Isolate() = delete; + Isolate(const Isolate&) = delete; + Isolate& operator=(const Isolate&) = delete; + void* operator new(size_t size) = delete; + void operator delete(void*, size_t) = delete; + private: template friend class PersistentValueMapBase; - Isolate(); - Isolate(const Isolate&); - ~Isolate(); - Isolate& operator=(const Isolate&); - void* operator new(size_t size); - void operator delete(void*, size_t); - void SetObjectGroupId(internal::Object** object, UniqueId id); void SetReferenceFromGroup(UniqueId id, internal::Object** object); void SetReference(internal::Object** parent, internal::Object** child); @@ -6925,12 +7448,12 @@ class SnapshotCreator { */ StartupData CreateBlob(FunctionCodeHandling function_code_handling); + // Disallow copying and assigning. + SnapshotCreator(const SnapshotCreator&) = delete; + void operator=(const SnapshotCreator&) = delete; + private: void* data_; - - // Disallow copying and assigning. - SnapshotCreator(const SnapshotCreator&); - void operator=(const SnapshotCreator&); }; /** @@ -7134,15 +7657,14 @@ class V8_EXPORT TryCatch { return handler->js_stack_comparable_address_; } + TryCatch(const TryCatch&) = delete; + void operator=(const TryCatch&) = delete; + void* operator new(size_t size) = delete; + void operator delete(void*, size_t) = delete; + private: void ResetInternal(); - // Make it hard to create heap-allocated TryCatch blocks. - TryCatch(const TryCatch&); - void operator=(const TryCatch&); - void* operator new(size_t size); - void operator delete(void*, size_t); - v8::internal::Isolate* isolate_; v8::TryCatch* next_; void* exception_; @@ -7498,16 +8020,16 @@ class V8_EXPORT Locker { */ static bool IsActive(); + // Disallow copying and assigning. + Locker(const Locker&) = delete; + void operator=(const Locker&) = delete; + private: void Initialize(Isolate* isolate); bool has_lock_; bool top_level_; internal::Isolate* isolate_; - - // Disallow copying and assigning. - Locker(const Locker&); - void operator=(const Locker&); }; diff --git a/deps/v8/infra/mb/mb_config.pyl b/deps/v8/infra/mb/mb_config.pyl index edfd2543167185..394bb55925f33b 100644 --- a/deps/v8/infra/mb/mb_config.pyl +++ b/deps/v8/infra/mb/mb_config.pyl @@ -9,12 +9,18 @@ # Bots are ordered by appearance on waterfall. 'masters': { 'developer_default': { + 'arm.debug': 'default_debug_arm', + 'arm.optdebug': 'default_optdebug_arm', + 'arm.release': 'default_release_arm', + 'arm64.debug': 'default_debug_arm64', + 'arm64.optdebug': 'default_optdebug_arm64', + 'arm64.release': 'default_release_arm64', + 'ia32.debug': 'default_debug_x86', + 'ia32.optdebug': 'default_optdebug_x86', + 'ia32.release': 'default_release_x86', 'x64.debug': 'default_debug_x64', 'x64.optdebug': 'default_optdebug_x64', 'x64.release': 'default_release_x64', - 'x86.debug': 'default_debug_x86', - 'x86.optdebug': 'default_optdebug_x86', - 'x86.release': 'default_release_x86', }, 'client.dart.fyi': { @@ -32,7 +38,7 @@ 'V8 Linux - nosnap builder': 'gn_release_x86_no_snap', 'V8 Linux - nosnap debug builder': 'gn_debug_x86_no_snap', 'V8 Linux - shared': 'gn_release_x86_shared_verify_heap', - 'V8 Linux - noi18n - debug': 'gyp_debug_x86_no_i18n', + 'V8 Linux - noi18n - debug': 'gn_debug_x86_no_i18n', # Linux64. 'V8 Linux64 - builder': 'gn_release_x64', 'V8 Linux64 - debug builder': 'gn_debug_x64_valgrind', @@ -40,34 +46,35 @@ 'V8 Linux64 - internal snapshot': 'gn_release_x64_internal', 'V8 Linux64 - gyp': 'gyp_release_x64', # Windows. - 'V8 Win32 - builder': 'gyp_release_x86_minimal_symbols', - 'V8 Win32 - debug builder': 'gyp_debug_x86_minimal_symbols', + 'V8 Win32 - builder': 'gn_release_x86_minimal_symbols', + 'V8 Win32 - debug builder': 'gn_debug_x86_minimal_symbols', 'V8 Win32 - nosnap - shared': - 'gyp_release_x86_no_snap_shared_minimal_symbols', - 'V8 Win64': 'gyp_release_x64_minimal_symbols', - 'V8 Win64 - debug': 'gyp_debug_x64_minimal_symbols', - 'V8 Win64 - clang': 'gyp_release_x64_clang', + 'gn_release_x86_no_snap_shared_minimal_symbols', + 'V8 Win64': 'gn_release_x64_minimal_symbols', + 'V8 Win64 - debug': 'gn_debug_x64_minimal_symbols', + # TODO(machenbach): Switch plugins on when errors are fixed. + 'V8 Win64 - clang': 'gn_release_x64_clang_no_plugins', # Mac. 'V8 Mac': 'gn_release_x86', 'V8 Mac - debug': 'gn_debug_x86', 'V8 Mac64': 'gn_release_x64', 'V8 Mac64 - debug': 'gn_debug_x64', 'V8 Mac GC Stress': 'gn_debug_x86', - 'V8 Mac64 ASAN': 'gyp_release_x64_asan', + 'V8 Mac64 ASAN': 'gn_release_x64_asan_no_lsan', # Sanitizers. - 'V8 Linux64 ASAN': 'gyp_release_x64_asan', + 'V8 Linux64 ASAN': 'gn_release_x64_asan', 'V8 Linux64 TSAN': 'gn_release_x64_tsan', 'V8 Linux - arm64 - sim - MSAN': 'gn_release_simulate_arm64_msan', # Clusterfuzz. 'V8 Linux64 ASAN no inline - release builder': - 'gyp_release_x64_asan_symbolized_edge_verify_heap', - 'V8 Linux64 ASAN - debug builder': 'gyp_debug_x64_asan_edge', + 'gn_release_x64_asan_symbolized_edge_verify_heap', + 'V8 Linux64 ASAN - debug builder': 'gn_debug_x64_asan_edge', 'V8 Linux64 ASAN arm64 - debug builder': - 'gyp_debug_simulate_arm64_asan_edge', + 'gn_debug_simulate_arm64_asan_edge', 'V8 Linux ASAN arm - debug builder': - 'gyp_debug_simulate_arm_asan_edge', + 'gn_debug_simulate_arm_asan_edge', 'V8 Linux ASAN mipsel - debug builder': - 'gyp_debug_simulate_mipsel_asan_edge', + 'gn_debug_simulate_mipsel_asan_edge', # Misc. 'V8 Linux gcc 4.8': 'gn_release_x86_gcc', # FYI. @@ -86,13 +93,13 @@ 'client.v8.ports': { # Arm. - 'V8 Arm - builder': 'gyp_release_arm', - 'V8 Arm - debug builder': 'gyp_debug_arm', - 'V8 Android Arm - builder': 'gyp_release_android_arm', - 'V8 Linux - arm - sim': 'gyp_release_simulate_arm', - 'V8 Linux - arm - sim - debug': 'gyp_debug_simulate_arm', + 'V8 Arm - builder': 'gn_release_arm', + 'V8 Arm - debug builder': 'gn_debug_arm', + 'V8 Android Arm - builder': 'gn_release_android_arm', + 'V8 Linux - arm - sim': 'gn_release_simulate_arm', + 'V8 Linux - arm - sim - debug': 'gn_debug_simulate_arm', # Arm64. - 'V8 Android Arm64 - builder': 'gyp_release_android_arm64', + 'V8 Android Arm64 - builder': 'gn_release_android_arm64', 'V8 Linux - arm64 - sim': 'gn_release_simulate_arm64', 'V8 Linux - arm64 - sim - debug': 'gn_debug_simulate_arm64', 'V8 Linux - arm64 - sim - nosnap - debug': @@ -100,8 +107,8 @@ 'V8 Linux - arm64 - sim - gc stress': 'gn_debug_simulate_arm64', # Mips. 'V8 Mips - builder': 'gyp_release_mips_no_snap_no_i18n', - 'V8 Linux - mipsel - sim - builder': 'gyp_release_simulate_mipsel', - 'V8 Linux - mips64el - sim - builder': 'gyp_release_simulate_mips64el', + 'V8 Linux - mipsel - sim - builder': 'gn_release_simulate_mipsel', + 'V8 Linux - mips64el - sim - builder': 'gn_release_simulate_mips64el', # PPC. 'V8 Linux - ppc - sim': 'gyp_release_simulate_ppc', 'V8 Linux - ppc64 - sim': 'gyp_release_simulate_ppc64', @@ -117,18 +124,18 @@ 'V8 Linux - beta branch - debug': 'gn_debug_x86', 'V8 Linux - stable branch': 'gn_release_x86', 'V8 Linux - stable branch - debug': 'gn_debug_x86', - 'V8 Linux64 - beta branch': 'gyp_release_x64', + 'V8 Linux64 - beta branch': 'gn_release_x64', 'V8 Linux64 - beta branch - debug': 'gn_debug_x64', 'V8 Linux64 - stable branch': 'gn_release_x64', 'V8 Linux64 - stable branch - debug': 'gn_debug_x64', - 'V8 arm - sim - beta branch': 'gyp_release_simulate_arm', - 'V8 arm - sim - beta branch - debug': 'gyp_debug_simulate_arm', - 'V8 arm - sim - stable branch': 'gyp_release_simulate_arm', - 'V8 arm - sim - stable branch - debug': 'gyp_debug_simulate_arm', - 'V8 mips64el - sim - beta branch': 'gyp_release_simulate_mips64el', - 'V8 mips64el - sim - stable branch': 'gyp_release_simulate_mips64el', - 'V8 mipsel - sim - beta branch': 'gyp_release_simulate_mipsel', - 'V8 mipsel - sim - stable branch': 'gyp_release_simulate_mipsel', + 'V8 arm - sim - beta branch': 'gn_release_simulate_arm', + 'V8 arm - sim - beta branch - debug': 'gn_debug_simulate_arm', + 'V8 arm - sim - stable branch': 'gn_release_simulate_arm', + 'V8 arm - sim - stable branch - debug': 'gn_debug_simulate_arm', + 'V8 mips64el - sim - beta branch': 'gn_release_simulate_mips64el', + 'V8 mips64el - sim - stable branch': 'gn_release_simulate_mips64el', + 'V8 mipsel - sim - beta branch': 'gn_release_simulate_mipsel', + 'V8 mipsel - sim - stable branch': 'gn_release_simulate_mipsel', 'V8 ppc - sim - beta branch': 'gyp_release_simulate_ppc', 'V8 ppc - sim - stable branch': 'gyp_release_simulate_ppc', 'V8 ppc64 - sim - beta branch': 'gyp_release_simulate_ppc64', @@ -143,8 +150,8 @@ 'v8_linux_avx2_dbg': 'gn_debug_x86_trybot', 'v8_linux_nodcheck_rel_ng': 'gn_release_x86_minimal_symbols', 'v8_linux_dbg_ng': 'gn_debug_x86_trybot', - 'v8_linux_noi18n_rel_ng': 'gyp_release_x86_no_i18n_trybot', - 'v8_linux_gc_stress_dbg': 'gyp_debug_x86_trybot', + 'v8_linux_noi18n_rel_ng': 'gn_release_x86_no_i18n_trybot', + 'v8_linux_gc_stress_dbg': 'gn_debug_x86_trybot', 'v8_linux_nosnap_rel': 'gn_release_x86_no_snap_trybot', 'v8_linux_nosnap_dbg': 'gn_debug_x86_no_snap_trybot', 'v8_linux_gcc_compile_rel': 'gn_release_x86_gcc_minimal_symbols', @@ -153,34 +160,34 @@ 'v8_linux64_gyp_rel_ng': 'gyp_release_x64', 'v8_linux64_avx2_rel_ng': 'gn_release_x64_trybot', 'v8_linux64_avx2_dbg': 'gn_debug_x64_trybot', - 'v8_linux64_asan_rel_ng': 'gyp_release_x64_asan_minimal_symbols', + 'v8_linux64_asan_rel_ng': 'gn_release_x64_asan_minimal_symbols', 'v8_linux64_msan_rel': 'gn_release_simulate_arm64_msan_minimal_symbols', 'v8_linux64_sanitizer_coverage_rel': 'gyp_release_x64_asan_minimal_symbols_coverage', 'v8_linux64_tsan_rel': 'gn_release_x64_tsan_minimal_symbols', - 'v8_win_dbg': 'gyp_debug_x86_trybot', - 'v8_win_compile_dbg': 'gyp_debug_x86_trybot', - 'v8_win_rel_ng': 'gyp_release_x86_trybot', + 'v8_win_dbg': 'gn_debug_x86_trybot', + 'v8_win_compile_dbg': 'gn_debug_x86_trybot', + 'v8_win_rel_ng': 'gn_release_x86_trybot', 'v8_win_nosnap_shared_rel_ng': - 'gyp_release_x86_no_snap_shared_minimal_symbols', - 'v8_win64_dbg': 'gyp_debug_x64_minimal_symbols', - 'v8_win64_rel_ng': 'gyp_release_x64_trybot', + 'gn_release_x86_no_snap_shared_minimal_symbols', + 'v8_win64_dbg': 'gn_debug_x64_minimal_symbols', + 'v8_win64_rel_ng': 'gn_release_x64_trybot', 'v8_mac_rel_ng': 'gn_release_x86_trybot', 'v8_mac_dbg': 'gn_debug_x86_trybot', 'v8_mac_gc_stress_dbg': 'gn_debug_x86_trybot', 'v8_mac64_rel': 'gn_release_x64_trybot', 'v8_mac64_dbg': 'gn_debug_x64_minimal_symbols', - 'v8_mac64_asan_rel': 'gyp_release_x64_asan', - 'v8_linux_arm_rel_ng': 'gyp_release_simulate_arm_trybot', - 'v8_linux_arm_dbg': 'gyp_debug_simulate_arm', - 'v8_linux_arm_armv8a_rel': 'gyp_release_simulate_arm_trybot', - 'v8_linux_arm_armv8a_dbg': 'gyp_debug_simulate_arm', + 'v8_mac64_asan_rel': 'gn_release_x64_asan_no_lsan', + 'v8_linux_arm_rel_ng': 'gn_release_simulate_arm_trybot', + 'v8_linux_arm_dbg': 'gn_debug_simulate_arm', + 'v8_linux_arm_armv8a_rel': 'gn_release_simulate_arm_trybot', + 'v8_linux_arm_armv8a_dbg': 'gn_debug_simulate_arm', 'v8_linux_arm64_rel_ng': 'gn_release_simulate_arm64_trybot', 'v8_linux_arm64_dbg': 'gn_debug_simulate_arm64', 'v8_linux_arm64_gc_stress_dbg': 'gn_debug_simulate_arm64', - 'v8_linux_mipsel_compile_rel': 'gyp_release_simulate_mipsel', - 'v8_linux_mips64el_compile_rel': 'gyp_release_simulate_mips64el', - 'v8_android_arm_compile_rel': 'gyp_release_android_arm', + 'v8_linux_mipsel_compile_rel': 'gn_release_simulate_mipsel', + 'v8_linux_mips64el_compile_rel': 'gn_release_simulate_mips64el', + 'v8_android_arm_compile_rel': 'gn_release_android_arm', }, }, @@ -189,6 +196,20 @@ # gyp/gn, release/debug, arch type, other values alphabetically. 'configs': { # Developer default configs. + 'default_debug_arm': [ + 'gn', 'debug', 'simulate_arm', 'v8_enable_slow_dchecks', + 'v8_full_debug'], + 'default_optdebug_arm': [ + 'gn', 'debug', 'simulate_arm', 'v8_enable_slow_dchecks'], + 'default_release_arm': [ + 'gn', 'release', 'simulate_arm'], + 'default_debug_arm64': [ + 'gn', 'debug', 'simulate_arm64', 'v8_enable_slow_dchecks', + 'v8_full_debug'], + 'default_optdebug_arm64': [ + 'gn', 'debug', 'simulate_arm64', 'v8_enable_slow_dchecks'], + 'default_release_arm64': [ + 'gn', 'release', 'simulate_arm64'], 'default_debug_x64': [ 'gn', 'debug', 'x64', 'v8_enable_slow_dchecks', 'v8_full_debug'], 'default_optdebug_x64': [ @@ -204,12 +225,24 @@ # GN debug configs for simulators. + 'gn_debug_simulate_arm': [ + 'gn', 'debug_bot', 'simulate_arm', 'swarming'], + 'gn_debug_simulate_arm_asan_edge': [ + 'gn', 'debug_bot', 'simulate_arm', 'asan', 'edge'], 'gn_debug_simulate_arm64': [ 'gn', 'debug_bot', 'simulate_arm64', 'swarming'], + 'gn_debug_simulate_arm64_asan_edge': [ + 'gn', 'debug_bot', 'simulate_arm64', 'asan', 'lsan', 'edge'], 'gn_debug_simulate_arm64_no_snap': [ 'gn', 'debug_bot', 'simulate_arm64', 'swarming', 'v8_snapshot_none'], + 'gn_debug_simulate_mipsel_asan_edge': [ + 'gn', 'debug_bot', 'simulate_mipsel', 'asan', 'edge'], # GN release configs for simulators. + 'gn_release_simulate_arm': [ + 'gn', 'release_bot', 'simulate_arm', 'swarming'], + 'gn_release_simulate_arm_trybot': [ + 'gn', 'release_trybot', 'simulate_arm', 'swarming'], 'gn_release_simulate_arm64': [ 'gn', 'release_bot', 'simulate_arm64', 'swarming'], 'gn_release_simulate_arm64_msan': [ @@ -219,12 +252,42 @@ 'swarming'], 'gn_release_simulate_arm64_trybot': [ 'gn', 'release_trybot', 'simulate_arm64', 'swarming'], + 'gn_release_simulate_mipsel': [ + 'gn', 'release_bot', 'simulate_mipsel', 'swarming'], + 'gn_release_simulate_mips64el': [ + 'gn', 'release_bot', 'simulate_mips64el', 'swarming'], + + # GN debug configs for arm. + 'gn_debug_arm': [ + 'gn', 'debug_bot', 'arm', 'crosscompile', 'hard_float', 'swarming'], + + # GN release configs for arm. + 'gn_release_arm': [ + 'gn', 'release_bot', 'arm', 'crosscompile', 'hard_float', 'swarming'], + 'gn_release_android_arm': [ + 'gn', 'release_bot', 'arm', 'android', 'crosscompile', 'swarming'], + 'gn_release_android_arm64': [ + 'gn', 'release_bot', 'arm64', 'android', 'crosscompile', 'swarming'], # GN release configs for x64. 'gn_release_x64': [ 'gn', 'release_bot', 'x64', 'swarming'], + 'gn_release_x64_asan': [ + 'gn', 'release_bot', 'x64', 'asan', 'lsan', 'swarming'], + 'gn_release_x64_asan_minimal_symbols': [ + 'gn', 'release_bot', 'x64', 'asan', 'lsan', 'minimal_symbols', + 'swarming'], + 'gn_release_x64_asan_no_lsan': [ + 'gn', 'release_bot', 'x64', 'asan', 'swarming'], + 'gn_release_x64_asan_symbolized_edge_verify_heap': [ + 'gn', 'release_bot', 'x64', 'asan', 'edge', 'lsan', 'symbolized', + 'v8_verify_heap'], + 'gn_release_x64_clang_no_plugins': [ + 'gn', 'release_bot', 'x64', 'clang', 'no_plugins', 'swarming'], 'gn_release_x64_internal': [ 'gn', 'release_bot', 'x64', 'swarming', 'v8_snapshot_internal'], + 'gn_release_x64_minimal_symbols': [ + 'gn', 'release_bot', 'x64', 'minimal_symbols', 'swarming'], 'gn_release_x64_trybot': [ 'gn', 'release_trybot', 'x64', 'swarming'], 'gn_release_x64_tsan': [ @@ -235,6 +298,8 @@ # GN debug configs for x64. 'gn_debug_x64': [ 'gn', 'debug_bot', 'x64', 'swarming'], + 'gn_debug_x64_asan_edge': [ + 'gn', 'debug_bot', 'x64', 'asan', 'lsan', 'edge'], 'gn_debug_x64_custom': [ 'gn', 'debug_bot', 'x64', 'swarming', 'v8_snapshot_custom'], 'gn_debug_x64_minimal_symbols': [ @@ -247,6 +312,10 @@ # GN debug configs for x86. 'gn_debug_x86': [ 'gn', 'debug_bot', 'x86', 'swarming'], + 'gn_debug_x86_minimal_symbols': [ + 'gn', 'debug_bot', 'x86', 'minimal_symbols', 'swarming'], + 'gn_debug_x86_no_i18n': [ + 'gn', 'debug_bot', 'x86', 'v8_no_i18n'], 'gn_debug_x86_no_snap': [ 'gn', 'debug_bot', 'x86', 'swarming', 'v8_snapshot_none'], 'gn_debug_x86_no_snap_trybot': [ @@ -267,8 +336,13 @@ 'gn', 'release_trybot', 'x86', 'gcmole', 'swarming'], 'gn_release_x86_minimal_symbols': [ 'gn', 'release_bot', 'x86', 'minimal_symbols', 'swarming'], + 'gn_release_x86_no_i18n_trybot': [ + 'gn', 'release_trybot', 'x86', 'swarming', 'v8_no_i18n'], 'gn_release_x86_no_snap': [ 'gn', 'release_bot', 'x86', 'swarming', 'v8_snapshot_none'], + 'gn_release_x86_no_snap_shared_minimal_symbols': [ + 'gn', 'release', 'x86', 'goma', 'minimal_symbols', 'shared', 'swarming', + 'v8_snapshot_none'], 'gn_release_x86_no_snap_trybot': [ 'gn', 'release_trybot', 'x86', 'swarming', 'v8_snapshot_none'], 'gn_release_x86_shared_verify_heap': [ @@ -276,65 +350,25 @@ 'gn_release_x86_trybot': [ 'gn', 'release_trybot', 'x86', 'swarming'], - # Gyp debug configs for arm. - 'gyp_debug_arm': [ - 'gyp', 'debug_bot', 'arm', 'crosscompile', 'hard_float', 'swarming'], - # Gyp debug configs for simulators. - 'gyp_debug_simulate_arm': [ - 'gyp', 'debug_bot', 'simulate_arm', 'swarming'], - 'gyp_debug_simulate_arm_asan_edge': [ - 'gyp', 'debug_bot', 'simulate_arm', 'asan', 'edge'], - 'gyp_debug_simulate_arm64_asan_edge': [ - 'gyp', 'debug_bot', 'simulate_arm64', 'asan', 'lsan', 'edge'], - 'gyp_debug_simulate_mipsel_asan_edge': [ - 'gyp', 'debug_bot', 'simulate_mipsel', 'asan', 'edge'], 'gyp_debug_simulate_x87_no_snap': [ 'gyp', 'debug_bot', 'simulate_x87', 'swarming', 'v8_snapshot_none'], - # Gyp debug configs for x64. - 'gyp_debug_x64_asan_edge': [ - 'gyp', 'debug_bot', 'x64', 'asan', 'lsan', 'edge'], - 'gyp_debug_x64_minimal_symbols': [ - 'gyp', 'debug_bot', 'x64', 'minimal_symbols', 'swarming'], - # Gyp debug configs for x86. 'gyp_debug_x86': [ 'gyp', 'debug_bot', 'x86', 'swarming'], - 'gyp_debug_x86_minimal_symbols': [ - 'gyp', 'debug_bot', 'x86', 'minimal_symbols', 'swarming'], - 'gyp_debug_x86_trybot': [ - 'gyp', 'debug_trybot', 'x86', 'swarming'], - 'gyp_debug_x86_no_i18n': [ - 'gyp', 'debug_bot', 'x86', 'v8_no_i18n'], 'gyp_debug_x86_vtunejit': [ 'gyp', 'debug_bot', 'x86', 'v8_enable_vtunejit'], 'gyp_full_debug_x86': [ 'gyp', 'debug', 'x86', 'goma', 'static', 'v8_enable_slow_dchecks', 'v8_full_debug'], - # Gyp release configs for arm. - 'gyp_release_arm': [ - 'gyp', 'release_bot', 'arm', 'crosscompile', 'hard_float', 'swarming'], - 'gyp_release_android_arm': [ - 'gyp', 'release_bot', 'arm', 'android', 'crosscompile', 'swarming'], - 'gyp_release_android_arm64': [ - 'gyp', 'release_bot', 'arm64', 'android', 'crosscompile', 'swarming'], - # Gyp release configs for mips. 'gyp_release_mips_no_snap_no_i18n': [ 'gyp', 'release', 'mips', 'crosscompile', 'static', 'v8_no_i18n', 'v8_snapshot_none'], # Gyp release configs for simulators. - 'gyp_release_simulate_arm': [ - 'gyp', 'release_bot', 'simulate_arm', 'swarming'], - 'gyp_release_simulate_arm_trybot': [ - 'gyp', 'release_trybot', 'simulate_arm', 'swarming'], - 'gyp_release_simulate_mipsel': [ - 'gyp', 'release_bot', 'simulate_mipsel', 'swarming'], - 'gyp_release_simulate_mips64el': [ - 'gyp', 'release_bot', 'simulate_mips64el', 'swarming'], 'gyp_release_simulate_ppc': [ 'gyp', 'release_bot', 'simulate_ppc', 'swarming'], 'gyp_release_simulate_ppc64': [ @@ -347,44 +381,21 @@ # Gyp release configs for x64. 'gyp_release_x64': [ 'gyp', 'release_bot', 'x64', 'swarming'], - 'gyp_release_x64_asan': [ - 'gyp', 'release_bot', 'x64', 'asan', 'lsan', 'swarming'], - 'gyp_release_x64_asan_minimal_symbols': [ - 'gyp', 'release_bot', 'x64', 'asan', 'lsan', 'minimal_symbols', - 'swarming'], 'gyp_release_x64_asan_minimal_symbols_coverage': [ 'gyp', 'release_bot', 'x64', 'asan', 'bb', 'coverage', 'lsan', 'minimal_symbols', 'swarming'], - 'gyp_release_x64_asan_symbolized_edge_verify_heap': [ - 'gyp', 'release_bot', 'x64', 'asan', 'edge', 'lsan', 'symbolized', - 'v8_verify_heap'], 'gyp_release_x64_cfi_symbolized': [ 'gyp', 'release_bot', 'x64', 'cfi', 'swarming', 'symbolized'], - 'gyp_release_x64_clang': [ - 'gyp', 'release_bot', 'x64', 'clang', 'swarming'], 'gyp_release_x64_gcc_coverage': [ 'gyp', 'release_bot', 'x64', 'coverage', 'gcc'], - 'gyp_release_x64_minimal_symbols': [ - 'gyp', 'release_bot', 'x64', 'minimal_symbols', 'swarming'], - 'gyp_release_x64_trybot': [ - 'gyp', 'release_trybot', 'x64', 'swarming'], # Gyp release configs for x86. 'gyp_release_x86_disassembler': [ 'gyp', 'release_bot', 'x86', 'v8_enable_disassembler'], 'gyp_release_x86_interpreted_regexp': [ 'gyp', 'release_bot', 'x86', 'v8_interpreted_regexp'], - 'gyp_release_x86_minimal_symbols': [ - 'gyp', 'release_bot', 'x86', 'minimal_symbols', 'swarming'], - 'gyp_release_x86_no_i18n_trybot': [ - 'gyp', 'release_trybot', 'x86', 'swarming', 'v8_no_i18n'], - 'gyp_release_x86_no_snap_shared_minimal_symbols': [ - 'gyp', 'release', 'x86', 'goma', 'minimal_symbols', 'shared', 'swarming', - 'v8_snapshot_none'], 'gyp_release_x86_predictable': [ 'gyp', 'release_bot', 'x86', 'v8_enable_verify_predictable'], - 'gyp_release_x86_trybot': [ - 'gyp', 'release_trybot', 'x86', 'swarming'], }, 'mixins': { @@ -505,6 +516,10 @@ 'use_prebuilt_instrumented_libraries=1'), }, + 'no_plugins': { + 'gn_args': 'clang_use_chrome_plugins=false', + }, + 'release': { 'gn_args': 'is_debug=false', }, @@ -533,7 +548,8 @@ }, 'simulate_mipsel': { - 'gn_args': 'target_cpu="x86" v8_target_cpu="mipsel"', + 'gn_args': + 'target_cpu="x86" v8_target_cpu="mipsel" mips_arch_variant="r2"', 'gyp_defines': 'target_arch=ia32 v8_target_arch=mipsel', }, @@ -577,9 +593,9 @@ 'gyp_defines': 'test_isolation_mode=prepare', }, - # TODO(machenbach): Remove the symbolized config after the bots are gone. + # TODO(machenbach): Remove the symbolized config after the bots are gone. 'symbolized': { - 'gn_args': 'symbolized=true', + 'gn_args': 'v8_no_inline=true', 'gyp_defines': 'release_extra_cflags="-fno-inline-functions -fno-inline"', }, @@ -595,8 +611,8 @@ }, 'v8_no_i18n': { - 'gn_args': 'v8_enable_i18n_support=false', - 'gyp_defines': 'v8_enable_i18n_support=0', + 'gn_args': 'v8_enable_i18n_support=false icu_use_data_file=false', + 'gyp_defines': 'v8_enable_i18n_support=0 icu_use_data_file_flag=0', }, 'v8_enable_disassembler': { diff --git a/deps/v8/src/api-arguments-inl.h b/deps/v8/src/api-arguments-inl.h index eefdf35adc0e1f..bf72fc4e6f44f5 100644 --- a/deps/v8/src/api-arguments-inl.h +++ b/deps/v8/src/api-arguments-inl.h @@ -20,8 +20,6 @@ namespace internal { Handle name) { \ Isolate* isolate = this->isolate(); \ RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::Function); \ - TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( \ - isolate, &tracing::TraceEventStatsTable::Function); \ VMState state(isolate); \ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \ PropertyCallbackInfo info(begin()); \ @@ -46,8 +44,6 @@ FOR_EACH_CALLBACK_TABLE_MAPPING_1_NAME(WRITE_CALL_1_NAME) uint32_t index) { \ Isolate* isolate = this->isolate(); \ RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::Function); \ - TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( \ - isolate, &tracing::TraceEventStatsTable::Function); \ VMState state(isolate); \ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \ PropertyCallbackInfo info(begin()); \ @@ -68,9 +64,6 @@ Handle PropertyCallbackArguments::Call( Isolate* isolate = this->isolate(); RuntimeCallTimerScope timer( isolate, &RuntimeCallStats::GenericNamedPropertySetterCallback); - TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( - isolate, - &tracing::TraceEventStatsTable::GenericNamedPropertySetterCallback); VMState state(isolate); ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); PropertyCallbackInfo info(begin()); @@ -80,14 +73,27 @@ Handle PropertyCallbackArguments::Call( return GetReturnValue(isolate); } +Handle PropertyCallbackArguments::Call( + GenericNamedPropertyDefinerCallback f, Handle name, + const v8::PropertyDescriptor& desc) { + Isolate* isolate = this->isolate(); + RuntimeCallTimerScope timer( + isolate, &RuntimeCallStats::GenericNamedPropertyDefinerCallback); + VMState state(isolate); + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); + PropertyCallbackInfo info(begin()); + LOG(isolate, + ApiNamedPropertyAccess("interceptor-named-define", holder(), *name)); + f(v8::Utils::ToLocal(name), desc, info); + return GetReturnValue(isolate); +} + Handle PropertyCallbackArguments::Call(IndexedPropertySetterCallback f, uint32_t index, Handle value) { Isolate* isolate = this->isolate(); RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::IndexedPropertySetterCallback); - TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( - isolate, &tracing::TraceEventStatsTable::IndexedPropertySetterCallback); VMState state(isolate); ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); PropertyCallbackInfo info(begin()); @@ -97,13 +103,26 @@ Handle PropertyCallbackArguments::Call(IndexedPropertySetterCallback f, return GetReturnValue(isolate); } +Handle PropertyCallbackArguments::Call( + IndexedPropertyDefinerCallback f, uint32_t index, + const v8::PropertyDescriptor& desc) { + Isolate* isolate = this->isolate(); + RuntimeCallTimerScope timer( + isolate, &RuntimeCallStats::IndexedPropertyDefinerCallback); + VMState state(isolate); + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); + PropertyCallbackInfo info(begin()); + LOG(isolate, + ApiIndexedPropertyAccess("interceptor-indexed-define", holder(), index)); + f(index, desc, info); + return GetReturnValue(isolate); +} + void PropertyCallbackArguments::Call(AccessorNameSetterCallback f, Handle name, Handle value) { Isolate* isolate = this->isolate(); RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::AccessorNameSetterCallback); - TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( - isolate, &tracing::TraceEventStatsTable::AccessorNameSetterCallback); VMState state(isolate); ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); PropertyCallbackInfo info(begin()); diff --git a/deps/v8/src/api-arguments.cc b/deps/v8/src/api-arguments.cc index 6e347c7b6217c2..f8d6c8fcc3ddda 100644 --- a/deps/v8/src/api-arguments.cc +++ b/deps/v8/src/api-arguments.cc @@ -13,8 +13,6 @@ namespace internal { Handle FunctionCallbackArguments::Call(FunctionCallback f) { Isolate* isolate = this->isolate(); RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::FunctionCallback); - TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( - isolate, &internal::tracing::TraceEventStatsTable::FunctionCallback); VMState state(isolate); ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); FunctionCallbackInfo info(begin(), argv_, argc_); @@ -26,8 +24,6 @@ Handle PropertyCallbackArguments::Call( IndexedPropertyEnumeratorCallback f) { Isolate* isolate = this->isolate(); RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::PropertyCallback); - TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( - isolate, &internal::tracing::TraceEventStatsTable::PropertyCallback); VMState state(isolate); ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); PropertyCallbackInfo info(begin()); diff --git a/deps/v8/src/api-arguments.h b/deps/v8/src/api-arguments.h index 0dfe61824a9821..9e01f3ae7db0ae 100644 --- a/deps/v8/src/api-arguments.h +++ b/deps/v8/src/api-arguments.h @@ -119,9 +119,16 @@ class PropertyCallbackArguments inline Handle Call(GenericNamedPropertySetterCallback f, Handle name, Handle value); + inline Handle Call(GenericNamedPropertyDefinerCallback f, + Handle name, + const v8::PropertyDescriptor& desc); + inline Handle Call(IndexedPropertySetterCallback f, uint32_t index, Handle value); + inline Handle Call(IndexedPropertyDefinerCallback f, uint32_t index, + const v8::PropertyDescriptor& desc); + inline void Call(AccessorNameSetterCallback f, Handle name, Handle value); diff --git a/deps/v8/src/api-natives.cc b/deps/v8/src/api-natives.cc index 0f3c3b69ed85fb..4bd823684897a3 100644 --- a/deps/v8/src/api-natives.cc +++ b/deps/v8/src/api-natives.cc @@ -199,15 +199,14 @@ MaybeHandle ConfigureInstance(Isolate* isolate, Handle obj, Handle array = isolate->factory()->NewFixedArray(max_number_of_properties); - info = *data; - while (info != nullptr) { + for (Handle temp(*data); *temp != nullptr; + temp = handle(temp->GetParent(isolate), isolate)) { // Accumulate accessors. - Object* maybe_properties = info->property_accessors(); + Object* maybe_properties = temp->property_accessors(); if (!maybe_properties->IsUndefined(isolate)) { valid_descriptors = AccessorInfo::AppendUnique( handle(maybe_properties, isolate), array, valid_descriptors); } - info = info->GetParent(isolate); } // Install accumulated accessors. diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index 6858a325c40a86..67b5b1ab20c589 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -24,6 +24,7 @@ #include "src/base/functional.h" #include "src/base/platform/platform.h" #include "src/base/platform/time.h" +#include "src/base/safe_conversions.h" #include "src/base/utils/random-number-generator.h" #include "src/bootstrapper.h" #include "src/char-predicates-inl.h" @@ -68,6 +69,7 @@ #include "src/unicode-inl.h" #include "src/v8.h" #include "src/v8threads.h" +#include "src/value-serializer.h" #include "src/version.h" #include "src/vm-state-inl.h" #include "src/wasm/wasm-module.h" @@ -77,9 +79,6 @@ namespace v8 { #define LOG_API(isolate, class_name, function_name) \ i::RuntimeCallTimerScope _runtime_timer( \ isolate, &i::RuntimeCallStats::API_##class_name##_##function_name); \ - TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( \ - isolate, &internal::tracing::TraceEventStatsTable:: \ - API_##class_name##_##function_name); \ LOG(isolate, ApiEntryCall("v8::" #class_name "::" #function_name)) #define ENTER_V8(isolate) i::VMState __state__((isolate)) @@ -105,6 +104,16 @@ namespace v8 { PREPARE_FOR_EXECUTION_GENERIC(isolate, context, class_name, function_name, \ bailout_value, HandleScopeClass, do_callback); +#define PREPARE_FOR_EXECUTION_WITH_CONTEXT_IN_RUNTIME_CALL_STATS_SCOPE( \ + category, name, context, class_name, function_name, bailout_value, \ + HandleScopeClass, do_callback) \ + auto isolate = context.IsEmpty() \ + ? i::Isolate::Current() \ + : reinterpret_cast(context->GetIsolate()); \ + TRACE_EVENT_CALL_STATS_SCOPED(isolate, category, name); \ + PREPARE_FOR_EXECUTION_GENERIC(isolate, context, class_name, function_name, \ + bailout_value, HandleScopeClass, do_callback); + #define PREPARE_FOR_EXECUTION_WITH_ISOLATE(isolate, class_name, function_name, \ T) \ PREPARE_FOR_EXECUTION_GENERIC(isolate, Local(), class_name, \ @@ -513,7 +522,8 @@ StartupData SnapshotCreator::CreateBlob( // If we don't do this then we end up with a stray root pointing at the // context even after we have disposed of the context. - isolate->heap()->CollectAllAvailableGarbage("mksnapshot"); + isolate->heap()->CollectAllAvailableGarbage( + i::GarbageCollectionReason::kSnapshotCreator); isolate->heap()->CompactWeakFixedArrays(); i::DisallowHeapAllocation no_gc_from_here_on; @@ -1503,12 +1513,17 @@ void ObjectTemplate::SetAccessor(v8::Local name, signature, i::FLAG_disable_old_api_accessors); } -template +template static i::Handle CreateInterceptorInfo( i::Isolate* isolate, Getter getter, Setter setter, Query query, - Deleter remover, Enumerator enumerator, Local data, - PropertyHandlerFlags flags) { + Descriptor descriptor, Deleter remover, Enumerator enumerator, + Definer definer, Local data, PropertyHandlerFlags flags) { + DCHECK(query == nullptr || + descriptor == nullptr); // Either intercept attributes or descriptor. + DCHECK(query == nullptr || + definer == + nullptr); // Only use descriptor callback with definer callback. auto obj = i::Handle::cast( isolate->factory()->NewStruct(i::INTERCEPTOR_INFO_TYPE)); obj->set_flags(0); @@ -1516,8 +1531,10 @@ static i::Handle CreateInterceptorInfo( if (getter != 0) SET_FIELD_WRAPPED(obj, set_getter, getter); if (setter != 0) SET_FIELD_WRAPPED(obj, set_setter, setter); if (query != 0) SET_FIELD_WRAPPED(obj, set_query, query); + if (descriptor != 0) SET_FIELD_WRAPPED(obj, set_descriptor, descriptor); if (remover != 0) SET_FIELD_WRAPPED(obj, set_deleter, remover); if (enumerator != 0) SET_FIELD_WRAPPED(obj, set_enumerator, enumerator); + if (definer != 0) SET_FIELD_WRAPPED(obj, set_definer, definer); obj->set_can_intercept_symbols( !(static_cast(flags) & static_cast(PropertyHandlerFlags::kOnlyInterceptStrings))); @@ -1533,40 +1550,37 @@ static i::Handle CreateInterceptorInfo( return obj; } -template -static void ObjectTemplateSetNamedPropertyHandler(ObjectTemplate* templ, - Getter getter, Setter setter, - Query query, Deleter remover, - Enumerator enumerator, - Local data, - PropertyHandlerFlags flags) { +template +static void ObjectTemplateSetNamedPropertyHandler( + ObjectTemplate* templ, Getter getter, Setter setter, Query query, + Descriptor descriptor, Deleter remover, Enumerator enumerator, + Definer definer, Local data, PropertyHandlerFlags flags) { i::Isolate* isolate = Utils::OpenHandle(templ)->GetIsolate(); ENTER_V8(isolate); i::HandleScope scope(isolate); auto cons = EnsureConstructor(isolate, templ); EnsureNotInstantiated(cons, "ObjectTemplateSetNamedPropertyHandler"); - auto obj = CreateInterceptorInfo(isolate, getter, setter, query, remover, - enumerator, data, flags); + auto obj = CreateInterceptorInfo(isolate, getter, setter, query, descriptor, + remover, enumerator, definer, data, flags); cons->set_named_property_handler(*obj); } - void ObjectTemplate::SetNamedPropertyHandler( NamedPropertyGetterCallback getter, NamedPropertySetterCallback setter, NamedPropertyQueryCallback query, NamedPropertyDeleterCallback remover, NamedPropertyEnumeratorCallback enumerator, Local data) { ObjectTemplateSetNamedPropertyHandler( - this, getter, setter, query, remover, enumerator, data, + this, getter, setter, query, nullptr, remover, enumerator, nullptr, data, PropertyHandlerFlags::kOnlyInterceptStrings); } - void ObjectTemplate::SetHandler( const NamedPropertyHandlerConfiguration& config) { ObjectTemplateSetNamedPropertyHandler( - this, config.getter, config.setter, config.query, config.deleter, - config.enumerator, config.data, config.flags); + this, config.getter, config.setter, config.query, config.descriptor, + config.deleter, config.enumerator, config.definer, config.data, + config.flags); } @@ -1626,13 +1640,14 @@ void ObjectTemplate::SetAccessCheckCallbackAndHandler( SET_FIELD_WRAPPED(info, set_callback, callback); auto named_interceptor = CreateInterceptorInfo( isolate, named_handler.getter, named_handler.setter, named_handler.query, - named_handler.deleter, named_handler.enumerator, named_handler.data, - named_handler.flags); + named_handler.descriptor, named_handler.deleter, named_handler.enumerator, + named_handler.definer, named_handler.data, named_handler.flags); info->set_named_interceptor(*named_interceptor); auto indexed_interceptor = CreateInterceptorInfo( isolate, indexed_handler.getter, indexed_handler.setter, - indexed_handler.query, indexed_handler.deleter, - indexed_handler.enumerator, indexed_handler.data, indexed_handler.flags); + indexed_handler.query, indexed_handler.descriptor, + indexed_handler.deleter, indexed_handler.enumerator, + indexed_handler.definer, indexed_handler.data, indexed_handler.flags); info->set_indexed_interceptor(*indexed_interceptor); if (data.IsEmpty()) { @@ -1651,9 +1666,10 @@ void ObjectTemplate::SetHandler( i::HandleScope scope(isolate); auto cons = EnsureConstructor(isolate, this); EnsureNotInstantiated(cons, "v8::ObjectTemplate::SetHandler"); - auto obj = CreateInterceptorInfo( - isolate, config.getter, config.setter, config.query, config.deleter, - config.enumerator, config.data, config.flags); + auto obj = CreateInterceptorInfo(isolate, config.getter, config.setter, + config.query, config.descriptor, + config.deleter, config.enumerator, + config.definer, config.data, config.flags); cons->set_indexed_property_handler(*obj); } @@ -1834,17 +1850,29 @@ Local UnboundScript::GetSourceMappingURL() { MaybeLocal Script::Run(Local context) { - PREPARE_FOR_EXECUTION_WITH_CALLBACK(context, Script, Run, Value) + PREPARE_FOR_EXECUTION_WITH_CONTEXT_IN_RUNTIME_CALL_STATS_SCOPE( + "v8", "V8.Execute", context, Script, Run, MaybeLocal(), + InternalEscapableScope, true); i::HistogramTimerScope execute_timer(isolate->counters()->execute(), true); i::AggregatingHistogramTimerScope timer(isolate->counters()->compile_lazy()); i::TimerEventScope timer_scope(isolate); - TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute"); auto fun = i::Handle::cast(Utils::OpenHandle(this)); - i::Handle receiver = isolate->global_proxy(); + + i::Handle receiver; Local result; - has_pending_exception = - !ToLocal(i::Execution::Call(isolate, fun, receiver, 0, NULL), - &result); + + if (fun->shared()->scope_info()->scope_type() == i::MODULE_SCOPE) { + receiver = isolate->factory()->undefined_value(); + i::Handle argv[] = { + handle(isolate->native_context()->current_module())}; + has_pending_exception = !ToLocal( + i::Execution::Call(isolate, fun, receiver, 1, argv), &result); + } else { + receiver = isolate->global_proxy(); + has_pending_exception = !ToLocal( + i::Execution::Call(isolate, fun, receiver, 0, nullptr), &result); + } + RETURN_ON_FAILED_EXECUTION(Value); RETURN_ESCAPED(result); } @@ -1985,7 +2013,34 @@ MaybeLocal