diff --git a/deps/v8/.DEPS.git b/deps/v8/.DEPS.git index 7775744953a..8f9da45bb67 100644 --- a/deps/v8/.DEPS.git +++ b/deps/v8/.DEPS.git @@ -24,6 +24,11 @@ deps = { } deps_os = { + 'android': + { + 'v8/third_party/android_tools': + Var('git_url') + '/android_tools.git@31869996507de16812bb53a3d0aaa15cd6194c16', + }, 'win': { 'v8/third_party/cygwin': diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index d0d4b436df1..22f4e1c3b4a 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -80,3 +80,5 @@ GRTAGS GSYMS GPATH gtags.files +turbo*.dot +turbo*.json diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index 7ac08156994..f18761e4bae 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -56,6 +56,7 @@ Patrick Gansterer Peter Varga Rafal Krypa Rajeev R Krithivasan +Refael Ackermann Rene Rebe Robert Mustacchi Rodolph Perfetta diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index efa4b717c9a..bfe44395fff 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -25,7 +25,7 @@ v8_random_seed = "314159265" # Configurations # config("internal_config") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. include_dirs = [ "." ] @@ -38,7 +38,7 @@ config("internal_config") { } config("internal_config_base") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. include_dirs = [ "." ] } @@ -56,7 +56,7 @@ config("external_config") { } config("features") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. defines = [] @@ -118,7 +118,7 @@ config("features") { } config("toolchain") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. defines = [] cflags = [] @@ -167,7 +167,7 @@ config("toolchain") { # action("js2c") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. script = "tools/js2c.py" @@ -184,24 +184,25 @@ action("js2c") { "src/uri.js", "third_party/fdlibm/fdlibm.js", "src/math.js", - "src/messages.js", "src/apinatives.js", - "src/debug-debugger.js", - "src/mirror-debugger.js", - "src/liveedit-debugger.js", "src/date.js", - "src/json.js", "src/regexp.js", "src/arraybuffer.js", "src/typedarray.js", - "src/collection.js", - "src/collection-iterator.js", - "src/weak_collection.js", - "src/promise.js", + "src/generator.js", "src/object-observe.js", - "src/macros.py", + "src/collection.js", + "src/weak-collection.js", + "src/collection-iterator.js", + "src/promise.js", + "src/messages.js", + "src/json.js", "src/array-iterator.js", "src/string-iterator.js", + "src/debug-debugger.js", + "src/mirror-debugger.js", + "src/liveedit-debugger.js", + "src/macros.py", ] outputs = [ @@ -228,7 +229,7 @@ action("js2c") { } action("js2c_experimental") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. script = "tools/js2c.py" @@ -242,6 +243,7 @@ action("js2c_experimental") { "src/generator.js", "src/harmony-string.js", "src/harmony-array.js", + "src/harmony-classes.js", ] outputs = [ @@ -265,7 +267,7 @@ action("js2c_experimental") { if (v8_use_external_startup_data) { action("natives_blob") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. deps = [ ":js2c", @@ -288,7 +290,7 @@ if (v8_use_external_startup_data) { } action("postmortem-metadata") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. script = "tools/gen-postmortem-metadata.py" @@ -307,7 +309,7 @@ action("postmortem-metadata") { } action("run_mksnapshot") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. deps = [ ":mksnapshot($host_toolchain)" ] @@ -345,7 +347,7 @@ action("run_mksnapshot") { # source_set("v8_nosnapshot") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. deps = [ ":js2c", @@ -366,7 +368,7 @@ source_set("v8_nosnapshot") { } source_set("v8_snapshot") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. deps = [ ":js2c", @@ -389,7 +391,7 @@ source_set("v8_snapshot") { if (v8_use_external_startup_data) { source_set("v8_external_snapshot") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. deps = [ ":js2c", @@ -411,7 +413,7 @@ if (v8_use_external_startup_data) { } source_set("v8_base") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. sources = [ "src/accessors.cc", @@ -434,6 +436,12 @@ source_set("v8_base") { "src/ast-value-factory.h", "src/ast.cc", "src/ast.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", @@ -451,6 +459,8 @@ source_set("v8_base") { "src/checks.h", "src/circular-queue-inl.h", "src/circular-queue.h", + "src/code-factory.cc", + "src/code-factory.h", "src/code-stubs.cc", "src/code-stubs.h", "src/code-stubs-hydrogen.cc", @@ -459,12 +469,19 @@ source_set("v8_base") { "src/codegen.h", "src/compilation-cache.cc", "src/compilation-cache.h", + "src/compiler/access-builder.cc", + "src/compiler/access-builder.h", "src/compiler/ast-graph-builder.cc", "src/compiler/ast-graph-builder.h", + "src/compiler/basic-block-instrumentor.cc", + "src/compiler/basic-block-instrumentor.h", + "src/compiler/change-lowering.cc", + "src/compiler/change-lowering.h", "src/compiler/code-generator-impl.h", "src/compiler/code-generator.cc", "src/compiler/code-generator.h", "src/compiler/common-node-cache.h", + "src/compiler/common-operator.cc", "src/compiler/common-operator.h", "src/compiler/control-builders.cc", "src/compiler/control-builders.h", @@ -493,24 +510,28 @@ source_set("v8_base") { "src/compiler/instruction-selector.h", "src/compiler/instruction.cc", "src/compiler/instruction.h", + "src/compiler/js-builtin-reducer.cc", + "src/compiler/js-builtin-reducer.h", "src/compiler/js-context-specialization.cc", "src/compiler/js-context-specialization.h", "src/compiler/js-generic-lowering.cc", "src/compiler/js-generic-lowering.h", "src/compiler/js-graph.cc", "src/compiler/js-graph.h", + "src/compiler/js-inlining.cc", + "src/compiler/js-inlining.h", "src/compiler/js-operator.h", "src/compiler/js-typed-lowering.cc", "src/compiler/js-typed-lowering.h", "src/compiler/linkage-impl.h", "src/compiler/linkage.cc", "src/compiler/linkage.h", - "src/compiler/lowering-builder.cc", - "src/compiler/lowering-builder.h", - "src/compiler/machine-node-factory.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/machine-type.cc", + "src/compiler/machine-type.h", "src/compiler/node-aux-data-inl.h", "src/compiler/node-aux-data.h", "src/compiler/node-cache.cc", @@ -523,6 +544,7 @@ source_set("v8_base") { "src/compiler/opcodes.h", "src/compiler/operator-properties-inl.h", "src/compiler/operator-properties.h", + "src/compiler/operator.cc", "src/compiler/operator.h", "src/compiler/phi-reducer.h", "src/compiler/pipeline.cc", @@ -538,14 +560,16 @@ source_set("v8_base") { "src/compiler/scheduler.h", "src/compiler/simplified-lowering.cc", "src/compiler/simplified-lowering.h", - "src/compiler/simplified-node-factory.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/structured-machine-assembler.cc", - "src/compiler/structured-machine-assembler.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.cc", @@ -601,7 +625,6 @@ source_set("v8_base") { "src/fast-dtoa.cc", "src/fast-dtoa.h", "src/feedback-slots.h", - "src/field-index.cc", "src/field-index.h", "src/field-index-inl.h", "src/fixed-dtoa.cc", @@ -630,6 +653,8 @@ source_set("v8_base") { "src/heap-snapshot-generator-inl.h", "src/heap-snapshot-generator.cc", "src/heap-snapshot-generator.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", @@ -707,11 +732,25 @@ source_set("v8_base") { "src/i18n.h", "src/icu_util.cc", "src/icu_util.h", - "src/ic-inl.h", - "src/ic.cc", - "src/ic.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/ic/stub-cache.cc", + "src/ic/stub-cache.h", "src/interface.cc", "src/interface.h", + "src/interface-descriptors.cc", + "src/interface-descriptors.h", "src/interpreter-irregexp.cc", "src/interpreter-irregexp.h", "src/isolate.cc", @@ -785,8 +824,21 @@ source_set("v8_base") { "src/rewriter.h", "src/runtime-profiler.cc", "src/runtime-profiler.h", - "src/runtime.cc", - "src/runtime.h", + "src/runtime/runtime-collections.cc", + "src/runtime/runtime-compiler.cc", + "src/runtime/runtime-i18n.cc", + "src/runtime/runtime-json.cc", + "src/runtime/runtime-maths.cc", + "src/runtime/runtime-numbers.cc", + "src/runtime/runtime-regexp.cc", + "src/runtime/runtime-strings.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/runtime/string-builder.h", "src/safepoint-table.cc", "src/safepoint-table.h", "src/sampler.cc", @@ -812,13 +864,14 @@ source_set("v8_base") { "src/string-stream.h", "src/strtod.cc", "src/strtod.h", - "src/stub-cache.cc", - "src/stub-cache.h", "src/token.cc", "src/token.h", "src/transitions-inl.h", "src/transitions.cc", "src/transitions.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-inl.h", @@ -871,7 +924,7 @@ source_set("v8_base") { "src/ia32/frames-ia32.cc", "src/ia32/frames-ia32.h", "src/ia32/full-codegen-ia32.cc", - "src/ia32/ic-ia32.cc", + "src/ia32/interface-descriptors-ia32.cc", "src/ia32/lithium-codegen-ia32.cc", "src/ia32/lithium-codegen-ia32.h", "src/ia32/lithium-gap-resolver-ia32.cc", @@ -882,11 +935,13 @@ source_set("v8_base") { "src/ia32/macro-assembler-ia32.h", "src/ia32/regexp-macro-assembler-ia32.cc", "src/ia32/regexp-macro-assembler-ia32.h", - "src/ia32/stub-cache-ia32.cc", "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/ic/ia32/ic-ia32.cc", + "src/ic/ia32/ic-compiler-ia32.cc", + "src/ic/ia32/stub-cache-ia32.cc", ] } else if (v8_target_arch == "x64") { sources += [ @@ -905,7 +960,7 @@ source_set("v8_base") { "src/x64/frames-x64.cc", "src/x64/frames-x64.h", "src/x64/full-codegen-x64.cc", - "src/x64/ic-x64.cc", + "src/x64/interface-descriptors-x64.cc", "src/x64/lithium-codegen-x64.cc", "src/x64/lithium-codegen-x64.h", "src/x64/lithium-gap-resolver-x64.cc", @@ -916,11 +971,15 @@ source_set("v8_base") { "src/x64/macro-assembler-x64.h", "src/x64/regexp-macro-assembler-x64.cc", "src/x64/regexp-macro-assembler-x64.h", - "src/x64/stub-cache-x64.cc", "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/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", ] } else if (v8_target_arch == "arm") { sources += [ @@ -941,7 +1000,8 @@ source_set("v8_base") { "src/arm/frames-arm.cc", "src/arm/frames-arm.h", "src/arm/full-codegen-arm.cc", - "src/arm/ic-arm.cc", + "src/arm/interface-descriptors-arm.cc", + "src/arm/interface-descriptors-arm.h", "src/arm/lithium-arm.cc", "src/arm/lithium-arm.h", "src/arm/lithium-codegen-arm.cc", @@ -953,11 +1013,15 @@ source_set("v8_base") { "src/arm/regexp-macro-assembler-arm.cc", "src/arm/regexp-macro-assembler-arm.h", "src/arm/simulator-arm.cc", - "src/arm/stub-cache-arm.cc", "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/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", ] } else if (v8_target_arch == "arm64") { sources += [ @@ -981,11 +1045,12 @@ source_set("v8_base") { "src/arm64/frames-arm64.cc", "src/arm64/frames-arm64.h", "src/arm64/full-codegen-arm64.cc", - "src/arm64/ic-arm64.cc", "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/lithium-arm64.cc", "src/arm64/lithium-arm64.h", "src/arm64/lithium-codegen-arm64.cc", @@ -999,13 +1064,17 @@ source_set("v8_base") { "src/arm64/regexp-macro-assembler-arm64.h", "src/arm64/simulator-arm64.cc", "src/arm64/simulator-arm64.h", - "src/arm64/stub-cache-arm64.cc", "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-selector-arm64.cc", "src/compiler/arm64/linkage-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", ] } else if (v8_target_arch == "mipsel") { sources += [ @@ -1026,7 +1095,7 @@ source_set("v8_base") { "src/mips/frames-mips.cc", "src/mips/frames-mips.h", "src/mips/full-codegen-mips.cc", - "src/mips/ic-mips.cc", + "src/mips/interface-descriptors-mips.cc", "src/mips/lithium-codegen-mips.cc", "src/mips/lithium-codegen-mips.h", "src/mips/lithium-gap-resolver-mips.cc", @@ -1038,7 +1107,48 @@ source_set("v8_base") { "src/mips/regexp-macro-assembler-mips.cc", "src/mips/regexp-macro-assembler-mips.h", "src/mips/simulator-mips.cc", - "src/mips/stub-cache-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", + ] + } else if (v8_target_arch == "mips64el") { + sources += [ + "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/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", + "src/mips64/lithium-gap-resolver-mips64.cc", + "src/mips64/lithium-gap-resolver-mips64.h", + "src/mips64/lithium-mips64.cc", + "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/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", ] } @@ -1046,9 +1156,18 @@ source_set("v8_base") { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config", ":features", ":toolchain" ] + if (!is_debug) { + configs -= [ "//build/config/compiler:optimize" ] + configs += [ "//build/config/compiler:optimize_max" ] + } + defines = [] deps = [ ":v8_libbase" ] + if (is_win) { + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + cflags = [ "/wd4267" ] + } if (is_linux) { if (v8_compress_startup_data == "bz2") { libs += [ "bz2" ] @@ -1076,7 +1195,7 @@ source_set("v8_base") { } source_set("v8_libbase") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. sources = [ "src/base/atomicops.h", @@ -1089,9 +1208,14 @@ source_set("v8_libbase") { "src/base/atomicops_internals_x86_gcc.cc", "src/base/atomicops_internals_x86_gcc.h", "src/base/atomicops_internals_x86_msvc.h", + "src/base/bits.cc", + "src/base/bits.h", "src/base/build_config.h", "src/base/cpu.cc", "src/base/cpu.h", + "src/base/division-by-constant.cc", + "src/base/division-by-constant.h", + "src/base/flags.h", "src/base/lazy-instance.h", "src/base/logging.cc", "src/base/logging.h", @@ -1112,6 +1236,8 @@ source_set("v8_libbase") { "src/base/safe_conversions_impl.h", "src/base/safe_math.h", "src/base/safe_math_impl.h", + "src/base/sys-info.cc", + "src/base/sys-info.h", "src/base/utils/random-number-generator.cc", "src/base/utils/random-number-generator.h", ] @@ -1120,6 +1246,11 @@ source_set("v8_libbase") { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config_base", ":features", ":toolchain" ] + if (!is_debug) { + configs -= [ "//build/config/compiler:optimize" ] + configs += [ "//build/config/compiler:optimize_max" ] + } + defines = [] if (is_posix) { @@ -1183,6 +1314,11 @@ source_set("v8_libplatform") { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config_base", ":features", ":toolchain" ] + if (!is_debug) { + configs -= [ "//build/config/compiler:optimize" ] + configs += [ "//build/config/compiler:optimize_max" ] + } + deps = [ ":v8_libbase", ] @@ -1194,7 +1330,7 @@ source_set("v8_libplatform") { if (current_toolchain == host_toolchain) { executable("mksnapshot") { - visibility = ":*" # Only targets in this file can depend on this. + visibility = [ ":*" ] # Only targets in this file can depend on this. sources = [ "src/mksnapshot.cc", @@ -1250,6 +1386,7 @@ component("v8") { direct_dependent_configs = [ ":external_config" ] + libs = [] if (is_android && current_toolchain != host_toolchain) { libs += [ "log" ] } diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index 0b2872a7c21..89e5b9f89fb 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,4 +1,258 @@ -2014-08-13: Version 3.28.73 +2014-09-30: Version 3.29.93 + + Add a getter for the address and size of the code range to the pulic API + (issue 3598). + + Convert `obj` ToObject in Object.keys() (issue 3587). + + Performance and stability improvements on all platforms. + + +2014-09-29: Version 3.29.92 + + Performance and stability improvements on all platforms. + + +2014-09-26: Version 3.29.91 + + Performance and stability improvements on all platforms. + + +2014-09-25: Version 3.29.88 + + Performance and stability improvements on all platforms. + + +2014-09-24: Version 3.29.87 + + Preserve message when rethrowing exception (issue 3583). + + Fix escaped index JSON parsing (Chromium issue 416449). + + Performance and stability improvements on all platforms. + + +2014-09-23: Version 3.29.84 + + Performance and stability improvements on all platforms. + + +2014-09-23: Version 3.29.83 + + Performance and stability improvements on all platforms. + + +2014-09-23: Version 3.29.82 + + Fix escaped index JSON parsing (Chromium issue 416449). + + Performance and stability improvements on all platforms. + + +2014-09-17: Version 3.29.70 + + Enable ES6 generators (issue 2355). + + Fixed int vs. uintptr_t confusion (plus some cleanup on the way) (issue + 3556). + + Move configuration of ResourceConstraints to Isolate construction. + + Performance and stability improvements on all platforms. + + +2014-09-16: Version 3.29.66 + + Currently, a new isolate is created in an uninitialized state, and + several API methods will automatically initialize it. During this + uninitialized state, code event handlers and function entry handlers can + be attached to the isolate. + + Performance and stability improvements on all platforms. + + +2014-09-15: Version 3.29.64 + + ES6: String(symbol) should work like symbol.toString (issue 3554). + + Arrow functions: Cleanup handling of the prototype property (issue + 2700). + + Remove V8_HOST_CAN_READ_UNALIGNED and its uses (Chromium issue 412967). + + Fix Smi vs. HeapObject confusion in HConstants (Chromium issue 412215). + + Performance and stability improvements on all platforms. + + +2014-09-12: Version 3.29.59 + + Do not use wide reads in CopyCharsUnsigned (Chromium issue 412967). + + Fix inaccurate type condition in Hydrogen (Chromium issue 412210). + + Fix crash in ScriptDebugServer::wrapCallFrames (Chromium issue 411196). + + Performance and stability improvements on all platforms. + + +2014-09-11: Version 3.29.57 + + ES6: Add support for method shorthand in object literals (issue 3516). + + Unbreak FreeBSD build (hopefully) (issue 3548). + + Performance and stability improvements on all platforms. + + +2014-09-09: Version 3.29.53 + + Performance and stability improvements on all platforms. + + +2014-09-08: Version 3.29.50 + + Allocate a new empty number dictionary when resetting elements (Chromium + issue 410332). + + Performance and stability improvements on all platforms. + + +2014-09-05: Version 3.29.43 + + Enforce correct number comparisons when inlining Array.indexOf (Chromium + issue 407946). + + Performance and stability improvements on all platforms. + + +2014-09-04: Version 3.29.41 + + Performance and stability improvements on all platforms. + + +2014-09-03: Version 3.29.40 + + Use correct receiver for DOM accessors on the prototype chain (issue + 3538). + + Performance and stability improvements on all platforms. + + +2014-09-02: Version 3.29.38 + + Do not clear weak monomorphic IC after context disposal (Chromium issue + 404020). + + Turn on job-based sweeping (issue 3104). + + Performance and stability improvements on all platforms. + + +2014-09-01: Version 3.29.35 + + Performance and stability improvements on all platforms. + + +2014-08-29: Version 3.29.29 + + Performance and stability improvements on all platforms. + + +2014-08-28: Version 3.29.27 + + Performance and stability improvements on all platforms. + + +2014-08-28: Version 3.29.25 + + Performance and stability improvements on all platforms. + + +2014-08-28: Version 3.29.24 + + Tweaks to generate XP-compatible .exes (Chromium issue 407517). + + Performance and stability improvements on all platforms. + + +2014-08-28: Version 3.29.23 + + Performance and stability improvements on all platforms. + + +2014-08-27: Version 3.29.20 + + Handle empty allocation list in CodeRange properly (issue 3540, Chromium + issue 407566). + + Fixed inlining of constant values (issue 3529). + + Performance and stability improvements on all platforms. + + +2014-08-25: Version 3.29.17 + + Performance and stability improvements on all platforms. + + +2014-08-24: Version 3.29.16 + + Fix issue with numeric property names (issue 3507). + + Add back the duplicate property checker (issue 3498). + + Performance and stability improvements on all platforms. + + +2014-08-22: Version 3.29.14 + + Don't inline Array.shift() if receiver map is not extensible (Chromium + issue 405517). + + Performance and stability improvements on all platforms. + + +2014-08-21: Version 3.29.11 + + Refactor ParseObjectLiteral. + + Support symbol-named properties in API (issue 3394). + + Suppress test262 test that tests duplicate properties. + + ES6: Duplicate properties are no longer an error (issue 3498). + + Expose function CheckDebugBreak in the debugger api. + + Remove RegExp.$input (issue 3486). + + Performance and stability improvements on all platforms. + + +2014-08-21: Version 3.29.10 + + ES6: Make sure we do not store -0 as the key in Map/Set (issue 3515). + + Remove removed flags from tests. + + Expose well-known Symbols to C++ API (Chromium issue 341423). + + Implement ES6 Array.of() (issue 3427). + + Performance and stability improvements on all platforms. + + +2014-08-20: Version 3.29.9 + + Correctly handle holes when concat()ing double arrays (Chromium issue + 403409). + + [turbofan] Refactor the InstructionSelector tests (issue 3489). + + ES6: Make Map/Set constructors support iterable values (issue 3508). + + WeakMap/WeakSet: Add test for non object keys (issue 3399). Performance and stability improvements on all platforms. diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 9459204f2cb..d4139c60985 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -3,6 +3,8 @@ # all paths in here must match this assumption. vars = { + "chromium_git": "https://chromium.googlesource.com", + "chromium_trunk": "https://src.chromium.org/svn/trunk", "buildtools_revision": "fb782d4369d5ae04f17a2fceef7de5a63e50f07b", @@ -28,6 +30,11 @@ deps = { } deps_os = { + "android": { + "v8/third_party/android_tools": + Var("chromium_git") + "/android_tools.git" + "@" + + "31869996507de16812bb53a3d0aaa15cd6194c16", + }, "win": { "v8/third_party/cygwin": Var("chromium_trunk") + "/deps/third_party/cygwin@66844", diff --git a/deps/v8/Makefile b/deps/v8/Makefile index 96d7a7ae4d3..2fbe1ba7dbc 100644 --- a/deps/v8/Makefile +++ b/deps/v8/Makefile @@ -230,8 +230,8 @@ NACL_ARCHES = nacl_ia32 nacl_x64 # List of files that trigger Makefile regeneration: GYPFILES = build/all.gyp build/features.gypi build/standalone.gypi \ - build/toolchain.gypi samples/samples.gyp src/d8.gyp \ - test/cctest/cctest.gyp tools/gyp/v8.gyp + build/toolchain.gypi samples/samples.gyp src/compiler/compiler.gyp \ + src/d8.gyp test/cctest/cctest.gyp tools/gyp/v8.gyp # If vtunejit=on, the v8vtune.gyp will be appended. ifeq ($(vtunejit), on) diff --git a/deps/v8/Makefile.android b/deps/v8/Makefile.android index d46af31fdb7..8e200f1f246 100644 --- a/deps/v8/Makefile.android +++ b/deps/v8/Makefile.android @@ -64,20 +64,20 @@ else DEFINES += android_target_arch=mips mips_arch_variant=mips32r2 TOOLCHAIN_ARCH = mipsel-linux-android TOOLCHAIN_PREFIX = $(TOOLCHAIN_ARCH) - TOOLCHAIN_VER = 4.6 + TOOLCHAIN_VER = 4.8 else ifeq ($(ARCH), android_ia32) DEFINES = target_arch=ia32 v8_target_arch=ia32 android_target_arch=x86 android_target_platform=14 TOOLCHAIN_ARCH = x86 TOOLCHAIN_PREFIX = i686-linux-android - TOOLCHAIN_VER = 4.6 + TOOLCHAIN_VER = 4.8 else ifeq ($(ARCH), android_x87) DEFINES = target_arch=x87 v8_target_arch=x87 android_target_arch=x86 android_target_platform=14 TOOLCHAIN_ARCH = x86 TOOLCHAIN_PREFIX = i686-linux-android - TOOLCHAIN_VER = 4.6 + TOOLCHAIN_VER = 4.8 else $(error Target architecture "${ARCH}" is not supported) endif diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index 55bb99ab8ac..3a9895db8df 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -34,6 +34,32 @@ for more details about the presubmit API built into gcl. import sys +_EXCLUDED_PATHS = ( + r"^test[\\\/].*", + r"^testing[\\\/].*", + r"^third_party[\\\/].*", + r"^tools[\\\/].*", +) + + +# Regular expression that matches code only used for test binaries +# (best effort). +_TEST_CODE_EXCLUDED_PATHS = ( + r'.+-unittest\.cc', + # Has a method VisitForTest(). + r'src[\\\/]compiler[\\\/]ast-graph-builder\.cc', + # Test extension. + r'src[\\\/]extensions[\\\/]gc-extension\.cc', +) + + +_TEST_ONLY_WARNING = ( + 'You might be calling functions intended only for testing from\n' + 'production code. It is OK to ignore this warning if you know what\n' + 'you are doing, as the heuristics used to detect the situation are\n' + 'not perfect. The commit queue will not block on this warning.') + + def _V8PresubmitChecks(input_api, output_api): """Runs the V8 presubmit checks.""" import sys @@ -41,7 +67,7 @@ def _V8PresubmitChecks(input_api, output_api): input_api.PresubmitLocalPath(), 'tools')) from presubmit import CppLintProcessor from presubmit import SourceProcessor - from presubmit import CheckGeneratedRuntimeTests + from presubmit import CheckRuntimeVsNativesNameClashes from presubmit import CheckExternalReferenceRegistration results = [] @@ -51,9 +77,9 @@ def _V8PresubmitChecks(input_api, output_api): results.append(output_api.PresubmitError( "Copyright header, trailing whitespaces and two empty lines " \ "between declarations check failed")) - if not CheckGeneratedRuntimeTests(input_api.PresubmitLocalPath()): + if not CheckRuntimeVsNativesNameClashes(input_api.PresubmitLocalPath()): results.append(output_api.PresubmitError( - "Generated runtime tests check failed")) + "Runtime/natives name clash check failed")) if not CheckExternalReferenceRegistration(input_api.PresubmitLocalPath()): results.append(output_api.PresubmitError( "External references registration check failed")) @@ -113,6 +139,49 @@ def _CheckUnwantedDependencies(input_api, output_api): return results +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 + that ignores header files and may have some false positives. A + better implementation would probably need a proper C++ parser. + """ + # We only scan .cc files, as the declaration of for-testing functions in + # header files are hard to distinguish from calls to such functions without a + # proper C++ parser. + file_inclusion_pattern = r'.+\.cc' + + base_function_pattern = r'[ :]test::[^\s]+|ForTest(ing)?|for_test(ing)?' + inclusion_pattern = input_api.re.compile(r'(%s)\s*\(' % base_function_pattern) + comment_pattern = input_api.re.compile(r'//.*(%s)' % base_function_pattern) + exclusion_pattern = input_api.re.compile( + r'::[A-Za-z0-9_]+(%s)|(%s)[^;]+\{' % ( + base_function_pattern, base_function_pattern)) + + def FilterFile(affected_file): + black_list = (_EXCLUDED_PATHS + + _TEST_CODE_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 (inclusion_pattern.search(line) and + not comment_pattern.search(line) and + not exclusion_pattern.search(line)): + problems.append( + '%s:%d\n %s' % (local_path, line_number, line.strip())) + + if problems: + return [output_api.PresubmitPromptOrNotify(_TEST_ONLY_WARNING, problems)] + else: + return [] + + def _CommonChecks(input_api, output_api): """Checks common to both upload and commit.""" results = [] @@ -122,6 +191,8 @@ def _CommonChecks(input_api, output_api): input_api, output_api)) results.extend(_V8PresubmitChecks(input_api, output_api)) results.extend(_CheckUnwantedDependencies(input_api, output_api)) + results.extend( + _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api)) return results @@ -180,6 +251,6 @@ def GetPreferredTryMasters(project, change): 'v8_linux_layout_dbg': set(['defaulttests']), 'v8_mac_rel': set(['defaulttests']), 'v8_win_rel': set(['defaulttests']), - 'v8_win64_rel': set(['defaulttests']), + 'v8_win64_compile_rel': set(['defaulttests']), }, } diff --git a/deps/v8/benchmarks/v8.json b/deps/v8/benchmarks/v8.json index f4210d9d406..03ea9621aca 100644 --- a/deps/v8/benchmarks/v8.json +++ b/deps/v8/benchmarks/v8.json @@ -3,7 +3,7 @@ "main": "run.js", "run_count": 2, "results_regexp": "^%s: (.+)$", - "benchmarks": [ + "tests": [ {"name": "Richards"}, {"name": "DeltaBlue"}, {"name": "Crypto"}, diff --git a/deps/v8/build/all.gyp b/deps/v8/build/all.gyp index 5e410a3d0f2..1e420fad8ec 100644 --- a/deps/v8/build/all.gyp +++ b/deps/v8/build/all.gyp @@ -9,10 +9,12 @@ 'type': 'none', 'dependencies': [ '../samples/samples.gyp:*', + '../src/base/base.gyp:base-unittests', + '../src/compiler/compiler.gyp:compiler-unittests', '../src/d8.gyp:d8', - '../test/base-unittests/base-unittests.gyp:*', + '../src/heap/heap.gyp:heap-unittests', + '../src/libplatform/libplatform.gyp:libplatform-unittests', '../test/cctest/cctest.gyp:*', - '../test/compiler-unittests/compiler-unittests.gyp:*', ], 'conditions': [ ['component!="shared_library"', { diff --git a/deps/v8/build/android.gypi b/deps/v8/build/android.gypi index 46ece08524e..f984ea3af61 100644 --- a/deps/v8/build/android.gypi +++ b/deps/v8/build/android.gypi @@ -87,7 +87,6 @@ '-pthread', # Not supported by Android toolchain. ], 'cflags': [ - '-U__linux__', # Don't allow toolchain to claim -D__linux__ '-ffunction-sections', '-funwind-tables', '-fstack-protector', diff --git a/deps/v8/build/get_landmines.py b/deps/v8/build/get_landmines.py index c6ff8165f93..66a86cbb508 100755 --- a/deps/v8/build/get_landmines.py +++ b/deps/v8/build/get_landmines.py @@ -19,6 +19,7 @@ def main(): print 'Landmines test.' print 'Activating MSVS 2013.' print 'Revert activation of MSVS 2013.' + print 'Activating MSVS 2013 again.' return 0 diff --git a/deps/v8/build/standalone.gypi b/deps/v8/build/standalone.gypi index 2ed19f65eac..b09122b538e 100644 --- a/deps/v8/build/standalone.gypi +++ b/deps/v8/build/standalone.gypi @@ -215,9 +215,18 @@ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ or OS=="netbsd"', { 'target_defaults': { - 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', - '-Wno-long-long', '-pthread', '-fno-exceptions', - '-pedantic' ], + 'cflags': [ + '-Wall', + '<(werror)', + '-W', + '-Wno-unused-parameter', + '-Wno-long-long', + '-pthread', + '-fno-exceptions', + '-pedantic', + # Don't warn about the "struct foo f = {0};" initialization pattern. + '-Wno-missing-field-initializers', + ], 'cflags_cc': [ '-Wnon-virtual-dtor', '-fno-rtti', '-std=gnu++0x' ], 'ldflags': [ '-pthread', ], 'conditions': [ @@ -234,8 +243,15 @@ # or OS=="netbsd"' ['OS=="qnx"', { 'target_defaults': { - 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', - '-fno-exceptions' ], + 'cflags': [ + '-Wall', + '<(werror)', + '-W', + '-Wno-unused-parameter', + '-fno-exceptions', + # Don't warn about the "struct foo f = {0};" initialization pattern. + '-Wno-missing-field-initializers', + ], 'cflags_cc': [ '-Wnon-virtual-dtor', '-fno-rtti', '-std=gnu++0x' ], 'conditions': [ [ 'visibility=="hidden"', { @@ -263,6 +279,7 @@ 'defines': [ '_CRT_SECURE_NO_DEPRECATE', '_CRT_NONSTDC_NO_DEPRECATE', + '_USING_V110_SDK71_', ], 'conditions': [ ['component=="static_library"', { @@ -298,6 +315,7 @@ 'AdditionalOptions': ['/ignore:4221'], }, 'VCLinkerTool': { + 'MinimumRequiredVersion': '5.01', # XP. 'AdditionalDependencies': [ 'ws2_32.lib', ], @@ -359,6 +377,8 @@ '-Wendif-labels', '-W', '-Wno-unused-parameter', + # Don't warn about the "struct foo f = {0};" initialization pattern. + '-Wno-missing-field-initializers', ], }, 'conditions': [ diff --git a/deps/v8/build/toolchain.gypi b/deps/v8/build/toolchain.gypi index 1d47360d2a7..7f3b9e52d91 100644 --- a/deps/v8/build/toolchain.gypi +++ b/deps/v8/build/toolchain.gypi @@ -58,6 +58,14 @@ # Default arch variant for MIPS. 'mips_arch_variant%': 'r2', + # Possible values fp32, fp64, fpxx. + # fp32 - 32 32-bit FPU registers are available, doubles are placed in + # register pairs. + # fp64 - 32 64-bit FPU registers are available. + # fpxx - compatibility mode, it chooses fp32 or fp64 depending on runtime + # detection + 'mips_fpu_mode%': 'fp32', + 'v8_enable_backtrace%': 0, # Enable profiling support. Only required on Windows. @@ -83,6 +91,9 @@ # Allow to suppress the array bounds warning (default is no suppression). 'wno_array_bounds%': '', + # Link-Time Optimizations + 'use_lto%': 0, + 'variables': { # This is set when building the Android WebView inside the Android build # system, using the 'android' gyp backend. @@ -233,6 +244,15 @@ }], ], }], + # Disable LTO for v8 + # v8 is optimized for speed, which takes precedence over + # size optimization in LTO. + ['use_lto==1', { + 'cflags!': [ + '-flto', + '-ffat-lto-objects', + ], + }], ], }], # _toolset=="target" ], @@ -272,10 +292,33 @@ 'cflags': ['-msoft-float'], 'ldflags': ['-msoft-float'], }], + ['mips_fpu_mode=="fp64"', { + 'cflags': ['-mfp64'], + }], + ['mips_fpu_mode=="fpxx"', { + 'cflags': ['-mfpxx'], + }], + ['mips_fpu_mode=="fp32"', { + 'cflags': ['-mfp32'], + }], + ['mips_arch_variant=="r6"', { + 'cflags!': ['-mfp32'], + 'cflags': ['-mips32r6', '-Wa,-mips32r6'], + 'ldflags': [ + '-mips32r6', + '-Wl,--dynamic-linker=$(LDSO_PATH)', + '-Wl,--rpath=$(LD_R_PATH)', + ], + }], ['mips_arch_variant=="r2"', { 'cflags': ['-mips32r2', '-Wa,-mips32r2'], }], ['mips_arch_variant=="r1"', { + 'cflags!': ['-mfp64'], + 'cflags': ['-mips32', '-Wa,-mips32'], + }], + ['mips_arch_variant=="rx"', { + 'cflags!': ['-mfp64'], 'cflags': ['-mips32', '-Wa,-mips32'], }], ], @@ -297,8 +340,34 @@ '__mips_soft_float=1' ], }], + ['mips_arch_variant=="rx"', { + 'defines': [ + '_MIPS_ARCH_MIPS32RX', + 'FPU_MODE_FPXX', + ], + }], + ['mips_arch_variant=="r6"', { + 'defines': [ + '_MIPS_ARCH_MIPS32R6', + 'FPU_MODE_FP64', + ], + }], ['mips_arch_variant=="r2"', { 'defines': ['_MIPS_ARCH_MIPS32R2',], + 'conditions': [ + ['mips_fpu_mode=="fp64"', { + 'defines': ['FPU_MODE_FP64',], + }], + ['mips_fpu_mode=="fpxx"', { + 'defines': ['FPU_MODE_FPXX',], + }], + ['mips_fpu_mode=="fp32"', { + 'defines': ['FPU_MODE_FP32',], + }], + ], + }], + ['mips_arch_variant=="r1"', { + 'defines': ['FPU_MODE_FP32',], }], ], }], # v8_target_arch=="mips" @@ -321,13 +390,37 @@ 'cflags': ['-msoft-float'], 'ldflags': ['-msoft-float'], }], + ['mips_fpu_mode=="fp64"', { + 'cflags': ['-mfp64'], + }], + ['mips_fpu_mode=="fpxx"', { + 'cflags': ['-mfpxx'], + }], + ['mips_fpu_mode=="fp32"', { + 'cflags': ['-mfp32'], + }], + ['mips_arch_variant=="r6"', { + 'cflags!': ['-mfp32'], + 'cflags': ['-mips32r6', '-Wa,-mips32r6'], + 'ldflags': [ + '-mips32r6', + '-Wl,--dynamic-linker=$(LDSO_PATH)', + '-Wl,--rpath=$(LD_R_PATH)', + ], + }], ['mips_arch_variant=="r2"', { 'cflags': ['-mips32r2', '-Wa,-mips32r2'], }], ['mips_arch_variant=="r1"', { + 'cflags!': ['-mfp64'], 'cflags': ['-mips32', '-Wa,-mips32'], - }], + }], + ['mips_arch_variant=="rx"', { + 'cflags!': ['-mfp64'], + 'cflags': ['-mips32', '-Wa,-mips32'], + }], ['mips_arch_variant=="loongson"', { + 'cflags!': ['-mfp64'], 'cflags': ['-mips3', '-Wa,-mips3'], }], ], @@ -349,11 +442,40 @@ '__mips_soft_float=1' ], }], + ['mips_arch_variant=="rx"', { + 'defines': [ + '_MIPS_ARCH_MIPS32RX', + 'FPU_MODE_FPXX', + ], + }], + ['mips_arch_variant=="r6"', { + 'defines': [ + '_MIPS_ARCH_MIPS32R6', + 'FPU_MODE_FP64', + ], + }], ['mips_arch_variant=="r2"', { 'defines': ['_MIPS_ARCH_MIPS32R2',], + 'conditions': [ + ['mips_fpu_mode=="fp64"', { + 'defines': ['FPU_MODE_FP64',], + }], + ['mips_fpu_mode=="fpxx"', { + 'defines': ['FPU_MODE_FPXX',], + }], + ['mips_fpu_mode=="fp32"', { + 'defines': ['FPU_MODE_FP32',], + }], + ], + }], + ['mips_arch_variant=="r1"', { + 'defines': ['FPU_MODE_FP32',], }], ['mips_arch_variant=="loongson"', { - 'defines': ['_MIPS_ARCH_LOONGSON',], + 'defines': [ + '_MIPS_ARCH_LOONGSON', + 'FPU_MODE_FP32', + ], }], ], }], # v8_target_arch=="mipsel" @@ -499,6 +621,12 @@ 'cflags': [ '-m32' ], 'ldflags': [ '-m32' ], }], + # Enable feedback-directed optimisation when building in android. + [ 'android_webview_build == 1', { + 'aosp_build_settings': { + 'LOCAL_FDO_SUPPORT': 'true', + }, + }], ], 'xcode_settings': { 'ARCHS': [ 'i386' ], @@ -523,6 +651,12 @@ 'cflags': [ '-m64' ], 'ldflags': [ '-m64' ], }], + # Enable feedback-directed optimisation when building in android. + [ 'android_webview_build == 1', { + 'aosp_build_settings': { + 'LOCAL_FDO_SUPPORT': 'true', + }, + }], ] }], ], diff --git a/deps/v8/include/v8-debug.h b/deps/v8/include/v8-debug.h index e72415952d9..6abf4e095bc 100644 --- a/deps/v8/include/v8-debug.h +++ b/deps/v8/include/v8-debug.h @@ -167,6 +167,9 @@ class V8_EXPORT Debug { // happened yet. static void CancelDebugBreak(Isolate* isolate); + // Check if a debugger break is scheduled in the given isolate. + static bool CheckDebugBreak(Isolate* isolate); + // Break execution of JavaScript in the given isolate (this method // can be invoked from a non-VM thread) for further client command // execution on a VM thread. Client data is then passed in diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index ef0bda63f43..63c67624a13 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -77,6 +77,7 @@ class ImplementationUtilities; class Int32; class Integer; class Isolate; +class Name; class Number; class NumberObject; class Object; @@ -129,6 +130,7 @@ class Heap; class HeapObject; class Isolate; class Object; +struct StreamedSource; template class CustomArguments; class PropertyCallbackArguments; class FunctionCallbackArguments; @@ -1087,6 +1089,73 @@ class V8_EXPORT ScriptCompiler { CachedData* cached_data; }; + /** + * For streaming incomplete script data to V8. The embedder should implement a + * subclass of this class. + */ + class ExternalSourceStream { + public: + virtual ~ExternalSourceStream() {} + + /** + * V8 calls this to request the next chunk of data from the embedder. This + * function will be called on a background thread, so it's OK to block and + * wait for the data, if the embedder doesn't have data yet. Returns the + * length of the data returned. When the data ends, GetMoreData should + * return 0. Caller takes ownership of the data. + * + * When streaming UTF-8 data, V8 handles multi-byte characters split between + * two data chunks, but doesn't handle multi-byte characters split between + * more than two data chunks. The embedder can avoid this problem by always + * returning at least 2 bytes of data. + * + * If the embedder wants to cancel the streaming, they should make the next + * GetMoreData call return 0. V8 will interpret it as end of data (and most + * probably, parsing will fail). The streaming task will return as soon as + * V8 has parsed the data it received so far. + */ + virtual size_t GetMoreData(const uint8_t** src) = 0; + }; + + + /** + * Source code which can be streamed into V8 in pieces. It will be parsed + * while streaming. It can be compiled after the streaming is complete. + * StreamedSource must be kept alive while the streaming task is ran (see + * ScriptStreamingTask below). + */ + class V8_EXPORT StreamedSource { + public: + enum Encoding { ONE_BYTE, TWO_BYTE, UTF8 }; + + StreamedSource(ExternalSourceStream* source_stream, Encoding encoding); + ~StreamedSource(); + + // Ownership of the CachedData or its buffers is *not* transferred to the + // caller. The CachedData object is alive as long as the StreamedSource + // object is alive. + const CachedData* GetCachedData() const; + + internal::StreamedSource* impl() const { return impl_; } + + private: + // Prevent copying. Not implemented. + StreamedSource(const StreamedSource&); + StreamedSource& operator=(const StreamedSource&); + + internal::StreamedSource* impl_; + }; + + /** + * A streaming task which the embedder must run on a background thread to + * stream scripts into V8. Returned by ScriptCompiler::StartStreamingScript. + */ + class ScriptStreamingTask { + public: + virtual ~ScriptStreamingTask() {} + virtual void Run() = 0; + }; + enum CompileOptions { kNoCompileOptions = 0, kProduceParserCache, @@ -1129,6 +1198,32 @@ class V8_EXPORT ScriptCompiler { static Local