From b65f1ce278a333fe780a7835c148c736be3653b9 Mon Sep 17 00:00:00 2001 From: Chris Dickinson Date: Tue, 5 May 2015 13:48:55 -0700 Subject: [PATCH] deps: update v8 to 4.3.61.21 * @indutny's SealHandleScope patch (484bebc38319fc7c622478037922ad73b2edcbf9) has been cherry picked onto the top of V8 to make it compile. * There's some test breakage in contextify. * This was merged at the request of the TC. PR-URL: https://github.com/iojs/io.js/pull/1632 --- deps/v8/.gitignore | 1 + deps/v8/AUTHORS | 1 + deps/v8/BUILD.gn | 116 +- deps/v8/ChangeLog | 446 +++ deps/v8/DEPS | 19 +- deps/v8/Makefile | 3 +- deps/v8/Makefile.android | 8 +- deps/v8/PRESUBMIT.py | 1 + deps/v8/README.md | 6 +- deps/v8/build/android.gypi | 18 +- deps/v8/build/detect_v8_host_arch.py | 8 + deps/v8/build/features.gypi | 4 +- deps/v8/build/get_landmines.py | 1 + deps/v8/build/gyp_environment.py | 52 + deps/v8/build/gyp_v8 | 41 +- deps/v8/build/landmine_utils.py | 9 + deps/v8/build/landmines.py | 178 +- deps/v8/build/standalone.gypi | 89 +- deps/v8/build/toolchain.gypi | 13 + deps/v8/include/v8-debug.h | 15 +- deps/v8/include/v8-profiler.h | 33 +- deps/v8/include/v8-util.h | 138 +- deps/v8/include/v8-version.h | 6 +- deps/v8/include/v8.h | 1162 ++++-- deps/v8/include/v8config.h | 17 +- deps/v8/src/DEPS | 2 +- deps/v8/src/accessors.cc | 97 +- deps/v8/src/api-natives.cc | 6 +- deps/v8/src/api.cc | 3154 +++++++++-------- deps/v8/src/api.h | 12 + deps/v8/src/arm/assembler-arm-inl.h | 39 +- deps/v8/src/arm/assembler-arm.cc | 26 +- deps/v8/src/arm/assembler-arm.h | 11 +- deps/v8/src/arm/builtins-arm.cc | 226 +- deps/v8/src/arm/code-stubs-arm.cc | 392 +- deps/v8/src/arm/cpu-arm.cc | 13 + deps/v8/src/arm/debug-arm.cc | 42 +- deps/v8/src/arm/deoptimizer-arm.cc | 2 +- deps/v8/src/arm/disasm-arm.cc | 3 +- deps/v8/src/arm/frames-arm.h | 5 - deps/v8/src/arm/full-codegen-arm.cc | 215 +- deps/v8/src/arm/interface-descriptors-arm.cc | 6 + deps/v8/src/arm/lithium-arm.cc | 18 - deps/v8/src/arm/lithium-arm.h | 24 - deps/v8/src/arm/lithium-codegen-arm.cc | 145 +- deps/v8/src/arm/macro-assembler-arm.cc | 139 +- deps/v8/src/arm/macro-assembler-arm.h | 24 +- deps/v8/src/arm/simulator-arm.cc | 3 +- deps/v8/src/arm64/assembler-arm64-inl.h | 46 +- deps/v8/src/arm64/assembler-arm64.cc | 84 +- deps/v8/src/arm64/assembler-arm64.h | 23 +- deps/v8/src/arm64/builtins-arm64.cc | 237 +- deps/v8/src/arm64/code-stubs-arm64.cc | 395 ++- deps/v8/src/arm64/debug-arm64.cc | 41 +- deps/v8/src/arm64/deoptimizer-arm64.cc | 2 +- deps/v8/src/arm64/frames-arm64.h | 5 - deps/v8/src/arm64/full-codegen-arm64.cc | 226 +- deps/v8/src/arm64/instructions-arm64.cc | 22 + deps/v8/src/arm64/instructions-arm64.h | 41 +- .../src/arm64/interface-descriptors-arm64.cc | 9 + deps/v8/src/arm64/lithium-arm64.cc | 20 - deps/v8/src/arm64/lithium-arm64.h | 26 - deps/v8/src/arm64/lithium-codegen-arm64.cc | 201 +- deps/v8/src/arm64/lithium-codegen-arm64.h | 21 +- deps/v8/src/arm64/macro-assembler-arm64.cc | 155 +- deps/v8/src/arm64/macro-assembler-arm64.h | 37 +- deps/v8/src/array.js | 2 +- deps/v8/src/arraybuffer.js | 8 +- deps/v8/src/assembler.cc | 62 +- deps/v8/src/assembler.h | 31 +- deps/v8/src/ast-numbering.cc | 12 +- deps/v8/src/ast-value-factory.h | 66 +- deps/v8/src/ast.cc | 95 +- deps/v8/src/ast.h | 172 +- deps/v8/src/background-parsing-task.cc | 45 +- deps/v8/src/background-parsing-task.h | 13 +- deps/v8/src/bailout-reason.h | 15 +- deps/v8/src/base/bits.h | 13 + deps/v8/src/base/cpu.cc | 2 + deps/v8/src/base/logging.cc | 25 +- deps/v8/src/base/platform/platform-freebsd.cc | 6 +- deps/v8/src/base/platform/platform-posix.cc | 5 + deps/v8/src/base/platform/platform-win32.cc | 5 + deps/v8/src/base/platform/platform.h | 2 + deps/v8/src/bootstrapper.cc | 268 +- deps/v8/src/builtins.cc | 13 +- deps/v8/src/builtins.h | 6 + deps/v8/src/char-predicates-inl.h | 7 + deps/v8/src/char-predicates.h | 2 + deps/v8/src/code-factory.cc | 56 +- deps/v8/src/code-factory.h | 11 +- deps/v8/src/code-stubs-hydrogen.cc | 237 +- deps/v8/src/code-stubs.cc | 24 +- deps/v8/src/code-stubs.h | 66 +- deps/v8/src/codegen.cc | 38 +- deps/v8/src/collection.js | 41 +- deps/v8/src/compilation-cache.cc | 1 - deps/v8/src/compiler.cc | 579 ++- deps/v8/src/compiler.h | 390 +- deps/v8/src/compiler/access-builder.cc | 24 +- deps/v8/src/compiler/access-builder.h | 8 +- deps/v8/src/compiler/all-nodes.cc | 29 +- deps/v8/src/compiler/all-nodes.h | 21 +- .../v8/src/compiler/arm/code-generator-arm.cc | 83 +- .../src/compiler/arm/instruction-codes-arm.h | 14 +- .../compiler/arm/instruction-selector-arm.cc | 179 +- deps/v8/src/compiler/arm/linkage-arm.cc | 5 +- .../compiler/arm64/code-generator-arm64.cc | 130 +- .../compiler/arm64/instruction-codes-arm64.h | 32 +- .../arm64/instruction-selector-arm64.cc | 256 +- deps/v8/src/compiler/arm64/linkage-arm64.cc | 5 +- deps/v8/src/compiler/ast-graph-builder.cc | 644 +++- deps/v8/src/compiler/ast-graph-builder.h | 148 +- .../compiler/ast-loop-assignment-analyzer.cc | 1 + .../src/compiler/basic-block-instrumentor.cc | 3 +- deps/v8/src/compiler/change-lowering.cc | 221 +- deps/v8/src/compiler/change-lowering.h | 6 +- deps/v8/src/compiler/code-generator-impl.h | 32 +- deps/v8/src/compiler/code-generator.cc | 70 +- deps/v8/src/compiler/code-generator.h | 26 +- .../src/compiler/common-operator-reducer.cc | 124 +- .../v8/src/compiler/common-operator-reducer.h | 21 +- deps/v8/src/compiler/common-operator.cc | 166 +- deps/v8/src/compiler/common-operator.h | 8 +- deps/v8/src/compiler/control-builders.cc | 12 +- deps/v8/src/compiler/control-builders.h | 11 +- deps/v8/src/compiler/control-equivalence.h | 40 +- .../v8/src/compiler/control-flow-optimizer.cc | 189 +- deps/v8/src/compiler/control-flow-optimizer.h | 3 + deps/v8/src/compiler/control-reducer.cc | 160 +- deps/v8/src/compiler/generic-algorithm.h | 120 - deps/v8/src/compiler/graph-inl.h | 25 - deps/v8/src/compiler/graph-visualizer.cc | 36 +- .../src/compiler/ia32/code-generator-ia32.cc | 128 +- .../compiler/ia32/instruction-codes-ia32.h | 17 +- .../ia32/instruction-selector-ia32.cc | 223 +- deps/v8/src/compiler/ia32/linkage-ia32.cc | 5 +- deps/v8/src/compiler/instruction-codes.h | 1 + .../src/compiler/instruction-selector-impl.h | 20 +- deps/v8/src/compiler/instruction-selector.cc | 393 +- deps/v8/src/compiler/instruction-selector.h | 20 +- deps/v8/src/compiler/instruction.cc | 94 +- deps/v8/src/compiler/instruction.h | 217 +- deps/v8/src/compiler/js-builtin-reducer.cc | 66 - deps/v8/src/compiler/js-builtin-reducer.h | 4 - deps/v8/src/compiler/js-generic-lowering.cc | 101 +- deps/v8/src/compiler/js-generic-lowering.h | 22 +- deps/v8/src/compiler/js-graph.cc | 2 +- deps/v8/src/compiler/js-inlining.cc | 223 +- deps/v8/src/compiler/js-inlining.h | 20 +- deps/v8/src/compiler/js-intrinsic-lowering.cc | 241 +- deps/v8/src/compiler/js-intrinsic-lowering.h | 23 +- deps/v8/src/compiler/js-operator.cc | 47 +- deps/v8/src/compiler/js-operator.h | 3 +- deps/v8/src/compiler/js-type-feedback.cc | 256 ++ deps/v8/src/compiler/js-type-feedback.h | 91 + deps/v8/src/compiler/js-typed-lowering.cc | 387 +- deps/v8/src/compiler/js-typed-lowering.h | 2 +- deps/v8/src/compiler/jump-threading.cc | 42 +- deps/v8/src/compiler/jump-threading.h | 5 +- deps/v8/src/compiler/linkage-impl.h | 50 +- deps/v8/src/compiler/linkage.cc | 25 +- deps/v8/src/compiler/linkage.h | 5 +- deps/v8/src/compiler/liveness-analyzer.cc | 200 ++ deps/v8/src/compiler/liveness-analyzer.h | 146 + .../src/compiler/machine-operator-reducer.cc | 117 +- .../src/compiler/machine-operator-reducer.h | 3 + deps/v8/src/compiler/machine-operator.cc | 10 +- deps/v8/src/compiler/machine-operator.h | 42 +- .../src/compiler/mips/code-generator-mips.cc | 66 +- .../compiler/mips/instruction-codes-mips.h | 9 +- .../mips/instruction-selector-mips.cc | 154 +- deps/v8/src/compiler/mips/linkage-mips.cc | 5 +- .../compiler/mips64/code-generator-mips64.cc | 162 +- .../mips64/instruction-codes-mips64.h | 139 +- .../mips64/instruction-selector-mips64.cc | 204 +- deps/v8/src/compiler/mips64/linkage-mips64.cc | 5 +- deps/v8/src/compiler/move-optimizer.cc | 135 +- deps/v8/src/compiler/move-optimizer.h | 2 + deps/v8/src/compiler/node-matchers.cc | 17 + deps/v8/src/compiler/node-matchers.h | 30 + deps/v8/src/compiler/node-properties.cc | 64 +- deps/v8/src/compiler/node-properties.h | 21 +- deps/v8/src/compiler/node.cc | 62 +- deps/v8/src/compiler/node.h | 5 +- deps/v8/src/compiler/opcodes.h | 248 +- deps/v8/src/compiler/operator-properties.cc | 56 +- deps/v8/src/compiler/operator-properties.h | 7 +- deps/v8/src/compiler/operator.h | 8 + deps/v8/src/compiler/osr.cc | 154 +- deps/v8/src/compiler/pipeline.cc | 105 +- deps/v8/src/compiler/ppc/OWNERS | 3 + .../v8/src/compiler/ppc/code-generator-ppc.cc | 166 +- .../src/compiler/ppc/instruction-codes-ppc.h | 8 + .../compiler/ppc/instruction-selector-ppc.cc | 148 +- deps/v8/src/compiler/ppc/linkage-ppc.cc | 5 +- deps/v8/src/compiler/raw-machine-assembler.h | 33 +- .../compiler/register-allocator-verifier.cc | 23 +- .../compiler/register-allocator-verifier.h | 2 + deps/v8/src/compiler/register-allocator.cc | 359 +- deps/v8/src/compiler/register-allocator.h | 38 +- deps/v8/src/compiler/schedule.cc | 48 +- deps/v8/src/compiler/schedule.h | 53 +- deps/v8/src/compiler/scheduler.cc | 284 +- deps/v8/src/compiler/simplified-lowering.cc | 305 +- .../compiler/simplified-operator-reducer.cc | 35 - .../compiler/simplified-operator-reducer.h | 4 - deps/v8/src/compiler/simplified-operator.cc | 1 - deps/v8/src/compiler/simplified-operator.h | 2 - deps/v8/src/compiler/state-values-utils.cc | 317 ++ deps/v8/src/compiler/state-values-utils.h | 120 + deps/v8/src/compiler/typer.cc | 195 +- deps/v8/src/compiler/typer.h | 3 - deps/v8/src/compiler/verifier.cc | 72 +- .../v8/src/compiler/x64/code-generator-x64.cc | 157 +- .../src/compiler/x64/instruction-codes-x64.h | 17 +- .../compiler/x64/instruction-selector-x64.cc | 291 +- deps/v8/src/compiler/x64/linkage-x64.cc | 5 +- deps/v8/src/contexts.cc | 25 +- deps/v8/src/contexts.h | 29 +- deps/v8/src/conversions.cc | 51 + deps/v8/src/conversions.h | 2 + deps/v8/src/counters.h | 69 +- deps/v8/src/cpu-profiler-inl.h | 10 +- deps/v8/src/cpu-profiler.cc | 40 +- deps/v8/src/cpu-profiler.h | 20 +- deps/v8/src/d8.cc | 36 +- deps/v8/src/date.js | 161 +- deps/v8/src/debug-debugger.js | 25 +- deps/v8/src/debug.cc | 603 ++-- deps/v8/src/debug.h | 219 +- deps/v8/src/deoptimizer.cc | 34 +- deps/v8/src/deoptimizer.h | 34 +- deps/v8/src/disassembler.cc | 28 +- deps/v8/src/elements.cc | 4 +- deps/v8/src/execution.cc | 23 +- deps/v8/src/execution.h | 4 + .../v8/src/extensions/statistics-extension.cc | 5 - deps/v8/src/factory.cc | 163 +- deps/v8/src/factory.h | 62 +- deps/v8/src/flag-definitions.h | 103 +- deps/v8/src/flags.cc | 23 +- deps/v8/src/flags.h | 3 +- deps/v8/src/frames-inl.h | 52 - deps/v8/src/frames.cc | 171 +- deps/v8/src/frames.h | 84 +- deps/v8/src/full-codegen.cc | 128 +- deps/v8/src/full-codegen.h | 118 +- deps/v8/src/gdb-jit.cc | 350 +- deps/v8/src/gdb-jit.h | 61 +- deps/v8/src/global-handles.cc | 141 +- deps/v8/src/global-handles.h | 29 +- deps/v8/src/globals.h | 73 +- deps/v8/src/harmony-array.js | 2 +- deps/v8/src/harmony-reflect.js | 18 + deps/v8/src/harmony-string.js | 194 - deps/v8/src/harmony-tostring.js | 3 +- deps/v8/src/heap-profiler.cc | 17 +- deps/v8/src/heap-profiler.h | 9 +- deps/v8/src/heap-snapshot-generator.cc | 124 +- deps/v8/src/heap-snapshot-generator.h | 31 +- deps/v8/src/heap/gc-idle-time-handler.cc | 63 +- deps/v8/src/heap/gc-idle-time-handler.h | 30 +- deps/v8/src/heap/heap-inl.h | 23 +- deps/v8/src/heap/heap.cc | 564 ++- deps/v8/src/heap/heap.h | 104 +- deps/v8/src/heap/incremental-marking.cc | 82 +- deps/v8/src/heap/incremental-marking.h | 18 +- deps/v8/src/heap/mark-compact.cc | 607 +++- deps/v8/src/heap/mark-compact.h | 38 +- deps/v8/src/heap/objects-visiting-inl.h | 31 +- deps/v8/src/heap/objects-visiting.cc | 82 +- deps/v8/src/heap/objects-visiting.h | 6 +- deps/v8/src/heap/spaces.cc | 47 +- deps/v8/src/heap/spaces.h | 32 +- deps/v8/src/heap/store-buffer-inl.h | 8 - deps/v8/src/heap/store-buffer.cc | 192 +- deps/v8/src/heap/store-buffer.h | 37 +- deps/v8/src/hydrogen-bce.cc | 2 +- deps/v8/src/hydrogen-gvn.cc | 41 +- deps/v8/src/hydrogen-gvn.h | 4 +- deps/v8/src/hydrogen-instructions.cc | 66 +- deps/v8/src/hydrogen-instructions.h | 183 +- .../v8/src/hydrogen-representation-changes.cc | 2 +- deps/v8/src/hydrogen.cc | 537 ++- deps/v8/src/hydrogen.h | 332 +- deps/v8/src/i18n.cc | 24 +- deps/v8/src/i18n.js | 141 +- deps/v8/src/ia32/assembler-ia32-inl.h | 29 +- deps/v8/src/ia32/assembler-ia32.cc | 47 +- deps/v8/src/ia32/assembler-ia32.h | 44 +- deps/v8/src/ia32/builtins-ia32.cc | 266 +- deps/v8/src/ia32/code-stubs-ia32.cc | 371 +- deps/v8/src/ia32/debug-ia32.cc | 73 +- deps/v8/src/ia32/deoptimizer-ia32.cc | 2 +- deps/v8/src/ia32/disasm-ia32.cc | 30 + deps/v8/src/ia32/frames-ia32.h | 5 - deps/v8/src/ia32/full-codegen-ia32.cc | 212 +- .../v8/src/ia32/interface-descriptors-ia32.cc | 6 + deps/v8/src/ia32/lithium-codegen-ia32.cc | 148 +- deps/v8/src/ia32/lithium-ia32.cc | 15 - deps/v8/src/ia32/lithium-ia32.h | 22 - deps/v8/src/ia32/macro-assembler-ia32.cc | 191 +- deps/v8/src/ia32/macro-assembler-ia32.h | 32 +- deps/v8/src/ic/arm/handler-compiler-arm.cc | 45 +- .../v8/src/ic/arm64/handler-compiler-arm64.cc | 46 +- deps/v8/src/ic/handler-compiler.cc | 33 +- deps/v8/src/ic/ia32/handler-compiler-ia32.cc | 39 +- deps/v8/src/ic/ic-compiler.cc | 11 + deps/v8/src/ic/ic-compiler.h | 1 + deps/v8/src/ic/ic-state.cc | 38 +- deps/v8/src/ic/ic-state.h | 1 + deps/v8/src/ic/ic.cc | 187 +- deps/v8/src/ic/ic.h | 19 +- deps/v8/src/ic/mips/handler-compiler-mips.cc | 45 +- .../src/ic/mips64/handler-compiler-mips64.cc | 45 +- deps/v8/src/ic/mips64/ic-mips64.cc | 4 +- deps/v8/src/ic/ppc/OWNERS | 3 + deps/v8/src/ic/ppc/handler-compiler-ppc.cc | 81 +- deps/v8/src/ic/ppc/ic-compiler-ppc.cc | 16 +- deps/v8/src/ic/stub-cache.cc | 4 +- deps/v8/src/ic/x64/handler-compiler-x64.cc | 40 +- deps/v8/src/ic/x87/handler-compiler-x87.cc | 39 +- deps/v8/src/interface-descriptors.h | 7 + deps/v8/src/isolate.cc | 786 ++-- deps/v8/src/isolate.h | 162 +- deps/v8/src/json-parser.h | 73 +- deps/v8/src/json-stringifier.h | 5 +- deps/v8/src/json.js | 2 +- deps/v8/src/jsregexp.cc | 6 +- deps/v8/src/layout-descriptor-inl.h | 84 +- deps/v8/src/layout-descriptor.cc | 93 +- deps/v8/src/layout-descriptor.h | 24 +- deps/v8/src/lithium-codegen.cc | 11 +- deps/v8/src/lithium-codegen.h | 2 + deps/v8/src/lithium.cc | 5 +- deps/v8/src/liveedit.cc | 18 +- deps/v8/src/log.cc | 47 +- deps/v8/src/log.h | 6 +- deps/v8/src/lookup-inl.h | 41 +- deps/v8/src/lookup.cc | 112 +- deps/v8/src/lookup.h | 54 +- deps/v8/src/macros.py | 6 +- deps/v8/src/math.js | 250 +- deps/v8/src/messages.js | 110 +- deps/v8/src/mips/assembler-mips-inl.h | 87 +- deps/v8/src/mips/assembler-mips.cc | 40 +- deps/v8/src/mips/assembler-mips.h | 18 +- deps/v8/src/mips/builtins-mips.cc | 229 +- deps/v8/src/mips/code-stubs-mips.cc | 400 ++- deps/v8/src/mips/debug-mips.cc | 42 +- deps/v8/src/mips/deoptimizer-mips.cc | 2 +- deps/v8/src/mips/frames-mips.h | 5 - deps/v8/src/mips/full-codegen-mips.cc | 213 +- .../v8/src/mips/interface-descriptors-mips.cc | 6 + deps/v8/src/mips/lithium-codegen-mips.cc | 144 +- deps/v8/src/mips/lithium-mips.cc | 18 - deps/v8/src/mips/lithium-mips.h | 24 - deps/v8/src/mips/macro-assembler-mips.cc | 158 +- deps/v8/src/mips/macro-assembler-mips.h | 30 +- deps/v8/src/mips/simulator-mips.cc | 4 +- deps/v8/src/mips64/assembler-mips64-inl.h | 94 +- deps/v8/src/mips64/assembler-mips64.cc | 42 +- deps/v8/src/mips64/assembler-mips64.h | 31 +- deps/v8/src/mips64/builtins-mips64.cc | 229 +- deps/v8/src/mips64/code-stubs-mips64.cc | 402 ++- deps/v8/src/mips64/debug-mips64.cc | 42 +- deps/v8/src/mips64/deoptimizer-mips64.cc | 75 +- deps/v8/src/mips64/frames-mips64.h | 5 - deps/v8/src/mips64/full-codegen-mips64.cc | 211 +- .../mips64/interface-descriptors-mips64.cc | 6 + deps/v8/src/mips64/lithium-codegen-mips64.cc | 154 +- deps/v8/src/mips64/lithium-mips64.cc | 18 - deps/v8/src/mips64/lithium-mips64.h | 24 - deps/v8/src/mips64/macro-assembler-mips64.cc | 242 +- deps/v8/src/mips64/macro-assembler-mips64.h | 35 +- deps/v8/src/mips64/simulator-mips64.cc | 18 +- deps/v8/src/mirror-debugger.js | 2 +- deps/v8/src/modules.cc | 33 +- deps/v8/src/modules.h | 12 +- deps/v8/src/object-observe.js | 2 +- deps/v8/src/objects-debug.cc | 35 +- deps/v8/src/objects-inl.h | 375 +- deps/v8/src/objects-printer.cc | 38 +- deps/v8/src/objects.cc | 1700 ++++----- deps/v8/src/objects.h | 460 ++- deps/v8/src/optimizing-compiler-thread.cc | 109 +- deps/v8/src/optimizing-compiler-thread.h | 16 +- deps/v8/src/parser.cc | 850 +++-- deps/v8/src/parser.h | 261 +- .../src/pending-compilation-error-handler.cc | 64 + .../src/pending-compilation-error-handler.h | 91 + deps/v8/src/ppc/OWNERS | 3 + deps/v8/src/ppc/assembler-ppc-inl.h | 172 +- deps/v8/src/ppc/assembler-ppc.cc | 747 ++-- deps/v8/src/ppc/assembler-ppc.h | 220 +- deps/v8/src/ppc/builtins-ppc.cc | 298 +- deps/v8/src/ppc/code-stubs-ppc.cc | 538 ++- deps/v8/src/ppc/codegen-ppc.cc | 6 +- deps/v8/src/ppc/debug-ppc.cc | 47 +- deps/v8/src/ppc/deoptimizer-ppc.cc | 10 +- deps/v8/src/ppc/disasm-ppc.cc | 9 + deps/v8/src/ppc/frames-ppc.cc | 16 - deps/v8/src/ppc/frames-ppc.h | 15 - deps/v8/src/ppc/full-codegen-ppc.cc | 342 +- deps/v8/src/ppc/interface-descriptors-ppc.cc | 6 + deps/v8/src/ppc/lithium-codegen-ppc.cc | 193 +- deps/v8/src/ppc/lithium-ppc.cc | 23 +- deps/v8/src/ppc/lithium-ppc.h | 32 +- deps/v8/src/ppc/macro-assembler-ppc.cc | 354 +- deps/v8/src/ppc/macro-assembler-ppc.h | 45 +- deps/v8/src/ppc/simulator-ppc.cc | 22 +- deps/v8/src/preparse-data-format.h | 2 +- deps/v8/src/preparse-data.cc | 11 +- deps/v8/src/preparse-data.h | 63 +- deps/v8/src/preparser.cc | 62 +- deps/v8/src/preparser.h | 219 +- deps/v8/src/prettyprinter.cc | 5 +- deps/v8/src/profile-generator-inl.h | 9 +- deps/v8/src/profile-generator.cc | 236 +- deps/v8/src/profile-generator.h | 118 +- deps/v8/src/promise.js | 61 +- deps/v8/src/property-details.h | 53 +- deps/v8/src/property.h | 10 +- deps/v8/src/regexp.js | 317 +- deps/v8/src/rewriter.cc | 7 +- deps/v8/src/rewriter.h | 4 +- deps/v8/src/runtime.js | 102 +- deps/v8/src/runtime/runtime-array.cc | 32 +- deps/v8/src/runtime/runtime-classes.cc | 50 +- deps/v8/src/runtime/runtime-compiler.cc | 1 - deps/v8/src/runtime/runtime-date.cc | 3 +- deps/v8/src/runtime/runtime-debug.cc | 202 +- deps/v8/src/runtime/runtime-function.cc | 11 +- deps/v8/src/runtime/runtime-generator.cc | 37 +- deps/v8/src/runtime/runtime-internal.cc | 55 +- deps/v8/src/runtime/runtime-literals.cc | 12 +- deps/v8/src/runtime/runtime-liveedit.cc | 5 +- deps/v8/src/runtime/runtime-maths.cc | 32 +- deps/v8/src/runtime/runtime-numbers.cc | 6 +- deps/v8/src/runtime/runtime-object.cc | 108 +- deps/v8/src/runtime/runtime-proxy.cc | 2 +- deps/v8/src/runtime/runtime-regexp.cc | 35 +- deps/v8/src/runtime/runtime-scopes.cc | 55 +- deps/v8/src/runtime/runtime-strings.cc | 100 +- deps/v8/src/runtime/runtime-test.cc | 61 +- deps/v8/src/runtime/runtime-typedarray.cc | 52 +- deps/v8/src/runtime/runtime.cc | 42 +- deps/v8/src/runtime/runtime.h | 466 +-- deps/v8/src/scanner.cc | 253 +- deps/v8/src/scanner.h | 35 +- deps/v8/src/scopeinfo.cc | 95 +- deps/v8/src/scopes.cc | 185 +- deps/v8/src/scopes.h | 73 +- deps/v8/src/snapshot/DEPS | 5 + deps/v8/src/{ => snapshot}/mksnapshot.cc | 21 +- .../v8/src/{ => snapshot}/natives-external.cc | 45 +- deps/v8/src/{ => snapshot}/natives.h | 2 + deps/v8/src/{ => snapshot}/serialize.cc | 948 +++-- deps/v8/src/{ => snapshot}/serialize.h | 376 +- deps/v8/src/{ => snapshot}/snapshot-common.cc | 63 +- deps/v8/src/{ => snapshot}/snapshot-empty.cc | 8 +- .../src/{ => snapshot}/snapshot-external.cc | 10 +- .../{ => snapshot}/snapshot-source-sink.cc | 16 +- .../src/{ => snapshot}/snapshot-source-sink.h | 12 +- deps/v8/src/{ => snapshot}/snapshot.h | 14 +- deps/v8/src/string-iterator.js | 52 +- deps/v8/src/string.js | 387 +- deps/v8/src/strings-storage.cc | 123 + deps/v8/src/strings-storage.h | 47 + deps/v8/src/symbol.js | 100 +- .../{harmony-templates.js => templates.js} | 34 - deps/v8/src/third_party/fdlibm/fdlibm.js | 90 +- deps/v8/src/token.h | 3 +- deps/v8/src/transitions-inl.h | 117 +- deps/v8/src/transitions.cc | 523 ++- deps/v8/src/transitions.h | 298 +- deps/v8/src/type-feedback-vector.cc | 224 +- deps/v8/src/type-feedback-vector.h | 83 +- deps/v8/src/type-info.cc | 73 +- deps/v8/src/type-info.h | 24 +- deps/v8/src/typedarray.js | 8 +- deps/v8/src/types.cc | 17 +- deps/v8/src/types.h | 3 +- deps/v8/src/typing.cc | 22 +- deps/v8/src/unique.h | 7 +- deps/v8/src/utils.h | 2 +- deps/v8/src/v8.cc | 6 +- deps/v8/src/v8natives.js | 73 +- deps/v8/src/variables.cc | 8 +- deps/v8/src/variables.h | 36 +- deps/v8/src/weak-collection.js | 67 +- deps/v8/src/x64/assembler-x64-inl.h | 29 +- deps/v8/src/x64/assembler-x64.cc | 171 +- deps/v8/src/x64/assembler-x64.h | 53 +- deps/v8/src/x64/builtins-x64.cc | 242 +- deps/v8/src/x64/code-stubs-x64.cc | 364 +- deps/v8/src/x64/debug-x64.cc | 69 +- deps/v8/src/x64/deoptimizer-x64.cc | 3 +- deps/v8/src/x64/disasm-x64.cc | 35 +- deps/v8/src/x64/frames-x64.h | 9 - deps/v8/src/x64/full-codegen-x64.cc | 203 +- deps/v8/src/x64/interface-descriptors-x64.cc | 6 + deps/v8/src/x64/lithium-codegen-x64.cc | 154 +- deps/v8/src/x64/lithium-x64.cc | 18 - deps/v8/src/x64/lithium-x64.h | 24 - deps/v8/src/x64/macro-assembler-x64.cc | 392 +- deps/v8/src/x64/macro-assembler-x64.h | 50 +- deps/v8/src/x64/regexp-macro-assembler-x64.cc | 8 +- deps/v8/src/x87/assembler-x87-inl.h | 29 +- deps/v8/src/x87/assembler-x87.cc | 14 +- deps/v8/src/x87/assembler-x87.h | 9 +- deps/v8/src/x87/builtins-x87.cc | 266 +- deps/v8/src/x87/code-stubs-x87.cc | 381 +- deps/v8/src/x87/debug-x87.cc | 72 +- deps/v8/src/x87/deoptimizer-x87.cc | 2 +- deps/v8/src/x87/frames-x87.h | 5 - deps/v8/src/x87/full-codegen-x87.cc | 211 +- deps/v8/src/x87/interface-descriptors-x87.cc | 6 + deps/v8/src/x87/lithium-codegen-x87.cc | 151 +- deps/v8/src/x87/lithium-x87.cc | 15 - deps/v8/src/x87/lithium-x87.h | 22 - deps/v8/src/x87/macro-assembler-x87.cc | 156 +- deps/v8/src/x87/macro-assembler-x87.h | 25 +- deps/v8/test/cctest/cctest.gyp | 6 + deps/v8/test/cctest/cctest.h | 3 + deps/v8/test/cctest/cctest.status | 73 +- deps/v8/test/cctest/compiler/call-tester.h | 15 + .../v8/test/cctest/compiler/function-tester.h | 22 +- .../compiler/simplified-graph-builder.cc | 2 +- .../cctest/compiler/test-codegen-deopt.cc | 28 +- .../cctest/compiler/test-control-reducer.cc | 53 +- .../test/cctest/compiler/test-instruction.cc | 55 +- .../cctest/compiler/test-js-typed-lowering.cc | 85 +- .../cctest/compiler/test-jump-threading.cc | 16 +- deps/v8/test/cctest/compiler/test-linkage.cc | 23 +- .../compiler/test-loop-assignment-analysis.cc | 11 +- .../compiler/test-machine-operator-reducer.cc | 1 - .../cctest/compiler/test-node-algorithm.cc | 40 - deps/v8/test/cctest/compiler/test-node.cc | 627 ++-- deps/v8/test/cctest/compiler/test-osr.cc | 111 +- deps/v8/test/cctest/compiler/test-pipeline.cc | 8 +- .../test/cctest/compiler/test-run-inlining.cc | 99 +- .../cctest/compiler/test-run-intrinsics.cc | 279 +- .../cctest/compiler/test-run-jsexceptions.cc | 139 +- .../v8/test/cctest/compiler/test-run-jsops.cc | 2 - .../test/cctest/compiler/test-run-machops.cc | 104 +- .../v8/test/cctest/compiler/test-run-stubs.cc | 106 + .../cctest/compiler/test-run-variables.cc | 1 - .../compiler/test-simplified-lowering.cc | 107 +- deps/v8/test/cctest/test-accessors.cc | 83 + deps/v8/test/cctest/test-alloc.cc | 4 +- deps/v8/test/cctest/test-api-interceptors.cc | 239 +- deps/v8/test/cctest/test-api.cc | 1068 +++--- deps/v8/test/cctest/test-array-list.cc | 41 + deps/v8/test/cctest/test-assembler-arm64.cc | 170 + deps/v8/test/cctest/test-assembler-ia32.cc | 1 - deps/v8/test/cctest/test-assembler-mips64.cc | 4 +- deps/v8/test/cctest/test-assembler-x64.cc | 1 - deps/v8/test/cctest/test-assembler-x87.cc | 1 - deps/v8/test/cctest/test-compiler.cc | 2 +- deps/v8/test/cctest/test-constantpool.cc | 3 +- deps/v8/test/cctest/test-conversions.cc | 55 + deps/v8/test/cctest/test-cpu-profiler.cc | 519 ++- deps/v8/test/cctest/test-date.cc | 1 - deps/v8/test/cctest/test-debug.cc | 61 +- deps/v8/test/cctest/test-decls.cc | 117 +- deps/v8/test/cctest/test-disasm-arm.cc | 1 - deps/v8/test/cctest/test-disasm-ia32.cc | 14 +- deps/v8/test/cctest/test-disasm-mips.cc | 1 - deps/v8/test/cctest/test-disasm-mips64.cc | 1 - deps/v8/test/cctest/test-disasm-ppc.cc | 1 - deps/v8/test/cctest/test-disasm-x64.cc | 21 +- deps/v8/test/cctest/test-disasm-x87.cc | 1 - deps/v8/test/cctest/test-feedback-vector.cc | 59 +- .../test/cctest/test-func-name-inference.cc | 8 +- deps/v8/test/cctest/test-heap-profiler.cc | 224 +- deps/v8/test/cctest/test-heap.cc | 344 +- deps/v8/test/cctest/test-javascript-arm64.cc | 1 - .../v8/test/cctest/test-js-arm64-variables.cc | 1 - deps/v8/test/cctest/test-lockers.cc | 1 - deps/v8/test/cctest/test-log.cc | 2 +- .../test/cctest/test-macro-assembler-ia32.cc | 1 - .../test/cctest/test-macro-assembler-x64.cc | 35 - .../test/cctest/test-macro-assembler-x87.cc | 1 - deps/v8/test/cctest/test-mark-compact.cc | 11 +- deps/v8/test/cctest/test-mementos.cc | 17 + deps/v8/test/cctest/test-migrations.cc | 232 +- deps/v8/test/cctest/test-parsing.cc | 536 ++- deps/v8/test/cctest/test-serialize.cc | 975 ++--- deps/v8/test/cctest/test-spaces.cc | 30 +- deps/v8/test/cctest/test-strings.cc | 2 +- .../v8/test/cctest/test-thread-termination.cc | 65 + deps/v8/test/cctest/test-transitions.cc | 197 +- deps/v8/test/cctest/test-typedarrays.cc | 81 + deps/v8/test/cctest/test-unboxed-doubles.cc | 470 ++- deps/v8/test/cctest/test-weakmaps.cc | 7 +- deps/v8/test/cctest/test-weaksets.cc | 7 +- deps/v8/test/cctest/test-weaktypedarrays.cc | 61 +- deps/v8/test/js-perf-test/JSTests.json | 2 - .../class-constructor-accessor.js} | 9 +- .../message/class-constructor-accessor.out | 7 + .../message/class-constructor-generator.js | 10 + .../message/class-constructor-generator.out | 7 + deps/v8/test/message/export-duplicate-as.js | 9 + deps/v8/test/message/export-duplicate-as.out | 7 + .../test/message/export-duplicate-default.js | 8 + .../test/message/export-duplicate-default.out | 7 + deps/v8/test/message/export-duplicate.js | 9 + deps/v8/test/message/export-duplicate.out | 7 + deps/v8/test/message/import-as-eval.js | 7 + deps/v8/test/message/import-as-eval.out | 7 + .../test/message/import-as-redeclaration.js | 8 + .../test/message/import-as-redeclaration.out | 7 + .../test/message/import-as-reserved-word.js | 7 + .../test/message/import-as-reserved-word.out | 7 + deps/v8/test/message/import-eval.js | 7 + deps/v8/test/message/import-eval.out | 7 + deps/v8/test/message/import-redeclaration.js | 8 + deps/v8/test/message/import-redeclaration.out | 7 + deps/v8/test/message/import-reserved-word.js | 7 + deps/v8/test/message/import-reserved-word.out | 7 + deps/v8/test/message/testcfg.py | 3 + deps/v8/test/message/unterminated-arg-list.js | 7 + .../v8/test/message/unterminated-arg-list.out | 8 + deps/v8/test/mjsunit/asm/construct-double.js | 33 + deps/v8/test/mjsunit/asm/double-hi.js | 40 + deps/v8/test/mjsunit/asm/double-lo.js | 40 + deps/v8/test/mjsunit/asm/if-cloning.js | 34 + deps/v8/test/mjsunit/asm/math-clz32.js | 31 + .../mjsunit/bugs/harmony/debug-blockscopes.js | 2 +- .../mjsunit/compiler/deopt-tonumber-binop.js | 40 + .../mjsunit/compiler/eager-deopt-simple.js | 18 + .../test/mjsunit/compiler/osr-forin-nested.js | 35 + deps/v8/test/mjsunit/compiler/osr-infinite.js | 78 + deps/v8/test/mjsunit/compiler/osr-labeled.js | 47 + .../mjsunit/compiler/osr-literals-adapted.js | 56 + deps/v8/test/mjsunit/compiler/osr-literals.js | 56 + .../test/mjsunit/compiler/regress-463056.js | 9 + .../test/mjsunit/compiler/regress-468727.js | 16 + .../test/mjsunit/compiler/regress-469089.js | 16 + .../compiler/truncating-store-deopt.js | 28 + deps/v8/test/mjsunit/compiler/try-deopt.js | 56 + deps/v8/test/mjsunit/constant-folding-2.js | 2 +- .../mjsunit/debug-allscopes-on-debugger.js | 58 + .../mjsunit/debug-liveedit-check-stack.js | 6 +- deps/v8/test/mjsunit/debug-references.js | 5 +- deps/v8/test/mjsunit/debug-scopes.js | 24 + .../test/mjsunit/debug-set-variable-value.js | 15 +- deps/v8/test/mjsunit/debug-sourceinfo.js | 618 ++-- deps/v8/test/mjsunit/debug-step-turbofan.js | 2 +- .../test/mjsunit/debug-stepframe-clearing.js | 97 + deps/v8/test/mjsunit/debug-stepin-foreach.js | 8 +- .../{harmony => es6}/block-conflicts.js | 2 - .../v8/test/mjsunit/es6/block-const-assign.js | 160 + .../{harmony => es6}/block-early-errors.js | 2 - .../mjsunit/{harmony => es6}/block-for.js | 5 +- .../mjsunit/{harmony => es6}/block-leave.js | 2 - .../{harmony => es6}/block-let-crankshaft.js | 2 +- .../{harmony => es6}/block-let-declaration.js | 26 +- .../{harmony => es6}/block-let-semantics.js | 2 - .../block-non-strict-errors.js | 2 +- .../mjsunit/{harmony => es6}/block-scoping.js | 8 +- deps/v8/test/mjsunit/es6/collections.js | 122 +- .../{harmony => es6}/debug-blockscopes.js | 2 +- .../debug-evaluate-blockscopes.js | 2 +- .../{harmony => es6}/debug-function-scopes.js | 2 +- .../resolve-after-aborted-try-finally.js | 32 + .../debug-promises/resolve-after-try-catch.js | 29 + .../debug-promises/rethrow-in-try-finally.js | 30 + .../test/mjsunit/es6/debug-stepin-promises.js | 65 + .../mjsunit/{harmony => es6}/empty-for.js | 2 - .../es6/function-length-configurable.js | 119 + .../mjsunit/es6/function-name-configurable.js | 115 + .../mjsunit/es6/generators-debug-liveedit.js | 4 +- .../v8/test/mjsunit/es6/generators-objects.js | 2 +- .../mjsunit/es6/indexed-integer-exotics.js | 63 + .../test/mjsunit/es6/iteration-semantics.js | 32 +- deps/v8/test/mjsunit/es6/iteration-syntax.js | 2 - deps/v8/test/mjsunit/es6/map-minus-zero.js | 51 + deps/v8/test/mjsunit/es6/promises.js | 200 +- .../{harmony => es6}/regress/regress-2243.js | 2 - .../{harmony => es6}/regress/regress-2322.js | 2 - .../mjsunit/{ => es6}/regress/regress-2506.js | 2 - .../{harmony => es6}/regress/regress-2858.js | 2 - .../{harmony => es6}/regress/regress-3426.js | 2 - .../{ => es6}/regress/regress-347906.js | 2 +- .../{harmony => es6}/regress/regress-3683.js | 2 - .../{harmony => es6}/regress/regress-3741.js | 2 +- .../test/mjsunit/es6/regress/regress-3938.js | 8 + .../{ => es6}/regress/regress-411237.js | 2 +- .../mjsunit/es6/regress/regress-468661.js | 75 + .../mjsunit/es6/regress/regress-474783.js | 24 + deps/v8/test/mjsunit/es6/set-minus-zero.js | 51 + .../{harmony => es6}/string-codepointat.js | 2 - .../{harmony => es6}/string-endswith.js | 2 - .../{harmony => es6}/string-fromcodepoint.js | 2 - .../{harmony => es6}/string-includes.js | 2 - .../mjsunit/{harmony => es6}/string-raw.js | 38 +- .../mjsunit/{harmony => es6}/string-repeat.js | 2 - .../{harmony => es6}/string-startswith.js | 2 - deps/v8/test/mjsunit/es6/symbols.js | 5 - .../mjsunit/{harmony => es6}/templates.js | 165 +- deps/v8/test/mjsunit/es7/object-observe.js | 67 +- .../test/mjsunit/function-length-accessor.js | 2 +- deps/v8/test/mjsunit/function-prototype.js | 3 + .../mjsunit/harmony/block-const-assign.js | 137 - .../computed-property-names-classes.js | 131 +- .../harmony/computed-property-names.js | 23 + .../v8/test/mjsunit/harmony/module-linking.js | 2 +- .../test/mjsunit/harmony/module-resolution.js | 2 +- deps/v8/test/mjsunit/harmony/private.js | 5 - deps/v8/test/mjsunit/harmony/reflect-apply.js | 212 ++ .../test/mjsunit/harmony/reflect-construct.js | 277 ++ .../{ => harmony}/regress/regress-3501.js | 0 .../regress/regress-crbug-448730.js | 0 .../regress/regress-crbug-451770.js | 0 .../harmony/regress/regress-crbug-461520.js | 18 + .../regress/regress-crbug-465671-null.js | 16 + .../harmony/regress/regress-crbug-465671.js | 16 + deps/v8/test/mjsunit/harmony/rest-params.js | 34 +- deps/v8/test/mjsunit/harmony/typedarrays.js | 4 +- deps/v8/test/mjsunit/json2.js | 5 + deps/v8/test/mjsunit/mjsunit.status | 48 +- deps/v8/test/mjsunit/regexp-stack-overflow.js | 18 + deps/v8/test/mjsunit/regress/regress-1530.js | 8 +- .../v8/test/mjsunit/regress/regress-270142.js | 2 +- .../v8/test/mjsunit/regress/regress-330046.js | 2 +- deps/v8/test/mjsunit/regress/regress-3960.js | 36 + deps/v8/test/mjsunit/regress/regress-3969.js | 36 + deps/v8/test/mjsunit/regress/regress-3976.js | 80 + deps/v8/test/mjsunit/regress/regress-3985.js | 45 + deps/v8/test/mjsunit/regress/regress-4023.js | 67 + deps/v8/test/mjsunit/regress/regress-4027.js | 60 + .../regress/regress-430201b.js} | 22 +- .../v8/test/mjsunit/regress/regress-460937.js | 19 + .../v8/test/mjsunit/regress/regress-463028.js | 18 + .../v8/test/mjsunit/regress/regress-469605.js | 43 + .../v8/test/mjsunit/regress/regress-470804.js | 53 + .../mjsunit/regress/regress-crbug-385002.js | 2 +- .../mjsunit/regress/regress-crbug-401915.js | 2 +- .../mjsunit/regress/regress-crbug-465564.js | 7 + .../mjsunit/regress/regress-crbug-467047.js | 17 + .../mjsunit/regress/regress-crbug-467531.js | 25 + .../regress/regress-filter-contexts.js | 14 + .../regress/regress-function-length-strict.js | 2 +- .../mjsunit/regress/string-compare-memcmp.js | 2 +- deps/v8/test/mjsunit/stack-traces.js | 34 + deps/v8/test/mjsunit/strict-mode.js | 16 +- deps/v8/test/mjsunit/string-concat.js | 14 + deps/v8/test/mjsunit/string-index.js | 16 + deps/v8/test/mjsunit/strong/arrays.js | 12 + deps/v8/test/mjsunit/strong/classes.js | 47 +- .../mjsunit/strong/declaration-after-use.js | 258 ++ deps/v8/test/mjsunit/strong/functions.js | 68 +- deps/v8/test/mozilla/mozilla.status | 13 + .../preparser/strict-function-statement.pyt | 109 - deps/v8/test/test262-es6/test262-es6.status | 324 +- deps/v8/test/test262-es6/testcfg.py | 3 - deps/v8/test/test262/test262.status | 127 + .../arm/instruction-selector-arm-unittest.cc | 15 + .../instruction-selector-arm64-unittest.cc | 137 +- .../compiler/change-lowering-unittest.cc | 456 +-- .../common-operator-reducer-unittest.cc | 64 +- .../compiler/common-operator-unittest.cc | 2 + .../compiler/control-equivalence-unittest.cc | 2 +- .../control-flow-optimizer-unittest.cc | 80 +- .../instruction-selector-ia32-unittest.cc | 44 +- .../compiler/instruction-selector-unittest.cc | 49 +- .../compiler/instruction-sequence-unittest.cc | 121 +- .../compiler/instruction-sequence-unittest.h | 52 +- .../compiler/js-builtin-reducer-unittest.cc | 125 - .../js-intrinsic-lowering-unittest.cc | 148 +- .../compiler/js-operator-unittest.cc | 83 +- .../compiler/js-typed-lowering-unittest.cc | 70 +- .../compiler/liveness-analyzer-unittest.cc | 373 ++ .../machine-operator-reducer-unittest.cc | 149 + .../compiler/machine-operator-unittest.cc | 44 +- .../instruction-selector-mips-unittest.cc | 15 + .../instruction-selector-mips64-unittest.cc | 36 +- .../compiler/move-optimizer-unittest.cc | 53 + .../compiler/node-properties-unittest.cc | 72 + .../unittests/compiler/node-test-utils.cc | 39 +- .../test/unittests/compiler/node-test-utils.h | 16 +- .../test/unittests/compiler/node-unittest.cc | 6 +- .../unittests/compiler/opcodes-unittest.cc | 25 + deps/v8/test/unittests/compiler/ppc/OWNERS | 3 + .../compiler/register-allocator-unittest.cc | 106 + .../unittests/compiler/schedule-unittest.cc | 33 +- .../unittests/compiler/scheduler-unittest.cc | 303 +- .../simplified-operator-reducer-unittest.cc | 33 - .../compiler/simplified-operator-unittest.cc | 1 - .../compiler/state-values-utils-unittest.cc | 149 + .../x64/instruction-selector-x64-unittest.cc | 34 + .../heap/gc-idle-time-handler-unittest.cc | 52 +- deps/v8/test/unittests/unittests.gyp | 2 + .../fast/js/kde/prototype_length-expected.txt | 2 +- .../webkit/fast/js/kde/prototype_length.js | 2 +- deps/v8/test/webkit/webkit.status | 6 +- deps/v8/testing/commit_queue/OWNERS | 1 + deps/v8/testing/commit_queue/config.json | 74 + deps/v8/tools/check-name-clashes.py | 3 +- deps/v8/tools/cpu.sh | 2 +- deps/v8/tools/external-reference-check.py | 2 +- deps/v8/tools/gyp/v8.gyp | 49 +- deps/v8/tools/js2c.py | 2 +- deps/v8/tools/ll_prof.py | 23 +- deps/v8/tools/parser-shell.cc | 24 +- deps/v8/tools/perf-to-html.py | 378 ++ deps/v8/tools/release/auto_push.py | 19 +- deps/v8/tools/release/auto_roll.py | 61 +- deps/v8/tools/release/chromium_roll.py | 58 +- deps/v8/tools/release/common_includes.py | 63 +- deps/v8/tools/release/create_release.py | 24 +- deps/v8/tools/release/merge_to_branch.py | 4 +- deps/v8/tools/release/releases.py | 4 +- deps/v8/tools/release/test_scripts.py | 169 +- deps/v8/tools/run-tests.py | 2 + deps/v8/tools/run_perf.py | 16 +- deps/v8/tools/test-push-to-trunk.sh | 246 -- deps/v8/tools/testrunner/local/statusfile.py | 5 +- deps/v8/tools/v8-info.sh | 10 +- 822 files changed, 43422 insertions(+), 27119 deletions(-) create mode 100644 deps/v8/build/gyp_environment.py delete mode 100644 deps/v8/src/compiler/generic-algorithm.h delete mode 100644 deps/v8/src/compiler/graph-inl.h create mode 100644 deps/v8/src/compiler/js-type-feedback.cc create mode 100644 deps/v8/src/compiler/js-type-feedback.h create mode 100644 deps/v8/src/compiler/liveness-analyzer.cc create mode 100644 deps/v8/src/compiler/liveness-analyzer.h create mode 100644 deps/v8/src/compiler/node-matchers.cc create mode 100644 deps/v8/src/compiler/ppc/OWNERS create mode 100644 deps/v8/src/compiler/state-values-utils.cc create mode 100644 deps/v8/src/compiler/state-values-utils.h create mode 100644 deps/v8/src/harmony-reflect.js delete mode 100644 deps/v8/src/harmony-string.js create mode 100644 deps/v8/src/ic/ppc/OWNERS create mode 100644 deps/v8/src/pending-compilation-error-handler.cc create mode 100644 deps/v8/src/pending-compilation-error-handler.h create mode 100644 deps/v8/src/ppc/OWNERS create mode 100644 deps/v8/src/snapshot/DEPS rename deps/v8/src/{ => snapshot}/mksnapshot.cc (89%) rename deps/v8/src/{ => snapshot}/natives-external.cc (84%) rename deps/v8/src/{ => snapshot}/natives.h (96%) rename deps/v8/src/{ => snapshot}/serialize.cc (82%) rename deps/v8/src/{ => snapshot}/serialize.h (78%) rename deps/v8/src/{ => snapshot}/snapshot-common.cc (79%) rename deps/v8/src/{ => snapshot}/snapshot-empty.cc (83%) rename deps/v8/src/{ => snapshot}/snapshot-external.cc (84%) rename deps/v8/src/{ => snapshot}/snapshot-source-sink.cc (79%) rename deps/v8/src/{ => snapshot}/snapshot-source-sink.h (87%) rename deps/v8/src/{ => snapshot}/snapshot.h (86%) create mode 100644 deps/v8/src/strings-storage.cc create mode 100644 deps/v8/src/strings-storage.h rename deps/v8/src/{harmony-templates.js => templates.js} (62%) create mode 100644 deps/v8/test/cctest/compiler/test-run-stubs.cc create mode 100644 deps/v8/test/cctest/test-array-list.cc create mode 100644 deps/v8/test/cctest/test-typedarrays.cc rename deps/v8/test/{mjsunit/harmony/disable-harmony-string.js => message/class-constructor-accessor.js} (66%) create mode 100644 deps/v8/test/message/class-constructor-accessor.out create mode 100644 deps/v8/test/message/class-constructor-generator.js create mode 100644 deps/v8/test/message/class-constructor-generator.out create mode 100644 deps/v8/test/message/export-duplicate-as.js create mode 100644 deps/v8/test/message/export-duplicate-as.out create mode 100644 deps/v8/test/message/export-duplicate-default.js create mode 100644 deps/v8/test/message/export-duplicate-default.out create mode 100644 deps/v8/test/message/export-duplicate.js create mode 100644 deps/v8/test/message/export-duplicate.out create mode 100644 deps/v8/test/message/import-as-eval.js create mode 100644 deps/v8/test/message/import-as-eval.out create mode 100644 deps/v8/test/message/import-as-redeclaration.js create mode 100644 deps/v8/test/message/import-as-redeclaration.out create mode 100644 deps/v8/test/message/import-as-reserved-word.js create mode 100644 deps/v8/test/message/import-as-reserved-word.out create mode 100644 deps/v8/test/message/import-eval.js create mode 100644 deps/v8/test/message/import-eval.out create mode 100644 deps/v8/test/message/import-redeclaration.js create mode 100644 deps/v8/test/message/import-redeclaration.out create mode 100644 deps/v8/test/message/import-reserved-word.js create mode 100644 deps/v8/test/message/import-reserved-word.out create mode 100644 deps/v8/test/message/unterminated-arg-list.js create mode 100644 deps/v8/test/message/unterminated-arg-list.out create mode 100644 deps/v8/test/mjsunit/asm/construct-double.js create mode 100644 deps/v8/test/mjsunit/asm/double-hi.js create mode 100644 deps/v8/test/mjsunit/asm/double-lo.js create mode 100644 deps/v8/test/mjsunit/asm/if-cloning.js create mode 100644 deps/v8/test/mjsunit/asm/math-clz32.js create mode 100644 deps/v8/test/mjsunit/compiler/deopt-tonumber-binop.js create mode 100644 deps/v8/test/mjsunit/compiler/eager-deopt-simple.js create mode 100644 deps/v8/test/mjsunit/compiler/osr-forin-nested.js create mode 100644 deps/v8/test/mjsunit/compiler/osr-infinite.js create mode 100644 deps/v8/test/mjsunit/compiler/osr-labeled.js create mode 100644 deps/v8/test/mjsunit/compiler/osr-literals-adapted.js create mode 100644 deps/v8/test/mjsunit/compiler/osr-literals.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-463056.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-468727.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-469089.js create mode 100644 deps/v8/test/mjsunit/compiler/truncating-store-deopt.js create mode 100644 deps/v8/test/mjsunit/compiler/try-deopt.js create mode 100644 deps/v8/test/mjsunit/debug-allscopes-on-debugger.js create mode 100644 deps/v8/test/mjsunit/debug-stepframe-clearing.js rename deps/v8/test/mjsunit/{harmony => es6}/block-conflicts.js (99%) create mode 100644 deps/v8/test/mjsunit/es6/block-const-assign.js rename deps/v8/test/mjsunit/{harmony => es6}/block-early-errors.js (98%) rename deps/v8/test/mjsunit/{harmony => es6}/block-for.js (99%) rename deps/v8/test/mjsunit/{harmony => es6}/block-leave.js (99%) rename deps/v8/test/mjsunit/{harmony => es6}/block-let-crankshaft.js (99%) rename deps/v8/test/mjsunit/{harmony => es6}/block-let-declaration.js (87%) rename deps/v8/test/mjsunit/{harmony => es6}/block-let-semantics.js (99%) rename deps/v8/test/mjsunit/{harmony => es6}/block-non-strict-errors.js (95%) rename deps/v8/test/mjsunit/{harmony => es6}/block-scoping.js (98%) rename deps/v8/test/mjsunit/{harmony => es6}/debug-blockscopes.js (99%) rename deps/v8/test/mjsunit/{harmony => es6}/debug-evaluate-blockscopes.js (98%) rename deps/v8/test/mjsunit/{harmony => es6}/debug-function-scopes.js (98%) create mode 100644 deps/v8/test/mjsunit/es6/debug-promises/resolve-after-aborted-try-finally.js create mode 100644 deps/v8/test/mjsunit/es6/debug-promises/resolve-after-try-catch.js create mode 100644 deps/v8/test/mjsunit/es6/debug-promises/rethrow-in-try-finally.js create mode 100644 deps/v8/test/mjsunit/es6/debug-stepin-promises.js rename deps/v8/test/mjsunit/{harmony => es6}/empty-for.js (98%) create mode 100644 deps/v8/test/mjsunit/es6/function-length-configurable.js create mode 100644 deps/v8/test/mjsunit/es6/function-name-configurable.js create mode 100644 deps/v8/test/mjsunit/es6/indexed-integer-exotics.js create mode 100644 deps/v8/test/mjsunit/es6/map-minus-zero.js rename deps/v8/test/mjsunit/{harmony => es6}/regress/regress-2243.js (98%) rename deps/v8/test/mjsunit/{harmony => es6}/regress/regress-2322.js (98%) rename deps/v8/test/mjsunit/{ => es6}/regress/regress-2506.js (97%) rename deps/v8/test/mjsunit/{harmony => es6}/regress/regress-2858.js (94%) rename deps/v8/test/mjsunit/{harmony => es6}/regress/regress-3426.js (89%) rename deps/v8/test/mjsunit/{ => es6}/regress/regress-347906.js (86%) rename deps/v8/test/mjsunit/{harmony => es6}/regress/regress-3683.js (97%) rename deps/v8/test/mjsunit/{harmony => es6}/regress/regress-3741.js (89%) create mode 100644 deps/v8/test/mjsunit/es6/regress/regress-3938.js rename deps/v8/test/mjsunit/{ => es6}/regress/regress-411237.js (87%) create mode 100644 deps/v8/test/mjsunit/es6/regress/regress-468661.js create mode 100644 deps/v8/test/mjsunit/es6/regress/regress-474783.js create mode 100644 deps/v8/test/mjsunit/es6/set-minus-zero.js rename deps/v8/test/mjsunit/{harmony => es6}/string-codepointat.js (99%) rename deps/v8/test/mjsunit/{harmony => es6}/string-endswith.js (99%) rename deps/v8/test/mjsunit/{harmony => es6}/string-fromcodepoint.js (98%) rename deps/v8/test/mjsunit/{harmony => es6}/string-includes.js (99%) rename deps/v8/test/mjsunit/{harmony => es6}/string-raw.js (88%) rename deps/v8/test/mjsunit/{harmony => es6}/string-repeat.js (99%) rename deps/v8/test/mjsunit/{harmony => es6}/string-startswith.js (99%) rename deps/v8/test/mjsunit/{harmony => es6}/templates.js (80%) delete mode 100644 deps/v8/test/mjsunit/harmony/block-const-assign.js create mode 100644 deps/v8/test/mjsunit/harmony/reflect-apply.js create mode 100644 deps/v8/test/mjsunit/harmony/reflect-construct.js rename deps/v8/test/mjsunit/{ => harmony}/regress/regress-3501.js (100%) rename deps/v8/test/mjsunit/{ => harmony}/regress/regress-crbug-448730.js (100%) rename deps/v8/test/mjsunit/{ => harmony}/regress/regress-crbug-451770.js (100%) create mode 100644 deps/v8/test/mjsunit/harmony/regress/regress-crbug-461520.js create mode 100644 deps/v8/test/mjsunit/harmony/regress/regress-crbug-465671-null.js create mode 100644 deps/v8/test/mjsunit/harmony/regress/regress-crbug-465671.js create mode 100644 deps/v8/test/mjsunit/regexp-stack-overflow.js create mode 100644 deps/v8/test/mjsunit/regress/regress-3960.js create mode 100644 deps/v8/test/mjsunit/regress/regress-3969.js create mode 100644 deps/v8/test/mjsunit/regress/regress-3976.js create mode 100644 deps/v8/test/mjsunit/regress/regress-3985.js create mode 100644 deps/v8/test/mjsunit/regress/regress-4023.js create mode 100644 deps/v8/test/mjsunit/regress/regress-4027.js rename deps/v8/test/{preparser/strict-const.js => mjsunit/regress/regress-430201b.js} (80%) create mode 100644 deps/v8/test/mjsunit/regress/regress-460937.js create mode 100644 deps/v8/test/mjsunit/regress/regress-463028.js create mode 100644 deps/v8/test/mjsunit/regress/regress-469605.js create mode 100644 deps/v8/test/mjsunit/regress/regress-470804.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-465564.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-467047.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-467531.js create mode 100644 deps/v8/test/mjsunit/regress/regress-filter-contexts.js create mode 100644 deps/v8/test/mjsunit/string-concat.js create mode 100644 deps/v8/test/mjsunit/strong/arrays.js create mode 100644 deps/v8/test/mjsunit/strong/declaration-after-use.js delete mode 100644 deps/v8/test/preparser/strict-function-statement.pyt create mode 100644 deps/v8/test/unittests/compiler/liveness-analyzer-unittest.cc create mode 100644 deps/v8/test/unittests/compiler/ppc/OWNERS create mode 100644 deps/v8/test/unittests/compiler/state-values-utils-unittest.cc create mode 100644 deps/v8/testing/commit_queue/OWNERS create mode 100644 deps/v8/testing/commit_queue/config.json create mode 100755 deps/v8/tools/perf-to-html.py delete mode 100755 deps/v8/tools/test-push-to-trunk.sh diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index 2eac3035c33dbb..cc424333d31334 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -24,6 +24,7 @@ .cproject .d8_history .gclient_entries +.landmines .project .pydevproject .settings diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index 39fb88c57b7975..5b976b8b79f103 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -64,6 +64,7 @@ Jianghua Yang Joel Stanley Johan Bergström Jonathan Liu +JunHo Seo Kang-Hao (Kenny) Lu Luis Reis Luke Zarko diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 713ab6de57d461..fc0ea8eb6802bf 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -2,6 +2,10 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/android/config.gni") +import("//build/config/arm.gni") +import("//build/config/mips.gni") + # Because standalone V8 builds are not supported, assume this is part of a # Chromium build. import("//build/module_args/v8.gni") @@ -18,10 +22,23 @@ v8_interpreted_regexp = false v8_object_print = false v8_postmortem_support = false v8_use_snapshot = true -v8_target_arch = cpu_arch +v8_target_arch = target_cpu v8_random_seed = "314159265" v8_toolset_for_d8 = "host" +# The snapshot needs to be compiled for the host, but compiled with +# a toolchain that matches the bit-width of the target. +# +# TODO(GYP): For now we only support 32-bit little-endian target builds from an +# x64 Linux host. Eventually we need to support all of the host/target +# configurations v8 runs on. +if (host_cpu == "x64" && host_os == "linux" && + (target_cpu == "arm" || target_cpu == "mipsel" || target_cpu == "x86")) { + snapshot_toolchain = "//build/toolchain/linux:clang_x86" +} else { + snapshot_toolchain = default_toolchain +} + ############################################################################### # Configurations # @@ -96,37 +113,49 @@ config("toolchain") { defines = [] cflags = [] - # TODO(jochen): Add support for arm subarchs, mips, mipsel. + # TODO(jochen): Add support for arm subarchs, mips, mipsel, mips64el. if (v8_target_arch == "arm") { defines += [ "V8_TARGET_ARCH_ARM" ] - if (arm_version == 7) { - defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] - } - if (arm_fpu == "vfpv3-d16") { - defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] - } - if (arm_fpu == "vfpv3") { - defines += [ - "CAN_USE_VFP3_INSTRUCTIONS", - "CAN_USE_VFP32DREGS", - ] - } - if (arm_fpu == "neon") { + if (current_cpu == "arm") { + if (arm_version == 7) { + defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] + } + if (arm_fpu == "vfpv3-d16") { + defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] + } else if (arm_fpu == "vfpv3") { + defines += [ + "CAN_USE_VFP3_INSTRUCTIONS", + "CAN_USE_VFP32DREGS", + ] + } else if (arm_fpu == "neon") { + defines += [ + "CAN_USE_VFP3_INSTRUCTIONS", + "CAN_USE_VFP32DREGS", + "CAN_USE_NEON", + ] + } + } else { + # These defines ares used for the ARM simulator. defines += [ + "CAN_USE_ARMV7_INSTRUCTIONS", "CAN_USE_VFP3_INSTRUCTIONS", "CAN_USE_VFP32DREGS", - "CAN_USE_NEON", + "USE_EABI_HARDFLOAT=0", ] } # TODO(jochen): Add support for arm_test_noprobe. - - # TODO(jochen): Add support for cpu_arch != v8_target_arch/ } if (v8_target_arch == "arm64") { defines += [ "V8_TARGET_ARCH_ARM64" ] } + if (v8_target_arch == "mipsel") { + defines += [ "V8_TARGET_ARCH_MIPS" ] + } + if (v8_target_arch == "mips64el") { + defines += [ "V8_TARGET_ARCH_MIPS64" ] + } if (v8_target_arch == "x86") { defines += [ "V8_TARGET_ARCH_IA32" ] } @@ -173,8 +202,8 @@ action("js2c") { "src/array.js", "src/string.js", "src/uri.js", - "src/third_party/fdlibm/fdlibm.js", "src/math.js", + "src/third_party/fdlibm/fdlibm.js", "src/date.js", "src/regexp.js", "src/arraybuffer.js", @@ -192,6 +221,7 @@ action("js2c") { "src/debug-debugger.js", "src/mirror-debugger.js", "src/liveedit-debugger.js", + "src/templates.js", "src/macros.py", ] @@ -230,13 +260,12 @@ action("js2c_experimental") { "src/macros.py", "src/proxy.js", "src/generator.js", - "src/harmony-string.js", "src/harmony-array.js", "src/harmony-array-includes.js", "src/harmony-typedarray.js", "src/harmony-tostring.js", - "src/harmony-templates.js", "src/harmony-regexp.js", + "src/harmony-reflect.js" ] outputs = [ @@ -322,7 +351,7 @@ action("run_mksnapshot") { visibility = [ ":*" ] # Only targets in this file can depend on this. deps = [ - ":mksnapshot($host_toolchain)", + ":mksnapshot($snapshot_toolchain)", ] script = "tools/run.py" @@ -332,7 +361,7 @@ action("run_mksnapshot") { ] args = [ - "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)", + "./" + rebase_path(get_label_info(":mksnapshot($snapshot_toolchain)", "root_out_dir") + "/mksnapshot", root_build_dir), "--log-snapshot-positions", @@ -373,7 +402,7 @@ source_set("v8_nosnapshot") { sources = [ "$target_gen_dir/libraries.cc", "$target_gen_dir/experimental-libraries.cc", - "src/snapshot-empty.cc", + "src/snapshot/snapshot-empty.cc", ] configs -= [ "//build/config/compiler:chromium_code" ] @@ -423,8 +452,8 @@ if (v8_use_external_startup_data) { ] sources = [ - "src/natives-external.cc", - "src/snapshot-external.cc", + "src/snapshot/natives-external.cc", + "src/snapshot/snapshot-external.cc", ] configs -= [ "//build/config/compiler:chromium_code" ] @@ -535,9 +564,7 @@ source_set("v8_base") { "src/compiler/frame.h", "src/compiler/gap-resolver.cc", "src/compiler/gap-resolver.h", - "src/compiler/generic-algorithm.h", "src/compiler/graph-builder.h", - "src/compiler/graph-inl.h", "src/compiler/graph-reducer.cc", "src/compiler/graph-reducer.h", "src/compiler/graph-replay.cc", @@ -566,6 +593,8 @@ source_set("v8_base") { "src/compiler/js-intrinsic-lowering.h", "src/compiler/js-operator.cc", "src/compiler/js-operator.h", + "src/compiler/js-type-feedback.cc", + "src/compiler/js-type-feedback.h", "src/compiler/js-typed-lowering.cc", "src/compiler/js-typed-lowering.h", "src/compiler/jump-threading.cc", @@ -573,6 +602,8 @@ source_set("v8_base") { "src/compiler/linkage-impl.h", "src/compiler/linkage.cc", "src/compiler/linkage.h", + "src/compiler/liveness-analyzer.cc", + "src/compiler/liveness-analyzer.h", "src/compiler/load-elimination.cc", "src/compiler/load-elimination.h", "src/compiler/loop-peeling.cc", @@ -591,6 +622,7 @@ source_set("v8_base") { "src/compiler/node-cache.h", "src/compiler/node-marker.cc", "src/compiler/node-marker.h", + "src/compiler/node-matchers.cc", "src/compiler/node-matchers.h", "src/compiler/node-properties.cc", "src/compiler/node-properties.h", @@ -631,6 +663,8 @@ source_set("v8_base") { "src/compiler/simplified-operator.h", "src/compiler/source-position.cc", "src/compiler/source-position.h", + "src/compiler/state-values-utils.cc", + "src/compiler/state-values-utils.h", "src/compiler/typer.cc", "src/compiler/typer.h", "src/compiler/value-numbering-reducer.cc", @@ -848,7 +882,6 @@ source_set("v8_base") { "src/modules.cc", "src/modules.h", "src/msan.h", - "src/natives.h", "src/objects-debug.cc", "src/objects-inl.h", "src/objects-printer.cc", @@ -860,6 +893,8 @@ source_set("v8_base") { "src/ostreams.h", "src/parser.cc", "src/parser.h", + "src/pending-compilation-error-handler.cc", + "src/pending-compilation-error-handler.h", "src/perf-jit.cc", "src/perf-jit.h", "src/preparse-data-format.h", @@ -929,20 +964,23 @@ source_set("v8_base") { "src/scopeinfo.h", "src/scopes.cc", "src/scopes.h", - "src/serialize.cc", - "src/serialize.h", "src/small-pointer-list.h", "src/smart-pointers.h", - "src/snapshot-common.cc", - "src/snapshot-source-sink.cc", - "src/snapshot-source-sink.h", - "src/snapshot.h", + "src/snapshot/natives.h", + "src/snapshot/serialize.cc", + "src/snapshot/serialize.h", + "src/snapshot/snapshot-common.cc", + "src/snapshot/snapshot-source-sink.cc", + "src/snapshot/snapshot-source-sink.h", + "src/snapshot/snapshot.h", "src/string-builder.cc", "src/string-builder.h", "src/string-search.cc", "src/string-search.h", "src/string-stream.cc", "src/string-stream.h", + "src/strings-storage.cc", + "src/strings-storage.h", "src/strtod.cc", "src/strtod.h", "src/token.cc", @@ -1356,11 +1394,11 @@ source_set("v8_libbase") { if (is_linux) { sources += [ "src/base/platform/platform-linux.cc" ] - libs = [ "rt" ] + libs = [ "dl", "rt" ] } else if (is_android) { defines += [ "CAN_USE_VFP_INSTRUCTIONS" ] - if (build_os == "mac") { + if (host_os == "mac") { if (current_toolchain == host_toolchain) { sources += [ "src/base/platform/platform-macos.cc" ] } else { @@ -1425,12 +1463,12 @@ source_set("v8_libplatform") { # Executables # -if (current_toolchain == host_toolchain) { +if (current_toolchain == snapshot_toolchain) { executable("mksnapshot") { visibility = [ ":*" ] # Only targets in this file can depend on this. sources = [ - "src/mksnapshot.cc", + "src/snapshot/mksnapshot.cc", ] configs -= [ "//build/config/compiler:chromium_code" ] diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index 0f835dc8c43f90..69ecd92ba61c8e 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,449 @@ +2015-03-30: Version 4.3.61 + + Performance and stability improvements on all platforms. + + +2015-03-28: Version 4.3.60 + + Reland^2 "Filter invalid slots out from the SlotsBuffer after marking." + (Chromium issues 454297, 470801). + + This fixes missing incremental write barrier issue when double fields + unboxing is enabled (Chromium issue 469146). + + Performance and stability improvements on all platforms. + + +2015-03-27: Version 4.3.59 + + Use a slot that is located on a heap page when removing invalid entries + from the SlotsBuffer (Chromium issue 470801). + + Performance and stability improvements on all platforms. + + +2015-03-26: Version 4.3.58 + + Return timestamp of the last recorded interval to the caller of + HeapProfiler::GetHeapStats (Chromium issue 467222). + + Performance and stability improvements on all platforms. + + +2015-03-26: Version 4.3.57 + + Reland [V8] Removed SourceLocationRestrict (Chromium issue 468781). + + Performance and stability improvements on all platforms. + + +2015-03-25: Version 4.3.56 + + Remove v8::Isolate::ClearInterrupt. + + Performance and stability improvements on all platforms. + + +2015-03-25: Version 4.3.55 + + Performance and stability improvements on all platforms. + + +2015-03-24: Version 4.3.54 + + Do not assign positions to parser-generated desugarings (Chromium issue + 468661). + + Performance and stability improvements on all platforms. + + +2015-03-24: Version 4.3.53 + + Filter invalid slots out from the SlotsBuffer after marking (Chromium + issue 454297). + + Fix OOM bug 3976 (issue 3976). + + Performance and stability improvements on all platforms. + + +2015-03-24: Version 4.3.52 + + Remove calls to IdleNotification(). + + Save heap object tracking data in heap snapshot (Chromium issue 467222). + + Performance and stability improvements on all platforms. + + +2015-03-24: Version 4.3.51 + + [V8] Removed SourceLocationRestrict (Chromium issue 468781). + + [turbofan] Fix control reducer bug with walking non-control edges during + ConnectNTL phase (Chromium issue 469605). + + Performance and stability improvements on all platforms. + + +2015-03-23: Version 4.3.50 + + Performance and stability improvements on all platforms. + + +2015-03-23: Version 4.3.49 + + Ensure we don't overflow in BCE (Chromium issue 469148). + + [turbofan] Fix lowering of Math.max for integral inputs (Chromium issue + 468162). + + Use libdl to get symbols for backtraces. + + Performance and stability improvements on all platforms. + + +2015-03-19: Version 4.3.48 + + Clarify what APIs return Maybe and MaybeLocal values (issue 3929). + + Introduce explicit constant for per Context debug data set by embedder + (Chromium issue 466631). + + Adjust key behaviour for weak collections (issues 3970, 3971, Chromium + issue 460083). + + Turn on overapproximation of the weak closure (issue 3862). + + Performance and stability improvements on all platforms. + + +2015-03-18: Version 4.3.47 + + Performance and stability improvements on all platforms. + + +2015-03-17: Version 4.3.46 + + Performance and stability improvements on all platforms. + + +2015-03-17: Version 4.3.45 + + Performance and stability improvements on all platforms. + + +2015-03-17: Version 4.3.44 + + Performance and stability improvements on all platforms. + + +2015-03-16: Version 4.3.43 + + Bugfix in hydrogen GVN (Chromium issue 467481). + + Remove obsolete TakeHeapSnapshot method from API (Chromium issue + 465651). + + Beautify syntax error for unterminated argument list (Chromium issue + 339474). + + Performance and stability improvements on all platforms. + + +2015-03-16: Version 4.3.42 + + Performance and stability improvements on all platforms. + + +2015-03-15: Version 4.3.41 + + Performance and stability improvements on all platforms. + + +2015-03-14: Version 4.3.40 + + Performance and stability improvements on all platforms. + + +2015-03-14: Version 4.3.39 + + Performance and stability improvements on all platforms. + + +2015-03-14: Version 4.3.38 + + Remove --harmony-scoping flag. + + Performance and stability improvements on all platforms. + + +2015-03-13: Version 4.3.37 + + Implement TDZ in StoreIC for top-level lexicals (issue 3941). + + Turn on job-based optimizing compiler (issue 3608). + + Performance and stability improvements on all platforms. + + +2015-03-13: Version 4.3.36 + + Performance and stability improvements on all platforms. + + +2015-03-12: Version 4.3.35 + + Add Cast() for Int32 and Uint32 (Chromium issue 462402). + + Incorrect handling of HTransitionElementsKind in hydrogen check + elimination phase fixed (Chromium issue 460917). + + Performance and stability improvements on all platforms. + + +2015-03-12: Version 4.3.34 + + Performance and stability improvements on all platforms. + + +2015-03-12: Version 4.3.33 + + Fix the toolchain used to build the snapshots in GN (Chromium issues + 395249, 465456). + + Performance and stability improvements on all platforms. + + +2015-03-11: Version 4.3.32 + + Reland of Remove slots that point to unboxed doubles from the + StoreBuffer/SlotsBuffer (Chromium issues 454297, 465273). + + Performance and stability improvements on all platforms. + + +2015-03-11: Version 4.3.31 + + Performance and stability improvements on all platforms. + + +2015-03-11: Version 4.3.30 + + Remove uid and title from HeapSnapshot (Chromium issue 465651). + + Remove deprecated CpuProfiler methods. + + [turbofan] Fix --turbo-osr for OSRing into inner loop inside for-in + (Chromium issue 462775). + + Performance and stability improvements on all platforms. + + +2015-03-10: Version 4.3.29 + + Performance and stability improvements on all platforms. + + +2015-03-10: Version 4.3.28 + + Performance and stability improvements on all platforms. + + +2015-03-10: Version 4.3.27 + + Performance and stability improvements on all platforms. + + +2015-03-07: Version 4.3.26 + + Remove slots that point to unboxed doubles from the + StoreBuffer/SlotsBuffer (Chromium issue 454297). + + Performance and stability improvements on all platforms. + + +2015-03-06: Version 4.3.25 + + Performance and stability improvements on all platforms. + + +2015-03-06: Version 4.3.24 + + convert more things to maybe (issue 3929). + + Performance and stability improvements on all platforms. + + +2015-03-05: Version 4.3.23 + + [V8] Use Function.name for stack frames in v8::StackTrace (Chromium + issue 17356). + + Allow passing sourceMapUrl when compiling scripts (Chromium issue + 462572). + + convert compile functions to use maybe (issue 3929). + + Performance and stability improvements on all platforms. + + +2015-03-05: Version 4.3.22 + + give UniquePersistent full move semantics (issue 3669). + + Performance and stability improvements on all platforms. + + +2015-03-05: Version 4.3.21 + + Performance and stability improvements on all platforms. + + +2015-03-04: Version 4.3.20 + + convert remaining object functions to maybes (issue 3929). + + Performance and stability improvements on all platforms. + + +2015-03-04: Version 4.3.19 + + ARM assembler: fix undefined behaviour in fits_shifter (Chromium issues + 444089, 463436). + + Implement subclassing Arrays (issue 3930). + + [es6] Fix for-const loops (issue 3983). + + Performance and stability improvements on all platforms. + + +2015-03-04: Version 4.3.18 + + Implement subclassing Arrays (issue 3930). + + Performance and stability improvements on all platforms. + + +2015-03-04: Version 4.3.17 + + Implement subclassing Arrays (issue 3930). + + convert more object functions to return maybes (issue 3929). + + Performance and stability improvements on all platforms. + + +2015-03-03: Version 4.3.16 + + check for null context on execution entry (issue 3929). + + convert object::* to return maybe values (issue 3929). + + Removed funky Maybe constructor and made fields private (issue 3929). + + Polish Maybe API a bit, removing useless creativity and fixing some + signatures (issue 3929). + + Performance and stability improvements on all platforms. + + +2015-03-02: Version 4.3.15 + + Performance and stability improvements on all platforms. + + +2015-03-02: Version 4.3.14 + + Performance and stability improvements on all platforms. + + +2015-02-28: Version 4.3.13 + + Disallow subclassing Arrays (issue 3930). + + Performance and stability improvements on all platforms. + + +2015-02-28: Version 4.3.12 + + Performance and stability improvements on all platforms. + + +2015-02-27: Version 4.3.11 + + Disallow subclassing Arrays (issue 3930). + + convert Value::*Value() function to return Maybe results (issue 3929). + + Performance and stability improvements on all platforms. + + +2015-02-27: Version 4.3.10 + + Convert v8::Value::To* to use MaybeLocal (issue 3929). + + Performance and stability improvements on all platforms. + + +2015-02-26: Version 4.3.9 + + Add public version macros (issue 3075). + + Performance and stability improvements on all platforms. + + +2015-02-26: Version 4.3.8 + + Performance and stability improvements on all platforms. + + +2015-02-25: Version 4.3.7 + + Performance and stability improvements on all platforms. + + +2015-02-25: Version 4.3.6 + + Performance and stability improvements on all platforms. + + +2015-02-25: Version 4.3.5 + + Turn on job based recompilation (issue 3608). + + Performance and stability improvements on all platforms. + + +2015-02-24: Version 4.3.4 + + Reland "Correctly propagate terminate exception in TryCall." (issue + 3892). + + Performance and stability improvements on all platforms. + + +2015-02-24: Version 4.3.3 + + Performance and stability improvements on all platforms. + + +2015-02-24: Version 4.3.2 + + Update GN build files with the cpu_arch -> current_cpu change. + + Performance and stability improvements on all platforms. + + +2015-02-23: Version 4.3.1 + + Limit size of first page based on serialized data (Chromium issue + 453111). + + Performance and stability improvements on all platforms. + + 2015-02-19: Version 4.2.77 Make generator constructors configurable (issue 3902). diff --git a/deps/v8/DEPS b/deps/v8/DEPS index b829d05dabb9ad..42606acfcfbbf0 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -8,17 +8,17 @@ vars = { deps = { "v8/build/gyp": - Var("git_url") + "/external/gyp.git" + "@" + "34640080d08ab2a37665512e52142947def3056d", + Var("git_url") + "/external/gyp.git" + "@" + "d174d75bf69c682cb62af9187879e01513b35e52", "v8/third_party/icu": - Var("git_url") + "/chromium/deps/icu.git" + "@" + "4e3266f32c62d30a3f9e2232a753c60129d1e670", + Var("git_url") + "/chromium/deps/icu.git" + "@" + "7c81740601355556e630da515b74d889ba2f8d08", "v8/buildtools": - Var("git_url") + "/chromium/buildtools.git" + "@" + "5c5e924788fe40f7d6e0a3841ac572de2475e689", + Var("git_url") + "/chromium/buildtools.git" + "@" + "3b302fef93f7cc58d9b8168466905237484b2772", "v8/testing/gtest": Var("git_url") + "/external/googletest.git" + "@" + "be1868139ffe0ccd0e8e3b37292b84c821d9c8ad", "v8/testing/gmock": Var("git_url") + "/external/googlemock.git" + "@" + "29763965ab52f24565299976b936d1265cb6a271", # from svn revision 501 "v8/tools/clang": - Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "f6daa55d03995e82201a3278203e7c0421a59546", + Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "ea2f0a2d96ffc6f5a51c034db704ccc1a6543156", } deps_os = { @@ -46,6 +46,17 @@ skip_child_includes = [ ] hooks = [ + { + # This clobbers when necessary (based on get_landmines.py). It must be the + # first hook so that other things that get/generate into the output + # directory will not subsequently be clobbered. + 'name': 'landmines', + 'pattern': '.', + 'action': [ + 'python', + 'v8/build/landmines.py', + ], + }, # Pull clang-format binaries using checked-in hashes. { "name": "clang_format_win", diff --git a/deps/v8/Makefile b/deps/v8/Makefile index 5468d913341e31..055a57d286c9ce 100644 --- a/deps/v8/Makefile +++ b/deps/v8/Makefile @@ -234,7 +234,8 @@ ARCHES = ia32 x64 x32 arm arm64 mips mipsel mips64el x87 ppc ppc64 DEFAULT_ARCHES = ia32 x64 arm MODES = release debug optdebug DEFAULT_MODES = release debug -ANDROID_ARCHES = android_ia32 android_arm android_arm64 android_mipsel android_x87 +ANDROID_ARCHES = android_ia32 android_x64 android_arm android_arm64 \ + android_mipsel android_x87 NACL_ARCHES = nacl_ia32 nacl_x64 # List of files that trigger Makefile regeneration: diff --git a/deps/v8/Makefile.android b/deps/v8/Makefile.android index 2a3640382b4f5f..f89fd21fda004e 100644 --- a/deps/v8/Makefile.android +++ b/deps/v8/Makefile.android @@ -26,7 +26,8 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Those definitions should be consistent with the main Makefile -ANDROID_ARCHES = android_ia32 android_arm android_arm64 android_mipsel android_x87 +ANDROID_ARCHES = android_ia32 android_x64 android_arm android_arm64 \ + android_mipsel android_x87 MODES = release debug # Generates all combinations of ANDROID ARCHES and MODES, @@ -66,6 +67,11 @@ else ifeq ($(ARCH), android_ia32) TOOLCHAIN_ARCH = x86 TOOLCHAIN_PREFIX = i686-linux-android TOOLCHAIN_VER = 4.8 +else ifeq ($(ARCH), android_x64) + DEFINES = target_arch=x64 v8_target_arch=x64 android_target_arch=x86_64 android_target_platform=21 + TOOLCHAIN_ARCH = x86_64 + TOOLCHAIN_PREFIX = x86_64-linux-android + TOOLCHAIN_VER = 4.9 else ifeq ($(ARCH), android_x87) DEFINES = target_arch=x87 v8_target_arch=x87 android_target_arch=x86 android_target_platform=14 TOOLCHAIN_ARCH = x86 diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index fd0601f17bbfd8..5b3d58d3ba50d8 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -244,6 +244,7 @@ def GetPreferredTryMasters(project, change): return { 'tryserver.v8': { 'v8_linux_rel': set(['defaulttests']), + 'v8_linux_dbg': set(['defaulttests']), 'v8_linux_nodcheck_rel': set(['defaulttests']), 'v8_linux_gcc_compile_rel': set(['defaulttests']), 'v8_linux64_rel': set(['defaulttests']), diff --git a/deps/v8/README.md b/deps/v8/README.md index bc1685affa99dc..5cd4b5811a4b47 100644 --- a/deps/v8/README.md +++ b/deps/v8/README.md @@ -18,13 +18,13 @@ Getting the Code Checkout [depot tools](http://www.chromium.org/developers/how-tos/install-depot-tools), and run -> `fetch v8` + fetch v8 This will checkout V8 into the directory `v8` and fetch all of its dependencies. To stay up to date, run -> `git pull origin` -> `gclient sync` + git pull origin + gclient sync For fetching all branches, add the following into your remote configuration in `.git/config`: diff --git a/deps/v8/build/android.gypi b/deps/v8/build/android.gypi index 5d3b25a74636ca..533250e7f56f96 100644 --- a/deps/v8/build/android.gypi +++ b/deps/v8/build/android.gypi @@ -43,7 +43,13 @@ 'android_stlport': '<(android_toolchain)/sources/cxx-stl/stlport/', }, 'android_include': '<(android_sysroot)/usr/include', - 'android_lib': '<(android_sysroot)/usr/lib', + 'conditions': [ + ['target_arch=="x64"', { + 'android_lib': '<(android_sysroot)/usr/lib64', + }, { + 'android_lib': '<(android_sysroot)/usr/lib', + }], + ], 'android_stlport_include': '<(android_stlport)/stlport', 'android_stlport_libs': '<(android_stlport)/libs', }, { @@ -52,7 +58,13 @@ 'android_stlport': '<(android_ndk_root)/sources/cxx-stl/stlport/', }, 'android_include': '<(android_sysroot)/usr/include', - 'android_lib': '<(android_sysroot)/usr/lib', + 'conditions': [ + ['target_arch=="x64"', { + 'android_lib': '<(android_sysroot)/usr/lib64', + }, { + 'android_lib': '<(android_sysroot)/usr/lib', + }], + ], 'android_stlport_include': '<(android_stlport)/stlport', 'android_stlport_libs': '<(android_stlport)/libs', }], @@ -227,7 +239,7 @@ 'target_conditions': [ ['_type=="executable"', { 'conditions': [ - ['target_arch=="arm64"', { + ['target_arch=="arm64" or target_arch=="x64"', { 'ldflags': [ '-Wl,-dynamic-linker,/system/bin/linker64', ], diff --git a/deps/v8/build/detect_v8_host_arch.py b/deps/v8/build/detect_v8_host_arch.py index 3460a9a404f0ce..89e8286e1fdb45 100644 --- a/deps/v8/build/detect_v8_host_arch.py +++ b/deps/v8/build/detect_v8_host_arch.py @@ -41,6 +41,7 @@ def DoMain(_): """Hook to be called from gyp without starting a separate python interpreter.""" host_arch = platform.machine() + host_system = platform.system(); # Convert machine type to format recognized by gyp. if re.match(r'i.86', host_arch) or host_arch == 'i86pc': @@ -56,6 +57,13 @@ def DoMain(_): elif host_arch.startswith('mips'): host_arch = 'mipsel' + # Under AIX the value returned by platform.machine is not + # the best indicator of the host architecture + # AIX 6.1 which is the lowest level supported only provides + # a 64 bit kernel + if host_system == 'AIX': + host_arch = 'ppc64' + # platform.machine is based on running kernel. It's possible to use 64-bit # kernel with 32-bit userland, e.g. to give linker slightly more memory. # Distinguish between different userland bitness by querying diff --git a/deps/v8/build/features.gypi b/deps/v8/build/features.gypi index 2eadca338438dc..5c60273a61bc6f 100644 --- a/deps/v8/build/features.gypi +++ b/deps/v8/build/features.gypi @@ -102,7 +102,7 @@ 'DebugBaseCommon': { 'abstract': 1, 'variables': { - 'v8_enable_handle_zapping%': 1, + 'v8_enable_handle_zapping%': 0, }, 'conditions': [ ['v8_enable_handle_zapping==1', { @@ -112,7 +112,7 @@ }, # Debug 'Release': { 'variables': { - 'v8_enable_handle_zapping%': 0, + 'v8_enable_handle_zapping%': 1, }, 'conditions': [ ['v8_enable_handle_zapping==1', { diff --git a/deps/v8/build/get_landmines.py b/deps/v8/build/get_landmines.py index 66a86cbb5082ad..f61c04de44361e 100755 --- a/deps/v8/build/get_landmines.py +++ b/deps/v8/build/get_landmines.py @@ -20,6 +20,7 @@ def main(): print 'Activating MSVS 2013.' print 'Revert activation of MSVS 2013.' print 'Activating MSVS 2013 again.' + print 'Clobber after ICU roll.' return 0 diff --git a/deps/v8/build/gyp_environment.py b/deps/v8/build/gyp_environment.py new file mode 100644 index 00000000000000..f1cee6ef8e00f6 --- /dev/null +++ b/deps/v8/build/gyp_environment.py @@ -0,0 +1,52 @@ +# Copyright 2015 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Sets up various automatic gyp environment variables. These are used by +gyp_v8 and landmines.py which run at different stages of runhooks. To +make sure settings are consistent between them, all setup should happen here. +""" + +import os +import sys + +SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) +V8_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir)) + + +def apply_gyp_environment(file_path=None): + """ + Reads in a *.gyp_env file and applies the valid keys to os.environ. + """ + if not file_path or not os.path.exists(file_path): + return + file_contents = open(file_path).read() + try: + file_data = eval(file_contents, {'__builtins__': None}, None) + except SyntaxError, e: + e.filename = os.path.abspath(file_path) + raise + supported_vars = ( 'V8_GYP_FILE', + 'V8_GYP_SYNTAX_CHECK', + 'GYP_DEFINES', + 'GYP_GENERATOR_FLAGS', + 'GYP_GENERATOR_OUTPUT', ) + for var in supported_vars: + val = file_data.get(var) + if val: + if var in os.environ: + print 'INFO: Environment value for "%s" overrides value in %s.' % ( + var, os.path.abspath(file_path) + ) + else: + os.environ[var] = val + + +def set_environment(): + """Sets defaults for GYP_* variables.""" + + if 'SKIP_V8_GYP_ENV' not in os.environ: + # Update the environment based on v8.gyp_env + gyp_env_path = os.path.join(os.path.dirname(V8_ROOT), 'v8.gyp_env') + apply_gyp_environment(gyp_env_path) diff --git a/deps/v8/build/gyp_v8 b/deps/v8/build/gyp_v8 index 14467eccaad29f..1e8a5c806ecca6 100755 --- a/deps/v8/build/gyp_v8 +++ b/deps/v8/build/gyp_v8 @@ -31,6 +31,7 @@ # is invoked by V8 beyond what can be done in the gclient hooks. import glob +import gyp_environment import os import platform import shlex @@ -48,34 +49,6 @@ sys.path.insert( 1, os.path.abspath(os.path.join(v8_root, 'tools', 'generate_shim_headers'))) -def apply_gyp_environment(file_path=None): - """ - Reads in a *.gyp_env file and applies the valid keys to os.environ. - """ - if not file_path or not os.path.exists(file_path): - return - file_contents = open(file_path).read() - try: - file_data = eval(file_contents, {'__builtins__': None}, None) - except SyntaxError, e: - e.filename = os.path.abspath(file_path) - raise - supported_vars = ( 'V8_GYP_FILE', - 'V8_GYP_SYNTAX_CHECK', - 'GYP_DEFINES', - 'GYP_GENERATOR_FLAGS', - 'GYP_GENERATOR_OUTPUT', ) - for var in supported_vars: - val = file_data.get(var) - if val: - if var in os.environ: - print 'INFO: Environment value for "%s" overrides value in %s.' % ( - var, os.path.abspath(file_path) - ) - else: - os.environ[var] = val - - def additional_include_files(args=[]): """ Returns a list of additional (.gypi) files to include, without @@ -109,13 +82,6 @@ def additional_include_files(args=[]): def run_gyp(args): rc = gyp.main(args) - # Check for landmines (reasons to clobber the build). This must be run here, - # rather than a separate runhooks step so that any environment modifications - # from above are picked up. - print 'Running build/landmines.py...' - subprocess.check_call( - [sys.executable, os.path.join(script_dir, 'landmines.py')]) - if rc != 0: print 'Error running GYP' sys.exit(rc) @@ -124,10 +90,7 @@ def run_gyp(args): if __name__ == '__main__': args = sys.argv[1:] - if 'SKIP_V8_GYP_ENV' not in os.environ: - # Update the environment based on v8.gyp_env - gyp_env_path = os.path.join(os.path.dirname(v8_root), 'v8.gyp_env') - apply_gyp_environment(gyp_env_path) + gyp_environment.set_environment() # This could give false positives since it doesn't actually do real option # parsing. Oh well. diff --git a/deps/v8/build/landmine_utils.py b/deps/v8/build/landmine_utils.py index e8b7c98d5fc6a3..cb3499132a3c2f 100644 --- a/deps/v8/build/landmine_utils.py +++ b/deps/v8/build/landmine_utils.py @@ -47,10 +47,19 @@ def gyp_defines(): return dict(arg.split('=', 1) for arg in shlex.split(os.environ.get('GYP_DEFINES', ''))) + +@memoize() +def gyp_generator_flags(): + """Parses and returns GYP_GENERATOR_FLAGS env var as a dictionary.""" + return dict(arg.split('=', 1) + for arg in shlex.split(os.environ.get('GYP_GENERATOR_FLAGS', ''))) + + @memoize() def gyp_msvs_version(): return os.environ.get('GYP_MSVS_VERSION', '') + @memoize() def distributor(): """ diff --git a/deps/v8/build/landmines.py b/deps/v8/build/landmines.py index bd1fb28f719c62..97c63901c1a904 100755 --- a/deps/v8/build/landmines.py +++ b/deps/v8/build/landmines.py @@ -4,10 +4,9 @@ # found in the LICENSE file. """ -This script runs every build as a hook. If it detects that the build should -be clobbered, it will touch the file /.landmine_triggered. The -various build scripts will then check for the presence of this file and clobber -accordingly. The script will also emit the reasons for the clobber to stdout. +This script runs every build as the first hook (See DEPS). If it detects that +the build should be clobbered, it will delete the contents of the build +directory. A landmine is tripped when a builder checks out a different revision, and the diff between the new landmines and the old ones is non-null. At this point, the @@ -15,9 +14,13 @@ """ import difflib +import errno +import gyp_environment import logging import optparse import os +import re +import shutil import sys import subprocess import time @@ -28,46 +31,109 @@ SRC_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) -def get_target_build_dir(build_tool, target): +def get_build_dir(build_tool, is_iphone=False): """ Returns output directory absolute path dependent on build and targets. Examples: - r'c:\b\build\slave\win\build\src\out\Release' - '/mnt/data/b/build/slave/linux/build/src/out/Debug' - '/b/build/slave/ios_rel_device/build/src/xcodebuild/Release-iphoneos' + r'c:\b\build\slave\win\build\src\out' + '/mnt/data/b/build/slave/linux/build/src/out' + '/b/build/slave/ios_rel_device/build/src/xcodebuild' Keep this function in sync with tools/build/scripts/slave/compile.py """ ret = None if build_tool == 'xcode': - ret = os.path.join(SRC_DIR, 'xcodebuild', target) + ret = os.path.join(SRC_DIR, 'xcodebuild') elif build_tool in ['make', 'ninja', 'ninja-ios']: # TODO: Remove ninja-ios. - ret = os.path.join(SRC_DIR, 'out', target) + if 'CHROMIUM_OUT_DIR' in os.environ: + output_dir = os.environ.get('CHROMIUM_OUT_DIR').strip() + if not output_dir: + raise Error('CHROMIUM_OUT_DIR environment variable is set but blank!') + else: + output_dir = landmine_utils.gyp_generator_flags().get('output_dir', 'out') + ret = os.path.join(SRC_DIR, output_dir) elif build_tool in ['msvs', 'vs', 'ib']: - ret = os.path.join(SRC_DIR, 'build', target) + ret = os.path.join(SRC_DIR, 'build') else: raise NotImplementedError('Unexpected GYP_GENERATORS (%s)' % build_tool) return os.path.abspath(ret) -def set_up_landmines(target, new_landmines): - """Does the work of setting, planting, and triggering landmines.""" - out_dir = get_target_build_dir(landmine_utils.builder(), target) - - landmines_path = os.path.join(out_dir, '.landmines') - if not os.path.exists(out_dir): +def extract_gn_build_commands(build_ninja_file): + """Extracts from a build.ninja the commands to run GN. + + The commands to run GN are the gn rule and build.ninja build step at the + top of the build.ninja file. We want to keep these when deleting GN builds + since we want to preserve the command-line flags to GN. + + On error, returns the empty string.""" + result = "" + with open(build_ninja_file, 'r') as f: + # Read until the second blank line. The first thing GN writes to the file + # is the "rule gn" and the second is the section for "build build.ninja", + # separated by blank lines. + num_blank_lines = 0 + while num_blank_lines < 2: + line = f.readline() + if len(line) == 0: + return '' # Unexpected EOF. + result += line + if line[0] == '\n': + num_blank_lines = num_blank_lines + 1 + return result + +def delete_build_dir(build_dir): + # GN writes a build.ninja.d file. Note that not all GN builds have args.gn. + build_ninja_d_file = os.path.join(build_dir, 'build.ninja.d') + if not os.path.exists(build_ninja_d_file): + shutil.rmtree(build_dir) return - if not os.path.exists(landmines_path): - print "Landmines tracker didn't exists." - - # FIXME(machenbach): Clobber deletes the .landmines tracker. Difficult - # to know if we are right after a clobber or if it is first-time landmines - # deployment. Also, a landmine-triggered clobber right after a clobber is - # not possible. Different clobber methods for msvs, xcode and make all - # have different blacklists of files that are not deleted. + # GN builds aren't automatically regenerated when you sync. To avoid + # messing with the GN workflow, erase everything but the args file, and + # write a dummy build.ninja file that will automatically rerun GN the next + # time Ninja is run. + build_ninja_file = os.path.join(build_dir, 'build.ninja') + build_commands = extract_gn_build_commands(build_ninja_file) + + try: + gn_args_file = os.path.join(build_dir, 'args.gn') + with open(gn_args_file, 'r') as f: + args_contents = f.read() + except IOError: + args_contents = '' + + shutil.rmtree(build_dir) + + # Put back the args file (if any). + os.mkdir(build_dir) + if args_contents != '': + with open(gn_args_file, 'w') as f: + f.write(args_contents) + + # Write the build.ninja file sufficiently to regenerate itself. + with open(os.path.join(build_dir, 'build.ninja'), 'w') as f: + if build_commands != '': + f.write(build_commands) + else: + # Couldn't parse the build.ninja file, write a default thing. + f.write('''rule gn +command = gn -q gen //out/%s/ +description = Regenerating ninja files + +build build.ninja: gn +generator = 1 +depfile = build.ninja.d +''' % (os.path.split(build_dir)[1])) + + # Write a .d file for the build which references a nonexistant file. This + # will make Ninja always mark the build as dirty. + with open(build_ninja_d_file, 'w') as f: + f.write('build.ninja: nonexistant_file.gn\n') + + +def needs_clobber(landmines_path, new_landmines): if os.path.exists(landmines_path): - triggered = os.path.join(out_dir, '.landmines_triggered') with open(landmines_path, 'r') as f: old_landmines = f.readlines() if old_landmines != new_landmines: @@ -75,14 +141,54 @@ def set_up_landmines(target, new_landmines): diff = difflib.unified_diff(old_landmines, new_landmines, fromfile='old_landmines', tofile='new_landmines', fromfiledate=old_date, tofiledate=time.ctime(), n=0) + sys.stdout.write('Clobbering due to:\n') + sys.stdout.writelines(diff) + return True + else: + sys.stdout.write('Clobbering due to missing landmines file.\n') + return True + return False - with open(triggered, 'w') as f: - f.writelines(diff) - print "Setting landmine: %s" % triggered - elif os.path.exists(triggered): - # Remove false triggered landmines. - os.remove(triggered) - print "Removing landmine: %s" % triggered + +def clobber_if_necessary(new_landmines): + """Does the work of setting, planting, and triggering landmines.""" + out_dir = get_build_dir(landmine_utils.builder()) + landmines_path = os.path.normpath(os.path.join(out_dir, '..', '.landmines')) + try: + os.makedirs(out_dir) + except OSError as e: + if e.errno == errno.EEXIST: + pass + + if needs_clobber(landmines_path, new_landmines): + # Clobber contents of build directory but not directory itself: some + # checkouts have the build directory mounted. + for f in os.listdir(out_dir): + path = os.path.join(out_dir, f) + if os.path.basename(out_dir) == 'build': + # Only delete build directories and files for MSVS builds as the folder + # shares some checked out files and directories. + if (os.path.isdir(path) and + re.search(r'(?:[Rr]elease)|(?:[Dd]ebug)', f)): + delete_build_dir(path) + elif (os.path.isfile(path) and + (path.endswith('.sln') or + path.endswith('.vcxproj') or + path.endswith('.vcxproj.user'))): + os.unlink(path) + else: + if os.path.isfile(path): + os.unlink(path) + elif os.path.isdir(path): + delete_build_dir(path) + if os.path.basename(out_dir) == 'xcodebuild': + # Xcodebuild puts an additional project file structure into build, + # while the output folder is xcodebuild. + project_dir = os.path.join(SRC_DIR, 'build', 'all.xcodeproj') + if os.path.exists(project_dir) and os.path.isdir(project_dir): + delete_build_dir(project_dir) + + # Save current set of landmines for next time. with open(landmines_path, 'w') as f: f.writelines(new_landmines) @@ -123,14 +229,14 @@ def main(): if landmine_utils.builder() in ('dump_dependency_json', 'eclipse'): return 0 + gyp_environment.set_environment() + landmines = [] for s in landmine_scripts: proc = subprocess.Popen([sys.executable, s], stdout=subprocess.PIPE) output, _ = proc.communicate() landmines.extend([('%s\n' % l.strip()) for l in output.splitlines()]) - - for target in ('Debug', 'Release'): - set_up_landmines(target, landmines) + clobber_if_necessary(landmines) return 0 diff --git a/deps/v8/build/standalone.gypi b/deps/v8/build/standalone.gypi index 56cebbe1f3fd27..d95cb7a0a25304 100644 --- a/deps/v8/build/standalone.gypi +++ b/deps/v8/build/standalone.gypi @@ -146,11 +146,17 @@ }, { 'v8_enable_gdbjit%': 0, }], - ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64")', { + ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64") and \ + (v8_target_arch!="x87")', { 'clang%': 1, }, { 'clang%': 0, }], + ['host_arch!="ppc" and host_arch!="ppc64" and host_arch!="ppc64le"', { + 'host_clang%': '1', + }, { + 'host_clang%': '0', + }], ], # Default ARM variable settings. 'arm_version%': 'default', @@ -175,16 +181,11 @@ 'default_configuration': 'Debug', 'configurations': { 'DebugBaseCommon': { - 'cflags': [ '-g', '-O0' ], 'conditions': [ - ['(v8_target_arch=="ia32" or v8_target_arch=="x87") and \ - OS=="linux"', { - 'defines': [ - '_GLIBCXX_DEBUG' - ], - }], - [ 'OS=="aix"', { - 'cflags': [ '-gxcoff' ], + ['OS=="aix"', { + 'cflags': [ '-g', '-Og', '-gxcoff' ], + }, { + 'cflags': [ '-g', '-O0' ], }], ], }, @@ -198,6 +199,19 @@ # Xcode insists on this empty entry. }, }, + 'conditions':[ + ['(clang==1 or host_clang==1) and OS!="win"', { + # This is here so that all files get recompiled after a clang roll and + # when turning clang on or off. + # (defines are passed via the command line, and build systems rebuild + # things when their commandline changes). Nothing should ever read this + # define. + 'defines': ['CR_CLANG_REVISION= Call(v8::Handle fun, - Handle data = Handle()); + static V8_DEPRECATE_SOON( + "Use maybe version", + Local Call(v8::Handle fun, + Handle data = Handle())); + // TODO(dcarney): data arg should be a MaybeLocal + static MaybeLocal Call(Local context, + v8::Handle fun, + Handle data = Handle()); /** * Returns a mirror object for the given object. */ - static Local GetMirror(v8::Handle obj); + static V8_DEPRECATE_SOON("Use maybe version", + Local GetMirror(v8::Handle obj)); + static MaybeLocal GetMirror(Local context, + v8::Handle obj); /** * Makes V8 process all pending debug messages. diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h index d0215205f5fa97..f9439c2e629445 100644 --- a/deps/v8/include/v8-profiler.h +++ b/deps/v8/include/v8-profiler.h @@ -168,21 +168,12 @@ class V8_EXPORT CpuProfiler { */ void StartProfiling(Handle title, bool record_samples = false); - /** Deprecated. Use StartProfiling instead. */ - V8_DEPRECATED("Use StartProfiling", - void StartCpuProfiling(Handle title, - bool record_samples = false)); - /** * Stops collecting CPU profile with a given title and returns it. * If the title given is empty, finishes the last profile started. */ CpuProfile* StopProfiling(Handle title); - /** Deprecated. Use StopProfiling instead. */ - V8_DEPRECATED("Use StopProfiling", - const CpuProfile* StopCpuProfiling(Handle title)); - /** * Tells the profiler whether the embedder is idle. */ @@ -271,10 +262,6 @@ class V8_EXPORT HeapGraphNode { */ SnapshotObjectId GetId() const; - /** Returns node's own size, in bytes. */ - V8_DEPRECATED("Use GetShallowSize instead", - int GetSelfSize() const); - /** Returns node's own size, in bytes. */ size_t GetShallowSize() const; @@ -326,12 +313,6 @@ class V8_EXPORT HeapSnapshot { kJSON = 0 // See format description near 'Serialize' method. }; - /** Returns heap snapshot UID (assigned by the profiler.) */ - unsigned GetUid() const; - - /** Returns heap snapshot title. */ - Handle GetTitle() const; - /** Returns the root node of the heap graph. */ const HeapGraphNode* GetRoot() const; @@ -380,7 +361,8 @@ class V8_EXPORT HeapSnapshot { * Nodes reference strings, other nodes, and edges by their indexes * in corresponding arrays. */ - void Serialize(OutputStream* stream, SerializationFormat format) const; + void Serialize(OutputStream* stream, + SerializationFormat format = kJSON) const; }; @@ -465,10 +447,9 @@ class V8_EXPORT HeapProfiler { }; /** - * Takes a heap snapshot and returns it. Title may be an empty string. + * Takes a heap snapshot and returns it. */ const HeapSnapshot* TakeHeapSnapshot( - Handle title, ActivityControl* control = NULL, ObjectNameResolver* global_object_name_resolver = NULL); @@ -490,17 +471,19 @@ class V8_EXPORT HeapProfiler { * reports updates for all previous time intervals via the OutputStream * object. Updates on each time interval are provided as a stream of the * HeapStatsUpdate structure instances. - * The return value of the function is the last seen heap object Id. + * If |timestamp_us| is supplied, timestamp of the new entry will be written + * into it. The return value of the function is the last seen heap object Id. * * StartTrackingHeapObjects must be called before the first call to this * method. */ - SnapshotObjectId GetHeapStats(OutputStream* stream); + SnapshotObjectId GetHeapStats(OutputStream* stream, + int64_t* timestamp_us = NULL); /** * Stops tracking of heap objects population statistics, cleans up all * collected data. StartHeapObjectsTracking must be called again prior to - * calling PushHeapObjectsStats next time. + * calling GetHeapStats next time. */ void StopTrackingHeapObjects(); diff --git a/deps/v8/include/v8-util.h b/deps/v8/include/v8-util.h index ca36b6c58bcf0c..b01d527754b5ce 100644 --- a/deps/v8/include/v8-util.h +++ b/deps/v8/include/v8-util.h @@ -12,7 +12,7 @@ /** * Support for Persistent containers. * - * C++11 embedders can use STL containers with UniquePersistent values, + * C++11 embedders can use STL containers with Global values, * but pre-C++11 does not support the required move semantic and hence * may want these container classes. */ @@ -22,7 +22,10 @@ typedef uintptr_t PersistentContainerValue; static const uintptr_t kPersistentContainerNotFound = 0; enum PersistentContainerCallbackType { kNotWeak, - kWeak + // These correspond to v8::WeakCallbackType + kWeakWithParameter, + kWeakWithInternalFields, + kWeak = kWeakWithParameter // For backwards compatibility. Deprecate. }; @@ -101,12 +104,12 @@ class DefaultPersistentValueMapTraits : public StdMapTraits { return K(); } static void DisposeCallbackData(WeakCallbackDataType* data) { } - static void Dispose(Isolate* isolate, UniquePersistent value, K key) { } + static void Dispose(Isolate* isolate, Global value, K key) {} }; template -class DefaultPhantomPersistentValueMapTraits : public StdMapTraits { +class DefaultGlobalMapTraits : public StdMapTraits { private: template struct RemovePointer; @@ -114,25 +117,26 @@ class DefaultPhantomPersistentValueMapTraits : public StdMapTraits { public: // Weak callback & friends: static const PersistentContainerCallbackType kCallbackType = kNotWeak; - typedef PersistentValueMap< - K, V, DefaultPhantomPersistentValueMapTraits > MapType; - typedef void PhantomCallbackDataType; + typedef PersistentValueMap > MapType; + typedef void WeakCallbackInfoType; - static PhantomCallbackDataType* PhantomCallbackParameter(MapType* map, - const K& key, - Local value) { - return NULL; + static WeakCallbackInfoType* WeakCallbackParameter(MapType* map, const K& key, + Local value) { + return nullptr; } - static MapType* MapFromPhantomCallbackData( - const PhantomCallbackData& data) { - return NULL; + static MapType* MapFromWeakCallbackInfo( + const WeakCallbackInfo& data) { + return nullptr; } - static K KeyFromPhantomCallbackData( - const PhantomCallbackData& data) { + static K KeyFromWeakCallbackInfo( + const WeakCallbackInfo& data) { return K(); } - static void DisposeCallbackData(PhantomCallbackDataType* data) {} - static void Dispose(Isolate* isolate, UniquePersistent value, K key) {} + static void DisposeCallbackData(WeakCallbackInfoType* data) {} + static void Dispose(Isolate* isolate, Global value, K key) {} + static void DisposeWeak(Isolate* isolate, + const WeakCallbackInfo& data, + K key) {} private: template @@ -143,8 +147,8 @@ class DefaultPhantomPersistentValueMapTraits : public StdMapTraits { /** - * A map wrapper that allows using UniquePersistent as a mapped value. - * C++11 embedders don't need this class, as they can use UniquePersistent + * A map wrapper that allows using Global as a mapped value. + * C++11 embedders don't need this class, as they can use Global * directly in std containers. * * The map relies on a backing map, whose type and accessors are described @@ -203,7 +207,7 @@ class PersistentValueMapBase { /** * Return value for key and remove it from the map. */ - UniquePersistent Remove(const K& key) { + Global Remove(const K& key) { return Release(Traits::Remove(&impl_, key)).Pass(); } @@ -255,7 +259,7 @@ class PersistentValueMapBase { private: friend class PersistentValueMapBase; friend class PersistentValueMap; - friend class PhantomPersistentValueMap; + friend class GlobalValueMap; explicit PersistentValueReference(PersistentContainerValue value) : value_(value) { } @@ -293,24 +297,23 @@ class PersistentValueMapBase { return reinterpret_cast(v); } - static PersistentContainerValue ClearAndLeak( - UniquePersistent* persistent) { + static PersistentContainerValue ClearAndLeak(Global* persistent) { V* v = persistent->val_; persistent->val_ = 0; return reinterpret_cast(v); } - static PersistentContainerValue Leak(UniquePersistent* persistent) { + static PersistentContainerValue Leak(Global* persistent) { return reinterpret_cast(persistent->val_); } /** - * Return a container value as UniquePersistent and make sure the weak + * Return a container value as Global and make sure the weak * callback is properly disposed of. All remove functionality should go * through this. */ - static UniquePersistent Release(PersistentContainerValue v) { - UniquePersistent p; + static Global Release(PersistentContainerValue v) { + Global p; p.val_ = FromVal(v); if (Traits::kCallbackType != kNotWeak && p.IsWeak()) { Traits::DisposeCallbackData( @@ -319,6 +322,12 @@ class PersistentValueMapBase { return p.Pass(); } + void RemoveWeak(const K& key) { + Global p; + p.val_ = FromVal(Traits::Remove(&impl_, key)); + p.Reset(); + } + private: PersistentValueMapBase(PersistentValueMapBase&); void operator=(PersistentValueMapBase&); @@ -351,17 +360,17 @@ class PersistentValueMap : public PersistentValueMapBase { /** * Put value into map. Depending on Traits::kIsWeak, the value will be held * by the map strongly or weakly. - * Returns old value as UniquePersistent. + * Returns old value as Global. */ - UniquePersistent Set(const K& key, Local value) { - UniquePersistent persistent(this->isolate(), value); + Global Set(const K& key, Local value) { + Global persistent(this->isolate(), value); return SetUnique(key, &persistent); } /** * Put value into map, like Set(const K&, Local). */ - UniquePersistent Set(const K& key, UniquePersistent value) { + Global Set(const K& key, Global value) { return SetUnique(key, &value); } @@ -369,7 +378,7 @@ class PersistentValueMap : public PersistentValueMapBase { * Put the value into the map, and set the 'weak' callback when demanded * by the Traits class. */ - UniquePersistent SetUnique(const K& key, UniquePersistent* persistent) { + Global SetUnique(const K& key, Global* persistent) { if (Traits::kCallbackType != kNotWeak) { Local value(Local::New(this->isolate(), *persistent)); persistent->template SetWeak( @@ -384,8 +393,8 @@ class PersistentValueMap : public PersistentValueMapBase { * Put a value into the map and update the reference. * Restrictions of GetReference apply here as well. */ - UniquePersistent Set(const K& key, UniquePersistent value, - PersistentValueReference* reference) { + Global Set(const K& key, Global value, + PersistentValueReference* reference) { *reference = this->Leak(&value); return SetUnique(key, &value); } @@ -406,9 +415,9 @@ class PersistentValueMap : public PersistentValueMapBase { template -class PhantomPersistentValueMap : public PersistentValueMapBase { +class GlobalValueMap : public PersistentValueMapBase { public: - explicit PhantomPersistentValueMap(Isolate* isolate) + explicit GlobalValueMap(Isolate* isolate) : PersistentValueMapBase(isolate) {} typedef @@ -418,17 +427,17 @@ class PhantomPersistentValueMap : public PersistentValueMapBase { /** * Put value into map. Depending on Traits::kIsWeak, the value will be held * by the map strongly or weakly. - * Returns old value as UniquePersistent. + * Returns old value as Global. */ - UniquePersistent Set(const K& key, Local value) { - UniquePersistent persistent(this->isolate(), value); + Global Set(const K& key, Local value) { + Global persistent(this->isolate(), value); return SetUnique(key, &persistent); } /** * Put value into map, like Set(const K&, Local). */ - UniquePersistent Set(const K& key, UniquePersistent value) { + Global Set(const K& key, Global value) { return SetUnique(key, &value); } @@ -436,11 +445,16 @@ class PhantomPersistentValueMap : public PersistentValueMapBase { * Put the value into the map, and set the 'weak' callback when demanded * by the Traits class. */ - UniquePersistent SetUnique(const K& key, UniquePersistent* persistent) { + Global SetUnique(const K& key, Global* persistent) { if (Traits::kCallbackType != kNotWeak) { + WeakCallbackType callback_type = + Traits::kCallbackType == kWeakWithInternalFields + ? WeakCallbackType::kInternalFields + : WeakCallbackType::kParameter; Local value(Local::New(this->isolate(), *persistent)); - persistent->template SetPhantom( - Traits::WeakCallbackParameter(this, key, value), WeakCallback, 0, 1); + persistent->template SetWeak( + Traits::WeakCallbackParameter(this, key, value), WeakCallback, + callback_type); } PersistentContainerValue old_value = Traits::Set(this->impl(), key, this->ClearAndLeak(persistent)); @@ -451,33 +465,32 @@ class PhantomPersistentValueMap : public PersistentValueMapBase { * Put a value into the map and update the reference. * Restrictions of GetReference apply here as well. */ - UniquePersistent Set(const K& key, UniquePersistent value, - PersistentValueReference* reference) { + Global Set(const K& key, Global value, + PersistentValueReference* reference) { *reference = this->Leak(&value); return SetUnique(key, &value); } private: static void WeakCallback( - const PhantomCallbackData& data) { + const WeakCallbackInfo& data) { if (Traits::kCallbackType != kNotWeak) { - PhantomPersistentValueMap* persistentValueMap = - Traits::MapFromPhantomCallbackData(data); - K key = Traits::KeyFromPhantomCallbackData(data); - Traits::Dispose(data.GetIsolate(), persistentValueMap->Remove(key).Pass(), - key); - Traits::DisposeCallbackData(data.GetParameter()); + GlobalValueMap* persistentValueMap = + Traits::MapFromWeakCallbackInfo(data); + K key = Traits::KeyFromWeakCallbackInfo(data); + persistentValueMap->RemoveWeak(key); + Traits::DisposeWeak(data.GetIsolate(), data, key); } } }; /** - * A map that uses UniquePersistent as value and std::map as the backing + * A map that uses Global as value and std::map as the backing * implementation. Persistents are held non-weak. * * C++11 embedders don't need this class, as they can use - * UniquePersistent directly in std containers. + * Global directly in std containers. */ template > @@ -514,8 +527,8 @@ class DefaultPersistentValueVectorTraits { /** - * A vector wrapper that safely stores UniquePersistent values. - * C++11 embedders don't need this class, as they can use UniquePersistent + * A vector wrapper that safely stores Global values. + * C++11 embedders don't need this class, as they can use Global * directly in std containers. * * This class relies on a backing vector implementation, whose type and methods @@ -536,14 +549,14 @@ class PersistentValueVector { * Append a value to the vector. */ void Append(Local value) { - UniquePersistent persistent(isolate_, value); + Global persistent(isolate_, value); Traits::Append(&impl_, ClearAndLeak(&persistent)); } /** * Append a persistent's value to the vector. */ - void Append(UniquePersistent persistent) { + void Append(Global persistent) { Traits::Append(&impl_, ClearAndLeak(&persistent)); } @@ -574,7 +587,7 @@ class PersistentValueVector { void Clear() { size_t length = Traits::Size(&impl_); for (size_t i = 0; i < length; i++) { - UniquePersistent p; + Global p; p.val_ = FromVal(Traits::Get(&impl_, i)); } Traits::Clear(&impl_); @@ -589,8 +602,7 @@ class PersistentValueVector { } private: - static PersistentContainerValue ClearAndLeak( - UniquePersistent* persistent) { + static PersistentContainerValue ClearAndLeak(Global* persistent) { V* v = persistent->val_; persistent->val_ = 0; return reinterpret_cast(v); @@ -606,4 +618,4 @@ class PersistentValueVector { } // namespace v8 -#endif // V8_UTIL_H_ +#endif // V8_UTIL_H diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index f10bf50780a9cb..9cdb1259216c19 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -9,9 +9,9 @@ // NOTE these macros are used by some of the tool scripts and the build // system so their names cannot be changed without changing the scripts. #define V8_MAJOR_VERSION 4 -#define V8_MINOR_VERSION 2 -#define V8_BUILD_NUMBER 77 -#define V8_PATCH_LEVEL 20 +#define V8_MINOR_VERSION 3 +#define V8_BUILD_NUMBER 61 +#define V8_PATCH_LEVEL 21 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index e325fd6d752e73..d3543f282fd19e 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -81,6 +81,8 @@ class ImplementationUtilities; class Int32; class Integer; class Isolate; +template +class Maybe; class Name; class Number; class NumberObject; @@ -93,6 +95,7 @@ class Promise; class RawOperationDescriptor; class Script; class Signature; +class StartupData; class StackFrame; class StackTrace; class String; @@ -105,17 +108,20 @@ class Utils; class Value; template class Handle; template class Local; +template +class MaybeLocal; template class Eternal; template class NonCopyablePersistentTraits; template class PersistentBase; template > class Persistent; -template class UniquePersistent; +template +class Global; template class PersistentValueMap; template class PersistentValueMapBase; template -class PhantomPersistentValueMap; +class GlobalValueMap; template class PersistentValueVector; template class WeakCallbackObject; class FunctionTemplate; @@ -141,20 +147,6 @@ template class CustomArguments; class PropertyCallbackArguments; class FunctionCallbackArguments; class GlobalHandles; - -template -class CallbackData { - public: - V8_INLINE v8::Isolate* GetIsolate() const { return isolate_; } - - explicit CallbackData(v8::Isolate* isolate, T* parameter) - : isolate_(isolate), parameter_(parameter) {} - V8_INLINE T* GetParameter() const { return parameter_; } - - private: - v8::Isolate* isolate_; - T* parameter_; -}; } @@ -321,6 +313,8 @@ template class Handle { template friend class PersistentBase; template friend class Handle; template friend class Local; + template + friend class MaybeLocal; template friend class FunctionCallbackInfo; template friend class PropertyCallbackInfo; template friend class internal::CustomArguments; @@ -398,6 +392,8 @@ template class Local : public Handle { template friend class Persistent; template friend class Handle; template friend class Local; + template + friend class MaybeLocal; template friend class FunctionCallbackInfo; template friend class PropertyCallbackInfo; friend class String; @@ -415,6 +411,47 @@ template class Local : public Handle { }; +/** + * A MaybeLocal<> is a wrapper around Local<> that enforces a check whether + * the Local<> is empty before it can be used. + * + * If an API method returns a MaybeLocal<>, the API method can potentially fail + * either because an exception is thrown, or because an exception is pending, + * e.g. because a previous API call threw an exception that hasn't been caught + * yet, or because a TerminateExecution exception was thrown. In that case, an + * empty MaybeLocal is returned. + */ +template +class MaybeLocal { + public: + V8_INLINE MaybeLocal() : val_(nullptr) {} + template + V8_INLINE MaybeLocal(Local that) + : val_(reinterpret_cast(*that)) { + TYPE_CHECK(T, S); + } + + V8_INLINE bool IsEmpty() const { return val_ == nullptr; } + + template + V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local* out) const { + out->val_ = IsEmpty() ? nullptr : this->val_; + return !IsEmpty(); + } + + // Will crash when checks are enabled if the MaybeLocal<> is empty. + V8_INLINE Local ToLocalChecked(); + + template + V8_INLINE Local FromMaybe(Local default_value) const { + return IsEmpty() ? default_value : Local(val_); + } + + private: + T* val_; +}; + + // Eternal handles are set-once handles that live for the life of the isolate. template class Eternal { public: @@ -434,42 +471,79 @@ template class Eternal { }; +static const int kInternalFieldsInWeakCallback = 2; + + template -class PhantomCallbackData : public internal::CallbackData { +class WeakCallbackInfo { public: - typedef void (*Callback)(const PhantomCallbackData& data); + typedef void (*Callback)(const WeakCallbackInfo& data); + + WeakCallbackInfo(Isolate* isolate, T* parameter, + void* internal_fields[kInternalFieldsInWeakCallback], + Callback* callback) + : isolate_(isolate), parameter_(parameter), callback_(callback) { + for (int i = 0; i < kInternalFieldsInWeakCallback; ++i) { + internal_fields_[i] = internal_fields[i]; + } + } + + V8_INLINE Isolate* GetIsolate() const { return isolate_; } + V8_INLINE T* GetParameter() const { return parameter_; } + V8_INLINE void* GetInternalField(int index) const; - V8_INLINE void* GetInternalField1() const { return internal_field1_; } - V8_INLINE void* GetInternalField2() const { return internal_field2_; } + V8_INLINE V8_DEPRECATE_SOON("use indexed version", + void* GetInternalField1()) const { + return internal_fields_[0]; + } + V8_INLINE V8_DEPRECATE_SOON("use indexed version", + void* GetInternalField2()) const { + return internal_fields_[1]; + } - PhantomCallbackData(Isolate* isolate, T* parameter, void* internal_field1, - void* internal_field2) - : internal::CallbackData(isolate, parameter), - internal_field1_(internal_field1), - internal_field2_(internal_field2) {} + bool IsFirstPass() const { return callback_ != nullptr; } + + // When first called, the embedder MUST Reset() the Global which triggered the + // callback. The Global itself is unusable for anything else. No v8 other api + // calls may be called in the first callback. Should additional work be + // required, the embedder must set a second pass callback, which will be + // called after all the initial callbacks are processed. + // Calling SetSecondPassCallback on the second pass will immediately crash. + void SetSecondPassCallback(Callback callback) const { *callback_ = callback; } private: - void* internal_field1_; - void* internal_field2_; + Isolate* isolate_; + T* parameter_; + Callback* callback_; + void* internal_fields_[kInternalFieldsInWeakCallback]; }; template -class WeakCallbackData : public internal::CallbackData

{ +class WeakCallbackData { public: typedef void (*Callback)(const WeakCallbackData& data); + WeakCallbackData(Isolate* isolate, P* parameter, Local handle) + : isolate_(isolate), parameter_(parameter), handle_(handle) {} + + V8_INLINE Isolate* GetIsolate() const { return isolate_; } + V8_INLINE P* GetParameter() const { return parameter_; } V8_INLINE Local GetValue() const { return handle_; } private: - friend class internal::GlobalHandles; - WeakCallbackData(Isolate* isolate, P* parameter, Local handle) - : internal::CallbackData

(isolate, parameter), handle_(handle) {} + Isolate* isolate_; + P* parameter_; Local handle_; }; -static const int kNoInternalFieldIndex = -1; +// TODO(dcarney): delete this with WeakCallbackData +template +using PhantomCallbackData = WeakCallbackInfo; + + +enum class WeakCallbackType { kParameter, kInternalFields }; /** @@ -542,15 +616,17 @@ template class PersistentBase { * As always, GC-based finalization should *not* be relied upon for any * critical form of resource management! */ - template - V8_INLINE void SetWeak( - P* parameter, - typename WeakCallbackData::Callback callback); + template + V8_INLINE V8_DEPRECATE_SOON( + "use WeakCallbackInfo version", + void SetWeak(P* parameter, + typename WeakCallbackData::Callback callback)); - template - V8_INLINE void SetWeak( - P* parameter, - typename WeakCallbackData::Callback callback); + template + V8_INLINE V8_DEPRECATE_SOON( + "use WeakCallbackInfo version", + void SetWeak(P* parameter, + typename WeakCallbackData::Callback callback)); // Phantom persistents work like weak persistents, except that the pointer to // the object being collected is not available in the finalization callback. @@ -559,10 +635,17 @@ template class PersistentBase { // specify a parameter for the callback or the location of two internal // fields in the dying object. template - V8_INLINE void SetPhantom(P* parameter, - typename PhantomCallbackData

::Callback callback, - int internal_field_index1 = kNoInternalFieldIndex, - int internal_field_index2 = kNoInternalFieldIndex); + V8_INLINE V8_DEPRECATE_SOON( + "use SetWeak", + void SetPhantom(P* parameter, + typename WeakCallbackInfo

::Callback callback, + int internal_field_index1 = -1, + int internal_field_index2 = -1)); + + template + V8_INLINE void SetWeak(P* parameter, + typename WeakCallbackInfo

::Callback callback, + WeakCallbackType type); template V8_INLINE P* ClearWeak(); @@ -614,7 +697,8 @@ template class PersistentBase { template friend class Handle; template friend class Local; template friend class Persistent; - template friend class UniquePersistent; + template + friend class Global; template friend class PersistentBase; template friend class ReturnValue; template @@ -623,8 +707,8 @@ template class PersistentBase { friend class Object; explicit V8_INLINE PersistentBase(T* val) : val_(val) {} - PersistentBase(PersistentBase& other); // NOLINT - void operator=(PersistentBase&); + PersistentBase(PersistentBase& other) = delete; // NOLINT + void operator=(PersistentBase&) = delete; V8_INLINE static T* New(Isolate* isolate, T* that); T* val_; @@ -770,72 +854,74 @@ template class Persistent : public PersistentBase { * * Note: Persistent class hierarchy is subject to future changes. */ -template -class UniquePersistent : public PersistentBase { - struct RValue { - V8_INLINE explicit RValue(UniquePersistent* obj) : object(obj) {} - UniquePersistent* object; - }; - +template +class Global : public PersistentBase { public: /** - * A UniquePersistent with no storage cell. + * A Global with no storage cell. */ - V8_INLINE UniquePersistent() : PersistentBase(0) { } + V8_INLINE Global() : PersistentBase(nullptr) {} /** - * Construct a UniquePersistent from a Handle. + * Construct a Global from a Handle. * When the Handle is non-empty, a new storage cell is created * pointing to the same object, and no flags are set. */ template - V8_INLINE UniquePersistent(Isolate* isolate, Handle that) + V8_INLINE Global(Isolate* isolate, Handle that) : PersistentBase(PersistentBase::New(isolate, *that)) { TYPE_CHECK(T, S); } /** - * Construct a UniquePersistent from a PersistentBase. + * Construct a Global from a PersistentBase. * When the Persistent is non-empty, a new storage cell is created * pointing to the same object, and no flags are set. */ template - V8_INLINE UniquePersistent(Isolate* isolate, const PersistentBase& that) - : PersistentBase(PersistentBase::New(isolate, that.val_)) { + V8_INLINE Global(Isolate* isolate, const PersistentBase& that) + : PersistentBase(PersistentBase::New(isolate, that.val_)) { TYPE_CHECK(T, S); } /** * Move constructor. */ - V8_INLINE UniquePersistent(RValue rvalue) - : PersistentBase(rvalue.object->val_) { - rvalue.object->val_ = 0; + V8_INLINE Global(Global&& other) : PersistentBase(other.val_) { + other.val_ = nullptr; } - V8_INLINE ~UniquePersistent() { this->Reset(); } + V8_INLINE ~Global() { this->Reset(); } /** * Move via assignment. */ - template - V8_INLINE UniquePersistent& operator=(UniquePersistent rhs) { + template + V8_INLINE Global& operator=(Global&& rhs) { TYPE_CHECK(T, S); - this->Reset(); - this->val_ = rhs.val_; - rhs.val_ = 0; + if (this != &rhs) { + this->Reset(); + this->val_ = rhs.val_; + rhs.val_ = nullptr; + } return *this; } - /** - * Cast operator for moves. - */ - V8_INLINE operator RValue() { return RValue(this); } /** * Pass allows returning uniques from functions, etc. */ - UniquePersistent Pass() { return UniquePersistent(RValue(this)); } + Global Pass() { return static_cast(*this); } + + /* + * For compatibility with Chromium's base::Bind (base::Passed). + */ + typedef void MoveOnlyTypeForCPP03; private: - UniquePersistent(UniquePersistent&); - void operator=(UniquePersistent&); + Global(Global&) = delete; + void operator=(Global&) = delete; }; +// UniquePersistent is an alias for Global for historical reason. +template +using UniquePersistent = Global; + + /** * A stack-allocated class that governs a number of local handles. * After a handle scope has been created, all local handles will be @@ -951,28 +1037,6 @@ class V8_EXPORT SealHandleScope { }; -/** - * A simple Maybe type, representing an object which may or may not have a - * value. - */ -template -struct Maybe { - Maybe() : has_value(false) {} - explicit Maybe(T t) : has_value(true), value(t) {} - Maybe(bool has, T t) : has_value(has), value(t) {} - - bool has_value; - T value; -}; - - -// Convenience wrapper. -template -inline Maybe maybe(T t) { - return Maybe(t); -} - - // --- Special objects --- @@ -996,13 +1060,15 @@ class ScriptOrigin { Handle resource_column_offset = Handle(), Handle resource_is_shared_cross_origin = Handle(), Handle script_id = Handle(), - Handle resource_is_embedder_debug_script = Handle()) + Handle resource_is_embedder_debug_script = Handle(), + Handle source_map_url = Handle()) : resource_name_(resource_name), resource_line_offset_(resource_line_offset), resource_column_offset_(resource_column_offset), resource_is_embedder_debug_script_(resource_is_embedder_debug_script), resource_is_shared_cross_origin_(resource_is_shared_cross_origin), - script_id_(script_id) {} + script_id_(script_id), + source_map_url_(source_map_url) {} V8_INLINE Handle ResourceName() const; V8_INLINE Handle ResourceLineOffset() const; V8_INLINE Handle ResourceColumnOffset() const; @@ -1012,6 +1078,7 @@ class ScriptOrigin { V8_INLINE Handle ResourceIsEmbedderDebugScript() const; V8_INLINE Handle ResourceIsSharedCrossOrigin() const; V8_INLINE Handle ScriptID() const; + V8_INLINE Handle SourceMapUrl() const; private: Handle resource_name_; @@ -1020,6 +1087,7 @@ class ScriptOrigin { Handle resource_is_embedder_debug_script_; Handle resource_is_shared_cross_origin_; Handle script_id_; + Handle source_map_url_; }; @@ -1064,19 +1132,25 @@ class V8_EXPORT Script { /** * A shorthand for ScriptCompiler::Compile(). */ - static Local