diff --git a/Makefile b/Makefile index d82926dab75200..0716121b8b29a5 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ $(NODE_G_EXE): config.gypi out/Makefile $(MAKE) -C out BUILDTYPE=Debug V=$(V) ln -fs out/Debug/$(NODE_EXE) $@ -out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/toolchain.gypi deps/v8/build/features.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi +out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi deps/v8/gypfiles/features.gypi deps/v8/src/v8.gyp node.gyp config.gypi $(PYTHON) tools/gyp_node.py -f make config.gypi: configure diff --git a/common.gypi b/common.gypi index 646db0d7bbb339..81101df65ac0ae 100644 --- a/common.gypi +++ b/common.gypi @@ -43,7 +43,7 @@ 'V8_BASE': '<(PRODUCT_DIR)/libv8_base.a', }, { 'OBJ_DIR': '<(PRODUCT_DIR)/obj.target', - 'V8_BASE': '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a', + 'V8_BASE': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a', }], ['openssl_fips != ""', { 'OPENSSL_PRODUCT': 'libcrypto.a', diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index 805f349a6e4300..f3d62191132ba6 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -40,11 +40,8 @@ gcsuspects shell shell_g /_* -/build/Debug -/build/gyp -/build/ipch -/build/Release -/build/win_toolchain.json +/build +/gypfiles/win_toolchain.json /buildtools /hydrogen.cfg /obj @@ -68,6 +65,7 @@ shell_g /tools/clang /tools/gcmole/gcmole-tools /tools/gcmole/gcmole-tools.tar.gz +/tools/gyp /tools/jsfunfuzz/jsfunfuzz /tools/jsfunfuzz/jsfunfuzz.tar.gz /tools/luci-go/linux64/isolate @@ -86,7 +84,9 @@ GTAGS GRTAGS GSYMS GPATH +tags gtags.files turbo*.cfg turbo*.dot turbo*.json +v8.ignition_dispatches_table.json diff --git a/deps/v8/.gn b/deps/v8/.gn new file mode 100644 index 00000000000000..e1eedbf9925bcf --- /dev/null +++ b/deps/v8/.gn @@ -0,0 +1,41 @@ +# This file is used by the GN meta build system to find the root of the source +# tree and to set startup options. For documentation on the values set in this +# file, run "gn help dotfile" at the command line. + +# The location of the build configuration file. +buildconfig = "//build/config/BUILDCONFIG.gn" + +# The secondary source root is a parallel directory tree where +# GN build files are placed when they can not be placed directly +# in the source tree, e.g. for third party source trees. +secondary_source = "//build/secondary/" + +# These are the targets to check headers for by default. The files in targets +# matching these patterns (see "gn help label_pattern" for format) will have +# their includes checked for proper dependencies when you run either +# "gn check" or "gn gen --check". +check_targets = [ +] + +# These are the list of GN files that run exec_script. This whitelist exists +# to force additional review for new uses of exec_script, which is strongly +# discouraged except for gypi_to_gn calls. +exec_script_whitelist = [ + "//build/config/android/BUILD.gn", + "//build/config/android/config.gni", + "//build/config/android/internal_rules.gni", + "//build/config/android/rules.gni", + "//build/config/BUILD.gn", + "//build/config/compiler/BUILD.gn", + "//build/config/gcc/gcc_version.gni", + "//build/config/ios/ios_sdk.gni", + "//build/config/linux/BUILD.gn", + "//build/config/linux/pkg_config.gni", + "//build/config/mac/mac_sdk.gni", + "//build/config/posix/BUILD.gn", + "//build/config/sysroot.gni", + "//build/config/win/visual_studio_version.gni", + "//build/toolchain/gcc_toolchain.gni", + "//build/toolchain/mac/BUILD.gn", + "//build/toolchain/win/BUILD.gn", +] diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index 60b6c51db5eb1a..10d4a359572ba6 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -40,6 +40,7 @@ Alexis Campailla Andreas Anyuru Andrew Paprocki Andrei Kashcha +Anna Henningsen Bangfu Tao Ben Noordhuis Benjamin Tan diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 28aca24afc81c4..eec472ff60f8d8 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -18,10 +18,52 @@ import("//build_overrides/v8.gni") import("snapshot_toolchain.gni") declare_args() { + # Use ICU data file (icudtl.dat) if true or library (shared on windows, + # static otherwise). + icu_use_data_file_flag = true + # Enable the snapshot feature, for fast context creation. # http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html v8_use_snapshot = true + # Use external files for startup data blobs: + # the JS builtins sources and the start snapshot. + v8_use_external_startup_data = true + + # Sets -DVERIFY_HEAP. + v8_enable_verify_heap = false + + # Enable compiler warnings when using V8_DEPRECATED apis. + v8_deprecation_warnings = false + + # Enable compiler warnings when using V8_DEPRECATE_SOON apis. + v8_imminent_deprecation_warnings = false + + # Sets -dENABLE_DISASSEMBLER. + v8_enable_disassembler = false + + # Sets -dENABLE_GDB_JIT_INTERFACE. + v8_enable_gdbjit = false + + # Sets -dENABLE_HANDLE_ZAPPING. + v8_enable_handle_zapping = is_debug + + # Enable ECMAScript Internationalization API. Enabling this feature will + # add a dependency on the ICU library. + v8_enable_i18n_support = true + + # Interpreted regexp engine exists as platform-independent alternative + # based where the regular expression is compiled to a bytecode. + v8_interpreted_regexp = false + + # Sets -dOBJECT_PRINT. + v8_object_print = false + + # With post mortem support enabled, metadata is embedded into libv8 that + # describes various parameters of the VM for use by debuggers. See + # tools/gen-postmortem-metadata.py for details. + v8_postmortem_support = false + # Similar to vfp but on MIPS. v8_can_use_fpu_instructions = true @@ -29,19 +71,8 @@ declare_args() { v8_use_mips_abi_hardfloat = true } -# TODO(jochen): These will need to be user-settable to support standalone V8 -# builds. -v8_deprecation_warnings = false -v8_enable_disassembler = false -v8_enable_gdbjit = false -v8_enable_handle_zapping = false -v8_enable_i18n_support = true -v8_enable_verify_heap = false -v8_interpreted_regexp = false -v8_object_print = false -v8_postmortem_support = false v8_random_seed = "314159265" -v8_toolset_for_d8 = "host" +v8_toolset_for_shell = "host" if (is_msan) { # Running the V8-generated code on an ARM simulator is a powerful hack that @@ -98,6 +129,10 @@ config("external_config") { ] } include_dirs = [ "include" ] + libs = [] + if (is_android && current_toolchain != host_toolchain) { + libs += [ "log" ] + } } # This config should only be applied to code that needs to be explicitly @@ -113,31 +148,34 @@ config("features") { defines = [] - if (v8_enable_disassembler == true) { + if (v8_enable_disassembler) { defines += [ "ENABLE_DISASSEMBLER" ] } - if (v8_enable_gdbjit == true) { + if (v8_enable_gdbjit) { defines += [ "ENABLE_GDB_JIT_INTERFACE" ] } - if (v8_object_print == true) { + if (v8_object_print) { defines += [ "OBJECT_PRINT" ] } - if (v8_enable_verify_heap == true) { + if (v8_enable_verify_heap) { defines += [ "VERIFY_HEAP" ] } - if (v8_interpreted_regexp == true) { + if (v8_interpreted_regexp) { defines += [ "V8_INTERPRETED_REGEXP" ] } - if (v8_deprecation_warnings == true) { + if (v8_deprecation_warnings) { defines += [ "V8_DEPRECATION_WARNINGS" ] } - if (v8_enable_i18n_support == true) { + if (v8_imminent_deprecation_warnings) { + defines += [ "V8_IMMINENT_DEPRECATION_WARNINGS" ] + } + if (v8_enable_i18n_support) { defines += [ "V8_I18N_SUPPORT" ] } - if (v8_enable_handle_zapping == true) { + if (v8_enable_handle_zapping) { defines += [ "ENABLE_HANDLE_ZAPPING" ] } - if (v8_use_external_startup_data == true) { + if (v8_use_external_startup_data) { defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] } } @@ -167,6 +205,7 @@ config("toolchain") { "CAN_USE_NEON", ] } + # TODO(jochen): Add support for arm_test_noprobe. if (current_cpu != "arm") { @@ -181,6 +220,7 @@ config("toolchain") { 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" ] @@ -212,14 +252,17 @@ config("toolchain") { } 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) { @@ -238,7 +281,7 @@ config("toolchain") { } if (v8_target_arch == "s390") { defines += [ "V8_TARGET_ARCH_S390" ] - } + } if (v8_target_arch == "s390x") { defines += [ "V8_TARGET_ARCH_S390", @@ -251,7 +294,7 @@ config("toolchain") { if (v8_target_arch == "x64") { defines += [ "V8_TARGET_ARCH_X64" ] } - + if (is_win) { defines += [ "WIN32" ] # TODO(jochen): Support v8_enable_prof. @@ -267,8 +310,33 @@ config("toolchain") { "OBJECT_PRINT", "VERIFY_HEAP", "DEBUG", - "OPTIMIZED_DEBUG", + "TRACE_MAPS", ] + if (!v8_optimized_debug) { + defines += [ "ENABLE_SLOW_DCHECKS" ] + } + } +} + +############################################################################### +# Templates +# + +template("v8_source_set") { + source_set(target_name) { + forward_variables_from(invoker, "*", [ "configs" ]) + configs += invoker.configs + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ + ":features", + ":toolchain", + ] + + if (!is_debug || v8_optimized_debug) { + configs -= [ "//build/config/compiler:default_optimization" ] + configs += [ "//build/config/compiler:optimize_max" ] + } } } @@ -304,8 +372,6 @@ action("js2c") { "src/js/arraybuffer.js", "src/js/typedarray.js", "src/js/iterator-prototype.js", - "src/js/generator.js", - "src/js/object-observe.js", "src/js/collection.js", "src/js/weak-collection.js", "src/js/collection-iterator.js", @@ -359,10 +425,9 @@ action("js2c_experimental") { sources = [ "src/js/macros.py", "src/messages.h", - "src/js/generator.js", + "src/js/harmony-async-await.js", "src/js/harmony-atomics.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", @@ -375,6 +440,13 @@ action("js2c_experimental") { "$target_gen_dir/experimental-libraries.cc", ] + if (v8_enable_i18n_support) { + sources += [ + "src/js/icu-case-mapping.js", + "src/js/intl-extra.js", + ] + } + args = [ rebase_path("$target_gen_dir/experimental-libraries.cc", root_build_dir), @@ -580,7 +652,7 @@ action("run_mksnapshot") { # Source Sets (aka static libraries) # -source_set("v8_nosnapshot") { +v8_source_set("v8_nosnapshot") { visibility = [ ":*" ] # Only targets in this file can depend on this. deps = [ @@ -599,16 +671,10 @@ source_set("v8_nosnapshot") { "src/snapshot/snapshot-empty.cc", ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ - ":internal_config", - ":features", - ":toolchain", - ] + configs = [ ":internal_config" ] } -source_set("v8_snapshot") { +v8_source_set("v8_snapshot") { # Only targets in this file and the top-level visibility target can # depend on this. visibility = [ @@ -637,17 +703,11 @@ source_set("v8_snapshot") { "$target_gen_dir/snapshot.cc", ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ - ":internal_config", - ":features", - ":toolchain", - ] + configs = [ ":internal_config" ] } if (v8_use_external_startup_data) { - source_set("v8_external_snapshot") { + v8_source_set("v8_external_snapshot") { visibility = [ ":*" ] # Only targets in this file can depend on this. deps = [ @@ -667,17 +727,11 @@ if (v8_use_external_startup_data) { "src/snapshot/snapshot-external.cc", ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ - ":internal_config", - ":features", - ":toolchain", - ] + configs = [ ":internal_config" ] } } -source_set("v8_base") { +v8_source_set("v8_base") { visibility = [ ":*" ] # Only targets in this file can depend on this. sources = [ @@ -722,6 +776,7 @@ source_set("v8_base") { "src/ast/ast-literal-reindexer.h", "src/ast/ast-numbering.cc", "src/ast/ast-numbering.h", + "src/ast/ast-type-bounds.h", "src/ast/ast-value-factory.cc", "src/ast/ast-value-factory.h", "src/ast/ast.cc", @@ -736,7 +791,6 @@ source_set("v8_base") { "src/ast/scopes.h", "src/ast/variables.cc", "src/ast/variables.h", - "src/atomic-utils.h", "src/background-parsing-task.cc", "src/background-parsing-task.h", "src/bailout-reason.cc", @@ -763,6 +817,8 @@ source_set("v8_base") { "src/checks.h", "src/code-factory.cc", "src/code-factory.h", + "src/code-stub-assembler.cc", + "src/code-stub-assembler.h", "src/code-stubs-hydrogen.cc", "src/code-stubs.cc", "src/code-stubs.h", @@ -796,15 +852,13 @@ source_set("v8_base") { "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/coalesced-live-ranges.cc", "src/compiler/coalesced-live-ranges.h", + "src/compiler/code-assembler.cc", + "src/compiler/code-assembler.h", "src/compiler/code-generator-impl.h", "src/compiler/code-generator.cc", "src/compiler/code-generator.h", - "src/compiler/code-stub-assembler.cc", - "src/compiler/code-stub-assembler.h", "src/compiler/common-node-cache.cc", "src/compiler/common-node-cache.h", "src/compiler/common-operator-reducer.cc", @@ -820,6 +874,8 @@ source_set("v8_base") { "src/compiler/dead-code-elimination.cc", "src/compiler/dead-code-elimination.h", "src/compiler/diamond.h", + "src/compiler/effect-control-linearizer.cc", + "src/compiler/effect-control-linearizer.h", "src/compiler/escape-analysis-reducer.cc", "src/compiler/escape-analysis-reducer.h", "src/compiler/escape-analysis.cc", @@ -899,6 +955,8 @@ source_set("v8_base") { "src/compiler/machine-operator-reducer.h", "src/compiler/machine-operator.cc", "src/compiler/machine-operator.h", + "src/compiler/memory-optimizer.cc", + "src/compiler/memory-optimizer.h", "src/compiler/move-optimizer.cc", "src/compiler/move-optimizer.h", "src/compiler/node-aux-data.h", @@ -973,6 +1031,7 @@ source_set("v8_base") { "src/conversions-inl.h", "src/conversions.cc", "src/conversions.h", + "src/counters-inl.h", "src/counters.cc", "src/counters.h", "src/crankshaft/compilation-phase.cc", @@ -1075,6 +1134,8 @@ source_set("v8_base") { "src/extensions/free-buffer-extension.h", "src/extensions/gc-extension.cc", "src/extensions/gc-extension.h", + "src/extensions/ignition-statistics-extension.cc", + "src/extensions/ignition-statistics-extension.h", "src/extensions/statistics-extension.cc", "src/extensions/statistics-extension.h", "src/extensions/trigger-failure-extension.cc", @@ -1177,8 +1238,14 @@ source_set("v8_base") { "src/interpreter/bytecode-array-builder.h", "src/interpreter/bytecode-array-iterator.cc", "src/interpreter/bytecode-array-iterator.h", + "src/interpreter/bytecode-array-writer.cc", + "src/interpreter/bytecode-array-writer.h", "src/interpreter/bytecode-generator.cc", "src/interpreter/bytecode-generator.h", + "src/interpreter/bytecode-peephole-optimizer.cc", + "src/interpreter/bytecode-peephole-optimizer.h", + "src/interpreter/bytecode-pipeline.cc", + "src/interpreter/bytecode-pipeline.h", "src/interpreter/bytecode-register-allocator.cc", "src/interpreter/bytecode-register-allocator.h", "src/interpreter/bytecode-traits.h", @@ -1281,6 +1348,8 @@ source_set("v8_base") { "src/profiler/sampling-heap-profiler.h", "src/profiler/strings-storage.cc", "src/profiler/strings-storage.h", + "src/profiler/tick-sample.cc", + "src/profiler/tick-sample.h", "src/profiler/unbound-queue-inl.h", "src/profiler/unbound-queue.h", "src/property-descriptor.cc", @@ -1332,7 +1401,6 @@ source_set("v8_base") { "src/runtime/runtime-maths.cc", "src/runtime/runtime-numbers.cc", "src/runtime/runtime-object.cc", - "src/runtime/runtime-observe.cc", "src/runtime/runtime-operators.cc", "src/runtime/runtime-proxy.cc", "src/runtime/runtime-regexp.cc", @@ -1399,8 +1467,6 @@ source_set("v8_base") { "src/types.h", "src/typing-asm.cc", "src/typing-asm.h", - "src/typing-reset.cc", - "src/typing-reset.h", "src/unicode-cache-inl.h", "src/unicode-cache.h", "src/unicode-decoder.cc", @@ -1408,6 +1474,8 @@ source_set("v8_base") { "src/unicode-inl.h", "src/unicode.cc", "src/unicode.h", + "src/uri.cc", + "src/uri.h", "src/utils-inl.h", "src/utils.cc", "src/utils.h", @@ -1427,9 +1495,15 @@ source_set("v8_base") { "src/wasm/decoder.h", "src/wasm/encoder.cc", "src/wasm/encoder.h", + "src/wasm/leb-helper.h", "src/wasm/module-decoder.cc", "src/wasm/module-decoder.h", + "src/wasm/switch-logic.cc", + "src/wasm/switch-logic.h", + "src/wasm/wasm-external-refs.cc", "src/wasm/wasm-external-refs.h", + "src/wasm/wasm-function-name-table.cc", + "src/wasm/wasm-function-name-table.h", "src/wasm/wasm-js.cc", "src/wasm/wasm-js.h", "src/wasm/wasm-macro-gen.h", @@ -1664,10 +1738,10 @@ source_set("v8_base") { ] } else if (v8_target_arch == "mips64el") { sources += [ - "compiler/mips64/code-generator-mips64.cc", - "compiler/mips64/instruction-codes-mips64.h", - "compiler/mips64/instruction-scheduler-mips64.cc", - "compiler/mips64/instruction-selector-mips64.cc", + "src/compiler/mips64/code-generator-mips64.cc", + "src/compiler/mips64/instruction-codes-mips64.h", + "src/compiler/mips64/instruction-scheduler-mips64.cc", + "src/compiler/mips64/instruction-selector-mips64.cc", "src/crankshaft/mips64/lithium-codegen-mips64.cc", "src/crankshaft/mips64/lithium-codegen-mips64.h", "src/crankshaft/mips64/lithium-gap-resolver-mips64.cc", @@ -1748,18 +1822,7 @@ source_set("v8_base") { ] } - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ - ":internal_config", - ":features", - ":toolchain", - ] - - if (!is_debug) { - configs -= [ "//build/config/compiler:default_optimization" ] - configs += [ "//build/config/compiler:optimize_max" ] - } + configs = [ ":internal_config" ] defines = [] deps = [ @@ -1777,8 +1840,13 @@ source_set("v8_base") { deps += [ "//third_party/icu:icudata" ] } - # TODO(jochen): Add support for icu_use_data_file_flag - defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ] + if (icu_use_data_file_flag) { + defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ] + } else if (is_win) { + defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED" ] + } else { + defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC" ] + } } else { sources -= [ "src/i18n.cc", @@ -1792,13 +1860,14 @@ source_set("v8_base") { } } -source_set("v8_libbase") { +v8_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/atomic-utils.h", "src/base/atomicops.h", "src/base/atomicops_internals_arm64_gcc.h", "src/base/atomicops_internals_arm_gcc.h", @@ -1820,6 +1889,7 @@ source_set("v8_libbase") { "src/base/division-by-constant.cc", "src/base/division-by-constant.h", "src/base/flags.h", + "src/base/format-macros.h", "src/base/functional.cc", "src/base/functional.h", "src/base/iterator.h", @@ -1850,18 +1920,7 @@ source_set("v8_libbase") { "src/base/utils/random-number-generator.h", ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ - ":internal_config_base", - ":features", - ":toolchain", - ] - - if (!is_debug) { - configs -= [ "//build/config/compiler:default_optimization" ] - configs += [ "//build/config/compiler:optimize_max" ] - } + configs = [ ":internal_config_base" ] defines = [] @@ -1910,7 +1969,7 @@ source_set("v8_libbase") { # TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris. } -source_set("v8_libplatform") { +v8_source_set("v8_libplatform") { sources = [ "include/libplatform/libplatform.h", "src/libplatform/default-platform.cc", @@ -1921,25 +1980,16 @@ source_set("v8_libplatform") { "src/libplatform/worker-thread.h", ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ - ":internal_config_base", - ":features", - ":toolchain", - ] + configs = [ ":internal_config_base" ] - if (!is_debug) { - configs -= [ "//build/config/compiler:default_optimization" ] - configs += [ "//build/config/compiler:optimize_max" ] - } + public_configs = [ ":libplatform_config" ] deps = [ ":v8_libbase", ] } -source_set("fuzzer_support") { +v8_source_set("fuzzer_support") { visibility = [ ":*" ] # Only targets in this file can depend on this. sources = [ @@ -1947,19 +1997,15 @@ source_set("fuzzer_support") { "test/fuzzer/fuzzer-support.h", ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ - ":internal_config_base", - ":libplatform_config", - ":features", - ":toolchain", - ] + configs = [ ":internal_config_base" ] deps = [ - ":v8_libplatform", snapshot_target, ] + + public_deps = [ + ":v8_libplatform", + ] } ############################################################################### @@ -1978,7 +2024,6 @@ if (current_toolchain == snapshot_toolchain) { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config", - ":libplatform_config", ":features", ":toolchain", ] @@ -1988,6 +2033,7 @@ if (current_toolchain == snapshot_toolchain) { ":v8_libplatform", ":v8_nosnapshot", "//build/config/sanitizers:deps", + "//build/win:default_exe_manifest", ] } } @@ -2016,11 +2062,6 @@ if (is_component_build) { ] public_configs = [ ":external_config" ] - - libs = [] - if (is_android && current_toolchain != host_toolchain) { - libs += [ "log" ] - } } } else { group("v8") { @@ -2032,13 +2073,51 @@ if (is_component_build) { } } -if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") || - (current_toolchain == snapshot_toolchain && v8_toolset_for_d8 == "host") || - (current_toolchain != host_toolchain && v8_toolset_for_d8 == "target")) { - executable("d8") { +executable("d8") { + sources = [ + "src/d8.cc", + "src/d8.h", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ + # Note: don't use :internal_config here because this target will get + # the :external_config applied to it by virtue of depending on :v8, and + # you can't have both applied to the same target. + ":internal_config_base", + ":features", + ":toolchain", + ] + + deps = [ + ":d8_js2c", + ":v8", + ":v8_libplatform", + "//build/config/sanitizers:deps", + "//build/win:default_exe_manifest", + ] + + # TODO(jochen): Add support for vtunejit. + + if (is_posix) { + sources += [ "src/d8-posix.cc" ] + } else if (is_win) { + sources += [ "src/d8-windows.cc" ] + } + + if (!is_component_build) { + sources += [ "$target_gen_dir/d8-js.cc" ] + } + if (v8_enable_i18n_support) { + deps += [ "//third_party/icu" ] + } +} + +if ((current_toolchain == host_toolchain && v8_toolset_for_shell == "host") || (current_toolchain == snapshot_toolchain && v8_toolset_for_shell == "host") || (current_toolchain != host_toolchain && v8_toolset_for_shell == "target")) { + executable("v8_shell") { sources = [ - "src/d8.cc", - "src/d8.h", + "samples/shell.cc", ] configs -= [ "//build/config/compiler:chromium_code" ] @@ -2053,30 +2132,19 @@ if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") || ] deps = [ - ":d8_js2c", ":v8", ":v8_libplatform", "//build/config/sanitizers:deps", + "//build/win:default_exe_manifest", ] - # TODO(jochen): Add support for vtunejit. - - if (is_posix) { - sources += [ "src/d8-posix.cc" ] - } else if (is_win) { - sources += [ "src/d8-windows.cc" ] - } - - if (!is_component_build) { - sources += [ "$target_gen_dir/d8-js.cc" ] - } if (v8_enable_i18n_support) { deps += [ "//third_party/icu" ] } } } -source_set("json_fuzzer") { +v8_source_set("json_fuzzer") { sources = [ "test/fuzzer/json.cc", ] @@ -2085,17 +2153,10 @@ source_set("json_fuzzer") { ":fuzzer_support", ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ - ":internal_config", - ":libplatform_config", - ":features", - ":toolchain", - ] + configs = [ ":internal_config" ] } -source_set("parser_fuzzer") { +v8_source_set("parser_fuzzer") { sources = [ "test/fuzzer/parser.cc", ] @@ -2104,17 +2165,10 @@ source_set("parser_fuzzer") { ":fuzzer_support", ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ - ":internal_config", - ":libplatform_config", - ":features", - ":toolchain", - ] + configs = [ ":internal_config" ] } -source_set("regexp_fuzzer") { +v8_source_set("regexp_fuzzer") { sources = [ "test/fuzzer/regexp.cc", ] @@ -2123,17 +2177,10 @@ source_set("regexp_fuzzer") { ":fuzzer_support", ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ - ":internal_config", - ":libplatform_config", - ":features", - ":toolchain", - ] + configs = [ ":internal_config" ] } -source_set("wasm_fuzzer") { +v8_source_set("wasm_fuzzer") { sources = [ "test/fuzzer/wasm.cc", ] @@ -2142,17 +2189,10 @@ source_set("wasm_fuzzer") { ":fuzzer_support", ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ - ":internal_config", - ":libplatform_config", - ":features", - ":toolchain", - ] + configs = [ ":internal_config" ] } -source_set("wasm_asmjs_fuzzer") { +v8_source_set("wasm_asmjs_fuzzer") { sources = [ "test/fuzzer/wasm-asmjs.cc", ] @@ -2161,12 +2201,5 @@ source_set("wasm_asmjs_fuzzer") { ":fuzzer_support", ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - configs += [ - ":internal_config", - ":libplatform_config", - ":features", - ":toolchain", - ] + configs = [ ":internal_config" ] } diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index dc97b8042244cc..2bd48c0eab02c6 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,2144 +1,1698 @@ -2016-04-06: Version 5.1.281 +2016-05-18: Version 5.2.361 Performance and stability improvements on all platforms. -2016-04-05: Version 5.1.280 +2016-05-18: Version 5.2.360 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 +2016-05-18: Version 5.2.359 Performance and stability improvements on all platforms. -2016-04-05: Version 5.1.276 +2016-05-18: Version 5.2.358 Performance and stability improvements on all platforms. -2016-04-05: Version 5.1.275 +2016-05-18: Version 5.2.357 Performance and stability improvements on all platforms. -2016-04-05: Version 5.1.274 +2016-05-18: Version 5.2.356 Performance and stability improvements on all platforms. -2016-04-05: Version 5.1.273 +2016-05-18: Version 5.2.355 Performance and stability improvements on all platforms. -2016-04-05: Version 5.1.272 +2016-05-18: Version 5.2.354 Performance and stability improvements on all platforms. -2016-04-05: Version 5.1.271 +2016-05-18: Version 5.2.353 Performance and stability improvements on all platforms. -2016-04-04: Version 5.1.270 +2016-05-18: Version 5.2.352 Performance and stability improvements on all platforms. -2016-04-04: Version 5.1.269 +2016-05-18: Version 5.2.351 Performance and stability improvements on all platforms. -2016-04-04: Version 5.1.268 +2016-05-18: Version 5.2.350 Performance and stability improvements on all platforms. -2016-04-04: Version 5.1.267 - - [api] Restrict Template::Set to take templates or primitive values. +2016-05-18: Version 5.2.349 Performance and stability improvements on all platforms. -2016-04-04: Version 5.1.266 +2016-05-18: Version 5.2.348 Performance and stability improvements on all platforms. -2016-04-04: Version 5.1.265 +2016-05-17: Version 5.2.347 Performance and stability improvements on all platforms. -2016-04-04: Version 5.1.264 +2016-05-17: Version 5.2.346 Performance and stability improvements on all platforms. -2016-04-04: Version 5.1.263 +2016-05-17: Version 5.2.345 Performance and stability improvements on all platforms. -2016-04-04: Version 5.1.262 +2016-05-17: Version 5.2.344 Performance and stability improvements on all platforms. -2016-04-04: Version 5.1.261 +2016-05-17: Version 5.2.343 Performance and stability improvements on all platforms. -2016-04-04: Version 5.1.260 +2016-05-17: Version 5.2.342 Performance and stability improvements on all platforms. -2016-04-04: Version 5.1.259 - - Further ES2015 RegExp spec compliance fixes (issue 4602). +2016-05-17: Version 5.2.341 Performance and stability improvements on all platforms. -2016-04-03: Version 5.1.258 +2016-05-17: Version 5.2.340 Performance and stability improvements on all platforms. -2016-04-02: Version 5.1.257 - - Performance and stability improvements on all platforms. - +2016-05-17: Version 5.2.339 -2016-04-02: Version 5.1.256 + [wasm] remove extra nops in asm-wasm (issue 4203). Performance and stability improvements on all platforms. -2016-04-02: Version 5.1.255 +2016-05-17: Version 5.2.338 Performance and stability improvements on all platforms. -2016-04-01: Version 5.1.254 +2016-05-17: Version 5.2.337 Performance and stability improvements on all platforms. -2016-04-01: Version 5.1.253 +2016-05-17: Version 5.2.336 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. +2016-05-17: Version 5.2.335 Performance and stability improvements on all platforms. -2016-03-24: Version 5.1.216 +2016-05-17: Version 5.2.334 Performance and stability improvements on all platforms. -2016-03-24: Version 5.1.215 +2016-05-17: Version 5.2.333 Performance and stability improvements on all platforms. -2016-03-24: Version 5.1.214 +2016-05-17: Version 5.2.332 Performance and stability improvements on all platforms. -2016-03-23: Version 5.1.213 - - Implement ES2015 labelled function declaration restrictions (Chromium - issue 595309). +2016-05-16: Version 5.2.331 Performance and stability improvements on all platforms. -2016-03-23: Version 5.1.212 +2016-05-16: Version 5.2.330 Performance and stability improvements on all platforms. -2016-03-23: Version 5.1.211 +2016-05-16: Version 5.2.329 Performance and stability improvements on all platforms. -2016-03-23: Version 5.1.210 - - Performance and stability improvements on all platforms. +2016-05-16: Version 5.2.328 + Add UseCounter for decimal with leading zero (issue 4973). -2016-03-23: Version 5.1.209 + [esnext] implement frontend changes for async/await proposal (issue + 4483). Performance and stability improvements on all platforms. -2016-03-23: Version 5.1.208 +2016-05-16: Version 5.2.327 Performance and stability improvements on all platforms. -2016-03-23: Version 5.1.207 +2016-05-15: Version 5.2.326 Performance and stability improvements on all platforms. -2016-03-23: Version 5.1.206 +2016-05-14: Version 5.2.325 Performance and stability improvements on all platforms. -2016-03-23: Version 5.1.205 +2016-05-14: Version 5.2.324 Performance and stability improvements on all platforms. -2016-03-23: Version 5.1.204 +2016-05-13: Version 5.2.323 Performance and stability improvements on all platforms. -2016-03-23: Version 5.1.203 +2016-05-13: Version 5.2.322 Performance and stability improvements on all platforms. -2016-03-23: Version 5.1.202 +2016-05-13: Version 5.2.321 Performance and stability improvements on all platforms. -2016-03-23: Version 5.1.201 +2016-05-13: Version 5.2.320 Performance and stability improvements on all platforms. -2016-03-23: Version 5.1.200 +2016-05-13: Version 5.2.319 Performance and stability improvements on all platforms. -2016-03-22: Version 5.1.199 +2016-05-13: Version 5.2.318 Performance and stability improvements on all platforms. -2016-03-22: Version 5.1.198 +2016-05-13: Version 5.2.317 Performance and stability improvements on all platforms. -2016-03-22: Version 5.1.197 +2016-05-13: Version 5.2.316 Performance and stability improvements on all platforms. -2016-03-22: Version 5.1.196 +2016-05-13: Version 5.2.315 Performance and stability improvements on all platforms. -2016-03-22: Version 5.1.195 +2016-05-13: Version 5.2.314 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). +2016-05-13: Version 5.2.313 Performance and stability improvements on all platforms. -2016-03-22: Version 5.1.193 +2016-05-13: Version 5.2.312 Performance and stability improvements on all platforms. -2016-03-22: Version 5.1.192 +2016-05-13: Version 5.2.311 Performance and stability improvements on all platforms. -2016-03-22: Version 5.1.191 +2016-05-13: Version 5.2.310 - [Interpreter] TurboFan implementation of intrinsics (issue 4822). + [api] Clarify expectations of ArrayBuffer::Allocator in API (Chromium + issue 611688). Performance and stability improvements on all platforms. -2016-03-22: Version 5.1.190 +2016-05-13: Version 5.2.309 Performance and stability improvements on all platforms. -2016-03-21: Version 5.1.189 +2016-05-13: Version 5.2.308 Performance and stability improvements on all platforms. -2016-03-21: Version 5.1.188 - - Performance and stability improvements on all platforms. +2016-05-13: Version 5.2.307 - -2016-03-21: Version 5.1.187 + In parallel to the strict octal check that would reject `012` in strict + mode, this patch collects UseCounters for `089` in strict mode. The spec + says this should be an error, but this patch does not report it as such + (issue 4973). Performance and stability improvements on all platforms. -2016-03-21: Version 5.1.186 +2016-05-12: Version 5.2.306 Performance and stability improvements on all platforms. -2016-03-21: Version 5.1.185 +2016-05-12: Version 5.2.305 Performance and stability improvements on all platforms. -2016-03-21: Version 5.1.184 +2016-05-12: Version 5.2.304 Performance and stability improvements on all platforms. -2016-03-21: Version 5.1.183 +2016-05-12: Version 5.2.303 Performance and stability improvements on all platforms. -2016-03-21: Version 5.1.182 +2016-05-12: Version 5.2.302 Performance and stability improvements on all platforms. -2016-03-21: Version 5.1.181 - - Temporarily undeprecate ForceSet (Chromium issue 595601). +2016-05-12: Version 5.2.301 Performance and stability improvements on all platforms. -2016-03-21: Version 5.1.180 +2016-05-12: Version 5.2.300 Performance and stability improvements on all platforms. -2016-03-20: Version 5.1.179 +2016-05-12: Version 5.2.299 Performance and stability improvements on all platforms. -2016-03-20: Version 5.1.178 +2016-05-12: Version 5.2.298 Performance and stability improvements on all platforms. -2016-03-20: Version 5.1.177 +2016-05-12: Version 5.2.297 Performance and stability improvements on all platforms. -2016-03-19: Version 5.1.176 +2016-05-12: Version 5.2.296 Performance and stability improvements on all platforms. -2016-03-18: Version 5.1.175 +2016-05-12: Version 5.2.295 Performance and stability improvements on all platforms. -2016-03-18: Version 5.1.174 +2016-05-11: Version 5.2.294 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). +2016-05-11: Version 5.2.293 Performance and stability improvements on all platforms. -2016-03-18: Version 5.1.172 +2016-05-11: Version 5.2.292 Performance and stability improvements on all platforms. -2016-03-18: Version 5.1.171 - - Performance and stability improvements on all platforms. - +2016-05-11: Version 5.2.291 -2016-03-18: Version 5.1.170 + Use ICU case conversion/transliterator for case conversion (issues 4476, + 4477). Performance and stability improvements on all platforms. -2016-03-18: Version 5.1.169 +2016-05-11: Version 5.2.290 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.168 +2016-05-11: Version 5.2.289 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). +2016-05-11: Version 5.2.288 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.166 - - Throw exceptions from CreateDataProperty when should_throw (Chromium - issue 595319). +2016-05-11: Version 5.2.287 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.165 +2016-05-11: Version 5.2.286 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.164 +2016-05-11: Version 5.2.285 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.163 +2016-05-11: Version 5.2.284 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.162 +2016-05-10: Version 5.2.283 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.161 - - Performance and stability improvements on all platforms. +2016-05-10: Version 5.2.282 - -2016-03-17: Version 5.1.160 + Fix Map::AsArray to properly iterate over the backing store (issue + 4946). Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.159 - - Performance and stability improvements on all platforms. +2016-05-10: Version 5.2.281 - -2016-03-17: Version 5.1.158 + Remove LOG line checking from presubmit. Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.157 +2016-05-10: Version 5.2.280 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.156 +2016-05-10: Version 5.2.279 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.155 +2016-05-10: Version 5.2.278 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.154 +2016-05-10: Version 5.2.277 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.153 +2016-05-10: Version 5.2.276 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.152 +2016-05-10: Version 5.2.275 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.151 - - Move FastAccessorAssembler from RawMachineAssembler to CodeStubAssembler - (Chromium issue 508898). +2016-05-10: Version 5.2.274 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). +2016-05-10: Version 5.2.273 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.149 +2016-05-10: Version 5.2.272 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.148 +2016-05-10: Version 5.2.271 Performance and stability improvements on all platforms. -2016-03-17: Version 5.1.147 +2016-05-10: Version 5.2.270 Performance and stability improvements on all platforms. -2016-03-16: Version 5.1.146 - - Ship ES2015 restrictions on function declaration locations (issue 4824). +2016-05-10: Version 5.2.269 Performance and stability improvements on all platforms. -2016-03-16: Version 5.1.145 +2016-05-10: Version 5.2.268 Performance and stability improvements on all platforms. -2016-03-16: Version 5.1.144 - - Performance and stability improvements on all platforms. - +2016-05-10: Version 5.2.267 -2016-03-16: Version 5.1.143 + Various species micro-optimizations (Chromium issue 609739). Performance and stability improvements on all platforms. -2016-03-16: Version 5.1.142 +2016-05-09: Version 5.2.266 Performance and stability improvements on all platforms. -2016-03-16: Version 5.1.141 +2016-05-09: Version 5.2.265 Performance and stability improvements on all platforms. -2016-03-16: Version 5.1.140 +2016-05-09: Version 5.2.264 - Put RegExp js code in strict mode (issue 4504). + Fix TypedArray Property optimizations (Chromium issue 593634). Performance and stability improvements on all platforms. -2016-03-15: Version 5.1.139 +2016-05-09: Version 5.2.263 Performance and stability improvements on all platforms. -2016-03-15: Version 5.1.138 +2016-05-09: Version 5.2.262 - [builtins] Fix Array.prototype.concat bug (Chromium issue 594574). + [V8] Add v8::Value::TypeOf to API (Chromium issue 595206). Performance and stability improvements on all platforms. -2016-03-15: Version 5.1.137 +2016-05-09: Version 5.2.261 Performance and stability improvements on all platforms. -2016-03-15: Version 5.1.136 +2016-05-09: Version 5.2.260 Performance and stability improvements on all platforms. -2016-03-15: Version 5.1.135 +2016-05-09: Version 5.2.259 - Ship Array.prototype.values (issue 4247). + Expose IsConstructor to the C++ API (issue 4993). Performance and stability improvements on all platforms. -2016-03-15: Version 5.1.134 +2016-05-09: Version 5.2.258 Performance and stability improvements on all platforms. -2016-03-15: Version 5.1.133 +2016-05-09: Version 5.2.257 Performance and stability improvements on all platforms. -2016-03-15: Version 5.1.132 +2016-05-09: Version 5.2.256 Performance and stability improvements on all platforms. -2016-03-15: Version 5.1.131 +2016-05-09: Version 5.2.255 Performance and stability improvements on all platforms. -2016-03-15: Version 5.1.130 +2016-05-09: Version 5.2.254 Performance and stability improvements on all platforms. -2016-03-15: Version 5.1.129 +2016-05-08: Version 5.2.253 Performance and stability improvements on all platforms. -2016-03-15: Version 5.1.128 +2016-05-07: Version 5.2.252 - Performance and stability improvements on all platforms. - - -2016-03-14: Version 5.1.127 + fix Set::AsArray to not leave undefined holes in output array (issue + 4946). 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). +2016-05-06: Version 5.2.251 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). +2016-05-06: Version 5.2.250 Performance and stability improvements on all platforms. -2016-03-14: Version 5.1.124 +2016-05-06: Version 5.2.249 Performance and stability improvements on all platforms. -2016-03-14: Version 5.1.123 +2016-05-06: Version 5.2.248 Performance and stability improvements on all platforms. -2016-03-14: Version 5.1.122 +2016-05-06: Version 5.2.247 Performance and stability improvements on all platforms. -2016-03-14: Version 5.1.121 +2016-05-06: Version 5.2.246 Performance and stability improvements on all platforms. -2016-03-14: Version 5.1.120 +2016-05-06: Version 5.2.245 Performance and stability improvements on all platforms. -2016-03-14: Version 5.1.119 +2016-05-06: Version 5.2.244 Performance and stability improvements on all platforms. -2016-03-13: Version 5.1.118 +2016-05-06: Version 5.2.243 Performance and stability improvements on all platforms. -2016-03-11: Version 5.1.117 +2016-05-04: Version 5.2.242 Performance and stability improvements on all platforms. -2016-03-11: Version 5.1.116 +2016-05-04: Version 5.2.241 Performance and stability improvements on all platforms. -2016-03-11: Version 5.1.115 +2016-05-04: Version 5.2.240 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). +2016-05-04: Version 5.2.239 Performance and stability improvements on all platforms. -2016-03-11: Version 5.1.112 +2016-05-04: Version 5.2.238 Performance and stability improvements on all platforms. -2016-03-11: Version 5.1.111 +2016-05-04: Version 5.2.237 Performance and stability improvements on all platforms. -2016-03-10: Version 5.1.110 - - Minor library function fixes for TypedArray spec compliance (issue - 4785). +2016-05-04: Version 5.2.236 - Check that Promise subclasses have callable resolve/reject (issue 4633). + S390: Add HasProperty code stub that tries simple lookups or jumps to + runtime otherwise (issue 2743). Performance and stability improvements on all platforms. -2016-03-10: Version 5.1.109 +2016-05-04: Version 5.2.235 Performance and stability improvements on all platforms. -2016-03-10: Version 5.1.108 +2016-05-04: Version 5.2.234 - Performance and stability improvements on all platforms. + Make array __proto__ manipulations not disturb the species protector + (Chromium issue 606207). - -2016-03-10: Version 5.1.107 + Add v8::Object::GetOwnPropertyNames(context, filter) method (issue 3861, + Chromium issue 581495). Performance and stability improvements on all platforms. -2016-03-10: Version 5.1.106 +2016-05-04: Version 5.2.233 Performance and stability improvements on all platforms. -2016-03-10: Version 5.1.105 +2016-05-04: Version 5.2.232 Performance and stability improvements on all platforms. -2016-03-10: Version 5.1.104 +2016-05-04: Version 5.2.231 Performance and stability improvements on all platforms. -2016-03-10: Version 5.1.103 +2016-05-04: Version 5.2.230 Performance and stability improvements on all platforms. -2016-03-10: Version 5.1.102 +2016-05-04: Version 5.2.229 Performance and stability improvements on all platforms. -2016-03-10: Version 5.1.101 +2016-05-04: Version 5.2.228 Performance and stability improvements on all platforms. -2016-03-10: Version 5.1.100 +2016-05-04: Version 5.2.227 - [strong] Remove all remainders of strong mode (issue 3956). + MIPS64: Fix [turbofan] Length and index2 are unsigned in + CheckedLoad/CheckedStore (Chromium issue 599717). 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). +2016-05-04: Version 5.2.226 Performance and stability improvements on all platforms. -2016-03-10: Version 5.1.98 - - Implement iterator finalization in array destructuring (issue 3566). +2016-05-04: Version 5.2.225 Performance and stability improvements on all platforms. -2016-03-10: Version 5.1.97 +2016-05-04: Version 5.2.224 Performance and stability improvements on all platforms. -2016-03-10: Version 5.1.96 +2016-05-04: Version 5.2.223 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). +2016-05-04: Version 5.2.222 Performance and stability improvements on all platforms. -2016-03-09: Version 5.1.94 +2016-05-04: Version 5.2.221 Performance and stability improvements on all platforms. -2016-03-09: Version 5.1.93 +2016-05-04: Version 5.2.220 - Ensure appropriate bounds checking for Array subclass concat (Chromium - issue 592340). + [wasm] Fix for 608630: allow proxies as FFI (Chromium issue 608630). Performance and stability improvements on all platforms. -2016-03-09: Version 5.1.92 +2016-05-04: Version 5.2.219 Performance and stability improvements on all platforms. -2016-03-09: Version 5.1.91 +2016-05-03: Version 5.2.218 Performance and stability improvements on all platforms. -2016-03-09: Version 5.1.90 +2016-05-03: Version 5.2.217 Performance and stability improvements on all platforms. -2016-03-09: Version 5.1.89 +2016-05-03: Version 5.2.216 - Performance and stability improvements on all platforms. + [wasm] Disallow runtime calls in asm.js modules (Chromium issue 592352). + [API] remove (deprecated) hidden properties. -2016-03-09: Version 5.1.88 + [wasm] Fix bug with empty input to Wasm.instantiateModuleFromAsm() + (Chromium issue 605488). - Performance and stability improvements on all platforms. + Add HasProperty code stub that tries simple lookups or jumps to runtime + otherwise (issue 2743). - -2016-03-09: Version 5.1.87 + Fix ExternalTwobyteStringUtf16CharacterStream::PushBack(kEndOfInput) + (Chromium issue 607903). Performance and stability improvements on all platforms. -2016-03-09: Version 5.1.86 +2016-05-03: Version 5.2.215 Performance and stability improvements on all platforms. -2016-03-09: Version 5.1.85 +2016-05-03: Version 5.2.214 Performance and stability improvements on all platforms. -2016-03-09: Version 5.1.84 +2016-05-03: Version 5.2.213 Performance and stability improvements on all platforms. -2016-03-08: Version 5.1.83 +2016-05-03: Version 5.2.212 Performance and stability improvements on all platforms. -2016-03-08: Version 5.1.82 +2016-05-03: Version 5.2.211 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). +2016-05-02: Version 5.2.210 Performance and stability improvements on all platforms. -2016-03-08: Version 5.1.80 +2016-05-02: Version 5.2.209 Performance and stability improvements on all platforms. -2016-03-08: Version 5.1.79 +2016-05-02: Version 5.2.208 Performance and stability improvements on all platforms. -2016-03-08: Version 5.1.78 +2016-05-02: Version 5.2.207 Performance and stability improvements on all platforms. -2016-03-08: Version 5.1.77 +2016-05-02: Version 5.2.206 Performance and stability improvements on all platforms. -2016-03-08: Version 5.1.76 +2016-05-02: Version 5.2.205 Performance and stability improvements on all platforms. -2016-03-08: Version 5.1.75 +2016-05-02: Version 5.2.204 - 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 + [debugger] Add JSProxy support in Runtime::GetInternalProperties + (Chromium issue 588705). Performance and stability improvements on all platforms. -2016-03-08: Version 5.1.72 +2016-05-02: Version 5.2.203 Performance and stability improvements on all platforms. -2016-03-08: Version 5.1.71 +2016-05-02: Version 5.2.202 Performance and stability improvements on all platforms. -2016-03-07: Version 5.1.70 +2016-05-02: Version 5.2.201 Performance and stability improvements on all platforms. -2016-03-07: Version 5.1.69 +2016-05-02: Version 5.2.200 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). +2016-05-02: Version 5.2.199 Performance and stability improvements on all platforms. -2016-03-07: Version 5.1.67 +2016-05-02: Version 5.2.198 Performance and stability improvements on all platforms. -2016-03-07: Version 5.1.66 +2016-05-02: Version 5.2.197 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). +2016-05-02: Version 5.2.196 Performance and stability improvements on all platforms. -2016-03-07: Version 5.1.64 +2016-05-02: Version 5.2.195 Performance and stability improvements on all platforms. -2016-03-07: Version 5.1.63 +2016-05-02: Version 5.2.194 Performance and stability improvements on all platforms. -2016-03-07: Version 5.1.62 +2016-05-02: Version 5.2.193 Performance and stability improvements on all platforms. -2016-03-07: Version 5.1.61 +2016-05-02: Version 5.2.192 Performance and stability improvements on all platforms. -2016-03-07: Version 5.1.60 +2016-05-02: Version 5.2.191 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). +2016-05-01: Version 5.2.190 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). +2016-05-01: Version 5.2.189 Performance and stability improvements on all platforms. -2016-03-07: Version 5.1.57 +2016-04-30: Version 5.2.188 Performance and stability improvements on all platforms. -2016-03-07: Version 5.1.56 - - Use v8::kGCCallbackFlagCollectAllAvailableGarbage in - Heap::CollectAllAvailableGarbage (Chromium issue 591463). +2016-04-30: Version 5.2.187 Performance and stability improvements on all platforms. -2016-03-06: Version 5.1.55 +2016-04-30: Version 5.2.186 Performance and stability improvements on all platforms. -2016-03-06: Version 5.1.54 +2016-04-29: Version 5.2.185 Performance and stability improvements on all platforms. -2016-03-04: Version 5.1.53 +2016-04-29: Version 5.2.184 Performance and stability improvements on all platforms. -2016-03-04: Version 5.1.52 +2016-04-29: Version 5.2.183 Performance and stability improvements on all platforms. -2016-03-04: Version 5.1.51 +2016-04-29: Version 5.2.182 Performance and stability improvements on all platforms. -2016-03-04: Version 5.1.50 +2016-04-29: Version 5.2.181 Performance and stability improvements on all platforms. -2016-03-04: Version 5.1.49 +2016-04-29: Version 5.2.180 Performance and stability improvements on all platforms. -2016-03-04: Version 5.1.48 +2016-04-29: Version 5.2.179 Performance and stability improvements on all platforms. -2016-03-04: Version 5.1.47 +2016-04-29: Version 5.2.178 Performance and stability improvements on all platforms. -2016-03-04: Version 5.1.46 +2016-04-29: Version 5.2.177 - Introduce v8::MicrotasksScope (Chromium issue 585949). + Fix overflow issue in Zone::New (Chromium issue 606115). Performance and stability improvements on all platforms. -2016-03-04: Version 5.1.45 +2016-04-29: Version 5.2.176 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-04-29: Version 5.2.175 + [wasm] Binary 11: Bump module version to 0xB. [wasm] Binary 11: Swap the + order of section name / section length. [wasm] Binary 11: Shorter + section names. [wasm] Binary 11: Add a prefix for function type + declarations. [wasm] Binary 11: Function types encoded as pcount, p*, + rcount, r* [wasm] Fix numeric names for functions (Chromium issue + 575167). -2016-03-04: Version 5.1.43 + [wasm] Binary 11: WASM AST is now postorder. [wasm] Binary 11: br_table + takes a value. [wasm] Binary 11: Add implicit blocks to if arms. [wasm] + Binary 11: Add arities to call, return, and breaks [wasm] Binary 11: Add + experimental version (Chromium issue 575167). Performance and stability improvements on all platforms. -2016-03-04: Version 5.1.42 +2016-04-29: Version 5.2.174 - Performance and stability improvements on all platforms. - - -2016-03-04: Version 5.1.41 + Add checks for detached ArrayBuffers to ArrayBuffer.prototype.slice + (issue 4964). Performance and stability improvements on all platforms. -2016-03-04: Version 5.1.40 +2016-04-28: Version 5.2.173 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). +2016-04-28: Version 5.2.172 Performance and stability improvements on all platforms. -2016-03-04: Version 5.1.38 +2016-04-28: Version 5.2.171 - Performance and stability improvements on all platforms. - - -2016-03-03: Version 5.1.37 - - Restrict FunctionDeclarations in Statement position (issue 4647). + Ship for-in initializer deprecation (issue 4942). Performance and stability improvements on all platforms. -2016-03-03: Version 5.1.36 - - Performance and stability improvements on all platforms. - +2016-04-28: Version 5.2.170 -2016-03-03: Version 5.1.35 + Add GC request to libFuzzers in attempt to avoid parasitic coverage + (Chromium issue 584819). Performance and stability improvements on all platforms. -2016-03-03: Version 5.1.34 +2016-04-28: Version 5.2.169 Performance and stability improvements on all platforms. -2016-03-03: Version 5.1.33 - - Performance and stability improvements on all platforms. - +2016-04-28: Version 5.2.168 -2016-03-03: Version 5.1.32 + Prevent unnecessary memory (de-)allocations in LiteralBuffer::CopyFrom + (issue 4947). Performance and stability improvements on all platforms. -2016-03-03: Version 5.1.31 +2016-04-28: Version 5.2.167 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 +2016-04-28: Version 5.2.166 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). +2016-04-28: Version 5.2.165 Performance and stability improvements on all platforms. -2016-03-02: Version 5.1.27 +2016-04-28: Version 5.2.164 Performance and stability improvements on all platforms. -2016-03-02: Version 5.1.26 +2016-04-27: Version 5.2.163 Performance and stability improvements on all platforms. -2016-03-02: Version 5.1.25 +2016-04-27: Version 5.2.162 Performance and stability improvements on all platforms. -2016-03-02: Version 5.1.24 +2016-04-27: Version 5.2.161 - Devtools: expose scopes source location to debugger (Chromium issue - 327092). + [esnext] stage --harmony-string-padding (issue 4954). - CodeStubAssembler can generate code for builtins (issue 4614). + Disallow generator declarations in certain locations (issue 4824). Performance and stability improvements on all platforms. -2016-03-01: Version 5.1.23 +2016-04-27: Version 5.2.160 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-04-27: Version 5.2.159 -2016-03-01: Version 5.1.18 + [api] Expose FunctionCallbackInfo::NewTarget (issue 4261). Performance and stability improvements on all platforms. -2016-03-01: Version 5.1.17 +2016-04-27: Version 5.2.158 Performance and stability improvements on all platforms. -2016-03-01: Version 5.1.16 +2016-04-27: Version 5.2.157 Performance and stability improvements on all platforms. -2016-03-01: Version 5.1.15 +2016-04-27: Version 5.2.156 - Performance and stability improvements on all platforms. - - -2016-03-01: Version 5.1.14 + [es8] Report proper syntax error for tail call expressions in for-in and + for-of bodies (issue 4915). Performance and stability improvements on all platforms. -2016-03-01: Version 5.1.13 +2016-04-27: Version 5.2.155 Performance and stability improvements on all platforms. -2016-03-01: Version 5.1.12 +2016-04-27: Version 5.2.154 Performance and stability improvements on all platforms. -2016-03-01: Version 5.1.11 - - Make %TypedArray%.from spec-compliant (issue 4782). +2016-04-27: Version 5.2.153 Performance and stability improvements on all platforms. -2016-02-29: Version 5.1.10 +2016-04-27: Version 5.2.152 Performance and stability improvements on all platforms. -2016-02-29: Version 5.1.9 +2016-04-27: Version 5.2.151 Performance and stability improvements on all platforms. -2016-02-28: Version 5.1.8 +2016-04-26: Version 5.2.150 Performance and stability improvements on all platforms. -2016-02-28: Version 5.1.7 +2016-04-26: Version 5.2.149 Performance and stability improvements on all platforms. -2016-02-28: Version 5.1.6 +2016-04-26: Version 5.2.148 Performance and stability improvements on all platforms. -2016-02-28: Version 5.1.5 - - Performance and stability improvements on all platforms. +2016-04-26: Version 5.2.147 - -2016-02-28: Version 5.1.4 + Do not penalize performance when --harmony-species is off (Chromium + issue 606207). Performance and stability improvements on all platforms. -2016-02-28: Version 5.1.3 - - Performance and stability improvements on all platforms. +2016-04-26: Version 5.2.146 - -2016-02-28: Version 5.1.2 + [es8] Initial set of changes to support syntactic tail calls (issue + 4915). 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). +2016-04-26: Version 5.2.145 Performance and stability improvements on all platforms. -2016-02-26: Version 5.0.104 +2016-04-26: Version 5.2.144 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). +2016-04-26: Version 5.2.143 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). +2016-04-26: Version 5.2.142 Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.101 +2016-04-26: Version 5.2.141 Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.100 - - Ship ES2015 iterator finalization (issue 3566). +2016-04-26: Version 5.2.140 Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.99 - - Introduce MicrotasksCompletedCallback (Chromium issue 585949). +2016-04-26: Version 5.2.139 Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.98 - - Performance and stability improvements on all platforms. +2016-04-26: Version 5.2.138 - -2016-02-25: Version 5.0.97 + [es6] Fix tail call elimination in single-expression arrow functions + (issue 4698). Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.96 +2016-04-26: Version 5.2.137 Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.95 +2016-04-25: Version 5.2.136 Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.94 - - Performance and stability improvements on all platforms. - +2016-04-25: Version 5.2.135 -2016-02-25: Version 5.0.93 + Widen --harmony-for-in flag to throw errors in PreParser (issue 4942). Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.92 +2016-04-25: Version 5.2.134 Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.91 +2016-04-25: Version 5.2.133 Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.90 +2016-04-25: Version 5.2.132 Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.89 +2016-04-25: Version 5.2.131 Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.88 +2016-04-25: Version 5.2.130 Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.87 +2016-04-25: Version 5.2.129 Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.86 +2016-04-25: Version 5.2.128 Performance and stability improvements on all platforms. -2016-02-25: Version 5.0.85 +2016-04-25: Version 5.2.127 Performance and stability improvements on all platforms. -2016-02-24: Version 5.0.84 +2016-04-25: Version 5.2.126 Performance and stability improvements on all platforms. -2016-02-24: Version 5.0.83 +2016-04-25: Version 5.2.125 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). +2016-04-25: Version 5.2.124 Performance and stability improvements on all platforms. -2016-02-24: Version 5.0.81 +2016-04-25: Version 5.2.123 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). +2016-04-25: Version 5.2.122 Performance and stability improvements on all platforms. -2016-02-24: Version 5.0.79 +2016-04-22: Version 5.2.121 Performance and stability improvements on all platforms. -2016-02-24: Version 5.0.78 +2016-04-22: Version 5.2.120 Performance and stability improvements on all platforms. -2016-02-24: Version 5.0.77 +2016-04-22: Version 5.2.119 Performance and stability improvements on all platforms. -2016-02-24: Version 5.0.76 +2016-04-22: Version 5.2.118 Performance and stability improvements on all platforms. -2016-02-24: Version 5.0.75 +2016-04-22: Version 5.2.117 - Performance and stability improvements on all platforms. - - -2016-02-24: Version 5.0.74 + [debugger] Hide scopes that originate from desugaring (Chromium issue + 604458). 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). +2016-04-22: Version 5.2.116 Performance and stability improvements on all platforms. -2016-02-23: Version 5.0.72 +2016-04-22: Version 5.2.115 Performance and stability improvements on all platforms. -2016-02-23: Version 5.0.71 +2016-04-21: Version 5.2.114 Performance and stability improvements on all platforms. -2016-02-23: Version 5.0.70 +2016-04-21: Version 5.2.113 Performance and stability improvements on all platforms. -2016-02-23: Version 5.0.69 - - Performance and stability improvements on all platforms. +2016-04-21: Version 5.2.112 - -2016-02-23: Version 5.0.68 + [ic] Restore PROPERTY key tracking in keyed ICs (Chromium issue 594183). Performance and stability improvements on all platforms. -2016-02-23: Version 5.0.67 +2016-04-21: Version 5.2.111 Performance and stability improvements on all platforms. -2016-02-23: Version 5.0.66 +2016-04-21: Version 5.2.110 Performance and stability improvements on all platforms. -2016-02-22: Version 5.0.65 +2016-04-21: Version 5.2.109 Performance and stability improvements on all platforms. -2016-02-22: Version 5.0.64 - - ES2015 web compat workaround: RegExp.prototype.flags => "" (Chromium - issue 581577). - - Remove the Proxy enumerate trap (issue 4768). +2016-04-21: Version 5.2.108 Performance and stability improvements on all platforms. -2016-02-22: Version 5.0.63 +2016-04-21: Version 5.2.107 Performance and stability improvements on all platforms. -2016-02-22: Version 5.0.62 - - Remove Reflect.enumerate (issue 4768). +2016-04-21: Version 5.2.106 Performance and stability improvements on all platforms. -2016-02-22: Version 5.0.61 +2016-04-21: Version 5.2.105 Performance and stability improvements on all platforms. -2016-02-22: Version 5.0.60 +2016-04-21: Version 5.2.104 Performance and stability improvements on all platforms. -2016-02-22: Version 5.0.59 +2016-04-21: Version 5.2.103 Performance and stability improvements on all platforms. -2016-02-22: Version 5.0.58 +2016-04-21: Version 5.2.102 Performance and stability improvements on all platforms. -2016-02-22: Version 5.0.57 +2016-04-20: Version 5.2.101 Performance and stability improvements on all platforms. -2016-02-22: Version 5.0.56 +2016-04-20: Version 5.2.100 Performance and stability improvements on all platforms. -2016-02-22: Version 5.0.55 +2016-04-20: Version 5.2.99 Performance and stability improvements on all platforms. -2016-02-22: Version 5.0.54 +2016-04-20: Version 5.2.98 Performance and stability improvements on all platforms. -2016-02-21: Version 5.0.53 +2016-04-20: Version 5.2.97 Performance and stability improvements on all platforms. -2016-02-21: Version 5.0.52 +2016-04-20: Version 5.2.96 Performance and stability improvements on all platforms. -2016-02-21: Version 5.0.51 +2016-04-20: Version 5.2.95 Performance and stability improvements on all platforms. -2016-02-21: Version 5.0.50 +2016-04-20: Version 5.2.94 Performance and stability improvements on all platforms. -2016-02-21: Version 5.0.49 +2016-04-20: Version 5.2.93 Performance and stability improvements on all platforms. -2016-02-21: Version 5.0.48 +2016-04-20: Version 5.2.92 Performance and stability improvements on all platforms. -2016-02-20: Version 5.0.47 +2016-04-20: Version 5.2.91 Performance and stability improvements on all platforms. -2016-02-20: Version 5.0.46 +2016-04-20: Version 5.2.90 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.45 +2016-04-20: Version 5.2.89 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.44 - - Return undefined from RegExp.prototype.compile (Chromium issue 585775). - - Performance and stability improvements on all platforms. - +2016-04-20: Version 5.2.88 -2016-02-19: Version 5.0.43 + [turbofan] Length and index2 are unsigned in CheckedLoad/CheckedStore + (Chromium issue 599717). - Disable --harmony-object-observe (Chromium issue 552100). + Prevent un-parsed LiteralFunction reaching the compiler (Chromium issue + 604044). Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.42 - - Introduce BeforeCallEnteredCallback (Chromium issue 585949). +2016-04-20: Version 5.2.87 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.41 +2016-04-20: Version 5.2.86 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.40 +2016-04-19: Version 5.2.85 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.39 +2016-04-19: Version 5.2.84 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.38 - - [wasm] Add support for import section (Chromium issue 575167). +2016-04-19: Version 5.2.83 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.37 +2016-04-19: Version 5.2.82 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.36 +2016-04-19: Version 5.2.81 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.35 +2016-04-19: Version 5.2.80 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.34 +2016-04-19: Version 5.2.79 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.33 +2016-04-19: Version 5.2.78 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.32 +2016-04-19: Version 5.2.77 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.31 +2016-04-19: Version 5.2.76 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.30 - - Mark old SetAccessCheckCallback as deprecated. +2016-04-19: Version 5.2.75 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.29 +2016-04-19: Version 5.2.74 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.28 +2016-04-19: Version 5.2.73 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.27 +2016-04-19: Version 5.2.72 Performance and stability improvements on all platforms. -2016-02-19: Version 5.0.26 +2016-04-19: Version 5.2.71 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.25 +2016-04-19: Version 5.2.70 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.24 - - Make Date.prototype.toGMTString an alias for Date.prototype.toUTCString - (issue 4708). +2016-04-19: Version 5.2.69 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.23 +2016-04-19: Version 5.2.68 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.22 +2016-04-19: Version 5.2.67 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.21 +2016-04-19: Version 5.2.66 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.20 +2016-04-18: Version 5.2.65 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.19 +2016-04-18: Version 5.2.64 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.18 +2016-04-18: Version 5.2.63 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.17 +2016-04-18: Version 5.2.62 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.16 +2016-04-18: Version 5.2.61 - [es6] Implement for-of iterator finalization (issue 2214). + [Atomics] Remove Atomics code stubs; use TF ops (issue 4614). Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.15 +2016-04-18: Version 5.2.60 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.14 - - Use displayName in Error.stack rendering if present (issue 4761). +2016-04-18: Version 5.2.59 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.13 +2016-04-18: Version 5.2.58 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.12 +2016-04-18: Version 5.2.57 Performance and stability improvements on all platforms. -2016-02-18: Version 5.0.11 +2016-04-18: Version 5.2.56 Performance and stability improvements on all platforms. -2016-02-17: Version 5.0.10 - - [Atomics] Add dmb/dsb/isb instructions to ARM (issue 4614). +2016-04-18: Version 5.2.55 Performance and stability improvements on all platforms. -2016-02-17: Version 5.0.9 +2016-04-18: Version 5.2.54 Performance and stability improvements on all platforms. -2016-02-17: Version 5.0.8 +2016-04-18: Version 5.2.53 Performance and stability improvements on all platforms. -2016-02-17: Version 5.0.7 +2016-04-18: Version 5.2.52 Performance and stability improvements on all platforms. -2016-02-17: Version 5.0.6 +2016-04-18: Version 5.2.51 Performance and stability improvements on all platforms. -2016-02-17: Version 5.0.5 - - Performance and stability improvements on all platforms. - +2016-04-18: Version 5.2.50 -2016-02-17: Version 5.0.4 + [Atomics] Remove Atomics code stubs; use TF ops (issue 4614). Performance and stability improvements on all platforms. -2016-02-17: Version 5.0.3 +2016-04-18: Version 5.2.49 - Performance and stability improvements on all platforms. - - -2016-02-17: Version 5.0.2 + [api] Bring back finalizers on global handles. Performance and stability improvements on all platforms. -2016-02-17: Version 5.0.1 - - Performance and stability improvements on all platforms. +2016-02-17: Sentinel + The ChangeLog file is no longer maintained on master. This + sentinel should stay on top of this list. 2016-02-17: Version 4.10.253 @@ -7268,12 +6822,6 @@ Performance and stability improvements on all platforms. -2015-05-17: Sentinel - - The ChangeLog file is no longer maintained on bleeding_edge. This - sentinel should stay on top of this list. - - 2015-05-17: Version 4.5.2 Performance and stability improvements on all platforms. diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 0559523283f74e..dfe214ead3b9f5 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -7,14 +7,16 @@ vars = { } deps = { - "v8/build/gyp": - Var("git_url") + "/external/gyp.git" + "@" + "4ec6c4e3a94bd04a6da2858163d40b2429b8aad1", + "v8/build": + Var("git_url") + "/chromium/src/build.git" + "@" + "01ca9403e7d6ba63e9a4b6df1cb5cb8397ff7b92", + "v8/tools/gyp": + Var("git_url") + "/external/gyp.git" + "@" + "bce1c7793010574d88d7915e2d55395213ac63d1", "v8/third_party/icu": Var("git_url") + "/chromium/deps/icu.git" + "@" + "c291cde264469b20ca969ce8832088acb21e0c48", "v8/buildtools": - Var("git_url") + "/chromium/buildtools.git" + "@" + "80b5126f91be4eb359248d28696746ef09d5be67", + Var("git_url") + "/chromium/buildtools.git" + "@" + "06e80a0e17319868d4a9b13f9bb6a248dc8d8b20", "v8/base/trace_event/common": - Var("git_url") + "/chromium/src/base/trace_event/common.git" + "@" + "c8c8665c2deaf1cc749d9f8e153256d4f67bf1b8", + Var("git_url") + "/chromium/src/base/trace_event/common.git" + "@" + "54b8455be9505c2cb0cf5c26bb86739c236471aa", "v8/tools/swarming_client": Var('git_url') + '/external/swarming.client.git' + '@' + "df6e95e7669883c8fe9ef956c69a544154701a49", "v8/testing/gtest": @@ -27,9 +29,9 @@ 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" + "@" + "57d3e2216fa86ad63b6c0a54914ba9dcbff96003", + Var("git_url") + "/external/github.com/tc39/test262.git" + "@" + "9c45e2ac684bae64614d8eb55789cae97323a7e7", "v8/tools/clang": - Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "faee82e064e04e5cbf60cc7327e7a81d2a4557ad", + Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "18b63c680a59a7125514b1e05ca42cdfb89a19c7", } deps_os = { @@ -53,6 +55,7 @@ include_rules = [ # checkdeps.py shouldn't check for includes in these directories: skip_child_includes = [ "build", + "gypfiles", "third_party", ] @@ -65,7 +68,7 @@ hooks = [ 'pattern': '.', 'action': [ 'python', - 'v8/build/landmines.py', + 'v8/gypfiles/landmines.py', ], }, # Pull clang-format binaries using checked-in hashes. @@ -190,7 +193,7 @@ hooks = [ # Update the Windows toolchain if necessary. 'name': 'win_toolchain', 'pattern': '.', - 'action': ['python', 'v8/build/vs_toolchain.py', 'update'], + 'action': ['python', 'v8/gypfiles/vs_toolchain.py', 'update'], }, # Pull binutils for linux, enabled debug fission for faster linking / # debugging when used with clang on Ubuntu Precise. @@ -208,7 +211,7 @@ hooks = [ # Note: This must run before the clang update. 'name': 'gold_plugin', 'pattern': '.', - 'action': ['python', 'v8/build/download_gold_plugin.py'], + 'action': ['python', 'v8/gypfiles/download_gold_plugin.py'], }, { # Pull clang if needed or requested via GYP_DEFINES. @@ -220,6 +223,6 @@ hooks = [ { # A change to a .gyp, .gypi, or to GYP itself should run the generator. "pattern": ".", - "action": ["python", "v8/build/gyp_v8"], + "action": ["python", "v8/gypfiles/gyp_v8"], }, ] diff --git a/deps/v8/Makefile b/deps/v8/Makefile index a0c08a6d9634c7..0f8f93a6667d62 100644 --- a/deps/v8/Makefile +++ b/deps/v8/Makefile @@ -227,6 +227,11 @@ ifeq ($(no_omit_framepointer), on) GYPFLAGS += -Drelease_extra_cflags=-fno-omit-frame-pointer endif +ifdef android_ndk_root + GYPFLAGS += -Dandroid_ndk_root=$(android_ndk_root) + export ANDROID_NDK_ROOT = $(android_ndk_root) +endif + # ----------------- available targets: -------------------- # - "grokdump": rebuilds heap constants lists used by grokdump # - any arch listed in ARCHES (see below) @@ -256,10 +261,11 @@ NACL_ARCHES = nacl_ia32 nacl_x64 # List of files that trigger Makefile regeneration: GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \ - build/shim_headers.gypi build/features.gypi build/standalone.gypi \ - build/toolchain.gypi build/all.gyp build/mac/asan.gyp \ + gypfiles/shim_headers.gypi gypfiles/features.gypi \ + gypfiles/standalone.gypi \ + gypfiles/toolchain.gypi gypfiles/all.gyp gypfiles/mac/asan.gyp \ test/cctest/cctest.gyp test/fuzzer/fuzzer.gyp \ - test/unittests/unittests.gyp tools/gyp/v8.gyp \ + test/unittests/unittests.gyp src/v8.gyp \ tools/parser-shell.gyp testing/gmock.gyp testing/gtest.gyp \ buildtools/third_party/libc++abi/libc++abi.gyp \ buildtools/third_party/libc++/libc++.gyp samples/samples.gyp \ @@ -432,7 +438,7 @@ native.clean: rm -rf $(OUTDIR)/native find $(OUTDIR) -regex '.*\(host\|target\)\.native\.mk' -delete -clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.clean gtags.clean +clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.clean gtags.clean tags.clean # GYP file generation targets. OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS)) @@ -442,10 +448,10 @@ $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH))) $(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH))) $(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@)))) - PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \ + PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/gypfiles:$(PYTHONPATH):$(shell pwd)/tools/gyp/pylib:$(PYTHONPATH)" \ GYP_GENERATORS=make \ - build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ - -Ibuild/standalone.gypi --depth=. \ + tools/gyp/gyp --generator-output="$(OUTDIR)" gypfiles/all.gyp \ + -Igypfiles/standalone.gypi --depth=. \ -Dv8_target_arch=$(V8_TARGET_ARCH) \ $(if $(findstring $(CXX_TARGET_ARCH),$(V8_TARGET_ARCH)), \ -Dtarget_arch=$(V8_TARGET_ARCH),) \ @@ -453,10 +459,10 @@ $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) -S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS) $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) - PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \ + PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/tools/gyp/pylib:$(PYTHONPATH)" \ GYP_GENERATORS=make \ - build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ - -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS) + tools/gyp/gyp --generator-output="$(OUTDIR)" gypfiles/all.gyp \ + -Igypfiles/standalone.gypi --depth=. -S.native $(GYPFLAGS) # Note that NACL_SDK_ROOT must be set to point to an appropriate # Native Client SDK before using this makefile. You can download @@ -497,11 +503,21 @@ gtags.files: $(GYPFILES) $(ENVFILE) # We need to manually set the stack limit here, to work around bugs in # gmake-3.81 and global-5.7.1 on recent 64-bit Linux systems. -GPATH GRTAGS GSYMS GTAGS: gtags.files $(shell cat gtags.files 2> /dev/null) +# Using $(wildcard ...) gracefully ignores non-existing files, so that stale +# gtags.files after switching branches don't cause recipe failures. +GPATH GRTAGS GSYMS GTAGS: gtags.files $(wildcard $(shell cat gtags.files 2> /dev/null)) @bash -c 'ulimit -s 10240 && GTAGSFORCECPP=yes gtags -i -q -f $<' gtags.clean: rm -f gtags.files GPATH GRTAGS GSYMS GTAGS +tags: gtags.files $(wildcard $(shell cat gtags.files 2> /dev/null)) + @(ctags --version | grep 'Exuberant Ctags' >/dev/null) || \ + (echo "Please install Exuberant Ctags (check 'ctags --version')" >&2; false) + ctags --fields=+l -L $< + +tags.clean: + rm -r tags + dependencies builddeps: $(error Use 'gclient sync' instead) diff --git a/deps/v8/Makefile.android b/deps/v8/Makefile.android index c49cb85b9b6514..fd5f968736b5d3 100644 --- a/deps/v8/Makefile.android +++ b/deps/v8/Makefile.android @@ -35,18 +35,27 @@ MODES = release debug ANDROID_BUILDS = $(foreach mode,$(MODES), \ $(addsuffix .$(mode),$(ANDROID_ARCHES))) +HOST_OS = $(shell uname -s | sed -e 's/Linux/linux/;s/Darwin/darwin/') +HOST_ARCH = $(shell uname -m | sed -e 's/i[3456]86/x86/') + ifeq ($(ARCH), android_arm) DEFINES = target_arch=arm v8_target_arch=arm + ANDROID_TOOLCHAIN = $(ANDROID_NDK_ROOT)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(HOST_OS)-$(HOST_ARCH)/arm-linux-androideabi/bin else ifeq ($(ARCH), android_arm64) DEFINES = target_arch=arm64 v8_target_arch=arm64 + ANDROID_TOOLCHAIN = $(ANDROID_NDK_ROOT)/toolchains/aarch64-linux-android-4.9/prebuilt/$(HOST_OS)-$(HOST_ARCH)/aarch64-linux-android/bin else ifeq ($(ARCH), android_mipsel) DEFINES = target_arch=mipsel v8_target_arch=mipsel + ANDROID_TOOLCHAIN = $(ANDROID_NDK_ROOT)/toolchains/mipsel-linux-android-4.9/prebuilt/$(HOST_OS)-$(HOST_ARCH)/mipsel-linux-android/bin else ifeq ($(ARCH), android_ia32) DEFINES = target_arch=ia32 v8_target_arch=ia32 + ANDROID_TOOLCHAIN = $(ANDROID_NDK_ROOT)/toolchains/x86-4.9/prebuilt/$(HOST_OS)-$(HOST_ARCH)/i686-linux-android/bin else ifeq ($(ARCH), android_x64) DEFINES = target_arch=x64 v8_target_arch=x64 + ANDROID_TOOLCHAIN = $(ANDROID_NDK_ROOT)/toolchains/x86_64-4.9/prebuilt/$(HOST_OS)-$(HOST_ARCH)/x86_64-linux-android/bin else ifeq ($(ARCH), android_x87) DEFINES = target_arch=ia32 v8_target_arch=x87 + ANDROID_TOOLCHAIN = $(ANDROID_NDK_ROOT)/toolchains/x86-4.9/prebuilt/$(HOST_OS)-$(HOST_ARCH)/i686-linux-android/bin else $(error Target architecture "${ARCH}" is not supported) endif @@ -57,6 +66,7 @@ DEFINES += OS=android .SECONDEXPANSION: $(ANDROID_BUILDS): $(OUTDIR)/Makefile.$$@ @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ + AR="$(ANDROID_TOOLCHAIN)/ar" \ BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ python -c "print raw_input().capitalize()") \ builddir="$(shell pwd)/$(OUTDIR)/$@" @@ -67,6 +77,6 @@ $(ANDROID_MAKEFILES): GYP_GENERATORS=make-android \ GYP_DEFINES="${DEFINES}" \ PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH)" \ - build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \ - -Ibuild/standalone.gypi --depth=. \ + tools/gyp/gyp --generator-output="${OUTDIR}" gypfiles/all.gyp \ + -Igypfiles/standalone.gypi --depth=. \ -S$(suffix $(basename $@))$(suffix $@) ${GYPFLAGS} diff --git a/deps/v8/Makefile.nacl b/deps/v8/Makefile.nacl index 3459c42c0d865c..5eaff47cf9a0a4 100644 --- a/deps/v8/Makefile.nacl +++ b/deps/v8/Makefile.nacl @@ -91,7 +91,7 @@ $(NACL_MAKEFILES): CXX=${NACL_CXX} \ LINK=${NACL_LINK} \ PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH)" \ - build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \ - -Ibuild/standalone.gypi --depth=. \ + tools/gyp/gyp --generator-output="${OUTDIR}" gypfiles/all.gyp \ + -Igypfiles/standalone.gypi --depth=. \ -S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS) \ -Dwno_array_bounds=-Wno-array-bounds diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index f8516afc44ef50..60a5fd77307805 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -242,32 +242,15 @@ def _SkipTreeCheck(input_api, output_api): return input_api.environ.get('PRESUBMIT_TREE_CHECK') == 'skip' -def _CheckChangeLogFlag(input_api, output_api, warn): - """Checks usage of LOG= flag in the commit message.""" - results = [] - if (input_api.change.BUG and input_api.change.BUG != 'none' and - not 'LOG' in input_api.change.tags): - text = ('An issue reference (BUG=) requires a change log flag (LOG=). ' - 'Use LOG=Y for including this commit message in the change log. ' - 'Use LOG=N or leave blank otherwise.') - if warn: - results.append(output_api.PresubmitPromptWarning(text)) - else: - results.append(output_api.PresubmitError(text)) - return results - - def CheckChangeOnUpload(input_api, output_api): results = [] results.extend(_CommonChecks(input_api, output_api)) - results.extend(_CheckChangeLogFlag(input_api, output_api, True)) return results def CheckChangeOnCommit(input_api, output_api): results = [] results.extend(_CommonChecks(input_api, output_api)) - results.extend(_CheckChangeLogFlag(input_api, output_api, False)) results.extend(input_api.canned_checks.CheckChangeHasDescription( input_api, output_api)) if not _SkipTreeCheck(input_api, output_api): diff --git a/deps/v8/WATCHLISTS b/deps/v8/WATCHLISTS index 29b957b0917f00..bd07d318dadd55 100644 --- a/deps/v8/WATCHLISTS +++ b/deps/v8/WATCHLISTS @@ -44,7 +44,6 @@ }, 'interpreter': { 'filepath': 'src/interpreter/' \ - '|src/compiler/interpreter' \ '|src/compiler/bytecode' \ '|test/cctest/interpreter/' \ '|test/unittests/interpreter/', @@ -60,6 +59,9 @@ }, 'ia32': { 'filepath': '/ia32/', + }, + 'merges': { + 'filepath': '.', } }, @@ -91,5 +93,9 @@ 'ia32': [ 'v8-x87-ports@googlegroups.com', ], + 'merges': [ + # Only enabled on branches created with tools/release/create_release.py + 'v8-merges@googlegroups.com', + ], }, } 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 7a1533ed822e88..0a04d627108c77 100644 --- a/deps/v8/base/trace_event/common/trace_event_common.h +++ b/deps/v8/base/trace_event/common/trace_event_common.h @@ -928,12 +928,8 @@ // 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()); +#define TRACE_TASK_EXECUTION(run_function, task) \ + INTERNAL_TRACE_TASK_EXECUTION(run_function, task) // TRACE_EVENT_METADATA* events are information related to other // injected events, not events in their own right. diff --git a/deps/v8/build_overrides/v8.gni b/deps/v8/build_overrides/v8.gni new file mode 100644 index 00000000000000..656045bca7a266 --- /dev/null +++ b/deps/v8/build_overrides/v8.gni @@ -0,0 +1,29 @@ +# Copyright 2015 The V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/features.gni") +import("//build/config/ui.gni") + +if (is_android) { + import("//build/config/android/config.gni") +} + +declare_args() { + # V8 generates code for this architecture. + v8_target_arch = target_cpu +} + +if (((v8_target_arch == "ia32" || + v8_target_arch == "x64" || + v8_target_arch=="x87") && + (is_linux || is_mac)) || + (v8_target_arch == "ppc64" && is_linux)) { + v8_enable_gdbjit = true +} + +icu_use_data_file_flag = false +v8_imminent_deprecation_warnings = true +v8_optimized_debug = false +v8_extra_library_files = [] +v8_experimental_extra_library_files = [] diff --git a/deps/v8/build/OWNERS b/deps/v8/gypfiles/OWNERS similarity index 100% rename from deps/v8/build/OWNERS rename to deps/v8/gypfiles/OWNERS diff --git a/deps/v8/build/README.txt b/deps/v8/gypfiles/README.txt similarity index 100% rename from deps/v8/build/README.txt rename to deps/v8/gypfiles/README.txt diff --git a/deps/v8/build/all.gyp b/deps/v8/gypfiles/all.gyp similarity index 81% rename from deps/v8/build/all.gyp rename to deps/v8/gypfiles/all.gyp index feaf4fecccabf5..ff1bea4b61137f 100644 --- a/deps/v8/build/all.gyp +++ b/deps/v8/gypfiles/all.gyp @@ -8,11 +8,7 @@ 'target_name': 'All', 'type': 'none', 'dependencies': [ - '../samples/samples.gyp:*', '../src/d8.gyp:d8', - '../test/cctest/cctest.gyp:*', - '../test/fuzzer/fuzzer.gyp:*', - '../test/unittests/unittests.gyp:*', ], 'conditions': [ ['component!="shared_library"', { @@ -20,6 +16,15 @@ '../tools/parser-shell.gyp:parser-shell', ], }], + # These items don't compile for Android on Mac. + ['host_os!="mac" or OS!="android"', { + 'dependencies': [ + '../samples/samples.gyp:*', + '../test/cctest/cctest.gyp:*', + '../test/fuzzer/fuzzer.gyp:*', + '../test/unittests/unittests.gyp:*', + ], + }], ['test_isolation_mode != "noop"', { 'dependencies': [ '../test/bot_default.gyp:*', diff --git a/deps/v8/build/config/win/msvs_dependencies.isolate b/deps/v8/gypfiles/config/win/msvs_dependencies.isolate similarity index 100% rename from deps/v8/build/config/win/msvs_dependencies.isolate rename to deps/v8/gypfiles/config/win/msvs_dependencies.isolate diff --git a/deps/v8/build/coverage_wrapper.py b/deps/v8/gypfiles/coverage_wrapper.py similarity index 100% rename from deps/v8/build/coverage_wrapper.py rename to deps/v8/gypfiles/coverage_wrapper.py diff --git a/deps/v8/build/detect_v8_host_arch.py b/deps/v8/gypfiles/detect_v8_host_arch.py similarity index 100% rename from deps/v8/build/detect_v8_host_arch.py rename to deps/v8/gypfiles/detect_v8_host_arch.py diff --git a/deps/v8/build/download_gold_plugin.py b/deps/v8/gypfiles/download_gold_plugin.py similarity index 100% rename from deps/v8/build/download_gold_plugin.py rename to deps/v8/gypfiles/download_gold_plugin.py diff --git a/deps/v8/build/features.gypi b/deps/v8/gypfiles/features.gypi similarity index 100% rename from deps/v8/build/features.gypi rename to deps/v8/gypfiles/features.gypi diff --git a/deps/v8/build/get_landmines.py b/deps/v8/gypfiles/get_landmines.py similarity index 100% rename from deps/v8/build/get_landmines.py rename to deps/v8/gypfiles/get_landmines.py diff --git a/deps/v8/build/gyp_environment.py b/deps/v8/gypfiles/gyp_environment.py similarity index 100% rename from deps/v8/build/gyp_environment.py rename to deps/v8/gypfiles/gyp_environment.py diff --git a/deps/v8/build/gyp_v8 b/deps/v8/gypfiles/gyp_v8 similarity index 98% rename from deps/v8/build/gyp_v8 rename to deps/v8/gypfiles/gyp_v8 index 8813f2c12162ba..e97507a360566d 100755 --- a/deps/v8/build/gyp_v8 +++ b/deps/v8/gypfiles/gyp_v8 @@ -43,7 +43,7 @@ import vs_toolchain script_dir = os.path.dirname(os.path.realpath(__file__)) v8_root = os.path.abspath(os.path.join(script_dir, os.pardir)) -sys.path.insert(0, os.path.join(v8_root, 'build', 'gyp', 'pylib')) +sys.path.insert(0, os.path.join(v8_root, 'tools', 'gyp', 'pylib')) import gyp # Add paths so that pymod_do_main(...) can import files. @@ -90,7 +90,7 @@ def additional_include_files(args=[]): result.append(path) # Always include standalone.gypi - AddInclude(os.path.join(v8_root, 'build', 'standalone.gypi')) + AddInclude(os.path.join(v8_root, 'gypfiles', 'standalone.gypi')) # Optionally add supplemental .gypi files if present. supplements = glob.glob(os.path.join(v8_root, '*', 'supplement.gypi')) diff --git a/deps/v8/build/gyp_v8.py b/deps/v8/gypfiles/gyp_v8.py similarity index 100% rename from deps/v8/build/gyp_v8.py rename to deps/v8/gypfiles/gyp_v8.py diff --git a/deps/v8/build/has_valgrind.py b/deps/v8/gypfiles/has_valgrind.py similarity index 100% rename from deps/v8/build/has_valgrind.py rename to deps/v8/gypfiles/has_valgrind.py diff --git a/deps/v8/build/isolate.gypi b/deps/v8/gypfiles/isolate.gypi similarity index 96% rename from deps/v8/build/isolate.gypi rename to deps/v8/gypfiles/isolate.gypi index 4cfbbfddd100d7..a9614b5d64525e 100644 --- a/deps/v8/build/isolate.gypi +++ b/deps/v8/gypfiles/isolate.gypi @@ -17,7 +17,7 @@ # 'foo_test', # ], # 'includes': [ -# '../build/isolate.gypi', +# '../gypfiles/isolate.gypi', # ], # 'sources': [ # 'foo_test.isolate', @@ -81,7 +81,6 @@ '--config-variable', 'component=<(component)', '--config-variable', 'target_arch=<(target_arch)', '--config-variable', 'use_custom_libcxx=<(use_custom_libcxx)', - '--config-variable', 'v8_separate_ignition_snapshot=<(v8_separate_ignition_snapshot)', '--config-variable', 'v8_use_external_startup_data=<(v8_use_external_startup_data)', '--config-variable', 'v8_use_snapshot=<(v8_use_snapshot)', ], diff --git a/deps/v8/build/landmine_utils.py b/deps/v8/gypfiles/landmine_utils.py similarity index 100% rename from deps/v8/build/landmine_utils.py rename to deps/v8/gypfiles/landmine_utils.py diff --git a/deps/v8/build/landmines.py b/deps/v8/gypfiles/landmines.py similarity index 99% rename from deps/v8/build/landmines.py rename to deps/v8/gypfiles/landmines.py index 97c63901c1a904..2a81c66d1a6529 100755 --- a/deps/v8/build/landmines.py +++ b/deps/v8/gypfiles/landmines.py @@ -198,7 +198,7 @@ def process_options(): parser = optparse.OptionParser() parser.add_option( '-s', '--landmine-scripts', action='append', - default=[os.path.join(SRC_DIR, 'build', 'get_landmines.py')], + default=[os.path.join(SRC_DIR, 'gypfiles', 'get_landmines.py')], help='Path to the script which emits landmines to stdout. The target ' 'is passed to this script via option -t. Note that an extra ' 'script can be specified via an env var EXTRA_LANDMINES_SCRIPT.') diff --git a/deps/v8/build/mac/asan.gyp b/deps/v8/gypfiles/mac/asan.gyp similarity index 100% rename from deps/v8/build/mac/asan.gyp rename to deps/v8/gypfiles/mac/asan.gyp diff --git a/deps/v8/gypfiles/set_clang_warning_flags.gypi b/deps/v8/gypfiles/set_clang_warning_flags.gypi new file mode 100644 index 00000000000000..63d5f1435ccb51 --- /dev/null +++ b/deps/v8/gypfiles/set_clang_warning_flags.gypi @@ -0,0 +1,59 @@ +# Copyright 2016 the V8 project authors. All rights reserved. +# Copyright (c) 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is meant to be included to set clang-specific compiler flags. +# To use this the following variable can be defined: +# clang_warning_flags: list: Compiler flags to pass to clang. +# clang_warning_flags_unset: list: Compiler flags to not pass to clang. +# +# Only use this in third-party code. In chromium_code, fix your code to not +# warn instead! +# +# Note that the gypi file is included in target_defaults, so it does not need +# to be explicitly included. +# +# Warning flags set by this will be used on all platforms. If you want to set +# warning flags on only some platforms, you have to do so manually. +# +# To use this, create a gyp target with the following form: +# { +# 'target_name': 'my_target', +# 'variables': { +# 'clang_warning_flags': ['-Wno-awesome-warning'], +# 'clang_warning_flags_unset': ['-Wpreviously-set-flag'], +# } +# } + +{ + 'variables': { + 'clang_warning_flags_unset%': [], # Provide a default value. + }, + 'conditions': [ + ['clang==1', { + # This uses >@ instead of @< to also see clang_warning_flags set in + # targets directly, not just the clang_warning_flags in target_defaults. + 'cflags': [ '>@(clang_warning_flags)' ], + 'cflags!': [ '>@(clang_warning_flags_unset)' ], + 'xcode_settings': { + 'WARNING_CFLAGS': ['>@(clang_warning_flags)'], + 'WARNING_CFLAGS!': ['>@(clang_warning_flags_unset)'], + }, + 'msvs_settings': { + 'VCCLCompilerTool': { + 'AdditionalOptions': [ '>@(clang_warning_flags)' ], + 'AdditionalOptions!': [ '>@(clang_warning_flags_unset)' ], + }, + }, + }], + ['clang==0 and host_clang==1', { + 'target_conditions': [ + ['_toolset=="host"', { + 'cflags': [ '>@(clang_warning_flags)' ], + 'cflags!': [ '>@(clang_warning_flags_unset)' ], + }], + ], + }], + ], +} diff --git a/deps/v8/build/shim_headers.gypi b/deps/v8/gypfiles/shim_headers.gypi similarity index 100% rename from deps/v8/build/shim_headers.gypi rename to deps/v8/gypfiles/shim_headers.gypi diff --git a/deps/v8/build/standalone.gypi b/deps/v8/gypfiles/standalone.gypi similarity index 92% rename from deps/v8/build/standalone.gypi rename to deps/v8/gypfiles/standalone.gypi index 6c88409dbee892..630c45e84a176a 100644 --- a/deps/v8/build/standalone.gypi +++ b/deps/v8/gypfiles/standalone.gypi @@ -194,9 +194,6 @@ # their own default value. 'v8_use_external_startup_data%': 1, - # Use a separate ignition snapshot file in standalone builds. - 'v8_separate_ignition_snapshot': 1, - # Relative path to icu.gyp from this file. 'icu_gyp_path': '../third_party/icu/icu.gyp', @@ -262,44 +259,50 @@ 'android_ndk_root%': '<(base_dir)/third_party/android_tools/ndk/', 'android_host_arch%': " { MapType* map, const K& key, Local value) { return NULL; } - static MapType* MapFromWeakCallbackData( - const WeakCallbackData& data) { + static MapType* MapFromWeakCallbackInfo( + const WeakCallbackInfo& data) { return NULL; } - static K KeyFromWeakCallbackData( - const WeakCallbackData& data) { + static K KeyFromWeakCallbackInfo( + const WeakCallbackInfo& data) { return K(); } static void DisposeCallbackData(WeakCallbackDataType* data) { } @@ -205,6 +205,17 @@ class PersistentValueMapBase { reinterpret_cast(FromVal(Traits::Get(&impl_, key)))); } + /** + * Call V8::RegisterExternallyReferencedObject with the map value for given + * key. + */ + void RegisterExternallyReferencedObject(K& key) { + DCHECK(Contains(key)); + V8::RegisterExternallyReferencedObject( + reinterpret_cast(FromVal(Traits::Get(&impl_, key))), + reinterpret_cast(GetIsolate())); + } + /** * Return value for key and remove it from the map. */ @@ -402,11 +413,11 @@ class PersistentValueMap : public PersistentValueMapBase { private: static void WeakCallback( - const WeakCallbackData& data) { + const WeakCallbackInfo& data) { if (Traits::kCallbackType != kNotWeak) { PersistentValueMap* persistentValueMap = - Traits::MapFromWeakCallbackData(data); - K key = Traits::KeyFromWeakCallbackData(data); + Traits::MapFromWeakCallbackInfo(data); + K key = Traits::KeyFromWeakCallbackInfo(data); Traits::Dispose(data.GetIsolate(), persistentValueMap->Remove(key).Pass(), key); Traits::DisposeCallbackData(data.GetParameter()); diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index e0efde2b0b6dc2..5759791227d51e 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 1 -#define V8_BUILD_NUMBER 281 -#define V8_PATCH_LEVEL 77 +#define V8_MINOR_VERSION 2 +#define V8_BUILD_NUMBER 361 +#define V8_PATCH_LEVEL 46 // 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 8b7b7c2cc48c3b..3f02ce8c056ff1 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -457,32 +457,12 @@ class WeakCallbackInfo { }; -template -class WeakCallbackData { - public: - typedef void (*Callback)(const WeakCallbackData& data); - - WeakCallbackData(Isolate* isolate, P* parameter, Local handle) - : isolate_(isolate), parameter_(parameter), handle_(handle) {} - - V8_INLINE Isolate* GetIsolate() const { return isolate_; } - V8_INLINE P* GetParameter() const { return parameter_; } - V8_INLINE Local GetValue() const { return handle_; } - - private: - Isolate* isolate_; - P* parameter_; - Local handle_; -}; - - -// TODO(dcarney): delete this with WeakCallbackData -template -using PhantomCallbackData = WeakCallbackInfo; - - -enum class WeakCallbackType { kParameter, kInternalFields }; - +// kParameter will pass a void* parameter back to the callback, kInternalFields +// will pass the first two internal fields back to the callback, kFinalizer +// will pass a void* parameter back, but is invoked before the object is +// actually collected, so it can be resurrected. In the last case, it is not +// possible to request a second pass callback. +enum class WeakCallbackType { kParameter, kInternalFields, kFinalizer }; /** * An object reference that is independent of any handle scope. Where @@ -561,36 +541,19 @@ template class PersistentBase { * critical form of resource management! */ template - V8_INLINE V8_DEPRECATED( - "use WeakCallbackInfo version", - void SetWeak(P* parameter, - typename WeakCallbackData::Callback callback)); - - template - V8_INLINE V8_DEPRECATED( - "use WeakCallbackInfo version", - void SetWeak(P* parameter, - typename WeakCallbackData::Callback callback)); - - // Phantom persistents work like weak persistents, except that the pointer to - // the object being collected is not available in the finalization callback. - // This enables the garbage collector to collect the object and any objects - // it references transitively in one GC cycle. At the moment you can either - // specify a parameter for the callback or the location of two internal - // fields in the dying object. - template - V8_INLINE V8_DEPRECATED( - "use SetWeak", - void SetPhantom(P* parameter, - typename WeakCallbackInfo

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

::Callback callback, WeakCallbackType type); + /** + * Turns this handle into a weak phantom handle without finalization callback. + * The handle will be reset automatically when the garbage collector detects + * that the object is no longer reachable. + * A related function Isolate::NumberOfPhantomHandleResetsSinceLastCall + * returns how many phantom handles were reset by the garbage collector. + */ + V8_INLINE void SetWeak(); + template V8_INLINE P* ClearWeak(); @@ -602,7 +565,7 @@ template class PersistentBase { * is alive. Only allowed when the embedder is asked to trace its heap by * EmbedderHeapTracer. */ - V8_INLINE void RegisterExternalReference(Isolate* isolate); + V8_INLINE void RegisterExternalReference(Isolate* isolate) const; /** * Marks the reference to this object independent. Garbage collector is free @@ -620,7 +583,9 @@ template class PersistentBase { * external dependencies. This mark is automatically cleared after each * garbage collection. */ - V8_INLINE void MarkPartiallyDependent(); + V8_INLINE V8_DEPRECATED( + "deprecated optimization, do not use partially dependent groups", + void MarkPartiallyDependent()); /** * Marks the reference to this object as active. The scavenge garbage @@ -1665,9 +1630,8 @@ struct SampleInfo { StateTag vm_state; }; - /** - * A JSON Parser. + * A JSON Parser and Stringifier. */ class V8_EXPORT JSON { public: @@ -1678,10 +1642,23 @@ class V8_EXPORT JSON { * \param json_string The string to parse. * \return The corresponding value if successfully parsed. */ - static V8_DEPRECATED("Use maybe version", + static V8_DEPRECATED("Use the maybe version taking context", Local Parse(Local json_string)); + static V8_DEPRECATE_SOON("Use the maybe version taking context", + MaybeLocal Parse(Isolate* isolate, + Local json_string)); static V8_WARN_UNUSED_RESULT MaybeLocal Parse( - Isolate* isolate, Local json_string); + Local context, Local json_string); + + /** + * Tries to stringify the JSON-serializable object |json_object| and returns + * it as string if successful. + * + * \param json_object The JSON-serializable object to stringify. + * \return The corresponding string if successfully stringified. + */ + static V8_WARN_UNUSED_RESULT MaybeLocal Stringify( + Local context, Local json_object); }; @@ -2050,6 +2027,8 @@ class V8_EXPORT Value : public Data { template V8_INLINE static Value* Cast(T* value); + Local TypeOf(v8::Isolate*); + private: V8_INLINE bool QuickIsUndefined() const; V8_INLINE bool QuickIsNull() const; @@ -2639,6 +2618,18 @@ enum AccessControl { PROHIBITS_OVERWRITING = 1 << 2 }; +/** + * Property filter bits. They can be or'ed to build a composite filter. + */ +enum PropertyFilter { + ALL_PROPERTIES = 0, + ONLY_WRITABLE = 1, + ONLY_ENUMERABLE = 2, + ONLY_CONFIGURABLE = 4, + SKIP_STRINGS = 8, + SKIP_SYMBOLS = 16 +}; + /** * Integrity level for objects. */ @@ -2798,6 +2789,15 @@ class V8_EXPORT Object : public Value { V8_WARN_UNUSED_RESULT MaybeLocal GetOwnPropertyNames( Local context); + /** + * Returns an array containing the names of the filtered properties + * of this object, including properties from prototype objects. The + * array returned by this method contains the same values as would + * be enumerated by a for-in statement over this object. + */ + V8_WARN_UNUSED_RESULT MaybeLocal GetOwnPropertyNames( + Local context, PropertyFilter filter); + /** * Get the prototype object. This does not skip objects marked to * be skipped by __proto__ and it does not consult the security @@ -2878,6 +2878,8 @@ class V8_EXPORT Object : public Value { V8_DEPRECATED("Use maybe version", bool HasOwnProperty(Local key)); V8_WARN_UNUSED_RESULT Maybe HasOwnProperty(Local context, Local key); + V8_WARN_UNUSED_RESULT Maybe HasOwnProperty(Local context, + uint32_t index); V8_DEPRECATE_SOON("Use maybe version", bool HasRealNamedProperty(Local key)); V8_WARN_UNUSED_RESULT Maybe HasRealNamedProperty(Local context, @@ -2950,13 +2952,6 @@ class V8_EXPORT Object : public Value { */ int GetIdentityHash(); - V8_DEPRECATED("Use v8::Object::SetPrivate instead.", - bool SetHiddenValue(Local key, Local value)); - V8_DEPRECATED("Use v8::Object::GetPrivate instead.", - Local GetHiddenValue(Local key)); - V8_DEPRECATED("Use v8::Object::DeletePrivate instead.", - bool DeleteHiddenValue(Local key)); - /** * Clone this object with a fast but shallow copy. Values will point * to the same values as the original object. @@ -2976,6 +2971,11 @@ class V8_EXPORT Object : public Value { */ bool IsCallable(); + /** + * True if this object is a constructor. + */ + bool IsConstructor(); + /** * Call an Object as a function if a callback is set by the * ObjectTemplate::SetCallAsFunctionHandler method. @@ -3177,12 +3177,13 @@ class FunctionCallbackInfo { Local Callee() const); V8_INLINE Local This() const; V8_INLINE Local Holder() const; + V8_INLINE Local NewTarget() const; V8_INLINE bool IsConstructCall() const; V8_INLINE Local Data() const; V8_INLINE Isolate* GetIsolate() const; V8_INLINE ReturnValue GetReturnValue() const; // This shouldn't be public, but the arm compiler needs it. - static const int kArgsLength = 7; + static const int kArgsLength = 8; protected: friend class internal::FunctionCallbackArguments; @@ -3194,15 +3195,13 @@ class FunctionCallbackInfo { static const int kDataIndex = 4; static const int kCalleeIndex = 5; static const int kContextSaveIndex = 6; + static const int kNewTargetIndex = 7; V8_INLINE FunctionCallbackInfo(internal::Object** implicit_args, - internal::Object** values, - int length, - bool is_construct_call); + internal::Object** values, int length); internal::Object** implicit_args_; internal::Object** values_; int length_; - int is_construct_call_; }; @@ -3252,15 +3251,10 @@ class V8_EXPORT Function : public Object { * Create a function in the current execution context * for a given FunctionCallback. */ - static MaybeLocal New(Local context, - FunctionCallback callback, - Local data = Local(), - int length = 0); - static MaybeLocal New(Local context, - FunctionCallback callback, - Local data, - int length, - ConstructorBehavior behavior); + static MaybeLocal New( + Local context, FunctionCallback callback, + Local data = Local(), int length = 0, + ConstructorBehavior behavior = ConstructorBehavior::kAllow); static V8_DEPRECATE_SOON( "Use maybe version", Local New(Isolate* isolate, FunctionCallback callback, @@ -3462,10 +3456,20 @@ enum class ArrayBufferCreationMode { kInternalized, kExternalized }; class V8_EXPORT ArrayBuffer : public Object { public: /** - * Allocator that V8 uses to allocate |ArrayBuffer|'s memory. + * A thread-safe allocator that V8 uses to allocate |ArrayBuffer|'s memory. * The allocator is a global V8 setting. It has to be set via * Isolate::CreateParams. * + * Memory allocated through this allocator by V8 is accounted for as external + * memory by V8. Note that V8 keeps track of the memory for all internalized + * |ArrayBuffer|s. Responsibility for tracking external memory (using + * Isolate::AdjustAmountOfExternalAllocatedMemory) is handed over to the + * embedder upon externalization and taken over upon internalization (creating + * an internalized buffer from an existing buffer). + * + * Note that it is unsafe to call back into V8 from any of the allocator + * functions. + * * This API is experimental and may change significantly. */ class V8_EXPORT Allocator { // NOLINT @@ -4133,7 +4137,11 @@ enum Intrinsic { */ class V8_EXPORT Template : public Data { public: - /** Adds a property to each instance created by this template.*/ + /** + * Adds a property to each instance created by this template. + * + * The property must be defined either as a primitive value, or a template. + */ void Set(Local name, Local value, PropertyAttribute attributes = None); V8_INLINE void Set(Isolate* isolate, const char* name, Local value); @@ -4483,10 +4491,8 @@ class V8_EXPORT FunctionTemplate : public Template { static Local New( 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); + Local signature = Local(), int length = 0, + ConstructorBehavior behavior = ConstructorBehavior::kAllow); /** * Creates a function template with a fast handler. If a fast handler is set, @@ -5130,6 +5136,11 @@ class V8_EXPORT MicrotasksScope { */ static int GetCurrentDepth(Isolate* isolate); + /** + * Returns true while microtasks are being executed. + */ + static bool IsRunningMicrotasks(Isolate* isolate); + private: internal::Isolate* const isolate_; bool run_; @@ -5211,6 +5222,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: @@ -5220,6 +5232,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; @@ -5401,31 +5414,29 @@ enum class MemoryPressureLevel { kNone, kModerate, kCritical }; * 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. + * Before the first call to the TraceWrappersFrom function TracePrologue will be + * called. When the garbage collection cycle is finished, TraceEpilogue will be + * called. */ -class EmbedderHeapTracer { +class V8_EXPORT EmbedderHeapTracer { public: /** * V8 will call this method at the beginning of the gc cycle. */ - virtual void TraceRoots(Isolate* isolate) = 0; - + virtual void TracePrologue() = 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, + virtual void TraceWrappersFrom( 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. + * allowed in the TraceEpilogue. */ - virtual void ClearTracingMarks(Isolate* isolate) = 0; + virtual void TraceEpilogue() = 0; protected: virtual ~EmbedderHeapTracer() = default; @@ -5628,9 +5639,10 @@ class V8_EXPORT Isolate { kLegacyFunctionDeclaration = 29, kRegExpPrototypeSourceGetter = 30, kRegExpPrototypeOldFlagGetter = 31, + kDecimalWithLeadingZeroInStrictMode = 32, - // If you add new values here, you'll also need to update V8Initializer.cpp - // in Chromium. + // If you add new values here, you'll also need to update Chromium's: + // UseCounter.h, V8PerIsolateData.cpp, histograms.xml kUseCounterFeatureCount // This enum value must be last. }; @@ -5802,6 +5814,12 @@ class V8_EXPORT Isolate { V8_INLINE int64_t AdjustAmountOfExternalAllocatedMemory(int64_t change_in_bytes); + /** + * Returns the number of phantom handles without callbacks that were reset + * by the garbage collector since the last call to this function. + */ + size_t NumberOfPhantomHandleResetsSinceLastCall(); + /** * Returns heap profiler for this isolate. Will return NULL until the isolate * is initialized. @@ -6241,13 +6259,17 @@ class V8_EXPORT Isolate { * Enables the host application to provide a mechanism to be notified * and perform custom logging when V8 Allocates Executable Memory. */ - void AddMemoryAllocationCallback(MemoryAllocationCallback callback, - ObjectSpace space, AllocationAction action); + void V8_DEPRECATED( + "Use a combination of RequestInterrupt and GCCallback instead", + AddMemoryAllocationCallback(MemoryAllocationCallback callback, + ObjectSpace space, AllocationAction action)); /** * Removes callback that was installed by AddMemoryAllocationCallback. */ - void RemoveMemoryAllocationCallback(MemoryAllocationCallback callback); + void V8_DEPRECATED( + "Use a combination of RequestInterrupt and GCCallback instead", + RemoveMemoryAllocationCallback(MemoryAllocationCallback callback)); /** * Iterates through all external resources referenced from current isolate @@ -6483,23 +6505,6 @@ class V8_EXPORT V8 { "Use isolate version", void RemoveGCEpilogueCallback(GCCallback callback)); - /** - * Enables the host application to provide a mechanism to be notified - * and perform custom logging when V8 Allocates Executable Memory. - */ - V8_INLINE static V8_DEPRECATED( - "Use isolate version", - void AddMemoryAllocationCallback(MemoryAllocationCallback callback, - ObjectSpace space, - AllocationAction action)); - - /** - * Removes callback that was installed by AddMemoryAllocationCallback. - */ - V8_INLINE static V8_DEPRECATED( - "Use isolate version", - void RemoveMemoryAllocationCallback(MemoryAllocationCallback callback)); - /** * Initializes V8. This function needs to be called before the first Isolate * is created. It always returns true. @@ -6660,26 +6665,27 @@ class V8_EXPORT V8 { internal::Object** handle); 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, + static void MakeWeak(internal::Object** location, void* data, WeakCallbackInfo::Callback weak_callback, WeakCallbackType type); - static void MakeWeak(internal::Object** global_handle, void* data, + static void MakeWeak(internal::Object** location, void* data, // Must be 0 or -1. int internal_field_index1, // Must be 1 or -1. int internal_field_index2, WeakCallbackInfo::Callback weak_callback); - static void* ClearWeak(internal::Object** global_handle); + static void MakeWeak(internal::Object*** location_addr); + static void* ClearWeak(internal::Object** location); static void Eternalize(Isolate* isolate, Value* handle, int* index); static Local GetEternal(Isolate* isolate, int index); + static void RegisterExternallyReferencedObject(internal::Object** object, + internal::Isolate* isolate); + template + friend class PersistentValueMapBase; + static void FromJustIsNothing(); static void ToLocalEmpty(); static void InternalFieldOutOfBounds(int index); @@ -7337,7 +7343,7 @@ class Internals { 1 * kApiPointerSize + kApiIntSize; static const int kStringResourceOffset = 3 * kApiPointerSize; - static const int kOddballKindOffset = 4 * kApiPointerSize; + static const int kOddballKindOffset = 5 * kApiPointerSize + sizeof(double); static const int kForeignAddressOffset = kApiPointerSize; static const int kJSObjectHeaderSize = 3 * kApiPointerSize; static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; @@ -7356,12 +7362,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 kTheHoleValueRootIndex = 11; + 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. @@ -7377,7 +7383,8 @@ class Internals { static const int kNodeIsPartiallyDependentShift = 4; static const int kNodeIsActiveShift = 4; - static const int kJSObjectType = 0xb5; + static const int kJSObjectType = 0xb7; + static const int kJSApiObjectType = 0xb6; static const int kFirstNonstringType = 0x80; static const int kOddballType = 0x83; static const int kForeignType = 0x87; @@ -7630,39 +7637,6 @@ void PersistentBase::Reset(Isolate* isolate, } -template -template -void PersistentBase::SetWeak( - P* parameter, - typename WeakCallbackData::Callback callback) { - TYPE_CHECK(S, T); - typedef typename WeakCallbackData::Callback Callback; - V8::MakeWeak(reinterpret_cast(this->val_), parameter, - reinterpret_cast(callback)); -} - - -template -template -void PersistentBase::SetWeak( - P* parameter, - typename WeakCallbackData::Callback callback) { - SetWeak(parameter, callback); -} - - -template -template -void PersistentBase::SetPhantom( - P* parameter, typename WeakCallbackInfo

::Callback callback, - int internal_field_index1, int internal_field_index2) { - typedef typename WeakCallbackInfo::Callback Callback; - V8::MakeWeak(reinterpret_cast(this->val_), parameter, - internal_field_index1, internal_field_index2, - reinterpret_cast(callback)); -} - - template template V8_INLINE void PersistentBase::SetWeak( @@ -7673,6 +7647,10 @@ V8_INLINE void PersistentBase::SetWeak( reinterpret_cast(callback), type); } +template +void PersistentBase::SetWeak() { + V8::MakeWeak(reinterpret_cast(&this->val_)); +} template template @@ -7682,7 +7660,7 @@ P* PersistentBase::ClearWeak() { } template -void PersistentBase::RegisterExternalReference(Isolate* isolate) { +void PersistentBase::RegisterExternalReference(Isolate* isolate) const { if (IsEmpty()) return; V8::RegisterExternallyReferencedObject( reinterpret_cast(this->val_), @@ -7864,17 +7842,11 @@ internal::Object* ReturnValue::GetDefaultValue() { return value_[-1]; } - -template +template FunctionCallbackInfo::FunctionCallbackInfo(internal::Object** implicit_args, internal::Object** values, - int length, - bool is_construct_call) - : implicit_args_(implicit_args), - values_(values), - length_(length), - is_construct_call_(is_construct_call) { } - + int length) + : implicit_args_(implicit_args), values_(values), length_(length) {} template Local FunctionCallbackInfo::operator[](int i) const { @@ -7902,8 +7874,13 @@ Local FunctionCallbackInfo::Holder() const { &implicit_args_[kHolderIndex])); } +template +Local FunctionCallbackInfo::NewTarget() const { + return Local( + reinterpret_cast(&implicit_args_[kNewTargetIndex])); +} -template +template Local FunctionCallbackInfo::Data() const { return Local(reinterpret_cast(&implicit_args_[kDataIndex])); } @@ -7923,7 +7900,7 @@ ReturnValue FunctionCallbackInfo::GetReturnValue() const { template bool FunctionCallbackInfo::IsConstructCall() const { - return is_construct_call_ & 0x1; + return !NewTarget()->IsUndefined(); } @@ -8017,7 +7994,9 @@ Local Object::GetInternalField(int index) { O* obj = *reinterpret_cast(this); // Fast path: If the object is a plain JSObject, which is the common case, we // know where to find the internal fields and can return the value directly. - if (I::GetInstanceType(obj) == I::kJSObjectType) { + auto instance_type = I::GetInstanceType(obj); + if (instance_type == I::kJSObjectType || + instance_type == I::kJSApiObjectType) { int offset = I::kJSObjectHeaderSize + (internal::kApiPointerSize * index); O* value = I::ReadField(obj, offset); O** result = HandleScope::CreateHandle(reinterpret_cast(obj), value); @@ -8035,7 +8014,9 @@ void* Object::GetAlignedPointerFromInternalField(int index) { O* obj = *reinterpret_cast(this); // Fast path: If the object is a plain JSObject, which is the common case, we // know where to find the internal fields and can return the value directly. - if (V8_LIKELY(I::GetInstanceType(obj) == I::kJSObjectType)) { + auto instance_type = I::GetInstanceType(obj); + if (V8_LIKELY(instance_type == I::kJSObjectType || + instance_type == I::kJSApiObjectType)) { int offset = I::kJSObjectHeaderSize + (internal::kApiPointerSize * index); return I::ReadField(obj, offset); } @@ -8715,21 +8696,6 @@ void V8::RemoveGCEpilogueCallback(GCCallback callback) { reinterpret_cast(callback)); } - -void V8::AddMemoryAllocationCallback(MemoryAllocationCallback callback, - ObjectSpace space, - AllocationAction action) { - Isolate* isolate = Isolate::GetCurrent(); - isolate->AddMemoryAllocationCallback(callback, space, action); -} - - -void V8::RemoveMemoryAllocationCallback(MemoryAllocationCallback callback) { - Isolate* isolate = Isolate::GetCurrent(); - isolate->RemoveMemoryAllocationCallback(callback); -} - - void V8::TerminateExecution(Isolate* isolate) { isolate->TerminateExecution(); } diff --git a/deps/v8/infra/config/cq.cfg b/deps/v8/infra/config/cq.cfg index 5f85111f200ac4..5622b01b069026 100644 --- a/deps/v8/infra/config/cq.cfg +++ b/deps/v8/infra/config/cq.cfg @@ -27,15 +27,31 @@ verifiers { buckets { name: "tryserver.v8" builders { name: "v8_android_arm_compile_rel" } - builders { name: "v8_linux64_asan_rel" } - builders { name: "v8_linux64_avx2_rel" } + builders { name: "v8_linux64_asan_rel_ng" } + builders { + name: "v8_linux64_asan_rel_ng_triggered" + triggered_by: "v8_linux64_asan_rel_ng" + } + builders { name: "v8_linux64_avx2_rel_ng" } + builders { + name: "v8_linux64_avx2_rel_ng_triggered" + triggered_by: "v8_linux64_avx2_rel_ng" + } builders { name: "v8_linux64_rel_ng" } builders { name: "v8_linux64_rel_ng_triggered" triggered_by: "v8_linux64_rel_ng" } - builders { name: "v8_linux_arm64_rel" } - builders { name: "v8_linux_arm_rel" } + builders { name: "v8_linux_arm64_rel_ng" } + builders { + name: "v8_linux_arm64_rel_ng_triggered" + triggered_by: "v8_linux_arm64_rel_ng" + } + builders { name: "v8_linux_arm_rel_ng" } + builders { + name: "v8_linux_arm_rel_ng_triggered" + triggered_by: "v8_linux_arm_rel_ng" + } builders { name: "v8_linux_chromium_gn_rel" } builders { name: "v8_linux_dbg_ng" } builders { @@ -45,13 +61,21 @@ verifiers { builders { name: "v8_linux_gcc_compile_rel" } builders { name: "v8_linux_mipsel_compile_rel" } builders { name: "v8_linux_mips64el_compile_rel" } - builders { name: "v8_linux_nodcheck_rel" } + builders { name: "v8_linux_nodcheck_rel_ng" } + builders { + name: "v8_linux_nodcheck_rel_ng_triggered" + triggered_by: "v8_linux_nodcheck_rel_ng" + } builders { name: "v8_linux_rel_ng" } builders { name: "v8_linux_rel_ng_triggered" triggered_by: "v8_linux_rel_ng" } - builders { name: "v8_mac_rel" } + builders { name: "v8_mac_rel_ng" } + builders { + name: "v8_mac_rel_ng_triggered" + triggered_by: "v8_mac_rel_ng" + } builders { name: "v8_presubmit" } builders { name: "v8_win64_rel_ng" } builders { @@ -59,7 +83,11 @@ verifiers { triggered_by: "v8_win64_rel_ng" } builders { name: "v8_win_compile_dbg" } - builders { name: "v8_win_nosnap_shared_compile_rel" } + builders { name: "v8_win_nosnap_shared_rel_ng" } + builders { + name: "v8_win_nosnap_shared_rel_ng_triggered" + triggered_by: "v8_win_nosnap_shared_rel_ng" + } builders { name: "v8_win_rel_ng" } builders { name: "v8_win_rel_ng_triggered" @@ -67,7 +95,7 @@ verifiers { } builders { name: "v8_linux_blink_rel" - experiment_percentage: 20 + experiment_percentage: 100 } builders { name: "v8_linux64_sanitizer_coverage_rel" diff --git a/deps/v8/samples/samples.gyp b/deps/v8/samples/samples.gyp index 7e0608b2130c04..e5e9ef0f8ccb20 100644 --- a/deps/v8/samples/samples.gyp +++ b/deps/v8/samples/samples.gyp @@ -29,13 +29,14 @@ 'variables': { 'v8_code': 1, 'v8_enable_i18n_support%': 1, + 'v8_toolset_for_shell%': 'target', }, - 'includes': ['../build/toolchain.gypi', '../build/features.gypi'], + 'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'], 'target_defaults': { 'type': 'executable', 'dependencies': [ - '../tools/gyp/v8.gyp:v8', - '../tools/gyp/v8.gyp:v8_libplatform', + '../src/v8.gyp:v8', + '../src/v8.gyp:v8_libplatform', ], 'include_dirs': [ '..', @@ -56,10 +57,15 @@ }, 'targets': [ { - 'target_name': 'shell', + 'target_name': 'v8_shell', 'sources': [ 'shell.cc', ], + 'conditions': [ + [ 'want_separate_host_toolset==1', { + 'toolsets': [ '<(v8_toolset_for_shell)', ], + }], + ], }, { 'target_name': 'hello-world', diff --git a/deps/v8/src/DEPS b/deps/v8/src/DEPS index 1bb616ef33dd2d..00c7f1fb43bde0 100644 --- a/deps/v8/src/DEPS +++ b/deps/v8/src/DEPS @@ -3,7 +3,7 @@ include_rules = [ "+src", "-src/compiler", "+src/compiler/pipeline.h", - "+src/compiler/code-stub-assembler.h", + "+src/compiler/code-assembler.h", "+src/compiler/wasm-compiler.h", "-src/heap", "+src/heap/heap.h", diff --git a/deps/v8/src/accessors.cc b/deps/v8/src/accessors.cc index 374c0a21f84b25..8b8753b113ee62 100644 --- a/deps/v8/src/accessors.cc +++ b/deps/v8/src/accessors.cc @@ -40,6 +40,11 @@ Handle Accessors::MakeAccessor( Handle set = v8::FromCData(isolate, setter); info->set_getter(*get); info->set_setter(*set); + Address redirected = info->redirected_getter(); + if (redirected != nullptr) { + Handle js_get = v8::FromCData(isolate, redirected); + info->set_js_getter(*js_get); + } return info; } @@ -88,37 +93,6 @@ bool Accessors::IsJSArrayBufferViewFieldAccessor(Handle map, Isolate* isolate = name->GetIsolate(); switch (map->instance_type()) { - case JS_TYPED_ARRAY_TYPE: { - if (!CheckForName(name, isolate->factory()->length_string(), - JSTypedArray::kLengthOffset, object_offset) && - !CheckForName(name, isolate->factory()->byte_length_string(), - JSTypedArray::kByteLengthOffset, object_offset) && - !CheckForName(name, isolate->factory()->byte_offset_string(), - JSTypedArray::kByteOffsetOffset, object_offset)) { - return false; - } - - if (map->is_dictionary_map()) return false; - - // Check if the property is overridden on the instance. - DescriptorArray* descriptors = map->instance_descriptors(); - int descriptor = descriptors->SearchWithCache(isolate, *name, *map); - if (descriptor != DescriptorArray::kNotFound) return false; - - Handle proto = Handle(map->prototype(), isolate); - if (!proto->IsJSReceiver()) return false; - - // Check if the property is defined in the prototype chain. - LookupIterator it(proto, name); - if (!it.IsFound()) return false; - - Object* original_proto = - JSFunction::cast(map->GetConstructor())->prototype(); - - // Property is not configurable. It is enough to verify that - // the holder is the same. - return *it.GetHolder() == original_proto; - } case JS_DATA_VIEW_TYPE: return CheckForName(name, isolate->factory()->byte_length_string(), JSDataView::kByteLengthOffset, object_offset) || @@ -129,9 +103,11 @@ bool Accessors::IsJSArrayBufferViewFieldAccessor(Handle map, } } -MUST_USE_RESULT static MaybeHandle ReplaceAccessorWithDataProperty( - Isolate* isolate, Handle receiver, Handle holder, - Handle name, Handle value, bool observe) { +namespace { + +MUST_USE_RESULT MaybeHandle ReplaceAccessorWithDataProperty( + Isolate* isolate, Handle receiver, Handle holder, + Handle name, Handle value) { LookupIterator it(receiver, name, holder, LookupIterator::OWN_SKIP_INTERCEPTOR); // Skip any access checks we might hit. This accessor should never hit in a @@ -140,37 +116,26 @@ MUST_USE_RESULT static MaybeHandle ReplaceAccessorWithDataProperty( CHECK(it.HasAccess()); it.Next(); } + DCHECK(holder.is_identical_to(it.GetHolder())); CHECK_EQ(LookupIterator::ACCESSOR, it.state()); - - Handle old_value; - bool is_observed = observe && receiver->map()->is_observed(); - if (is_observed) { - MaybeHandle maybe_old = Object::GetPropertyWithAccessor(&it); - if (!maybe_old.ToHandle(&old_value)) return maybe_old; - } - it.ReconfigureDataProperty(value, it.property_attributes()); - - if (is_observed && !old_value->SameValue(*value)) { - return JSObject::EnqueueChangeRecord(receiver, "update", name, old_value); - } - return value; } +} // namespace + void Accessors::ReconfigureToDataProperty( v8::Local key, v8::Local val, const v8::PropertyCallbackInfo& info) { i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); HandleScope scope(isolate); - Handle receiver = - Handle::cast(Utils::OpenHandle(*info.This())); + Handle receiver = Utils::OpenHandle(*info.This()); Handle holder = Handle::cast(Utils::OpenHandle(*info.Holder())); Handle name = Utils::OpenHandle(*key); Handle value = Utils::OpenHandle(*val); - MaybeHandle result = ReplaceAccessorWithDataProperty( - isolate, receiver, holder, name, value, false); + MaybeHandle result = + ReplaceAccessorWithDataProperty(isolate, receiver, holder, name, value); if (result.is_null()) isolate->OptionalRescheduleException(false); } @@ -221,7 +186,7 @@ void Accessors::ArrayLengthSetter( i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); HandleScope scope(isolate); - Handle object = Utils::OpenHandle(*info.This()); + Handle object = Utils::OpenHandle(*info.Holder()); Handle array = Handle::cast(object); Handle length_obj = Utils::OpenHandle(*val); @@ -231,9 +196,7 @@ void Accessors::ArrayLengthSetter( return; } - if (JSArray::ObservableSetLength(array, length).is_null()) { - isolate->OptionalRescheduleException(false); - } + JSArray::SetLength(array, length); if (info.ShouldThrowOnError()) { uint32_t actual_new_len = 0; @@ -305,7 +268,7 @@ void Accessors::ScriptColumnOffsetGetter( i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); DisallowHeapAllocation no_allocation; HandleScope scope(isolate); - Object* object = *Utils::OpenHandle(*info.This()); + Object* object = *Utils::OpenHandle(*info.Holder()); Object* res = Smi::FromInt( Script::cast(JSValue::cast(object)->value())->column_offset()); info.GetReturnValue().Set(Utils::ToLocal(Handle(res, isolate))); @@ -332,7 +295,7 @@ void Accessors::ScriptIdGetter( i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); DisallowHeapAllocation no_allocation; HandleScope scope(isolate); - Object* object = *Utils::OpenHandle(*info.This()); + Object* object = *Utils::OpenHandle(*info.Holder()); Object* id = Smi::FromInt(Script::cast(JSValue::cast(object)->value())->id()); info.GetReturnValue().Set(Utils::ToLocal(Handle(id, isolate))); } @@ -357,7 +320,7 @@ void Accessors::ScriptNameGetter( i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); DisallowHeapAllocation no_allocation; HandleScope scope(isolate); - Object* object = *Utils::OpenHandle(*info.This()); + Object* object = *Utils::OpenHandle(*info.Holder()); Object* source = Script::cast(JSValue::cast(object)->value())->name(); info.GetReturnValue().Set(Utils::ToLocal(Handle(source, isolate))); } @@ -381,7 +344,7 @@ void Accessors::ScriptSourceGetter( i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); DisallowHeapAllocation no_allocation; HandleScope scope(isolate); - Object* object = *Utils::OpenHandle(*info.This()); + Object* object = *Utils::OpenHandle(*info.Holder()); Object* source = Script::cast(JSValue::cast(object)->value())->source(); info.GetReturnValue().Set(Utils::ToLocal(Handle(source, isolate))); } @@ -405,7 +368,7 @@ void Accessors::ScriptLineOffsetGetter( i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); DisallowHeapAllocation no_allocation; HandleScope scope(isolate); - Object* object = *Utils::OpenHandle(*info.This()); + Object* object = *Utils::OpenHandle(*info.Holder()); Object* res = Smi::FromInt(Script::cast(JSValue::cast(object)->value())->line_offset()); info.GetReturnValue().Set(Utils::ToLocal(Handle(res, isolate))); @@ -432,7 +395,7 @@ void Accessors::ScriptTypeGetter( i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); DisallowHeapAllocation no_allocation; HandleScope scope(isolate); - Object* object = *Utils::OpenHandle(*info.This()); + Object* object = *Utils::OpenHandle(*info.Holder()); Object* res = Smi::FromInt(Script::cast(JSValue::cast(object)->value())->type()); info.GetReturnValue().Set(Utils::ToLocal(Handle(res, isolate))); @@ -458,7 +421,7 @@ void Accessors::ScriptCompilationTypeGetter( i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); DisallowHeapAllocation no_allocation; HandleScope scope(isolate); - Object* object = *Utils::OpenHandle(*info.This()); + Object* object = *Utils::OpenHandle(*info.Holder()); Object* res = Smi::FromInt( Script::cast(JSValue::cast(object)->value())->compilation_type()); info.GetReturnValue().Set(Utils::ToLocal(Handle(res, isolate))); @@ -484,7 +447,7 @@ void Accessors::ScriptLineEndsGetter( const v8::PropertyCallbackInfo& info) { i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); HandleScope scope(isolate); - Handle object = Utils::OpenHandle(*info.This()); + Handle object = Utils::OpenHandle(*info.Holder()); Handle + + + + +

Runtime Stats Komparator

+ +
+
+

Data

+
+

+ +

+
+
+ + +
+
+ + + + +
+
+ + +
+ + + + + + + + + + + +
Pos. Name Time Percent Count 
+
+
+ +
+

Usage

+
    +
  1. Install scipy, e.g. sudo aptitude install python-scipy +
  2. Build chrome with the extended runtime callstats.
  3. +
  4. Run callstats.py with a web-page-replay archive: +
    $V8_DIR/tools/callstats.py run \
    +        --replay-bin=$CHROME_SRC/third_party/webpagereplay/replay.py \
    +        --replay-wpr=$INPUT_DIR/top25.wpr \
    +        --js-flags="" \
    +        --with-chrome=$CHROME_SRC/out/Release/chrome \
    +        --sites-file=$INPUT_DIR/top25.json
    +
  5. +
  6. Move results file to a subdirectory: mkdir $VERSION_DIR; mv *.txt $VERSION_DIR
  7. +
  8. Repeat from step 1 with a different configuration (e.g. --js-flags="--nolazy").
  9. +
  10. Create the final results file: ./callstats.py json $VERSION_DIR1 $VERSION_DIR2 > result.json
  11. +
  12. Use results.json on this site. +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Page:
Version:
Time:± ±
Percent:± ±
Count:± ±
Overall Impact:± ±
+
+ + + + diff --git a/deps/v8/tools/callstats.py b/deps/v8/tools/callstats.py new file mode 100755 index 00000000000000..9044618421a627 --- /dev/null +++ b/deps/v8/tools/callstats.py @@ -0,0 +1,556 @@ +#!/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. +''' +Usage: runtime-call-stats.py [-h] ... + +Optional arguments: + -h, --help show this help message and exit + +Commands: + run run chrome with --runtime-call-stats and generate logs + stats process logs and print statistics + json process logs from several versions and generate JSON + help help information + +For each command, you can try ./runtime-call-stats.py help command. +''' + +import argparse +import json +import os +import re +import shutil +import subprocess +import sys +import tempfile + +import numpy +import scipy +import scipy.stats +from math import sqrt + + +# Run benchmarks. + +def print_command(cmd_args): + def fix_for_printing(arg): + m = re.match(r'^--([^=]+)=(.*)$', arg) + if m and (' ' in m.group(2) or m.group(2).startswith('-')): + arg = "--{}='{}'".format(m.group(1), m.group(2)) + elif ' ' in arg: + arg = "'{}'".format(arg) + return arg + print " ".join(map(fix_for_printing, cmd_args)) + + +def start_replay_server(args, sites): + with tempfile.NamedTemporaryFile(prefix='callstats-inject-', suffix='.js', + mode='wt', delete=False) as f: + injection = f.name + generate_injection(f, sites, args.refresh) + cmd_args = [ + args.replay_bin, + "--port=4080", + "--ssl_port=4443", + "--no-dns_forwarding", + "--use_closest_match", + "--no-diff_unknown_requests", + "--inject_scripts=deterministic.js,{}".format(injection), + args.replay_wpr, + ] + print "=" * 80 + print_command(cmd_args) + with open(os.devnull, 'w') as null: + server = subprocess.Popen(cmd_args, stdout=null, stderr=null) + print "RUNNING REPLAY SERVER: %s with PID=%s" % (args.replay_bin, server.pid) + print "=" * 80 + return {'process': server, 'injection': injection} + + +def stop_replay_server(server): + print("SHUTTING DOWN REPLAY SERVER %s" % server['process'].pid) + server['process'].terminate() + os.remove(server['injection']) + + +def generate_injection(f, sites, refreshes=0): + print >> f, """\ +(function() { + let s = window.sessionStorage.getItem("refreshCounter"); + let refreshTotal = """, refreshes, """; + let refreshCounter = s ? parseInt(s) : refreshTotal; + let refreshId = refreshTotal - refreshCounter; + if (refreshCounter > 0) { + window.sessionStorage.setItem("refreshCounter", refreshCounter-1); + } + + function match(url, item) { + if ('regexp' in item) return url.match(item.regexp) !== null; + let url_wanted = item.url; + // Allow automatic redirections from http to https. + if (url_wanted.startsWith("http://") && url.startsWith("https://")) { + url_wanted = "https://" + url_wanted.substr(7); + } + return url.startsWith(url_wanted); + }; + + function onLoad(e) { + let url = e.target.URL; + for (let item of sites) { + if (!match(url, item)) continue; + let timeout = 'timeline' in item ? 2500 * item.timeline + : 'timeout' in item ? 1000 * (item.timeout - 3) + : 10000; + console.log("Setting time out of " + timeout + " for: " + url); + window.setTimeout(function() { + console.log("Time is out for: " + url); + let msg = "STATS: (" + refreshId + ") " + url; + %GetAndResetRuntimeCallStats(1, msg); + if (refreshCounter > 0) { + console.log("Refresh counter is " + refreshCounter + ", refreshing: " + url); + window.location.reload(); + } + }, timeout); + return; + } + console.log("Ignoring: " + url); + }; + + let sites = + """, json.dumps(sites), """; + + console.log("Event listenner added for: " + window.location.href); + window.addEventListener("load", onLoad); +})();""" + + +def run_site(site, domain, args, timeout=None): + print "="*80 + print "RUNNING DOMAIN %s" % domain + print "="*80 + result_template = "{domain}#{count}.txt" if args.repeat else "{domain}.txt" + count = 0 + if timeout is None: timeout = args.timeout + if args.replay_wpr: + timeout *= 1 + args.refresh + timeout += 1 + while count == 0 or args.repeat is not None and count < args.repeat: + count += 1 + result = result_template.format(domain=domain, count=count) + retries = 0 + while args.retries is None or retries < args.retries: + retries += 1 + try: + if args.user_data_dir: + user_data_dir = args.user_data_dir + else: + user_data_dir = tempfile.mkdtemp(prefix="chr_") + js_flags = "--runtime-call-stats" + if args.replay_wpr: js_flags += " --allow-natives-syntax" + if args.js_flags: js_flags += " " + args.js_flags + chrome_flags = [ + "--no-default-browser-check", + "--disable-translate", + "--js-flags={}".format(js_flags), + "--no-first-run", + "--user-data-dir={}".format(user_data_dir), + ] + if args.replay_wpr: + chrome_flags += [ + "--host-resolver-rules=MAP *:80 localhost:4080, " \ + "MAP *:443 localhost:4443, " \ + "EXCLUDE localhost", + "--ignore-certificate-errors", + "--disable-seccomp-sandbox", + "--disable-web-security", + "--reduce-security-for-testing", + "--allow-insecure-localhost", + ] + else: + chrome_flags += [ + "--single-process", + ] + if args.chrome_flags: + chrome_flags += args.chrome_flags.split() + cmd_args = [ + "timeout", str(timeout), + args.with_chrome + ] + chrome_flags + [ site ] + print "- " * 40 + print_command(cmd_args) + print "- " * 40 + with open(result, "wt") as f: + status = subprocess.call(cmd_args, stdout=f) + # 124 means timeout killed chrome, 0 means the user was bored first! + # If none of these two happened, then chrome apparently crashed, so + # it must be called again. + if status != 124 and status != 0: + print("CHROME CRASHED, REPEATING RUN"); + continue + # If the stats file is empty, chrome must be called again. + if os.path.isfile(result) and os.path.getsize(result) > 0: + if args.print_url: + with open(result, "at") as f: + print >> f + print >> f, "URL: {}".format(site) + break + if retries <= 6: timeout += 2 ** (retries-1) + print("EMPTY RESULT, REPEATING RUN"); + finally: + if not args.user_data_dir: + shutil.rmtree(user_data_dir) + + +def read_sites_file(args): + try: + sites = [] + try: + with open(args.sites_file, "rt") as f: + for item in json.load(f): + if 'timeout' not in item: + # This is more-or-less arbitrary. + item['timeout'] = int(2.5 * item['timeline'] + 3) + if item['timeout'] > args.timeout: item['timeout'] = args.timeout + sites.append(item) + except ValueError: + with open(args.sites_file, "rt") as f: + for line in f: + line = line.strip() + if not line or line.startswith('#'): continue + sites.append({'url': line, 'timeout': args.timeout}) + return sites + except IOError as e: + args.error("Cannot read from {}. {}.".format(args.sites_file, e.strerror)) + sys.exit(1) + + +def do_run(args): + # Determine the websites to benchmark. + if args.sites_file: + sites = read_sites_file(args) + else: + sites = [{'url': site, 'timeout': args.timeout} for site in args.sites] + # Disambiguate domains, if needed. + L = [] + domains = {} + for item in sites: + site = item['url'] + m = re.match(r'^(https?://)?([^/]+)(/.*)?$', site) + if not m: + args.error("Invalid URL {}.".format(site)) + continue + domain = m.group(2) + entry = [site, domain, None, item['timeout']] + if domain not in domains: + domains[domain] = entry + else: + if not isinstance(domains[domain], int): + domains[domain][2] = 1 + domains[domain] = 1 + domains[domain] += 1 + entry[2] = domains[domain] + L.append(entry) + replay_server = start_replay_server(args, sites) if args.replay_wpr else None + try: + # Run them. + for site, domain, count, timeout in L: + if count is not None: domain = "{}%{}".format(domain, count) + print site, domain, timeout + run_site(site, domain, args, timeout) + finally: + if replay_server: + stop_replay_server(replay_server) + + +# Calculate statistics. + +def statistics(data): + N = len(data) + average = numpy.average(data) + median = numpy.median(data) + low = numpy.min(data) + high= numpy.max(data) + if N > 1: + # evaluate sample variance by setting delta degrees of freedom (ddof) to + # 1. The degree used in calculations is N - ddof + stddev = numpy.std(data, ddof=1) + # Get the endpoints of the range that contains 95% of the distribution + t_bounds = scipy.stats.t.interval(0.95, N-1) + #assert abs(t_bounds[0] + t_bounds[1]) < 1e-6 + # sum mean to the confidence interval + ci = { + 'abs': t_bounds[1] * stddev / sqrt(N), + 'low': average + t_bounds[0] * stddev / sqrt(N), + 'high': average + t_bounds[1] * stddev / sqrt(N) + } + else: + stddev = 0 + ci = { 'abs': 0, 'low': average, 'high': average } + if abs(stddev) > 0.0001 and abs(average) > 0.0001: + ci['perc'] = t_bounds[1] * stddev / sqrt(N) / average * 100 + else: + ci['perc'] = 0 + return { 'samples': N, 'average': average, 'median': median, + 'stddev': stddev, 'min': low, 'max': high, 'ci': ci } + + +def read_stats(path, S): + with open(path, "rt") as f: + # Process the whole file and sum repeating entries. + D = { 'Sum': {'time': 0, 'count': 0} } + for line in f: + line = line.strip() + # Discard headers and footers. + if not line: continue + if line.startswith("Runtime Function"): continue + if line.startswith("===="): continue + if line.startswith("----"): continue + if line.startswith("URL:"): continue + if line.startswith("STATS:"): continue + # We have a regular line. + fields = line.split() + key = fields[0] + time = float(fields[1].replace("ms", "")) + count = int(fields[3]) + if key not in D: D[key] = { 'time': 0, 'count': 0 } + D[key]['time'] += time + D[key]['count'] += count + # We calculate the sum, if it's not the "total" line. + if key != "Total": + D['Sum']['time'] += time + D['Sum']['count'] += count + # Append the sums as single entries to S. + for key in D: + if key not in S: S[key] = { 'time_list': [], 'count_list': [] } + S[key]['time_list'].append(D[key]['time']) + S[key]['count_list'].append(D[key]['count']) + + +def print_stats(S, args): + # Sort by ascending/descending time average, then by ascending/descending + # count average, then by ascending name. + def sort_asc_func(item): + return (item[1]['time_stat']['average'], + item[1]['count_stat']['average'], + item[0]) + def sort_desc_func(item): + return (-item[1]['time_stat']['average'], + -item[1]['count_stat']['average'], + item[0]) + # Sorting order is in the commend-line arguments. + sort_func = sort_asc_func if args.sort == "asc" else sort_desc_func + # Possibly limit how many elements to print. + L = [item for item in sorted(S.items(), key=sort_func) + if item[0] not in ["Total", "Sum"]] + N = len(L) + if args.limit == 0: + low, high = 0, N + elif args.sort == "desc": + low, high = 0, args.limit + else: + low, high = N-args.limit, N + # How to print entries. + def print_entry(key, value): + def stats(s, units=""): + conf = "{:0.1f}({:0.2f}%)".format(s['ci']['abs'], s['ci']['perc']) + return "{:8.1f}{} +/- {:15s}".format(s['average'], units, conf) + print "{:>50s} {} {}".format( + key, + stats(value['time_stat'], units="ms"), + stats(value['count_stat']) + ) + # Print and calculate partial sums, if necessary. + for i in range(low, high): + print_entry(*L[i]) + if args.totals and args.limit != 0: + if i == low: + partial = { 'time_list': [0] * len(L[i][1]['time_list']), + 'count_list': [0] * len(L[i][1]['count_list']) } + assert len(partial['time_list']) == len(L[i][1]['time_list']) + assert len(partial['count_list']) == len(L[i][1]['count_list']) + for j, v in enumerate(L[i][1]['time_list']): + partial['time_list'][j] += v + for j, v in enumerate(L[i][1]['count_list']): + partial['count_list'][j] += v + # Print totals, if necessary. + if args.totals: + print '-' * 80 + if args.limit != 0: + partial['time_stat'] = statistics(partial['time_list']) + partial['count_stat'] = statistics(partial['count_list']) + print_entry("Partial", partial) + print_entry("Sum", S["Sum"]) + print_entry("Total", S["Total"]) + + +def do_stats(args): + T = {} + for path in args.logfiles: + filename = os.path.basename(path) + m = re.match(r'^([^#]+)(#.*)?$', filename) + domain = m.group(1) + if domain not in T: T[domain] = {} + read_stats(path, T[domain]) + for i, domain in enumerate(sorted(T)): + if len(T) > 1: + if i > 0: print + print "{}:".format(domain) + print '=' * 80 + S = T[domain] + for key in S: + S[key]['time_stat'] = statistics(S[key]['time_list']) + S[key]['count_stat'] = statistics(S[key]['count_list']) + print_stats(S, args) + + +# Generate JSON file. + +def do_json(args): + J = {} + for path in args.logdirs: + if os.path.isdir(path): + for root, dirs, files in os.walk(path): + version = os.path.basename(root) + if version not in J: J[version] = {} + for filename in files: + if filename.endswith(".txt"): + m = re.match(r'^([^#]+)(#.*)?\.txt$', filename) + domain = m.group(1) + if domain not in J[version]: J[version][domain] = {} + read_stats(os.path.join(root, filename), J[version][domain]) + for version, T in J.items(): + for domain, S in T.items(): + A = [] + for name, value in S.items(): + # We don't want the calculated sum in the JSON file. + if name == "Sum": continue + entry = [name] + for x in ['time_list', 'count_list']: + s = statistics(S[name][x]) + entry.append(round(s['average'], 1)) + entry.append(round(s['ci']['abs'], 1)) + entry.append(round(s['ci']['perc'], 2)) + A.append(entry) + T[domain] = A + print json.dumps(J, separators=(',', ':')) + + +# Help. + +def do_help(parser, subparsers, args): + if args.help_cmd: + if args.help_cmd in subparsers: + subparsers[args.help_cmd].print_help() + else: + args.error("Unknown command '{}'".format(args.help_cmd)) + else: + parser.print_help() + + +# Main program, parse command line and execute. + +def coexist(*l): + given = sum(1 for x in l if x) + return given == 0 or given == len(l) + +def main(): + parser = argparse.ArgumentParser() + subparser_adder = parser.add_subparsers(title="commands", dest="command", + metavar="") + subparsers = {} + # Command: run. + subparsers["run"] = subparser_adder.add_parser( + "run", help="run --help") + subparsers["run"].set_defaults( + func=do_run, error=subparsers["run"].error) + subparsers["run"].add_argument( + "--chrome-flags", type=str, default="", + help="specify additional chrome flags") + subparsers["run"].add_argument( + "--js-flags", type=str, default="", + help="specify additional V8 flags") + subparsers["run"].add_argument( + "--no-url", dest="print_url", action="store_false", default=True, + help="do not include url in statistics file") + subparsers["run"].add_argument( + "-n", "--repeat", type=int, metavar="", + help="specify iterations for each website (default: once)") + subparsers["run"].add_argument( + "-k", "--refresh", type=int, metavar="", default=0, + help="specify refreshes for each iteration (default: 0)") + subparsers["run"].add_argument( + "--replay-wpr", type=str, metavar="", + help="use the specified web page replay (.wpr) archive") + subparsers["run"].add_argument( + "--replay-bin", type=str, metavar="", + help="specify the replay.py script typically located in " \ + "$CHROMIUM/src/third_party/webpagereplay/replay.py") + subparsers["run"].add_argument( + "-r", "--retries", type=int, metavar="", + help="specify retries if website is down (default: forever)") + subparsers["run"].add_argument( + "-f", "--sites-file", type=str, metavar="", + help="specify file containing benchmark websites") + subparsers["run"].add_argument( + "-t", "--timeout", type=int, metavar="", default=60, + help="specify seconds before chrome is killed") + subparsers["run"].add_argument( + "-u", "--user-data-dir", type=str, metavar="", + help="specify user data dir (default is temporary)") + subparsers["run"].add_argument( + "-c", "--with-chrome", type=str, metavar="", + default="/usr/bin/google-chrome", + help="specify chrome executable to use") + subparsers["run"].add_argument( + "sites", type=str, metavar="", nargs="*", + help="specify benchmark website") + # Command: stats. + subparsers["stats"] = subparser_adder.add_parser( + "stats", help="stats --help") + subparsers["stats"].set_defaults( + func=do_stats, error=subparsers["stats"].error) + subparsers["stats"].add_argument( + "-l", "--limit", type=int, metavar="", default=0, + help="limit how many items to print (default: none)") + subparsers["stats"].add_argument( + "-s", "--sort", choices=["asc", "desc"], default="asc", + help="specify sorting order (default: ascending)") + subparsers["stats"].add_argument( + "-n", "--no-total", dest="totals", action="store_false", default=True, + help="do not print totals") + subparsers["stats"].add_argument( + "logfiles", type=str, metavar="", nargs="*", + help="specify log files to parse") + # Command: json. + subparsers["json"] = subparser_adder.add_parser( + "json", help="json --help") + subparsers["json"].set_defaults( + func=do_json, error=subparsers["json"].error) + subparsers["json"].add_argument( + "logdirs", type=str, metavar="", nargs="*", + help="specify directories with log files to parse") + # Command: help. + subparsers["help"] = subparser_adder.add_parser( + "help", help="help information") + subparsers["help"].set_defaults( + func=lambda args: do_help(parser, subparsers, args), + error=subparsers["help"].error) + subparsers["help"].add_argument( + "help_cmd", type=str, metavar="", nargs="?", + help="command for which to display help") + # Execute the command. + args = parser.parse_args() + setattr(args, 'script_path', os.path.dirname(sys.argv[0])) + if args.command == "run" and coexist(args.sites_file, args.sites): + args.error("use either option --sites-file or site URLs") + sys.exit(1) + elif args.command == "run" and not coexist(args.replay_wpr, args.replay_bin): + args.error("options --replay-wpr and --replay-bin must be used together") + sys.exit(1) + else: + args.func(args) + +if __name__ == "__main__": + sys.exit(main()) diff --git a/deps/v8/tools/check-static-initializers.gyp b/deps/v8/tools/check-static-initializers.gyp index 547a6c873bb873..cfeacfc89fb08e 100644 --- a/deps/v8/tools/check-static-initializers.gyp +++ b/deps/v8/tools/check-static-initializers.gyp @@ -13,8 +13,8 @@ '../src/d8.gyp:d8_run', ], 'includes': [ - '../build/features.gypi', - '../build/isolate.gypi', + '../gypfiles/features.gypi', + '../gypfiles/isolate.gypi', ], 'sources': [ 'check-static-initializers.isolate', diff --git a/deps/v8/tools/codemap.js b/deps/v8/tools/codemap.js index fa6c36b50b9a1a..30cdc21db50160 100644 --- a/deps/v8/tools/codemap.js +++ b/deps/v8/tools/codemap.js @@ -245,6 +245,14 @@ CodeMap.prototype.getAllStaticEntries = function() { }; +/** + * Returns an array of pairs of all static code entries and their addresses. + */ +CodeMap.prototype.getAllStaticEntriesWithAddresses = function() { + return this.statics_.exportKeysAndValues(); +}; + + /** * Returns an array of all libraries entries. */ diff --git a/deps/v8/tools/dump-cpp.py b/deps/v8/tools/dump-cpp.py new file mode 100644 index 00000000000000..b7bb32e9bf2ca7 --- /dev/null +++ b/deps/v8/tools/dump-cpp.py @@ -0,0 +1,74 @@ +#!/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. + +# This script executes dumpcpp.js, collects all dumped C++ symbols, +# and merges them back into v8 log. + +import os +import platform +import re +import subprocess +import sys + +def is_file_executable(fPath): + return os.path.isfile(fPath) and os.access(fPath, os.X_OK) + +if __name__ == '__main__': + JS_FILES = ['splaytree.js', 'codemap.js', 'csvparser.js', 'consarray.js', + 'profile.js', 'logreader.js', 'tickprocessor.js', 'SourceMap.js', + 'dumpcpp.js'] + tools_path = os.path.dirname(os.path.realpath(__file__)) + on_windows = platform.system() == 'Windows' + JS_FILES = [os.path.join(tools_path, f) for f in JS_FILES] + + args = [] + log_file = 'v8.log' + debug = False + for arg in sys.argv[1:]: + if arg == '--debug': + debug = True + continue + args.append(arg) + if not arg.startswith('-'): + log_file = arg + + if on_windows: + args.append('--windows') + + with open(log_file, 'r') as f: + lines = f.readlines() + + d8_line = re.search(',\"(.*d8)', ''.join(lines)) + if d8_line: + d8_exec = d8_line.group(1) + if not is_file_executable(d8_exec): + print 'd8 binary path found in {} is not executable.'.format(log_file) + sys.exit(-1) + else: + print 'No d8 binary path found in {}.'.format(log_file) + sys.exit(-1) + + args = [d8_exec] + JS_FILES + ['--'] + args + + with open(log_file) as f: + sp = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, + stdin=f) + out, err = sp.communicate() + if debug: + print err + if sp.returncode != 0: + print out + exit(-1) + + if on_windows and out: + out = re.sub('\r+\n', '\n', out) + + is_written = not bool(out) + with open(log_file, 'w') as f: + for line in lines: + if not is_written and line.startswith('tick'): + f.write(out) + is_written = True + f.write(line) diff --git a/deps/v8/tools/dumpcpp.js b/deps/v8/tools/dumpcpp.js new file mode 100644 index 00000000000000..28885e0cad9bb2 --- /dev/null +++ b/deps/v8/tools/dumpcpp.js @@ -0,0 +1,100 @@ +// 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. + +// Dump C++ symbols of shared library if possible + +function processArguments(args) { + var processor = new ArgumentsProcessor(args); + if (processor.parse()) { + return processor.result(); + } else { + processor.printUsageAndExit(); + } +} + +function initSourceMapSupport() { + // Pull dev tools source maps into our name space. + SourceMap = WebInspector.SourceMap; + + // Overwrite the load function to load scripts synchronously. + SourceMap.load = function(sourceMapURL) { + var content = readFile(sourceMapURL); + var sourceMapObject = (JSON.parse(content)); + return new SourceMap(sourceMapURL, sourceMapObject); + }; +} + +var entriesProviders = { + 'unix': UnixCppEntriesProvider, + 'windows': WindowsCppEntriesProvider, + 'mac': MacCppEntriesProvider +}; + +var params = processArguments(arguments); +var sourceMap = null; +if (params.sourceMap) { + initSourceMapSupport(); + sourceMap = SourceMap.load(params.sourceMap); +} + +function CppProcessor(cppEntriesProvider, timedRange, pairwiseTimedRange) { + LogReader.call(this, { + 'shared-library': { parsers: [null, parseInt, parseInt], + processor: this.processSharedLibrary } + }, timedRange, pairwiseTimedRange); + + this.cppEntriesProvider_ = cppEntriesProvider; + this.codeMap_ = new CodeMap(); + this.lastLogFileName_ = null; +} +inherits(CppProcessor, LogReader); + +/** + * @override + */ +CppProcessor.prototype.printError = function(str) { + print(str); +}; + +CppProcessor.prototype.processLogFile = function(fileName) { + this.lastLogFileName_ = fileName; + var line; + while (line = readline()) { + this.processLogLine(line); + } +}; + +CppProcessor.prototype.processLogFileInTest = function(fileName) { + // Hack file name to avoid dealing with platform specifics. + this.lastLogFileName_ = 'v8.log'; + var contents = readFile(fileName); + this.processLogChunk(contents); +}; + +CppProcessor.prototype.processSharedLibrary = function( + name, startAddr, endAddr) { + var self = this; + var libFuncs = this.cppEntriesProvider_.parseVmSymbols( + name, startAddr, endAddr, function(fName, fStart, fEnd) { + var entry = new CodeMap.CodeEntry(fEnd - fStart, fName, 'CPP'); + self.codeMap_.addStaticCode(fStart, entry); + }); +}; + +CppProcessor.prototype.dumpCppSymbols = function() { + var staticEntries = this.codeMap_.getAllStaticEntriesWithAddresses(); + var total = staticEntries.length; + for (var i = 0; i < total; ++i) { + var entry = staticEntries[i]; + var printValues = ['cpp', '0x' + entry[0].toString(16), entry[1].size, + '"' + entry[1].name + '"']; + print(printValues.join(',')); + } +}; + +var cppProcessor = new CppProcessor( + new (entriesProviders[params.platform])(params.nm, params.targetRootFS), + params.timedRange, params.pairwiseTimedRange); +cppProcessor.processLogFile(params.logFileName); +cppProcessor.dumpCppSymbols(); diff --git a/deps/v8/tools/eval_gc_nvp.py b/deps/v8/tools/eval_gc_nvp.py index fcb6d8b9a2232f..25afe8e4f0a74a 100755 --- a/deps/v8/tools/eval_gc_nvp.py +++ b/deps/v8/tools/eval_gc_nvp.py @@ -10,7 +10,7 @@ from argparse import ArgumentParser from copy import deepcopy from gc_nvp_common import split_nvp -from math import log +from math import ceil,log from sys import stdin @@ -74,11 +74,12 @@ def __str__(self): class Category: - def __init__(self, key, histogram, csv): + def __init__(self, key, histogram, csv, percentiles): self.key = key self.values = [] self.histogram = histogram self.csv = csv + self.percentiles = percentiles def process_entry(self, entry): if self.key in entry: @@ -100,6 +101,16 @@ def avg(self): def empty(self): return len(self.values) == 0 + def _compute_percentiles(self): + ret = [] + if len(self.values) == 0: + return ret + sorted_values = sorted(self.values) + for percentile in self.percentiles: + index = int(ceil((len(self.values) - 1) * percentile / 100)) + ret.append(" {0}%: {1}".format(percentile, sorted_values[index])) + return ret + def __str__(self): if self.csv: ret = [self.key] @@ -118,6 +129,8 @@ def __str__(self): ret.append(" avg: {0}".format(self.avg())) if self.histogram: ret.append(str(self.histogram)) + if self.percentiles: + ret.append("\n".join(self._compute_percentiles())) return "\n".join(ret) def __repr__(self): @@ -160,6 +173,9 @@ def main(): help="rank keys by metric (default: no)") parser.add_argument('--csv', dest='csv', action='store_true', help='provide output as csv') + parser.add_argument('--percentiles', dest='percentiles', + type=str, default="", + help='comma separated list of percentiles') args = parser.parse_args() histogram = None @@ -171,7 +187,14 @@ def main(): bucket_trait = LinearBucket(args.linear_histogram_granularity) histogram = Histogram(bucket_trait, not args.histogram_omit_empty) - categories = [ Category(key, deepcopy(histogram), args.csv) + percentiles = [] + for percentile in args.percentiles.split(','): + try: + percentiles.append(float(percentile)) + except ValueError: + pass + + categories = [ Category(key, deepcopy(histogram), args.csv, percentiles) for key in args.keys ] while True: diff --git a/deps/v8/tools/eval_gc_time.sh b/deps/v8/tools/eval_gc_time.sh index ceb4db54cb4606..140165da438dfa 100755 --- a/deps/v8/tools/eval_gc_time.sh +++ b/deps/v8/tools/eval_gc_time.sh @@ -17,6 +17,7 @@ print_usage_and_die() { echo " -c|--csv provide csv output" echo " -f|--file FILE profile input in a file" echo " (default: stdin)" + echo " -p|--percentiles comma separated percentiles" exit 1 } @@ -25,6 +26,7 @@ RANK_MODE=max TOP_LEVEL=no CSV="" LOGFILE=/dev/stdin +PERCENTILES="" while [[ $# -ge 1 ]] do @@ -60,6 +62,10 @@ do LOGFILE=$2 shift ;; + -p|--percentiles) + PERCENTILES="--percentiles=$2" + shift + ;; *) break ;; @@ -98,7 +104,6 @@ INTERESTING_OLD_GEN_KEYS="\ evacuate.clean_up \ evacuate.copy \ evacuate.update_pointers \ - evacuate.update_pointers.between_evacuated \ evacuate.update_pointers.to_evacuated \ evacuate.update_pointers.to_new \ evacuate.update_pointers.weak \ @@ -145,6 +150,7 @@ case $OP in --no-histogram \ --rank $RANK_MODE \ $CSV \ + $PERCENTILES \ ${INTERESTING_NEW_GEN_KEYS} ;; old-gen-rank) @@ -153,6 +159,7 @@ case $OP in --no-histogram \ --rank $RANK_MODE \ $CSV \ + $PERCENTILES \ ${INTERESTING_OLD_GEN_KEYS} ;; *) diff --git a/deps/v8/tools/gcmole/gcmole.lua b/deps/v8/tools/gcmole/gcmole.lua index 82ea4e02951698..f16ad8fd5d8010 100644 --- a/deps/v8/tools/gcmole/gcmole.lua +++ b/deps/v8/tools/gcmole/gcmole.lua @@ -185,7 +185,7 @@ end local function ParseGYPFile() local gyp = "" - local gyp_files = { "tools/gyp/v8.gyp", "test/cctest/cctest.gyp" } + local gyp_files = { "src/v8.gyp", "test/cctest/cctest.gyp" } for i = 1, #gyp_files do local f = assert(io.open(gyp_files[i]), "failed to open GYP file") local t = f:read('*a') diff --git a/deps/v8/tools/gcmole/run-gcmole.isolate b/deps/v8/tools/gcmole/run-gcmole.isolate index df6e9a267f2563..39990deee8a6ed 100644 --- a/deps/v8/tools/gcmole/run-gcmole.isolate +++ b/deps/v8/tools/gcmole/run-gcmole.isolate @@ -12,7 +12,6 @@ 'parallel.py', 'run-gcmole.py', # The following contains all relevant source and gyp files. - '../gyp/v8.gyp', '../../base/', '../../include/', '../../src/', diff --git a/deps/v8/tools/gcmole/run_gcmole.gyp b/deps/v8/tools/gcmole/run_gcmole.gyp index 9d13f7606a5de5..7d206bf412539d 100644 --- a/deps/v8/tools/gcmole/run_gcmole.gyp +++ b/deps/v8/tools/gcmole/run_gcmole.gyp @@ -10,8 +10,8 @@ 'target_name': 'run_gcmole_run', 'type': 'none', 'includes': [ - '../../build/features.gypi', - '../../build/isolate.gypi', + '../../gypfiles/features.gypi', + '../../gypfiles/isolate.gypi', ], 'sources': [ 'run-gcmole.isolate', diff --git a/deps/v8/tools/gen-postmortem-metadata.py b/deps/v8/tools/gen-postmortem-metadata.py index a0afc06ab9ed6b..55f915d3ce7542 100644 --- a/deps/v8/tools/gen-postmortem-metadata.py +++ b/deps/v8/tools/gen-postmortem-metadata.py @@ -92,6 +92,8 @@ 'value': 'DescriptorArray::kFirstIndex' }, { 'name': 'prop_type_field', 'value': 'DATA' }, + { 'name': 'prop_type_const_field', + 'value': 'DATA_CONSTANT' }, { 'name': 'prop_type_mask', 'value': 'PropertyDetails::TypeField::kMask' }, { 'name': 'prop_index_mask', diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp deleted file mode 100644 index b09fd1f28968e2..00000000000000 --- a/deps/v8/tools/gyp/v8.gyp +++ /dev/null @@ -1,2281 +0,0 @@ -# Copyright 2012 the V8 project authors. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -{ - 'variables': { - 'icu_use_data_file_flag%': 0, - 'v8_code': 1, - 'v8_random_seed%': 314159265, - 'v8_vector_stores%': 0, - 'embed_script%': "", - 'warmup_script%': "", - 'v8_extra_library_files%': [], - 'v8_experimental_extra_library_files%': [], - 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', - }, - 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'], - 'targets': [ - { - 'target_name': 'v8', - 'dependencies_traverse': 1, - 'dependencies': ['v8_maybe_snapshot'], - 'conditions': [ - ['want_separate_host_toolset==1', { - 'toolsets': ['host', 'target'], - }, { - 'toolsets': ['target'], - }], - ['component=="shared_library"', { - 'type': '<(component)', - 'sources': [ - # Note: on non-Windows we still build this file so that gyp - # has some sources to link into the component. - '../../src/v8dll-main.cc', - ], - 'include_dirs': [ - '../..', - ], - 'defines': [ - 'V8_SHARED', - 'BUILDING_V8_SHARED', - ], - 'direct_dependent_settings': { - 'defines': [ - 'V8_SHARED', - 'USING_V8_SHARED', - ], - }, - 'target_conditions': [ - ['OS=="android" and _toolset=="target"', { - 'libraries': [ - '-llog', - ], - 'include_dirs': [ - 'src/common/android/include', - ], - }], - ], - 'conditions': [ - ['OS=="mac"', { - 'xcode_settings': { - 'OTHER_LDFLAGS': ['-dynamiclib', '-all_load'] - }, - }], - ['soname_version!=""', { - 'product_extension': 'so.<(soname_version)', - }], - ], - }, - { - 'type': 'none', - }], - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '../../include', - ], - }, - }, - { - # This rule delegates to either v8_snapshot, v8_nosnapshot, or - # v8_external_snapshot, depending on the current variables. - # The intention is to make the 'calling' rules a bit simpler. - 'target_name': 'v8_maybe_snapshot', - 'type': 'none', - 'conditions': [ - ['v8_use_snapshot!="true"', { - # The dependency on v8_base should come from a transitive - # dependency however the Android toolchain requires libv8_base.a - # to appear before libv8_snapshot.a so it's listed explicitly. - 'dependencies': ['v8_base', 'v8_nosnapshot'], - }], - ['v8_use_snapshot=="true" and v8_use_external_startup_data==0', { - # The dependency on v8_base should come from a transitive - # dependency however the Android toolchain requires libv8_base.a - # to appear before libv8_snapshot.a so it's listed explicitly. - 'dependencies': ['v8_base', 'v8_snapshot'], - }], - ['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==0', { - 'dependencies': ['v8_base', 'v8_external_snapshot'], - 'inputs': ['<(PRODUCT_DIR)/snapshot_blob.bin'], - 'conditions': [ - ['v8_separate_ignition_snapshot==1', { - 'inputs': ['<(PRODUCT_DIR)/snapshot_blob_ignition.bin'], - }], - ] - }], - ['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==1', { - 'dependencies': ['v8_base', 'v8_external_snapshot'], - 'target_conditions': [ - ['_toolset=="host"', { - 'inputs': ['<(PRODUCT_DIR)/snapshot_blob_host.bin'], - }, { - 'inputs': ['<(PRODUCT_DIR)/snapshot_blob.bin'], - }], - ], - 'conditions': [ - ['v8_separate_ignition_snapshot==1', { - 'target_conditions': [ - ['_toolset=="host"', { - 'inputs': ['<(PRODUCT_DIR)/snapshot_blob_ignition_host.bin'], - }, { - 'inputs': ['<(PRODUCT_DIR)/snapshot_blob_ignition.bin'], - }], - ], - }], - ], - }], - ['want_separate_host_toolset==1', { - 'toolsets': ['host', 'target'], - }, { - 'toolsets': ['target'], - }], - ] - }, - { - 'target_name': 'v8_snapshot', - 'type': 'static_library', - 'conditions': [ - ['want_separate_host_toolset==1', { - 'toolsets': ['host', 'target'], - 'dependencies': [ - 'mksnapshot#host', - 'js2c#host', - ], - }, { - 'toolsets': ['target'], - 'dependencies': [ - 'mksnapshot', - 'js2c', - ], - }], - ['component=="shared_library"', { - 'defines': [ - 'V8_SHARED', - 'BUILDING_V8_SHARED', - ], - 'direct_dependent_settings': { - 'defines': [ - 'V8_SHARED', - 'USING_V8_SHARED', - ], - }, - }], - ], - 'dependencies': [ - 'v8_base', - ], - 'include_dirs+': [ - '../..', - ], - 'sources': [ - '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', - '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', - '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc', - '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries.cc', - '<(INTERMEDIATE_DIR)/snapshot.cc', - ], - 'actions': [ - { - 'action_name': 'run_mksnapshot', - 'inputs': [ - '<(mksnapshot_exec)', - '<(embed_script)', - '<(warmup_script)', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/snapshot.cc', - ], - 'variables': { - 'mksnapshot_flags': [], - 'conditions': [ - ['v8_random_seed!=0', { - 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], - }], - ['v8_vector_stores!=0', { - 'mksnapshot_flags': ['--vector-stores'], - }], - ], - }, - 'action': [ - '<(mksnapshot_exec)', - '<@(mksnapshot_flags)', - '--startup_src', '<@(INTERMEDIATE_DIR)/snapshot.cc', - '<(embed_script)', - '<(warmup_script)', - ], - }, - ], - }, - { - 'target_name': 'v8_nosnapshot', - 'type': 'static_library', - 'dependencies': [ - 'v8_base', - ], - 'include_dirs+': [ - '../..', - ], - 'sources': [ - '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', - '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', - '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc', - '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries.cc', - '../../src/snapshot/snapshot-empty.cc', - ], - 'conditions': [ - ['want_separate_host_toolset==1', { - 'toolsets': ['host', 'target'], - 'dependencies': ['js2c#host'], - }, { - 'toolsets': ['target'], - 'dependencies': ['js2c'], - }], - ['component=="shared_library"', { - 'defines': [ - 'BUILDING_V8_SHARED', - 'V8_SHARED', - ], - }], - ] - }, - { - 'target_name': 'v8_external_snapshot', - 'type': 'static_library', - 'conditions': [ - [ 'v8_use_external_startup_data==1', { - 'conditions': [ - ['want_separate_host_toolset==1', { - 'toolsets': ['host', 'target'], - 'dependencies': [ - 'mksnapshot#host', - 'js2c#host', - 'natives_blob', - ]}, { - 'toolsets': ['target'], - 'dependencies': [ - 'mksnapshot', - 'js2c', - 'natives_blob', - ], - }], - ['component=="shared_library"', { - 'defines': [ - 'V8_SHARED', - 'BUILDING_V8_SHARED', - ], - 'direct_dependent_settings': { - 'defines': [ - 'V8_SHARED', - 'USING_V8_SHARED', - ], - }, - }], - # Extra snapshot blob for ignition. - ['v8_separate_ignition_snapshot==1', { - # This is concatenated to the other actions list of - # v8_external_snapshot. - 'actions': [ - { - 'action_name': 'run_mksnapshot (ignition)', - 'inputs': ['<(mksnapshot_exec)'], - 'variables': { - # TODO: Extract common mksnapshot_flags to a separate - # variable. - 'mksnapshot_flags_ignition': [ - '--ignition', - ], - 'conditions': [ - ['v8_random_seed!=0', { - 'mksnapshot_flags_ignition': ['--random-seed', '<(v8_random_seed)'], - }], - ['v8_vector_stores!=0', { - 'mksnapshot_flags_ignition': ['--vector-stores'], - }], - ], - }, - 'conditions': [ - ['want_separate_host_toolset==1', { - 'target_conditions': [ - ['_toolset=="host"', { - 'outputs': ['<(PRODUCT_DIR)/snapshot_blob_ignition_host.bin'], - 'action': [ - '<(mksnapshot_exec)', - '<@(mksnapshot_flags_ignition)', - '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_ignition_host.bin', - '<(embed_script)', - '<(warmup_script)', - ], - }, { - 'outputs': ['<(PRODUCT_DIR)/snapshot_blob_ignition.bin'], - 'action': [ - '<(mksnapshot_exec)', - '<@(mksnapshot_flags_ignition)', - '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_ignition.bin', - '<(embed_script)', - '<(warmup_script)', - ], - }], - ], - }, { - 'outputs': ['<(PRODUCT_DIR)/snapshot_blob_ignition.bin'], - 'action': [ - '<(mksnapshot_exec)', - '<@(mksnapshot_flags_ignition)', - '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_ignition.bin', - '<(embed_script)', - '<(warmup_script)', - ], - }], - ], - }, - ], - }], - ], - 'dependencies': [ - 'v8_base', - ], - 'include_dirs+': [ - '../..', - ], - 'sources': [ - '../../src/snapshot/natives-external.cc', - '../../src/snapshot/snapshot-external.cc', - ], - 'actions': [ - { - 'action_name': 'run_mksnapshot (external)', - 'inputs': ['<(mksnapshot_exec)'], - 'variables': { - 'mksnapshot_flags': [], - 'conditions': [ - ['v8_random_seed!=0', { - 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], - }], - ['v8_vector_stores!=0', { - 'mksnapshot_flags': ['--vector-stores'], - }], - ], - }, - 'conditions': [ - ['want_separate_host_toolset==1', { - 'target_conditions': [ - ['_toolset=="host"', { - 'outputs': ['<(PRODUCT_DIR)/snapshot_blob_host.bin'], - 'action': [ - '<(mksnapshot_exec)', - '<@(mksnapshot_flags)', - '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_host.bin', - '<(embed_script)', - '<(warmup_script)', - ], - }, { - 'outputs': ['<(PRODUCT_DIR)/snapshot_blob.bin'], - 'action': [ - '<(mksnapshot_exec)', - '<@(mksnapshot_flags)', - '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin', - '<(embed_script)', - '<(warmup_script)', - ], - }], - ], - }, { - 'outputs': ['<(PRODUCT_DIR)/snapshot_blob.bin'], - 'action': [ - '<(mksnapshot_exec)', - '<@(mksnapshot_flags)', - '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin', - '<(embed_script)', - '<(warmup_script)', - ], - }], - ], - }, - ], - }], - ], - }, - { - 'target_name': 'v8_base', - 'type': 'static_library', - 'dependencies': [ - 'v8_libbase', - ], - 'variables': { - 'optimize': 'max', - }, - 'include_dirs+': [ - '../..', - # To be able to find base/trace_event/common/trace_event_common.h - '../../..', - ], - 'defines': [ - # TODO(jochen): Remove again after this is globally turned on. - 'V8_IMMINENT_DEPRECATION_WARNINGS', - ], - 'sources': [ ### gcmole(all) ### - '../../include/v8-debug.h', - '../../include/v8-experimental.h', - '../../include/v8-platform.h', - '../../include/v8-profiler.h', - '../../include/v8-testing.h', - '../../include/v8-util.h', - '../../include/v8-version.h', - '../../include/v8.h', - '../../include/v8config.h', - '../../src/accessors.cc', - '../../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-experimental.cc', - '../../src/api-experimental.h', - '../../src/api.cc', - '../../src/api.h', - '../../src/api-arguments.cc', - '../../src/api-arguments.h', - '../../src/api-natives.cc', - '../../src/api-natives.h', - '../../src/arguments.cc', - '../../src/arguments.h', - '../../src/assembler.cc', - '../../src/assembler.h', - '../../src/assert-scope.h', - '../../src/assert-scope.cc', - '../../src/ast/ast-expression-rewriter.cc', - '../../src/ast/ast-expression-rewriter.h', - '../../src/ast/ast-expression-visitor.cc', - '../../src/ast/ast-expression-visitor.h', - '../../src/ast/ast-literal-reindexer.cc', - '../../src/ast/ast-literal-reindexer.h', - '../../src/ast/ast-numbering.cc', - '../../src/ast/ast-numbering.h', - '../../src/ast/ast-value-factory.cc', - '../../src/ast/ast-value-factory.h', - '../../src/ast/ast.cc', - '../../src/ast/ast.h', - '../../src/ast/modules.cc', - '../../src/ast/modules.h', - '../../src/ast/prettyprinter.cc', - '../../src/ast/prettyprinter.h', - '../../src/ast/scopeinfo.cc', - '../../src/ast/scopeinfo.h', - '../../src/ast/scopes.cc', - '../../src/ast/scopes.h', - '../../src/ast/variables.cc', - '../../src/ast/variables.h', - '../../src/atomic-utils.h', - '../../src/background-parsing-task.cc', - '../../src/background-parsing-task.h', - '../../src/bailout-reason.cc', - '../../src/bailout-reason.h', - '../../src/basic-block-profiler.cc', - '../../src/basic-block-profiler.h', - '../../src/bignum-dtoa.cc', - '../../src/bignum-dtoa.h', - '../../src/bignum.cc', - '../../src/bignum.h', - '../../src/bit-vector.cc', - '../../src/bit-vector.h', - '../../src/bootstrapper.cc', - '../../src/bootstrapper.h', - '../../src/builtins.cc', - '../../src/builtins.h', - '../../src/cached-powers.cc', - '../../src/cached-powers.h', - '../../src/cancelable-task.cc', - '../../src/cancelable-task.h', - '../../src/char-predicates.cc', - '../../src/char-predicates-inl.h', - '../../src/char-predicates.h', - '../../src/checks.h', - '../../src/code-factory.cc', - '../../src/code-factory.h', - '../../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/access-builder.cc', - '../../src/compiler/access-builder.h', - '../../src/compiler/access-info.cc', - '../../src/compiler/access-info.h', - '../../src/compiler/all-nodes.cc', - '../../src/compiler/all-nodes.h', - '../../src/compiler/ast-graph-builder.cc', - '../../src/compiler/ast-graph-builder.h', - '../../src/compiler/ast-loop-assignment-analyzer.cc', - '../../src/compiler/ast-loop-assignment-analyzer.h', - '../../src/compiler/basic-block-instrumentor.cc', - '../../src/compiler/basic-block-instrumentor.h', - '../../src/compiler/branch-elimination.cc', - '../../src/compiler/branch-elimination.h', - '../../src/compiler/bytecode-branch-analysis.cc', - '../../src/compiler/bytecode-branch-analysis.h', - '../../src/compiler/bytecode-graph-builder.cc', - '../../src/compiler/bytecode-graph-builder.h', - '../../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', - '../../src/compiler/code-generator.cc', - '../../src/compiler/code-generator.h', - '../../src/compiler/code-stub-assembler.cc', - '../../src/compiler/code-stub-assembler.h', - '../../src/compiler/common-node-cache.cc', - '../../src/compiler/common-node-cache.h', - '../../src/compiler/common-operator-reducer.cc', - '../../src/compiler/common-operator-reducer.h', - '../../src/compiler/common-operator.cc', - '../../src/compiler/common-operator.h', - '../../src/compiler/control-builders.cc', - '../../src/compiler/control-builders.h', - '../../src/compiler/control-equivalence.cc', - '../../src/compiler/control-equivalence.h', - '../../src/compiler/control-flow-optimizer.cc', - '../../src/compiler/control-flow-optimizer.h', - '../../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/frame.cc', - '../../src/compiler/frame.h', - '../../src/compiler/frame-elider.cc', - '../../src/compiler/frame-elider.h', - "../../src/compiler/frame-states.cc", - "../../src/compiler/frame-states.h", - '../../src/compiler/gap-resolver.cc', - '../../src/compiler/gap-resolver.h', - '../../src/compiler/graph-reducer.cc', - '../../src/compiler/graph-reducer.h', - '../../src/compiler/graph-replay.cc', - '../../src/compiler/graph-replay.h', - '../../src/compiler/graph-trimmer.cc', - '../../src/compiler/graph-trimmer.h', - '../../src/compiler/graph-visualizer.cc', - '../../src/compiler/graph-visualizer.h', - '../../src/compiler/graph.cc', - '../../src/compiler/graph.h', - '../../src/compiler/greedy-allocator.cc', - '../../src/compiler/greedy-allocator.h', - '../../src/compiler/instruction-codes.h', - '../../src/compiler/instruction-selector-impl.h', - '../../src/compiler/instruction-selector.cc', - '../../src/compiler/instruction-selector.h', - '../../src/compiler/instruction-scheduler.cc', - '../../src/compiler/instruction-scheduler.h', - '../../src/compiler/instruction.cc', - '../../src/compiler/instruction.h', - '../../src/compiler/int64-lowering.cc', - '../../src/compiler/int64-lowering.h', - '../../src/compiler/js-builtin-reducer.cc', - '../../src/compiler/js-builtin-reducer.h', - '../../src/compiler/js-call-reducer.cc', - '../../src/compiler/js-call-reducer.h', - '../../src/compiler/js-context-specialization.cc', - '../../src/compiler/js-context-specialization.h', - '../../src/compiler/js-create-lowering.cc', - '../../src/compiler/js-create-lowering.h', - '../../src/compiler/js-frame-specialization.cc', - '../../src/compiler/js-frame-specialization.h', - '../../src/compiler/js-generic-lowering.cc', - '../../src/compiler/js-generic-lowering.h', - '../../src/compiler/js-global-object-specialization.cc', - '../../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-intrinsic-lowering.cc', - '../../src/compiler/js-intrinsic-lowering.h', - '../../src/compiler/js-native-context-specialization.cc', - '../../src/compiler/js-native-context-specialization.h', - '../../src/compiler/js-operator.cc', - '../../src/compiler/js-operator.h', - '../../src/compiler/js-typed-lowering.cc', - '../../src/compiler/js-typed-lowering.h', - '../../src/compiler/jump-threading.cc', - '../../src/compiler/jump-threading.h', - '../../src/compiler/linkage.cc', - '../../src/compiler/linkage.h', - '../../src/compiler/liveness-analyzer.cc', - '../../src/compiler/liveness-analyzer.h', - '../../src/compiler/live-range-separator.cc', - '../../src/compiler/live-range-separator.h', - '../../src/compiler/load-elimination.cc', - '../../src/compiler/load-elimination.h', - '../../src/compiler/loop-analysis.cc', - '../../src/compiler/loop-analysis.h', - '../../src/compiler/loop-peeling.cc', - '../../src/compiler/loop-peeling.h', - '../../src/compiler/machine-operator-reducer.cc', - '../../src/compiler/machine-operator-reducer.h', - '../../src/compiler/machine-operator.cc', - '../../src/compiler/machine-operator.h', - '../../src/compiler/move-optimizer.cc', - '../../src/compiler/move-optimizer.h', - '../../src/compiler/node-aux-data.h', - '../../src/compiler/node-cache.cc', - '../../src/compiler/node-cache.h', - '../../src/compiler/node-marker.cc', - '../../src/compiler/node-marker.h', - '../../src/compiler/node-matchers.cc', - '../../src/compiler/node-matchers.h', - '../../src/compiler/node-properties.cc', - '../../src/compiler/node-properties.h', - '../../src/compiler/node.cc', - '../../src/compiler/node.h', - '../../src/compiler/opcodes.cc', - '../../src/compiler/opcodes.h', - '../../src/compiler/operator-properties.cc', - '../../src/compiler/operator-properties.h', - '../../src/compiler/operator.cc', - '../../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/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/representation-change.cc', - '../../src/compiler/representation-change.h', - '../../src/compiler/schedule.cc', - '../../src/compiler/schedule.h', - '../../src/compiler/scheduler.cc', - '../../src/compiler/scheduler.h', - '../../src/compiler/select-lowering.cc', - '../../src/compiler/select-lowering.h', - '../../src/compiler/simplified-lowering.cc', - '../../src/compiler/simplified-lowering.h', - '../../src/compiler/simplified-operator-reducer.cc', - '../../src/compiler/simplified-operator-reducer.h', - '../../src/compiler/simplified-operator.cc', - '../../src/compiler/simplified-operator.h', - '../../src/compiler/source-position.cc', - '../../src/compiler/source-position.h', - '../../src/compiler/state-values-utils.cc', - '../../src/compiler/state-values-utils.h', - '../../src/compiler/tail-call-optimization.cc', - '../../src/compiler/tail-call-optimization.h', - '../../src/compiler/type-hint-analyzer.cc', - '../../src/compiler/type-hint-analyzer.h', - '../../src/compiler/type-hints.cc', - '../../src/compiler/type-hints.h', - '../../src/compiler/typer.cc', - '../../src/compiler/typer.h', - '../../src/compiler/value-numbering-reducer.cc', - '../../src/compiler/value-numbering-reducer.h', - '../../src/compiler/verifier.cc', - '../../src/compiler/verifier.h', - '../../src/compiler/wasm-compiler.cc', - '../../src/compiler/wasm-compiler.h', - '../../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', - '../../src/contexts.cc', - '../../src/contexts.h', - '../../src/conversions-inl.h', - '../../src/conversions.cc', - '../../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-canonicalize.cc', - '../../src/crankshaft/hydrogen-canonicalize.h', - '../../src/crankshaft/hydrogen-check-elimination.cc', - '../../src/crankshaft/hydrogen-check-elimination.h', - '../../src/crankshaft/hydrogen-dce.cc', - '../../src/crankshaft/hydrogen-dce.h', - '../../src/crankshaft/hydrogen-dehoist.cc', - '../../src/crankshaft/hydrogen-dehoist.h', - '../../src/crankshaft/hydrogen-environment-liveness.cc', - '../../src/crankshaft/hydrogen-environment-liveness.h', - '../../src/crankshaft/hydrogen-escape-analysis.cc', - '../../src/crankshaft/hydrogen-escape-analysis.h', - '../../src/crankshaft/hydrogen-flow-engine.h', - '../../src/crankshaft/hydrogen-gvn.cc', - '../../src/crankshaft/hydrogen-gvn.h', - '../../src/crankshaft/hydrogen-infer-representation.cc', - '../../src/crankshaft/hydrogen-infer-representation.h', - '../../src/crankshaft/hydrogen-infer-types.cc', - '../../src/crankshaft/hydrogen-infer-types.h', - '../../src/crankshaft/hydrogen-instructions.cc', - '../../src/crankshaft/hydrogen-instructions.h', - '../../src/crankshaft/hydrogen-load-elimination.cc', - '../../src/crankshaft/hydrogen-load-elimination.h', - '../../src/crankshaft/hydrogen-mark-deoptimize.cc', - '../../src/crankshaft/hydrogen-mark-deoptimize.h', - '../../src/crankshaft/hydrogen-mark-unreachable.cc', - '../../src/crankshaft/hydrogen-mark-unreachable.h', - '../../src/crankshaft/hydrogen-osr.cc', - '../../src/crankshaft/hydrogen-osr.h', - '../../src/crankshaft/hydrogen-range-analysis.cc', - '../../src/crankshaft/hydrogen-range-analysis.h', - '../../src/crankshaft/hydrogen-redundant-phi.cc', - '../../src/crankshaft/hydrogen-redundant-phi.h', - '../../src/crankshaft/hydrogen-removable-simulates.cc', - '../../src/crankshaft/hydrogen-removable-simulates.h', - '../../src/crankshaft/hydrogen-representation-changes.cc', - '../../src/crankshaft/hydrogen-representation-changes.h', - '../../src/crankshaft/hydrogen-sce.cc', - '../../src/crankshaft/hydrogen-sce.h', - '../../src/crankshaft/hydrogen-store-elimination.cc', - '../../src/crankshaft/hydrogen-store-elimination.h', - '../../src/crankshaft/hydrogen-types.cc', - '../../src/crankshaft/hydrogen-types.h', - '../../src/crankshaft/hydrogen-uint32-analysis.cc', - '../../src/crankshaft/hydrogen-uint32-analysis.h', - '../../src/crankshaft/hydrogen.cc', - '../../src/crankshaft/hydrogen.h', - '../../src/crankshaft/lithium-allocator-inl.h', - '../../src/crankshaft/lithium-allocator.cc', - '../../src/crankshaft/lithium-allocator.h', - '../../src/crankshaft/lithium-codegen.cc', - '../../src/crankshaft/lithium-codegen.h', - '../../src/crankshaft/lithium.cc', - '../../src/crankshaft/lithium.h', - '../../src/crankshaft/lithium-inl.h', - '../../src/crankshaft/typing.cc', - '../../src/crankshaft/typing.h', - '../../src/crankshaft/unique.h', - '../../src/date.cc', - '../../src/date.h', - '../../src/dateparser-inl.h', - '../../src/dateparser.cc', - '../../src/dateparser.h', - '../../src/debug/debug-evaluate.cc', - '../../src/debug/debug-evaluate.h', - '../../src/debug/debug-frames.cc', - '../../src/debug/debug-frames.h', - '../../src/debug/debug-scopes.cc', - '../../src/debug/debug-scopes.h', - '../../src/debug/debug.cc', - '../../src/debug/debug.h', - '../../src/debug/liveedit.cc', - '../../src/debug/liveedit.h', - '../../src/deoptimizer.cc', - '../../src/deoptimizer.h', - '../../src/disasm.h', - '../../src/disassembler.cc', - '../../src/disassembler.h', - '../../src/diy-fp.cc', - '../../src/diy-fp.h', - '../../src/double.h', - '../../src/dtoa.cc', - '../../src/dtoa.h', - '../../src/effects.h', - '../../src/elements-kind.cc', - '../../src/elements-kind.h', - '../../src/elements.cc', - '../../src/elements.h', - '../../src/execution.cc', - '../../src/execution.h', - '../../src/extensions/externalize-string-extension.cc', - '../../src/extensions/externalize-string-extension.h', - '../../src/extensions/free-buffer-extension.cc', - '../../src/extensions/free-buffer-extension.h', - '../../src/extensions/gc-extension.cc', - '../../src/extensions/gc-extension.h', - '../../src/extensions/statistics-extension.cc', - '../../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-type.cc', - '../../src/field-type.h', - '../../src/fixed-dtoa.cc', - '../../src/fixed-dtoa.h', - '../../src/flag-definitions.h', - '../../src/flags.cc', - '../../src/flags.h', - '../../src/frames-inl.h', - '../../src/frames.cc', - '../../src/frames.h', - '../../src/full-codegen/full-codegen.cc', - '../../src/full-codegen/full-codegen.h', - '../../src/futex-emulation.cc', - '../../src/futex-emulation.h', - '../../src/gdb-jit.cc', - '../../src/gdb-jit.h', - '../../src/global-handles.cc', - '../../src/global-handles.h', - '../../src/globals.h', - '../../src/handles-inl.h', - '../../src/handles.cc', - '../../src/handles.h', - '../../src/hashmap.h', - '../../src/heap-symbols.h', - '../../src/heap/array-buffer-tracker.cc', - '../../src/heap/array-buffer-tracker.h', - '../../src/heap/memory-reducer.cc', - '../../src/heap/memory-reducer.h', - '../../src/heap/gc-idle-time-handler.cc', - '../../src/heap/gc-idle-time-handler.h', - '../../src/heap/gc-tracer.cc', - '../../src/heap/gc-tracer.h', - '../../src/heap/heap-inl.h', - '../../src/heap/heap.cc', - '../../src/heap/heap.h', - '../../src/heap/incremental-marking-inl.h', - '../../src/heap/incremental-marking-job.cc', - '../../src/heap/incremental-marking-job.h', - '../../src/heap/incremental-marking.cc', - '../../src/heap/incremental-marking.h', - '../../src/heap/mark-compact-inl.h', - '../../src/heap/mark-compact.cc', - '../../src/heap/mark-compact.h', - '../../src/heap/object-stats.cc', - '../../src/heap/object-stats.h', - '../../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/scavenger-inl.h', - '../../src/heap/scavenger.cc', - '../../src/heap/scavenger.h', - '../../src/heap/slot-set.h', - '../../src/heap/spaces-inl.h', - '../../src/heap/spaces.cc', - '../../src/heap/spaces.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-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/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', - '../../src/interpreter/bytecode-array-iterator.h', - '../../src/interpreter/bytecode-register-allocator.cc', - '../../src/interpreter/bytecode-register-allocator.h', - '../../src/interpreter/bytecode-generator.cc', - '../../src/interpreter/bytecode-generator.h', - '../../src/interpreter/bytecode-traits.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/interpreter-intrinsics.cc', - '../../src/interpreter/interpreter-intrinsics.h', - '../../src/interpreter/source-position-table.cc', - '../../src/interpreter/source-position-table.h', - '../../src/isolate-inl.h', - '../../src/isolate.cc', - '../../src/isolate.h', - '../../src/json-parser.h', - '../../src/json-stringifier.h', - '../../src/keys.h', - '../../src/keys.cc', - '../../src/layout-descriptor-inl.h', - '../../src/layout-descriptor.cc', - '../../src/layout-descriptor.h', - '../../src/list-inl.h', - '../../src/list.h', - '../../src/locked-queue-inl.h', - '../../src/locked-queue.h', - '../../src/log-inl.h', - '../../src/log-utils.cc', - '../../src/log-utils.h', - '../../src/log.cc', - '../../src/log.h', - '../../src/lookup.cc', - '../../src/lookup.h', - '../../src/macro-assembler.h', - '../../src/machine-type.cc', - '../../src/machine-type.h', - '../../src/messages.cc', - '../../src/messages.h', - '../../src/msan.h', - '../../src/objects-body-descriptors-inl.h', - '../../src/objects-body-descriptors.h', - '../../src/objects-debug.cc', - '../../src/objects-inl.h', - '../../src/objects-printer.cc', - '../../src/objects.cc', - '../../src/objects.h', - '../../src/optimizing-compile-dispatcher.cc', - '../../src/optimizing-compile-dispatcher.h', - '../../src/ostreams.cc', - '../../src/ostreams.h', - '../../src/parsing/expression-classifier.h', - '../../src/parsing/func-name-inferrer.cc', - '../../src/parsing/func-name-inferrer.h', - '../../src/parsing/parameter-initializer-rewriter.cc', - '../../src/parsing/parameter-initializer-rewriter.h', - '../../src/parsing/parser-base.h', - '../../src/parsing/parser.cc', - '../../src/parsing/parser.h', - '../../src/parsing/pattern-rewriter.cc', - '../../src/parsing/preparse-data-format.h', - '../../src/parsing/preparse-data.cc', - '../../src/parsing/preparse-data.h', - '../../src/parsing/preparser.cc', - '../../src/parsing/preparser.h', - '../../src/parsing/rewriter.cc', - '../../src/parsing/rewriter.h', - '../../src/parsing/scanner-character-streams.cc', - '../../src/parsing/scanner-character-streams.h', - '../../src/parsing/scanner.cc', - '../../src/parsing/scanner.h', - '../../src/parsing/token.cc', - '../../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', - '../../src/profiler/circular-queue.h', - '../../src/profiler/cpu-profiler-inl.h', - '../../src/profiler/cpu-profiler.cc', - '../../src/profiler/cpu-profiler.h', - '../../src/profiler/heap-profiler.cc', - '../../src/profiler/heap-profiler.h', - '../../src/profiler/heap-snapshot-generator-inl.h', - '../../src/profiler/heap-snapshot-generator.cc', - '../../src/profiler/heap-snapshot-generator.h', - '../../src/profiler/profile-generator-inl.h', - '../../src/profiler/profile-generator.cc', - '../../src/profiler/profile-generator.h', - '../../src/profiler/sampler.cc', - '../../src/profiler/sampler.h', - '../../src/profiler/sampling-heap-profiler.cc', - '../../src/profiler/sampling-heap-profiler.h', - '../../src/profiler/strings-storage.cc', - '../../src/profiler/strings-storage.h', - '../../src/profiler/unbound-queue-inl.h', - '../../src/profiler/unbound-queue.h', - '../../src/property-descriptor.cc', - '../../src/property-descriptor.h', - '../../src/property-details.h', - '../../src/property.cc', - '../../src/property.h', - '../../src/prototype.h', - '../../src/regexp/bytecodes-irregexp.h', - '../../src/regexp/interpreter-irregexp.cc', - '../../src/regexp/interpreter-irregexp.h', - '../../src/regexp/jsregexp-inl.h', - '../../src/regexp/jsregexp.cc', - '../../src/regexp/jsregexp.h', - '../../src/regexp/regexp-ast.cc', - '../../src/regexp/regexp-ast.h', - '../../src/regexp/regexp-macro-assembler-irregexp-inl.h', - '../../src/regexp/regexp-macro-assembler-irregexp.cc', - '../../src/regexp/regexp-macro-assembler-irregexp.h', - '../../src/regexp/regexp-macro-assembler-tracer.cc', - '../../src/regexp/regexp-macro-assembler-tracer.h', - '../../src/regexp/regexp-macro-assembler.cc', - '../../src/regexp/regexp-macro-assembler.h', - '../../src/regexp/regexp-parser.cc', - '../../src/regexp/regexp-parser.h', - '../../src/regexp/regexp-stack.cc', - '../../src/regexp/regexp-stack.h', - '../../src/register-configuration.cc', - '../../src/register-configuration.h', - '../../src/runtime-profiler.cc', - '../../src/runtime-profiler.h', - '../../src/runtime/runtime-array.cc', - '../../src/runtime/runtime-atomics.cc', - '../../src/runtime/runtime-classes.cc', - '../../src/runtime/runtime-collections.cc', - '../../src/runtime/runtime-compiler.cc', - '../../src/runtime/runtime-date.cc', - '../../src/runtime/runtime-debug.cc', - '../../src/runtime/runtime-forin.cc', - '../../src/runtime/runtime-function.cc', - '../../src/runtime/runtime-futex.cc', - '../../src/runtime/runtime-generator.cc', - '../../src/runtime/runtime-i18n.cc', - '../../src/runtime/runtime-internal.cc', - '../../src/runtime/runtime-interpreter.cc', - '../../src/runtime/runtime-json.cc', - '../../src/runtime/runtime-literals.cc', - '../../src/runtime/runtime-liveedit.cc', - '../../src/runtime/runtime-maths.cc', - '../../src/runtime/runtime-numbers.cc', - '../../src/runtime/runtime-object.cc', - '../../src/runtime/runtime-observe.cc', - '../../src/runtime/runtime-operators.cc', - '../../src/runtime/runtime-proxy.cc', - '../../src/runtime/runtime-regexp.cc', - '../../src/runtime/runtime-scopes.cc', - '../../src/runtime/runtime-simd.cc', - '../../src/runtime/runtime-strings.cc', - '../../src/runtime/runtime-symbol.cc', - '../../src/runtime/runtime-test.cc', - '../../src/runtime/runtime-typedarray.cc', - '../../src/runtime/runtime-uri.cc', - '../../src/runtime/runtime-utils.h', - '../../src/runtime/runtime.cc', - '../../src/runtime/runtime.h', - '../../src/safepoint-table.cc', - '../../src/safepoint-table.h', - '../../src/signature.h', - '../../src/simulator.h', - '../../src/small-pointer-list.h', - '../../src/snapshot/code-serializer.cc', - '../../src/snapshot/code-serializer.h', - '../../src/snapshot/deserializer.cc', - '../../src/snapshot/deserializer.h', - '../../src/snapshot/natives.h', - '../../src/snapshot/natives-common.cc', - '../../src/snapshot/partial-serializer.cc', - '../../src/snapshot/partial-serializer.h', - '../../src/snapshot/serializer.cc', - '../../src/snapshot/serializer.h', - '../../src/snapshot/serializer-common.cc', - '../../src/snapshot/serializer-common.h', - '../../src/snapshot/snapshot.h', - '../../src/snapshot/snapshot-common.cc', - '../../src/snapshot/snapshot-source-sink.cc', - '../../src/snapshot/snapshot-source-sink.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/startup-data-util.cc', - '../../src/startup-data-util.h', - '../../src/string-builder.cc', - '../../src/string-builder.h', - '../../src/string-search.h', - '../../src/string-stream.cc', - '../../src/string-stream.h', - '../../src/strtod.cc', - '../../src/strtod.h', - '../../src/ic/stub-cache.cc', - '../../src/ic/stub-cache.h', - '../../src/tracing/trace-event.cc', - '../../src/tracing/trace-event.h', - '../../src/transitions-inl.h', - '../../src/transitions.cc', - '../../src/transitions.h', - '../../src/type-cache.cc', - '../../src/type-cache.h', - '../../src/type-feedback-vector-inl.h', - '../../src/type-feedback-vector.cc', - '../../src/type-feedback-vector.h', - '../../src/type-info.cc', - '../../src/type-info.h', - '../../src/types.cc', - '../../src/types.h', - '../../src/typing-asm.cc', - '../../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/utils-inl.h', - '../../src/utils.cc', - '../../src/utils.h', - '../../src/v8.cc', - '../../src/v8.h', - '../../src/v8memory.h', - '../../src/v8threads.cc', - '../../src/v8threads.h', - '../../src/vector.h', - '../../src/version.cc', - '../../src/version.h', - '../../src/vm-state-inl.h', - '../../src/vm-state.h', - '../../src/wasm/asm-wasm-builder.cc', - '../../src/wasm/asm-wasm-builder.h', - '../../src/wasm/ast-decoder.cc', - '../../src/wasm/ast-decoder.h', - '../../src/wasm/decoder.h', - '../../src/wasm/encoder.cc', - '../../src/wasm/encoder.h', - '../../src/wasm/module-decoder.cc', - '../../src/wasm/module-decoder.h', - '../../src/wasm/wasm-js.cc', - '../../src/wasm/wasm-js.h', - '../../src/wasm/wasm-macro-gen.h', - '../../src/wasm/wasm-module.cc', - '../../src/wasm/wasm-module.h', - '../../src/wasm/wasm-opcodes.cc', - '../../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', - ], - 'conditions': [ - ['want_separate_host_toolset==1', { - 'toolsets': ['host', 'target'], - }, { - 'toolsets': ['target'], - }], - ['v8_target_arch=="arm"', { - 'sources': [ ### gcmole(arch:arm) ### - '../../src/arm/assembler-arm-inl.h', - '../../src/arm/assembler-arm.cc', - '../../src/arm/assembler-arm.h', - '../../src/arm/builtins-arm.cc', - '../../src/arm/code-stubs-arm.cc', - '../../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/cpu-arm.cc', - '../../src/arm/deoptimizer-arm.cc', - '../../src/arm/disasm-arm.cc', - '../../src/arm/frames-arm.cc', - '../../src/arm/frames-arm.h', - '../../src/arm/interface-descriptors-arm.cc', - '../../src/arm/interface-descriptors-arm.h', - '../../src/arm/macro-assembler-arm.cc', - '../../src/arm/macro-assembler-arm.h', - '../../src/arm/simulator-arm.cc', - '../../src/arm/simulator-arm.h', - '../../src/compiler/arm/code-generator-arm.cc', - '../../src/compiler/arm/instruction-codes-arm.h', - '../../src/compiler/arm/instruction-scheduler-arm.cc', - '../../src/compiler/arm/instruction-selector-arm.cc', - '../../src/crankshaft/arm/lithium-arm.cc', - '../../src/crankshaft/arm/lithium-arm.h', - '../../src/crankshaft/arm/lithium-codegen-arm.cc', - '../../src/crankshaft/arm/lithium-codegen-arm.h', - '../../src/crankshaft/arm/lithium-gap-resolver-arm.cc', - '../../src/crankshaft/arm/lithium-gap-resolver-arm.h', - '../../src/debug/arm/debug-arm.cc', - '../../src/full-codegen/arm/full-codegen-arm.cc', - '../../src/ic/arm/access-compiler-arm.cc', - '../../src/ic/arm/handler-compiler-arm.cc', - '../../src/ic/arm/ic-arm.cc', - '../../src/ic/arm/ic-compiler-arm.cc', - '../../src/ic/arm/stub-cache-arm.cc', - '../../src/regexp/arm/regexp-macro-assembler-arm.cc', - '../../src/regexp/arm/regexp-macro-assembler-arm.h', - ], - }], - ['v8_target_arch=="arm64"', { - 'sources': [ ### gcmole(arch:arm64) ### - '../../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/constants-arm64.h', - '../../src/arm64/cpu-arm64.cc', - '../../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', - '../../src/arm64/frames-arm64.cc', - '../../src/arm64/frames-arm64.h', - '../../src/arm64/instructions-arm64.cc', - '../../src/arm64/instructions-arm64.h', - '../../src/arm64/instrument-arm64.cc', - '../../src/arm64/instrument-arm64.h', - '../../src/arm64/interface-descriptors-arm64.cc', - '../../src/arm64/interface-descriptors-arm64.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', - '../../src/arm64/utils-arm64.h', - '../../src/compiler/arm64/code-generator-arm64.cc', - '../../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.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', - '../../src/crankshaft/arm64/lithium-codegen-arm64.h', - '../../src/crankshaft/arm64/lithium-gap-resolver-arm64.cc', - '../../src/crankshaft/arm64/lithium-gap-resolver-arm64.h', - '../../src/debug/arm64/debug-arm64.cc', - '../../src/full-codegen/arm64/full-codegen-arm64.cc', - '../../src/ic/arm64/access-compiler-arm64.cc', - '../../src/ic/arm64/handler-compiler-arm64.cc', - '../../src/ic/arm64/ic-arm64.cc', - '../../src/ic/arm64/ic-compiler-arm64.cc', - '../../src/ic/arm64/stub-cache-arm64.cc', - '../../src/regexp/arm64/regexp-macro-assembler-arm64.cc', - '../../src/regexp/arm64/regexp-macro-assembler-arm64.h', - ], - }], - ['v8_target_arch=="ia32"', { - 'sources': [ ### gcmole(arch:ia32) ### - '../../src/ia32/assembler-ia32-inl.h', - '../../src/ia32/assembler-ia32.cc', - '../../src/ia32/assembler-ia32.h', - '../../src/ia32/builtins-ia32.cc', - '../../src/ia32/code-stubs-ia32.cc', - '../../src/ia32/code-stubs-ia32.h', - '../../src/ia32/codegen-ia32.cc', - '../../src/ia32/codegen-ia32.h', - '../../src/ia32/cpu-ia32.cc', - '../../src/ia32/deoptimizer-ia32.cc', - '../../src/ia32/disasm-ia32.cc', - '../../src/ia32/frames-ia32.cc', - '../../src/ia32/frames-ia32.h', - '../../src/ia32/interface-descriptors-ia32.cc', - '../../src/ia32/macro-assembler-ia32.cc', - '../../src/ia32/macro-assembler-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/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/debug/ia32/debug-ia32.cc', - '../../src/full-codegen/ia32/full-codegen-ia32.cc', - '../../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/stub-cache-ia32.cc', - '../../src/regexp/ia32/regexp-macro-assembler-ia32.cc', - '../../src/regexp/ia32/regexp-macro-assembler-ia32.h', - ], - }], - ['v8_target_arch=="x87"', { - 'sources': [ ### gcmole(arch:x87) ### - '../../src/x87/assembler-x87-inl.h', - '../../src/x87/assembler-x87.cc', - '../../src/x87/assembler-x87.h', - '../../src/x87/builtins-x87.cc', - '../../src/x87/code-stubs-x87.cc', - '../../src/x87/code-stubs-x87.h', - '../../src/x87/codegen-x87.cc', - '../../src/x87/codegen-x87.h', - '../../src/x87/cpu-x87.cc', - '../../src/x87/deoptimizer-x87.cc', - '../../src/x87/disasm-x87.cc', - '../../src/x87/frames-x87.cc', - '../../src/x87/frames-x87.h', - '../../src/x87/interface-descriptors-x87.cc', - '../../src/x87/macro-assembler-x87.cc', - '../../src/x87/macro-assembler-x87.h', - '../../src/compiler/x87/code-generator-x87.cc', - '../../src/compiler/x87/instruction-codes-x87.h', - '../../src/compiler/x87/instruction-scheduler-x87.cc', - '../../src/compiler/x87/instruction-selector-x87.cc', - '../../src/crankshaft/x87/lithium-codegen-x87.cc', - '../../src/crankshaft/x87/lithium-codegen-x87.h', - '../../src/crankshaft/x87/lithium-gap-resolver-x87.cc', - '../../src/crankshaft/x87/lithium-gap-resolver-x87.h', - '../../src/crankshaft/x87/lithium-x87.cc', - '../../src/crankshaft/x87/lithium-x87.h', - '../../src/debug/x87/debug-x87.cc', - '../../src/full-codegen/x87/full-codegen-x87.cc', - '../../src/ic/x87/access-compiler-x87.cc', - '../../src/ic/x87/handler-compiler-x87.cc', - '../../src/ic/x87/ic-x87.cc', - '../../src/ic/x87/ic-compiler-x87.cc', - '../../src/ic/x87/stub-cache-x87.cc', - '../../src/regexp/x87/regexp-macro-assembler-x87.cc', - '../../src/regexp/x87/regexp-macro-assembler-x87.h', - ], - }], - ['v8_target_arch=="mips" or v8_target_arch=="mipsel"', { - 'sources': [ ### gcmole(arch:mipsel) ### - '../../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/constants-mips.cc', - '../../src/mips/constants-mips.h', - '../../src/mips/cpu-mips.cc', - '../../src/mips/deoptimizer-mips.cc', - '../../src/mips/disasm-mips.cc', - '../../src/mips/frames-mips.cc', - '../../src/mips/frames-mips.h', - '../../src/mips/interface-descriptors-mips.cc', - '../../src/mips/macro-assembler-mips.cc', - '../../src/mips/macro-assembler-mips.h', - '../../src/mips/simulator-mips.cc', - '../../src/mips/simulator-mips.h', - '../../src/compiler/mips/code-generator-mips.cc', - '../../src/compiler/mips/instruction-codes-mips.h', - '../../src/compiler/mips/instruction-scheduler-mips.cc', - '../../src/compiler/mips/instruction-selector-mips.cc', - '../../src/crankshaft/mips/lithium-codegen-mips.cc', - '../../src/crankshaft/mips/lithium-codegen-mips.h', - '../../src/crankshaft/mips/lithium-gap-resolver-mips.cc', - '../../src/crankshaft/mips/lithium-gap-resolver-mips.h', - '../../src/crankshaft/mips/lithium-mips.cc', - '../../src/crankshaft/mips/lithium-mips.h', - '../../src/full-codegen/mips/full-codegen-mips.cc', - '../../src/debug/mips/debug-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/stub-cache-mips.cc', - '../../src/regexp/mips/regexp-macro-assembler-mips.cc', - '../../src/regexp/mips/regexp-macro-assembler-mips.h', - ], - }], - ['v8_target_arch=="mips64" or v8_target_arch=="mips64el"', { - 'sources': [ ### gcmole(arch:mips64el) ### - '../../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/constants-mips64.cc', - '../../src/mips64/constants-mips64.h', - '../../src/mips64/cpu-mips64.cc', - '../../src/mips64/deoptimizer-mips64.cc', - '../../src/mips64/disasm-mips64.cc', - '../../src/mips64/frames-mips64.cc', - '../../src/mips64/frames-mips64.h', - '../../src/mips64/interface-descriptors-mips64.cc', - '../../src/mips64/macro-assembler-mips64.cc', - '../../src/mips64/macro-assembler-mips64.h', - '../../src/mips64/simulator-mips64.cc', - '../../src/mips64/simulator-mips64.h', - '../../src/compiler/mips64/code-generator-mips64.cc', - '../../src/compiler/mips64/instruction-codes-mips64.h', - '../../src/compiler/mips64/instruction-scheduler-mips64.cc', - '../../src/compiler/mips64/instruction-selector-mips64.cc', - '../../src/crankshaft/mips64/lithium-codegen-mips64.cc', - '../../src/crankshaft/mips64/lithium-codegen-mips64.h', - '../../src/crankshaft/mips64/lithium-gap-resolver-mips64.cc', - '../../src/crankshaft/mips64/lithium-gap-resolver-mips64.h', - '../../src/crankshaft/mips64/lithium-mips64.cc', - '../../src/crankshaft/mips64/lithium-mips64.h', - '../../src/debug/mips64/debug-mips64.cc', - '../../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/stub-cache-mips64.cc', - '../../src/regexp/mips64/regexp-macro-assembler-mips64.cc', - '../../src/regexp/mips64/regexp-macro-assembler-mips64.h', - ], - }], - ['v8_target_arch=="x64" or v8_target_arch=="x32"', { - 'sources': [ ### gcmole(arch:x64) ### - '../../src/crankshaft/x64/lithium-codegen-x64.cc', - '../../src/crankshaft/x64/lithium-codegen-x64.h', - '../../src/crankshaft/x64/lithium-gap-resolver-x64.cc', - '../../src/crankshaft/x64/lithium-gap-resolver-x64.h', - '../../src/crankshaft/x64/lithium-x64.cc', - '../../src/crankshaft/x64/lithium-x64.h', - '../../src/x64/assembler-x64-inl.h', - '../../src/x64/assembler-x64.cc', - '../../src/x64/assembler-x64.h', - '../../src/x64/builtins-x64.cc', - '../../src/x64/code-stubs-x64.cc', - '../../src/x64/code-stubs-x64.h', - '../../src/x64/codegen-x64.cc', - '../../src/x64/codegen-x64.h', - '../../src/x64/cpu-x64.cc', - '../../src/x64/deoptimizer-x64.cc', - '../../src/x64/disasm-x64.cc', - '../../src/x64/frames-x64.cc', - '../../src/x64/frames-x64.h', - '../../src/x64/interface-descriptors-x64.cc', - '../../src/x64/macro-assembler-x64.cc', - '../../src/x64/macro-assembler-x64.h', - '../../src/debug/x64/debug-x64.cc', - '../../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/stub-cache-x64.cc', - '../../src/regexp/x64/regexp-macro-assembler-x64.cc', - '../../src/regexp/x64/regexp-macro-assembler-x64.h', - ], - }], - ['v8_target_arch=="x64"', { - 'sources': [ - '../../src/compiler/x64/code-generator-x64.cc', - '../../src/compiler/x64/instruction-codes-x64.h', - '../../src/compiler/x64/instruction-scheduler-x64.cc', - '../../src/compiler/x64/instruction-selector-x64.cc', - ], - }], - ['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', { - 'sources': [ ### gcmole(arch:ppc) ### - '../../src/compiler/ppc/code-generator-ppc.cc', - '../../src/compiler/ppc/instruction-codes-ppc.h', - '../../src/compiler/ppc/instruction-scheduler-ppc.cc', - '../../src/compiler/ppc/instruction-selector-ppc.cc', - '../../src/crankshaft/ppc/lithium-ppc.cc', - '../../src/crankshaft/ppc/lithium-ppc.h', - '../../src/crankshaft/ppc/lithium-codegen-ppc.cc', - '../../src/crankshaft/ppc/lithium-codegen-ppc.h', - '../../src/crankshaft/ppc/lithium-gap-resolver-ppc.cc', - '../../src/crankshaft/ppc/lithium-gap-resolver-ppc.h', - '../../src/debug/ppc/debug-ppc.cc', - '../../src/full-codegen/ppc/full-codegen-ppc.cc', - '../../src/ic/ppc/access-compiler-ppc.cc', - '../../src/ic/ppc/handler-compiler-ppc.cc', - '../../src/ic/ppc/ic-ppc.cc', - '../../src/ic/ppc/ic-compiler-ppc.cc', - '../../src/ic/ppc/stub-cache-ppc.cc', - '../../src/ppc/assembler-ppc-inl.h', - '../../src/ppc/assembler-ppc.cc', - '../../src/ppc/assembler-ppc.h', - '../../src/ppc/builtins-ppc.cc', - '../../src/ppc/code-stubs-ppc.cc', - '../../src/ppc/code-stubs-ppc.h', - '../../src/ppc/codegen-ppc.cc', - '../../src/ppc/codegen-ppc.h', - '../../src/ppc/constants-ppc.h', - '../../src/ppc/constants-ppc.cc', - '../../src/ppc/cpu-ppc.cc', - '../../src/ppc/deoptimizer-ppc.cc', - '../../src/ppc/disasm-ppc.cc', - '../../src/ppc/frames-ppc.cc', - '../../src/ppc/frames-ppc.h', - '../../src/ppc/interface-descriptors-ppc.cc', - '../../src/ppc/macro-assembler-ppc.cc', - '../../src/ppc/macro-assembler-ppc.h', - '../../src/ppc/simulator-ppc.cc', - '../../src/ppc/simulator-ppc.h', - '../../src/regexp/ppc/regexp-macro-assembler-ppc.cc', - '../../src/regexp/ppc/regexp-macro-assembler-ppc.h', - ], - }], - ['v8_target_arch=="s390" or v8_target_arch=="s390x"', { - 'sources': [ ### gcmole(arch:s390) ### - '../../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.cc', - '../../src/s390/assembler-s390.h', - '../../src/s390/assembler-s390-inl.h', - '../../src/s390/builtins-s390.cc', - '../../src/s390/codegen-s390.cc', - '../../src/s390/codegen-s390.h', - '../../src/s390/code-stubs-s390.cc', - '../../src/s390/code-stubs-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', - ], - }], - ['OS=="win"', { - 'variables': { - 'gyp_generators': ' - - - - - -

+ + + +

I C E -

- Your IC-Explorer. -

Usage

- Run your script with --trace_ic and upload on this page:
- /path/to/d8 --trace_ic your_script.js > trace.txt -

Data

-
-

- - trace entries: 0 -

-
-

Result

+ Your IC-Explorer. +

Usage

Run your script with --trace_ic and upload on this page:
+ /path/to/d8 --trace_ic your_script.js > trace.txt +

Data

+

+ trace + entries: 0 +

+
+

Result

+

Group-Key: -

-

- - - -
-

- +

+

+ + + +
+

+ + diff --git a/deps/v8/tools/ignition/bytecode_dispatches_report.py b/deps/v8/tools/ignition/bytecode_dispatches_report.py new file mode 100755 index 00000000000000..1c140141f0dd39 --- /dev/null +++ b/deps/v8/tools/ignition/bytecode_dispatches_report.py @@ -0,0 +1,258 @@ +#! /usr/bin/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. +# + +import argparse +import heapq +import json +from matplotlib import colors +from matplotlib import pyplot +import numpy +import struct + + +__DESCRIPTION = """ +Process v8.ignition_dispatches_counters.json and list top counters, +or plot a dispatch heatmap. + +Please note that those handlers that may not or will never dispatch +(e.g. Return or Throw) do not show up in the results. +""" + + +__HELP_EPILOGUE = """ +examples: + # Print the hottest bytecodes in descending order, reading from + # default filename v8.ignition_dispatches_counters.json (default mode) + $ tools/ignition/bytecode_dispatches_report.py + + # Print the hottest 15 bytecode dispatch pairs reading from data.json + $ tools/ignition/bytecode_dispatches_report.py -t -n 15 data.json + + # Save heatmap to default filename v8.ignition_dispatches_counters.svg + $ tools/ignition/bytecode_dispatches_report.py -p + + # Save heatmap to filename data.svg + $ tools/ignition/bytecode_dispatches_report.py -p -o data.svg + + # Open the heatmap in an interactive viewer + $ tools/ignition/bytecode_dispatches_report.py -p -i + + # Display the top 5 sources and destinations of dispatches to/from LdaZero + $ tools/ignition/bytecode_dispatches_report.py -f LdaZero -n 5 +""" + +__COUNTER_BITS = struct.calcsize("P") * 8 # Size in bits of a pointer +__COUNTER_MAX = 2**__COUNTER_BITS - 1 + + +def warn_if_counter_may_have_saturated(dispatches_table): + for source, counters_from_source in dispatches_table.items(): + for destination, counter in counters_from_source.items(): + if counter == __COUNTER_MAX: + print "WARNING: {} -> {} may have saturated.".format(source, + destination) + + +def find_top_bytecode_dispatch_pairs(dispatches_table, top_count): + def flattened_counters_generator(): + for source, counters_from_source in dispatches_table.items(): + for destination, counter in counters_from_source.items(): + yield source, destination, counter + + return heapq.nlargest(top_count, flattened_counters_generator(), + key=lambda x: x[2]) + + +def print_top_bytecode_dispatch_pairs(dispatches_table, top_count): + top_bytecode_dispatch_pairs = ( + find_top_bytecode_dispatch_pairs(dispatches_table, top_count)) + print "Top {} bytecode dispatch pairs:".format(top_count) + for source, destination, counter in top_bytecode_dispatch_pairs: + print "{:>12d}\t{} -> {}".format(counter, source, destination) + + +def find_top_bytecodes(dispatches_table): + top_bytecodes = [] + for bytecode, counters_from_bytecode in dispatches_table.items(): + top_bytecodes.append((bytecode, sum(counters_from_bytecode.values()))) + top_bytecodes.sort(key=lambda x: x[1], reverse=True) + return top_bytecodes + + +def print_top_bytecodes(dispatches_table): + top_bytecodes = find_top_bytecodes(dispatches_table) + print "Top bytecodes:" + for bytecode, counter in top_bytecodes: + print "{:>12d}\t{}".format(counter, bytecode) + + +def find_top_dispatch_sources(dispatches_table, destination, top_count): + def source_counters_generator(): + for source, table_row in dispatches_table.items(): + if destination in table_row: + yield source, table_row[destination] + + return heapq.nlargest(top_count, source_counters_generator(), + key=lambda x: x[1]) + + +def print_top_dispatch_sources_and_destinations(dispatches_table, bytecode, + top_count): + top_sources = find_top_dispatch_sources(dispatches_table, bytecode, top_count) + top_destinations = heapq.nlargest(top_count, + dispatches_table[bytecode].items(), + key=lambda x: x[1]) + + print "Top sources of dispatches to {}:".format(bytecode) + for source_name, counter in top_sources: + print "{:>12d}\t{}".format(counter, source_name) + + print "\nTop destinations of dispatches from {}:".format(bytecode) + for destination_name, counter in top_destinations: + print "{:>12d}\t{}".format(counter, destination_name) + + +def build_counters_matrix(dispatches_table): + labels = sorted(dispatches_table.keys()) + + counters_matrix = numpy.empty([len(labels), len(labels)], dtype=int) + for from_index, from_name in enumerate(labels): + current_row = dispatches_table[from_name]; + for to_index, to_name in enumerate(labels): + counters_matrix[from_index, to_index] = current_row.get(to_name, 0) + + # Reverse y axis for a nicer appearance + xlabels = labels + ylabels = list(reversed(xlabels)) + counters_matrix = numpy.flipud(counters_matrix) + + return counters_matrix, xlabels, ylabels + + +def plot_dispatches_table(dispatches_table, figure, axis): + counters_matrix, xlabels, ylabels = build_counters_matrix(dispatches_table) + + image = axis.pcolor( + counters_matrix, + cmap="jet", + norm=colors.LogNorm(), + edgecolor="grey", + linestyle="dotted", + linewidth=0.5 + ) + + axis.xaxis.set( + ticks=numpy.arange(0.5, len(xlabels)), + label="From bytecode handler" + ) + axis.xaxis.tick_top() + axis.set_xlim(0, len(xlabels)) + axis.set_xticklabels(xlabels, rotation="vertical") + + axis.yaxis.set( + ticks=numpy.arange(0.5, len(ylabels)), + label="To bytecode handler", + ticklabels=ylabels + ) + axis.set_ylim(0, len(ylabels)) + + figure.colorbar( + image, + ax=axis, + fraction=0.01, + pad=0.01 + ) + + +def parse_command_line(): + command_line_parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description=__DESCRIPTION, + epilog=__HELP_EPILOGUE + ) + command_line_parser.add_argument( + "--plot-size", "-s", + metavar="N", + default=30, + help="shorter side in inches of the output plot (default 30)" + ) + command_line_parser.add_argument( + "--plot", "-p", + action="store_true", + help="plot dispatch pairs heatmap" + ) + command_line_parser.add_argument( + "--interactive", "-i", + action="store_true", + help="open the heatmap in an interactive viewer, instead of writing to file" + ) + command_line_parser.add_argument( + "--top-bytecode-dispatch-pairs", "-t", + action="store_true", + help="print the top bytecode dispatch pairs" + ) + command_line_parser.add_argument( + "--top-entries-count", "-n", + metavar="N", + type=int, + default=10, + help="print N top entries when running with -t or -f (default 10)" + ) + command_line_parser.add_argument( + "--top-dispatches-for-bytecode", "-f", + metavar="", + help="print top dispatch sources and destinations to the specified bytecode" + ) + command_line_parser.add_argument( + "--output-filename", "-o", + metavar="", + default="v8.ignition_dispatches_table.svg", + help=("file to save the plot file to. File type is deduced from the " + "extension. PDF, SVG, PNG supported") + ) + command_line_parser.add_argument( + "input_filename", + metavar="", + default="v8.ignition_dispatches_table.json", + nargs='?', + help="Ignition counters JSON file" + ) + + return command_line_parser.parse_args() + + +def main(): + program_options = parse_command_line() + + with open(program_options.input_filename) as stream: + dispatches_table = json.load(stream) + + warn_if_counter_may_have_saturated(dispatches_table) + + if program_options.plot: + figure, axis = pyplot.subplots() + plot_dispatches_table(dispatches_table, figure, axis) + + if program_options.interactive: + pyplot.show() + else: + figure.set_size_inches(program_options.plot_size, + program_options.plot_size) + pyplot.savefig(program_options.output_filename) + elif program_options.top_bytecode_dispatch_pairs: + print_top_bytecode_dispatch_pairs( + dispatches_table, program_options.top_entries_count) + elif program_options.top_dispatches_for_bytecode: + print_top_dispatch_sources_and_destinations( + dispatches_table, program_options.top_dispatches_for_bytecode, + program_options.top_entries_count) + else: + print_top_bytecodes(dispatches_table) + + +if __name__ == "__main__": + main() diff --git a/deps/v8/tools/ignition/bytecode_dispatches_report_test.py b/deps/v8/tools/ignition/bytecode_dispatches_report_test.py new file mode 100644 index 00000000000000..523dac2960d8da --- /dev/null +++ b/deps/v8/tools/ignition/bytecode_dispatches_report_test.py @@ -0,0 +1,54 @@ +# 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. + +import bytecode_dispatches_report as bdr +import unittest + + +class BytecodeDispatchesReportTest(unittest.TestCase): + def test_find_top_counters(self): + top_counters = bdr.find_top_bytecode_dispatch_pairs({ + "a": {"a": 10, "b": 8, "c": 99}, + "b": {"a": 1, "b": 4, "c": 1}, + "c": {"a": 42, "b": 3, "c": 7}}, 5) + self.assertListEqual(top_counters, [ + ('a', 'c', 99), + ('c', 'a', 42), + ('a', 'a', 10), + ('a', 'b', 8), + ('c', 'c', 7)]) + + def test_build_counters_matrix(self): + counters_matrix, xlabels, ylabels = bdr.build_counters_matrix({ + "a": {"a": 10, "b": 8, "c": 7}, + "b": {"a": 1, "c": 4}, + "c": {"a": 42, "b": 12, "c": 99}}) + self.assertTrue((counters_matrix == [[42, 12, 99], + [ 1, 0, 4], + [10, 8, 7]]).all()) + self.assertListEqual(xlabels, ['a', 'b', 'c']) + self.assertListEqual(ylabels, ['c', 'b', 'a']) + + def test_find_top_bytecodes(self): + top_dispatch_sources = bdr.find_top_bytecodes({ + "a": {"a": 10, "b": 8, "c": 7}, + "b": {"a": 1, "c": 4}, + "c": {"a": 42, "b": 12, "c": 99} + }) + self.assertListEqual(top_dispatch_sources, [ + ('c', 153), + ('a', 25), + ('b', 5) + ]) + + def test_find_top_dispatch_sources(self): + top_dispatch_sources = bdr.find_top_dispatch_sources({ + "a": {"a": 10, "b": 8, "c": 7}, + "b": {"a": 1, "c": 4}, + "c": {"a": 42, "b": 12, "c": 99} + }, "b", 10) + self.assertListEqual(top_dispatch_sources, [ + ("c", 12), + ("a", 8) + ]) diff --git a/deps/v8/tools/ignition/linux_perf_bytecode_annotate.py b/deps/v8/tools/ignition/linux_perf_bytecode_annotate.py new file mode 100755 index 00000000000000..6681190d9909a4 --- /dev/null +++ b/deps/v8/tools/ignition/linux_perf_bytecode_annotate.py @@ -0,0 +1,174 @@ +#! /usr/bin/python2 +# +# 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. +# + +import argparse +import collections +import os +import subprocess +import sys + + +__DESCRIPTION = """ +Processes a perf.data sample file and annotates the hottest instructions in a +given bytecode handler. +""" + + +__HELP_EPILOGUE = """ +Note: + This tool uses the disassembly of interpreter's bytecode handler codegen + from out/.debug/d8. you should ensure that this binary is in-sync with + the version used to generate the perf profile. + + Also, the tool depends on the symbol offsets from perf samples being accurate. + As such, you should use the ":pp" suffix for events. + +Examples: + EVENT_TYPE=cycles:pp tools/run-perf.sh out/x64.release/d8 + tools/ignition/linux_perf_bytecode_annotate.py Add +""" + + +def bytecode_offset_generator(perf_stream, bytecode_name): + skip_until_end_of_chain = False + bytecode_symbol = "BytecodeHandler:" + bytecode_name; + + for line in perf_stream: + # Lines starting with a "#" are comments, skip them. + if line[0] == "#": + continue + line = line.strip() + + # Empty line signals the end of the callchain. + if not line: + skip_until_end_of_chain = False + continue + + if skip_until_end_of_chain: + continue + + symbol_and_offset = line.split(" ", 1)[1] + + if symbol_and_offset.startswith("BytecodeHandler:"): + skip_until_end_of_chain = True + + if symbol_and_offset.startswith(bytecode_symbol): + yield int(symbol_and_offset.split("+", 1)[1], 16) + + +def bytecode_offset_counts(bytecode_offsets): + offset_counts = collections.defaultdict(int) + for offset in bytecode_offsets: + offset_counts[offset] += 1 + return offset_counts + + +def bytecode_disassembly_generator(ignition_codegen, bytecode_name): + name_string = "name = " + bytecode_name + for line in ignition_codegen: + if line.startswith(name_string): + break + + # Found the bytecode disassembly. + for line in ignition_codegen: + line = line.strip() + # Blank line marks the end of the bytecode's disassembly. + if not line: + return + + # Only yield disassembly output. + if not line.startswith("0x"): + continue + + yield line + + +def print_disassembly_annotation(offset_counts, bytecode_disassembly): + total = sum(offset_counts.values()) + offsets = sorted(offset_counts, reverse=True) + def next_offset(): + return offsets.pop() if offsets else -1 + + current_offset = next_offset() + print current_offset; + + for line in bytecode_disassembly: + disassembly_offset = int(line.split()[1]) + if disassembly_offset == current_offset: + count = offset_counts[current_offset] + percentage = 100.0 * count / total + print "{:>8d} ({:>5.1f}%) ".format(count, percentage), + current_offset = next_offset() + else: + print " ", + print line + + if offsets: + print ("WARNING: Offsets not empty. Output is most likely invalid due to " + "a mismatch between perf output and debug d8 binary.") + + +def parse_command_line(): + command_line_parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description=__DESCRIPTION, + epilog=__HELP_EPILOGUE) + + command_line_parser.add_argument( + "--arch", "-a", + help="The architecture (default: x64)", + default="x64", + ) + command_line_parser.add_argument( + "--input", "-i", + help="perf sample file to process (default: perf.data)", + default="perf.data", + metavar="", + dest="perf_filename" + ) + command_line_parser.add_argument( + "--output", "-o", + help="output file name (stdout if omitted)", + type=argparse.FileType("wt"), + default=sys.stdout, + metavar="", + dest="output_stream" + ) + command_line_parser.add_argument( + "bytecode_name", + metavar="", + nargs="?", + help="The bytecode handler to annotate" + ) + + return command_line_parser.parse_args() + + +def main(): + program_options = parse_command_line() + perf = subprocess.Popen(["perf", "script", "-f", "ip,sym,symoff", + "-i", program_options.perf_filename], + stdout=subprocess.PIPE) + + v8_root_path = os.path.dirname(__file__) + "/../../" + d8_path = "{}/out/{}.debug/d8".format(v8_root_path, program_options.arch) + d8_codegen = subprocess.Popen([d8_path, "--ignition", + "--trace-ignition-codegen", "-e", "1"], + stdout=subprocess.PIPE) + + bytecode_offsets = bytecode_offset_generator( + perf.stdout, program_options.bytecode_name) + offset_counts = bytecode_offset_counts(bytecode_offsets) + + bytecode_disassembly = bytecode_disassembly_generator( + d8_codegen.stdout, program_options.bytecode_name) + + print_disassembly_annotation(offset_counts, bytecode_disassembly) + + +if __name__ == "__main__": + main() diff --git a/deps/v8/tools/ignition/linux_perf_bytecode_annotate_test.py b/deps/v8/tools/ignition/linux_perf_bytecode_annotate_test.py new file mode 100644 index 00000000000000..15abbeda08b704 --- /dev/null +++ b/deps/v8/tools/ignition/linux_perf_bytecode_annotate_test.py @@ -0,0 +1,85 @@ +# 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. + +import StringIO +import unittest +import linux_perf_bytecode_annotate as bytecode_annotate + + +PERF_SCRIPT_OUTPUT = """ +# This line is a comment +# This should be ignored too +# +# cdefab01 aRandomSymbol::Name(to, be, ignored) + + 00000000 firstSymbol + 00000123 secondSymbol + + 01234567 foo + abcdef76 BytecodeHandler:bar+0x12 + 76543210 baz + abcdef76 BytecodeHandler:bar+0x16 + 76543210 baz + + 01234567 foo + abcdef76 BytecodeHandler:foo+0x1 + 76543210 baz + abcdef76 BytecodeHandler:bar+0x2 + 76543210 bar + + abcdef76 BytecodeHandler:bar+0x19 + + abcdef76 BytecodeHandler:bar+0x12 + + abcdef76 BytecodeHandler:bar+0x12 +""" + + +D8_CODEGEN_OUTPUT = """ +kind = BYTECODE_HANDLER +name = foo +compiler = turbofan +Instructions (size = 3) +0x3101394a3c0 0 55 push rbp +0x3101394a3c1 1 ffe3 jmp rbx + +kind = BYTECODE_HANDLER +name = bar +compiler = turbofan +Instructions (size = 5) +0x3101394b3c0 0 55 push rbp +0x3101394b3c1 1 4883c428 REX.W addq rsp,0x28 +# Unexpected comment +0x3101394b3c5 5 ffe3 jmp rbx + +kind = BYTECODE_HANDLER +name = baz +compiler = turbofan +Instructions (size = 5) +0x3101394c3c0 0 55 push rbp +0x3101394c3c1 1 4883c428 REX.W addq rsp,0x28 +0x3101394c3c5 5 ffe3 jmp rbx +""" + + +class LinuxPerfBytecodeAnnotateTest(unittest.TestCase): + + def test_bytecode_offset_generator(self): + perf_stream = StringIO.StringIO(PERF_SCRIPT_OUTPUT) + offsets = list( + bytecode_annotate.bytecode_offset_generator(perf_stream, "bar")) + self.assertListEqual(offsets, [18, 25, 18, 18]) + + def test_bytecode_disassembly_generator(self): + codegen_stream = StringIO.StringIO(D8_CODEGEN_OUTPUT) + disassembly = list( + bytecode_annotate.bytecode_disassembly_generator(codegen_stream, "bar")) + self.assertListEqual(disassembly, [ + "0x3101394b3c0 0 55 push rbp", + "0x3101394b3c1 1 4883c428 REX.W addq rsp,0x28", + "0x3101394b3c5 5 ffe3 jmp rbx"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/deps/v8/tools/ignition/linux_perf_report.py b/deps/v8/tools/ignition/linux_perf_report.py new file mode 100755 index 00000000000000..fbf562c2abe9b6 --- /dev/null +++ b/deps/v8/tools/ignition/linux_perf_report.py @@ -0,0 +1,222 @@ +#! /usr/bin/python2 +# +# 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. +# + +import argparse +import collections +import re +import subprocess +import sys + + +__DESCRIPTION = """ +Processes a perf.data sample file and reports the hottest Ignition bytecodes, +or write an input file for flamegraph.pl. +""" + + +__HELP_EPILOGUE = """ +examples: + # Get a flamegraph for Ignition bytecode handlers on Octane benchmark, + # without considering the time spent compiling JS code, entry trampoline + # samples and other non-Ignition samples. + # + $ tools/run-perf.sh out/x64.release/d8 \\ + --ignition --noturbo --nocrankshaft run.js + $ tools/ignition/linux_perf_report.py --flamegraph -o out.collapsed + $ flamegraph.pl --colors js out.collapsed > out.svg + + # Same as above, but show all samples, including time spent compiling JS code, + # entry trampoline samples and other samples. + $ # ... + $ tools/ignition/linux_perf_report.py \\ + --flamegraph --show-all -o out.collapsed + $ # ... + + # Same as above, but show full function signatures in the flamegraph. + $ # ... + $ tools/ignition/linux_perf_report.py \\ + --flamegraph --show-full-signatures -o out.collapsed + $ # ... + + # See the hottest bytecodes on Octane benchmark, by number of samples. + # + $ tools/run-perf.sh out/x64.release/d8 \\ + --ignition --noturbo --nocrankshaft octane/run.js + $ tools/ignition/linux_perf_report.py +""" + + +COMPILER_SYMBOLS_RE = re.compile( + r"v8::internal::(?:\(anonymous namespace\)::)?Compile|v8::internal::Parser") + + +def strip_function_parameters(symbol): + if symbol[-1] != ')': return symbol + pos = 1 + parenthesis_count = 0 + for c in reversed(symbol): + if c == ')': + parenthesis_count += 1 + elif c == '(': + parenthesis_count -= 1 + if parenthesis_count == 0: + break + else: + pos += 1 + return symbol[:-pos] + + +def collapsed_callchains_generator(perf_stream, show_all=False, + show_full_signatures=False): + current_chain = [] + skip_until_end_of_chain = False + compiler_symbol_in_chain = False + + for line in perf_stream: + # Lines starting with a "#" are comments, skip them. + if line[0] == "#": + continue + + line = line.strip() + + # Empty line signals the end of the callchain. + if not line: + if not skip_until_end_of_chain and current_chain and show_all: + current_chain.append("[other]") + yield current_chain + # Reset parser status. + current_chain = [] + skip_until_end_of_chain = False + compiler_symbol_in_chain = False + continue + + if skip_until_end_of_chain: + continue + + symbol = line.split(" ", 1)[1] + if not show_full_signatures: + symbol = strip_function_parameters(symbol) + current_chain.append(symbol) + + if symbol.startswith("BytecodeHandler:"): + yield current_chain + skip_until_end_of_chain = True + elif symbol == "Stub:CEntryStub" and compiler_symbol_in_chain: + if show_all: + current_chain[-1] = "[compiler]" + yield current_chain + skip_until_end_of_chain = True + elif COMPILER_SYMBOLS_RE.match(symbol): + compiler_symbol_in_chain = True + elif symbol == "Builtin:InterpreterEntryTrampoline": + if len(current_chain) == 1: + yield ["[entry trampoline]"] + else: + # If we see an InterpreterEntryTrampoline which is not at the top of the + # chain and doesn't have a BytecodeHandler above it, then we have + # skipped the top BytecodeHandler due to the top-level stub not building + # a frame. File the chain in the [misattributed] bucket. + current_chain[-1] = "[misattributed]" + yield current_chain + skip_until_end_of_chain = True + + +def calculate_samples_count_per_callchain(callchains): + chain_counters = collections.defaultdict(int) + for callchain in callchains: + key = ";".join(reversed(callchain)) + chain_counters[key] += 1 + return chain_counters.items() + + +def calculate_samples_count_per_handler(callchains): + def strip_handler_prefix_if_any(handler): + return handler if handler[0] == "[" else handler.split(":", 1)[1] + + handler_counters = collections.defaultdict(int) + for callchain in callchains: + handler = strip_handler_prefix_if_any(callchain[-1]) + handler_counters[handler] += 1 + return handler_counters.items() + + +def write_flamegraph_input_file(output_stream, callchains): + for callchain, count in calculate_samples_count_per_callchain(callchains): + output_stream.write("{}; {}\n".format(callchain, count)) + + +def write_handlers_report(output_stream, callchains): + handler_counters = calculate_samples_count_per_handler(callchains) + samples_num = sum(counter for _, counter in handler_counters) + # Sort by decreasing number of samples + handler_counters.sort(key=lambda entry: entry[1], reverse=True) + for bytecode_name, count in handler_counters: + output_stream.write( + "{}\t{}\t{:.3f}%\n".format(bytecode_name, count, + 100. * count / samples_num)) + + +def parse_command_line(): + command_line_parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description=__DESCRIPTION, + epilog=__HELP_EPILOGUE) + + command_line_parser.add_argument( + "perf_filename", + help="perf sample file to process (default: perf.data)", + nargs="?", + default="perf.data", + metavar="" + ) + command_line_parser.add_argument( + "--flamegraph", "-f", + help="output an input file for flamegraph.pl, not a report", + action="store_true", + dest="output_flamegraph" + ) + command_line_parser.add_argument( + "--show-all", "-a", + help="show samples outside Ignition bytecode handlers", + action="store_true" + ) + command_line_parser.add_argument( + "--show-full-signatures", "-s", + help="show full signatures instead of function names", + action="store_true" + ) + command_line_parser.add_argument( + "--output", "-o", + help="output file name (stdout if omitted)", + type=argparse.FileType('wt'), + default=sys.stdout, + metavar="", + dest="output_stream" + ) + + return command_line_parser.parse_args() + + +def main(): + program_options = parse_command_line() + + perf = subprocess.Popen(["perf", "script", "-f", "ip,sym", + "-i", program_options.perf_filename], + stdout=subprocess.PIPE) + + callchains = collapsed_callchains_generator( + perf.stdout, program_options.show_all, + program_options.show_full_signatures) + + if program_options.output_flamegraph: + write_flamegraph_input_file(program_options.output_stream, callchains) + else: + write_handlers_report(program_options.output_stream, callchains) + + +if __name__ == "__main__": + main() diff --git a/deps/v8/tools/ignition/linux_perf_report_test.py b/deps/v8/tools/ignition/linux_perf_report_test.py new file mode 100644 index 00000000000000..d9cef75dfff275 --- /dev/null +++ b/deps/v8/tools/ignition/linux_perf_report_test.py @@ -0,0 +1,147 @@ +# 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. + +import linux_perf_report as ipr +import StringIO +import unittest + + +PERF_SCRIPT_OUTPUT = """ +# This line is a comment +# This should be ignored too +# +# cdefab01 aRandomSymbol::Name(to, be, ignored) + + 00000000 firstSymbol + 00000123 secondSymbol + + 01234567 foo + abcdef76 BytecodeHandler:bar + 76543210 baz + +# Indentation shouldn't matter (neither should this line) + + 01234567 foo + abcdef76 BytecodeHandler:bar + 76543210 baz + + 01234567 beep + abcdef76 BytecodeHandler:bar + 76543210 baz + + 01234567 hello + abcdef76 v8::internal::Compiler + 00000000 Stub:CEntryStub + 76543210 world + 11111111 BytecodeHandler:nope + + 00000000 Lost + 11111111 Builtin:InterpreterEntryTrampoline + 22222222 bar + + 11111111 Builtin:InterpreterEntryTrampoline + 22222222 bar +""" + + +class LinuxPerfReportTest(unittest.TestCase): + def test_collapsed_callchains_generator(self): + perf_stream = StringIO.StringIO(PERF_SCRIPT_OUTPUT) + callchains = list(ipr.collapsed_callchains_generator(perf_stream)) + self.assertListEqual(callchains, [ + ["foo", "BytecodeHandler:bar"], + ["foo", "BytecodeHandler:bar"], + ["beep", "BytecodeHandler:bar"], + ["[entry trampoline]"], + ]) + + def test_collapsed_callchains_generator_show_other(self): + perf_stream = StringIO.StringIO(PERF_SCRIPT_OUTPUT) + callchains = list(ipr.collapsed_callchains_generator(perf_stream, + show_all=True)) + self.assertListEqual(callchains, [ + ['firstSymbol', 'secondSymbol', '[other]'], + ["foo", "BytecodeHandler:bar"], + ["foo", "BytecodeHandler:bar"], + ["beep", "BytecodeHandler:bar"], + ["hello", "v8::internal::Compiler", "[compiler]"], + ["Lost", "[misattributed]"], + ["[entry trampoline]"], + ]) + + def test_calculate_samples_count_per_callchain(self): + counters = ipr.calculate_samples_count_per_callchain([ + ["foo", "BytecodeHandler:bar"], + ["foo", "BytecodeHandler:bar"], + ["beep", "BytecodeHandler:bar"], + ["hello", "v8::internal::Compiler", "[compiler]"], + ]) + self.assertItemsEqual(counters, [ + ('BytecodeHandler:bar;foo', 2), + ('BytecodeHandler:bar;beep', 1), + ('[compiler];v8::internal::Compiler;hello', 1), + ]) + + def test_calculate_samples_count_per_callchain(self): + counters = ipr.calculate_samples_count_per_callchain([ + ["foo", "BytecodeHandler:bar"], + ["foo", "BytecodeHandler:bar"], + ["beep", "BytecodeHandler:bar"], + ]) + self.assertItemsEqual(counters, [ + ('BytecodeHandler:bar;foo', 2), + ('BytecodeHandler:bar;beep', 1), + ]) + + def test_calculate_samples_count_per_handler_show_compile(self): + counters = ipr.calculate_samples_count_per_handler([ + ["foo", "BytecodeHandler:bar"], + ["foo", "BytecodeHandler:bar"], + ["beep", "BytecodeHandler:bar"], + ["hello", "v8::internal::Compiler", "[compiler]"], + ]) + self.assertItemsEqual(counters, [ + ("bar", 3), + ("[compiler]", 1) + ]) + + def test_calculate_samples_count_per_handler_(self): + counters = ipr.calculate_samples_count_per_handler([ + ["foo", "BytecodeHandler:bar"], + ["foo", "BytecodeHandler:bar"], + ["beep", "BytecodeHandler:bar"], + ]) + self.assertItemsEqual(counters, [("bar", 3)]) + + def test_multiple_handlers(self): + perf_stream = StringIO.StringIO(""" + 0000 foo(bar) + 1234 BytecodeHandler:first + 5678 a::random::call(something, else) + 9abc BytecodeHandler:second + def0 otherIrrelevant(stuff) + 1111 entrypoint + """) + callchains = list(ipr.collapsed_callchains_generator(perf_stream, False)) + self.assertListEqual(callchains, [ + ["foo", "BytecodeHandler:first"], + ]) + + def test_compiler_symbols_regex(self): + compiler_symbols = [ + "v8::internal::Parser", + "v8::internal::(anonymous namespace)::Compile", + "v8::internal::Compiler::foo", + ] + for compiler_symbol in compiler_symbols: + self.assertTrue(ipr.COMPILER_SYMBOLS_RE.match(compiler_symbol)) + + def test_strip_function_parameters(self): + def should_match(signature, name): + self.assertEqual(ipr.strip_function_parameters(signature), name) + + should_match("foo(bar)", "foo"), + should_match("Foo(foomatic::(anonymous)::bar(baz))", "Foo"), + should_match("v8::(anonymous ns)::bar(baz, poe)", + "v8::(anonymous ns)::bar") diff --git a/deps/v8/tools/jsfunfuzz/jsfunfuzz.gyp b/deps/v8/tools/jsfunfuzz/jsfunfuzz.gyp index fb0e5f4949c1b3..8938e44538b3d5 100644 --- a/deps/v8/tools/jsfunfuzz/jsfunfuzz.gyp +++ b/deps/v8/tools/jsfunfuzz/jsfunfuzz.gyp @@ -13,8 +13,8 @@ '../../src/d8.gyp:d8_run', ], 'includes': [ - '../../build/features.gypi', - '../../build/isolate.gypi', + '../../gypfiles/features.gypi', + '../../gypfiles/isolate.gypi', ], 'sources': [ 'jsfunfuzz.isolate', diff --git a/deps/v8/tools/mingw-generate-makefiles.sh b/deps/v8/tools/mingw-generate-makefiles.sh index 32af52d39e004c..67715fc15b0a47 100755 --- a/deps/v8/tools/mingw-generate-makefiles.sh +++ b/deps/v8/tools/mingw-generate-makefiles.sh @@ -27,7 +27,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Monkey-patch GYP. -cat > build/gyp/gyp.mingw << EOF +cat > tools/gyp/gyp.mingw << EOF #!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. @@ -74,11 +74,11 @@ EOF find out -name '*.mk' -or -name 'Makefile*' -exec rm {} \; # Generate fresh Makefiles. -mv build/gyp/gyp build/gyp/gyp.original -mv build/gyp/gyp.mingw build/gyp/gyp +mv tools/gyp/gyp tools/gyp/gyp.original +mv tools/gyp/gyp.mingw tools/gyp/gyp make out/Makefile.ia32 -mv build/gyp/gyp build/gyp/gyp.mingw -mv build/gyp/gyp.original build/gyp/gyp +mv tools/gyp/gyp tools/gyp/gyp.mingw +mv tools/gyp/gyp.original tools/gyp/gyp # Patch generated Makefiles: replace most backslashes with forward slashes, # fix library names in linker flags. diff --git a/deps/v8/tools/parser-shell.gyp b/deps/v8/tools/parser-shell.gyp index 77ed1eb246055f..4ef1a82d719572 100644 --- a/deps/v8/tools/parser-shell.gyp +++ b/deps/v8/tools/parser-shell.gyp @@ -30,14 +30,14 @@ 'v8_code': 1, 'v8_enable_i18n_support%': 1, }, - 'includes': ['../build/toolchain.gypi', '../build/features.gypi'], + 'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'], 'targets': [ { 'target_name': 'parser-shell', 'type': 'executable', 'dependencies': [ - '../tools/gyp/v8.gyp:v8', - '../tools/gyp/v8.gyp:v8_libplatform', + '../src/v8.gyp:v8', + '../src/v8.gyp:v8_libplatform', ], 'conditions': [ ['v8_enable_i18n_support==1', { @@ -50,10 +50,6 @@ 'include_dirs+': [ '..', ], - 'defines': [ - # TODO(jochen): Remove again after this is globally turned on. - 'V8_IMMINENT_DEPRECATION_WARNINGS', - ], 'sources': [ 'parser-shell.cc', 'shell-utils.h', diff --git a/deps/v8/tools/perf-to-html.py b/deps/v8/tools/perf-to-html.py index 63faeb1d6602e2..7ec9c50f218fe1 100755 --- a/deps/v8/tools/perf-to-html.py +++ b/deps/v8/tools/perf-to-html.py @@ -115,8 +115,8 @@ def __init__(self, name, data): self.name_ = name self.tests_ = {} for test in data: - # strip off "/" prefix - test_name = test.split("/")[1] + # strip off "/" prefix, allowing for subsequent "/"s + test_name = test.split("/", 1)[1] self.appendResult(test_name, data[test]) # tests is a dictionary of Results diff --git a/deps/v8/tools/release/auto_roll.py b/deps/v8/tools/release/auto_roll.py index b71cac5a10ae40..243b029b8e43ff 100755 --- a/deps/v8/tools/release/auto_roll.py +++ b/deps/v8/tools/release/auto_roll.py @@ -18,7 +18,9 @@ Please close rolling in case of a roll revert: https://v8-roll.appspot.com/ -This only works with a Google account.""") +This only works with a Google account. + +CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel""") class Preparation(Step): MESSAGE = "Preparation." diff --git a/deps/v8/tools/release/create_release.py b/deps/v8/tools/release/create_release.py index 7477ea1461f5eb..14d44b4bd60875 100755 --- a/deps/v8/tools/release/create_release.py +++ b/deps/v8/tools/release/create_release.py @@ -223,6 +223,27 @@ def SplitMapJoin(split_text, fun, join_text): os.remove(self.Config("CHANGELOG_ENTRY_FILE")) +class FixBrokenTag(Step): + MESSAGE = "Check for a missing tag and fix that instead." + + def RunStep(self): + commit = None + try: + commit = self.GitLog( + n=1, format="%H", + grep=self["commit_title"], + branch="origin/%s" % self["version"], + ) + except GitFailedException: + # In the normal case, the remote doesn't exist yet and git will fail. + pass + if commit: + print "Found %s. Trying to repair tag and bail out." % self["version"] + self.Git("tag %s %s" % (self["version"], commit)) + self.Git("push origin refs/tags/%s" % self["version"]) + return True + + class PushBranch(Step): MESSAGE = "Push changes." @@ -303,6 +324,7 @@ def _Steps(self): SetVersion, EnableMergeWatchlist, CommitBranch, + FixBrokenTag, PushBranch, TagRevision, CleanUp, diff --git a/deps/v8/tools/release/test_scripts.py b/deps/v8/tools/release/test_scripts.py index 05457c9285c172..417f739f145d64 100644 --- a/deps/v8/tools/release/test_scripts.py +++ b/deps/v8/tools/release/test_scripts.py @@ -970,6 +970,8 @@ def CheckVersionCommit(): cb=self.WriteFakeWatchlistsFile), Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], "", cb=CheckVersionCommit), + Cmd("git log -1 --format=%H --grep=\"Version 3.22.5\" origin/3.22.5", + ""), Cmd("git push origin " "refs/heads/work-branch:refs/pending/heads/3.22.5 " "push_hash:refs/pending-tags/heads/3.22.5 " @@ -1041,6 +1043,8 @@ def CheckVersionCommit(): https://v8-roll.appspot.com/ This only works with a Google account. +CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel + TBR=reviewer@chromium.org""" # Snippet from the original DEPS file. diff --git a/deps/v8/tools/run-deopt-fuzzer.gyp b/deps/v8/tools/run-deopt-fuzzer.gyp index 73f0aaf7a521cd..9eb6b538bc2343 100644 --- a/deps/v8/tools/run-deopt-fuzzer.gyp +++ b/deps/v8/tools/run-deopt-fuzzer.gyp @@ -13,8 +13,8 @@ '../src/d8.gyp:d8_run', ], 'includes': [ - '../build/features.gypi', - '../build/isolate.gypi', + '../gypfiles/features.gypi', + '../gypfiles/isolate.gypi', ], 'sources': [ 'run-deopt-fuzzer.isolate', diff --git a/deps/v8/tools/run-deopt-fuzzer.py b/deps/v8/tools/run-deopt-fuzzer.py index 970aa8e616e52f..928c71b743a44a 100755 --- a/deps/v8/tools/run-deopt-fuzzer.py +++ b/deps/v8/tools/run-deopt-fuzzer.py @@ -399,6 +399,7 @@ def Execute(arch, mode, args, options, suites, workspace): "gc_stress": False, "gcov_coverage": False, "ignition": False, + "ignition_turbofan": False, "isolates": options.isolates, "mode": mode, "no_i18n": False, diff --git a/deps/v8/tools/run-perf.sh b/deps/v8/tools/run-perf.sh index 24053b40fb0aa3..03123fdbb84df8 100755 --- a/deps/v8/tools/run-perf.sh +++ b/deps/v8/tools/run-perf.sh @@ -13,6 +13,7 @@ SAMPLE_EVERY_N_CYCLES=10000 SAMPLE_RATE_CONFIG_FILE="/proc/sys/kernel/perf_event_max_sample_rate" KERNEL_MAP_CONFIG_FILE="/proc/sys/kernel/kptr_restrict" CALL_GRAPH_METHOD="fp" # dwarf does not play nice with JITted objects. +EVENT_TYPE=${EVENT_TYPE:=cycles:u} ########## Usage @@ -46,7 +47,7 @@ fi echo "Running..." perf record -R \ - -e cycles:u \ + -e $EVENT_TYPE \ -c $SAMPLE_EVERY_N_CYCLES \ --call-graph $CALL_GRAPH_METHOD \ -i $@ --perf_basic_prof diff --git a/deps/v8/tools/run-tests.py b/deps/v8/tools/run-tests.py index a380c97ad3951d..b1c71dd0a76d7e 100755 --- a/deps/v8/tools/run-tests.py +++ b/deps/v8/tools/run-tests.py @@ -105,6 +105,7 @@ VARIANTS = ["default", "stress", "turbofan"] EXHAUSTIVE_VARIANTS = VARIANTS + [ + "ignition", "nocrankshaft", "turbofan_opt", ] @@ -194,6 +195,8 @@ "mips64el", "nacl_ia32", "nacl_x64", + "s390", + "s390x", "x87", "arm64"] @@ -253,6 +256,9 @@ def BuildOptions(): default="") result.add_option("--ignition", help="Skip tests which don't run in ignition", default=False, action="store_true") + result.add_option("--ignition-turbofan", + help="Skip tests which don't run in ignition_turbofan", + default=False, action="store_true") result.add_option("--isolates", help="Whether to test isolates", default=False, action="store_true") result.add_option("-j", help="The number of parallel tasks to run", @@ -335,7 +341,7 @@ def BuildOptions(): result.add_option("--time", help="Print timing information after running", default=False, action="store_true") result.add_option("-t", "--timeout", help="Timeout in seconds", - default= -1, type="int") + default=TIMEOUT_DEFAULT, type="int") result.add_option("--tsan", help="Regard test expectations for TSAN", default=False, action="store_true") @@ -378,6 +384,10 @@ def BuildbotToV8Mode(config): def SetupEnvironment(options): """Setup additional environment variables.""" + + # Many tests assume an English interface. + os.environ['LANG'] = 'en_US.UTF-8' + symbolizer = 'external_symbolizer_path=%s' % ( os.path.join( BASE_DIR, 'third_party', 'llvm-build', 'Release+Asserts', 'bin', @@ -591,6 +601,11 @@ def Main(): return 1 SetupEnvironment(options) + if options.swarming: + # Swarming doesn't print how isolated commands are called. Lets make this + # less cryptic by printing it ourselves. + print ' '.join(sys.argv) + exit_code = 0 if not options.no_presubmit: print ">>> running presubmit tests" @@ -663,19 +678,16 @@ def Execute(arch, mode, args, options, suites): # Populate context object. mode_flags = MODES[mode]["flags"] - timeout = options.timeout - if timeout == -1: - # Simulators are slow, therefore allow a longer default timeout. - if arch in SLOW_ARCHS: - timeout = 2 * TIMEOUT_DEFAULT; - else: - timeout = TIMEOUT_DEFAULT; - timeout *= MODES[mode]["timeout_scalefactor"] + # Simulators are slow, therefore allow a longer timeout. + if arch in SLOW_ARCHS: + options.timeout *= 2 + + options.timeout *= MODES[mode]["timeout_scalefactor"] if options.predictable: # Predictable mode is slower. - timeout *= 2 + options.timeout *= 2 # TODO(machenbach): Remove temporary verbose output on windows after # debugging driver-hung-up on XP. @@ -685,7 +697,8 @@ def Execute(arch, mode, args, options, suites): ) ctx = context.Context(arch, MODES[mode]["execution_mode"], shell_dir, mode_flags, verbose_output, - timeout, options.isolates, + options.timeout, + options.isolates, options.command_prefix, options.extra_flags, options.no_i18n, @@ -711,6 +724,7 @@ def Execute(arch, mode, args, options, suites): "gc_stress": options.gc_stress, "gcov_coverage": options.gcov_coverage, "ignition": options.ignition, + "ignition_turbofan": options.ignition_turbofan, "isolates": options.isolates, "mode": MODES[mode]["status_mode"], "no_i18n": options.no_i18n, diff --git a/deps/v8/tools/run-valgrind.gyp b/deps/v8/tools/run-valgrind.gyp index d06be933a9d3ab..02dd26d22ca186 100644 --- a/deps/v8/tools/run-valgrind.gyp +++ b/deps/v8/tools/run-valgrind.gyp @@ -13,8 +13,8 @@ '../src/d8.gyp:d8_run', ], 'includes': [ - '../build/features.gypi', - '../build/isolate.gypi', + '../gypfiles/features.gypi', + '../gypfiles/isolate.gypi', ], 'sources': [ 'run-valgrind.isolate', diff --git a/deps/v8/tools/run_perf.py b/deps/v8/tools/run_perf.py index db4245f499fc07..1dd03bd5379aaf 100755 --- a/deps/v8/tools/run_perf.py +++ b/deps/v8/tools/run_perf.py @@ -612,6 +612,21 @@ def Run(self, runnable, count): class DesktopPlatform(Platform): def __init__(self, options): super(DesktopPlatform, self).__init__(options) + self.command_prefix = [] + + if options.prioritize or options.affinitize != None: + self.command_prefix = ["schedtool"] + if options.prioritize: + self.command_prefix += ["-n", "-20"] + if options.affinitize != None: + # schedtool expects a bit pattern when setting affinity, where each + # bit set to '1' corresponds to a core where the process may run on. + # First bit corresponds to CPU 0. Since the 'affinitize' parameter is + # a core number, we need to map to said bit pattern. + cpu = int(options.affinitize) + core = 1 << cpu + self.command_prefix += ["-a", ("0x%x" % core)] + self.command_prefix += ["-e"] def PreExecution(self): pass @@ -627,15 +642,18 @@ def _Run(self, runnable, count, no_patch=False): suffix = ' - without patch' if no_patch else '' shell_dir = self.shell_dir_no_patch if no_patch else self.shell_dir title = ">>> %%s (#%d)%s:" % ((count + 1), suffix) + command = self.command_prefix + runnable.GetCommand(shell_dir, + self.extra_flags) try: output = commands.Execute( - runnable.GetCommand(shell_dir, self.extra_flags), - timeout=runnable.timeout, + command, + timeout=runnable.timeout, ) except OSError as e: # pragma: no cover print title % "OSError" print e return "" + print title % "Stdout" print output.stdout if output.stderr: # pragma: no cover @@ -788,6 +806,107 @@ def _Run(self, runnable, count, no_patch=False): stdout = "" return stdout +class CustomMachineConfiguration: + def __init__(self, disable_aslr = False, governor = None): + self.aslr_backup = None + self.governor_backup = None + self.disable_aslr = disable_aslr + self.governor = governor + + def __enter__(self): + if self.disable_aslr: + self.aslr_backup = CustomMachineConfiguration.GetASLR() + CustomMachineConfiguration.SetASLR(0) + if self.governor != None: + self.governor_backup = CustomMachineConfiguration.GetCPUGovernor() + CustomMachineConfiguration.SetCPUGovernor(self.governor) + return self + + def __exit__(self, type, value, traceback): + if self.aslr_backup != None: + CustomMachineConfiguration.SetASLR(self.aslr_backup) + if self.governor_backup != None: + CustomMachineConfiguration.SetCPUGovernor(self.governor_backup) + + @staticmethod + def GetASLR(): + try: + with open("/proc/sys/kernel/randomize_va_space", "r") as f: + return int(f.readline().strip()) + except Exception as e: + print "Failed to get current ASLR settings." + raise e + + @staticmethod + def SetASLR(value): + try: + with open("/proc/sys/kernel/randomize_va_space", "w") as f: + f.write(str(value)) + except Exception as e: + print "Failed to update ASLR to %s." % value + print "Are we running under sudo?" + raise e + + new_value = CustomMachineConfiguration.GetASLR() + if value != new_value: + raise Exception("Present value is %s" % new_value) + + @staticmethod + def GetCPUCoresRange(): + try: + with open("/sys/devices/system/cpu/present", "r") as f: + indexes = f.readline() + first, last = map(int, indexes.split("-")) + return range(first, last + 1) + except Exception as e: + print "Failed to retrieve number of CPUs." + raise e + + @staticmethod + def GetCPUPathForId(cpu_index): + ret = "/sys/devices/system/cpu/cpu" + ret += str(cpu_index) + ret += "/cpufreq/scaling_governor" + return ret + + @staticmethod + def GetCPUGovernor(): + try: + cpu_indices = CustomMachineConfiguration.GetCPUCoresRange() + ret = None + for cpu_index in cpu_indices: + cpu_device = CustomMachineConfiguration.GetCPUPathForId(cpu_index) + with open(cpu_device, "r") as f: + # We assume the governors of all CPUs are set to the same value + val = f.readline().strip() + if ret == None: + ret = val + elif ret != val: + raise Exception("CPU cores have differing governor settings") + return ret + except Exception as e: + print "Failed to get the current CPU governor." + print "Is the CPU governor disabled? Check BIOS." + raise e + + @staticmethod + def SetCPUGovernor(value): + try: + cpu_indices = CustomMachineConfiguration.GetCPUCoresRange() + for cpu_index in cpu_indices: + cpu_device = CustomMachineConfiguration.GetCPUPathForId(cpu_index) + with open(cpu_device, "w") as f: + f.write(value) + + except Exception as e: + print "Failed to change CPU governor to %s." % value + print "Are we running under sudo?" + raise e + + cur_value = CustomMachineConfiguration.GetCPUGovernor() + if cur_value != value: + raise Exception("Could not set CPU governor. Present value is %s" + % cur_value ) # TODO: Implement results_processor. def Main(args): @@ -822,6 +941,27 @@ def Main(args): help="JavaScript engine binary. By default, d8 under " "architecture-specific build dir. " "Not supported in conjunction with outdir-no-patch.") + parser.add_option("--prioritize", + help="Raise the priority to nice -20 for the benchmarking " + "process.Requires Linux, schedtool, and sudo privileges.", + default=False, action="store_true") + parser.add_option("--affinitize", + help="Run benchmarking process on the specified core. " + "For example: " + "--affinitize=0 will run the benchmark process on core 0. " + "--affinitize=3 will run the benchmark process on core 3. " + "Requires Linux, schedtool, and sudo privileges.", + default=None) + parser.add_option("--noaslr", + help="Disable ASLR for the duration of the benchmarked " + "process. Requires Linux and sudo privileges.", + default=False, action="store_true") + parser.add_option("--cpu-governor", + help="Set cpu governor to specified policy for the " + "duration of the benchmarked process. Typical options: " + "'powersave' for more stable results, or 'performance' " + "for shorter completion time of suite, with potentially " + "more noise in results.") (options, args) = parser.parse_args(args) @@ -872,56 +1012,60 @@ def Main(args): else: options.shell_dir_no_patch = None + prev_aslr = None + prev_cpu_gov = None platform = Platform.GetPlatform(options) results = Results() results_no_patch = Results() - for path in args: - path = os.path.abspath(path) + with CustomMachineConfiguration(governor = options.cpu_governor, + disable_aslr = options.noaslr) as conf: + for path in args: + path = os.path.abspath(path) - if not os.path.exists(path): # pragma: no cover - results.errors.append("Configuration file %s does not exist." % path) - continue + if not os.path.exists(path): # pragma: no cover + results.errors.append("Configuration file %s does not exist." % path) + continue - with open(path) as f: - suite = json.loads(f.read()) + with open(path) as f: + suite = json.loads(f.read()) - # If no name is given, default to the file name without .json. - suite.setdefault("name", os.path.splitext(os.path.basename(path))[0]) + # If no name is given, default to the file name without .json. + suite.setdefault("name", os.path.splitext(os.path.basename(path))[0]) - # Setup things common to one test suite. - platform.PreExecution() + # Setup things common to one test suite. + platform.PreExecution() - # Build the graph/trace tree structure. - default_parent = DefaultSentinel(default_binary_name) - root = BuildGraphConfigs(suite, options.arch, default_parent) + # Build the graph/trace tree structure. + default_parent = DefaultSentinel(default_binary_name) + root = BuildGraphConfigs(suite, options.arch, default_parent) - # Callback to be called on each node on traversal. - def NodeCB(node): - platform.PreTests(node, path) + # Callback to be called on each node on traversal. + def NodeCB(node): + platform.PreTests(node, path) - # Traverse graph/trace tree and interate over all runnables. - for runnable in FlattenRunnables(root, NodeCB): - print ">>> Running suite: %s" % "/".join(runnable.graphs) + # Traverse graph/trace tree and interate over all runnables. + for runnable in FlattenRunnables(root, NodeCB): + print ">>> Running suite: %s" % "/".join(runnable.graphs) - def Runner(): - """Output generator that reruns several times.""" - for i in xrange(0, max(1, runnable.run_count)): - # TODO(machenbach): Allow timeout per arch like with run_count per - # arch. - yield platform.Run(runnable, i) + def Runner(): + """Output generator that reruns several times.""" + for i in xrange(0, max(1, runnable.run_count)): + # TODO(machenbach): Allow timeout per arch like with run_count per + # arch. + yield platform.Run(runnable, i) - # Let runnable iterate over all runs and handle output. - result, result_no_patch = runnable.Run( + # Let runnable iterate over all runs and handle output. + result, result_no_patch = runnable.Run( Runner, trybot=options.shell_dir_no_patch) - results += result - results_no_patch += result_no_patch - platform.PostExecution() - - if options.json_test_results: - results.WriteToFile(options.json_test_results) - else: # pragma: no cover - print results + results += result + results_no_patch += result_no_patch + platform.PostExecution() + + if options.json_test_results: + results.WriteToFile(options.json_test_results) + else: # pragma: no cover + print results if options.json_test_results_no_patch: results_no_patch.WriteToFile(options.json_test_results_no_patch) diff --git a/deps/v8/tools/testrunner/local/execution.py b/deps/v8/tools/testrunner/local/execution.py index e0aec0bb9018a8..f3d11a8b5cf377 100644 --- a/deps/v8/tools/testrunner/local/execution.py +++ b/deps/v8/tools/testrunner/local/execution.py @@ -248,7 +248,6 @@ def _MaybeRerun(self, pool, test): self.total += 1 def _ProcessTestNormal(self, test, result, pool): - self.indicator.AboutToRun(test) test.output = result[1] test.duration = result[2] has_unexpected_output = test.suite.HasUnexpectedOutput(test) @@ -285,7 +284,6 @@ def AllocationStr(stdout): if test.run == 1 and result[1].HasTimedOut(): # If we get a timeout in the first run, we are already in an # unpredictable state. Just report it as a failure and don't rerun. - self.indicator.AboutToRun(test) test.output = result[1] self.remaining -= 1 self.failed.append(test) @@ -294,16 +292,13 @@ def AllocationStr(stdout): # From the second run on, check for different allocations. If a # difference is found, call the indicator twice to report both tests. # All runs of each test are counted as one for the statistic. - self.indicator.AboutToRun(test) self.remaining -= 1 self.failed.append(test) self.indicator.HasRun(test, True) - self.indicator.AboutToRun(test) test.output = result[1] self.indicator.HasRun(test, True) elif test.run >= 3: # No difference on the third run -> report a success. - self.indicator.AboutToRun(test) self.remaining -= 1 self.succeeded += 1 test.output = result[1] diff --git a/deps/v8/tools/testrunner/local/progress.py b/deps/v8/tools/testrunner/local/progress.py index 4e1be3e4cf60d4..33e27e154b31b2 100644 --- a/deps/v8/tools/testrunner/local/progress.py +++ b/deps/v8/tools/testrunner/local/progress.py @@ -34,6 +34,7 @@ from . import execution from . import junit_output +from . import statusfile ABS_PATH_PREFIX = os.getcwd() + os.sep @@ -53,9 +54,6 @@ def Starting(self): def Done(self): pass - def AboutToRun(self, test): - pass - def HasRun(self, test, has_unexpected_output): pass @@ -146,10 +144,6 @@ def Done(self): class VerboseProgressIndicator(SimpleProgressIndicator): - def AboutToRun(self, test): - print 'Starting %s...' % test.GetLabel() - sys.stdout.flush() - def HasRun(self, test, has_unexpected_output): if has_unexpected_output: if test.output.HasCrashed(): @@ -200,10 +194,8 @@ def Done(self): self.PrintProgress('Done') print "" # Line break. - def AboutToRun(self, test): - self.PrintProgress(test.GetLabel()) - def HasRun(self, test, has_unexpected_output): + self.PrintProgress(test.GetLabel()) if has_unexpected_output: self.ClearLine(self.last_status_length) self.PrintFailureHeader(test) @@ -329,6 +321,12 @@ def Done(self): # Buildbot might start out with an empty file. complete_results = json.loads(f.read() or "[]") + duration_mean = None + if self.tests: + # Get duration mean. + duration_mean = ( + sum(t.duration for t in self.tests) / float(len(self.tests))) + # Sort tests by duration. timed_tests = [t for t in self.tests if t.duration is not None] timed_tests.sort(lambda a, b: cmp(b.duration, a.duration)) @@ -338,6 +336,7 @@ def Done(self): "flags": test.flags, "command": self._EscapeCommand(test).replace(ABS_PATH_PREFIX, ""), "duration": test.duration, + "marked_slow": statusfile.IsSlow(test.outcomes), } for test in timed_tests[:20] ] @@ -346,6 +345,8 @@ def Done(self): "mode": self.mode, "results": self.results, "slowest_tests": slowest_tests, + "duration_mean": duration_mean, + "test_total": len(self.tests), }) with open(self.json_test_results, "w") as f: diff --git a/deps/v8/tools/testrunner/local/statusfile.py b/deps/v8/tools/testrunner/local/statusfile.py index 7e96cc37150058..fde6237967e536 100644 --- a/deps/v8/tools/testrunner/local/statusfile.py +++ b/deps/v8/tools/testrunner/local/statusfile.py @@ -36,6 +36,7 @@ CRASH = "CRASH" SLOW = "SLOW" FAST_VARIANTS = "FAST_VARIANTS" +NO_IGNITION = "NO_IGNITION" NO_VARIANTS = "NO_VARIANTS" # These are just for the status files and are mapped below in DEFS: FAIL_OK = "FAIL_OK" @@ -46,7 +47,8 @@ KEYWORDS = {} for key in [SKIP, FAIL, PASS, OKAY, TIMEOUT, CRASH, SLOW, FAIL_OK, - FAST_VARIANTS, NO_VARIANTS, PASS_OR_FAIL, FAIL_SLOPPY, ALWAYS]: + FAST_VARIANTS, NO_IGNITION, NO_VARIANTS, PASS_OR_FAIL, FAIL_SLOPPY, + ALWAYS]: KEYWORDS[key] = key DEFS = {FAIL_OK: [FAIL, OKAY], @@ -70,6 +72,10 @@ def IsSlow(outcomes): return SLOW in outcomes +def NoIgnitionVariant(outcomes): + return NO_IGNITION in outcomes + + def OnlyStandardVariant(outcomes): return NO_VARIANTS in outcomes diff --git a/deps/v8/tools/testrunner/local/testsuite.py b/deps/v8/tools/testrunner/local/testsuite.py index f43d008b220bc5..8e8b4769982776 100644 --- a/deps/v8/tools/testrunner/local/testsuite.py +++ b/deps/v8/tools/testrunner/local/testsuite.py @@ -41,7 +41,8 @@ "turbofan": [["--turbo"]], "turbofan_opt": [["--turbo", "--always-opt"]], "nocrankshaft": [["--nocrankshaft"]], - "ignition": [["--ignition", "--turbo"]], + "ignition": [["--ignition"]], + "ignition_turbofan": [["--ignition", "--turbo", "--turbo-from-bytecode"]], "preparser": [["--min-preparse-length=0"]], } @@ -51,14 +52,17 @@ "stress": [["--stress-opt"]], "turbofan": [["--turbo"]], "nocrankshaft": [["--nocrankshaft"]], - "ignition": [["--ignition", "--turbo"]], + "ignition": [["--ignition"]], + "ignition_turbofan": [["--ignition", "--turbo", "--turbo-from-bytecode"]], "preparser": [["--min-preparse-length=0"]], } ALL_VARIANTS = set(["default", "stress", "turbofan", "turbofan_opt", - "nocrankshaft", "ignition", "preparser"]) + "nocrankshaft", "ignition", "ignition_turbofan", + "preparser"]) FAST_VARIANTS = set(["default", "turbofan"]) STANDARD_VARIANT = set(["default"]) +IGNITION_VARIANT = set(["ignition"]) class VariantGenerator(object): @@ -69,12 +73,15 @@ def __init__(self, suite, variants): self.standard_variant = STANDARD_VARIANT & variants def FilterVariantsByTest(self, testcase): - if testcase.outcomes and statusfile.OnlyStandardVariant( - testcase.outcomes): - return self.standard_variant - if testcase.outcomes and statusfile.OnlyFastVariants(testcase.outcomes): - return self.fast_variants - return self.all_variants + result = self.all_variants + if testcase.outcomes: + if statusfile.OnlyStandardVariant(testcase.outcomes): + return self.standard_variant + if statusfile.OnlyFastVariants(testcase.outcomes): + result = self.fast_variants + if statusfile.NoIgnitionVariant(testcase.outcomes): + result = result - IGNITION_VARIANT + return result def GetFlagSets(self, testcase, variant): if testcase.outcomes and statusfile.OnlyFastVariants(testcase.outcomes): diff --git a/deps/v8/tools/testrunner/network/network_execution.py b/deps/v8/tools/testrunner/network/network_execution.py index c842aba579c4dd..a95440178b4aa6 100644 --- a/deps/v8/tools/testrunner/network/network_execution.py +++ b/deps/v8/tools/testrunner/network/network_execution.py @@ -203,7 +203,6 @@ def _TalkToPeer(self, peer): [constants.INFORM_DURATION, perf_key, test.duration, self.context.arch, self.context.mode], self.local_socket) - self.indicator.AboutToRun(test) has_unexpected_output = test.suite.HasUnexpectedOutput(test) if has_unexpected_output: self.failed.append(test) diff --git a/deps/v8/tools/tickprocessor.js b/deps/v8/tools/tickprocessor.js index ba7401a2236dd3..5534355f1c8cb7 100644 --- a/deps/v8/tools/tickprocessor.js +++ b/deps/v8/tools/tickprocessor.js @@ -83,7 +83,7 @@ function TickProcessor( pairwiseTimedRange, onlySummary) { LogReader.call(this, { - 'shared-library': { parsers: [null, parseInt, parseInt], + 'shared-library': { parsers: [null, parseInt, parseInt, parseInt], processor: this.processSharedLibrary }, 'code-creation': { parsers: [null, parseInt, parseInt, parseInt, null, 'var-args'], @@ -242,13 +242,13 @@ TickProcessor.prototype.processLogFileInTest = function(fileName) { TickProcessor.prototype.processSharedLibrary = function( - name, startAddr, endAddr) { - var entry = this.profile_.addLibrary(name, startAddr, endAddr); + name, startAddr, endAddr, aslrSlide) { + var entry = this.profile_.addLibrary(name, startAddr, endAddr, aslrSlide); this.setCodeType(entry.getName(), 'SHARED_LIB'); var self = this; var libFuncs = this.cppEntriesProvider_.parseVmSymbols( - name, startAddr, endAddr, function(fName, fStart, fEnd) { + name, startAddr, endAddr, aslrSlide, function(fName, fStart, fEnd) { self.profile_.addStaticCode(fName, fStart, fEnd); self.setCodeType(fName, 'CPP'); }); @@ -559,7 +559,7 @@ function CppEntriesProvider() { CppEntriesProvider.prototype.parseVmSymbols = function( - libName, libStart, libEnd, processorFunc) { + libName, libStart, libEnd, libASLRSlide, processorFunc) { this.loadSymbols(libName); var prevEntry; @@ -588,6 +588,7 @@ CppEntriesProvider.prototype.parseVmSymbols = function( } else if (funcInfo === false) { break; } + funcInfo.start += libASLRSlide; if (funcInfo.start < libStart && funcInfo.start < libEnd - libStart) { funcInfo.start += libStart; } diff --git a/deps/v8/tools/try_perf.py b/deps/v8/tools/try_perf.py index fbd4036dadb49c..5565b80826b11a 100755 --- a/deps/v8/tools/try_perf.py +++ b/deps/v8/tools/try_perf.py @@ -44,6 +44,7 @@ 'octane-tf-pr', 'simdjs', 'sunspider', + 'wasm', ] V8_BASE = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) diff --git a/deps/v8/tools/verify_source_deps.py b/deps/v8/tools/verify_source_deps.py index 50caace79c8e71..56e3156550aa4c 100755 --- a/deps/v8/tools/verify_source_deps.py +++ b/deps/v8/tools/verify_source_deps.py @@ -24,10 +24,10 @@ GYP_FILES = [ os.path.join(V8_BASE, 'src', 'd8.gyp'), + os.path.join(V8_BASE, 'src', 'v8.gyp'), os.path.join(V8_BASE, 'src', 'third_party', 'vtune', 'v8vtune.gyp'), os.path.join(V8_BASE, 'test', 'cctest', 'cctest.gyp'), os.path.join(V8_BASE, 'test', 'unittests', 'unittests.gyp'), - os.path.join(V8_BASE, 'tools', 'gyp', 'v8.gyp'), os.path.join(V8_BASE, 'tools', 'parser-shell.gyp'), ] diff --git a/deps/v8/tools/whitespace.txt b/deps/v8/tools/whitespace.txt index d1395f5d9132ac..c571b76398fa8d 100644 --- a/deps/v8/tools/whitespace.txt +++ b/deps/v8/tools/whitespace.txt @@ -5,4 +5,4 @@ Try to write something funny. And please don't add trailing whitespace. A Smi balks into a war and says: "I'm so deoptimized today!" The doubles heard this and started to unbox. -The Smi looked at them when a crazy v8-autoroll account showed up.. +The Smi looked at them when a crazy v8-autoroll account showed NaN.. diff --git a/node.gyp b/node.gyp index e8b957267e9710..04dc4608fffe03 100644 --- a/node.gyp +++ b/node.gyp @@ -255,8 +255,8 @@ }], [ 'node_use_bundled_v8=="true"', { 'dependencies': [ - 'deps/v8/tools/gyp/v8.gyp:v8', - 'deps/v8/tools/gyp/v8.gyp:v8_libplatform' + 'deps/v8/src/v8.gyp:v8', + 'deps/v8/src/v8.gyp:v8_libplatform' ], }], [ 'node_use_v8_platform=="true"', { @@ -451,7 +451,7 @@ 'defines': [ 'NODE_NO_BROWSER_GLOBALS' ], } ], [ 'node_use_bundled_v8=="true" and v8_postmortem_support=="true"', { - 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ], + 'dependencies': [ 'deps/v8/src/v8.gyp:postmortem-metadata' ], 'conditions': [ # -force_load is not applicable for the static library [ 'node_target_type!="static_library"', { @@ -856,13 +856,13 @@ }], [ 'node_use_v8_platform=="true"', { 'dependencies': [ - 'deps/v8/tools/gyp/v8.gyp:v8_libplatform', + 'deps/v8/src/v8.gyp:v8_libplatform', ], }], [ 'node_use_bundled_v8=="true"', { 'dependencies': [ - 'deps/v8/tools/gyp/v8.gyp:v8', - 'deps/v8/tools/gyp/v8.gyp:v8_libplatform' + 'deps/v8/src/v8.gyp:v8', + 'deps/v8/src/v8.gyp:v8_libplatform' ], }], ] diff --git a/test/parallel/test-util-inspect-proxy.js b/test/parallel/test-util-inspect-proxy.js index 744bf235266e86..8b137891791fe9 100644 --- a/test/parallel/test-util-inspect-proxy.js +++ b/test/parallel/test-util-inspect-proxy.js @@ -1,84 +1 @@ -'use strict'; -require('../common'); -const assert = require('assert'); -const util = require('util'); -const processUtil = process.binding('util'); -const opts = {showProxy: true}; - -const target = {}; -const handler = { - get: function() { throw new Error('Getter should not be called'); } -}; -const proxyObj = new Proxy(target, handler); - -// Inspecting the proxy should not actually walk it's properties -assert.doesNotThrow(() => util.inspect(proxyObj, opts)); - -// getProxyDetails is an internal method, not intended for public use. -// This is here to test that the internals are working correctly. -const details = processUtil.getProxyDetails(proxyObj); -assert.strictEqual(target, details[0]); -assert.strictEqual(handler, details[1]); - -assert.strictEqual(util.inspect(proxyObj, opts), - 'Proxy [ {}, { get: [Function: get] } ]'); - -// Using getProxyDetails with non-proxy returns undefined -assert.strictEqual(processUtil.getProxyDetails({}), undefined); - -// This will throw because the showProxy option is not used -// and the get function on the handler object defined above -// is actually invoked. -assert.throws( - () => util.inspect(proxyObj) -); - -// Yo dawg, I heard you liked Proxy so I put a Proxy -// inside your Proxy that proxies your Proxy's Proxy. -const proxy1 = new Proxy({}, {}); -const proxy2 = new Proxy(proxy1, {}); -const proxy3 = new Proxy(proxy2, proxy1); -const proxy4 = new Proxy(proxy1, proxy2); -const proxy5 = new Proxy(proxy3, proxy4); -const proxy6 = new Proxy(proxy5, proxy5); -const expected0 = '{}'; -const expected1 = 'Proxy [ {}, {} ]'; -const expected2 = 'Proxy [ Proxy [ {}, {} ], {} ]'; -const expected3 = 'Proxy [ Proxy [ Proxy [ {}, {} ], {} ], Proxy [ {}, {} ] ]'; -const expected4 = 'Proxy [ Proxy [ {}, {} ], Proxy [ Proxy [ {}, {} ], {} ] ]'; -const expected5 = 'Proxy [ Proxy [ Proxy [ Proxy [Object], {} ],' + - ' Proxy [ {}, {} ] ],\n Proxy [ Proxy [ {}, {} ]' + - ', Proxy [ Proxy [Object], {} ] ] ]'; -const expected6 = 'Proxy [ Proxy [ Proxy [ Proxy [Object], Proxy [Object]' + - ' ],\n Proxy [ Proxy [Object], Proxy [Object] ] ],\n' + - ' Proxy [ Proxy [ Proxy [Object], Proxy [Object] ],\n' + - ' Proxy [ Proxy [Object], Proxy [Object] ] ] ]'; -assert.strictEqual(util.inspect(proxy1, opts), expected1); -assert.strictEqual(util.inspect(proxy2, opts), expected2); -assert.strictEqual(util.inspect(proxy3, opts), expected3); -assert.strictEqual(util.inspect(proxy4, opts), expected4); -assert.strictEqual(util.inspect(proxy5, opts), expected5); -assert.strictEqual(util.inspect(proxy6, opts), expected6); -assert.strictEqual(util.inspect(proxy1), expected0); -assert.strictEqual(util.inspect(proxy2), expected0); -assert.strictEqual(util.inspect(proxy3), expected0); -assert.strictEqual(util.inspect(proxy4), expected0); -assert.strictEqual(util.inspect(proxy5), expected0); -assert.strictEqual(util.inspect(proxy6), expected0); - -// Just for fun, let's create a Proxy using Arrays. -const proxy7 = new Proxy([], []); -const expected7 = 'Proxy [ [], [] ]'; -assert.strictEqual(util.inspect(proxy7, opts), expected7); -assert.strictEqual(util.inspect(proxy7), '[]'); - -// Now we're just getting silly, right? -const proxy8 = new Proxy(Date, []); -const proxy9 = new Proxy(Date, String); -const expected8 = 'Proxy [ [Function: Date], [] ]'; -const expected9 = 'Proxy [ [Function: Date], [Function: String] ]'; -assert.strictEqual(util.inspect(proxy8, opts), expected8); -assert.strictEqual(util.inspect(proxy9, opts), expected9); -assert.strictEqual(util.inspect(proxy8), '[Function: Date]'); -assert.strictEqual(util.inspect(proxy9), '[Function: Date]'); diff --git a/tools/icu/icu-generic.gyp b/tools/icu/icu-generic.gyp index 9d466ac39227c3..ecbf6d18c24ee3 100644 --- a/tools/icu/icu-generic.gyp +++ b/tools/icu/icu-generic.gyp @@ -42,7 +42,6 @@ }], ], 'defines': [ - 'UCONFIG_NO_TRANSLITERATION=1', 'UCONFIG_NO_SERVICE=1', 'UCONFIG_NO_REGULAR_EXPRESSIONS=1', 'U_ENABLE_DYLOAD=0', diff --git a/tools/icu/icu_small.json b/tools/icu/icu_small.json index de26e2cbb14b16..8791269e53b60e 100644 --- a/tools/icu/icu_small.json +++ b/tools/icu/icu_small.json @@ -25,7 +25,7 @@ "zone": "locales", "converters": "none", "stringprep": "locales", - "translit": "none", + "translit": "locales", "brkfiles": "none", "brkdict": "none", "confusables": "none",