diff --git a/deps/v8/.ycm_extra_conf.py b/deps/v8/.ycm_extra_conf.py index e065a0896bdb82..a451d9f31c34b0 100644 --- a/deps/v8/.ycm_extra_conf.py +++ b/deps/v8/.ycm_extra_conf.py @@ -42,7 +42,7 @@ # Flags from YCM's default config. flags = [ '-DUSE_CLANG_COMPLETER', -'-std=gnu++0x', +'-std=gnu++11', '-x', 'c++', ] diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index ceffb49a99be45..60b6c51db5eb1a 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -71,6 +71,7 @@ Jianghua Yang Joel Stanley Johan Bergström Jonathan Liu +Julien Brianceau JunHo Seo Kang-Hao (Kenny) Lu Karl Skomski @@ -87,6 +88,7 @@ Michael Smith Mike Gilbert Mike Pennisi Milton Chiang +Myeong-bo Shim Nicolas Antonius Ernst Leopold Maria Kaiser Paolo Giarrusso Patrick Gansterer diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 5f3baf23c9cff6..28aca24afc81c4 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -21,6 +21,12 @@ declare_args() { # Enable the snapshot feature, for fast context creation. # http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html v8_use_snapshot = true + + # Similar to vfp but on MIPS. + v8_can_use_fpu_instructions = true + + # Similar to the ARM hard float ABI but on MIPS. + v8_use_mips_abi_hardfloat = true } # TODO(jochen): These will need to be user-settable to support standalone V8 @@ -28,7 +34,7 @@ declare_args() { v8_deprecation_warnings = false v8_enable_disassembler = false v8_enable_gdbjit = false -v8_enable_handle_zapping = is_debug +v8_enable_handle_zapping = false v8_enable_i18n_support = true v8_enable_verify_heap = false v8_interpreted_regexp = false @@ -77,6 +83,11 @@ config("internal_config_base") { include_dirs = [ "." ] } +# This config should be applied to code using the libplatform. +config("libplatform_config") { + include_dirs = [ "include" ] +} + # This config should only be applied to code using V8 and not any V8 code # itself. config("external_config") { @@ -137,48 +148,93 @@ config("toolchain") { defines = [] cflags = [] - # TODO(jochen): Add support for arm subarchs, mips, mipsel, mips64el. - if (v8_target_arch == "arm") { defines += [ "V8_TARGET_ARCH_ARM" ] - 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. + 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_ARMV7_INSTRUCTIONS", "CAN_USE_VFP3_INSTRUCTIONS", "CAN_USE_VFP32DREGS", - "USE_EABI_HARDFLOAT=0", + "CAN_USE_NEON", ] } - # TODO(jochen): Add support for arm_test_noprobe. + + if (current_cpu != "arm") { + # These defines ares used for the ARM simulator. + if (arm_float_abi == "hard") { + defines += [ "USE_EABI_HARDFLOAT=1" ] + } else if (arm_float_abi == "softfp") { + defines += [ "USE_EABI_HARDFLOAT=0" ] + } + } } if (v8_target_arch == "arm64") { defines += [ "V8_TARGET_ARCH_ARM64" ] } + # TODO(jochen): Add support for mips. if (v8_target_arch == "mipsel") { defines += [ "V8_TARGET_ARCH_MIPS" ] + if (v8_can_use_fpu_instructions) { + defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] + } + if (v8_use_mips_abi_hardfloat) { + defines += [ + "__mips_hard_float=1", + "CAN_USE_FPU_INSTRUCTIONS", + ] + } else { + defines += [ "__mips_soft_float=1" ] + } + if (mips_arch_variant == "r6") { + defines += [ + "_MIPS_ARCH_MIPS32R6", + "FPU_MODE_FP64", + ] + } else if (mips_arch_variant == "r2") { + defines += [ "_MIPS_ARCH_MIPS32R2" ] + if (mips_fpu_mode == "fp64") { + defines += [ "FPU_MODE_FP64" ] + } else if (mips_fpu_mode == "fpxx") { + defines += [ "FPU_MODE_FPXX" ] + } else if (mips_fpu_mode == "fp32") { + defines += [ "FPU_MODE_FP32" ] + } + } else if (mips_arch_variant == "r1") { + defines += [ "FPU_MODE_FP32" ] + } + # TODO(jochen): Add support for mips_arch_variant rx and loongson. } + # TODO(jochen): Add support for mips64. if (v8_target_arch == "mips64el") { defines += [ "V8_TARGET_ARCH_MIPS64" ] + if (v8_can_use_fpu_instructions) { + defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] + } + # TODO(jochen): Add support for big endian host byteorder. + defines += [ "V8_TARGET_ARCH_MIPS64_LE" ] + if (v8_use_mips_abi_hardfloat) { + defines += [ + "__mips_hard_float=1", + "CAN_USE_FPU_INSTRUCTIONS", + ] + } else { + defines += [ "__mips_soft_float=1" ] + } + if (mips_arch_variant == "r6") { + defines += [ "_MIPS_ARCH_MIPS64R6" ] + } else if (mips_arch_variant == "r2") { + defines += [ "_MIPS_ARCH_MIPS64R2" ] + } } if (v8_target_arch == "s390") { defines += [ "V8_TARGET_ARCH_S390" ] @@ -227,8 +283,11 @@ action("js2c") { # The script depends on this other script, this rule causes a rebuild if it # changes. - inputs = [ "tools/jsmin.py" ] + inputs = [ + "tools/jsmin.py", + ] + # NOSORT sources = [ "src/js/macros.py", "src/messages.h", @@ -257,6 +316,7 @@ action("js2c") { "src/js/string-iterator.js", "src/js/templates.js", "src/js/spread.js", + "src/js/proxy.js", "src/debug/mirrors.js", "src/debug/debug.js", "src/debug/liveedit.js", @@ -291,21 +351,24 @@ action("js2c_experimental") { # The script depends on this other script, this rule causes a rebuild if it # changes. - inputs = [ "tools/jsmin.py" ] + inputs = [ + "tools/jsmin.py", + ] + # NOSORT sources = [ "src/js/macros.py", "src/messages.h", - "src/js/proxy.js", "src/js/generator.js", "src/js/harmony-atomics.js", - "src/js/harmony-regexp.js", + "src/js/harmony-regexp-exec.js", "src/js/harmony-object-observe.js", "src/js/harmony-sharedarraybuffer.js", "src/js/harmony-simd.js", "src/js/harmony-species.js", "src/js/harmony-unicode-regexps.js", - "src/js/promise-extra.js" + "src/js/harmony-string-padding.js", + "src/js/promise-extra.js", ] outputs = [ @@ -334,7 +397,9 @@ action("js2c_extras") { # The script depends on this other script, this rule causes a rebuild if it # changes. - inputs = [ "tools/jsmin.py" ] + inputs = [ + "tools/jsmin.py", + ] sources = v8_extra_library_files @@ -343,8 +408,7 @@ action("js2c_extras") { ] args = [ - rebase_path("$target_gen_dir/extras-libraries.cc", - root_build_dir), + rebase_path("$target_gen_dir/extras-libraries.cc", root_build_dir), "EXTRAS", ] + rebase_path(sources, root_build_dir) @@ -364,7 +428,9 @@ action("js2c_experimental_extras") { # The script depends on this other script, this rule causes a rebuild if it # changes. - inputs = [ "tools/jsmin.py" ] + inputs = [ + "tools/jsmin.py", + ] sources = v8_experimental_extra_library_files @@ -382,7 +448,8 @@ action("js2c_experimental_extras") { outputs += [ "$target_gen_dir/libraries_experimental_extras.bin" ] args += [ "--startup_blob", - rebase_path("$target_gen_dir/libraries_experimental_extras.bin", root_build_dir), + rebase_path("$target_gen_dir/libraries_experimental_extras.bin", + root_build_dir), ] } } @@ -392,6 +459,7 @@ action("d8_js2c") { script = "tools/js2c.py" + # NOSORT inputs = [ "src/d8.js", "src/js/macros.py", @@ -425,10 +493,11 @@ if (v8_use_external_startup_data) { deps = [ ":js2c", ":js2c_experimental", - ":js2c_extras", ":js2c_experimental_extras", + ":js2c_extras", ] + # NOSORT sources = [ "$target_gen_dir/libraries.bin", "$target_gen_dir/libraries_experimental.bin", @@ -456,6 +525,7 @@ action("postmortem-metadata") { script = "tools/gen-postmortem-metadata.py" + # NOSORT sources = [ "src/objects.h", "src/objects-inl.h", @@ -486,9 +556,6 @@ action("run_mksnapshot") { "./" + rebase_path(get_label_info(":mksnapshot($snapshot_toolchain)", "root_out_dir") + "/mksnapshot", root_build_dir), - "--log-snapshot-positions", - "--logfile", - rebase_path("$target_gen_dir/snapshot.log", root_build_dir), "--startup_src", rebase_path("$target_gen_dir/snapshot.cc", root_build_dir), ] @@ -519,16 +586,16 @@ source_set("v8_nosnapshot") { deps = [ ":js2c", ":js2c_experimental", - ":js2c_extras", ":js2c_experimental_extras", + ":js2c_extras", ":v8_base", ] sources = [ - "$target_gen_dir/libraries.cc", + "$target_gen_dir/experimental-extras-libraries.cc", "$target_gen_dir/experimental-libraries.cc", "$target_gen_dir/extras-libraries.cc", - "$target_gen_dir/experimental-extras-libraries.cc", + "$target_gen_dir/libraries.cc", "src/snapshot/snapshot-empty.cc", ] @@ -552,8 +619,8 @@ source_set("v8_snapshot") { deps = [ ":js2c", ":js2c_experimental", - ":js2c_extras", ":js2c_experimental_extras", + ":js2c_extras", ":v8_base", ] public_deps = [ @@ -563,10 +630,10 @@ source_set("v8_snapshot") { ] sources = [ - "$target_gen_dir/libraries.cc", + "$target_gen_dir/experimental-extras-libraries.cc", "$target_gen_dir/experimental-libraries.cc", "$target_gen_dir/extras-libraries.cc", - "$target_gen_dir/experimental-extras-libraries.cc", + "$target_gen_dir/libraries.cc", "$target_gen_dir/snapshot.cc", ] @@ -586,8 +653,8 @@ if (v8_use_external_startup_data) { deps = [ ":js2c", ":js2c_experimental", - ":js2c_extras", ":js2c_experimental_extras", + ":js2c_extras", ":v8_base", ] public_deps = [ @@ -629,22 +696,24 @@ source_set("v8_base") { "src/accessors.h", "src/address-map.cc", "src/address-map.h", - "src/allocation.cc", - "src/allocation.h", "src/allocation-site-scopes.cc", "src/allocation-site-scopes.h", - "src/api.cc", - "src/api.h", + "src/allocation.cc", + "src/allocation.h", + "src/api-arguments.cc", + "src/api-arguments.h", "src/api-experimental.cc", "src/api-experimental.h", "src/api-natives.cc", "src/api-natives.h", + "src/api.cc", + "src/api.h", "src/arguments.cc", "src/arguments.h", "src/assembler.cc", "src/assembler.h", - "src/assert-scope.h", "src/assert-scope.cc", + "src/assert-scope.h", "src/ast/ast-expression-rewriter.cc", "src/ast/ast-expression-rewriter.h", "src/ast/ast-expression-visitor.cc", @@ -684,27 +753,30 @@ source_set("v8_base") { "src/bootstrapper.h", "src/builtins.cc", "src/builtins.h", - "src/cancelable-task.cc", - "src/cancelable-task.h", "src/cached-powers.cc", "src/cached-powers.h", - "src/char-predicates.cc", + "src/cancelable-task.cc", + "src/cancelable-task.h", "src/char-predicates-inl.h", + "src/char-predicates.cc", "src/char-predicates.h", "src/checks.h", "src/code-factory.cc", "src/code-factory.h", + "src/code-stubs-hydrogen.cc", "src/code-stubs.cc", "src/code-stubs.h", - "src/code-stubs-hydrogen.cc", "src/codegen.cc", "src/codegen.h", + "src/collector.h", "src/compilation-cache.cc", "src/compilation-cache.h", "src/compilation-dependencies.cc", "src/compilation-dependencies.h", "src/compilation-statistics.cc", "src/compilation-statistics.h", + "src/compiler.cc", + "src/compiler.h", "src/compiler/access-builder.cc", "src/compiler/access-builder.h", "src/compiler/access-info.cc", @@ -723,9 +795,9 @@ source_set("v8_base") { "src/compiler/bytecode-branch-analysis.h", "src/compiler/bytecode-graph-builder.cc", "src/compiler/bytecode-graph-builder.h", + "src/compiler/c-linkage.cc", "src/compiler/change-lowering.cc", "src/compiler/change-lowering.h", - "src/compiler/c-linkage.cc", "src/compiler/coalesced-live-ranges.cc", "src/compiler/coalesced-live-ranges.h", "src/compiler/code-generator-impl.h", @@ -748,18 +820,16 @@ source_set("v8_base") { "src/compiler/dead-code-elimination.cc", "src/compiler/dead-code-elimination.h", "src/compiler/diamond.h", - "src/compiler/escape-analysis.cc", - "src/compiler/escape-analysis.h", "src/compiler/escape-analysis-reducer.cc", "src/compiler/escape-analysis-reducer.h", - "src/compiler/fast-accessor-assembler.cc", - "src/compiler/fast-accessor-assembler.h", - "src/compiler/frame.cc", - "src/compiler/frame.h", + "src/compiler/escape-analysis.cc", + "src/compiler/escape-analysis.h", "src/compiler/frame-elider.cc", "src/compiler/frame-elider.h", "src/compiler/frame-states.cc", "src/compiler/frame-states.h", + "src/compiler/frame.cc", + "src/compiler/frame.h", "src/compiler/gap-resolver.cc", "src/compiler/gap-resolver.h", "src/compiler/graph-reducer.cc", @@ -800,10 +870,10 @@ source_set("v8_base") { "src/compiler/js-global-object-specialization.h", "src/compiler/js-graph.cc", "src/compiler/js-graph.h", - "src/compiler/js-inlining.cc", - "src/compiler/js-inlining.h", "src/compiler/js-inlining-heuristic.cc", "src/compiler/js-inlining-heuristic.h", + "src/compiler/js-inlining.cc", + "src/compiler/js-inlining.h", "src/compiler/js-intrinsic-lowering.cc", "src/compiler/js-intrinsic-lowering.h", "src/compiler/js-native-context-specialization.cc", @@ -822,9 +892,9 @@ source_set("v8_base") { "src/compiler/liveness-analyzer.h", "src/compiler/load-elimination.cc", "src/compiler/load-elimination.h", - "src/compiler/loop-peeling.cc", "src/compiler/loop-analysis.cc", "src/compiler/loop-analysis.h", + "src/compiler/loop-peeling.cc", "src/compiler/machine-operator-reducer.cc", "src/compiler/machine-operator-reducer.h", "src/compiler/machine-operator.cc", @@ -850,16 +920,16 @@ source_set("v8_base") { "src/compiler/operator.h", "src/compiler/osr.cc", "src/compiler/osr.h", - "src/compiler/pipeline.cc", - "src/compiler/pipeline.h", "src/compiler/pipeline-statistics.cc", "src/compiler/pipeline-statistics.h", + "src/compiler/pipeline.cc", + "src/compiler/pipeline.h", "src/compiler/raw-machine-assembler.cc", "src/compiler/raw-machine-assembler.h", - "src/compiler/register-allocator.cc", - "src/compiler/register-allocator.h", "src/compiler/register-allocator-verifier.cc", "src/compiler/register-allocator-verifier.h", + "src/compiler/register-allocator.cc", + "src/compiler/register-allocator.h", "src/compiler/representation-change.cc", "src/compiler/representation-change.h", "src/compiler/schedule.cc", @@ -895,8 +965,6 @@ source_set("v8_base") { "src/compiler/wasm-linkage.cc", "src/compiler/zone-pool.cc", "src/compiler/zone-pool.h", - "src/compiler.cc", - "src/compiler.h", "src/context-measure.cc", "src/context-measure.h", "src/contexts-inl.h", @@ -907,11 +975,11 @@ source_set("v8_base") { "src/conversions.h", "src/counters.cc", "src/counters.h", + "src/crankshaft/compilation-phase.cc", + "src/crankshaft/compilation-phase.h", "src/crankshaft/hydrogen-alias-analysis.h", "src/crankshaft/hydrogen-bce.cc", "src/crankshaft/hydrogen-bce.h", - "src/crankshaft/hydrogen-bch.cc", - "src/crankshaft/hydrogen-bch.h", "src/crankshaft/hydrogen-canonicalize.cc", "src/crankshaft/hydrogen-canonicalize.h", "src/crankshaft/hydrogen-check-elimination.cc", @@ -1011,12 +1079,16 @@ source_set("v8_base") { "src/extensions/statistics-extension.h", "src/extensions/trigger-failure-extension.cc", "src/extensions/trigger-failure-extension.h", + "src/external-reference-table.cc", + "src/external-reference-table.h", "src/factory.cc", "src/factory.h", + "src/fast-accessor-assembler.cc", + "src/fast-accessor-assembler.h", "src/fast-dtoa.cc", "src/fast-dtoa.h", - "src/field-index.h", "src/field-index-inl.h", + "src/field-index.h", "src/field-type.cc", "src/field-type.h", "src/fixed-dtoa.cc", @@ -1064,47 +1136,43 @@ source_set("v8_base") { "src/heap/objects-visiting-inl.h", "src/heap/objects-visiting.cc", "src/heap/objects-visiting.h", + "src/heap/page-parallel-job.h", "src/heap/remembered-set.cc", "src/heap/remembered-set.h", - "src/heap/scavenge-job.h", "src/heap/scavenge-job.cc", + "src/heap/scavenge-job.h", "src/heap/scavenger-inl.h", "src/heap/scavenger.cc", "src/heap/scavenger.h", "src/heap/slot-set.h", - "src/heap/slots-buffer.cc", - "src/heap/slots-buffer.h", "src/heap/spaces-inl.h", "src/heap/spaces.cc", "src/heap/spaces.h", - "src/heap/store-buffer-inl.h", "src/heap/store-buffer.cc", "src/heap/store-buffer.h", "src/i18n.cc", "src/i18n.h", - "src/icu_util.cc", - "src/icu_util.h", "src/ic/access-compiler.cc", "src/ic/access-compiler.h", "src/ic/call-optimization.cc", "src/ic/call-optimization.h", "src/ic/handler-compiler.cc", "src/ic/handler-compiler.h", + "src/ic/ic-compiler.cc", + "src/ic/ic-compiler.h", "src/ic/ic-inl.h", "src/ic/ic-state.cc", "src/ic/ic-state.h", "src/ic/ic.cc", "src/ic/ic.h", - "src/ic/ic-compiler.cc", - "src/ic/ic-compiler.h", "src/ic/stub-cache.cc", "src/ic/stub-cache.h", + "src/icu_util.cc", + "src/icu_util.h", "src/identity-map.cc", "src/identity-map.h", "src/interface-descriptors.cc", "src/interface-descriptors.h", - "src/interpreter/bytecodes.cc", - "src/interpreter/bytecodes.h", "src/interpreter/bytecode-array-builder.cc", "src/interpreter/bytecode-array-builder.h", "src/interpreter/bytecode-array-iterator.cc", @@ -1114,18 +1182,20 @@ source_set("v8_base") { "src/interpreter/bytecode-register-allocator.cc", "src/interpreter/bytecode-register-allocator.h", "src/interpreter/bytecode-traits.h", + "src/interpreter/bytecodes.cc", + "src/interpreter/bytecodes.h", "src/interpreter/constant-array-builder.cc", "src/interpreter/constant-array-builder.h", "src/interpreter/control-flow-builders.cc", "src/interpreter/control-flow-builders.h", "src/interpreter/handler-table-builder.cc", "src/interpreter/handler-table-builder.h", - "src/interpreter/interpreter.cc", - "src/interpreter/interpreter.h", "src/interpreter/interpreter-assembler.cc", "src/interpreter/interpreter-assembler.h", - "src/interpreter/register-translator.cc", - "src/interpreter/register-translator.h", + "src/interpreter/interpreter-intrinsics.cc", + "src/interpreter/interpreter-intrinsics.h", + "src/interpreter/interpreter.cc", + "src/interpreter/interpreter.h", "src/interpreter/source-position-table.cc", "src/interpreter/source-position-table.h", "src/isolate-inl.h", @@ -1133,8 +1203,8 @@ source_set("v8_base") { "src/isolate.h", "src/json-parser.h", "src/json-stringifier.h", - "src/key-accumulator.h", - "src/key-accumulator.cc", + "src/keys.cc", + "src/keys.h", "src/layout-descriptor-inl.h", "src/layout-descriptor.cc", "src/layout-descriptor.h", @@ -1147,9 +1217,9 @@ source_set("v8_base") { "src/log.h", "src/lookup.cc", "src/lookup.h", - "src/macro-assembler.h", "src/machine-type.cc", "src/machine-type.h", + "src/macro-assembler.h", "src/messages.cc", "src/messages.h", "src/msan.h", @@ -1188,6 +1258,8 @@ source_set("v8_base") { "src/parsing/token.h", "src/pending-compilation-error-handler.cc", "src/pending-compilation-error-handler.h", + "src/perf-jit.cc", + "src/perf-jit.h", "src/profiler/allocation-tracker.cc", "src/profiler/allocation-tracker.h", "src/profiler/circular-queue-inl.h", @@ -1279,19 +1351,29 @@ source_set("v8_base") { "src/signature.h", "src/simulator.h", "src/small-pointer-list.h", - "src/snapshot/natives.h", + "src/snapshot/code-serializer.cc", + "src/snapshot/code-serializer.h", + "src/snapshot/deserializer.cc", + "src/snapshot/deserializer.h", "src/snapshot/natives-common.cc", - "src/snapshot/serialize.cc", - "src/snapshot/serialize.h", + "src/snapshot/natives.h", + "src/snapshot/partial-serializer.cc", + "src/snapshot/partial-serializer.h", + "src/snapshot/serializer-common.cc", + "src/snapshot/serializer-common.h", + "src/snapshot/serializer.cc", + "src/snapshot/serializer.h", "src/snapshot/snapshot-common.cc", "src/snapshot/snapshot-source-sink.cc", "src/snapshot/snapshot-source-sink.h", + "src/snapshot/snapshot.h", + "src/snapshot/startup-serializer.cc", + "src/snapshot/startup-serializer.h", "src/source-position.h", - "src/splay-tree.h", "src/splay-tree-inl.h", - "src/snapshot/snapshot.h", - "src/startup-data-util.h", + "src/splay-tree.h", "src/startup-data-util.cc", + "src/startup-data-util.h", "src/string-builder.cc", "src/string-builder.h", "src/string-search.h", @@ -1299,6 +1381,8 @@ source_set("v8_base") { "src/string-stream.h", "src/strtod.cc", "src/strtod.h", + "src/third_party/fdlibm/fdlibm.cc", + "src/third_party/fdlibm/fdlibm.h", "src/tracing/trace-event.cc", "src/tracing/trace-event.h", "src/transitions-inl.h", @@ -1317,13 +1401,13 @@ source_set("v8_base") { "src/typing-asm.h", "src/typing-reset.cc", "src/typing-reset.h", - "src/unicode-inl.h", - "src/unicode.cc", - "src/unicode.h", "src/unicode-cache-inl.h", "src/unicode-cache.h", "src/unicode-decoder.cc", "src/unicode-decoder.h", + "src/unicode-inl.h", + "src/unicode.cc", + "src/unicode.h", "src/utils-inl.h", "src/utils.cc", "src/utils.h", @@ -1345,6 +1429,7 @@ source_set("v8_base") { "src/wasm/encoder.h", "src/wasm/module-decoder.cc", "src/wasm/module-decoder.h", + "src/wasm/wasm-external-refs.h", "src/wasm/wasm-js.cc", "src/wasm/wasm-js.h", "src/wasm/wasm-macro-gen.h", @@ -1354,26 +1439,24 @@ source_set("v8_base") { "src/wasm/wasm-opcodes.h", "src/wasm/wasm-result.cc", "src/wasm/wasm-result.h", - "src/zone.cc", - "src/zone.h", "src/zone-allocator.h", "src/zone-containers.h", - "src/third_party/fdlibm/fdlibm.cc", - "src/third_party/fdlibm/fdlibm.h", + "src/zone.cc", + "src/zone.h", ] if (v8_target_arch == "x86") { sources += [ + "src/compiler/ia32/code-generator-ia32.cc", + "src/compiler/ia32/instruction-codes-ia32.h", + "src/compiler/ia32/instruction-scheduler-ia32.cc", + "src/compiler/ia32/instruction-selector-ia32.cc", "src/crankshaft/ia32/lithium-codegen-ia32.cc", "src/crankshaft/ia32/lithium-codegen-ia32.h", "src/crankshaft/ia32/lithium-gap-resolver-ia32.cc", "src/crankshaft/ia32/lithium-gap-resolver-ia32.h", "src/crankshaft/ia32/lithium-ia32.cc", "src/crankshaft/ia32/lithium-ia32.h", - "src/compiler/ia32/code-generator-ia32.cc", - "src/compiler/ia32/instruction-codes-ia32.h", - "src/compiler/ia32/instruction-scheduler-ia32.cc", - "src/compiler/ia32/instruction-selector-ia32.cc", "src/debug/ia32/debug-ia32.cc", "src/full-codegen/ia32/full-codegen-ia32.cc", "src/ia32/assembler-ia32-inl.h", @@ -1394,8 +1477,8 @@ source_set("v8_base") { "src/ia32/macro-assembler-ia32.h", "src/ic/ia32/access-compiler-ia32.cc", "src/ic/ia32/handler-compiler-ia32.cc", - "src/ic/ia32/ic-ia32.cc", "src/ic/ia32/ic-compiler-ia32.cc", + "src/ic/ia32/ic-ia32.cc", "src/ic/ia32/stub-cache-ia32.cc", "src/regexp/ia32/regexp-macro-assembler-ia32.cc", "src/regexp/ia32/regexp-macro-assembler-ia32.h", @@ -1416,8 +1499,8 @@ source_set("v8_base") { "src/full-codegen/x64/full-codegen-x64.cc", "src/ic/x64/access-compiler-x64.cc", "src/ic/x64/handler-compiler-x64.cc", - "src/ic/x64/ic-x64.cc", "src/ic/x64/ic-compiler-x64.cc", + "src/ic/x64/ic-x64.cc", "src/ic/x64/stub-cache-x64.cc", "src/regexp/x64/regexp-macro-assembler-x64.cc", "src/regexp/x64/regexp-macro-assembler-x64.h", @@ -1448,8 +1531,8 @@ source_set("v8_base") { "src/arm/code-stubs-arm.h", "src/arm/codegen-arm.cc", "src/arm/codegen-arm.h", - "src/arm/constants-arm.h", "src/arm/constants-arm.cc", + "src/arm/constants-arm.h", "src/arm/cpu-arm.cc", "src/arm/deoptimizer-arm.cc", "src/arm/disasm-arm.cc", @@ -1483,19 +1566,19 @@ source_set("v8_base") { ] } else if (v8_target_arch == "arm64") { sources += [ + "src/arm64/assembler-arm64-inl.h", "src/arm64/assembler-arm64.cc", "src/arm64/assembler-arm64.h", - "src/arm64/assembler-arm64-inl.h", "src/arm64/builtins-arm64.cc", - "src/arm64/codegen-arm64.cc", - "src/arm64/codegen-arm64.h", "src/arm64/code-stubs-arm64.cc", "src/arm64/code-stubs-arm64.h", + "src/arm64/codegen-arm64.cc", + "src/arm64/codegen-arm64.h", "src/arm64/constants-arm64.h", "src/arm64/cpu-arm64.cc", + "src/arm64/decoder-arm64-inl.h", "src/arm64/decoder-arm64.cc", "src/arm64/decoder-arm64.h", - "src/arm64/decoder-arm64-inl.h", "src/arm64/deoptimizer-arm64.cc", "src/arm64/disasm-arm64.cc", "src/arm64/disasm-arm64.h", @@ -1507,9 +1590,9 @@ source_set("v8_base") { "src/arm64/instrument-arm64.h", "src/arm64/interface-descriptors-arm64.cc", "src/arm64/interface-descriptors-arm64.h", + "src/arm64/macro-assembler-arm64-inl.h", "src/arm64/macro-assembler-arm64.cc", "src/arm64/macro-assembler-arm64.h", - "src/arm64/macro-assembler-arm64-inl.h", "src/arm64/simulator-arm64.cc", "src/arm64/simulator-arm64.h", "src/arm64/utils-arm64.cc", @@ -1518,9 +1601,9 @@ source_set("v8_base") { "src/compiler/arm64/instruction-codes-arm64.h", "src/compiler/arm64/instruction-scheduler-arm64.cc", "src/compiler/arm64/instruction-selector-arm64.cc", + "src/crankshaft/arm64/delayed-masm-arm64-inl.h", "src/crankshaft/arm64/delayed-masm-arm64.cc", "src/crankshaft/arm64/delayed-masm-arm64.h", - "src/crankshaft/arm64/delayed-masm-arm64-inl.h", "src/crankshaft/arm64/lithium-arm64.cc", "src/crankshaft/arm64/lithium-arm64.h", "src/crankshaft/arm64/lithium-codegen-arm64.cc", @@ -1553,17 +1636,17 @@ source_set("v8_base") { "src/full-codegen/mips/full-codegen-mips.cc", "src/ic/mips/access-compiler-mips.cc", "src/ic/mips/handler-compiler-mips.cc", - "src/ic/mips/ic-mips.cc", "src/ic/mips/ic-compiler-mips.cc", + "src/ic/mips/ic-mips.cc", "src/ic/mips/stub-cache-mips.cc", + "src/mips/assembler-mips-inl.h", "src/mips/assembler-mips.cc", "src/mips/assembler-mips.h", - "src/mips/assembler-mips-inl.h", "src/mips/builtins-mips.cc", - "src/mips/codegen-mips.cc", - "src/mips/codegen-mips.h", "src/mips/code-stubs-mips.cc", "src/mips/code-stubs-mips.h", + "src/mips/codegen-mips.cc", + "src/mips/codegen-mips.h", "src/mips/constants-mips.cc", "src/mips/constants-mips.h", "src/mips/cpu-mips.cc", @@ -1595,17 +1678,17 @@ source_set("v8_base") { "src/full-codegen/mips64/full-codegen-mips64.cc", "src/ic/mips64/access-compiler-mips64.cc", "src/ic/mips64/handler-compiler-mips64.cc", - "src/ic/mips64/ic-mips64.cc", "src/ic/mips64/ic-compiler-mips64.cc", + "src/ic/mips64/ic-mips64.cc", "src/ic/mips64/stub-cache-mips64.cc", + "src/mips64/assembler-mips64-inl.h", "src/mips64/assembler-mips64.cc", "src/mips64/assembler-mips64.h", - "src/mips64/assembler-mips64-inl.h", "src/mips64/builtins-mips64.cc", - "src/mips64/codegen-mips64.cc", - "src/mips64/codegen-mips64.h", "src/mips64/code-stubs-mips64.cc", "src/mips64/code-stubs-mips64.h", + "src/mips64/codegen-mips64.cc", + "src/mips64/codegen-mips64.h", "src/mips64/constants-mips64.cc", "src/mips64/constants-mips64.h", "src/mips64/cpu-mips64.cc", @@ -1621,6 +1704,48 @@ source_set("v8_base") { "src/regexp/mips64/regexp-macro-assembler-mips64.cc", "src/regexp/mips64/regexp-macro-assembler-mips64.h", ] + } else if (v8_target_arch == "s390" || v8_target_arch == "s390x") { + sources += [ + "src/compiler/s390/code-generator-s390.cc", + "src/compiler/s390/instruction-codes-s390.h", + "src/compiler/s390/instruction-scheduler-s390.cc", + "src/compiler/s390/instruction-selector-s390.cc", + "src/crankshaft/s390/lithium-codegen-s390.cc", + "src/crankshaft/s390/lithium-codegen-s390.h", + "src/crankshaft/s390/lithium-gap-resolver-s390.cc", + "src/crankshaft/s390/lithium-gap-resolver-s390.h", + "src/crankshaft/s390/lithium-s390.cc", + "src/crankshaft/s390/lithium-s390.h", + "src/debug/s390/debug-s390.cc", + "src/full-codegen/s390/full-codegen-s390.cc", + "src/ic/s390/access-compiler-s390.cc", + "src/ic/s390/handler-compiler-s390.cc", + "src/ic/s390/ic-compiler-s390.cc", + "src/ic/s390/ic-s390.cc", + "src/ic/s390/stub-cache-s390.cc", + "src/regexp/s390/regexp-macro-assembler-s390.cc", + "src/regexp/s390/regexp-macro-assembler-s390.h", + "src/s390/assembler-s390-inl.h", + "src/s390/assembler-s390.cc", + "src/s390/assembler-s390.h", + "src/s390/builtins-s390.cc", + "src/s390/code-stubs-s390.cc", + "src/s390/code-stubs-s390.h", + "src/s390/codegen-s390.cc", + "src/s390/codegen-s390.h", + "src/s390/constants-s390.cc", + "src/s390/constants-s390.h", + "src/s390/cpu-s390.cc", + "src/s390/deoptimizer-s390.cc", + "src/s390/disasm-s390.cc", + "src/s390/frames-s390.cc", + "src/s390/frames-s390.h", + "src/s390/interface-descriptors-s390.cc", + "src/s390/macro-assembler-s390.cc", + "src/s390/macro-assembler-s390.h", + "src/s390/simulator-s390.cc", + "src/s390/simulator-s390.h", + ] } configs -= [ "//build/config/compiler:chromium_code" ] @@ -1671,14 +1796,16 @@ source_set("v8_libbase") { visibility = [ ":*" ] # Only targets in this file can depend on this. sources = [ + "src/base/accounting-allocator.cc", + "src/base/accounting-allocator.h", "src/base/adapters.h", "src/base/atomicops.h", "src/base/atomicops_internals_arm64_gcc.h", "src/base/atomicops_internals_arm_gcc.h", "src/base/atomicops_internals_atomicword_compat.h", "src/base/atomicops_internals_mac.h", - "src/base/atomicops_internals_mips_gcc.h", "src/base/atomicops_internals_mips64_gcc.h", + "src/base/atomicops_internals_mips_gcc.h", "src/base/atomicops_internals_portable.h", "src/base/atomicops_internals_s390_gcc.h", "src/base/atomicops_internals_tsan.h", @@ -1702,16 +1829,16 @@ source_set("v8_libbase") { "src/base/macros.h", "src/base/once.cc", "src/base/once.h", - "src/base/platform/elapsed-timer.h", - "src/base/platform/time.cc", - "src/base/platform/time.h", "src/base/platform/condition-variable.cc", "src/base/platform/condition-variable.h", + "src/base/platform/elapsed-timer.h", "src/base/platform/mutex.cc", "src/base/platform/mutex.h", "src/base/platform/platform.h", "src/base/platform/semaphore.cc", "src/base/platform/semaphore.h", + "src/base/platform/time.cc", + "src/base/platform/time.h", "src/base/safe_conversions.h", "src/base/safe_conversions_impl.h", "src/base/safe_math.h", @@ -1745,10 +1872,16 @@ source_set("v8_libbase") { if (is_linux) { sources += [ "src/base/platform/platform-linux.cc" ] - libs = [ "dl", "rt" ] + libs = [ + "dl", + "rt", + ] } else if (is_android) { if (current_toolchain == host_toolchain) { - libs = [ "dl", "rt" ] + libs = [ + "dl", + "rt", + ] if (host_os == "mac") { sources += [ "src/base/platform/platform-macos.cc" ] } else { @@ -1818,6 +1951,7 @@ source_set("fuzzer_support") { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config_base", + ":libplatform_config", ":features", ":toolchain", ] @@ -1844,6 +1978,7 @@ if (current_toolchain == snapshot_toolchain) { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config", + ":libplatform_config", ":features", ":toolchain", ] @@ -1933,9 +2068,7 @@ if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") || } if (!is_component_build) { - sources += [ - "$target_gen_dir/d8-js.cc", - ] + sources += [ "$target_gen_dir/d8-js.cc" ] } if (v8_enable_i18n_support) { deps += [ "//third_party/icu" ] @@ -1956,6 +2089,7 @@ source_set("json_fuzzer") { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config", + ":libplatform_config", ":features", ":toolchain", ] @@ -1974,6 +2108,7 @@ source_set("parser_fuzzer") { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config", + ":libplatform_config", ":features", ":toolchain", ] @@ -1992,6 +2127,45 @@ source_set("regexp_fuzzer") { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config", + ":libplatform_config", + ":features", + ":toolchain", + ] +} + +source_set("wasm_fuzzer") { + sources = [ + "test/fuzzer/wasm.cc", + ] + + deps = [ + ":fuzzer_support", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ + ":internal_config", + ":libplatform_config", + ":features", + ":toolchain", + ] +} + +source_set("wasm_asmjs_fuzzer") { + sources = [ + "test/fuzzer/wasm-asmjs.cc", + ] + + deps = [ + ":fuzzer_support", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ + ":internal_config", + ":libplatform_config", ":features", ":toolchain", ] diff --git a/deps/v8/CODE_OF_CONDUCT.md b/deps/v8/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000000..15fc2259ada6b7 --- /dev/null +++ b/deps/v8/CODE_OF_CONDUCT.md @@ -0,0 +1,8 @@ +# V8 Code of Conduct + +As part of the Chromium team, the V8 team is committed to preserving and +fostering a diverse, welcoming community. To this end, the [Chromium Code of +Conduct](https://chromium.googlesource.com/chromium/src/+/master/CODE_OF_CONDUCT.md) +applies to our repos and organizations, mailing lists, blog content, and any +other Chromium-supported communication group, as well as any private +communication initiated in the context of these spaces. diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index 9e21ba1cd76881..dc97b8042244cc 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,1764 @@ +2016-04-06: Version 5.1.281 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.280 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.279 + + Ship --harmony-regexp-exec (issue 4602). + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.278 + + [V8] Removed debugger V8::PromiseEvent (Chromium issue 526811). + + [asm.js] Fix typing bug for non-literals in heap access (Chromium issue + 599825). + + Ensure CreateDataProperty works correctly on TypedArrays (Chromium issue + 596394). + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.277 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.276 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.275 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.274 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.273 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.272 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.271 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.270 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.269 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.268 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.267 + + [api] Restrict Template::Set to take templates or primitive values. + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.266 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.265 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.264 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.263 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.262 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.261 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.260 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.259 + + Further ES2015 RegExp spec compliance fixes (issue 4602). + + Performance and stability improvements on all platforms. + + +2016-04-03: Version 5.1.258 + + Performance and stability improvements on all platforms. + + +2016-04-02: Version 5.1.257 + + Performance and stability improvements on all platforms. + + +2016-04-02: Version 5.1.256 + + Performance and stability improvements on all platforms. + + +2016-04-02: Version 5.1.255 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.254 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.253 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.252 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.251 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.250 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.249 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.248 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.247 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.246 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.245 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.244 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.243 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.242 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.241 + + [GN] Define USE_EABI_HARDFLOAT=1 when arm_float_abi=="hard" (Chromium + issue 592660). + + Ship --harmony-regexp-exec (issue 4602). + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.240 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.239 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.238 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.237 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.236 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.235 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.234 + + [arm/Linux] Don't rely on KUSER_HELPERS feature (Chromium issue 599051). + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.233 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.232 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.231 + + Turn scavenge_reclaim_unmodified_objects on by default (Chromium issue + 4880). + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.230 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.229 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.228 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.227 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.226 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.225 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.224 + + Raise minimum Mac OS version to 10.7 (issue 4847). + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.223 + + Performance and stability improvements on all platforms. + + +2016-03-30: Version 5.1.222 + + Performance and stability improvements on all platforms. + + +2016-03-30: Version 5.1.221 + + Performance and stability improvements on all platforms. + + +2016-03-30: Version 5.1.220 + + Stage --harmony-regexp-exec (issue 4602). + + Add fast paths for native RegExps in ES2015 subclass-aware code (issue + 4602). + + [V8] Add FunctionMirror.prototype.contextDebugId method (Chromium issue + 595206). + + Performance and stability improvements on all platforms. + + +2016-03-30: Version 5.1.219 + + Remove RegExp.prototype.source getter compat workaround (issue 4827, + Chromium issue 581577). + + Check for proper types from error handling code (Chromium issue 596718). + + Add ES2015 RegExp full subclassing semantics behind a flag (issue 4602). + + Performance and stability improvements on all platforms. + + +2016-03-24: Version 5.1.218 + + Performance and stability improvements on all platforms. + + +2016-03-24: Version 5.1.217 + + [esnext] implement String padding proposal. + + Performance and stability improvements on all platforms. + + +2016-03-24: Version 5.1.216 + + Performance and stability improvements on all platforms. + + +2016-03-24: Version 5.1.215 + + Performance and stability improvements on all platforms. + + +2016-03-24: Version 5.1.214 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.213 + + Implement ES2015 labelled function declaration restrictions (Chromium + issue 595309). + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.212 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.211 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.210 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.209 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.208 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.207 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.206 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.205 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.204 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.203 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.202 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.201 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.200 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.199 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.198 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.197 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.196 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.195 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.194 + + Fix match default behavior on strings for ES2015 semantics (issue 4602). + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.193 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.192 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.191 + + [Interpreter] TurboFan implementation of intrinsics (issue 4822). + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.190 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.189 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.188 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.187 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.186 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.185 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.184 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.183 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.182 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.181 + + Temporarily undeprecate ForceSet (Chromium issue 595601). + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.180 + + Performance and stability improvements on all platforms. + + +2016-03-20: Version 5.1.179 + + Performance and stability improvements on all platforms. + + +2016-03-20: Version 5.1.178 + + Performance and stability improvements on all platforms. + + +2016-03-20: Version 5.1.177 + + Performance and stability improvements on all platforms. + + +2016-03-19: Version 5.1.176 + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.175 + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.174 + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.173 + + Parser: Make skipping HTML comments optional (Chromium issue 573887). + + [es7] implement exponentiation operator proposal (issue 3915). + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.172 + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.171 + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.170 + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.169 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.168 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.167 + + Throw the right exceptions from setting elements in + Array.prototype.concat (Chromium issue 595319). + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.166 + + Throw exceptions from CreateDataProperty when should_throw (Chromium + issue 595319). + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.165 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.164 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.163 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.162 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.161 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.160 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.159 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.158 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.157 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.156 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.155 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.154 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.153 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.152 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.151 + + Move FastAccessorAssembler from RawMachineAssembler to CodeStubAssembler + (Chromium issue 508898). + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.150 + + [serializer] Add API to warm up startup snapshot with an additional + script (issue 4836). + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.149 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.148 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.147 + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.146 + + Ship ES2015 restrictions on function declaration locations (issue 4824). + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.145 + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.144 + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.143 + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.142 + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.141 + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.140 + + Put RegExp js code in strict mode (issue 4504). + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.139 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.138 + + [builtins] Fix Array.prototype.concat bug (Chromium issue 594574). + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.137 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.136 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.135 + + Ship Array.prototype.values (issue 4247). + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.134 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.133 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.132 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.131 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.130 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.129 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.128 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.127 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.126 + + Remove --harmony-modules flag and let embedder decide when modules are + used (issue 1569, Chromium issue 594639). + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.125 + + Make test262 test runner check for which exception is thrown (issue + 4803). + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.124 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.123 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.122 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.121 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.120 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.119 + + Performance and stability improvements on all platforms. + + +2016-03-13: Version 5.1.118 + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.117 + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.116 + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.115 + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.114 + + [arm64] Fix i/d cache line size confusion typo (Chromium issue 593867). + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.113 + + Fix expression positions for for-loops (issue 4690). + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.112 + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.111 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.110 + + Minor library function fixes for TypedArray spec compliance (issue + 4785). + + Check that Promise subclasses have callable resolve/reject (issue 4633). + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.109 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.108 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.107 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.106 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.105 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.104 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.103 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.102 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.101 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.100 + + [strong] Remove all remainders of strong mode (issue 3956). + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.99 + + Marks the label associated with the runtime call in + CodeStubAssembler::Allocate as deferred (Chromium issue 593359). + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.98 + + Implement iterator finalization in array destructuring (issue 3566). + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.97 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.96 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.95 + + String.prototype[Symbol.iterator] does RequireObjectCoercible(this) + (issue 4348). + + Stage restrictive declarations flag (issue 4824). + + Expose Array.prototype.values behind a flag and stage it (issue 4247). + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.94 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.93 + + Ensure appropriate bounds checking for Array subclass concat (Chromium + issue 592340). + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.92 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.91 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.90 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.89 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.88 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.87 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.86 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.85 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.84 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.83 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.82 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.81 + + Optimize new TypedArray(typedArray) constructor (Chromium issue 592007). + + Ensure the @@species protector is updated for accessors (issue 4093). + + Add UseCounters for various RegExp compatibility issues (Chromium issue + 581577). + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.80 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.79 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.78 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.77 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.76 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.75 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.74 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.73 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.72 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.71 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.70 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.69 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.68 + + [key-accumulator] Starting to reimplement the key-accumulator (issue + 4758, Chromium issue 545503). + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.67 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.66 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.65 + + [key-accumulator] Starting to reimplement the key-accumulator (issue + 4758, Chromium issue 545503). + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.64 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.63 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.62 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.61 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.60 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.59 + + Use v8::kGCCallbackFlagCollectAllAvailableGarbage in + Heap::CollectAllAvailableGarbage (Chromium issue 591463). + + [key-accumulator] Starting to reimplement the key-accumulator (issue + 4758, Chromium issue 545503). + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.58 + + [regexp] Fix off-by-one in CharacterRange::Negate (Chromium issue + 592343). + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.57 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.56 + + Use v8::kGCCallbackFlagCollectAllAvailableGarbage in + Heap::CollectAllAvailableGarbage (Chromium issue 591463). + + Performance and stability improvements on all platforms. + + +2016-03-06: Version 5.1.55 + + Performance and stability improvements on all platforms. + + +2016-03-06: Version 5.1.54 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.53 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.52 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.51 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.50 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.49 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.48 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.47 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.46 + + Introduce v8::MicrotasksScope (Chromium issue 585949). + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.45 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.44 + + Use a different GCCallbackFlag for GCs triggered by + CollectAllAvailableGarbage (Chromium issue 591463). + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.43 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.42 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.41 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.40 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.39 + + Ship ES2015 Function.name reform (issue 3699, Chromium issue 588803). + + Introduce v8::MicrotasksScope (Chromium issue 585949). + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.38 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.37 + + Restrict FunctionDeclarations in Statement position (issue 4647). + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.36 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.35 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.34 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.33 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.32 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.31 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.30 + + Implement TypedArray(typedarray) constructor (issue 4726). + + Performance and stability improvements on all platforms. + + +2016-03-02: Version 5.1.29 + + Performance and stability improvements on all platforms. + + +2016-03-02: Version 5.1.28 + + [turbofan] Adds an Allocate macro to the CodeStubAssembler (Chromium + issue 588692). + + Performance and stability improvements on all platforms. + + +2016-03-02: Version 5.1.27 + + Performance and stability improvements on all platforms. + + +2016-03-02: Version 5.1.26 + + Performance and stability improvements on all platforms. + + +2016-03-02: Version 5.1.25 + + Performance and stability improvements on all platforms. + + +2016-03-02: Version 5.1.24 + + Devtools: expose scopes source location to debugger (Chromium issue + 327092). + + CodeStubAssembler can generate code for builtins (issue 4614). + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.23 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.22 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.21 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.20 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.19 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.18 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.17 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.16 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.15 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.14 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.13 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.12 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.11 + + Make %TypedArray%.from spec-compliant (issue 4782). + + Performance and stability improvements on all platforms. + + +2016-02-29: Version 5.1.10 + + Performance and stability improvements on all platforms. + + +2016-02-29: Version 5.1.9 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.8 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.7 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.6 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.5 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.4 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.3 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.2 + + Performance and stability improvements on all platforms. + + +2016-02-27: Version 5.1.1 + + Fix strict mode function error message (issue 2198). + + Reland of Make Intl install properties more like how other builtins do + (patchset #1 id:1 of https://codereview.chromium.org/1733293003/ ) + (issue 4778). + + [turbofan] Bailout if LoadBuffer typing assumption doesn't hold + (Chromium issue 589792). + + Performance and stability improvements on all platforms. + + +2016-02-26: Version 5.0.104 + + Performance and stability improvements on all platforms. + + +2016-02-26: Version 5.0.103 + + Make Intl install properties more like how other builtins do (issue + 4778). + + Performance and stability improvements on all platforms. + + +2016-02-26: Version 5.0.102 + + Make TypedArray.from and TypedArray.of writable and configurable (issue + 4315). + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.101 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.100 + + Ship ES2015 iterator finalization (issue 3566). + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.99 + + Introduce MicrotasksCompletedCallback (Chromium issue 585949). + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.98 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.97 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.96 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.95 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.94 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.93 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.92 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.91 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.90 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.89 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.88 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.87 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.86 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.85 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.84 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.83 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.82 + + Ensure IteratorClose is called for errors in non-declaring assignments + (issue 4776). + + Fix priority of exceptions being thrown from for-of loops (issue 4775). + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.81 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.80 + + Encode interpreter::SourcePositionTable as variable-length ints (issue + 4690). + + Stage ES2015 iterator finalization (issue 3566). + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.79 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.78 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.77 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.76 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.75 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.74 + + Performance and stability improvements on all platforms. + + +2016-02-23: Version 5.0.73 + + Intl: Use private symbols to memoize bound functions (issue 3785). + + Ensure Array.prototype.indexOf returns +0 rather than -0. + + Ship ES2015 Symbol.species (issue 4093). + + Performance and stability improvements on all platforms. + + +2016-02-23: Version 5.0.72 + + Performance and stability improvements on all platforms. + + 2016-02-23: Version 5.0.71 Performance and stability improvements on all platforms. diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 5f26e91ecfa565..0559523283f74e 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -8,15 +8,15 @@ vars = { deps = { "v8/build/gyp": - Var("git_url") + "/external/gyp.git" + "@" + "ed163ce233f76a950dce1751ac851dbe4b1c00cc", + Var("git_url") + "/external/gyp.git" + "@" + "4ec6c4e3a94bd04a6da2858163d40b2429b8aad1", "v8/third_party/icu": - Var("git_url") + "/chromium/deps/icu.git" + "@" + "e466f6ac8f60bb9697af4a91c6911c6fc4aec95f", + Var("git_url") + "/chromium/deps/icu.git" + "@" + "c291cde264469b20ca969ce8832088acb21e0c48", "v8/buildtools": - Var("git_url") + "/chromium/buildtools.git" + "@" + "97b5c485707335dd2952c05bf11412ada3f4fb6f", + Var("git_url") + "/chromium/buildtools.git" + "@" + "80b5126f91be4eb359248d28696746ef09d5be67", "v8/base/trace_event/common": - Var("git_url") + "/chromium/src/base/trace_event/common.git" + "@" + "4b09207e447ae5bd34643b4c6321bee7b76d35f9", + Var("git_url") + "/chromium/src/base/trace_event/common.git" + "@" + "c8c8665c2deaf1cc749d9f8e153256d4f67bf1b8", "v8/tools/swarming_client": - Var('git_url') + '/external/swarming.client.git' + '@' + "0b908f18767c8304dc089454bc1c91755d21f1f5", + Var('git_url') + '/external/swarming.client.git' + '@' + "df6e95e7669883c8fe9ef956c69a544154701a49", "v8/testing/gtest": Var("git_url") + "/external/github.com/google/googletest.git" + "@" + "6f8a66431cb592dad629028a50b3dd418a408c87", "v8/testing/gmock": @@ -27,15 +27,15 @@ deps = { Var("git_url") + "/v8/deps/third_party/mozilla-tests.git" + "@" + "f6c578a10ea707b1a8ab0b88943fe5115ce2b9be", "v8/test/simdjs/data": Var("git_url") + "/external/github.com/tc39/ecmascript_simd.git" + "@" + "c8ef63c728283debc25891123eb00482fee4b8cd", "v8/test/test262/data": - Var("git_url") + "/external/github.com/tc39/test262.git" + "@" + "738a24b109f3fa71be44d5c3701d73141d494510", + Var("git_url") + "/external/github.com/tc39/test262.git" + "@" + "57d3e2216fa86ad63b6c0a54914ba9dcbff96003", "v8/tools/clang": - Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "a8adb78c8eda9bddb2aa9c51f3fee60296de1ad4", + Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "faee82e064e04e5cbf60cc7327e7a81d2a4557ad", } deps_os = { "android": { "v8/third_party/android_tools": - Var("git_url") + "/android_tools.git" + "@" + "f4c36ad89b2696b37d9cd7ca7d984b691888b188", + Var("git_url") + "/android_tools.git" + "@" + "adfd31794011488cd0fc716b53558b2d8a67af8b", }, "win": { "v8/third_party/cygwin": diff --git a/deps/v8/Makefile b/deps/v8/Makefile index 4fb6ee0162275f..a0c08a6d9634c7 100644 --- a/deps/v8/Makefile +++ b/deps/v8/Makefile @@ -162,6 +162,9 @@ endif ifdef embedscript GYPFLAGS += -Dembed_script=$(embedscript) endif +ifdef warmupscript + GYPFLAGS += -Dwarmup_script=$(warmupscript) +endif ifeq ($(goma), on) GYPFLAGS += -Duse_goma=1 endif @@ -219,6 +222,10 @@ endif ifeq ($(arm_test_noprobe), on) GYPFLAGS += -Darm_test_noprobe=on endif +# Do not omit the frame pointer, needed for profiling with perf +ifeq ($(no_omit_framepointer), on) + GYPFLAGS += -Drelease_extra_cflags=-fno-omit-frame-pointer +endif # ----------------- available targets: -------------------- # - "grokdump": rebuilds heap constants lists used by grokdump diff --git a/deps/v8/OWNERS b/deps/v8/OWNERS index 2c5caeb125accb..3f2caecd498284 100644 --- a/deps/v8/OWNERS +++ b/deps/v8/OWNERS @@ -1,5 +1,7 @@ adamk@chromium.org +ahaas@chromium.org bmeurer@chromium.org +cbruni@chromium.org danno@chromium.org epertoso@chromium.org hablich@chromium.org @@ -10,10 +12,13 @@ jkummerow@chromium.org jochen@chromium.org littledan@chromium.org machenbach@chromium.org -mlippautz@chromium.org marja@chromium.org +mlippautz@chromium.org mstarzinger@chromium.org mvstanton@chromium.org +mythria@chromium.org +neis@chromium.org +oth@chromium.org rmcilroy@chromium.org rossberg@chromium.org titzer@chromium.org diff --git a/deps/v8/base/trace_event/common/trace_event_common.h b/deps/v8/base/trace_event/common/trace_event_common.h index 8d13fc2e8cb8a5..7a1533ed822e88 100644 --- a/deps/v8/base/trace_event/common/trace_event_common.h +++ b/deps/v8/base/trace_event/common/trace_event_common.h @@ -156,7 +156,7 @@ // }; // // TRACE_EVENT1("foo", "bar", "data", -// scoped_refptr(new MyData())); +// std::unique_ptr(new MyData())); // // The trace framework will take ownership if the passed pointer and it will // be free'd when the trace buffer is flushed. @@ -926,6 +926,20 @@ name, id, TRACE_EVENT_FLAG_COPY, arg1_name, \ arg1_val, arg2_name, arg2_val) +// Special trace event macro to trace task execution with the location where it +// was posted from. +#define TRACE_TASK_EXECUTION(run_function, task) \ + TRACE_EVENT2("toplevel", run_function, "src_file", \ + (task).posted_from.file_name(), "src_func", \ + (task).posted_from.function_name()); \ + TRACE_EVENT_API_SCOPED_TASK_EXECUTION_EVENT INTERNAL_TRACE_EVENT_UID( \ + task_event)((task).posted_from.file_name()); + +// TRACE_EVENT_METADATA* events are information related to other +// injected events, not events in their own right. +#define TRACE_EVENT_METADATA1(category_group, name, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_METADATA_ADD(category_group, name, arg1_name, arg1_val) + // Records a clock sync event. #define TRACE_EVENT_CLOCK_SYNC_RECEIVER(sync_id) \ INTERNAL_TRACE_EVENT_ADD( \ diff --git a/deps/v8/build/coverage_wrapper.py b/deps/v8/build/coverage_wrapper.py new file mode 100755 index 00000000000000..5b365d8e63d911 --- /dev/null +++ b/deps/v8/build/coverage_wrapper.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +# Copyright 2016 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# CC/CXX wrapper script that excludes certain file patterns from coverage +# instrumentation. + +import re +import subprocess +import sys + +exclusions = [ + 'buildtools', + 'src/third_party', + 'third_party', + 'test', + 'testing', +] + +def remove_if_exists(string_list, item): + if item in string_list: + string_list.remove(item) + +args = sys.argv[1:] +text = ' '.join(sys.argv[2:]) +for exclusion in exclusions: + if re.search(r'\-o obj/%s[^ ]*\.o' % exclusion, text): + remove_if_exists(args, '-fprofile-arcs') + remove_if_exists(args, '-ftest-coverage') + remove_if_exists(args, '-fsanitize-coverage=func') + remove_if_exists(args, '-fsanitize-coverage=bb') + remove_if_exists(args, '-fsanitize-coverage=edge') + break + +sys.exit(subprocess.check_call(args)) diff --git a/deps/v8/build/get_landmines.py b/deps/v8/build/get_landmines.py index ea0ae0d415235d..2bbf7a61bfe290 100755 --- a/deps/v8/build/get_landmines.py +++ b/deps/v8/build/get_landmines.py @@ -26,6 +26,7 @@ def main(): print 'Cleanup after windows ninja switch attempt.' print 'Switching to pinned msvs toolchain.' print 'Clobbering to hopefully resolve problem with mksnapshot' + print 'Clobber after ICU roll.' return 0 diff --git a/deps/v8/build/isolate.gypi b/deps/v8/build/isolate.gypi index 546870a755a81a..4cfbbfddd100d7 100644 --- a/deps/v8/build/isolate.gypi +++ b/deps/v8/build/isolate.gypi @@ -76,6 +76,8 @@ '--config-variable', 'icu_use_data_file_flag=0', '--config-variable', 'msan=<(msan)', '--config-variable', 'tsan=<(tsan)', + '--config-variable', 'coverage=<(coverage)', + '--config-variable', 'sanitizer_coverage=<(sanitizer_coverage)', '--config-variable', 'component=<(component)', '--config-variable', 'target_arch=<(target_arch)', '--config-variable', 'use_custom_libcxx=<(use_custom_libcxx)', diff --git a/deps/v8/build/standalone.gypi b/deps/v8/build/standalone.gypi index 5269b95f64dbd9..6c88409dbee892 100644 --- a/deps/v8/build/standalone.gypi +++ b/deps/v8/build/standalone.gypi @@ -44,7 +44,7 @@ 'v8_deprecation_warnings': 1, 'v8_imminent_deprecation_warnings': 1, 'msvs_multi_core_compile%': '1', - 'mac_deployment_target%': '10.5', + 'mac_deployment_target%': '10.7', 'release_extra_cflags%': '', 'variables': { 'variables': { @@ -68,7 +68,9 @@ 'target_arch%': '<(host_arch)', 'base_dir%': ' GetInternalProperties(Isolate* isolate, Local value); + + /** + * Defines if the ES2015 tail call elimination feature is enabled or not. + * The change of this flag triggers deoptimization of all functions that + * contain calls at tail position. + */ + static bool IsTailCallEliminationEnabled(Isolate* isolate); + static void SetTailCallEliminationEnabled(Isolate* isolate, bool enabled); }; diff --git a/deps/v8/include/v8-experimental.h b/deps/v8/include/v8-experimental.h index 3874e91101f347..294ba647f03df9 100644 --- a/deps/v8/include/v8-experimental.h +++ b/deps/v8/include/v8-experimental.h @@ -10,7 +10,7 @@ #ifndef V8_INCLUDE_V8_EXPERIMENTAL_H_ #define V8_INCLUDE_V8_EXPERIMENTAL_H_ -#include "include/v8.h" +#include "v8.h" // NOLINT(build/include) namespace v8 { namespace experimental { diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h index 11f8d51f02573e..4023a5b234fd4b 100644 --- a/deps/v8/include/v8-platform.h +++ b/deps/v8/include/v8-platform.h @@ -152,9 +152,9 @@ class Platform { */ virtual uint64_t AddTraceEvent( char phase, const uint8_t* category_enabled_flag, const char* name, - uint64_t id, uint64_t bind_id, int32_t num_args, const char** arg_names, - const uint8_t* arg_types, const uint64_t* arg_values, - unsigned int flags) { + const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args, + const char** arg_names, const uint8_t* arg_types, + const uint64_t* arg_values, unsigned int flags) { return 0; } diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 28db453bbff687..b7513a6829bc18 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 5 -#define V8_MINOR_VERSION 0 -#define V8_BUILD_NUMBER 71 -#define V8_PATCH_LEVEL 61 +#define V8_MINOR_VERSION 1 +#define V8_BUILD_NUMBER 281 +#define V8_PATCH_LEVEL 75 // 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 9ccbc6eb1863bd..e0c45fb36e20fb 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include "v8-version.h" // NOLINT(build/include) #include "v8config.h" // NOLINT(build/include) @@ -328,6 +330,8 @@ class Local { template friend class PersistentValueMapBase; template friend class PersistentValueVector; + template + friend class ReturnValue; explicit V8_INLINE Local(T* that) : val_(that) {} V8_INLINE static Local New(Isolate* isolate, T* that); @@ -593,6 +597,13 @@ template class PersistentBase { // TODO(dcarney): remove this. V8_INLINE void ClearWeak() { ClearWeak(); } + /** + * Allows the embedder to tell the v8 garbage collector that a certain object + * is alive. Only allowed when the embedder is asked to trace its heap by + * EmbedderHeapTracer. + */ + V8_INLINE void RegisterExternalReference(Isolate* isolate); + /** * Marks the reference to this object independent. Garbage collector is free * to ignore any object groups containing this object. Weak callback for an @@ -2628,6 +2639,10 @@ enum AccessControl { PROHIBITS_OVERWRITING = 1 << 2 }; +/** + * Integrity level for objects. + */ +enum class IntegrityLevel { kFrozen, kSealed }; /** * A JavaScript object (ECMA-262, 4.3.3) @@ -2819,6 +2834,11 @@ class V8_EXPORT Object : public Value { */ Local GetConstructorName(); + /** + * Sets the integrity level of the object. + */ + Maybe SetIntegrityLevel(Local context, IntegrityLevel level); + /** Gets the number of internal fields for this Object. */ int InternalFieldCount(); @@ -3118,12 +3138,17 @@ class ReturnValue { V8_INLINE void SetUndefined(); V8_INLINE void SetEmptyString(); // Convenience getter for Isolate - V8_INLINE Isolate* GetIsolate(); + V8_INLINE Isolate* GetIsolate() const; // Pointer setter: Uncompilable to prevent inadvertent misuse. template V8_INLINE void Set(S* whatever); + // Getter. Creates a new Local<> so it comes with a certain performance + // hit. If the ReturnValue was not yet set, this will return the undefined + // value. + V8_INLINE Local Get() const; + private: template friend class ReturnValue; template friend class FunctionCallbackInfo; @@ -3216,6 +3241,7 @@ class PropertyCallbackInfo { typedef void (*FunctionCallback)(const FunctionCallbackInfo& info); +enum class ConstructorBehavior { kThrow, kAllow }; /** * A JavaScript function object (ECMA-262, 15.3). @@ -3230,6 +3256,11 @@ class V8_EXPORT Function : public Object { FunctionCallback callback, Local data = Local(), int length = 0); + static MaybeLocal New(Local context, + FunctionCallback callback, + Local data, + int length, + ConstructorBehavior behavior); static V8_DEPRECATE_SOON( "Use maybe version", Local New(Isolate* isolate, FunctionCallback callback, @@ -4453,6 +4484,9 @@ class V8_EXPORT FunctionTemplate : public Template { Isolate* isolate, FunctionCallback callback = 0, Local data = Local(), Local signature = Local(), int length = 0); + static Local New( + Isolate* isolate, FunctionCallback callback, Local data, + Local signature, int length, ConstructorBehavior behavior); /** * Creates a function template with a fast handler. If a fast handler is set, @@ -4886,7 +4920,6 @@ V8_INLINE Local Null(Isolate* isolate); V8_INLINE Local True(Isolate* isolate); V8_INLINE Local False(Isolate* isolate); - /** * A set of constraints that specifies the limits of the runtime's memory use. * You must set the heap size before initializing the VM - the size cannot be @@ -4895,6 +4928,9 @@ V8_INLINE Local False(Isolate* isolate); * If you are using threads then you should hold the V8::Locker lock while * setting the stack limit and you must set a non-default stack limit separately * for each thread. + * + * The arguments for set_max_semi_space_size, set_max_old_space_size, + * set_max_executable_size, set_code_range_size specify limits in MB. */ class V8_EXPORT ResourceConstraints { public: @@ -4913,17 +4949,23 @@ class V8_EXPORT ResourceConstraints { uint64_t virtual_memory_limit); int max_semi_space_size() const { return max_semi_space_size_; } - void set_max_semi_space_size(int value) { max_semi_space_size_ = value; } + void set_max_semi_space_size(int limit_in_mb) { + max_semi_space_size_ = limit_in_mb; + } int max_old_space_size() const { return max_old_space_size_; } - void set_max_old_space_size(int value) { max_old_space_size_ = value; } + void set_max_old_space_size(int limit_in_mb) { + max_old_space_size_ = limit_in_mb; + } int max_executable_size() const { return max_executable_size_; } - void set_max_executable_size(int value) { max_executable_size_ = value; } + void set_max_executable_size(int limit_in_mb) { + max_executable_size_ = limit_in_mb; + } uint32_t* stack_limit() const { return stack_limit_; } // Sets an address beyond which the VM's stack may not grow. void set_stack_limit(uint32_t* value) { stack_limit_ = value; } size_t code_range_size() const { return code_range_size_; } - void set_code_range_size(size_t value) { - code_range_size_ = value; + void set_code_range_size(size_t limit_in_mb) { + code_range_size_ = limit_in_mb; } private: @@ -5047,9 +5089,57 @@ class PromiseRejectMessage { typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); -// --- Microtask Callback --- +// --- Microtasks Callbacks --- +typedef void (*MicrotasksCompletedCallback)(Isolate*); typedef void (*MicrotaskCallback)(void* data); + +/** + * Policy for running microtasks: + * - explicit: microtasks are invoked with Isolate::RunMicrotasks() method; + * - scoped: microtasks invocation is controlled by MicrotasksScope objects; + * - auto: microtasks are invoked when the script call depth decrements + * to zero. + */ +enum class MicrotasksPolicy { kExplicit, kScoped, kAuto }; + + +/** + * This scope is used to control microtasks when kScopeMicrotasksInvocation + * is used on Isolate. In this mode every non-primitive call to V8 should be + * done inside some MicrotasksScope. + * Microtasks are executed when topmost MicrotasksScope marked as kRunMicrotasks + * exits. + * kDoNotRunMicrotasks should be used to annotate calls not intended to trigger + * microtasks. + */ +class V8_EXPORT MicrotasksScope { + public: + enum Type { kRunMicrotasks, kDoNotRunMicrotasks }; + + MicrotasksScope(Isolate* isolate, Type type); + ~MicrotasksScope(); + + /** + * Runs microtasks if no kRunMicrotasks scope is currently active. + */ + static void PerformCheckpoint(Isolate* isolate); + + /** + * Returns current depth of nested kRunMicrotasks scopes. + */ + static int GetCurrentDepth(Isolate* isolate); + + private: + internal::Isolate* const isolate_; + bool run_; + + // Prevent copying. + MicrotasksScope(const MicrotasksScope&); + MicrotasksScope& operator=(const MicrotasksScope&); +}; + + // --- Failed Access Check Callback --- typedef void (*FailedAccessCheckCallback)(Local target, AccessType type, @@ -5121,6 +5211,7 @@ class V8_EXPORT HeapStatistics { size_t total_available_size() { return total_available_size_; } size_t used_heap_size() { return used_heap_size_; } size_t heap_size_limit() { return heap_size_limit_; } + size_t malloced_memory() { return malloced_memory_; } size_t does_zap_garbage() { return does_zap_garbage_; } private: @@ -5130,6 +5221,7 @@ class V8_EXPORT HeapStatistics { size_t total_available_size_; size_t used_heap_size_; size_t heap_size_limit_; + size_t malloced_memory_; bool does_zap_garbage_; friend class V8; @@ -5294,6 +5386,52 @@ class V8_EXPORT PersistentHandleVisitor { // NOLINT uint16_t class_id) {} }; +/** + * Memory pressure level for the MemoryPressureNotification. + * kNone hints V8 that there is no memory pressure. + * kModerate hints V8 to speed up incremental garbage collection at the cost of + * of higher latency due to garbage collection pauses. + * kCritical hints V8 to free memory as soon as possible. Garbage collection + * pauses at this level will be large. + */ +enum class MemoryPressureLevel { kNone, kModerate, kCritical }; + +/** + * Interface for tracing through the embedder heap. During the v8 garbage + * collection, v8 collects hidden fields of all potential wrappers, and at the + * end of its marking phase iterates the collection and asks the embedder to + * trace through its heap and call PersistentBase::RegisterExternalReference on + * each js object reachable from any of the given wrappers. + * + * Before the first call to the TraceWrappableFrom function v8 will call + * TraceRoots. When the v8 garbage collection is finished, v8 will call + * ClearTracingMarks. + */ +class EmbedderHeapTracer { + public: + /** + * V8 will call this method at the beginning of the gc cycle. + */ + virtual void TraceRoots(Isolate* isolate) = 0; + + /** + * V8 will call this method with internal fields of a potential wrappers. + * Embedder is expected to trace its heap (synchronously) and call + * PersistentBase::RegisterExternalReference() on all wrappers reachable from + * any of the given wrappers. + */ + virtual void TraceWrappableFrom( + Isolate* isolate, + const std::vector >& internal_fields) = 0; + /** + * V8 will call this method at the end of the gc cycle. Allocation is *not* + * allowed in the ClearTracingMarks. + */ + virtual void ClearTracingMarks(Isolate* isolate) = 0; + + protected: + virtual ~EmbedderHeapTracer() = default; +}; /** * Isolate represents an isolated instance of the V8 engine. V8 isolates have @@ -5489,6 +5627,9 @@ class V8_EXPORT Isolate { kArrayPrototypeConstructorModified = 26, kArrayInstanceProtoModified = 27, kArrayInstanceConstructorModified = 28, + kLegacyFunctionDeclaration = 29, + kRegExpPrototypeSourceGetter = 30, + kRegExpPrototypeOldFlagGetter = 31, // If you add new values here, you'll also need to update V8Initializer.cpp // in Chromium. @@ -5531,6 +5672,14 @@ class V8_EXPORT Isolate { void SetAbortOnUncaughtExceptionCallback( AbortOnUncaughtExceptionCallback callback); + /** + * Optional notification that the system is running low on memory. + * V8 uses these notifications to guide heuristics. + * It is allowed to call this function from another thread while + * the isolate is executing long running JavaScript code. + */ + void MemoryPressureNotification(MemoryPressureLevel level); + /** * Methods below this point require holding a lock (using Locker) in * a multi-threaded environment. @@ -5752,6 +5901,11 @@ class V8_EXPORT Isolate { */ void RemoveGCPrologueCallback(GCCallback callback); + /** + * Sets the embedder heap tracer for the isolate. + */ + void SetEmbedderHeapTracer(EmbedderHeapTracer* tracer); + /** * Enables the host application to receive a notification after a * garbage collection. Allocations are allowed in the callback function, @@ -5888,17 +6042,39 @@ class V8_EXPORT Isolate { */ void EnqueueMicrotask(MicrotaskCallback microtask, void* data = NULL); - /** - * Experimental: Controls whether the Microtask Work Queue is automatically - * run when the script call depth decrements to zero. + /** + * Experimental: Controls how Microtasks are invoked. See MicrotasksPolicy + * for details. + */ + void SetMicrotasksPolicy(MicrotasksPolicy policy); + V8_DEPRECATE_SOON("Use SetMicrotasksPolicy", + void SetAutorunMicrotasks(bool autorun)); + + /** + * Experimental: Returns the policy controlling how Microtasks are invoked. + */ + MicrotasksPolicy GetMicrotasksPolicy() const; + V8_DEPRECATE_SOON("Use GetMicrotasksPolicy", + bool WillAutorunMicrotasks() const); + + /** + * Experimental: adds a callback to notify the host application after + * microtasks were run. The callback is triggered by explicit RunMicrotasks + * call or automatic microtasks execution (see SetAutorunMicrotasks). + * + * Callback will trigger even if microtasks were attempted to run, + * but the microtasks queue was empty and no single microtask was actually + * executed. + * + * Executing scriptsinside the callback will not re-trigger microtasks and + * the callback. */ - void SetAutorunMicrotasks(bool autorun); + void AddMicrotasksCompletedCallback(MicrotasksCompletedCallback callback); /** - * Experimental: Returns whether the Microtask Work Queue is automatically - * run when the script call depth decrements to zero. + * Removes callback that was installed by AddMicrotasksCompletedCallback. */ - bool WillAutorunMicrotasks() const; + void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallback callback); /** * Sets a callback for counting the number of times a feature of V8 is used. @@ -6195,11 +6371,23 @@ class V8_EXPORT V8 { static void SetSnapshotDataBlob(StartupData* startup_blob); /** - * Create a new isolate and context for the purpose of capturing a snapshot + * Bootstrap an isolate and a context from scratch to create a startup + * snapshot. Include the side-effects of running the optional script. + * Returns { NULL, 0 } on failure. + * The caller acquires ownership of the data array in the return value. + */ + static StartupData CreateSnapshotDataBlob(const char* embedded_source = NULL); + + /** + * Bootstrap an isolate and a context from the cold startup blob, run the + * warm-up script to trigger code compilation. The side effects are then + * discarded. The resulting startup snapshot will include compiled code. * Returns { NULL, 0 } on failure. - * The caller owns the data array in the return value. + * The caller acquires ownership of the data array in the return value. + * The argument startup blob is untouched. */ - static StartupData CreateSnapshotDataBlob(const char* custom_source = NULL); + static StartupData WarmUpSnapshotDataBlob(StartupData cold_startup_blob, + const char* warmup_source); /** * Adds a message listener. @@ -6475,6 +6663,8 @@ class V8_EXPORT V8 { static internal::Object** CopyPersistent(internal::Object** handle); static void DisposeGlobal(internal::Object** global_handle); typedef WeakCallbackData::Callback WeakCallback; + static void RegisterExternallyReferencedObject(internal::Object** object, + internal::Isolate* isolate); static void MakeWeak(internal::Object** global_handle, void* data, WeakCallback weak_callback); static void MakeWeak(internal::Object** global_handle, void* data, @@ -7149,7 +7339,7 @@ class Internals { 1 * kApiPointerSize + kApiIntSize; static const int kStringResourceOffset = 3 * kApiPointerSize; - static const int kOddballKindOffset = 4 * kApiPointerSize; + static const int kOddballKindOffset = 5 * kApiPointerSize; static const int kForeignAddressOffset = kApiPointerSize; static const int kJSObjectHeaderSize = 3 * kApiPointerSize; static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; @@ -7168,11 +7358,12 @@ class Internals { static const int kIsolateRootsOffset = kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset + kApiInt64Size + kApiPointerSize; - static const int kUndefinedValueRootIndex = 5; - static const int kNullValueRootIndex = 7; - static const int kTrueValueRootIndex = 8; - static const int kFalseValueRootIndex = 9; - static const int kEmptyStringRootIndex = 10; + static const int kUndefinedValueRootIndex = 4; + static const int kTheHoleValueRootIndex = 5; + static const int kNullValueRootIndex = 6; + static const int kTrueValueRootIndex = 7; + static const int kFalseValueRootIndex = 8; + static const int kEmptyStringRootIndex = 9; // The external allocation limit should be below 256 MB on all architectures // to avoid that resource-constrained embedders run low on memory. @@ -7188,7 +7379,7 @@ class Internals { static const int kNodeIsPartiallyDependentShift = 4; static const int kNodeIsActiveShift = 4; - static const int kJSObjectType = 0xb5; + static const int kJSObjectType = 0xb8; static const int kFirstNonstringType = 0x80; static const int kOddballType = 0x83; static const int kForeignType = 0x87; @@ -7492,6 +7683,13 @@ P* PersistentBase::ClearWeak() { V8::ClearWeak(reinterpret_cast(this->val_))); } +template +void PersistentBase::RegisterExternalReference(Isolate* isolate) { + if (IsEmpty()) return; + V8::RegisterExternallyReferencedObject( + reinterpret_cast(this->val_), + reinterpret_cast(isolate)); +} template void PersistentBase::MarkIndependent() { @@ -7641,14 +7839,22 @@ void ReturnValue::SetEmptyString() { *value_ = *I::GetRoot(GetIsolate(), I::kEmptyStringRootIndex); } -template -Isolate* ReturnValue::GetIsolate() { +template +Isolate* ReturnValue::GetIsolate() const { // Isolate is always the pointer below the default value on the stack. return *reinterpret_cast(&value_[-2]); } -template -template +template +Local ReturnValue::Get() const { + typedef internal::Internals I; + if (*value_ == *I::GetRoot(GetIsolate(), I::kTheHoleValueRootIndex)) + return Local(*Undefined(GetIsolate())); + return Local::New(GetIsolate(), reinterpret_cast(value_)); +} + +template +template void ReturnValue::Set(S* whatever) { // Uncompilable to prevent inadvertent misuse. TYPE_CHECK(S*, Primitive); diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h index d2be68561c0cc3..ce3a9d2f4f6620 100644 --- a/deps/v8/include/v8config.h +++ b/deps/v8/include/v8config.h @@ -266,13 +266,7 @@ # define V8_HAS_BUILTIN_FRAME_ADDRESS (V8_GNUC_PREREQ(2, 96, 0)) # define V8_HAS_BUILTIN_POPCOUNT (V8_GNUC_PREREQ(3, 4, 0)) -// g++ requires -std=c++0x or -std=gnu++0x to support C++11 functionality -// without warnings (functionality used by the macros below). These modes -// are detectable by checking whether __GXX_EXPERIMENTAL_CXX0X__ is defined or, -// more standardly, by checking whether __cplusplus has a C++11 or greater -// value. Current versions of g++ do not correctly set __cplusplus, so we check -// both for forward compatibility. -# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L +# if __cplusplus >= 201103L # define V8_HAS_CXX11_ALIGNAS (V8_GNUC_PREREQ(4, 8, 0)) # define V8_HAS_CXX11_ALIGNOF (V8_GNUC_PREREQ(4, 8, 0)) # endif diff --git a/deps/v8/infra/config/cq.cfg b/deps/v8/infra/config/cq.cfg index fbf090bb595acc..5f85111f200ac4 100644 --- a/deps/v8/infra/config/cq.cfg +++ b/deps/v8/infra/config/cq.cfg @@ -65,13 +65,14 @@ verifiers { name: "v8_win_rel_ng_triggered" triggered_by: "v8_win_rel_ng" } - } - buckets { - name: "tryserver.v8" builders { name: "v8_linux_blink_rel" experiment_percentage: 20 } + builders { + name: "v8_linux64_sanitizer_coverage_rel" + experiment_percentage: 100 + } } } diff --git a/deps/v8/src/DEPS b/deps/v8/src/DEPS index b0b703b7cc409f..1bb616ef33dd2d 100644 --- a/deps/v8/src/DEPS +++ b/deps/v8/src/DEPS @@ -21,7 +21,4 @@ specific_include_rules = { "d8\.cc": [ "+include/libplatform/libplatform.h", ], - "api-experimental\.cc": [ - "+src/compiler/fast-accessor-assembler.h", - ], } diff --git a/deps/v8/src/accessors.cc b/deps/v8/src/accessors.cc index 766509e2a5a408..374c0a21f84b25 100644 --- a/deps/v8/src/accessors.cc +++ b/deps/v8/src/accessors.cc @@ -32,6 +32,7 @@ Handle Accessors::MakeAccessor( info->set_all_can_read(false); info->set_all_can_write(false); info->set_is_special_data_property(true); + info->set_is_sloppy(false); name = factory->InternalizeName(name); info->set_name(*name); Handle get = v8::FromCData(isolate, getter); @@ -817,7 +818,7 @@ void Accessors::FunctionLengthGetter( } else { // If the function isn't compiled yet, the length is not computed // correctly yet. Compile it now and return the right length. - if (Compiler::Compile(function, KEEP_EXCEPTION)) { + if (Compiler::Compile(function, Compiler::KEEP_EXCEPTION)) { length = function->shared()->length(); } if (isolate->has_pending_exception()) { diff --git a/deps/v8/src/api-arguments.cc b/deps/v8/src/api-arguments.cc new file mode 100644 index 00000000000000..c4b698c5a2146f --- /dev/null +++ b/deps/v8/src/api-arguments.cc @@ -0,0 +1,31 @@ +// Copyright 2016 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. + +#include "src/api-arguments.h" + +namespace v8 { +namespace internal { + +Handle FunctionCallbackArguments::Call(FunctionCallback f) { + Isolate* isolate = this->isolate(); + VMState state(isolate); + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); + FunctionCallbackInfo info(begin(), argv_, argc_, + is_construct_call_); + f(info); + return GetReturnValue(isolate); +} + +Handle PropertyCallbackArguments::Call( + IndexedPropertyEnumeratorCallback f) { + Isolate* isolate = this->isolate(); + VMState state(isolate); + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); + PropertyCallbackInfo info(begin()); + f(info); + return GetReturnValue(isolate); +} + +} // namespace internal +} // namespace v8 diff --git a/deps/v8/src/api-arguments.h b/deps/v8/src/api-arguments.h new file mode 100644 index 00000000000000..3bfe34dc894c18 --- /dev/null +++ b/deps/v8/src/api-arguments.h @@ -0,0 +1,254 @@ +// Copyright 2016 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef V8_API_ARGUMENTS_H_ +#define V8_API_ARGUMENTS_H_ + +#include "src/api.h" +#include "src/isolate.h" +#include "src/tracing/trace-event.h" +#include "src/vm-state-inl.h" + +namespace v8 { +namespace internal { + +// Custom arguments replicate a small segment of stack that can be +// accessed through an Arguments object the same way the actual stack +// can. +template +class CustomArgumentsBase : public Relocatable { + public: + virtual inline void IterateInstance(ObjectVisitor* v) { + v->VisitPointers(values_, values_ + kArrayLength); + } + + protected: + inline Object** begin() { return values_; } + explicit inline CustomArgumentsBase(Isolate* isolate) + : Relocatable(isolate) {} + Object* values_[kArrayLength]; +}; + +template +class CustomArguments : public CustomArgumentsBase { + public: + static const int kReturnValueOffset = T::kReturnValueIndex; + + typedef CustomArgumentsBase Super; + ~CustomArguments() { + this->begin()[kReturnValueOffset] = + reinterpret_cast(kHandleZapValue); + } + + protected: + explicit inline CustomArguments(Isolate* isolate) : Super(isolate) {} + + template + Handle GetReturnValue(Isolate* isolate); + + inline Isolate* isolate() { + return reinterpret_cast(this->begin()[T::kIsolateIndex]); + } +}; + +template +template +Handle CustomArguments::GetReturnValue(Isolate* isolate) { + // Check the ReturnValue. + Object** handle = &this->begin()[kReturnValueOffset]; + // Nothing was set, return empty handle as per previous behaviour. + if ((*handle)->IsTheHole()) return Handle(); + Handle result = Handle::cast(Handle(handle)); + result->VerifyApiCallResultType(); + return result; +} + +class PropertyCallbackArguments + : public CustomArguments > { + public: + typedef PropertyCallbackInfo T; + typedef CustomArguments Super; + static const int kArgsLength = T::kArgsLength; + static const int kThisIndex = T::kThisIndex; + static const int kHolderIndex = T::kHolderIndex; + static const int kDataIndex = T::kDataIndex; + static const int kReturnValueDefaultValueIndex = + T::kReturnValueDefaultValueIndex; + static const int kIsolateIndex = T::kIsolateIndex; + static const int kShouldThrowOnErrorIndex = T::kShouldThrowOnErrorIndex; + + PropertyCallbackArguments(Isolate* isolate, Object* data, Object* self, + JSObject* holder, Object::ShouldThrow should_throw) + : Super(isolate) { + Object** values = this->begin(); + values[T::kThisIndex] = self; + values[T::kHolderIndex] = holder; + values[T::kDataIndex] = data; + values[T::kIsolateIndex] = reinterpret_cast(isolate); + values[T::kShouldThrowOnErrorIndex] = + Smi::FromInt(should_throw == Object::THROW_ON_ERROR ? 1 : 0); + + // Here the hole is set as default value. + // It cannot escape into js as it's remove in Call below. + values[T::kReturnValueDefaultValueIndex] = + isolate->heap()->the_hole_value(); + values[T::kReturnValueIndex] = isolate->heap()->the_hole_value(); + DCHECK(values[T::kHolderIndex]->IsHeapObject()); + DCHECK(values[T::kIsolateIndex]->IsSmi()); + } + +/* + * The following Call functions wrap the calling of all callbacks to handle + * calling either the old or the new style callbacks depending on which one + * has been registered. + * For old callbacks which return an empty handle, the ReturnValue is checked + * and used if it's been set to anything inside the callback. + * New style callbacks always use the return value. + */ + Handle Call(IndexedPropertyEnumeratorCallback f); + +#define FOR_EACH_CALLBACK_TABLE_MAPPING_1_NAME(F) \ + F(AccessorNameGetterCallback, "get", v8::Value, Object) \ + F(GenericNamedPropertyQueryCallback, "has", v8::Integer, Object) \ + F(GenericNamedPropertyDeleterCallback, "delete", v8::Boolean, Object) + +#define WRITE_CALL_1_NAME(Function, type, ApiReturn, InternalReturn) \ + Handle Call(Function f, Handle name) { \ + Isolate* isolate = this->isolate(); \ + VMState state(isolate); \ + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \ + PropertyCallbackInfo info(begin()); \ + LOG(isolate, \ + ApiNamedPropertyAccess("interceptor-named-" type, holder(), *name)); \ + f(v8::Utils::ToLocal(name), info); \ + return GetReturnValue(isolate); \ + } + + FOR_EACH_CALLBACK_TABLE_MAPPING_1_NAME(WRITE_CALL_1_NAME) + +#undef FOR_EACH_CALLBACK_TABLE_MAPPING_1_NAME +#undef WRITE_CALL_1_NAME + +#define FOR_EACH_CALLBACK_TABLE_MAPPING_1_INDEX(F) \ + F(IndexedPropertyGetterCallback, "get", v8::Value, Object) \ + F(IndexedPropertyQueryCallback, "has", v8::Integer, Object) \ + F(IndexedPropertyDeleterCallback, "delete", v8::Boolean, Object) + +#define WRITE_CALL_1_INDEX(Function, type, ApiReturn, InternalReturn) \ + Handle Call(Function f, uint32_t index) { \ + Isolate* isolate = this->isolate(); \ + VMState state(isolate); \ + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \ + PropertyCallbackInfo info(begin()); \ + LOG(isolate, ApiIndexedPropertyAccess("interceptor-indexed-" type, \ + holder(), index)); \ + f(index, info); \ + return GetReturnValue(isolate); \ + } + + FOR_EACH_CALLBACK_TABLE_MAPPING_1_INDEX(WRITE_CALL_1_INDEX) + +#undef FOR_EACH_CALLBACK_TABLE_MAPPING_1_INDEX +#undef WRITE_CALL_1_INDEX + + Handle Call(GenericNamedPropertySetterCallback f, Handle name, + Handle value) { + Isolate* isolate = this->isolate(); + VMState state(isolate); + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); + PropertyCallbackInfo info(begin()); + LOG(isolate, + ApiNamedPropertyAccess("interceptor-named-set", holder(), *name)); + f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), info); + return GetReturnValue(isolate); + } + + Handle Call(IndexedPropertySetterCallback f, uint32_t index, + Handle value) { + Isolate* isolate = this->isolate(); + VMState state(isolate); + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); + PropertyCallbackInfo info(begin()); + LOG(isolate, + ApiIndexedPropertyAccess("interceptor-indexed-set", holder(), index)); + f(index, v8::Utils::ToLocal(value), info); + return GetReturnValue(isolate); + } + + void Call(AccessorNameSetterCallback f, Handle name, + Handle value) { + Isolate* isolate = this->isolate(); + VMState state(isolate); + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); + PropertyCallbackInfo info(begin()); + LOG(isolate, + ApiNamedPropertyAccess("interceptor-named-set", holder(), *name)); + f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), info); + } + + private: + inline JSObject* holder() { + return JSObject::cast(this->begin()[T::kHolderIndex]); + } +}; + +class FunctionCallbackArguments + : public CustomArguments > { + public: + typedef FunctionCallbackInfo T; + typedef CustomArguments Super; + static const int kArgsLength = T::kArgsLength; + static const int kHolderIndex = T::kHolderIndex; + static const int kDataIndex = T::kDataIndex; + static const int kReturnValueDefaultValueIndex = + T::kReturnValueDefaultValueIndex; + static const int kIsolateIndex = T::kIsolateIndex; + static const int kCalleeIndex = T::kCalleeIndex; + static const int kContextSaveIndex = T::kContextSaveIndex; + + FunctionCallbackArguments(internal::Isolate* isolate, internal::Object* data, + internal::HeapObject* callee, + internal::Object* holder, internal::Object** argv, + int argc, bool is_construct_call) + : Super(isolate), + argv_(argv), + argc_(argc), + is_construct_call_(is_construct_call) { + Object** values = begin(); + values[T::kDataIndex] = data; + values[T::kCalleeIndex] = callee; + values[T::kHolderIndex] = holder; + values[T::kContextSaveIndex] = isolate->heap()->the_hole_value(); + values[T::kIsolateIndex] = reinterpret_cast(isolate); + // Here the hole is set as default value. + // It cannot escape into js as it's remove in Call below. + values[T::kReturnValueDefaultValueIndex] = + isolate->heap()->the_hole_value(); + values[T::kReturnValueIndex] = isolate->heap()->the_hole_value(); + DCHECK(values[T::kCalleeIndex]->IsJSFunction() || + values[T::kCalleeIndex]->IsFunctionTemplateInfo()); + DCHECK(values[T::kHolderIndex]->IsHeapObject()); + DCHECK(values[T::kIsolateIndex]->IsSmi()); + } + + /* + * The following Call function wraps the calling of all callbacks to handle + * calling either the old or the new style callbacks depending on which one + * has been registered. + * For old callbacks which return an empty handle, the ReturnValue is checked + * and used if it's been set to anything inside the callback. + * New style callbacks always use the return value. + */ + Handle Call(FunctionCallback f); + + private: + internal::Object** argv_; + int argc_; + bool is_construct_call_; +}; + +} // namespace internal +} // namespace v8 + +#endif // V8_API_ARGUMENTS_H_ diff --git a/deps/v8/src/api-experimental.cc b/deps/v8/src/api-experimental.cc index 98d62e33a2f035..39284342702273 100644 --- a/deps/v8/src/api-experimental.cc +++ b/deps/v8/src/api-experimental.cc @@ -11,20 +11,17 @@ #include "include/v8.h" #include "include/v8-experimental.h" #include "src/api.h" -#include "src/compiler/fast-accessor-assembler.h" +#include "src/fast-accessor-assembler.h" namespace { - -v8::internal::compiler::FastAccessorAssembler* FromApi( +v8::internal::FastAccessorAssembler* FromApi( v8::experimental::FastAccessorBuilder* builder) { - return reinterpret_cast( - builder); + return reinterpret_cast(builder); } - v8::experimental::FastAccessorBuilder* FromInternal( - v8::internal::compiler::FastAccessorAssembler* fast_accessor_assembler) { + v8::internal::FastAccessorAssembler* fast_accessor_assembler) { return reinterpret_cast( fast_accessor_assembler); } @@ -57,8 +54,8 @@ namespace experimental { FastAccessorBuilder* FastAccessorBuilder::New(Isolate* isolate) { i::Isolate* i_isolate = reinterpret_cast(isolate); - internal::compiler::FastAccessorAssembler* faa = - new internal::compiler::FastAccessorAssembler(i_isolate); + internal::FastAccessorAssembler* faa = + new internal::FastAccessorAssembler(i_isolate); return FromInternal(faa); } diff --git a/deps/v8/src/api-natives.cc b/deps/v8/src/api-natives.cc index 3be2df0bb686a5..adf4b6af576431 100644 --- a/deps/v8/src/api-natives.cc +++ b/deps/v8/src/api-natives.cc @@ -266,28 +266,45 @@ MaybeHandle ConfigureInstance(Isolate* isolate, Handle obj, return obj; } -void CacheTemplateInstantiation(Isolate* isolate, Handle serial_number, +void CacheTemplateInstantiation(Isolate* isolate, uint32_t serial_number, Handle object) { auto cache = isolate->template_instantiations_cache(); - auto new_cache = ObjectHashTable::Put(cache, serial_number, object); + auto new_cache = + UnseededNumberDictionary::AtNumberPut(cache, serial_number, object); isolate->native_context()->set_template_instantiations_cache(*new_cache); } -void UncacheTemplateInstantiation(Isolate* isolate, Handle serial_number) { +void UncacheTemplateInstantiation(Isolate* isolate, uint32_t serial_number) { auto cache = isolate->template_instantiations_cache(); - bool was_present = false; - auto new_cache = ObjectHashTable::Remove(cache, serial_number, &was_present); - DCHECK(was_present); + int entry = cache->FindEntry(serial_number); + DCHECK(entry != UnseededNumberDictionary::kNotFound); + Handle result = + UnseededNumberDictionary::DeleteProperty(cache, entry); + USE(result); + DCHECK(result->IsTrue()); + auto new_cache = UnseededNumberDictionary::Shrink(cache, entry); isolate->native_context()->set_template_instantiations_cache(*new_cache); } MaybeHandle InstantiateObject(Isolate* isolate, Handle info, bool is_hidden_prototype) { - // Enter a new scope. Recursion could otherwise create a lot of handles. - HandleScope scope(isolate); // Fast path. Handle result; + uint32_t serial_number = + static_cast(Smi::cast(info->serial_number())->value()); + if (serial_number) { + // Probe cache. + auto cache = isolate->template_instantiations_cache(); + int entry = cache->FindEntry(serial_number); + if (entry != UnseededNumberDictionary::kNotFound) { + Object* boilerplate = cache->ValueAt(entry); + result = handle(JSObject::cast(boilerplate), isolate); + return isolate->factory()->CopyJSObject(result); + } + } + // Enter a new scope. Recursion could otherwise create a lot of handles. + HandleScope scope(isolate); auto constructor = handle(info->constructor(), isolate); Handle cons; if (constructor->IsUndefined()) { @@ -297,18 +314,6 @@ MaybeHandle InstantiateObject(Isolate* isolate, ASSIGN_RETURN_ON_EXCEPTION( isolate, cons, InstantiateFunction(isolate, cons_templ), JSFunction); } - auto serial_number = handle(Smi::cast(info->serial_number()), isolate); - if (serial_number->value()) { - // Probe cache. - auto cache = isolate->template_instantiations_cache(); - Object* boilerplate = cache->Lookup(serial_number); - if (boilerplate->IsJSObject()) { - result = handle(JSObject::cast(boilerplate), isolate); - ASSIGN_RETURN_ON_EXCEPTION( - isolate, result, JSObject::DeepCopyApiBoilerplate(result), JSObject); - return scope.CloseAndEscape(result); - } - } auto object = isolate->factory()->NewJSObject(cons); ASSIGN_RETURN_ON_EXCEPTION( isolate, result, @@ -317,10 +322,9 @@ MaybeHandle InstantiateObject(Isolate* isolate, // TODO(dcarney): is this necessary? JSObject::MigrateSlowToFast(result, 0, "ApiNatives::InstantiateObject"); - if (serial_number->value()) { + if (serial_number) { CacheTemplateInstantiation(isolate, serial_number, result); - ASSIGN_RETURN_ON_EXCEPTION( - isolate, result, JSObject::DeepCopyApiBoilerplate(result), JSObject); + result = isolate->factory()->CopyJSObject(result); } return scope.CloseAndEscape(result); } @@ -329,12 +333,14 @@ MaybeHandle InstantiateObject(Isolate* isolate, MaybeHandle InstantiateFunction(Isolate* isolate, Handle data, Handle name) { - auto serial_number = handle(Smi::cast(data->serial_number()), isolate); - if (serial_number->value()) { + uint32_t serial_number = + static_cast(Smi::cast(data->serial_number())->value()); + if (serial_number) { // Probe cache. auto cache = isolate->template_instantiations_cache(); - Object* element = cache->Lookup(serial_number); - if (element->IsJSFunction()) { + int entry = cache->FindEntry(serial_number); + if (entry != UnseededNumberDictionary::kNotFound) { + Object* element = cache->ValueAt(entry); return handle(JSFunction::cast(element), isolate); } } @@ -378,7 +384,7 @@ MaybeHandle InstantiateFunction(Isolate* isolate, if (!name.is_null() && name->IsString()) { function->shared()->set_name(*name); } - if (serial_number->value()) { + if (serial_number) { // Cache the function. CacheTemplateInstantiation(isolate, serial_number, function); } @@ -386,7 +392,7 @@ MaybeHandle InstantiateFunction(Isolate* isolate, ConfigureInstance(isolate, function, data, data->hidden_prototype()); if (result.is_null()) { // Uncache on error. - if (serial_number->value()) { + if (serial_number) { UncacheTemplateInstantiation(isolate, serial_number); } return MaybeHandle(); @@ -536,7 +542,13 @@ Handle ApiNatives::CreateApiFunction( InstanceType type; switch (instance_type) { case JavaScriptObjectType: - type = JS_OBJECT_TYPE; + if (!obj->needs_access_check() && + obj->named_property_handler()->IsUndefined() && + obj->indexed_property_handler()->IsUndefined()) { + type = JS_OBJECT_TYPE; + } else { + type = JS_SPECIAL_API_OBJECT_TYPE; + } instance_size += JSObject::kHeaderSize; break; case GlobalObjectType: @@ -564,7 +576,7 @@ Handle ApiNatives::CreateApiFunction( result->shared()->set_instance_class_name(*class_name); result->shared()->set_name(*class_name); } - result->shared()->set_function_data(*obj); + result->shared()->set_api_func_data(*obj); result->shared()->set_construct_stub(*construct_stub); result->shared()->DontAdaptArguments(); diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index 9b6ae720528404..6206074944e882 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -156,6 +156,18 @@ class InternalEscapableScope : public v8::EscapableHandleScope { }; +#ifdef DEBUG +void CheckMicrotasksScopesConsistency(i::Isolate* isolate) { + auto handle_scope_implementer = isolate->handle_scope_implementer(); + if (handle_scope_implementer->microtasks_policy() == + v8::MicrotasksPolicy::kScoped) { + DCHECK(handle_scope_implementer->GetMicrotasksScopeDepth() || + !handle_scope_implementer->DebugMicrotasksScopeDepthIsZero()); + } +} +#endif + + class CallDepthScope { public: explicit CallDepthScope(i::Isolate* isolate, Local context, @@ -175,6 +187,9 @@ class CallDepthScope { if (!context_.IsEmpty()) context_->Exit(); if (!escaped_) isolate_->handle_scope_implementer()->DecrementCallDepth(); if (do_callback_) isolate_->FireCallCompletedCallback(); +#ifdef DEBUG + if (do_callback_) CheckMicrotasksScopesConsistency(isolate_); +#endif } void Escape() { @@ -226,7 +241,7 @@ void i::FatalProcessOutOfMemory(const char* location) { // When V8 cannot allocated memory FatalProcessOutOfMemory is called. // The default fatal error handler is called and execution is stopped. -void i::V8::FatalProcessOutOfMemory(const char* location, bool is_heap_oom) { +void i::V8::FatalProcessOutOfMemory(const char* location, bool take_snapshot) { i::Isolate* isolate = i::Isolate::Current(); char last_few_messages[Heap::kTraceRingBufferSize + 1]; char js_stacktrace[Heap::kStacktraceBufferSize + 1]; @@ -288,9 +303,7 @@ void i::V8::FatalProcessOutOfMemory(const char* location, bool is_heap_oom) { PrintF("\n<--- Last few GCs --->\n%s\n", first_newline); PrintF("\n<--- JS stacktrace --->\n%s\n", js_stacktrace); } - Utils::ApiCheck(false, location, is_heap_oom - ? "Allocation failed - JavaScript heap out of memory" - : "Allocation failed - process out of memory"); + Utils::ApiCheck(false, location, "Allocation failed - process out of memory"); // If the fatal error handler returns, we stop execution. FATAL("API fatal error handler returned after process out of memory"); } @@ -328,12 +341,23 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { i::V8::SetSnapshotBlob(snapshot_blob); } +namespace { + +class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { + public: + virtual void* Allocate(size_t length) { + void* data = AllocateUninitialized(length); + return data == NULL ? data : memset(data, 0, length); + } + virtual void* AllocateUninitialized(size_t length) { return malloc(length); } + virtual void Free(void* data, size_t) { free(data); } +}; bool RunExtraCode(Isolate* isolate, Local context, - const char* utf8_source) { - // Run custom script if provided. + const char* utf8_source, const char* name) { base::ElapsedTimer timer; timer.Start(); + Context::Scope context_scope(context); TryCatch try_catch(isolate); Local source_string; if (!String::NewFromUtf8(isolate, utf8_source, NewStringType::kNormal) @@ -341,7 +365,7 @@ bool RunExtraCode(Isolate* isolate, Local context, return false; } Local resource_name = - String::NewFromUtf8(isolate, "", NewStringType::kNormal) + String::NewFromUtf8(isolate, name, NewStringType::kNormal) .ToLocalChecked(); ScriptOrigin origin(resource_name); ScriptCompiler::Source source(source_string, origin); @@ -349,7 +373,7 @@ bool RunExtraCode(Isolate* isolate, Local context, if (!ScriptCompiler::Compile(context, &source).ToLocal(&script)) return false; if (script->Run(context).IsEmpty()) return false; if (i::FLAG_profile_deserialization) { - i::PrintF("Executing custom snapshot script took %0.3f ms\n", + i::PrintF("Executing custom snapshot script %s took %0.3f ms\n", name, timer.Elapsed().InMillisecondsF()); } timer.Stop(); @@ -357,92 +381,152 @@ bool RunExtraCode(Isolate* isolate, Local context, return true; } +StartupData SerializeIsolateAndContext( + Isolate* isolate, Persistent* context, + i::Snapshot::Metadata metadata, + i::StartupSerializer::FunctionCodeHandling function_code_handling) { + if (context->IsEmpty()) return {NULL, 0}; -namespace { + i::Isolate* internal_isolate = reinterpret_cast(isolate); -class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { - public: - virtual void* Allocate(size_t length) { - void* data = AllocateUninitialized(length); - return data == NULL ? data : memset(data, 0, length); + // If we don't do this then we end up with a stray root pointing at the + // context even after we have disposed of the context. + internal_isolate->heap()->CollectAllAvailableGarbage("mksnapshot"); + + // GC may have cleared weak cells, so compact any WeakFixedArrays + // found on the heap. + i::HeapIterator iterator(internal_isolate->heap(), + i::HeapIterator::kFilterUnreachable); + for (i::HeapObject* o = iterator.next(); o != NULL; o = iterator.next()) { + if (o->IsPrototypeInfo()) { + i::Object* prototype_users = i::PrototypeInfo::cast(o)->prototype_users(); + if (prototype_users->IsWeakFixedArray()) { + i::WeakFixedArray* array = i::WeakFixedArray::cast(prototype_users); + array->Compact(); + } + } else if (o->IsScript()) { + i::Object* shared_list = i::Script::cast(o)->shared_function_infos(); + if (shared_list->IsWeakFixedArray()) { + i::WeakFixedArray* array = i::WeakFixedArray::cast(shared_list); + array->Compact(); + } + } } - virtual void* AllocateUninitialized(size_t length) { return malloc(length); } - virtual void Free(void* data, size_t) { free(data); } -}; + + i::Object* raw_context = *v8::Utils::OpenPersistent(*context); + context->Reset(); + + i::SnapshotByteSink snapshot_sink; + i::StartupSerializer ser(internal_isolate, &snapshot_sink, + function_code_handling); + ser.SerializeStrongReferences(); + + i::SnapshotByteSink context_sink; + i::PartialSerializer context_ser(internal_isolate, &ser, &context_sink); + context_ser.Serialize(&raw_context); + ser.SerializeWeakReferencesAndDeferred(); + + return i::Snapshot::CreateSnapshotBlob(ser, context_ser, metadata); +} } // namespace +StartupData V8::CreateSnapshotDataBlob(const char* embedded_source) { + // Create a new isolate and a new context from scratch, optionally run + // a script to embed, and serialize to create a snapshot blob. + StartupData result = {NULL, 0}; + + base::ElapsedTimer timer; + timer.Start(); -StartupData V8::CreateSnapshotDataBlob(const char* custom_source) { - i::Isolate* internal_isolate = new i::Isolate(true); ArrayBufferAllocator allocator; + i::Isolate* internal_isolate = new i::Isolate(true); internal_isolate->set_array_buffer_allocator(&allocator); Isolate* isolate = reinterpret_cast(internal_isolate); - StartupData result = {NULL, 0}; + { - base::ElapsedTimer timer; - timer.Start(); Isolate::Scope isolate_scope(isolate); internal_isolate->Init(NULL); Persistent context; - i::Snapshot::Metadata metadata; { HandleScope handle_scope(isolate); Local new_context = Context::New(isolate); context.Reset(isolate, new_context); - if (custom_source != NULL) { - metadata.set_embeds_script(true); - Context::Scope context_scope(new_context); - if (!RunExtraCode(isolate, new_context, custom_source)) context.Reset(); + if (embedded_source != NULL && + !RunExtraCode(isolate, new_context, embedded_source, "")) { + context.Reset(); } } - if (!context.IsEmpty()) { - // If we don't do this then we end up with a stray root pointing at the - // context even after we have disposed of the context. - internal_isolate->heap()->CollectAllAvailableGarbage("mksnapshot"); - - // GC may have cleared weak cells, so compact any WeakFixedArrays - // found on the heap. - i::HeapIterator iterator(internal_isolate->heap(), - i::HeapIterator::kFilterUnreachable); - for (i::HeapObject* o = iterator.next(); o != NULL; o = iterator.next()) { - if (o->IsPrototypeInfo()) { - i::Object* prototype_users = - i::PrototypeInfo::cast(o)->prototype_users(); - if (prototype_users->IsWeakFixedArray()) { - i::WeakFixedArray* array = i::WeakFixedArray::cast(prototype_users); - array->Compact(); - } - } else if (o->IsScript()) { - i::Object* shared_list = i::Script::cast(o)->shared_function_infos(); - if (shared_list->IsWeakFixedArray()) { - i::WeakFixedArray* array = i::WeakFixedArray::cast(shared_list); - array->Compact(); - } - } - } - i::Object* raw_context = *v8::Utils::OpenPersistent(context); - context.Reset(); + i::Snapshot::Metadata metadata; + metadata.set_embeds_script(embedded_source != NULL); + + result = SerializeIsolateAndContext( + isolate, &context, metadata, i::StartupSerializer::CLEAR_FUNCTION_CODE); + DCHECK(context.IsEmpty()); + } + isolate->Dispose(); + + if (i::FLAG_profile_deserialization) { + i::PrintF("Creating snapshot took %0.3f ms\n", + timer.Elapsed().InMillisecondsF()); + } + timer.Stop(); + return result; +} + +StartupData V8::WarmUpSnapshotDataBlob(StartupData cold_snapshot_blob, + const char* warmup_source) { + CHECK(cold_snapshot_blob.raw_size > 0 && cold_snapshot_blob.data != NULL); + CHECK(warmup_source != NULL); + // Use following steps to create a warmed up snapshot blob from a cold one: + // - Create a new isolate from the cold snapshot. + // - Create a new context to run the warmup script. This will trigger + // compilation of executed functions. + // - Create a new context. This context will be unpolluted. + // - Serialize the isolate and the second context into a new snapshot blob. + StartupData result = {NULL, 0}; - i::SnapshotByteSink snapshot_sink; - i::StartupSerializer ser(internal_isolate, &snapshot_sink); - ser.SerializeStrongReferences(); + base::ElapsedTimer timer; + timer.Start(); - i::SnapshotByteSink context_sink; - i::PartialSerializer context_ser(internal_isolate, &ser, &context_sink); - context_ser.Serialize(&raw_context); - ser.SerializeWeakReferencesAndDeferred(); + ArrayBufferAllocator allocator; + i::Isolate* internal_isolate = new i::Isolate(true); + internal_isolate->set_array_buffer_allocator(&allocator); + internal_isolate->set_snapshot_blob(&cold_snapshot_blob); + Isolate* isolate = reinterpret_cast(internal_isolate); - result = i::Snapshot::CreateSnapshotBlob(ser, context_ser, metadata); + { + Isolate::Scope isolate_scope(isolate); + i::Snapshot::Initialize(internal_isolate); + Persistent context; + bool success; + { + HandleScope handle_scope(isolate); + Local new_context = Context::New(isolate); + success = RunExtraCode(isolate, new_context, warmup_source, ""); } - if (i::FLAG_profile_deserialization) { - i::PrintF("Creating snapshot took %0.3f ms\n", - timer.Elapsed().InMillisecondsF()); + if (success) { + HandleScope handle_scope(isolate); + isolate->ContextDisposedNotification(false); + Local new_context = Context::New(isolate); + context.Reset(isolate, new_context); } - timer.Stop(); + + i::Snapshot::Metadata metadata; + metadata.set_embeds_script(i::Snapshot::EmbedsScript(internal_isolate)); + + result = SerializeIsolateAndContext( + isolate, &context, metadata, i::StartupSerializer::KEEP_FUNCTION_CODE); + DCHECK(context.IsEmpty()); } isolate->Dispose(); + + if (i::FLAG_profile_deserialization) { + i::PrintF("Warming up snapshot took %0.3f ms\n", + timer.Elapsed().InMillisecondsF()); + } + timer.Stop(); return result; } @@ -593,6 +677,10 @@ i::Object** V8::CopyPersistent(i::Object** obj) { return result.location(); } +void V8::RegisterExternallyReferencedObject(i::Object** object, + i::Isolate* isolate) { + isolate->heap()->RegisterExternallyReferencedObject(object); +} void V8::MakeWeak(i::Object** object, void* parameter, WeakCallback weak_callback) { @@ -940,19 +1028,15 @@ void Template::Set(v8::Local name, v8::Local value, ENTER_V8(isolate); i::HandleScope scope(isolate); auto value_obj = Utils::OpenHandle(*value); - if (i::FLAG_warn_template_set && - value_obj->IsJSReceiver() && - !value_obj->IsTemplateInfo()) { - base::OS::PrintError( - "(node) v8::%sTemplate::Set() with non-primitive values is deprecated\n" - "(node) and will stop working in the next major release.\n", - templ->IsFunctionTemplateInfo() ? "Function" : "Object"); - isolate->PrintStack(stderr, i::Isolate::kPrintStackConcise); - base::DumpBacktrace(); + if (value_obj->IsObjectTemplateInfo()) { + templ->set_serial_number(i::Smi::FromInt(0)); + if (templ->IsFunctionTemplateInfo()) { + i::Handle::cast(templ)->set_do_not_cache(true); + } } // TODO(dcarney): split api to allow values of v8::Value or v8::TemplateInfo. i::ApiNatives::AddDataProperty(isolate, templ, Utils::OpenHandle(*name), - Utils::OpenHandle(*value), + value_obj, static_cast(attribute)); } @@ -1057,14 +1141,26 @@ Local FunctionTemplate::New(Isolate* isolate, v8::Local data, v8::Local signature, int length) { + return New( + isolate, callback, data, signature, length, ConstructorBehavior::kAllow); +} + +Local FunctionTemplate::New(Isolate* isolate, + FunctionCallback callback, + v8::Local data, + v8::Local signature, + int length, + ConstructorBehavior behavior) { i::Isolate* i_isolate = reinterpret_cast(isolate); // Changes to the environment cannot be captured in the snapshot. Expect no // function templates when the isolate is created for serialization. DCHECK(!i_isolate->serializer_enabled()); LOG_API(i_isolate, "FunctionTemplate::New"); ENTER_V8(i_isolate); - return FunctionTemplateNew(i_isolate, callback, nullptr, data, signature, - length, false); + auto tmpl = FunctionTemplateNew(i_isolate, callback, nullptr, data, signature, + length, false); + if (behavior == ConstructorBehavior::kThrow) tmpl->RemovePrototype(); + return tmpl; } @@ -1772,7 +1868,7 @@ MaybeLocal ScriptCompiler::CompileUnboundInternal( if (!source->source_map_url.IsEmpty()) { source_map_url = Utils::OpenHandle(*(source->source_map_url)); } - result = i::Compiler::CompileScript( + result = i::Compiler::GetSharedFunctionInfoForScript( str, name_obj, line_offset, column_offset, source->resource_options, source_map_url, isolate->native_context(), NULL, &script_data, options, i::NOT_NATIVES_CODE, is_module); @@ -1841,7 +1937,6 @@ Local