diff --git a/.gitignore b/.gitignore index a3e3a28b07dc96..18240c442e00cf 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ icu_config.gypi # various stuff that VC++ produces/uses Debug/ !node_modules/debug/ +!deps/v8/src/debug/ Release/ !doc/blog/** *.sln diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index d0a859c12dacf9..cc5606e8547162 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -60,6 +60,7 @@ shell_g /test/promises-aplus/promises-tests /test/promises-aplus/promises-tests.tar.gz /test/promises-aplus/sinon +/test/simdjs/CHECKED_OUT_* /test/simdjs/ecmascript_simd* /test/simdjs/data* /test/test262/data diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index 4f853c275bc249..72c23bcc83e0b7 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -44,6 +44,7 @@ Bert Belder Burcu Dogan Caitlin Potter Craig Schlenter +Chris Nardi Christopher A. Taylor Daniel Andersson Daniel James diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 3eb7fc73eb9aae..fae41a7361336f 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -203,8 +203,8 @@ action("js2c") { sources = [ "src/macros.py", "src/messages.h", - "src/runtime.js", "src/prologue.js", + "src/runtime.js", "src/v8natives.js", "src/symbol.js", "src/array.js", @@ -227,12 +227,12 @@ action("js2c") { "src/json.js", "src/array-iterator.js", "src/string-iterator.js", - "src/debug-debugger.js", - "src/mirror-debugger.js", - "src/liveedit-debugger.js", "src/templates.js", "src/harmony-array.js", "src/harmony-typedarray.js", + "src/debug/mirrors.js", + "src/debug/debug.js", + "src/debug/liveedit.js", ] outputs = [ @@ -257,6 +257,40 @@ action("js2c") { } } +action("js2c_code_stubs") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + script = "tools/js2c.py" + + # The script depends on this other script, this rule causes a rebuild if it + # changes. + inputs = [ "tools/jsmin.py" ] + + sources = [ + "src/macros.py", + "src/messages.h", + "src/code-stubs.js" + ] + + outputs = [ + "$target_gen_dir/code-stub-libraries.cc", + ] + + args = [ + rebase_path("$target_gen_dir/code-stub-libraries.cc", + root_build_dir), + "CODE_STUB", + ] + rebase_path(sources, root_build_dir) + + if (v8_use_external_startup_data) { + outputs += [ "$target_gen_dir/libraries_code_stub.bin" ] + args += [ + "--startup_blob", + rebase_path("$target_gen_dir/libraries_code_stub.bin", root_build_dir), + ] + } +} + action("js2c_experimental") { visibility = [ ":*" ] # Only targets in this file can depend on this. @@ -279,7 +313,9 @@ action("js2c_experimental") { "src/harmony-reflect.js", "src/harmony-spread.js", "src/harmony-object.js", - "src/harmony-sharedarraybuffer.js" + "src/harmony-object-observe.js", + "src/harmony-sharedarraybuffer.js", + "src/harmony-simd.js" ] outputs = [ @@ -355,12 +391,14 @@ if (v8_use_external_startup_data) { deps = [ ":js2c", + ":js2c_code_stubs", ":js2c_experimental", ":js2c_extras", ] sources = [ "$target_gen_dir/libraries.bin", + "$target_gen_dir/libraries_code_stub.bin", "$target_gen_dir/libraries_experimental.bin", "$target_gen_dir/libraries_extras.bin", ] @@ -446,6 +484,7 @@ source_set("v8_nosnapshot") { deps = [ ":js2c", + ":js2c_code_stubs", ":js2c_experimental", ":js2c_extras", ":v8_base", @@ -453,6 +492,7 @@ source_set("v8_nosnapshot") { sources = [ "$target_gen_dir/libraries.cc", + "$target_gen_dir/code-stub-libraries.cc", "$target_gen_dir/experimental-libraries.cc", "$target_gen_dir/extras-libraries.cc", "src/snapshot/snapshot-empty.cc", @@ -477,6 +517,7 @@ source_set("v8_snapshot") { deps = [ ":js2c", + ":js2c_code_stubs", ":js2c_experimental", ":js2c_extras", ":v8_base", @@ -489,6 +530,7 @@ source_set("v8_snapshot") { sources = [ "$target_gen_dir/libraries.cc", + "$target_gen_dir/code-stub-libraries.cc", "$target_gen_dir/experimental-libraries.cc", "$target_gen_dir/extras-libraries.cc", "$target_gen_dir/snapshot.cc", @@ -509,6 +551,7 @@ if (v8_use_external_startup_data) { deps = [ ":js2c", + ":js2c_code_stubs", ":js2c_experimental", ":js2c_extras", ":v8_base", @@ -587,13 +630,13 @@ source_set("v8_base") { "src/bootstrapper.h", "src/builtins.cc", "src/builtins.h", - "src/bytecodes-irregexp.h", + "src/cancelable-task.cc", + "src/cancelable-task.h", "src/cached-powers.cc", "src/cached-powers.h", "src/char-predicates.cc", "src/char-predicates-inl.h", "src/char-predicates.h", - "src/checks.cc", "src/checks.h", "src/circular-queue-inl.h", "src/circular-queue.h", @@ -623,6 +666,7 @@ source_set("v8_base") { "src/compiler/basic-block-instrumentor.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", @@ -643,6 +687,7 @@ source_set("v8_base") { "src/compiler/dead-code-elimination.cc", "src/compiler/dead-code-elimination.h", "src/compiler/diamond.h", + "src/compiler/frame.cc", "src/compiler/frame.h", "src/compiler/frame-elider.cc", "src/compiler/frame-elider.h", @@ -650,7 +695,6 @@ source_set("v8_base") { "src/compiler/frame-states.h", "src/compiler/gap-resolver.cc", "src/compiler/gap-resolver.h", - "src/compiler/graph-builder.h", "src/compiler/graph-reducer.cc", "src/compiler/graph-reducer.h", "src/compiler/graph-replay.cc", @@ -669,8 +713,12 @@ source_set("v8_base") { "src/compiler/instruction-selector.h", "src/compiler/instruction.cc", "src/compiler/instruction.h", + "src/compiler/interpreter-assembler.cc", + "src/compiler/interpreter-assembler.h", "src/compiler/js-builtin-reducer.cc", "src/compiler/js-builtin-reducer.h", + "src/compiler/js-context-relaxation.cc", + "src/compiler/js-context-relaxation.h", "src/compiler/js-context-specialization.cc", "src/compiler/js-context-specialization.h", "src/compiler/js-frame-specialization.cc", @@ -687,11 +735,12 @@ source_set("v8_base") { "src/compiler/js-operator.h", "src/compiler/js-type-feedback.cc", "src/compiler/js-type-feedback.h", + "src/compiler/js-type-feedback-lowering.cc", + "src/compiler/js-type-feedback-lowering.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-impl.h", "src/compiler/linkage.cc", "src/compiler/linkage.h", "src/compiler/liveness-analyzer.cc", @@ -732,6 +781,8 @@ source_set("v8_base") { "src/compiler/pipeline.h", "src/compiler/pipeline-statistics.cc", "src/compiler/pipeline-statistics.h", + "src/compiler/preprocess-live-ranges.cc", + "src/compiler/preprocess-live-ranges.h", "src/compiler/raw-machine-assembler.cc", "src/compiler/raw-machine-assembler.h", "src/compiler/register-allocator.cc", @@ -769,6 +820,8 @@ source_set("v8_base") { "src/compiler/zone-pool.h", "src/compiler.cc", "src/compiler.h", + "src/context-measure.cc", + "src/context-measure.h", "src/contexts.cc", "src/contexts.h", "src/conversions-inl.h", @@ -784,8 +837,16 @@ source_set("v8_base") { "src/dateparser-inl.h", "src/dateparser.cc", "src/dateparser.h", - "src/debug.cc", - "src/debug.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", @@ -828,10 +889,12 @@ source_set("v8_base") { "src/frames-inl.h", "src/frames.cc", "src/frames.h", - "src/full-codegen.cc", - "src/full-codegen.h", + "src/full-codegen/full-codegen.cc", + "src/full-codegen/full-codegen.h", "src/func-name-inferrer.cc", "src/func-name-inferrer.h", + "src/futex-emulation.cc", + "src/futex-emulation.h", "src/gdb-jit.cc", "src/gdb-jit.h", "src/global-handles.cc", @@ -944,15 +1007,18 @@ source_set("v8_base") { "src/ic/stub-cache.h", "src/interface-descriptors.cc", "src/interface-descriptors.h", - "src/interpreter-irregexp.cc", - "src/interpreter-irregexp.h", + "src/interpreter/bytecodes.cc", + "src/interpreter/bytecodes.h", + "src/interpreter/bytecode-array-builder.cc", + "src/interpreter/bytecode-array-builder.h", + "src/interpreter/bytecode-generator.cc", + "src/interpreter/bytecode-generator.h", + "src/interpreter/interpreter.cc", + "src/interpreter/interpreter.h", "src/isolate.cc", "src/isolate.h", "src/json-parser.h", "src/json-stringifier.h", - "src/jsregexp-inl.h", - "src/jsregexp.cc", - "src/jsregexp.h", "src/layout-descriptor-inl.h", "src/layout-descriptor.cc", "src/layout-descriptor.h", @@ -965,8 +1031,6 @@ source_set("v8_base") { "src/lithium-codegen.h", "src/lithium.cc", "src/lithium.h", - "src/liveedit.cc", - "src/liveedit.h", "src/log-inl.h", "src/log-utils.cc", "src/log-utils.h", @@ -1009,17 +1073,23 @@ source_set("v8_base") { "src/property.cc", "src/property.h", "src/prototype.h", - "src/regexp-macro-assembler-irregexp-inl.h", - "src/regexp-macro-assembler-irregexp.cc", - "src/regexp-macro-assembler-irregexp.h", - "src/regexp-macro-assembler-tracer.cc", - "src/regexp-macro-assembler-tracer.h", - "src/regexp-macro-assembler.cc", - "src/regexp-macro-assembler.h", - "src/regexp-stack.cc", - "src/regexp-stack.h", "src/rewriter.cc", "src/rewriter.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-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-stack.cc", + "src/regexp/regexp-stack.h", "src/runtime-profiler.cc", "src/runtime-profiler.h", "src/runtime/runtime-array.cc", @@ -1031,6 +1101,7 @@ source_set("v8_base") { "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", @@ -1044,6 +1115,7 @@ source_set("v8_base") { "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", @@ -1067,8 +1139,8 @@ source_set("v8_base") { "src/signature.h", "src/simulator.h", "src/small-pointer-list.h", - "src/smart-pointers.h", "src/snapshot/natives.h", + "src/snapshot/natives-common.cc", "src/snapshot/serialize.cc", "src/snapshot/serialize.h", "src/snapshot/snapshot-common.cc", @@ -1081,7 +1153,6 @@ source_set("v8_base") { "src/startup-data-util.cc", "src/string-builder.cc", "src/string-builder.h", - "src/string-search.cc", "src/string-search.h", "src/string-stream.cc", "src/string-stream.h", @@ -1144,12 +1215,10 @@ source_set("v8_base") { "src/ia32/codegen-ia32.cc", "src/ia32/codegen-ia32.h", "src/ia32/cpu-ia32.cc", - "src/ia32/debug-ia32.cc", "src/ia32/deoptimizer-ia32.cc", "src/ia32/disasm-ia32.cc", "src/ia32/frames-ia32.cc", "src/ia32/frames-ia32.h", - "src/ia32/full-codegen-ia32.cc", "src/ia32/interface-descriptors-ia32.cc", "src/ia32/lithium-codegen-ia32.cc", "src/ia32/lithium-codegen-ia32.h", @@ -1159,17 +1228,18 @@ source_set("v8_base") { "src/ia32/lithium-ia32.h", "src/ia32/macro-assembler-ia32.cc", "src/ia32/macro-assembler-ia32.h", - "src/ia32/regexp-macro-assembler-ia32.cc", - "src/ia32/regexp-macro-assembler-ia32.h", "src/compiler/ia32/code-generator-ia32.cc", "src/compiler/ia32/instruction-codes-ia32.h", "src/compiler/ia32/instruction-selector-ia32.cc", - "src/compiler/ia32/linkage-ia32.cc", + "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", ] } else if (v8_target_arch == "x64") { sources += [ @@ -1182,12 +1252,10 @@ source_set("v8_base") { "src/x64/codegen-x64.cc", "src/x64/codegen-x64.h", "src/x64/cpu-x64.cc", - "src/x64/debug-x64.cc", "src/x64/deoptimizer-x64.cc", "src/x64/disasm-x64.cc", "src/x64/frames-x64.cc", "src/x64/frames-x64.h", - "src/x64/full-codegen-x64.cc", "src/x64/interface-descriptors-x64.cc", "src/x64/lithium-codegen-x64.cc", "src/x64/lithium-codegen-x64.h", @@ -1197,17 +1265,18 @@ source_set("v8_base") { "src/x64/lithium-x64.h", "src/x64/macro-assembler-x64.cc", "src/x64/macro-assembler-x64.h", - "src/x64/regexp-macro-assembler-x64.cc", - "src/x64/regexp-macro-assembler-x64.h", "src/compiler/x64/code-generator-x64.cc", "src/compiler/x64/instruction-codes-x64.h", "src/compiler/x64/instruction-selector-x64.cc", - "src/compiler/x64/linkage-x64.cc", + "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", ] } else if (v8_target_arch == "arm") { sources += [ @@ -1222,12 +1291,10 @@ source_set("v8_base") { "src/arm/constants-arm.h", "src/arm/constants-arm.cc", "src/arm/cpu-arm.cc", - "src/arm/debug-arm.cc", "src/arm/deoptimizer-arm.cc", "src/arm/disasm-arm.cc", "src/arm/frames-arm.cc", "src/arm/frames-arm.h", - "src/arm/full-codegen-arm.cc", "src/arm/interface-descriptors-arm.cc", "src/arm/interface-descriptors-arm.h", "src/arm/lithium-arm.cc", @@ -1238,19 +1305,20 @@ source_set("v8_base") { "src/arm/lithium-gap-resolver-arm.h", "src/arm/macro-assembler-arm.cc", "src/arm/macro-assembler-arm.h", - "src/arm/regexp-macro-assembler-arm.cc", - "src/arm/regexp-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-selector-arm.cc", - "src/compiler/arm/linkage-arm.cc", + "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", ] } else if (v8_target_arch == "arm64") { sources += [ @@ -1264,7 +1332,6 @@ source_set("v8_base") { "src/arm64/code-stubs-arm64.h", "src/arm64/constants-arm64.h", "src/arm64/cpu-arm64.cc", - "src/arm64/debug-arm64.cc", "src/arm64/decoder-arm64.cc", "src/arm64/decoder-arm64.h", "src/arm64/decoder-arm64-inl.h", @@ -1273,7 +1340,6 @@ source_set("v8_base") { "src/arm64/disasm-arm64.h", "src/arm64/frames-arm64.cc", "src/arm64/frames-arm64.h", - "src/arm64/full-codegen-arm64.cc", "src/arm64/instructions-arm64.cc", "src/arm64/instructions-arm64.h", "src/arm64/instrument-arm64.cc", @@ -1289,8 +1355,6 @@ source_set("v8_base") { "src/arm64/macro-assembler-arm64.cc", "src/arm64/macro-assembler-arm64.h", "src/arm64/macro-assembler-arm64-inl.h", - "src/arm64/regexp-macro-assembler-arm64.cc", - "src/arm64/regexp-macro-assembler-arm64.h", "src/arm64/simulator-arm64.cc", "src/arm64/simulator-arm64.h", "src/arm64/utils-arm64.cc", @@ -1298,12 +1362,15 @@ source_set("v8_base") { "src/compiler/arm64/code-generator-arm64.cc", "src/compiler/arm64/instruction-codes-arm64.h", "src/compiler/arm64/instruction-selector-arm64.cc", - "src/compiler/arm64/linkage-arm64.cc", + "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", ] } else if (v8_target_arch == "mipsel") { sources += [ @@ -1318,12 +1385,10 @@ source_set("v8_base") { "src/mips/constants-mips.cc", "src/mips/constants-mips.h", "src/mips/cpu-mips.cc", - "src/mips/debug-mips.cc", "src/mips/deoptimizer-mips.cc", "src/mips/disasm-mips.cc", "src/mips/frames-mips.cc", "src/mips/frames-mips.h", - "src/mips/full-codegen-mips.cc", "src/mips/interface-descriptors-mips.cc", "src/mips/lithium-codegen-mips.cc", "src/mips/lithium-codegen-mips.h", @@ -1333,19 +1398,20 @@ source_set("v8_base") { "src/mips/lithium-mips.h", "src/mips/macro-assembler-mips.cc", "src/mips/macro-assembler-mips.h", - "src/mips/regexp-macro-assembler-mips.cc", - "src/mips/regexp-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-selector-mips.cc", - "src/compiler/mips/linkage-mips.cc", + "src/debug/mips/debug-mips.cc", + "src/full-codegen/mips/full-codegen-mips.cc", "src/ic/mips/access-compiler-mips.cc", "src/ic/mips/handler-compiler-mips.cc", "src/ic/mips/ic-mips.cc", "src/ic/mips/ic-compiler-mips.cc", "src/ic/mips/stub-cache-mips.cc", + "src/regexp/mips/regexp-macro-assembler-mips.cc", + "src/regexp/mips/regexp-macro-assembler-mips.h", ] } else if (v8_target_arch == "mips64el") { sources += [ @@ -1360,12 +1426,10 @@ source_set("v8_base") { "src/mips64/constants-mips64.cc", "src/mips64/constants-mips64.h", "src/mips64/cpu-mips64.cc", - "src/mips64/debug-mips64.cc", "src/mips64/deoptimizer-mips64.cc", "src/mips64/disasm-mips64.cc", "src/mips64/frames-mips64.cc", "src/mips64/frames-mips64.h", - "src/mips64/full-codegen-mips64.cc", "src/mips64/interface-descriptors-mips64.cc", "src/mips64/lithium-codegen-mips64.cc", "src/mips64/lithium-codegen-mips64.h", @@ -1375,15 +1439,17 @@ source_set("v8_base") { "src/mips64/lithium-mips64.h", "src/mips64/macro-assembler-mips64.cc", "src/mips64/macro-assembler-mips64.h", - "src/mips64/regexp-macro-assembler-mips64.cc", - "src/mips64/regexp-macro-assembler-mips64.h", "src/mips64/simulator-mips64.cc", "src/mips64/simulator-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", ] } @@ -1479,6 +1545,7 @@ source_set("v8_libbase") { "src/base/safe_conversions_impl.h", "src/base/safe_math.h", "src/base/safe_math_impl.h", + "src/base/smart-pointers.h", "src/base/sys-info.cc", "src/base/sys-info.h", "src/base/utils/random-number-generator.cc", @@ -1700,7 +1767,7 @@ if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") || "//build/config/sanitizers:deps", ] - # TODO(jochen): Add support for readline and vtunejit. + # TODO(jochen): Add support for vtunejit. if (is_posix) { sources += [ "src/d8-posix.cc" ] @@ -1710,8 +1777,6 @@ if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") || if (!is_component_build) { sources += [ - "src/d8-debug.cc", - "src/d8-debug.h", "$target_gen_dir/d8-js.cc", ] } diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index e8ce91563387b5..0dff96acc769d6 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,574 @@ +2015-08-19: Version 4.6.85 + + Performance and stability improvements on all platforms. + + +2015-08-19: Version 4.6.84 + + Performance and stability improvements on all platforms. + + +2015-08-19: Version 4.6.83 + + Performance and stability improvements on all platforms. + + +2015-08-18: Version 4.6.82 + + Performance and stability improvements on all platforms. + + +2015-08-18: Version 4.6.81 + + Performance and stability improvements on all platforms. + + +2015-08-18: Version 4.6.80 + + Filter out slot buffer slots, that point to SMIs in dead objects + (Chromium issues 454297, 519577). + + Performance and stability improvements on all platforms. + + +2015-08-17: Version 4.6.79 + + Performance and stability improvements on all platforms. + + +2015-08-17: Version 4.6.78 + + Put V8 extras into the snapshot. + + Performance and stability improvements on all platforms. + + +2015-08-15: Version 4.6.77 + + Performance and stability improvements on all platforms. + + +2015-08-14: Version 4.6.76 + + Performance and stability improvements on all platforms. + + +2015-08-14: Version 4.6.75 + + Performance and stability improvements on all platforms. + + +2015-08-14: Version 4.6.74 + + Performance and stability improvements on all platforms. + + +2015-08-13: Version 4.6.73 + + Performance and stability improvements on all platforms. + + +2015-08-13: Version 4.6.72 + + Stage sloppy classes (issue 3305). + + Performance and stability improvements on all platforms. + + +2015-08-13: Version 4.6.71 + + Performance and stability improvements on all platforms. + + +2015-08-12: Version 4.6.70 + + Performance and stability improvements on all platforms. + + +2015-08-12: Version 4.6.69 + + Stage --harmony-array-includes (issue 3575). + + Performance and stability improvements on all platforms. + + +2015-08-12: Version 4.6.68 + + Use a new lexical context for sloppy-mode eval (issue 4288). + + Add includes method to typed arrays (issue 3575). + + Performance and stability improvements on all platforms. + + +2015-08-11: Version 4.6.67 + + Performance and stability improvements on all platforms. + + +2015-08-11: Version 4.6.66 + + Performance and stability improvements on all platforms. + + +2015-08-11: Version 4.6.65 + + Performance and stability improvements on all platforms. + + +2015-08-10: Version 4.6.64 + + Disable --global-var-shortcuts (Chromium issue 517778). + + Performance and stability improvements on all platforms. + + +2015-08-10: Version 4.6.63 + + Performance and stability improvements on all platforms. + + +2015-08-09: Version 4.6.62 + + Performance and stability improvements on all platforms. + + +2015-08-08: Version 4.6.61 + + Performance and stability improvements on all platforms. + + +2015-08-08: Version 4.6.60 + + [IC] Make SeededNumberDictionary::UpdateMaxNumberKey prototype aware + (issue 4335). + + Performance and stability improvements on all platforms. + + +2015-08-08: Version 4.6.59 + + Performance and stability improvements on all platforms. + + +2015-08-07: Version 4.6.58 + + Performance and stability improvements on all platforms. + + +2015-08-07: Version 4.6.57 + + Rename "extras exports" to "extras binding" (Chromium issue 507133). + + Performance and stability improvements on all platforms. + + +2015-08-07: Version 4.6.56 + + Performance and stability improvements on all platforms. + + +2015-08-06: Version 4.6.55 + + Fix off-by-one in Array.concat's max index check (Chromium issue + 516592). + + Performance and stability improvements on all platforms. + + +2015-08-06: Version 4.6.54 + + Performance and stability improvements on all platforms. + + +2015-08-06: Version 4.6.53 + + Performance and stability improvements on all platforms. + + +2015-08-05: Version 4.6.52 + + Ship --harmony-new-target (issue 3887). + + Performance and stability improvements on all platforms. + + +2015-08-04: Version 4.6.51 + + Performance and stability improvements on all platforms. + + +2015-08-04: Version 4.6.50 + + Performance and stability improvements on all platforms. + + +2015-08-03: Version 4.6.49 + + SIMD.js Add the other SIMD Phase 1 types (issue 4124). + + Performance and stability improvements on all platforms. + + +2015-08-03: Version 4.6.48 + + Performance and stability improvements on all platforms. + + +2015-08-03: Version 4.6.47 + + Performance and stability improvements on all platforms. + + +2015-08-01: Version 4.6.46 + + Performance and stability improvements on all platforms. + + +2015-08-01: Version 4.6.45 + + Performance and stability improvements on all platforms. + + +2015-08-01: Version 4.6.44 + + Performance and stability improvements on all platforms. + + +2015-07-31: Version 4.6.43 + + Performance and stability improvements on all platforms. + + +2015-07-31: Version 4.6.42 + + Performance and stability improvements on all platforms. + + +2015-07-31: Version 4.6.41 + + Performance and stability improvements on all platforms. + + +2015-07-30: Version 4.6.40 + + Pass the kGCCallbackFlagForced flag when invoking + Heap::CollectAllGarbage from AdjustAmountOfExternalAllocatedMemory + (Chromium issue 511294). + + Performance and stability improvements on all platforms. + + +2015-07-30: Version 4.6.39 + + Performance and stability improvements on all platforms. + + +2015-07-30: Version 4.6.38 + + Performance and stability improvements on all platforms. + + +2015-07-29: Version 4.6.37 + + Performance and stability improvements on all platforms. + + +2015-07-28: Version 4.6.36 + + Fix prototype registration upon SlowToFast migration (Chromium issue + 513602). + + Bugfix: Incorrect type feedback vector structure on recompile (Chromium + issue 514526). + + Reland of "Remove ExternalArray, derived types, and element kinds" + (issue 3996). + + Performance and stability improvements on all platforms. + + +2015-07-28: Version 4.6.35 + + Performance and stability improvements on all platforms. + + +2015-07-28: Version 4.6.34 + + Remove ExternalArray, derived types, and element kinds (issue 3996). + + Make V8 compile with MSVS 2015 (issue 4326). + + Performance and stability improvements on all platforms. + + +2015-07-27: Version 4.6.33 + + Performance and stability improvements on all platforms. + + +2015-07-26: Version 4.6.32 + + Performance and stability improvements on all platforms. + + +2015-07-25: Version 4.6.31 + + Performance and stability improvements on all platforms. + + +2015-07-25: Version 4.6.30 + + Make dates default to the local timezone if none specified (issue 4242, + Chromium issue 391730). + + Performance and stability improvements on all platforms. + + +2015-07-24: Version 4.6.29 + + Performance and stability improvements on all platforms. + + +2015-07-24: Version 4.6.28 + + Performance and stability improvements on all platforms. + + +2015-07-23: Version 4.6.27 + + Fix check for a date with a 24th hour (Chromium issue 174609). + + Performance and stability improvements on all platforms. + + +2015-07-23: Version 4.6.26 + + Performance and stability improvements on all platforms. + + +2015-07-22: Version 4.6.25 + + Performance and stability improvements on all platforms. + + +2015-07-22: Version 4.6.24 + + Performance and stability improvements on all platforms. + + +2015-07-22: Version 4.6.23 + + Performance and stability improvements on all platforms. + + +2015-07-21: Version 4.6.22 + + Performance and stability improvements on all platforms. + + +2015-07-21: Version 4.6.21 + + Performance and stability improvements on all platforms. + + +2015-07-21: Version 4.6.20 + + Don't run the second pass of the pending phantom callbacks if the heap + has been torn down (Chromium issue 511204). + + Debugger: prepare code for debugging on a per-function basis (issue + 4132). + + Performance and stability improvements on all platforms. + + +2015-07-20: Version 4.6.19 + + Performance and stability improvements on all platforms. + + +2015-07-20: Version 4.6.18 + + Performance and stability improvements on all platforms. + + +2015-07-19: Version 4.6.17 + + Performance and stability improvements on all platforms. + + +2015-07-18: Version 4.6.16 + + Performance and stability improvements on all platforms. + + +2015-07-18: Version 4.6.15 + + Make NumberFormat use the ICU currency data, fix bug in NumberFormat + (Chromium issues 304722, 435465, 473104). + + Properly fix enumerate / Object.keys wrt access checked objects + (Chromium issue 509936). + + Fix object enumeration wrt access checked objects (Chromium issue + 509936). + + Fix DefineOwnProperty for data properties wrt failed access checks + (Chromium issue 509936). + + Fix GetOwnPropertyNames on access-checked objects (Chromium issue + 509936). + + Fix getPrototypeOf for access checked objects (Chromium issue 509936). + + Delete APIs deprecated since last release. + + Performance and stability improvements on all platforms. + + +2015-07-17: Version 4.6.14 + + Array.prototype.reverse should call [[HasProperty]] on elements before + [[Get]] (issue 4223). + + In RegExp, lastIndex is read with ToLength, not ToInteger (issue 4244). + + Stage --harmony-new-target (issue 3887). + + Re-ship harmony spread calls and spread arrays (issue 3018). + + Expose SIMD.Float32x4 type to Javascript. This CL exposes the + constructor function, defines type related information, and implements + value type semantics. It also refactors test/mjsunit/samevalue.js to + test SameValue and SameValueZero (issue 4124). + + Performance and stability improvements on all platforms. + + +2015-07-17: Version 4.6.13 + + Performance and stability improvements on all platforms. + + +2015-07-16: Version 4.6.12 + + Performance and stability improvements on all platforms. + + +2015-07-16: Version 4.6.11 + + Performance and stability improvements on all platforms. + + +2015-07-16: Version 4.6.10 + + Expose SIMD.Float32x4 type to Javascript. This CL exposes the + constructor function, defines type related information, and implements + value type semantics. It also refactors test/mjsunit/samevalue.js to + test SameValue and SameValueZero (issue 4124). + + Fix runtime-atomics for Win 10 SDK and remove volatile (Chromium issues + 440500, 491424). + + Performance and stability improvements on all platforms. + + +2015-07-15: Version 4.6.9 + + Let the second pass phantom callbacks run in a separate task on the + foreground thread. + + Performance and stability improvements on all platforms. + + +2015-07-15: Version 4.6.8 + + Optimize String.prototype.includes (issue 3807). + + Unship spread calls and spread arrays (issue 4298). + + Performance and stability improvements on all platforms. + + +2015-07-15: Version 4.6.7 + + Performance and stability improvements on all platforms. + + +2015-07-14: Version 4.6.6 + + Performance and stability improvements on all platforms. + + +2015-07-14: Version 4.6.5 + + Performance and stability improvements on all platforms. + + +2015-07-14: Version 4.6.4 + + MIPS64: Fix BlockTrampolinePoolFor() to emit trampoline before blocking, + if needed (issue 4294). + + Add convenience method for converting v8::PersistentBase to v8::Local. + + Performance and stability improvements on all platforms. + + +2015-07-13: Version 4.6.3 + + MIPS: Fix BlockTrampolinePoolFor() to emit trampoline before blocking, + if needed (issue 4294). + + Performance and stability improvements on all platforms. + + +2015-07-13: Version 4.6.2 + + [arm] CheckConstPool between TurboFan instructions (issue 4292). + + Fix keyed access of primitive objects in the runtime. For now it uses a + pretty slow path for accessing strings by wrapping it into a new + temporary wrapper (issues 3088, 4042). + + Performance and stability improvements on all platforms. + + +2015-07-12: Version 4.6.1 + + Performance and stability improvements on all platforms. + + +2015-07-09: Version 4.5.107 + + [arm] Don't call branch_offset within CheckConstPool (issue 4292). + + [arm] Fix missing CheckBuffer for branches (issue 4292). + + Performance and stability improvements on all platforms. + + +2015-07-09: Version 4.5.106 + + Performance and stability improvements on all platforms. + + +2015-07-09: Version 4.5.105 + + Guard @@isConcatSpreadable behind a flag (Chromium issue 507553). + + Performance and stability improvements on all platforms. + + +2015-07-08: Version 4.5.104 + + [x64] Fix handling of Smi constants in LSubI and LBitI (Chromium issue + 478612). + + Performance and stability improvements on all platforms. + + 2015-07-08: Version 4.5.103 Performance and stability improvements on all platforms. diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 689ae778bb59a4..c8c7de080c80d8 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -8,23 +8,23 @@ vars = { deps = { "v8/build/gyp": - Var("git_url") + "/external/gyp.git" + "@" + "5122240c5e5c4d8da12c543d82b03d6089eb77c5", + Var("git_url") + "/external/gyp.git" + "@" + "6ee91ad8659871916f9aa840d42e1513befdf638", "v8/third_party/icu": - Var("git_url") + "/chromium/deps/icu.git" + "@" + "c81a1a3989c3b66fa323e9a6ee7418d7c08297af", + Var("git_url") + "/chromium/deps/icu.git" + "@" + "89dcdec16381883782b9cc9cff38e00f047a0f46", "v8/buildtools": - Var("git_url") + "/chromium/buildtools.git" + "@" + "ecc8e253abac3b6186a97573871a084f4c0ca3ae", + Var("git_url") + "/chromium/buildtools.git" + "@" + "565d04e8741429fb1b4f26d102f2c6c3b849edeb", "v8/testing/gtest": - Var("git_url") + "/external/googletest.git" + "@" + "23574bf2333f834ff665f894c97bef8a5b33a0a9", + Var("git_url") + "/external/googletest.git" + "@" + "9855a87157778d39b95eccfb201a9dc90f6d61c6", "v8/testing/gmock": - Var("git_url") + "/external/googlemock.git" + "@" + "29763965ab52f24565299976b936d1265cb6a271", # from svn revision 501 + Var("git_url") + "/external/googlemock.git" + "@" + "0421b6f358139f02e102c9c332ce19a33faf75be", "v8/tools/clang": - Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "73ec8804ed395b0886d6edf82a9f33583f4a7902", + Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "5b12e334ec0e571a8e1f68d028dc5427b58c17ec", } deps_os = { "android": { "v8/third_party/android_tools": - Var("git_url") + "/android_tools.git" + "@" + "21f4bcbd6cd927e4b4227cfde7d5f13486be1236", + Var("git_url") + "/android_tools.git" + "@" + "9e9b6169a098bc19986e44fbbf65e4c29031e4bd", }, "win": { "v8/third_party/cygwin": diff --git a/deps/v8/Makefile b/deps/v8/Makefile index 97612655a7b1ae..baa3b52ca67eb0 100644 --- a/deps/v8/Makefile +++ b/deps/v8/Makefile @@ -44,10 +44,6 @@ endif ifdef component GYPFLAGS += -Dcomponent=$(component) endif -# console=readline -ifdef console - GYPFLAGS += -Dconsole=$(console) -endif # disassembler=on ifeq ($(disassembler), on) GYPFLAGS += -Dv8_enable_disassembler=1 @@ -162,7 +158,9 @@ endif ifdef embedscript GYPFLAGS += -Dembed_script=$(embedscript) endif - +ifeq ($(goma), on) + GYPFLAGS += -Duse_goma=1 +endif # arm specific flags. # arm_version= ifneq ($(strip $(arm_version)),) @@ -218,6 +216,12 @@ ifeq ($(arm_test_noprobe), on) GYPFLAGS += -Darm_test_noprobe=on endif +# Optionally enable wasm prototype. +# Assume you've placed a link to v8-native-prototype in third_party/wasm. +ifeq ($(wasm), on) + GYPFLAGS += -Dv8_wasm=1 +endif + # ----------------- available targets: -------------------- # - "grokdump": rebuilds heap constants lists used by grokdump # - any arch listed in ARCHES (see below) diff --git a/deps/v8/OWNERS b/deps/v8/OWNERS index d6db77ffe0f0d0..2c5caeb125accb 100644 --- a/deps/v8/OWNERS +++ b/deps/v8/OWNERS @@ -1,21 +1,21 @@ adamk@chromium.org -arv@chromium.org bmeurer@chromium.org danno@chromium.org -dcarney@chromium.org -dslomov@chromium.org +epertoso@chromium.org +hablich@chromium.org hpayer@chromium.org ishell@chromium.org jarin@chromium.org jkummerow@chromium.org jochen@chromium.org +littledan@chromium.org machenbach@chromium.org +mlippautz@chromium.org marja@chromium.org mstarzinger@chromium.org mvstanton@chromium.org rmcilroy@chromium.org rossberg@chromium.org -svenpanne@chromium.org titzer@chromium.org ulan@chromium.org verwaest@chromium.org diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index 34e09b8ec51b25..1bcd9922c56aed 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -141,6 +141,39 @@ def _CheckUnwantedDependencies(input_api, output_api): return results +def _CheckNoInlineHeaderIncludesInNormalHeaders(input_api, output_api): + """Attempts to prevent inclusion of inline headers into normal header + files. This tries to establish a layering where inline headers can be + included by other inline headers or compilation units only.""" + file_inclusion_pattern = r'(?!.+-inl\.h).+\.h' + include_directive_pattern = input_api.re.compile(r'#include ".+-inl.h"') + include_warning = ( + 'You might be including an inline header (e.g. foo-inl.h) within a\n' + 'normal header (e.g. bar.h) file. Can you avoid introducing the\n' + '#include? The commit queue will not block on this warning.') + + def FilterFile(affected_file): + black_list = (_EXCLUDED_PATHS + + input_api.DEFAULT_BLACK_LIST) + return input_api.FilterSourceFile( + affected_file, + white_list=(file_inclusion_pattern, ), + black_list=black_list) + + problems = [] + for f in input_api.AffectedSourceFiles(FilterFile): + local_path = f.LocalPath() + for line_number, line in f.ChangedContents(): + if (include_directive_pattern.search(line)): + problems.append( + '%s:%d\n %s' % (local_path, line_number, line.strip())) + + if problems: + return [output_api.PresubmitPromptOrNotify(include_warning, problems)] + else: + return [] + + def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api): """Attempts to prevent use of functions intended only for testing in non-testing code. For now this is just a best-effort implementation @@ -195,6 +228,8 @@ def _CommonChecks(input_api, output_api): results.extend(_CheckUnwantedDependencies(input_api, output_api)) results.extend( _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api)) + results.extend( + _CheckNoInlineHeaderIncludesInNormalHeaders(input_api, output_api)) return results @@ -209,28 +244,32 @@ def _SkipTreeCheck(input_api, output_api): return input_api.environ.get('PRESUBMIT_TREE_CHECK') == 'skip' -def _CheckChangeLogFlag(input_api, output_api): +def _CheckChangeLogFlag(input_api, output_api, warn): """Checks usage of LOG= flag in the commit message.""" results = [] - if input_api.change.BUG and not 'LOG' in input_api.change.tags: - results.append(output_api.PresubmitError( - '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 (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)) + 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)) + 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 64771bc27dc61e..f57dfa140258f3 100644 --- a/deps/v8/WATCHLISTS +++ b/deps/v8/WATCHLISTS @@ -40,7 +40,7 @@ 'filepath': 'src/snapshot/', }, 'debugger': { - 'filepath': 'src/debug\.(cc|h)|src/.*-debugger\.js|src/runtime/runtime-debug\.cc', + 'filepath': 'src/debug/', }, }, diff --git a/deps/v8/build/download_gold_plugin.py b/deps/v8/build/download_gold_plugin.py new file mode 100755 index 00000000000000..7a0c21b8d70773 --- /dev/null +++ b/deps/v8/build/download_gold_plugin.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python +# Copyright 2015 the V8 project authors. All rights reserved. +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Script to download LLVM gold plugin from google storage.""" + +import json +import os +import shutil +import subprocess +import sys +import zipfile + +SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) +CHROME_SRC = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir)) +sys.path.insert(0, os.path.join(CHROME_SRC, 'tools')) + +import find_depot_tools + +DEPOT_PATH = find_depot_tools.add_depot_tools_to_path() +GSUTIL_PATH = os.path.join(DEPOT_PATH, 'gsutil.py') + +LLVM_BUILD_PATH = os.path.join(CHROME_SRC, 'third_party', 'llvm-build', + 'Release+Asserts') +CLANG_UPDATE_PY = os.path.join(CHROME_SRC, 'tools', 'clang', 'scripts', + 'update.py') +CLANG_REVISION = os.popen(CLANG_UPDATE_PY + ' --print-revision').read().rstrip() + +CLANG_BUCKET = 'gs://chromium-browser-clang/Linux_x64' + +def main(): + targz_name = 'llvmgold-%s.tgz' % CLANG_REVISION + remote_path = '%s/%s' % (CLANG_BUCKET, targz_name) + + os.chdir(LLVM_BUILD_PATH) + + # TODO(pcc): Fix gsutil.py cp url file < /dev/null 2>&0 + # (currently aborts with exit code 1, + # https://github.com/GoogleCloudPlatform/gsutil/issues/289) or change the + # stdin->stderr redirect in update.py to do something else (crbug.com/494442). + subprocess.check_call(['python', GSUTIL_PATH, + 'cp', remote_path, targz_name], + stderr=open('/dev/null', 'w')) + subprocess.check_call(['tar', 'xzf', targz_name]) + os.remove(targz_name) + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/deps/v8/build/features.gypi b/deps/v8/build/features.gypi index 59d15134ddf970..21e55740aef352 100644 --- a/deps/v8/build/features.gypi +++ b/deps/v8/build/features.gypi @@ -64,6 +64,9 @@ # Set to 1 to enable DCHECKs in release builds. 'dcheck_always_on%': 0, + + # Set to 1 to enable building with wasm prototype. + 'v8_wasm%': 0, }, 'target_defaults': { 'conditions': [ @@ -103,6 +106,9 @@ ['dcheck_always_on!=0', { 'defines': ['DEBUG',], }], + ['v8_wasm!=0', { + 'defines': ['V8_WASM',], + }], ], # conditions 'configurations': { 'DebugBaseCommon': { diff --git a/deps/v8/build/get_landmines.py b/deps/v8/build/get_landmines.py index 298010f8244bed..434b980c6db8b7 100755 --- a/deps/v8/build/get_landmines.py +++ b/deps/v8/build/get_landmines.py @@ -23,6 +23,7 @@ def main(): print 'Clobber after ICU roll.' print 'Moar clobbering...' print 'Remove build/android.gypi' + print 'Cleanup after windows ninja switch attempt.' return 0 diff --git a/deps/v8/build/standalone.gypi b/deps/v8/build/standalone.gypi index 2cd0b51d43601f..bf06bfa20fee0d 100644 --- a/deps/v8/build/standalone.gypi +++ b/deps/v8/build/standalone.gypi @@ -88,6 +88,13 @@ 'clang_dir%': '<(base_dir)/third_party/llvm-build/Release+Asserts', + 'use_lto%': 0, + + # Control Flow Integrity for virtual calls and casts. + # See http://clang.llvm.org/docs/ControlFlowIntegrity.html + 'cfi_vptr%': 0, + 'cfi_diag%': 0, + # goma settings. # 1 to use goma. # If no gomadir is set, it uses the default gomadir. @@ -105,6 +112,16 @@ }, { 'host_clang%': '0', }], + # linux_use_bundled_gold: whether to use the gold linker binary checked + # into third_party/binutils. Force this off via GYP_DEFINES when you + # are using a custom toolchain and need to control -B in ldflags. + # Do not use 32-bit gold on 32-bit hosts as it runs out address space + # for component=static_library builds. + ['(OS=="linux" or OS=="android") and (target_arch=="x64" or target_arch=="arm" or (target_arch=="ia32" and host_arch=="x64"))', { + 'linux_use_bundled_gold%': 1, + }, { + 'linux_use_bundled_gold%': 0, + }], ], }, 'base_dir%': '<(base_dir)', @@ -122,6 +139,10 @@ 'tsan%': '<(tsan)', 'sanitizer_coverage%': '<(sanitizer_coverage)', 'use_custom_libcxx%': '<(use_custom_libcxx)', + 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)', + 'use_lto%': '<(use_lto)', + 'cfi_vptr%': '<(cfi_vptr)', + 'cfi_diag%': '<(cfi_diag)', # Add a simple extra solely for the purpose of the cctests 'v8_extra_library_files': ['../test/cctest/test-extra.js'], @@ -148,7 +169,7 @@ # the JS builtins sources and the start snapshot. # Embedders that don't use standalone.gypi will need to add # their own default value. - 'v8_use_external_startup_data%': 0, + 'v8_use_external_startup_data%': 1, # Relative path to icu.gyp from this file. 'icu_gyp_path': '../third_party/icu/icu.gyp', @@ -179,8 +200,8 @@ }], ], }], - ['(v8_target_arch=="ia32" or v8_target_arch=="x64" or v8_target_arch=="x87") and \ - (OS=="linux" or OS=="mac")', { + ['((v8_target_arch=="ia32" or v8_target_arch=="x64" or v8_target_arch=="x87") and \ + (OS=="linux" or OS=="mac")) or (v8_target_arch=="ppc64" and OS=="linux")', { 'v8_enable_gdbjit%': 1, }, { 'v8_enable_gdbjit%': 0, @@ -207,10 +228,8 @@ # the C++ standard library is used. 'use_custom_libcxx%': 1, }], - ['OS=="linux"', { - # Gradually roll out v8_use_external_startup_data. - # Should eventually be default enabled on all platforms. - 'v8_use_external_startup_data%': 1, + ['cfi_vptr==1', { + 'use_lto%': 1, }], ['OS=="android"', { # Location of Android NDK. @@ -358,6 +377,19 @@ 'Release': { 'cflags+': ['<@(release_extra_cflags)'], }, + 'conditions': [ + ['OS=="win"', { + 'Optdebug_x64': { + 'inherit_from': ['Optdebug'], + }, + 'Debug_x64': { + 'inherit_from': ['Debug'], + }, + 'Release_x64': { + 'inherit_from': ['Release'], + }, + }], + ], }, 'conditions':[ ['(clang==1 or host_clang==1) and OS!="win"', { @@ -522,6 +554,21 @@ }], ], }], + ['linux_use_bundled_gold==1 and not (clang==0 and use_lto==1)', { + # Put our binutils, which contains gold in the search path. We pass + # the path to gold to the compiler. gyp leaves unspecified what the + # cwd is when running the compiler, so the normal gyp path-munging + # fails us. This hack gets the right path. + # + # Disabled when using GCC LTO because GCC also uses the -B search + # path at link time to find "as", and our bundled "as" can only + # target x86. + 'ldflags': [ + # Note, Chromium allows ia32 host arch as well, we limit this to + # x64 in v8. + '-B<(base_dir)/third_party/binutils/Linux_x64/Release/bin', + ], + }], ], }, }], @@ -658,7 +705,85 @@ }], ], 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'], - 'msvs_disabled_warnings': [4355, 4800], + 'msvs_disabled_warnings': [ + # C4091: 'typedef ': ignored on left of 'X' when no variable is + # declared. + # This happens in a number of Windows headers. Dumb. + 4091, + + # C4127: conditional expression is constant + # This warning can in theory catch dead code and other problems, but + # triggers in far too many desirable cases where the conditional + # expression is either set by macros or corresponds some legitimate + # compile-time constant expression (due to constant template args, + # conditionals comparing the sizes of different types, etc.). Some of + # these can be worked around, but it's not worth it. + 4127, + + # C4351: new behavior: elements of array 'array' will be default + # initialized + # This is a silly "warning" that basically just alerts you that the + # compiler is going to actually follow the language spec like it's + # supposed to, instead of not following it like old buggy versions + # did. There's absolutely no reason to turn this on. + 4351, + + # C4355: 'this': used in base member initializer list + # It's commonly useful to pass |this| to objects in a class' + # initializer list. While this warning can catch real bugs, most of + # the time the constructors in question don't attempt to call methods + # on the passed-in pointer (until later), and annotating every legit + # usage of this is simply more hassle than the warning is worth. + 4355, + + # C4503: 'identifier': decorated name length exceeded, name was + # truncated + # This only means that some long error messages might have truncated + # identifiers in the presence of lots of templates. It has no effect + # on program correctness and there's no real reason to waste time + # trying to prevent it. + 4503, + + # Warning C4589 says: "Constructor of abstract class ignores + # initializer for virtual base class." Disable this warning because it + # is flaky in VS 2015 RTM. It triggers on compiler generated + # copy-constructors in some cases. + 4589, + + # C4611: interaction between 'function' and C++ object destruction is + # non-portable + # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN + # suggests using exceptions instead of setjmp/longjmp for C++, but + # Chromium code compiles without exception support. We therefore have + # to use setjmp/longjmp for e.g. JPEG decode error handling, which + # means we have to turn off this warning (and be careful about how + # object destruction happens in such cases). + 4611, + + # TODO(jochen): These warnings are level 4. They will be slowly + # removed as code is fixed. + 4100, # Unreferenced formal parameter + 4121, # Alignment of a member was sensitive to packing + 4244, # Conversion from 'type1' to 'type2', possible loss of data + 4302, # Truncation from 'type 1' to 'type 2' + 4309, # Truncation of constant value + 4311, # Pointer truncation from 'type' to 'type' + 4312, # Conversion from 'type1' to 'type2' of greater size + 4481, # Nonstandard extension used: override specifier 'keyword' + 4505, # Unreferenced local function has been removed + 4510, # Default constructor could not be generated + 4512, # Assignment operator could not be generated + 4610, # Object can never be instantiated + 4800, # Forcing value to bool. + 4838, # Narrowing conversion. Doesn't seem to be very useful. + 4995, # 'X': name was marked as #pragma deprecated + 4996, # 'X': was declared deprecated (for GetVersionEx). + + # These are variable shadowing warnings that are new in VS2015. We + # should work through these at some point -- they may be removed from + # the RTM release in the /W4 set. + 4456, 4457, 4458, 4459, + ], 'msvs_settings': { 'VCCLCompilerTool': { 'MinimalRebuild': 'false', @@ -774,6 +899,12 @@ 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', # -std=gnu++0x }, + 'conditions': [ + ['v8_target_arch=="x64" or v8_target_arch=="arm64" \ + or v8_target_arch=="mips64el"', { + 'xcode_settings': {'WARNING_CFLAGS': ['-Wshorten-64-to-32']}, + }], + ], }], ], 'target_conditions': [ @@ -1047,5 +1178,100 @@ ['CXX.host_wrapper', '<(gomadir)/gomacc'], ], }], + ['use_lto==1', { + 'target_defaults': { + 'target_conditions': [ + ['_toolset=="target"', { + 'cflags': [ + '-flto', + ], + }], + ], + }, + }], + ['use_lto==1 and clang==0', { + 'target_defaults': { + 'target_conditions': [ + ['_toolset=="target"', { + 'cflags': [ + '-ffat-lto-objects', + ], + }], + ], + }, + }], + ['use_lto==1 and clang==1', { + 'target_defaults': { + 'target_conditions': [ + ['_toolset=="target"', { + 'arflags': [ + '--plugin', '<(clang_dir)/lib/LLVMgold.so', + ], + # Apply a lower optimization level with lto. Chromium does this + # for non-official builds only - a differentiation that doesn't + # exist in v8. + 'ldflags': [ + '-Wl,--plugin-opt,O1', + ], + }], + ], + }, + }], + ['use_lto==1 and clang==0', { + 'target_defaults': { + 'target_conditions': [ + ['_toolset=="target"', { + 'ldflags': [ + '-flto=32', + ], + }], + ], + }, + }], + ['use_lto==1 and clang==1', { + 'target_defaults': { + 'target_conditions': [ + ['_toolset=="target"', { + 'ldflags': [ + '-flto', + ], + }], + ], + }, + }], + ['cfi_diag==1', { + 'target_defaults': { + 'target_conditions': [ + ['_toolset=="target"', { + 'cflags': [ + '-fno-sanitize-trap=cfi', + '-fsanitize-recover=cfi', + ], + 'ldflags': [ + '-fno-sanitize-trap=cfi', + '-fsanitize-recover=cfi', + ], + }], + ], + }, + }], + ['cfi_vptr==1', { + 'target_defaults': { + 'target_conditions': [ + ['_toolset=="target"', { + 'cflags': [ + '-fsanitize=cfi-vcall', + '-fsanitize=cfi-derived-cast', + '-fsanitize=cfi-unrelated-cast', + ], + 'ldflags': [ + '-fsanitize=cfi-vcall', + '-fsanitize=cfi-derived-cast', + '-fsanitize=cfi-unrelated-cast', + ], + }], + ], + }, + }], ], } diff --git a/deps/v8/build/toolchain.gypi b/deps/v8/build/toolchain.gypi index 4dbf42bfe3795c..a8a3b56ec22a2b 100644 --- a/deps/v8/build/toolchain.gypi +++ b/deps/v8/build/toolchain.gypi @@ -1149,7 +1149,9 @@ }], ], }], - ['linux_use_gold_flags==1', { + # TODO(pcc): Re-enable in LTO builds once we've fixed the intermittent + # link failures (crbug.com/513074). + ['linux_use_gold_flags==1 and use_lto==0', { 'target_conditions': [ ['_toolset=="target"', { 'ldflags': [ diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h index be9e5c0c6b46ed..c6cba0f982929a 100644 --- a/deps/v8/include/v8-platform.h +++ b/deps/v8/include/v8-platform.h @@ -19,6 +19,20 @@ class Task { virtual void Run() = 0; }; + +/** +* An IdleTask represents a unit of work to be performed in idle time. +* The Run method is invoked with an argument that specifies the deadline in +* seconds returned by MonotonicallyIncreasingTime(). +* The idle task is expected to complete by this deadline. +*/ +class IdleTask { + public: + virtual ~IdleTask() {} + virtual void Run(double deadline_in_seconds) = 0; +}; + + /** * V8 Platform abstraction layer. * @@ -63,8 +77,26 @@ class Platform { * scheduling. The definition of "foreground" is opaque to V8. */ virtual void CallDelayedOnForegroundThread(Isolate* isolate, Task* task, - double delay_in_seconds) { + double delay_in_seconds) = 0; + + /** + * Schedules a task to be invoked on a foreground thread wrt a specific + * |isolate| when the embedder is idle. + * Requires that SupportsIdleTasks(isolate) is true. + * Idle tasks may be reordered relative to other task types and may be + * starved for an arbitrarily long time if no idle time is available. + * The definition of "foreground" is opaque to V8. + */ + virtual void CallIdleOnForegroundThread(Isolate* isolate, IdleTask* task) { + // TODO(ulan): Make this function abstract after V8 roll in Chromium. + } + + /** + * Returns true if idle tasks are enabled for the given |isolate|. + */ + virtual bool IdleTasksEnabled(Isolate* isolate) { // TODO(ulan): Make this function abstract after V8 roll in Chromium. + return false; } /** diff --git a/deps/v8/include/v8-util.h b/deps/v8/include/v8-util.h index 6454a19b7e4fe1..c996c9997df676 100644 --- a/deps/v8/include/v8-util.h +++ b/deps/v8/include/v8-util.h @@ -133,6 +133,8 @@ class DefaultGlobalMapTraits : public StdMapTraits { return K(); } static void DisposeCallbackData(WeakCallbackDataType* data) {} + static void OnWeakCallback( + const WeakCallbackInfo& data) {} static void Dispose(Isolate* isolate, Global value, K key) {} // This is a second pass callback, so SetSecondPassCallback cannot be called. static void DisposeWeak(const WeakCallbackInfo& data) {} @@ -452,7 +454,7 @@ class GlobalValueMap : public PersistentValueMapBase { : WeakCallbackType::kParameter; Local value(Local::New(this->isolate(), *persistent)); persistent->template SetWeak( - Traits::WeakCallbackParameter(this, key, value), FirstWeakCallback, + Traits::WeakCallbackParameter(this, key, value), OnWeakCallback, callback_type); } PersistentContainerValue old_value = @@ -471,12 +473,13 @@ class GlobalValueMap : public PersistentValueMapBase { } private: - static void FirstWeakCallback( + static void OnWeakCallback( const WeakCallbackInfo& data) { if (Traits::kCallbackType != kNotWeak) { auto map = Traits::MapFromWeakCallbackInfo(data); K key = Traits::KeyFromWeakCallbackInfo(data); map->RemoveWeak(key); + Traits::OnWeakCallback(data); data.SetSecondPassCallback(SecondWeakCallback); } } diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 98dca238c85605..54fd822efe41ed 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -9,9 +9,9 @@ // NOTE these macros are used by some of the tool scripts and the build // system so their names cannot be changed without changing the scripts. #define V8_MAJOR_VERSION 4 -#define V8_MINOR_VERSION 5 -#define V8_BUILD_NUMBER 103 -#define V8_PATCH_LEVEL 35 +#define V8_MINOR_VERSION 6 +#define V8_BUILD_NUMBER 85 +#define V8_PATCH_LEVEL 25 // 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 062dd5f21fb275..481cdd9e9461a4 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -509,6 +509,10 @@ template class PersistentBase { V8_INLINE bool IsEmpty() const { return val_ == NULL; } V8_INLINE void Empty() { val_ = 0; } + V8_INLINE Local Get(Isolate* isolate) const { + return Local::New(isolate, *this); + } + template V8_INLINE bool operator==(const PersistentBase& that) const { internal::Object** a = reinterpret_cast(this->val_); @@ -634,8 +638,8 @@ template class PersistentBase { friend class Object; explicit V8_INLINE PersistentBase(T* val) : val_(val) {} - PersistentBase(PersistentBase& other) = delete; // NOLINT - void operator=(PersistentBase&) = delete; + PersistentBase(const PersistentBase& other) = delete; // NOLINT + void operator=(const PersistentBase&) = delete; V8_INLINE static T* New(Isolate* isolate, T* that); T* val_; @@ -841,8 +845,8 @@ class Global : public PersistentBase { private: template friend class ReturnValue; - Global(Global&) = delete; - void operator=(Global&) = delete; + Global(const Global&) = delete; + void operator=(const Global&) = delete; V8_INLINE T* operator*() const { return this->val_; } }; @@ -1110,11 +1114,6 @@ class V8_EXPORT Script { * Returns the corresponding context-unbound script. */ Local GetUnboundScript(); - - V8_DEPRECATED("Use GetUnboundScript()->GetId()", - int GetId()) { - return GetUnboundScript()->GetId(); - } }; @@ -1386,15 +1385,13 @@ class V8_EXPORT ScriptCompiler { /** * Compile an ES6 module. * - * This is an experimental feature. + * This is an unfinished experimental feature, and is only exposed + * here for internal testing purposes. + * Only parsing works at the moment. Do not use. * * TODO(adamk): Script is likely the wrong return value for this; * should return some new Module type. */ - static V8_DEPRECATE_SOON( - "Use maybe version", - Local