diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index cc424333d31334..d0a859c12dacf9 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -60,6 +60,8 @@ shell_g /test/promises-aplus/promises-tests /test/promises-aplus/promises-tests.tar.gz /test/promises-aplus/sinon +/test/simdjs/ecmascript_simd* +/test/simdjs/data* /test/test262/data /test/test262/data.old /test/test262/tc39-test262-* diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index feaec2505e8359..059ee07086248d 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -52,7 +52,7 @@ config("internal_config") { include_dirs = [ "." ] - if (component_mode == "shared_library") { + if (is_component_build) { defines = [ "V8_SHARED", "BUILDING_V8_SHARED", @@ -202,8 +202,9 @@ action("js2c") { sources = [ "src/macros.py", - "src/messages.h", + "src/messages.h", "src/runtime.js", + "src/prologue.js", "src/v8natives.js", "src/symbol.js", "src/array.js", @@ -215,6 +216,7 @@ action("js2c") { "src/regexp.js", "src/arraybuffer.js", "src/typedarray.js", + "src/iterator-prototype.js", "src/generator.js", "src/object-observe.js", "src/collection.js", @@ -229,6 +231,8 @@ action("js2c") { "src/mirror-debugger.js", "src/liveedit-debugger.js", "src/templates.js", + "src/harmony-array.js", + "src/harmony-typedarray.js", ] outputs = [ @@ -264,17 +268,18 @@ action("js2c_experimental") { sources = [ "src/macros.py", - "src/messages.h", + "src/messages.h", "src/proxy.js", "src/generator.js", - "src/harmony-array.js", + "src/harmony-atomics.js", "src/harmony-array-includes.js", - "src/harmony-typedarray.js", + "src/harmony-concat-spreadable.js", "src/harmony-tostring.js", "src/harmony-regexp.js", "src/harmony-reflect.js", "src/harmony-spread.js", - "src/harmony-object.js" + "src/harmony-object.js", + "src/harmony-sharedarraybuffer.js" ] outputs = [ @@ -474,9 +479,13 @@ source_set("v8_snapshot") { ":js2c", ":js2c_experimental", ":js2c_extras", - ":run_mksnapshot", ":v8_base", ] + public_deps = [ + # This should be public so downstream targets can declare the snapshot + # output file as their inputs. + ":run_mksnapshot", + ] sources = [ "$target_gen_dir/libraries.cc", @@ -502,9 +511,11 @@ if (v8_use_external_startup_data) { ":js2c", ":js2c_experimental", ":js2c_extras", - ":run_mksnapshot", ":v8_base", + ] + public_deps = [ ":natives_blob", + ":run_mksnapshot", ] sources = [ @@ -526,6 +537,14 @@ source_set("v8_base") { visibility = [ ":*" ] # Only targets in this file can depend on this. sources = [ + "include/v8-debug.h", + "include/v8-platform.h", + "include/v8-profiler.h", + "include/v8-testing.h", + "include/v8-util.h", + "include/v8-version.h", + "include/v8.h", + "include/v8config.h", "src/accessors.cc", "src/accessors.h", "src/allocation.cc", @@ -544,6 +563,8 @@ source_set("v8_base") { "src/assembler.h", "src/assert-scope.h", "src/assert-scope.cc", + "src/ast-literal-reindexer.cc", + "src/ast-literal-reindexer.h", "src/ast-numbering.cc", "src/ast-numbering.h", "src/ast-value-factory.cc", @@ -602,6 +623,8 @@ source_set("v8_base") { "src/compiler/basic-block-instrumentor.h", "src/compiler/change-lowering.cc", "src/compiler/change-lowering.h", + "src/compiler/coalesced-live-ranges.cc", + "src/compiler/coalesced-live-ranges.h", "src/compiler/code-generator-impl.h", "src/compiler/code-generator.cc", "src/compiler/code-generator.h", @@ -617,8 +640,8 @@ source_set("v8_base") { "src/compiler/control-equivalence.h", "src/compiler/control-flow-optimizer.cc", "src/compiler/control-flow-optimizer.h", - "src/compiler/control-reducer.cc", - "src/compiler/control-reducer.h", + "src/compiler/dead-code-elimination.cc", + "src/compiler/dead-code-elimination.h", "src/compiler/diamond.h", "src/compiler/frame.h", "src/compiler/frame-elider.cc", @@ -632,10 +655,14 @@ source_set("v8_base") { "src/compiler/graph-reducer.h", "src/compiler/graph-replay.cc", "src/compiler/graph-replay.h", + "src/compiler/graph-trimmer.cc", + "src/compiler/graph-trimmer.h", "src/compiler/graph-visualizer.cc", "src/compiler/graph-visualizer.h", "src/compiler/graph.cc", "src/compiler/graph.h", + "src/compiler/greedy-allocator.cc", + "src/compiler/greedy-allocator.h", "src/compiler/instruction-codes.h", "src/compiler/instruction-selector-impl.h", "src/compiler/instruction-selector.cc", @@ -646,6 +673,8 @@ source_set("v8_base") { "src/compiler/js-builtin-reducer.h", "src/compiler/js-context-specialization.cc", "src/compiler/js-context-specialization.h", + "src/compiler/js-frame-specialization.cc", + "src/compiler/js-frame-specialization.h", "src/compiler/js-generic-lowering.cc", "src/compiler/js-generic-lowering.h", "src/compiler/js-graph.cc", @@ -774,6 +803,7 @@ source_set("v8_base") { "src/elements.h", "src/execution.cc", "src/execution.h", + "src/expression-classifier.h", "src/extensions/externalize-string-extension.cc", "src/extensions/externalize-string-extension.h", "src/extensions/free-buffer-extension.cc", @@ -830,6 +860,8 @@ source_set("v8_base") { "src/heap/mark-compact-inl.h", "src/heap/mark-compact.cc", "src/heap/mark-compact.h", + "src/heap/memory-reducer.cc", + "src/heap/memory-reducer.h", "src/heap/objects-visiting-inl.h", "src/heap/objects-visiting.cc", "src/heap/objects-visiting.h", @@ -958,12 +990,11 @@ source_set("v8_base") { "src/optimizing-compile-dispatcher.h", "src/ostreams.cc", "src/ostreams.h", + "src/pattern-rewriter.cc", "src/parser.cc", "src/parser.h", "src/pending-compilation-error-handler.cc", "src/pending-compilation-error-handler.h", - "src/perf-jit.cc", - "src/perf-jit.h", "src/preparse-data-format.h", "src/preparse-data.cc", "src/preparse-data.h", @@ -992,11 +1023,13 @@ source_set("v8_base") { "src/runtime-profiler.cc", "src/runtime-profiler.h", "src/runtime/runtime-array.cc", + "src/runtime/runtime-atomics.cc", "src/runtime/runtime-classes.cc", "src/runtime/runtime-collections.cc", "src/runtime/runtime-compiler.cc", "src/runtime/runtime-date.cc", "src/runtime/runtime-debug.cc", + "src/runtime/runtime-forin.cc", "src/runtime/runtime-function.cc", "src/runtime/runtime-generator.cc", "src/runtime/runtime-i18n.cc", @@ -1032,6 +1065,7 @@ source_set("v8_base") { "src/scopes.cc", "src/scopes.h", "src/signature.h", + "src/simulator.h", "src/small-pointer-list.h", "src/smart-pointers.h", "src/snapshot/natives.h", @@ -1040,6 +1074,8 @@ source_set("v8_base") { "src/snapshot/snapshot-common.cc", "src/snapshot/snapshot-source-sink.cc", "src/snapshot/snapshot-source-sink.h", + "src/splay-tree.h", + "src/splay-tree-inl.h", "src/snapshot/snapshot.h", "src/string-builder.cc", "src/string-builder.h", @@ -1089,6 +1125,8 @@ source_set("v8_base") { "src/vm-state.h", "src/zone.cc", "src/zone.h", + "src/zone-allocator.h", + "src/zone-containers.h", "src/third_party/fdlibm/fdlibm.cc", "src/third_party/fdlibm/fdlibm.h", ] @@ -1201,6 +1239,7 @@ 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/simulator-arm.h", "src/compiler/arm/code-generator-arm.cc", "src/compiler/arm/instruction-codes-arm.h", "src/compiler/arm/instruction-selector-arm.cc", @@ -1295,6 +1334,7 @@ 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/simulator-mips.h", "src/compiler/mips/code-generator-mips.cc", "src/compiler/mips/instruction-codes-mips.h", "src/compiler/mips/instruction-selector-mips.cc", @@ -1336,6 +1376,7 @@ source_set("v8_base") { "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/ic/mips64/access-compiler-mips64.cc", "src/ic/mips64/handler-compiler-mips64.cc", "src/ic/mips64/ic-mips64.cc", @@ -1399,6 +1440,8 @@ source_set("v8_libbase") { "src/base/atomicops_internals_atomicword_compat.h", "src/base/atomicops_internals_mac.h", "src/base/atomicops_internals_mips_gcc.h", + "src/base/atomicops_internals_mips64_gcc.h", + "src/base/atomicops_internals_portable.h", "src/base/atomicops_internals_tsan.h", "src/base/atomicops_internals_x86_gcc.cc", "src/base/atomicops_internals_x86_gcc.h", @@ -1558,7 +1601,7 @@ if (current_toolchain == snapshot_toolchain) { # Public targets # -if (component_mode == "shared_library") { +if (is_component_build) { component("v8") { sources = [ "src/v8dll-main.cc", @@ -1567,11 +1610,17 @@ if (component_mode == "shared_library") { if (v8_use_snapshot && v8_use_external_startup_data) { deps = [ ":v8_base", + ] + public_deps = [ ":v8_external_snapshot", ] } else if (v8_use_snapshot) { deps = [ ":v8_base", + ] + # v8_snapshot should be public so downstream targets can declare the + # snapshot file as their input. + public_deps = [ ":v8_snapshot", ] } else { @@ -1607,6 +1656,8 @@ if (component_mode == "shared_library") { } else if (v8_use_snapshot) { deps = [ ":v8_base", + ] + public_deps = [ ":v8_snapshot", ] } else { @@ -1657,9 +1708,10 @@ if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") || sources += [ "src/d8-windows.cc" ] } - if (component_mode != "shared_library") { + 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 c665f1763eb431..e8ce91563387b5 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,678 @@ +2015-07-08: Version 4.5.103 + + Performance and stability improvements on all platforms. + + +2015-07-08: Version 4.5.102 + + Performance and stability improvements on all platforms. + + +2015-07-07: Version 4.5.101 + + Move compatible receiver check from CompileHandler to UpdateCaches + (Chromium issue 505374). + + Performance and stability improvements on all platforms. + + +2015-07-07: Version 4.5.100 + + Performance and stability improvements on all platforms. + + +2015-07-07: Version 4.5.99 + + unicode-decoder: fix out-of-band write in utf16 (issue 4274). + + Performance and stability improvements on all platforms. + + +2015-07-06: Version 4.5.98 + + Performance and stability improvements on all platforms. + + +2015-07-04: Version 4.5.97 + + Performance and stability improvements on all platforms. + + +2015-07-03: Version 4.5.96 + + Performance and stability improvements on all platforms. + + +2015-07-03: Version 4.5.95 + + Performance and stability improvements on all platforms. + + +2015-07-02: Version 4.5.94 + + Performance and stability improvements on all platforms. + + +2015-07-02: Version 4.5.93 + + Include Harmony Array/TypedArray methods unconditionally (Chromium issue + 504629). + + Performance and stability improvements on all platforms. + + +2015-07-02: Version 4.5.92 + + Performance and stability improvements on all platforms. + + +2015-07-01: Version 4.5.91 + + Performance and stability improvements on all platforms. + + +2015-07-01: Version 4.5.90 + + Performance and stability improvements on all platforms. + + +2015-07-01: Version 4.5.89 + + Performance and stability improvements on all platforms. + + +2015-06-30: Version 4.5.88 + + Performance and stability improvements on all platforms. + + +2015-06-30: Version 4.5.87 + + Performance and stability improvements on all platforms. + + +2015-06-30: Version 4.5.86 + + Ensure mjsunit tests use dashes not underscores in flags directives + (Chromium issue 505228). + + Performance and stability improvements on all platforms. + + +2015-06-29: Version 4.5.85 + + Fix flag convention in handle count tests and comment (Chromium issue + 505228). + + Performance and stability improvements on all platforms. + + +2015-06-29: Version 4.5.84 + + Performance and stability improvements on all platforms. + + +2015-06-27: Version 4.5.83 + + Performance and stability improvements on all platforms. + + +2015-06-26: Version 4.5.82 + + Performance and stability improvements on all platforms. + + +2015-06-26: Version 4.5.81 + + Remove obsolete options in ScriptCompiler::CompileOptions (Chromium + issue 399580). + + Performance and stability improvements on all platforms. + + +2015-06-25: Version 4.5.80 + + Performance and stability improvements on all platforms. + + +2015-06-25: Version 4.5.79 + + Performance and stability improvements on all platforms. + + +2015-06-25: Version 4.5.78 + + Serializer: clear next link in weak cells (Chromium issue 503552). + + Performance and stability improvements on all platforms. + + +2015-06-24: Version 4.5.77 + + Performance and stability improvements on all platforms. + + +2015-06-24: Version 4.5.76 + + Performance and stability improvements on all platforms. + + +2015-06-24: Version 4.5.75 + + Date() should not depend on Date.prototype.toString (issue 4225). + + Performance and stability improvements on all platforms. + + +2015-06-23: Version 4.5.74 + + Expose Map/Set methods through the API (issue 3340). + + [turbofan] NaN is never truish (issue 4207). + + Performance and stability improvements on all platforms. + + +2015-06-23: Version 4.5.73 + + Re-ship Harmony Array/TypedArray methods (issue 3578). + + Performance and stability improvements on all platforms. + + +2015-06-23: Version 4.5.72 + + Performance and stability improvements on all platforms. + + +2015-06-23: Version 4.5.71 + + Performance and stability improvements on all platforms. + + +2015-06-20: Version 4.5.70 + + Ship Harmony Array/TypedArray methods (issue 3578). + + Performance and stability improvements on all platforms. + + +2015-06-20: Version 4.5.69 + + Ship arrow functions (issue 2700). + + Performance and stability improvements on all platforms. + + +2015-06-19: Version 4.5.68 + + Performance and stability improvements on all platforms. + + +2015-06-19: Version 4.5.67 + + Performance and stability improvements on all platforms. + + +2015-06-19: Version 4.5.66 + + Ship arrow functions (issue 2700). + + Performance and stability improvements on all platforms. + + +2015-06-18: Version 4.5.65 + + Performance and stability improvements on all platforms. + + +2015-06-18: Version 4.5.64 + + Performance and stability improvements on all platforms. + + +2015-06-18: Version 4.5.63 + + Performance and stability improvements on all platforms. + + +2015-06-17: Version 4.5.62 + + Hydrogen object literals: always initialize in-object properties + (Chromium issue 500497). + + Performance and stability improvements on all platforms. + + +2015-06-17: Version 4.5.61 + + Add %TypedArray% to proto chain (issue 4085). + + Performance and stability improvements on all platforms. + + +2015-06-17: Version 4.5.60 + + Performance and stability improvements on all platforms. + + +2015-06-17: Version 4.5.59 + + [crankshaft] Fix wrong bailout points in for-in loop body (Chromium + issue 500435). + + Performance and stability improvements on all platforms. + + +2015-06-16: Version 4.5.58 + + Performance and stability improvements on all platforms. + + +2015-06-16: Version 4.5.57 + + Inline code generation for %_IsTypedArray (issue 4085). + + Allow TypedArrays to be initialized with iterables (issue 4090). + + Performance and stability improvements on all platforms. + + +2015-06-15: Version 4.5.56 + + Performance and stability improvements on all platforms. + + +2015-06-15: Version 4.5.55 + + Performance and stability improvements on all platforms. + + +2015-06-14: Version 4.5.54 + + Performance and stability improvements on all platforms. + + +2015-06-13: Version 4.5.53 + + Performance and stability improvements on all platforms. + + +2015-06-12: Version 4.5.52 + + Map::TryUpdate() must be in sync with Map::Update() (issue 4173). + + Add ToObject call in Array.prototype.sort (issue 4125). + + In Array.of and Array.from, fall back to DefineOwnProperty (issue 4168). + + Performance and stability improvements on all platforms. + + +2015-06-12: Version 4.5.51 + + Performance and stability improvements on all platforms. + + +2015-06-11: Version 4.5.50 + + Performance and stability improvements on all platforms. + + +2015-06-11: Version 4.5.49 + + Performance and stability improvements on all platforms. + + +2015-06-11: Version 4.5.48 + + Support rest parameters in arrow functions (issue 2700). + + Performance and stability improvements on all platforms. + + +2015-06-10: Version 4.5.47 + + Implement %TypedArray%.prototype.slice (issue 3578). + + Performance and stability improvements on all platforms. + + +2015-06-09: Version 4.5.46 + + Stage ES6 arrow functions (issue 2700). + + Performance and stability improvements on all platforms. + + +2015-06-09: Version 4.5.45 + + Performance and stability improvements on all platforms. + + +2015-06-09: Version 4.5.44 + + Performance and stability improvements on all platforms. + + +2015-06-08: Version 4.5.43 + + [for-in] Make ForInNext and ForInFilter deal properly with exceptions + (Chromium issue 496331). + + Performance and stability improvements on all platforms. + + +2015-06-08: Version 4.5.42 + + Performance and stability improvements on all platforms. + + +2015-06-06: Version 4.5.41 + + Performance and stability improvements on all platforms. + + +2015-06-05: Version 4.5.40 + + Performance and stability improvements on all platforms. + + +2015-06-05: Version 4.5.39 + + Stage ES6 Array and TypedArray methods (issue 3578). + + Performance and stability improvements on all platforms. + + +2015-06-05: Version 4.5.38 + + Implement %TypedArray%.prototype.{reduce,reduceRight} (issue 3578). + + Add support for Embedded Constant Pools for PPC and Arm (Chromium issue + 478811). + + Performance and stability improvements on all platforms. + + +2015-06-04: Version 4.5.37 + + Performance and stability improvements on all platforms. + + +2015-06-04: Version 4.5.36 + + Performance and stability improvements on all platforms. + + +2015-06-04: Version 4.5.35 + + Flatten the Arrays returned and consumed by the v8::Map API (Chromium + issue 478263). + + Performance and stability improvements on all platforms. + + +2015-06-03: Version 4.5.34 + + Also allocate small typed arrays on heap when initialized from an array- + like (issue 3996). + + Implement %TypedArray%.prototype.{reduce,reduceRight} (issue 3578). + + Performance and stability improvements on all platforms. + + +2015-06-03: Version 4.5.33 + + Add support for Embedded Constant Pools for PPC and Arm (Chromium issue + 478811). + + Implement %TypedArray%.prototype.{toString,toLocaleString,join} (issue + 3578). + + Performance and stability improvements on all platforms. + + +2015-06-03: Version 4.5.32 + + Performance and stability improvements on all platforms. + + +2015-06-02: Version 4.5.31 + + Performance and stability improvements on all platforms. + + +2015-06-02: Version 4.5.30 + + Performance and stability improvements on all platforms. + + +2015-06-01: Version 4.5.29 + + Reland "Re-enable on-heap typed array allocation" (issue 3996). + + Performance and stability improvements on all platforms. + + +2015-06-01: Version 4.5.28 + + Re-enable on-heap typed array allocation (issue 3996). + + Also expose DefineOwnProperty (Chromium issue 475206). + + Performance and stability improvements on all platforms. + + +2015-06-01: Version 4.5.27 + + Performance and stability improvements on all platforms. + + +2015-05-31: Version 4.5.26 + + Performance and stability improvements on all platforms. + + +2015-05-30: Version 4.5.25 + + Performance and stability improvements on all platforms. + + +2015-05-29: Version 4.5.24 + + Debugger: consider try-finally scopes not catching wrt debug events + (Chromium issue 492522). + + Performance and stability improvements on all platforms. + + +2015-05-29: Version 4.5.23 + + Performance and stability improvements on all platforms. + + +2015-05-29: Version 4.5.22 + + Do not eagerly convert exception to string when creating a message + object (Chromium issue 490680). + + Performance and stability improvements on all platforms. + + +2015-05-28: Version 4.5.21 + + Performance and stability improvements on all platforms. + + +2015-05-28: Version 4.5.20 + + Introduce v8::Object::CreateDataProperty (Chromium issue 475206). + + Performance and stability improvements on all platforms. + + +2015-05-27: Version 4.5.19 + + Performance and stability improvements on all platforms. + + +2015-05-27: Version 4.5.18 + + Add {Map,Set}::FromArray to the API (issue 3340). + + Add {Map,Set}::AsArray to the API (issue 3340). + + Add basic API support for Map & Set (issue 3340). + + Performance and stability improvements on all platforms. + + +2015-05-26: Version 4.5.17 + + Correctly hook up materialized receiver into the evaluation context + chain (Chromium issue 491943). + + Implement bookmarks for ExternalStreamingStream (Chromium issue 470930). + + Performance and stability improvements on all platforms. + + +2015-05-26: Version 4.5.16 + + Performance and stability improvements on all platforms. + + +2015-05-26: Version 4.5.15 + + Performance and stability improvements on all platforms. + + +2015-05-23: Version 4.5.14 + + Performance and stability improvements on all platforms. + + +2015-05-22: Version 4.5.13 + + Remove v8::Private. + + Performance and stability improvements on all platforms. + + +2015-05-22: Version 4.5.12 + + Performance and stability improvements on all platforms. + + +2015-05-22: Version 4.5.11 + + Performance and stability improvements on all platforms. + + +2015-05-21: Version 4.5.10 + + Re-land %TypedArray%.prototype.{map,filter,some} (issue 3578). + + Performance and stability improvements on all platforms. + + +2015-05-21: Version 4.5.9 + + Performance and stability improvements on all platforms. + + +2015-05-20: Version 4.5.8 + + Performance and stability improvements on all platforms. + + +2015-05-20: Version 4.5.7 + + Implement %TypedArray%.{lastI,i}ndexOf (issue 3578). + + Implement %TypedArray%.prototype.sort (issue 3578). + + Implement %TypedArray%.reverse (issue 3578). + + Implement %TypedArray%.prototype.{map,filter,some,reduce,reduceRight} + (issue 3578). + + Fix has_pending_exception logic in API's Array::CloneElementAt (issue + 4103). + + Adding api to get last gc object statistics for chrome://tracing + (Chromium issue 476013). + + Fix harmless HGraph verification failure after hoisting inlined bounds + checks (Chromium issue 487608). + + Performance and stability improvements on all platforms. + + +2015-05-20: Version 4.5.6 + + Add TypedArray.from method (issue 3578). + + Performance and stability improvements on all platforms. + + +2015-05-19: Version 4.5.5 + + ARM64: Propagate notification about aborted compilation from + RegExpEngine to MacroAssembler (Chromium issue 489290). + + Performance and stability improvements on all platforms. + + +2015-05-18: Version 4.5.4 + + Performance and stability improvements on all platforms. + + +2015-05-18: Version 4.5.3 + + Performance and stability improvements on all platforms. + + +2015-05-17: Version 4.5.2 + + Performance and stability improvements on all platforms. + + +2015-05-16: Version 4.5.1 + + Test that TypedArray methods don't read length (issue 3578). + + Implement %TypedArray%.{fill,find,findIndex} (issue 3578). + + TypedArray.prototype.copyWithin method (issue 3578). + + Provide accessor for object internal properties that doesn't require + debugger to be active (Chromium issue 481845). + + Don't create debug context if debug listener is not set (Chromium issue + 482290). + + Performance and stability improvements on all platforms. + + +2015-05-13: Version 4.4.65 + + Deprecate Isolate::New. + + Factor out core of Array.forEach and .every, for use in TypedArrays + (issue 3578). + + Performance and stability improvements on all platforms. + + +2015-05-12: Version 4.4.64 + + Performance and stability improvements on all platforms. + + 2015-05-11: Version 4.4.63 Let Runtime_GrowArrayElements accept non-Smi numbers as |key| (Chromium diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 711cc53b7e3574..689ae778bb59a4 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -8,23 +8,23 @@ vars = { deps = { "v8/build/gyp": - Var("git_url") + "/external/gyp.git" + "@" + "0bb67471bca068996e15b56738fa4824dfa19de0", + Var("git_url") + "/external/gyp.git" + "@" + "5122240c5e5c4d8da12c543d82b03d6089eb77c5", "v8/third_party/icu": - Var("git_url") + "/chromium/deps/icu.git" + "@" + "f8c0e585b0a046d83d72b5d37356cb50d5b2031a", + Var("git_url") + "/chromium/deps/icu.git" + "@" + "c81a1a3989c3b66fa323e9a6ee7418d7c08297af", "v8/buildtools": - Var("git_url") + "/chromium/buildtools.git" + "@" + "b0ede9c89f9d5fbe5387d961ad4c0ec665b6c821", + Var("git_url") + "/chromium/buildtools.git" + "@" + "ecc8e253abac3b6186a97573871a084f4c0ca3ae", "v8/testing/gtest": - Var("git_url") + "/external/googletest.git" + "@" + "be1868139ffe0ccd0e8e3b37292b84c821d9c8ad", + Var("git_url") + "/external/googletest.git" + "@" + "23574bf2333f834ff665f894c97bef8a5b33a0a9", "v8/testing/gmock": Var("git_url") + "/external/googlemock.git" + "@" + "29763965ab52f24565299976b936d1265cb6a271", # from svn revision 501 "v8/tools/clang": - Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "5bab78c6ced45a71a8e095a09697ca80492e57e1", + Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "73ec8804ed395b0886d6edf82a9f33583f4a7902", } deps_os = { "android": { "v8/third_party/android_tools": - Var("git_url") + "/android_tools.git" + "@" + "4f723e2a5fa5b7b8a198072ac19b92344be2b271", + Var("git_url") + "/android_tools.git" + "@" + "21f4bcbd6cd927e4b4227cfde7d5f13486be1236", }, "win": { "v8/third_party/cygwin": diff --git a/deps/v8/LICENSE b/deps/v8/LICENSE index 2f5bce83697d0f..1ffa949c6c1dfb 100644 --- a/deps/v8/LICENSE +++ b/deps/v8/LICENSE @@ -3,12 +3,12 @@ maintained libraries. The externally maintained libraries used by V8 are: - PCRE test suite, located in - test/mjsunit/third_party/regexp-pcre.js. This is based on the + test/mjsunit/third_party/regexp-pcre/regexp-pcre.js. This is based on the test suite from PCRE-7.3, which is copyrighted by the University of Cambridge and Google, Inc. The copyright notice and license are embedded in regexp-pcre.js. - - Layout tests, located in test/mjsunit/third_party. These are + - Layout tests, located in test/mjsunit/third_party/object-keys. These are based on layout tests from webkit.org which are copyrighted by Apple Computer, Inc. and released under a 3-clause BSD license. @@ -26,6 +26,9 @@ are: These libraries have their own licenses; we recommend you read them, as their terms may differ from the terms below. +Further license information can be found in LICENSE files located in +sub-directories. + Copyright 2014, the V8 project authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are diff --git a/deps/v8/Makefile b/deps/v8/Makefile index db6cf3b7da534a..97612655a7b1ae 100644 --- a/deps/v8/Makefile +++ b/deps/v8/Makefile @@ -31,9 +31,7 @@ OUTDIR ?= out TESTJOBS ?= GYPFLAGS ?= TESTFLAGS ?= -ANDROID_NDK_ROOT ?= ANDROID_NDK_HOST_ARCH ?= -ANDROID_TOOLCHAIN ?= ANDROID_V8 ?= /data/local/tmp/v8 NACL_SDK_ROOT ?= @@ -145,10 +143,14 @@ ifeq ($(i18nsupport), off) GYPFLAGS += -Dv8_enable_i18n_support=0 TESTFLAGS += --noi18n endif -# deprecation_warnings=on +# deprecationwarnings=on ifeq ($(deprecationwarnings), on) GYPFLAGS += -Dv8_deprecation_warnings=1 endif +# imminentdeprecationwarnings=on +ifeq ($(imminentdeprecationwarnings), on) + GYPFLAGS += -Dv8_imminent_deprecation_warnings=1 +endif # asan=on ifeq ($(asan), on) GYPFLAGS += -Dasan=1 -Dclang=1 @@ -246,7 +248,7 @@ NACL_ARCHES = nacl_ia32 nacl_x64 GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \ build/shim_headers.gypi build/features.gypi build/standalone.gypi \ build/toolchain.gypi build/all.gyp build/mac/asan.gyp \ - build/android.gypi test/cctest/cctest.gyp \ + test/cctest/cctest.gyp \ test/unittests/unittests.gyp tools/gyp/v8.gyp \ tools/parser-shell.gyp testing/gmock.gyp testing/gtest.gyp \ buildtools/third_party/libc++abi/libc++abi.gyp \ @@ -277,7 +279,6 @@ ENVFILE = $(OUTDIR)/environment $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \ $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \ - must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN \ $(NACL_ARCHES) $(NACL_BUILDS) $(NACL_CHECKS) \ must-set-NACL_SDK_ROOT @@ -311,8 +312,7 @@ native: $(OUTDIR)/Makefile.native $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) -$(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \ - must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android +$(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) Makefile.android @$(MAKE) -f Makefile.android $@ \ ARCH="$(basename $@)" \ MODE="$(subst .,,$(suffix $@))" \ @@ -448,13 +448,6 @@ $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS) -must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN: -ifndef ANDROID_NDK_ROOT -ifndef ANDROID_TOOLCHAIN - $(error ANDROID_NDK_ROOT or ANDROID_TOOLCHAIN must be set)) -endif -endif - # Note that NACL_SDK_ROOT must be set to point to an appropriate # Native Client SDK before using this makefile. You can download # an SDK here: diff --git a/deps/v8/Makefile.android b/deps/v8/Makefile.android index f89fd21fda004e..c49cb85b9b6514 100644 --- a/deps/v8/Makefile.android +++ b/deps/v8/Makefile.android @@ -35,75 +35,28 @@ MODES = release debug ANDROID_BUILDS = $(foreach mode,$(MODES), \ $(addsuffix .$(mode),$(ANDROID_ARCHES))) -HOST_OS = $(shell uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/') -ANDROID_NDK_HOST_ARCH ?= $(shell uname -m | sed -e 's/i[3456]86/x86/') -ifeq ($(HOST_OS), linux) - TOOLCHAIN_DIR = linux-$(ANDROID_NDK_HOST_ARCH) -else ifeq ($(HOST_OS), mac) - TOOLCHAIN_DIR = darwin-$(ANDROID_NDK_HOST_ARCH) -else - $(error Host platform "${HOST_OS}" is not supported) -endif - ifeq ($(ARCH), android_arm) - DEFINES = target_arch=arm v8_target_arch=arm android_target_arch=arm android_target_platform=14 - DEFINES += arm_neon=0 arm_version=7 - TOOLCHAIN_ARCH = arm-linux-androideabi - TOOLCHAIN_PREFIX = $(TOOLCHAIN_ARCH) - TOOLCHAIN_VER = 4.8 + DEFINES = target_arch=arm v8_target_arch=arm else ifeq ($(ARCH), android_arm64) - DEFINES = target_arch=arm64 v8_target_arch=arm64 android_target_arch=arm64 android_target_platform=21 - TOOLCHAIN_ARCH = aarch64-linux-android - TOOLCHAIN_PREFIX = $(TOOLCHAIN_ARCH) - TOOLCHAIN_VER = 4.9 + DEFINES = target_arch=arm64 v8_target_arch=arm64 else ifeq ($(ARCH), android_mipsel) - DEFINES = target_arch=mipsel v8_target_arch=mipsel android_target_platform=14 - DEFINES += android_target_arch=mips mips_arch_variant=mips32r2 - TOOLCHAIN_ARCH = mipsel-linux-android - TOOLCHAIN_PREFIX = $(TOOLCHAIN_ARCH) - TOOLCHAIN_VER = 4.8 + DEFINES = target_arch=mipsel v8_target_arch=mipsel 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.8 + DEFINES = target_arch=ia32 v8_target_arch=ia32 else ifeq ($(ARCH), android_x64) - DEFINES = target_arch=x64 v8_target_arch=x64 android_target_arch=x86_64 android_target_platform=21 - TOOLCHAIN_ARCH = x86_64 - TOOLCHAIN_PREFIX = x86_64-linux-android - TOOLCHAIN_VER = 4.9 + DEFINES = target_arch=x64 v8_target_arch=x64 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.8 + DEFINES = target_arch=ia32 v8_target_arch=x87 else $(error Target architecture "${ARCH}" is not supported) endif -TOOLCHAIN_PATH = \ - ${ANDROID_NDK_ROOT}/toolchains/${TOOLCHAIN_ARCH}-${TOOLCHAIN_VER}/prebuilt -ANDROID_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/${TOOLCHAIN_DIR} - -ifeq ($(wildcard $(ANDROID_TOOLCHAIN)),) - $(error Cannot find Android toolchain in "${ANDROID_TOOLCHAIN}". Please \ - check that ANDROID_NDK_ROOT and ANDROID_NDK_HOST_ARCH are set \ - correctly) -endif - -# For mksnapshot host generation. -DEFINES += host_os=${HOST_OS} +# Common flags. DEFINES += OS=android .SECONDEXPANSION: $(ANDROID_BUILDS): $(OUTDIR)/Makefile.$$@ @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ - CXX="$(ANDROID_TOOLCHAIN)/bin/${TOOLCHAIN_PREFIX}-g++" \ - AR="$(ANDROID_TOOLCHAIN)/bin/${TOOLCHAIN_PREFIX}-ar" \ - RANLIB="$(ANDROID_TOOLCHAIN)/bin/${TOOLCHAIN_PREFIX}-ranlib" \ - CC="$(ANDROID_TOOLCHAIN)/bin/${TOOLCHAIN_PREFIX}-gcc" \ - LD="$(ANDROID_TOOLCHAIN)/bin/${TOOLCHAIN_PREFIX}-ld" \ - LINK="$(ANDROID_TOOLCHAIN)/bin/${TOOLCHAIN_PREFIX}-g++" \ BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ python -c "print raw_input().capitalize()") \ builddir="$(shell pwd)/$(OUTDIR)/$@" @@ -113,9 +66,7 @@ ANDROID_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ANDROID_BUILDS)) $(ANDROID_MAKEFILES): GYP_GENERATORS=make-android \ GYP_DEFINES="${DEFINES}" \ - CC="${ANDROID_TOOLCHAIN}/bin/${TOOLCHAIN_PREFIX}-gcc" \ - CXX="${ANDROID_TOOLCHAIN}/bin/${TOOLCHAIN_PREFIX}-g++" \ PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH)" \ build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \ - -Ibuild/standalone.gypi --depth=. -Ibuild/android.gypi \ + -Ibuild/standalone.gypi --depth=. \ -S$(suffix $(basename $@))$(suffix $@) ${GYPFLAGS} diff --git a/deps/v8/build/android.gypi b/deps/v8/build/android.gypi deleted file mode 100644 index 7bbf12eed6d99b..00000000000000 --- a/deps/v8/build/android.gypi +++ /dev/null @@ -1,266 +0,0 @@ -# Copyright 2012 the V8 project authors. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Definitions for building standalone V8 binaries to run on Android. -# This is mostly excerpted from: -# http://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi - -{ - 'variables': { - # Location of Android NDK. - 'variables': { - 'android_ndk_root%': ' GetExecutionState() const = 0; - virtual Handle GetEventData() const = 0; + virtual Local GetExecutionState() const = 0; + virtual Local GetEventData() const = 0; /** * Get the debugger protocol JSON. */ - virtual Handle GetJSON() const = 0; + virtual Local GetJSON() const = 0; /** * Get the context active when the debug event happened. Note this is not * the current active context as the JavaScript part of the debugger is * running in its own context which is entered at this point. */ - virtual Handle GetEventContext() const = 0; + virtual Local GetEventContext() const = 0; /** * Client data passed with the corresponding request if any. This is the @@ -104,21 +104,21 @@ class V8_EXPORT Debug { * Access to execution state and event data of the debug event. Don't store * these cross callbacks as their content becomes invalid. */ - virtual Handle GetExecutionState() const = 0; - virtual Handle GetEventData() const = 0; + virtual Local GetExecutionState() const = 0; + virtual Local GetEventData() const = 0; /** * Get the context active when the debug event happened. Note this is not * the current active context as the JavaScript part of the debugger is * running in its own context which is entered at this point. */ - virtual Handle GetEventContext() const = 0; + virtual Local GetEventContext() const = 0; /** * Client data passed with the corresponding callback when it was * registered. */ - virtual Handle GetCallbackData() const = 0; + virtual Local GetCallbackData() const = 0; /** * Client data passed to DebugBreakForCommand function. The @@ -156,7 +156,7 @@ class V8_EXPORT Debug { typedef void (*DebugMessageDispatchHandler)(); static bool SetDebugEventListener(EventCallback that, - Handle data = Handle()); + Local data = Local()); // Schedule a debugger break to happen when JavaScript code is run // in the given isolate. @@ -196,20 +196,20 @@ class V8_EXPORT Debug { */ static V8_DEPRECATE_SOON( "Use maybe version", - Local Call(v8::Handle fun, - Handle data = Handle())); + Local Call(v8::Local fun, + Local data = Local())); // TODO(dcarney): data arg should be a MaybeLocal static MaybeLocal Call(Local context, - v8::Handle fun, - Handle data = Handle()); + v8::Local fun, + Local data = Local()); /** * Returns a mirror object for the given object. */ static V8_DEPRECATE_SOON("Use maybe version", - Local GetMirror(v8::Handle obj)); + Local GetMirror(v8::Local obj)); static MaybeLocal GetMirror(Local context, - v8::Handle obj); + v8::Local obj); /** * Makes V8 process all pending debug messages. @@ -248,7 +248,8 @@ class V8_EXPORT Debug { * Debugger is running in its own context which is entered while debugger * messages are being dispatched. This is an explicit getter for this * debugger context. Note that the content of the debugger context is subject - * to change. + * to change. The Context exists only when the debugger is active, i.e. at + * least one DebugEventListener or MessageHandler is set. */ static Local GetDebugContext(); @@ -259,6 +260,14 @@ class V8_EXPORT Debug { * unexpectedly used. LiveEdit is enabled by default. */ static void SetLiveEditEnabled(Isolate* isolate, bool enable); + + /** + * Returns array of internal properties specific to the value type. Result has + * the following format: [, ,...,, ]. Result array + * will be allocated in the current context. + */ + static MaybeLocal GetInternalProperties(Isolate* isolate, + Local value); }; diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h index 67fb384c99ba52..be9e5c0c6b46ed 100644 --- a/deps/v8/include/v8-platform.h +++ b/deps/v8/include/v8-platform.h @@ -56,6 +56,17 @@ class Platform { */ virtual void CallOnForegroundThread(Isolate* isolate, Task* task) = 0; + /** + * Schedules a task to be invoked on a foreground thread wrt a specific + * |isolate| after the given number of seconds |delay_in_seconds|. + * Tasks posted for the same isolate should be execute in order of + * scheduling. The definition of "foreground" is opaque to V8. + */ + virtual void CallDelayedOnForegroundThread(Isolate* isolate, Task* task, + double delay_in_seconds) { + // TODO(ulan): Make this function abstract after V8 roll in Chromium. + } + /** * Monotonically increasing time in seconds from an arbitrary fixed point in * the past. This function is expected to return at least diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h index 82a14d66003001..121e8030a140d7 100644 --- a/deps/v8/include/v8-profiler.h +++ b/deps/v8/include/v8-profiler.h @@ -60,13 +60,13 @@ class V8_EXPORT CpuProfileNode { }; /** Returns function name (empty string for anonymous functions.) */ - Handle GetFunctionName() const; + Local GetFunctionName() const; /** Returns id of the script where function is located. */ int GetScriptId() const; /** Returns resource name for script from where the function originates. */ - Handle GetScriptResourceName() const; + Local GetScriptResourceName() const; /** * Returns the number, 1-based, of the line where the function originates. @@ -129,7 +129,7 @@ class V8_EXPORT CpuProfileNode { class V8_EXPORT CpuProfile { public: /** Returns CPU profile title. */ - Handle GetTitle() const; + Local GetTitle() const; /** Returns the root node of the top down call tree. */ const CpuProfileNode* GetTopDownRoot() const; @@ -198,13 +198,13 @@ class V8_EXPORT CpuProfiler { * |record_samples| parameter controls whether individual samples should * be recorded in addition to the aggregated tree. */ - void StartProfiling(Handle title, bool record_samples = false); + void StartProfiling(Local title, bool record_samples = false); /** * Stops collecting CPU profile with a given title and returns it. * If the title given is empty, finishes the last profile started. */ - CpuProfile* StopProfiling(Handle title); + CpuProfile* StopProfiling(Local title); /** * Tells the profiler whether the embedder is idle. @@ -246,7 +246,7 @@ class V8_EXPORT HeapGraphEdge { * Returns edge name. This can be a variable name, an element index, or * a property name. */ - Handle GetName() const; + Local GetName() const; /** Returns origin node. */ const HeapGraphNode* GetFromNode() const; @@ -275,7 +275,8 @@ class V8_EXPORT HeapGraphNode { // snapshot items together. kConsString = 10, // Concatenated string. A pair of pointers to strings. kSlicedString = 11, // Sliced string. A fragment of another string. - kSymbol = 12 // A Symbol (ES6). + kSymbol = 12, // A Symbol (ES6). + kSimdValue = 13 // A SIMD value stored in the heap (Proposed ES7). }; /** Returns node type (see HeapGraphNode::Type). */ @@ -286,7 +287,7 @@ class V8_EXPORT HeapGraphNode { * of the constructor (for objects), the name of the function (for * closures), string value, or an empty string (for compiled code). */ - Handle GetName() const; + Local GetName() const; /** * Returns node id. For the same heap object, the id remains the same @@ -429,8 +430,8 @@ class V8_EXPORT HeapProfiler { * while the callback is running: only getters on the handle and * GetPointerFromInternalField on the objects are allowed. */ - typedef RetainedObjectInfo* (*WrapperInfoCallback) - (uint16_t class_id, Handle wrapper); + typedef RetainedObjectInfo* (*WrapperInfoCallback)(uint16_t class_id, + Local wrapper); /** Returns the number of snapshots taken. */ int GetSnapshotCount(); @@ -442,13 +443,13 @@ class V8_EXPORT HeapProfiler { * Returns SnapshotObjectId for a heap object referenced by |value| if * it has been seen by the heap profiler, kUnknownObjectId otherwise. */ - SnapshotObjectId GetObjectId(Handle value); + SnapshotObjectId GetObjectId(Local value); /** * Returns heap object with given SnapshotObjectId if the object is alive, * otherwise empty handle is returned. */ - Handle FindObjectById(SnapshotObjectId id); + Local FindObjectById(SnapshotObjectId id); /** * Clears internal map from SnapshotObjectId to heap object. The new objects @@ -473,7 +474,8 @@ class V8_EXPORT HeapProfiler { * Returns name to be used in the heap snapshot for given node. Returned * string must stay alive until snapshot collection is completed. */ - virtual const char* GetName(Handle object) = 0; + virtual const char* GetName(Local object) = 0; + protected: virtual ~ObjectNameResolver() {} }; diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 180969f1161e78..f6f62d736a373b 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 4 -#define V8_BUILD_NUMBER 63 -#define V8_PATCH_LEVEL 30 +#define V8_MINOR_VERSION 5 +#define V8_BUILD_NUMBER 103 +#define V8_PATCH_LEVEL 24 // 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 910279b52e6b29..6e1db3a581f5c7 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -94,6 +94,7 @@ class Primitive; class Promise; class RawOperationDescriptor; class Script; +class SharedArrayBuffer; class Signature; class StartupData; class StackFrame; @@ -102,7 +103,6 @@ class String; class StringObject; class Symbol; class SymbolObject; -class Private; class Uint32; class Utils; class Value; @@ -215,8 +215,8 @@ class Local { : val_(reinterpret_cast(*that)) { /** * This check fails when trying to convert between incompatible - * handles. For example, converting from a Handle to a - * Handle. + * handles. For example, converting from a Local to a + * Local. */ TYPE_CHECK(T, S); } @@ -311,7 +311,6 @@ class Local { friend class String; friend class Object; friend class Context; - friend class Private; template friend class internal::CustomArguments; friend Local Undefined(Isolate* isolate); friend Local Null(Isolate* isolate); @@ -331,9 +330,11 @@ class Local { }; -// Handle is an alias for Local for historical reasons. +#if !defined(V8_IMMINENT_DEPRECATION_WARNINGS) +// Local is an alias for Local for historical reasons. template using Handle = Local; +#endif /** @@ -418,11 +419,11 @@ class WeakCallbackInfo { V8_INLINE void* GetInternalField(int index) const; V8_INLINE V8_DEPRECATE_SOON("use indexed version", - void* GetInternalField1()) const { + void* GetInternalField1() const) { return internal_fields_[0]; } V8_INLINE V8_DEPRECATE_SOON("use indexed version", - void* GetInternalField2()) const { + void* GetInternalField2() const) { return internal_fields_[1]; } @@ -496,7 +497,7 @@ template class PersistentBase { * and create a new one with the contents of other if other is non empty */ template - V8_INLINE void Reset(Isolate* isolate, const Handle& other); + V8_INLINE void Reset(Isolate* isolate, const Local& other); /** * If non-empty, destroy the underlying storage cell @@ -517,7 +518,8 @@ template class PersistentBase { return *a == *b; } - template V8_INLINE bool operator==(const Handle& that) const { + template + V8_INLINE bool operator==(const Local& that) const { internal::Object** a = reinterpret_cast(this->val_); internal::Object** b = reinterpret_cast(that.val_); if (a == NULL) return b == NULL; @@ -530,7 +532,8 @@ template class PersistentBase { return !operator==(that); } - template V8_INLINE bool operator!=(const Handle& that) const { + template + V8_INLINE bool operator!=(const Local& that) const { return !operator==(that); } @@ -693,11 +696,12 @@ template class Persistent : public PersistentBase { */ V8_INLINE Persistent() : PersistentBase(0) { } /** - * Construct a Persistent from a Handle. - * When the Handle is non-empty, a new storage cell is created + * Construct a Persistent from a Local. + * When the Local is non-empty, a new storage cell is created * pointing to the same object, and no flags are set. */ - template V8_INLINE Persistent(Isolate* isolate, Handle that) + template + V8_INLINE Persistent(Isolate* isolate, Local that) : PersistentBase(PersistentBase::New(isolate, *that)) { TYPE_CHECK(T, S); } @@ -785,12 +789,12 @@ class Global : public PersistentBase { */ V8_INLINE Global() : PersistentBase(nullptr) {} /** - * Construct a Global from a Handle. - * When the Handle is non-empty, a new storage cell is created + * Construct a Global from a Local. + * When the Local is non-empty, a new storage cell is created * pointing to the same object, and no flags are set. */ template - V8_INLINE Global(Isolate* isolate, Handle that) + V8_INLINE Global(Isolate* isolate, Local that) : PersistentBase(PersistentBase::New(isolate, *that)) { TYPE_CHECK(T, S); } @@ -835,8 +839,11 @@ class Global : public PersistentBase { typedef void MoveOnlyTypeForCPP03; private: + template + friend class ReturnValue; Global(Global&) = delete; void operator=(Global&) = delete; + V8_INLINE T* operator*() const { return this->val_; } }; @@ -972,45 +979,69 @@ class V8_EXPORT Data { }; +/** + * The optional attributes of ScriptOrigin. + */ +class ScriptOriginOptions { + public: + V8_INLINE ScriptOriginOptions(bool is_embedder_debug_script = false, + bool is_shared_cross_origin = false, + bool is_opaque = false) + : flags_((is_embedder_debug_script ? kIsEmbedderDebugScript : 0) | + (is_shared_cross_origin ? kIsSharedCrossOrigin : 0) | + (is_opaque ? kIsOpaque : 0)) {} + V8_INLINE ScriptOriginOptions(int flags) + : flags_(flags & + (kIsEmbedderDebugScript | kIsSharedCrossOrigin | kIsOpaque)) {} + bool IsEmbedderDebugScript() const { + return (flags_ & kIsEmbedderDebugScript) != 0; + } + bool IsSharedCrossOrigin() const { + return (flags_ & kIsSharedCrossOrigin) != 0; + } + bool IsOpaque() const { return (flags_ & kIsOpaque) != 0; } + int Flags() const { return flags_; } + + private: + enum { + kIsEmbedderDebugScript = 1, + kIsSharedCrossOrigin = 1 << 1, + kIsOpaque = 1 << 2 + }; + const int flags_; +}; + /** * The origin, within a file, of a script. */ class ScriptOrigin { public: V8_INLINE ScriptOrigin( - Handle resource_name, - Handle resource_line_offset = Handle(), - Handle resource_column_offset = Handle(), - Handle resource_is_shared_cross_origin = Handle(), - Handle script_id = Handle(), - Handle resource_is_embedder_debug_script = Handle(), - Handle source_map_url = Handle()) - : resource_name_(resource_name), - resource_line_offset_(resource_line_offset), - resource_column_offset_(resource_column_offset), - resource_is_embedder_debug_script_(resource_is_embedder_debug_script), - resource_is_shared_cross_origin_(resource_is_shared_cross_origin), - script_id_(script_id), - source_map_url_(source_map_url) {} - V8_INLINE Handle ResourceName() const; - V8_INLINE Handle ResourceLineOffset() const; - V8_INLINE Handle ResourceColumnOffset() const; + Local resource_name, + Local resource_line_offset = Local(), + Local resource_column_offset = Local(), + Local resource_is_shared_cross_origin = Local(), + Local script_id = Local(), + Local resource_is_embedder_debug_script = Local(), + Local source_map_url = Local(), + Local resource_is_opaque = Local()); + V8_INLINE Local ResourceName() const; + V8_INLINE Local ResourceLineOffset() const; + V8_INLINE Local ResourceColumnOffset() const; /** * Returns true for embedder's debugger scripts */ - V8_INLINE Handle ResourceIsEmbedderDebugScript() const; - V8_INLINE Handle ResourceIsSharedCrossOrigin() const; - V8_INLINE Handle ScriptID() const; - V8_INLINE Handle SourceMapUrl() const; + V8_INLINE Local ScriptID() const; + V8_INLINE Local SourceMapUrl() const; + V8_INLINE ScriptOriginOptions Options() const { return options_; } private: - Handle resource_name_; - Handle resource_line_offset_; - Handle resource_column_offset_; - Handle resource_is_embedder_debug_script_; - Handle resource_is_shared_cross_origin_; - Handle script_id_; - Handle source_map_url_; + Local resource_name_; + Local resource_line_offset_; + Local resource_column_offset_; + ScriptOriginOptions options_; + Local script_id_; + Local source_map_url_; }; @@ -1025,16 +1056,16 @@ class V8_EXPORT UnboundScript { Local