diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index 8088214daa951b..f85d0d30b18974 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -1,3 +1,5 @@ +#*# +*.Makefile *.a *.exe *.idb @@ -18,9 +20,9 @@ *.vcxproj *.vcxproj.filters *.xcodeproj -#*# *~ .#* +.*.sw? .cpplint-cache .cproject .d8_history @@ -30,26 +32,23 @@ .project .pydevproject .settings -.*.sw? -bsuite -compile_commands.json -d8 -d8_g -gccauses -gcsuspects -shell -shell_g /_* /build -/gypfiles/win_toolchain.json /buildtools +/gypfiles/win_toolchain.json /hydrogen.cfg /obj /out /out.gn /perf.data /perf.data.old +/src/inspector/build/closure-compiler +/src/inspector/build/closure-compiler.tar.gz /test/benchmarks/data +/test/fuzzer/wasm +/test/fuzzer/wasm.tar.gz +/test/fuzzer/wasm_asmjs +/test/fuzzer/wasm_asmjs.tar.gz /test/mozilla/data /test/promises-aplus/promises-tests /test/promises-aplus/promises-tests.tar.gz @@ -57,6 +56,7 @@ shell_g /test/test262/data /test/test262/data.tar /test/test262/harness +/test/wasm-js /testing/gmock /testing/gtest/* !/testing/gtest/include @@ -81,26 +81,26 @@ shell_g /tools/swarming_client /tools/visual_studio/Debug /tools/visual_studio/Release -/test/fuzzer/wasm -/test/fuzzer/wasm_asmjs /v8.log.ll /xcodebuild -TAGS -*.Makefile -GTAGS +GPATH GRTAGS GSYMS -GPATH -tags +GTAGS +TAGS +bsuite +compile_commands.json +d8 +d8_g +gccauses +gcsuspects gtags.files +shell +shell_g +tags turbo*.cfg turbo*.dot turbo*.json v8.ignition_dispatches_table.json -/test/fuzzer/wasm.tar.gz -/test/fuzzer/wasm_asmjs.tar.gz -/src/inspector/build/closure-compiler.tar.gz -/src/inspector/build/closure-compiler -/test/wasm-js !/third_party/jinja2 !/third_party/markupsafe diff --git a/deps/v8/.gn b/deps/v8/.gn index c80980ea092d05..b3adcc74cd64b2 100644 --- a/deps/v8/.gn +++ b/deps/v8/.gn @@ -21,5 +21,7 @@ check_targets = [] # These are the list of GN files that run exec_script. This whitelist exists # to force additional review for new uses of exec_script, which is strongly # discouraged except for gypi_to_gn calls. -exec_script_whitelist = - build_dotfile_settings.exec_script_whitelist + [ "//test/test262/BUILD.gn" ] +exec_script_whitelist = build_dotfile_settings.exec_script_whitelist + [ + "//test/test262/BUILD.gn", + "//BUILD.gn", + ] diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index 756d1dc985e6ad..27882149a4d21e 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -1,4 +1,4 @@ -# Below is a list of people and organizations that have contributed +# Below is a list of people and organizations that have contributed # to the V8 project. Names should be added to the list like so: # # Name/Organization @@ -82,6 +82,7 @@ JunHo Seo Kang-Hao (Kenny) Lu Karl Skomski Kevin Gibbons +Loo Rong Jie Luis Reis Luke Zarko Maciej Małecki diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 6f656f69582762..36cb97b4d35877 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -20,6 +20,12 @@ declare_args() { # Print to stdout on Android. v8_android_log_stdout = false + # Sets -DV8_ENABLE_FUTURE. + v8_enable_future = false + + # Sets -DV8_DISABLE_TURBO. + v8_disable_turbo = false + # Sets -DVERIFY_HEAP. v8_enable_verify_heap = "" @@ -69,6 +75,9 @@ declare_args() { # Sets -dV8_ENABLE_CHECKS. v8_enable_v8_checks = "" + # Builds the snapshot with --trace-ignition + v8_trace_ignition = false + # With post mortem support enabled, metadata is embedded into libv8 that # describes various parameters of the VM for use by debuggers. See # tools/gen-postmortem-metadata.py for details. @@ -101,6 +110,19 @@ declare_args() { v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64" || v8_current_cpu == "x87") && (is_linux || is_mac)) || (v8_current_cpu == "ppc64" && is_linux) + + # Set v8_host_byteorder + v8_host_byteorder = "little" + + # ppc64 can be either BE or LE + if (host_cpu == "ppc64") { + v8_host_byteorder = + exec_script("//tools/get_byteorder.py", [], "trim string") + } + if (host_cpu == "ppc" || host_cpu == "s390" || host_cpu == "s390x" || + host_cpu == "mips" || host_cpu == "mips64") { + v8_host_byteorder = "big" + } } # Derived defaults. @@ -125,7 +147,6 @@ if (v8_enable_v8_checks == "") { # snapshots. is_target_simulator = target_cpu != v8_target_cpu -v8_generated_peephole_source = "$target_gen_dir/bytecode-peephole-table.cc" v8_random_seed = "314159265" v8_toolset_for_shell = "host" @@ -178,10 +199,10 @@ config("external_config") { if (is_component_build) { defines = [ "USING_V8_SHARED" ] } - include_dirs = [ "include" ] - if (v8_enable_inspector) { - include_dirs += [ "$target_gen_dir/include" ] - } + include_dirs = [ + "include", + "$target_gen_dir/include", + ] } # This config should only be applied to code that needs to be explicitly @@ -204,6 +225,12 @@ config("features") { defines += [ "V8_PROMISE_INTERNAL_FIELD_COUNT=${v8_promise_internal_field_count}" ] } + if (v8_enable_future) { + defines += [ "V8_ENABLE_FUTURE" ] + } + if (v8_disable_turbo) { + defines += [ "V8_DISABLE_TURBO" ] + } if (v8_enable_gdbjit) { defines += [ "ENABLE_GDB_JIT_INTERFACE" ] } @@ -240,6 +267,9 @@ config("features") { if (v8_enable_handle_zapping) { defines += [ "ENABLE_HANDLE_ZAPPING" ] } + if (v8_use_snapshot) { + defines += [ "V8_USE_SNAPSHOT" ] + } if (v8_use_external_startup_data) { defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] } @@ -356,8 +386,31 @@ config("toolchain") { if (v8_current_cpu == "s390x") { defines += [ "V8_TARGET_ARCH_S390X" ] } - if (host_cpu == "x64" || host_cpu == "x86") { + if (v8_host_byteorder == "little") { defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ] + } else { + cflags += [ "-march=z196" ] + } + } + if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { + defines += [ "V8_TARGET_ARCH_PPC" ] + if (v8_current_cpu == "ppc64") { + defines += [ "V8_TARGET_ARCH_PPC64" ] + } + if (v8_host_byteorder == "little") { + defines += [ "V8_TARGET_ARCH_PPC_LE" ] + } else if (v8_host_byteorder == "big") { + defines += [ "V8_TARGET_ARCH_PPC_BE" ] + if (current_os == "aix") { + cflags += [ + # Work around AIX ceil, trunc and round oddities. + "-mcpu=power5+", + "-mfprnd", + + # Work around AIX assembler popcntb bug. + "-mno-popcntb", + ] + } } } if (v8_current_cpu == "x86") { @@ -414,10 +467,25 @@ config("toolchain") { # TODO(hans): Remove once http://crbug.com/428099 is resolved. "-Winconsistent-missing-override", ] - #if (v8_current_cpu == "x64" || v8_current_cpu == "arm64" || - # v8_current_cpu == "mips64el") { - # cflags += [ "-Wshorten-64-to-32" ] - #} + if (v8_current_cpu == "x64" || v8_current_cpu == "arm64" || + v8_current_cpu == "mips64el") { + cflags += [ "-Wshorten-64-to-32" ] + } + } + + if (is_win) { + cflags += [ + "/wd4245", # Conversion with signed/unsigned mismatch. + "/wd4267", # Conversion with possible loss of data. + "/wd4324", # Padding structure due to alignment. + "/wd4701", # Potentially uninitialized local variable. + "/wd4702", # Unreachable code. + "/wd4703", # Potentially uninitialized local pointer variable. + "/wd4709", # Comma operator within array index expr (bugged). + "/wd4714", # Function marked forceinline not inlined. + "/wd4718", # Recursive call has no side-effect. + "/wd4800", # Forcing value to bool. + ] } } @@ -445,7 +513,6 @@ action("js2c") { "src/js/v8natives.js", "src/js/array.js", "src/js/string.js", - "src/js/arraybuffer.js", "src/js/typedarray.js", "src/js/collection.js", "src/js/weak-collection.js", @@ -483,43 +550,6 @@ action("js2c") { } } -action("js2c_experimental") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - - script = "tools/js2c.py" - - # The script depends on this other script, this rule causes a rebuild if it - # changes. - inputs = [ - "tools/jsmin.py", - ] - - # NOSORT - sources = [ - "src/js/macros.py", - "src/messages.h", - "src/js/harmony-atomics.js", - ] - - outputs = [ - "$target_gen_dir/experimental-libraries.cc", - ] - - args = [ - rebase_path("$target_gen_dir/experimental-libraries.cc", - root_build_dir), - "EXPERIMENTAL", - ] + rebase_path(sources, root_build_dir) - - if (v8_use_external_startup_data) { - outputs += [ "$target_gen_dir/libraries_experimental.bin" ] - args += [ - "--startup_blob", - rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir), - ] - } -} - action("js2c_extras") { visibility = [ ":*" ] # Only targets in this file can depend on this. @@ -630,7 +660,6 @@ if (v8_use_external_startup_data) { deps = [ ":js2c", - ":js2c_experimental", ":js2c_experimental_extras", ":js2c_extras", ] @@ -638,7 +667,6 @@ if (v8_use_external_startup_data) { # NOSORT sources = [ "$target_gen_dir/libraries.bin", - "$target_gen_dir/libraries_experimental.bin", "$target_gen_dir/libraries_extras.bin", "$target_gen_dir/libraries_experimental_extras.bin", ] @@ -714,6 +742,10 @@ action("run_mksnapshot") { ] } + if (v8_trace_ignition) { + args += [ "--trace-ignition" ] + } + if (v8_use_external_startup_data) { outputs += [ "$root_out_dir/snapshot_blob.bin" ] args += [ @@ -728,29 +760,6 @@ action("run_mksnapshot") { } } -action("run_mkpeephole") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - - deps = [ - ":mkpeephole($v8_snapshot_toolchain)", - ] - - outputs = [ - v8_generated_peephole_source, - ] - - sources = [] - - script = "tools/run.py" - - args = [ - "./" + rebase_path(get_label_info(":mkpeephole($v8_snapshot_toolchain)", - "root_out_dir") + "/mkpeephole", - root_build_dir), - rebase_path(v8_generated_peephole_source, root_build_dir), - ] -} - action("v8_dump_build_config") { script = "tools/testrunner/utils/dump_build_config.py" outputs = [ @@ -769,7 +778,6 @@ action("v8_dump_build_config") { "target_cpu=\"$target_cpu\"", "v8_current_cpu=\"$v8_current_cpu\"", "v8_enable_i18n_support=$v8_enable_i18n_support", - "v8_enable_inspector=$v8_enable_inspector", "v8_target_cpu=\"$v8_target_cpu\"", "v8_use_snapshot=$v8_use_snapshot", ] @@ -791,6 +799,7 @@ source_set("v8_maybe_snapshot") { } else { # Ignore v8_use_external_startup_data setting if no snapshot is used. public_deps = [ + ":v8_builtins_setup", ":v8_nosnapshot", ] } @@ -801,7 +810,6 @@ v8_source_set("v8_nosnapshot") { deps = [ ":js2c", - ":js2c_experimental", ":js2c_experimental_extras", ":js2c_extras", ":v8_base", @@ -809,7 +817,6 @@ v8_source_set("v8_nosnapshot") { sources = [ "$target_gen_dir/experimental-extras-libraries.cc", - "$target_gen_dir/experimental-libraries.cc", "$target_gen_dir/extras-libraries.cc", "$target_gen_dir/libraries.cc", "src/snapshot/snapshot-empty.cc", @@ -828,7 +835,6 @@ v8_source_set("v8_snapshot") { deps = [ ":js2c", - ":js2c_experimental", ":js2c_experimental_extras", ":js2c_extras", ":v8_base", @@ -841,10 +847,10 @@ v8_source_set("v8_snapshot") { sources = [ "$target_gen_dir/experimental-extras-libraries.cc", - "$target_gen_dir/experimental-libraries.cc", "$target_gen_dir/extras-libraries.cc", "$target_gen_dir/libraries.cc", "$target_gen_dir/snapshot.cc", + "src/setup-isolate-deserialize.cc", ] configs = [ ":internal_config" ] @@ -856,7 +862,6 @@ if (v8_use_external_startup_data) { deps = [ ":js2c", - ":js2c_experimental", ":js2c_experimental_extras", ":js2c_extras", ":v8_base", @@ -867,6 +872,7 @@ if (v8_use_external_startup_data) { ] sources = [ + "src/setup-isolate-deserialize.cc", "src/snapshot/natives-external.cc", "src/snapshot/snapshot-external.cc", ] @@ -875,12 +881,145 @@ if (v8_use_external_startup_data) { } } +v8_source_set("v8_builtins_generators") { + visibility = [ + ":*", + "test/cctest:*", + "test/unittests:*", + ] + + deps = [ + ":v8_base", + ] + + sources = [ + ### gcmole(all) ### + "src/builtins/builtins-arguments-gen.cc", + "src/builtins/builtins-arguments-gen.h", + "src/builtins/builtins-array-gen.cc", + "src/builtins/builtins-async-function-gen.cc", + "src/builtins/builtins-async-gen.cc", + "src/builtins/builtins-async-gen.h", + "src/builtins/builtins-async-generator-gen.cc", + "src/builtins/builtins-async-iterator-gen.cc", + "src/builtins/builtins-boolean-gen.cc", + "src/builtins/builtins-call-gen.cc", + "src/builtins/builtins-constructor-gen.cc", + "src/builtins/builtins-constructor-gen.h", + "src/builtins/builtins-constructor.h", + "src/builtins/builtins-conversion-gen.cc", + "src/builtins/builtins-date-gen.cc", + "src/builtins/builtins-forin-gen.cc", + "src/builtins/builtins-forin-gen.h", + "src/builtins/builtins-function-gen.cc", + "src/builtins/builtins-generator-gen.cc", + "src/builtins/builtins-global-gen.cc", + "src/builtins/builtins-handler-gen.cc", + "src/builtins/builtins-ic-gen.cc", + "src/builtins/builtins-internal-gen.cc", + "src/builtins/builtins-interpreter-gen.cc", + "src/builtins/builtins-math-gen.cc", + "src/builtins/builtins-number-gen.cc", + "src/builtins/builtins-object-gen.cc", + "src/builtins/builtins-promise-gen.cc", + "src/builtins/builtins-promise-gen.h", + "src/builtins/builtins-regexp-gen.cc", + "src/builtins/builtins-regexp-gen.h", + "src/builtins/builtins-sharedarraybuffer-gen.cc", + "src/builtins/builtins-string-gen.cc", + "src/builtins/builtins-symbol-gen.cc", + "src/builtins/builtins-typedarray-gen.cc", + "src/builtins/builtins-utils-gen.h", + "src/builtins/builtins-wasm-gen.cc", + "src/builtins/setup-builtins-internal.cc", + "src/ic/accessor-assembler.cc", + "src/ic/accessor-assembler.h", + "src/ic/binary-op-assembler.cc", + "src/ic/binary-op-assembler.h", + "src/ic/keyed-store-generic.cc", + "src/ic/keyed-store-generic.h", + "src/interpreter/interpreter-assembler.cc", + "src/interpreter/interpreter-assembler.h", + "src/interpreter/interpreter-generator.cc", + "src/interpreter/interpreter-generator.h", + "src/interpreter/interpreter-intrinsics-generator.cc", + "src/interpreter/interpreter-intrinsics-generator.h", + "src/interpreter/setup-interpreter-internal.cc", + "src/interpreter/setup-interpreter.h", + ] + + if (v8_current_cpu == "x86") { + sources += [ + ### gcmole(arch:ia32) ### + "src/builtins/ia32/builtins-ia32.cc", + ] + } else if (v8_current_cpu == "x64") { + sources += [ + ### gcmole(arch:x64) ### + "src/builtins/x64/builtins-x64.cc", + ] + } else if (v8_current_cpu == "arm") { + sources += [ + ### gcmole(arch:arm) ### + "src/builtins/arm/builtins-arm.cc", + ] + } else if (v8_current_cpu == "arm64") { + sources += [ + ### gcmole(arch:arm64) ### + "src/builtins/arm64/builtins-arm64.cc", + ] + } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") { + sources += [ + ### gcmole(arch:mipsel) ### + "src/builtins/mips/builtins-mips.cc", + ] + } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { + sources += [ + ### gcmole(arch:mips64el) ### + "src/builtins/mips64/builtins-mips64.cc", + ] + } else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { + sources += [ + ### gcmole(arch:ppc) ### + "src/builtins/ppc/builtins-ppc.cc", + ] + } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { + sources += [ + ### gcmole(arch:s390) ### + "src/builtins/s390/builtins-s390.cc", + ] + } else if (v8_current_cpu == "x87") { + sources += [ + ### gcmole(arch:x87) ### + "src/builtins/x87/builtins-x87.cc", + ] + } + + configs = [ ":internal_config" ] +} + +v8_source_set("v8_builtins_setup") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + deps = [ + ":v8_builtins_generators", + ] + + sources = [ + ### gcmole(all) ### + "src/setup-isolate-full.cc", + ] + + configs = [ ":internal_config" ] +} + # This is split out to be a non-code containing target that the Chromium browser # DLL can depend upon to get only a version string. v8_header_set("v8_version") { configs = [ ":internal_config" ] sources = [ + "include/v8-value-serializer-version.h", "include/v8-version-string.h", "include/v8-version.h", ] @@ -894,6 +1033,8 @@ v8_source_set("v8_base") { ### gcmole(all) ### "include/v8-debug.h", + "include/v8-inspector-protocol.h", + "include/v8-inspector.h", "include/v8-platform.h", "include/v8-profiler.h", "include/v8-testing.h", @@ -919,6 +1060,11 @@ v8_source_set("v8_base") { "src/arguments.h", "src/asmjs/asm-js.cc", "src/asmjs/asm-js.h", + "src/asmjs/asm-names.h", + "src/asmjs/asm-parser.cc", + "src/asmjs/asm-parser.h", + "src/asmjs/asm-scanner.cc", + "src/asmjs/asm-scanner.h", "src/asmjs/asm-typer.cc", "src/asmjs/asm-typer.h", "src/asmjs/asm-types.cc", @@ -973,52 +1119,40 @@ v8_source_set("v8_base") { "src/bootstrapper.cc", "src/bootstrapper.h", "src/builtins/builtins-api.cc", - "src/builtins/builtins-arguments.cc", - "src/builtins/builtins-arguments.h", "src/builtins/builtins-array.cc", "src/builtins/builtins-arraybuffer.cc", - "src/builtins/builtins-async-function.cc", - "src/builtins/builtins-async-iterator.cc", - "src/builtins/builtins-async.cc", - "src/builtins/builtins-async.h", "src/builtins/builtins-boolean.cc", "src/builtins/builtins-call.cc", "src/builtins/builtins-callsite.cc", - "src/builtins/builtins-constructor.cc", "src/builtins/builtins-constructor.h", - "src/builtins/builtins-conversion.cc", "src/builtins/builtins-dataview.cc", "src/builtins/builtins-date.cc", "src/builtins/builtins-debug.cc", + "src/builtins/builtins-definitions.h", + "src/builtins/builtins-descriptors.h", "src/builtins/builtins-error.cc", "src/builtins/builtins-function.cc", - "src/builtins/builtins-generator.cc", "src/builtins/builtins-global.cc", - "src/builtins/builtins-handler.cc", - "src/builtins/builtins-ic.cc", "src/builtins/builtins-internal.cc", "src/builtins/builtins-interpreter.cc", + "src/builtins/builtins-intl.cc", "src/builtins/builtins-json.cc", "src/builtins/builtins-math.cc", "src/builtins/builtins-number.cc", "src/builtins/builtins-object.cc", - "src/builtins/builtins-object.h", - "src/builtins/builtins-promise.cc", - "src/builtins/builtins-promise.h", "src/builtins/builtins-proxy.cc", "src/builtins/builtins-reflect.cc", "src/builtins/builtins-regexp.cc", - "src/builtins/builtins-regexp.h", "src/builtins/builtins-sharedarraybuffer.cc", "src/builtins/builtins-string.cc", "src/builtins/builtins-symbol.cc", "src/builtins/builtins-typedarray.cc", "src/builtins/builtins-utils.h", - "src/builtins/builtins-wasm.cc", "src/builtins/builtins.cc", "src/builtins/builtins.h", "src/cached-powers.cc", "src/cached-powers.h", + "src/callable.h", "src/cancelable-task.cc", "src/cancelable-task.h", "src/char-predicates-inl.h", @@ -1031,6 +1165,7 @@ v8_source_set("v8_base") { "src/code-stub-assembler.cc", "src/code-stub-assembler.h", "src/code-stubs-hydrogen.cc", + "src/code-stubs-utils.h", "src/code-stubs.cc", "src/code-stubs.h", "src/codegen.cc", @@ -1117,8 +1252,6 @@ v8_source_set("v8_base") { "src/compiler/graph-assembler.h", "src/compiler/graph-reducer.cc", "src/compiler/graph-reducer.h", - "src/compiler/graph-replay.cc", - "src/compiler/graph-replay.h", "src/compiler/graph-trimmer.cc", "src/compiler/graph-trimmer.h", "src/compiler/graph-visualizer.cc", @@ -1262,8 +1395,6 @@ v8_source_set("v8_base") { "src/compiler/wasm-linkage.cc", "src/compiler/zone-stats.cc", "src/compiler/zone-stats.h", - "src/context-measure.cc", - "src/context-measure.h", "src/contexts-inl.h", "src/contexts.cc", "src/contexts.h", @@ -1428,6 +1559,8 @@ v8_source_set("v8_base") { "src/heap/array-buffer-tracker.h", "src/heap/code-stats.cc", "src/heap/code-stats.h", + "src/heap/concurrent-marking.cc", + "src/heap/concurrent-marking.h", "src/heap/embedder-tracing.cc", "src/heap/embedder-tracing.h", "src/heap/gc-idle-time-handler.cc", @@ -1471,8 +1604,6 @@ v8_source_set("v8_base") { "src/ic/access-compiler-data.h", "src/ic/access-compiler.cc", "src/ic/access-compiler.h", - "src/ic/accessor-assembler.cc", - "src/ic/accessor-assembler.h", "src/ic/call-optimization.cc", "src/ic/call-optimization.h", "src/ic/handler-compiler.cc", @@ -1486,8 +1617,6 @@ v8_source_set("v8_base") { "src/ic/ic-stats.h", "src/ic/ic.cc", "src/ic/ic.h", - "src/ic/keyed-store-generic.cc", - "src/ic/keyed-store-generic.h", "src/ic/stub-cache.cc", "src/ic/stub-cache.h", "src/icu_util.cc", @@ -1506,8 +1635,6 @@ v8_source_set("v8_base") { "src/interpreter/bytecode-array-random-iterator.h", "src/interpreter/bytecode-array-writer.cc", "src/interpreter/bytecode-array-writer.h", - "src/interpreter/bytecode-dead-code-optimizer.cc", - "src/interpreter/bytecode-dead-code-optimizer.h", "src/interpreter/bytecode-decoder.cc", "src/interpreter/bytecode-decoder.h", "src/interpreter/bytecode-flags.cc", @@ -1518,9 +1645,6 @@ v8_source_set("v8_base") { "src/interpreter/bytecode-label.h", "src/interpreter/bytecode-operands.cc", "src/interpreter/bytecode-operands.h", - "src/interpreter/bytecode-peephole-optimizer.cc", - "src/interpreter/bytecode-peephole-optimizer.h", - "src/interpreter/bytecode-peephole-table.h", "src/interpreter/bytecode-pipeline.cc", "src/interpreter/bytecode-pipeline.h", "src/interpreter/bytecode-register-allocator.h", @@ -1537,8 +1661,7 @@ v8_source_set("v8_base") { "src/interpreter/control-flow-builders.h", "src/interpreter/handler-table-builder.cc", "src/interpreter/handler-table-builder.h", - "src/interpreter/interpreter-assembler.cc", - "src/interpreter/interpreter-assembler.h", + "src/interpreter/interpreter-generator.h", "src/interpreter/interpreter-intrinsics.cc", "src/interpreter/interpreter-intrinsics.h", "src/interpreter/interpreter.cc", @@ -1572,6 +1695,7 @@ v8_source_set("v8_base") { "src/lookup.h", "src/machine-type.cc", "src/machine-type.h", + "src/macro-assembler-inl.h", "src/macro-assembler.h", "src/managed.h", "src/map-updater.cc", @@ -1586,6 +1710,15 @@ v8_source_set("v8_base") { "src/objects-printer.cc", "src/objects.cc", "src/objects.h", + "src/objects/code-cache-inl.h", + "src/objects/code-cache.h", + "src/objects/compilation-cache-inl.h", + "src/objects/compilation-cache.h", + "src/objects/descriptor-array.h", + "src/objects/dictionary.h", + "src/objects/frame-array-inl.h", + "src/objects/frame-array.h", + "src/objects/hash-table.h", "src/objects/literal-objects.cc", "src/objects/literal-objects.h", "src/objects/module-info.h", @@ -1594,9 +1727,9 @@ v8_source_set("v8_base") { "src/objects/regexp-match-info.h", "src/objects/scope-info.cc", "src/objects/scope-info.h", + "src/objects/string-table.h", "src/ostreams.cc", "src/ostreams.h", - "src/parsing/duplicate-finder.cc", "src/parsing/duplicate-finder.h", "src/parsing/expression-classifier.h", "src/parsing/func-name-inferrer.cc", @@ -1724,6 +1857,7 @@ v8_source_set("v8_base") { "src/runtime/runtime.h", "src/safepoint-table.cc", "src/safepoint-table.h", + "src/setup-isolate.h", "src/signature.h", "src/simulator.h", "src/small-pointer-list.h", @@ -1771,6 +1905,9 @@ v8_source_set("v8_base") { "src/transitions-inl.h", "src/transitions.cc", "src/transitions.h", + "src/trap-handler/handler-outside.cc", + "src/trap-handler/handler-shared.cc", + "src/trap-handler/trap-handler-internal.h", "src/trap-handler/trap-handler.h", "src/type-hints.cc", "src/type-hints.h", @@ -1847,7 +1984,6 @@ v8_source_set("v8_base") { if (v8_current_cpu == "x86") { sources += [ ### gcmole(arch:ia32) ### - "src/builtins/ia32/builtins-ia32.cc", "src/compiler/ia32/code-generator-ia32.cc", "src/compiler/ia32/instruction-codes-ia32.h", "src/compiler/ia32/instruction-scheduler-ia32.cc", @@ -1877,6 +2013,7 @@ v8_source_set("v8_base") { "src/ia32/macro-assembler-ia32.h", "src/ia32/simulator-ia32.cc", "src/ia32/simulator-ia32.h", + "src/ia32/sse-instr.h", "src/ic/ia32/access-compiler-ia32.cc", "src/ic/ia32/handler-compiler-ia32.cc", "src/ic/ia32/ic-ia32.cc", @@ -1885,7 +2022,6 @@ v8_source_set("v8_base") { ] } else if (v8_current_cpu == "x64") { sources += [ ### gcmole(arch:x64) ### - "src/builtins/x64/builtins-x64.cc", "src/compiler/x64/code-generator-x64.cc", "src/compiler/x64/instruction-codes-x64.h", "src/compiler/x64/instruction-scheduler-x64.cc", @@ -1926,6 +2062,9 @@ v8_source_set("v8_base") { "src/x64/simulator-x64.h", "src/x64/sse-instr.h", ] + if (is_linux) { + sources += [ "src/trap-handler/handler-inside.cc" ] + } } else if (v8_current_cpu == "arm") { sources += [ ### gcmole(arch:arm) ### "src/arm/assembler-arm-inl.h", @@ -1949,7 +2088,6 @@ v8_source_set("v8_base") { "src/arm/macro-assembler-arm.h", "src/arm/simulator-arm.cc", "src/arm/simulator-arm.h", - "src/builtins/arm/builtins-arm.cc", "src/compiler/arm/code-generator-arm.cc", "src/compiler/arm/instruction-codes-arm.h", "src/compiler/arm/instruction-scheduler-arm.cc", @@ -2003,7 +2141,6 @@ v8_source_set("v8_base") { "src/arm64/simulator-arm64.h", "src/arm64/utils-arm64.cc", "src/arm64/utils-arm64.h", - "src/builtins/arm64/builtins-arm64.cc", "src/compiler/arm64/code-generator-arm64.cc", "src/compiler/arm64/instruction-codes-arm64.h", "src/compiler/arm64/instruction-scheduler-arm64.cc", @@ -2029,7 +2166,6 @@ v8_source_set("v8_base") { ] } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") { sources += [ ### gcmole(arch:mipsel) ### - "src/builtins/mips/builtins-mips.cc", "src/compiler/mips/code-generator-mips.cc", "src/compiler/mips/instruction-codes-mips.h", "src/compiler/mips/instruction-scheduler-mips.cc", @@ -2069,7 +2205,6 @@ v8_source_set("v8_base") { ] } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { sources += [ ### gcmole(arch:mips64el) ### - "src/builtins/mips64/builtins-mips64.cc", "src/compiler/mips64/code-generator-mips64.cc", "src/compiler/mips64/instruction-codes-mips64.h", "src/compiler/mips64/instruction-scheduler-mips64.cc", @@ -2109,7 +2244,6 @@ v8_source_set("v8_base") { ] } else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { sources += [ ### gcmole(arch:ppc) ### - "src/builtins/ppc/builtins-ppc.cc", "src/compiler/ppc/code-generator-ppc.cc", "src/compiler/ppc/instruction-codes-ppc.h", "src/compiler/ppc/instruction-scheduler-ppc.cc", @@ -2149,7 +2283,6 @@ v8_source_set("v8_base") { ] } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { sources += [ ### gcmole(arch:s390) ### - "src/builtins/s390/builtins-s390.cc", "src/compiler/s390/code-generator-s390.cc", "src/compiler/s390/instruction-codes-s390.h", "src/compiler/s390/instruction-scheduler-s390.cc", @@ -2189,7 +2322,6 @@ v8_source_set("v8_base") { ] } else if (v8_current_cpu == "x87") { sources += [ ### gcmole(arch:x87) ### - "src/builtins/x87/builtins-x87.cc", "src/compiler/x87/code-generator-x87.cc", "src/compiler/x87/instruction-codes-x87.h", "src/compiler/x87/instruction-scheduler-x87.cc", @@ -2234,16 +2366,9 @@ v8_source_set("v8_base") { ":v8_libbase", ":v8_libsampler", ":v8_version", + "src/inspector:inspector", ] - sources += [ v8_generated_peephole_source ] - deps += [ ":run_mkpeephole" ] - - if (is_win) { - # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. - cflags = [ "/wd4267" ] - } - if (v8_enable_i18n_support) { deps += [ "//third_party/icu" ] if (is_win) { @@ -2260,10 +2385,6 @@ v8_source_set("v8_base") { sources += [ "$target_gen_dir/debug-support.cc" ] deps += [ ":postmortem-metadata" ] } - - if (v8_enable_inspector) { - deps += [ "src/inspector:inspector" ] - } } v8_component("v8_libbase") { @@ -2320,6 +2441,7 @@ v8_component("v8_libbase") { "src/base/safe_math_impl.h", "src/base/sys-info.cc", "src/base/sys-info.h", + "src/base/timezone-cache.h", "src/base/utils/random-number-generator.cc", "src/base/utils/random-number-generator.h", ] @@ -2335,7 +2457,10 @@ v8_component("v8_libbase") { } if (is_posix) { - sources += [ "src/base/platform/platform-posix.cc" ] + sources += [ + "src/base/platform/platform-posix.cc", + "src/base/platform/platform-posix.h", + ] } if (is_linux) { @@ -2486,6 +2611,7 @@ if (current_toolchain == v8_snapshot_toolchain) { deps = [ ":v8_base", + ":v8_builtins_setup", ":v8_libbase", ":v8_libplatform", ":v8_nosnapshot", @@ -2495,34 +2621,6 @@ if (current_toolchain == v8_snapshot_toolchain) { } } -v8_executable("mkpeephole") { - # mkpeephole needs to be built for the build host so the peephole lookup - # table can built during build. The table depends on the properties of - # bytecodes that are described in bytecodes.{cc,h}. - visibility = [ ":*" ] # Only targets in this file can depend on this. - - sources = [ - "src/interpreter/bytecode-operands.cc", - "src/interpreter/bytecode-operands.h", - "src/interpreter/bytecode-peephole-optimizer.h", - "src/interpreter/bytecode-traits.h", - "src/interpreter/bytecodes.cc", - "src/interpreter/bytecodes.h", - "src/interpreter/mkpeephole.cc", - ] - - configs = [ - ":external_config", - ":internal_config", - ] - - deps = [ - ":v8_libbase", - "//build/config/sanitizers:deps", - "//build/win:default_exe_manifest", - ] -} - ############################################################################### # Public targets # @@ -2662,9 +2760,6 @@ v8_executable("d8") { } defines = [] - if (v8_enable_inspector) { - defines += [ "V8_INSPECTOR_ENABLED" ] - } if (v8_enable_vtunejit) { deps += [ "//src/third_party/vtune:v8_vtune" ] @@ -2864,17 +2959,6 @@ v8_source_set("wasm_module_runner") { ] } -v8_source_set("wasm_test_signatures") { - sources = [ - "test/common/wasm/test-signatures.h", - ] - - configs = [ - ":external_config", - ":internal_config_base", - ] -} - v8_source_set("wasm_fuzzer") { sources = [ "test/fuzzer/wasm.cc", @@ -2915,13 +2999,13 @@ v8_fuzzer("wasm_asmjs_fuzzer") { v8_source_set("wasm_code_fuzzer") { sources = [ + "test/common/wasm/test-signatures.h", "test/fuzzer/wasm-code.cc", ] deps = [ ":fuzzer_support", ":wasm_module_runner", - ":wasm_test_signatures", ] configs = [ @@ -2935,13 +3019,13 @@ v8_fuzzer("wasm_code_fuzzer") { v8_source_set("wasm_call_fuzzer") { sources = [ + "test/common/wasm/test-signatures.h", "test/fuzzer/wasm-call.cc", ] deps = [ ":fuzzer_support", ":wasm_module_runner", - ":wasm_test_signatures", ] configs = [ @@ -3107,13 +3191,13 @@ v8_fuzzer("wasm_data_section_fuzzer") { v8_source_set("wasm_compile_fuzzer") { sources = [ + "test/common/wasm/test-signatures.h", "test/fuzzer/wasm-compile.cc", ] deps = [ ":fuzzer_support", ":wasm_module_runner", - ":wasm_test_signatures", ] configs = [ diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index f3cd421bca11ac..515e5b830e51b5 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,1148 @@ +2017-04-11: Version 5.9.211 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.210 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.209 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.208 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.207 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.206 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.205 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.204 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.203 + + Performance and stability improvements on all platforms. + + +2017-04-10: Version 5.9.202 + + Performance and stability improvements on all platforms. + + +2017-04-10: Version 5.9.201 + + Performance and stability improvements on all platforms. + + +2017-04-10: Version 5.9.200 + + Performance and stability improvements on all platforms. + + +2017-04-10: Version 5.9.199 + + Performance and stability improvements on all platforms. + + +2017-04-10: Version 5.9.198 + + Performance and stability improvements on all platforms. + + +2017-04-10: Version 5.9.197 + + Performance and stability improvements on all platforms. + + +2017-04-09: Version 5.9.196 + + Performance and stability improvements on all platforms. + + +2017-04-08: Version 5.9.195 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.194 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.193 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.192 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.191 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.190 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.189 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.188 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.187 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.186 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.185 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.184 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.183 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.182 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.181 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.180 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.179 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.178 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.177 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.176 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.175 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.174 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.173 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.172 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.171 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.170 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.169 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.168 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.167 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.166 + + Performance and stability improvements on all platforms. + + +2017-04-04: Version 5.9.165 + + Performance and stability improvements on all platforms. + + +2017-04-04: Version 5.9.164 + + Performance and stability improvements on all platforms. + + +2017-04-04: Version 5.9.163 + + Performance and stability improvements on all platforms. + + +2017-04-04: Version 5.9.162 + + Performance and stability improvements on all platforms. + + +2017-04-04: Version 5.9.161 + + Performance and stability improvements on all platforms. + + +2017-04-03: Version 5.9.160 + + Performance and stability improvements on all platforms. + + +2017-04-03: Version 5.9.159 + + Performance and stability improvements on all platforms. + + +2017-04-03: Version 5.9.158 + + Performance and stability improvements on all platforms. + + +2017-04-03: Version 5.9.157 + + Performance and stability improvements on all platforms. + + +2017-04-03: Version 5.9.156 + + Performance and stability improvements on all platforms. + + +2017-04-03: Version 5.9.155 + + Performance and stability improvements on all platforms. + + +2017-04-01: Version 5.9.154 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.153 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.152 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.151 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.150 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.149 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.148 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.147 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.146 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.145 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.144 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.143 + + Performance and stability improvements on all platforms. + + +2017-03-30: Version 5.9.142 + + Performance and stability improvements on all platforms. + + +2017-03-30: Version 5.9.141 + + Performance and stability improvements on all platforms. + + +2017-03-30: Version 5.9.140 + + Performance and stability improvements on all platforms. + + +2017-03-30: Version 5.9.139 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.138 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.137 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.136 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.135 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.134 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.133 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.132 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.131 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.130 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.129 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.128 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.127 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.126 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.125 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.124 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.123 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.122 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.121 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.120 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.119 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.118 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.117 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.116 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.115 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.114 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.113 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.112 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.111 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.110 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.109 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.108 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.107 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.106 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.105 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.104 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.103 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.102 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.101 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.100 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.99 + + Performance and stability improvements on all platforms. + + +2017-03-26: Version 5.9.98 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.97 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.96 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.95 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.94 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.93 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.92 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.91 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.90 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.89 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.88 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.87 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.86 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.85 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.84 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.83 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.82 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.81 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.80 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.79 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.78 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.77 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.76 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.75 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.74 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.73 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.72 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.71 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.70 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.69 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.68 + + Performance and stability improvements on all platforms. + + +2017-03-21: Version 5.9.67 + + Performance and stability improvements on all platforms. + + +2017-03-21: Version 5.9.66 + + Performance and stability improvements on all platforms. + + +2017-03-21: Version 5.9.65 + + Performance and stability improvements on all platforms. + + +2017-03-21: Version 5.9.64 + + Performance and stability improvements on all platforms. + + +2017-03-21: Version 5.9.63 + + Performance and stability improvements on all platforms. + + +2017-03-21: Version 5.9.62 + + Performance and stability improvements on all platforms. + + +2017-03-20: Version 5.9.61 + + Performance and stability improvements on all platforms. + + +2017-03-20: Version 5.9.60 + + Performance and stability improvements on all platforms. + + +2017-03-20: Version 5.9.59 + + Performance and stability improvements on all platforms. + + +2017-03-20: Version 5.9.58 + + Performance and stability improvements on all platforms. + + +2017-03-17: Version 5.9.57 + + Performance and stability improvements on all platforms. + + +2017-03-17: Version 5.9.56 + + Performance and stability improvements on all platforms. + + +2017-03-17: Version 5.9.55 + + Performance and stability improvements on all platforms. + + +2017-03-17: Version 5.9.54 + + Performance and stability improvements on all platforms. + + +2017-03-17: Version 5.9.53 + + Performance and stability improvements on all platforms. + + +2017-03-17: Version 5.9.52 + + Performance and stability improvements on all platforms. + + +2017-03-16: Version 5.9.51 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.50 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.49 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.48 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.47 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.46 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.45 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.44 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.43 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.42 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.41 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.40 + + Performance and stability improvements on all platforms. + + +2017-03-13: Version 5.9.39 + + Performance and stability improvements on all platforms. + + +2017-03-13: Version 5.9.38 + + Performance and stability improvements on all platforms. + + +2017-03-13: Version 5.9.37 + + Performance and stability improvements on all platforms. + + +2017-03-13: Version 5.9.36 + + Performance and stability improvements on all platforms. + + +2017-03-10: Version 5.9.35 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.34 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.33 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.32 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.31 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.30 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.29 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.28 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.27 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.26 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.25 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.24 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.23 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.22 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.21 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.20 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.19 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.18 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.17 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.16 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.15 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.14 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.13 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.12 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.11 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.10 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.9 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.8 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.7 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.6 + + Performance and stability improvements on all platforms. + + +2017-03-05: Version 5.9.5 + + Performance and stability improvements on all platforms. + + +2017-03-05: Version 5.9.4 + + Performance and stability improvements on all platforms. + + +2017-03-04: Version 5.9.3 + + Performance and stability improvements on all platforms. + + +2017-03-04: Version 5.9.2 + + Performance and stability improvements on all platforms. + + +2017-03-03: Version 5.9.1 + + Performance and stability improvements on all platforms. + + +2017-03-01: Version 5.8.301 + + Performance and stability improvements on all platforms. + + +2017-03-01: Version 5.8.300 + + Performance and stability improvements on all platforms. + + +2017-03-01: Version 5.8.299 + + Performance and stability improvements on all platforms. + + +2017-03-01: Version 5.8.298 + + Performance and stability improvements on all platforms. + + +2017-02-28: Version 5.8.297 + + Performance and stability improvements on all platforms. + + +2017-02-28: Version 5.8.296 + + Performance and stability improvements on all platforms. + + +2017-02-28: Version 5.8.295 + + Performance and stability improvements on all platforms. + + +2017-02-28: Version 5.8.294 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.293 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.292 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.291 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.290 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.289 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.288 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.287 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.286 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.285 + + Performance and stability improvements on all platforms. + + +2017-02-26: Version 5.8.284 + + Performance and stability improvements on all platforms. + + 2017-02-25: Version 5.8.283 Performance and stability improvements on all platforms. diff --git a/deps/v8/DEPS b/deps/v8/DEPS index f8e00855d4f3bd..aeeb0e5911d716 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -8,15 +8,15 @@ vars = { deps = { "v8/build": - Var("chromium_url") + "/chromium/src/build.git" + "@" + "c7c2db69cd571523ce728c4d3dceedbd1896b519", + Var("chromium_url") + "/chromium/src/build.git" + "@" + "94c06fe70f3f6429c59e3ec0f6acd4f6710050b2", "v8/tools/gyp": Var("chromium_url") + "/external/gyp.git" + "@" + "e7079f0e0e14108ab0dba58728ff219637458563", "v8/third_party/icu": Var("chromium_url") + "/chromium/deps/icu.git" + "@" + "450be73c9ee8ae29d43d4fdc82febb2a5f62bfb5", "v8/third_party/instrumented_libraries": - Var("chromium_url") + "/chromium/src/third_party/instrumented_libraries.git" + "@" + "5b6f777da671be977f56f0e8fc3469a3ccbb4474", + Var("chromium_url") + "/chromium/src/third_party/instrumented_libraries.git" + "@" + "05d5695a73e78b9cae55b8579fd8bf22b85eb283", "v8/buildtools": - Var("chromium_url") + "/chromium/buildtools.git" + "@" + "94cdccbebc7a634c27145a3d84089e85fbb42e69", + Var("chromium_url") + "/chromium/buildtools.git" + "@" + "d3074448541662f242bcee623049c13a231b5648", "v8/base/trace_event/common": Var("chromium_url") + "/chromium/src/base/trace_event/common.git" + "@" + "06294c8a4a6f744ef284cd63cfe54dbf61eea290", "v8/third_party/jinja2": @@ -34,26 +34,22 @@ deps = { "v8/test/mozilla/data": Var("chromium_url") + "/v8/deps/third_party/mozilla-tests.git" + "@" + "f6c578a10ea707b1a8ab0b88943fe5115ce2b9be", "v8/test/test262/data": - Var("chromium_url") + "/external/github.com/tc39/test262.git" + "@" + "a72ee6d91275aa6524e84a9b7070103411ef2689", + Var("chromium_url") + "/external/github.com/tc39/test262.git" + "@" + "230f9fc5688ce76bfaa99aba5f680a159eaac9e2", "v8/test/test262/harness": Var("chromium_url") + "/external/github.com/test262-utils/test262-harness-py.git" + "@" + "0f2acdd882c84cff43b9d60df7574a1901e2cdcd", "v8/tools/clang": - Var("chromium_url") + "/chromium/src/tools/clang.git" + "@" + "9913fb19b687b0c858f697efd7bd2468d789a3d5", + Var("chromium_url") + "/chromium/src/tools/clang.git" + "@" + "49df471350a60efaec6951f321dd65475496ba17", "v8/test/wasm-js": - Var("chromium_url") + "/external/github.com/WebAssembly/spec.git" + "@" + "b8b919e4a0d52db4d3d762e731e615bc3a38b3b2", + Var("chromium_url") + "/external/github.com/WebAssembly/spec.git" + "@" + "07fd6430f879d36928d179a62d9bdeed82286065", } deps_os = { "android": { "v8/third_party/android_tools": - Var("chromium_url") + "/android_tools.git" + "@" + "b43a6a289a7588b1769814f04dd6c7d7176974cc", + Var("chromium_url") + "/android_tools.git" + "@" + "b65c4776dac2cf1b80e969b3b2d4e081b9c84f29", "v8/third_party/catapult": - Var('chromium_url') + "/external/github.com/catapult-project/catapult.git" + "@" + "246a39a82c2213d913a96fff020a263838dc76e6", + Var('chromium_url') + "/external/github.com/catapult-project/catapult.git" + "@" + "9a55abab029cb9ae94f5160ded11b09a4638a955", }, - "win": { - "v8/third_party/cygwin": - Var("chromium_url") + "/chromium/deps/cygwin.git" + "@" + "c89e446b273697fadf3a10ff1007a97c0b7de6df", - } } recursedeps = [ diff --git a/deps/v8/OWNERS b/deps/v8/OWNERS index e375fa65b73326..4a2dcdf74cddb6 100644 --- a/deps/v8/OWNERS +++ b/deps/v8/OWNERS @@ -7,7 +7,6 @@ bradnelson@chromium.org cbruni@chromium.org clemensh@chromium.org danno@chromium.org -epertoso@chromium.org franzih@chromium.org gsathya@chromium.org hablich@chromium.org diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index 4cacf811336530..6aa94a01b37e8b 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -31,6 +31,7 @@ for more details about the presubmit API built into gcl. """ +import re import sys @@ -250,6 +251,7 @@ def _CheckMissingFiles(input_api, output_api): def _CommonChecks(input_api, output_api): """Checks common to both upload and commit.""" results = [] + results.extend(_CheckCommitMessageBugEntry(input_api, output_api)) results.extend(input_api.canned_checks.CheckOwners( input_api, output_api, source_file_filter=None)) results.extend(input_api.canned_checks.CheckPatchFormatted( @@ -276,6 +278,32 @@ def _SkipTreeCheck(input_api, output_api): return input_api.environ.get('PRESUBMIT_TREE_CHECK') == 'skip' +def _CheckCommitMessageBugEntry(input_api, output_api): + """Check that bug entries are well-formed in commit message.""" + bogus_bug_msg = ( + 'Bogus BUG entry: %s. Please specify the issue tracker prefix and the ' + 'issue number, separated by a colon, e.g. v8:123 or chromium:12345.') + results = [] + for bug in (input_api.change.BUG or '').split(','): + bug = bug.strip() + if 'none'.startswith(bug.lower()): + continue + if ':' not in bug: + try: + if int(bug) > 100000: + # Rough indicator for current chromium bugs. + prefix_guess = 'chromium' + else: + prefix_guess = 'v8' + results.append('BUG entry requires issue tracker prefix, e.g. %s:%s' % + (prefix_guess, bug)) + except ValueError: + results.append(bogus_bug_msg % bug) + elif not re.match(r'\w+:\d+', bug): + results.append(bogus_bug_msg % bug) + return [output_api.PresubmitError(r) for r in results] + + def CheckChangeOnUpload(input_api, output_api): results = [] results.extend(_CommonChecks(input_api, output_api)) diff --git a/deps/v8/gni/isolate.gni b/deps/v8/gni/isolate.gni index a347eeaa24e1ba..90bc8c5d7fa4b9 100644 --- a/deps/v8/gni/isolate.gni +++ b/deps/v8/gni/isolate.gni @@ -101,11 +101,6 @@ template("v8_isolate_run") { } else { icu_use_data_file_flag = "0" } - if (v8_enable_inspector) { - enable_inspector = "1" - } else { - enable_inspector = "0" - } if (v8_use_external_startup_data) { use_external_startup_data = "1" } else { @@ -177,8 +172,6 @@ template("v8_isolate_run") { "--config-variable", "target_arch=$target_arch", "--config-variable", - "v8_enable_inspector=$enable_inspector", - "--config-variable", "v8_use_external_startup_data=$use_external_startup_data", "--config-variable", "v8_use_snapshot=$use_snapshot", diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index ea628e00007c87..33f85f989b73e6 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -37,9 +37,6 @@ declare_args() { # add a dependency on the ICU library. v8_enable_i18n_support = true - # Enable inspector. See include/v8-inspector.h. - v8_enable_inspector = true - # Use static libraries instead of source_sets. v8_static_library = false } @@ -66,9 +63,8 @@ v8_inspector_js_protocol = v8_path_prefix + "/src/inspector/js_protocol.json" # # Common configs to remove or add in all v8 targets. -v8_remove_configs = [ "//build/config/compiler:chromium_code" ] +v8_remove_configs = [] v8_add_configs = [ - "//build/config/compiler:no_chromium_code", v8_path_prefix + ":features", v8_path_prefix + ":toolchain", ] diff --git a/deps/v8/gypfiles/all.gyp b/deps/v8/gypfiles/all.gyp index d3e275e10fa552..bbad66741c7e26 100644 --- a/deps/v8/gypfiles/all.gyp +++ b/deps/v8/gypfiles/all.gyp @@ -9,6 +9,7 @@ 'type': 'none', 'dependencies': [ '../src/d8.gyp:d8', + '../test/inspector/inspector.gyp:*', ], 'conditions': [ ['component!="shared_library"', { @@ -25,20 +26,11 @@ '../test/unittests/unittests.gyp:*', ], }], - ['v8_enable_inspector==1', { - 'dependencies': [ - '../test/inspector/inspector.gyp:*', - ], - }], - ['v8_enable_inspector==1 and test_isolation_mode != "noop"', { - 'dependencies': [ - '../test/debugger/debugger.gyp:*', - ], - }], ['test_isolation_mode != "noop"', { 'dependencies': [ '../test/bot_default.gyp:*', '../test/benchmarks/benchmarks.gyp:*', + '../test/debugger/debugger.gyp:*', '../test/default.gyp:*', '../test/intl/intl.gyp:*', '../test/message/message.gyp:*', diff --git a/deps/v8/gypfiles/features.gypi b/deps/v8/gypfiles/features.gypi index bd5cd7cd108f1c..f6a442f66341d5 100644 --- a/deps/v8/gypfiles/features.gypi +++ b/deps/v8/gypfiles/features.gypi @@ -142,5 +142,8 @@ ], # conditions }, # Release }, # configurations + 'defines': [ + 'V8_GYP_BUILD', + ], # defines }, # target_defaults } diff --git a/deps/v8/gypfiles/isolate.gypi b/deps/v8/gypfiles/isolate.gypi index c55f3ca782516a..af3b3ae5c8926e 100644 --- a/deps/v8/gypfiles/isolate.gypi +++ b/deps/v8/gypfiles/isolate.gypi @@ -82,7 +82,6 @@ '--config-variable', 'sanitizer_coverage=<(sanitizer_coverage)', '--config-variable', 'component=<(component)', '--config-variable', 'target_arch=<(target_arch)', - '--config-variable', 'v8_enable_inspector=<(v8_enable_inspector)', '--config-variable', 'v8_use_external_startup_data=<(v8_use_external_startup_data)', '--config-variable', 'v8_use_snapshot=<(v8_use_snapshot)', ], diff --git a/deps/v8/gypfiles/standalone.gypi b/deps/v8/gypfiles/standalone.gypi index 862f94fb5c3c0d..27e19d3c531784 100644 --- a/deps/v8/gypfiles/standalone.gypi +++ b/deps/v8/gypfiles/standalone.gypi @@ -46,7 +46,6 @@ 'msvs_multi_core_compile%': '1', 'mac_deployment_target%': '10.7', 'release_extra_cflags%': '', - 'v8_enable_inspector%': 0, 'variables': { 'variables': { 'variables': { @@ -93,16 +92,16 @@ ['OS=="linux" and use_sysroot==1', { 'conditions': [ ['target_arch=="arm"', { - 'sysroot%': ' + +namespace v8 { + +constexpr uint32_t CurrentValueSerializerFormatVersion() { return 13; } + +} // namespace v8 + +#endif // INCLUDE_V8_VALUE_SERIALIZER_VERSION_H_ diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 70e1a84d09e949..f1b394a8c4a1ab 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -9,9 +9,9 @@ // NOTE these macros are used by some of the tool scripts and the build // system so their names cannot be changed without changing the scripts. #define V8_MAJOR_VERSION 5 -#define V8_MINOR_VERSION 8 -#define V8_BUILD_NUMBER 283 -#define V8_PATCH_LEVEL 41 +#define V8_MINOR_VERSION 9 +#define V8_BUILD_NUMBER 211 +#define V8_PATCH_LEVEL 38 // 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 95023ae1c910bc..5d80acc17d8636 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -128,7 +128,6 @@ template class PersistentValueVector; template class WeakCallbackObject; class FunctionTemplate; class ObjectTemplate; -class Data; template class FunctionCallbackInfo; template class PropertyCallbackInfo; class StackTrace; @@ -159,7 +158,6 @@ class GlobalHandles; *(static_cast(0)) = static_cast(0); \ } - /** * An object reference managed by the v8 garbage collector. * @@ -173,10 +171,16 @@ class GlobalHandles; * allocated on the heap. * * There are two types of handles: local and persistent handles. + * * Local handles are light-weight and transient and typically used in - * local operations. They are managed by HandleScopes. Persistent - * handles can be used when storing objects across several independent - * operations and have to be explicitly deallocated when they're no + * local operations. They are managed by HandleScopes. That means that a + * HandleScope must exist on the stack when they are created and that they are + * only valid inside of the HandleScope active during their creation. + * For passing a local handle to an outer HandleScope, an EscapableHandleScope + * and its Escape() method must be used. + * + * Persistent handles can be used when storing objects across several + * independent operations and have to be explicitly deallocated when they're no * longer used. * * It is safe to extract the object stored in the handle by @@ -254,6 +258,11 @@ class Local { return !operator==(that); } + /** + * Cast a handle to a subclass, e.g. Local to Local. + * This is only valid if the handle actually refers to a value of the + * target type. + */ template V8_INLINE static Local Cast(Local that) { #ifdef V8_ENABLE_CHECKS // If we're going to perform the type check then we have to check @@ -263,6 +272,11 @@ class Local { return Local(T::Cast(*that)); } + /** + * Calling this is equivalent to Local::Cast(). + * In particular, this is only valid if the handle actually refers to a value + * of the target type. + */ template V8_INLINE Local As() const { return Local::Cast(*this); @@ -339,15 +353,26 @@ class MaybeLocal { V8_INLINE bool IsEmpty() const { return val_ == nullptr; } + /** + * Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty, + * |false| is returned and |out| is left untouched. + */ template V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local* out) const { out->val_ = IsEmpty() ? nullptr : this->val_; return !IsEmpty(); } - // Will crash if the MaybeLocal<> is empty. + /** + * Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty, + * V8 will crash the process. + */ V8_INLINE Local ToLocalChecked(); + /** + * Converts this MaybeLocal<> to a Local<>, using a default value if this + * MaybeLocal<> is empty. + */ template V8_INLINE Local FromMaybe(Local default_value) const { return IsEmpty() ? default_value : Local(val_); @@ -357,8 +382,10 @@ class MaybeLocal { T* val_; }; - -// Eternal handles are set-once handles that live for the life of the isolate. +/** + * Eternal handles are set-once handles that live for the lifetime of the + * isolate. + */ template class Eternal { public: V8_INLINE Eternal() : val_(nullptr) {} @@ -377,7 +404,7 @@ template class Eternal { static const int kInternalFieldsInWeakCallback = 2; - +static const int kEmbedderFieldsInWeakCallback = 2; template class WeakCallbackInfo { @@ -385,11 +412,11 @@ class WeakCallbackInfo { typedef void (*Callback)(const WeakCallbackInfo& data); WeakCallbackInfo(Isolate* isolate, T* parameter, - void* internal_fields[kInternalFieldsInWeakCallback], + void* embedder_fields[kEmbedderFieldsInWeakCallback], Callback* callback) : isolate_(isolate), parameter_(parameter), callback_(callback) { - for (int i = 0; i < kInternalFieldsInWeakCallback; ++i) { - internal_fields_[i] = internal_fields[i]; + for (int i = 0; i < kEmbedderFieldsInWeakCallback; ++i) { + embedder_fields_[i] = embedder_fields[i]; } } @@ -399,11 +426,11 @@ class WeakCallbackInfo { V8_INLINE V8_DEPRECATED("use indexed version", void* GetInternalField1() const) { - return internal_fields_[0]; + return embedder_fields_[0]; } V8_INLINE V8_DEPRECATED("use indexed version", void* GetInternalField2() const) { - return internal_fields_[1]; + return embedder_fields_[1]; } V8_DEPRECATED("Not realiable once SetSecondPassCallback() was used.", @@ -423,7 +450,7 @@ class WeakCallbackInfo { Isolate* isolate_; T* parameter_; Callback* callback_; - void* internal_fields_[kInternalFieldsInWeakCallback]; + void* embedder_fields_[kEmbedderFieldsInWeakCallback]; }; @@ -438,10 +465,10 @@ enum class WeakCallbackType { kParameter, kInternalFields, kFinalizer }; * An object reference that is independent of any handle scope. Where * a Local handle only lives as long as the HandleScope in which it was * allocated, a PersistentBase handle remains valid until it is explicitly - * disposed. + * disposed using Reset(). * * A persistent handle contains a reference to a storage cell within - * the v8 engine which holds an object value and which is updated by + * the V8 engine which holds an object value and which is updated by * the garbage collector whenever the object is moved. A new storage * cell can be created using the constructor or PersistentBase::Reset and * existing handles can be disposed using PersistentBase::Reset. @@ -899,6 +926,11 @@ class V8_EXPORT EscapableHandleScope : public HandleScope { internal::Object** escape_slot_; }; +/** + * A SealHandleScope acts like a handle scope in which no handle allocations + * are allowed. It can be useful for debugging handle leaks. + * Handles can be allocated within inner normal HandleScopes. + */ class V8_EXPORT SealHandleScope { public: SealHandleScope(Isolate* isolate); @@ -1067,12 +1099,33 @@ class V8_EXPORT Module { /** * ModuleEvaluation + * + * Returns the completion value. */ V8_WARN_UNUSED_RESULT MaybeLocal Evaluate(Local context); }; -// Node.js-specific: This will be implemented by a later V8 upgrade! -class DynamicImportResult; +/** + * This is an unfinished experimental feature, and is only exposed + * here for internal testing purposes. DO NOT USE. + * + * A compiled JavaScript module. + */ +class V8_EXPORT DynamicImportResult { + public: + /** + * Resolves the promise with the namespace object of the given + * module. + */ + V8_WARN_UNUSED_RESULT bool FinishDynamicImportSuccess(Local context, + Local module); + + /** + * Rejects the promise with the given exception. + */ + V8_WARN_UNUSED_RESULT bool FinishDynamicImportFailure(Local context, + Local exception); +}; /** * A compiled JavaScript script, tied to a Context which was active when the @@ -1364,7 +1417,7 @@ class V8_EXPORT ScriptCompiler { * CachedData instance is still valid; the tag has no other meaing. * * Background: The data carried by CachedData may depend on the exact - * V8 version number or currently compiler flags. This means when + * V8 version number or current compiler flags. This means that when * persisting CachedData, the embedder must take care to not pass in * data from another V8 version, or the same version with different * features enabled. @@ -1615,6 +1668,11 @@ class V8_EXPORT StackFrame { * constructor via "new". */ bool IsConstructor() const; + + /** + * Returns whether or not the associated functions is defined in wasm. + */ + bool IsWasm() const; }; @@ -1684,21 +1742,21 @@ class V8_EXPORT ValueSerializer { public: virtual ~Delegate() {} - /* + /** * Handles the case where a DataCloneError would be thrown in the structured * clone spec. Other V8 embedders may throw some other appropriate exception * type. */ virtual void ThrowDataCloneError(Local message) = 0; - /* + /** * The embedder overrides this method to write some kind of host object, if * possible. If not, a suitable exception should be thrown and * Nothing() returned. */ virtual Maybe WriteHostObject(Isolate* isolate, Local object); - /* + /** * Called when the ValueSerializer is going to serialize a * SharedArrayBuffer object. The embedder must return an ID for the * object, using the same ID if this SharedArrayBuffer has already been @@ -1713,7 +1771,7 @@ class V8_EXPORT ValueSerializer { virtual Maybe GetWasmModuleTransferId( Isolate* isolate, Local module); - /* + /** * Allocates memory for the buffer of at least the size provided. The actual * size (which may be greater or equal) is written to |actual_size|. If no * buffer has been allocated yet, nullptr will be provided. @@ -1725,7 +1783,7 @@ class V8_EXPORT ValueSerializer { virtual void* ReallocateBufferMemory(void* old_buffer, size_t size, size_t* actual_size); - /* + /** * Frees a buffer allocated with |ReallocateBufferMemory|. */ virtual void FreeBufferMemory(void* buffer); @@ -1735,24 +1793,24 @@ class V8_EXPORT ValueSerializer { ValueSerializer(Isolate* isolate, Delegate* delegate); ~ValueSerializer(); - /* + /** * Writes out a header, which includes the format version. */ void WriteHeader(); - /* + /** * Serializes a JavaScript value into the buffer. */ V8_WARN_UNUSED_RESULT Maybe WriteValue(Local context, Local value); - /* + /** * Returns the stored data. This serializer should not be used once the buffer * is released. The contents are undefined if a previous write has failed. */ V8_DEPRECATE_SOON("Use Release()", std::vector ReleaseBuffer()); - /* + /** * Returns the stored data (allocated using the delegate's * AllocateBufferMemory) and its size. This serializer should not be used once * the buffer is released. The contents are undefined if a previous write has @@ -1760,7 +1818,7 @@ class V8_EXPORT ValueSerializer { */ V8_WARN_UNUSED_RESULT std::pair Release(); - /* + /** * Marks an ArrayBuffer as havings its contents transferred out of band. * Pass the corresponding ArrayBuffer in the deserializing context to * ValueDeserializer::TransferArrayBuffer. @@ -1768,7 +1826,7 @@ class V8_EXPORT ValueSerializer { void TransferArrayBuffer(uint32_t transfer_id, Local array_buffer); - /* + /** * Similar to TransferArrayBuffer, but for SharedArrayBuffer. */ V8_DEPRECATE_SOON("Use Delegate::GetSharedArrayBufferId", @@ -1776,7 +1834,7 @@ class V8_EXPORT ValueSerializer { uint32_t transfer_id, Local shared_array_buffer)); - /* + /** * Indicate whether to treat ArrayBufferView objects as host objects, * i.e. pass them to Delegate::WriteHostObject. This should not be * called when no Delegate was passed. @@ -1785,7 +1843,7 @@ class V8_EXPORT ValueSerializer { */ void SetTreatArrayBufferViewsAsHostObjects(bool mode); - /* + /** * Write raw data in various common formats to the buffer. * Note that integer types are written in base-128 varint format, not with a * binary copy. For use during an override of Delegate::WriteHostObject. @@ -1817,14 +1875,14 @@ class V8_EXPORT ValueDeserializer { public: virtual ~Delegate() {} - /* + /** * The embedder overrides this method to read some kind of host object, if * possible. If not, a suitable exception should be thrown and * MaybeLocal() returned. */ virtual MaybeLocal ReadHostObject(Isolate* isolate); - /* + /** * Get a WasmCompiledModule given a transfer_id previously provided * by ValueSerializer::GetWasmModuleTransferId */ @@ -1837,25 +1895,25 @@ class V8_EXPORT ValueDeserializer { Delegate* delegate); ~ValueDeserializer(); - /* + /** * Reads and validates a header (including the format version). * May, for example, reject an invalid or unsupported wire format. */ V8_WARN_UNUSED_RESULT Maybe ReadHeader(Local context); - /* + /** * Deserializes a JavaScript value from the buffer. */ V8_WARN_UNUSED_RESULT MaybeLocal ReadValue(Local context); - /* + /** * Accepts the array buffer corresponding to the one passed previously to * ValueSerializer::TransferArrayBuffer. */ void TransferArrayBuffer(uint32_t transfer_id, Local array_buffer); - /* + /** * Similar to TransferArrayBuffer, but for SharedArrayBuffer. * The id is not necessarily in the same namespace as unshared ArrayBuffer * objects. @@ -1863,7 +1921,7 @@ class V8_EXPORT ValueDeserializer { void TransferSharedArrayBuffer(uint32_t id, Local shared_array_buffer); - /* + /** * Must be called before ReadHeader to enable support for reading the legacy * wire format (i.e., which predates this being shipped). * @@ -1872,14 +1930,19 @@ class V8_EXPORT ValueDeserializer { */ void SetSupportsLegacyWireFormat(bool supports_legacy_wire_format); - /* + /** + * Expect inline wasm in the data stream (rather than in-memory transfer) + */ + void SetExpectInlineWasm(bool allow_inline_wasm); + + /** * Reads the underlying wire format version. Likely mostly to be useful to * legacy code reading old wire format versions. Must be called after * ReadHeader. */ uint32_t GetWireFormatVersion() const; - /* + /** * Reads raw data in various common formats to the buffer. * Note that integer types are read in base-128 varint format, not with a * binary copy. For use during an override of Delegate::ReadHostObject. @@ -1906,7 +1969,7 @@ class V8_EXPORT NativeWeakMap : public Data { public: static Local New(Isolate* isolate); void Set(Local key, Local value); - Local Get(Local key); + Local Get(Local key) const; bool Has(Local key); bool Delete(Local key); }; @@ -2304,9 +2367,25 @@ class V8_EXPORT Name : public Primitive { static void CheckCast(Value* obj); }; +/** + * A flag describing different modes of string creation. + * + * Aside from performance implications there are no differences between the two + * creation modes. + */ +enum class NewStringType { + /** + * Create a new string, always allocating new storage memory. + */ + kNormal, -enum class NewStringType { kNormal, kInternalized }; - + /** + * Acts as a hint that the string should be created in the + * old generation heap space and be deduplicated if an identical string + * already exists. + */ + kInternalized +}; /** * A JavaScript string value (ECMA-262, 4.3.17). @@ -2321,7 +2400,7 @@ class V8_EXPORT String : public Name { ONE_BYTE_ENCODING = 0x8 }; /** - * Returns the number of characters in this string. + * Returns the number of characters (UTF-16 code units) in this string. */ int Length() const; @@ -2332,14 +2411,16 @@ class V8_EXPORT String : public Name { int Utf8Length() const; /** - * Returns whether this string is known to contain only one byte data. + * Returns whether this string is known to contain only one byte data, + * i.e. ISO-8859-1 code points. * Does not read the string. * False negatives are possible. */ bool IsOneByte() const; /** - * Returns whether this string contain only one byte data. + * Returns whether this string contain only one byte data, + * i.e. ISO-8859-1 code points. * Will read the entire string in some cases. */ bool ContainsOnlyOneByte() const; @@ -2646,7 +2727,7 @@ class V8_EXPORT String : public Name { }; /** - * Converts an object to a two-byte string. + * Converts an object to a two-byte (UTF-16-encoded) string. * If conversion to a string fails (eg. due to an exception in the toString() * method of the object) then the length() method returns 0 and the * operator * returns NULL. @@ -2681,22 +2762,30 @@ class V8_EXPORT String : public Name { */ class V8_EXPORT Symbol : public Name { public: - // Returns the print name string of the symbol, or undefined if none. + /** + * Returns the print name string of the symbol, or undefined if none. + */ Local Name() const; - // Create a symbol. If name is not empty, it will be used as the description. + /** + * Create a symbol. If name is not empty, it will be used as the description. + */ static Local New(Isolate* isolate, Local name = Local()); - // Access global symbol registry. - // Note that symbols created this way are never collected, so - // they should only be used for statically fixed properties. - // Also, there is only one global name space for the names used as keys. - // To minimize the potential for clashes, use qualified names as keys. + /** + * Access global symbol registry. + * Note that symbols created this way are never collected, so + * they should only be used for statically fixed properties. + * Also, there is only one global name space for the names used as keys. + * To minimize the potential for clashes, use qualified names as keys. + */ static Local For(Isolate *isolate, Local name); - // Retrieve a global symbol. Similar to |For|, but using a separate - // registry that is not accessible by (and cannot clash with) JavaScript code. + /** + * Retrieve a global symbol. Similar to |For|, but using a separate + * registry that is not accessible by (and cannot clash with) JavaScript code. + */ static Local ForApi(Isolate *isolate, Local name); // Well-known symbols @@ -2721,20 +2810,26 @@ class V8_EXPORT Symbol : public Name { */ class V8_EXPORT Private : public Data { public: - // Returns the print name string of the private symbol, or undefined if none. + /** + * Returns the print name string of the private symbol, or undefined if none. + */ Local Name() const; - // Create a private symbol. If name is not empty, it will be the description. + /** + * Create a private symbol. If name is not empty, it will be the description. + */ static Local New(Isolate* isolate, Local name = Local()); - // Retrieve a global private symbol. If a symbol with this name has not - // been retrieved in the same isolate before, it is created. - // Note that private symbols created this way are never collected, so - // they should only be used for statically fixed properties. - // Also, there is only one global name space for the names used as keys. - // To minimize the potential for clashes, use qualified names as keys, - // e.g., "Class#property". + /** + * Retrieve a global private symbol. If a symbol with this name has not + * been retrieved in the same isolate before, it is created. + * Note that private symbols created this way are never collected, so + * they should only be used for statically fixed properties. + * Also, there is only one global name space for the names used as keys. + * To minimize the potential for clashes, use qualified names as keys, + * e.g., "Class#property". + */ static Local ForApi(Isolate* isolate, Local name); private: @@ -3000,15 +3095,16 @@ class V8_EXPORT Object : public Value { Local key); V8_DEPRECATE_SOON("Use maybe version", bool Delete(Local key)); - // TODO(dcarney): mark V8_WARN_UNUSED_RESULT - Maybe Delete(Local context, Local key); + V8_WARN_UNUSED_RESULT Maybe Delete(Local context, + Local key); V8_DEPRECATED("Use maybe version", bool Has(uint32_t index)); - V8_WARN_UNUSED_RESULT Maybe Has(Local context, uint32_t index); + V8_WARN_UNUSED_RESULT Maybe Has(Local context, + uint32_t index); V8_DEPRECATED("Use maybe version", bool Delete(uint32_t index)); - // TODO(dcarney): mark V8_WARN_UNUSED_RESULT - Maybe Delete(Local context, uint32_t index); + V8_WARN_UNUSED_RESULT Maybe Delete(Local context, + uint32_t index); V8_DEPRECATED("Use maybe version", bool SetAccessor(Local name, @@ -3024,8 +3120,8 @@ class V8_EXPORT Object : public Value { Local data = Local(), AccessControl settings = DEFAULT, PropertyAttribute attribute = None)); - // TODO(dcarney): mark V8_WARN_UNUSED_RESULT - Maybe SetAccessor(Local context, Local name, + V8_WARN_UNUSED_RESULT Maybe SetAccessor(Local context, + Local name, AccessorNameGetterCallback getter, AccessorNameSetterCallback setter = 0, MaybeLocal data = MaybeLocal(), @@ -3779,12 +3875,12 @@ class V8_EXPORT Promise : public Object { * Ignored if the promise is no longer pending. */ V8_DEPRECATE_SOON("Use maybe version", void Resolve(Local value)); - // TODO(dcarney): mark V8_WARN_UNUSED_RESULT - Maybe Resolve(Local context, Local value); + V8_WARN_UNUSED_RESULT Maybe Resolve(Local context, + Local value); V8_DEPRECATE_SOON("Use maybe version", void Reject(Local value)); - // TODO(dcarney): mark V8_WARN_UNUSED_RESULT - Maybe Reject(Local context, Local value); + V8_WARN_UNUSED_RESULT Maybe Reject(Local context, + Local value); V8_INLINE static Resolver* Cast(Value* obj); @@ -3933,11 +4029,46 @@ class V8_EXPORT Proxy : public Object { static void CheckCast(Value* obj); }; +// TODO(mtrofin): rename WasmCompiledModule to WasmModuleObject, for +// consistency with internal APIs. class V8_EXPORT WasmCompiledModule : public Object { public: typedef std::pair, size_t> SerializedModule; // A buffer that is owned by the caller. typedef std::pair CallerOwnedBuffer; + + // An opaque, native heap object for transferring wasm modules. It + // supports move semantics, and does not support copy semantics. + class TransferrableModule final { + public: + TransferrableModule(TransferrableModule&& src) + : compiled_code(std::move(src.compiled_code)), + wire_bytes(std::move(src.wire_bytes)) {} + TransferrableModule(const TransferrableModule& src) = delete; + + TransferrableModule& operator=(TransferrableModule&& src); + TransferrableModule& operator=(const TransferrableModule& src) = delete; + + private: + typedef std::pair, size_t> OwnedBuffer; + friend class WasmCompiledModule; + TransferrableModule(OwnedBuffer&& code, OwnedBuffer&& bytes) + : compiled_code(std::move(code)), wire_bytes(std::move(bytes)) {} + + OwnedBuffer compiled_code = {nullptr, 0}; + OwnedBuffer wire_bytes = {nullptr, 0}; + }; + + // Get an in-memory, non-persistable, and context-independent (meaning, + // suitable for transfer to another Isolate and Context) representation + // of this wasm compiled module. + TransferrableModule GetTransferrableModule(); + + // Efficiently re-create a WasmCompiledModule, without recompiling, from + // a TransferrableModule. + static MaybeLocal FromTransferrableModule( + Isolate* isolate, const TransferrableModule&); + // Get the wasm-encoded bytes that were used to compile this module. Local GetWasmWireBytes(); @@ -3953,16 +4084,51 @@ class V8_EXPORT WasmCompiledModule : public Object { V8_INLINE static WasmCompiledModule* Cast(Value* obj); private: + // TODO(ahaas): please remove the friend once streamed compilation is + // implemented + friend class WasmModuleObjectBuilder; + static MaybeLocal Deserialize( Isolate* isolate, const CallerOwnedBuffer& serialized_module, const CallerOwnedBuffer& wire_bytes); static MaybeLocal Compile(Isolate* isolate, const uint8_t* start, size_t length); + static CallerOwnedBuffer AsCallerOwned( + const TransferrableModule::OwnedBuffer& buff) { + return {buff.first.get(), buff.second}; + } + WasmCompiledModule(); static void CheckCast(Value* obj); }; +class V8_EXPORT WasmModuleObjectBuilder final { + public: + WasmModuleObjectBuilder(Isolate* isolate) : isolate_(isolate) {} + // The buffer passed into OnBytesReceived is owned by the caller. + void OnBytesReceived(const uint8_t*, size_t size); + MaybeLocal Finish(); + + private: + Isolate* isolate_ = nullptr; + // TODO(ahaas): We probably need none of this below here once streamed + // compilation is implemented. + typedef std::pair, size_t> Buffer; + + // Disable copy semantics *in this implementation*. We can choose to + // relax this, albeit it's not clear why. + WasmModuleObjectBuilder(const WasmModuleObjectBuilder&) = delete; + WasmModuleObjectBuilder(WasmModuleObjectBuilder&& src) + : received_buffers_(std::move(src.received_buffers_)), + total_size_(src.total_size_) {} + WasmModuleObjectBuilder& operator=(const WasmModuleObjectBuilder&) = delete; + WasmModuleObjectBuilder& operator=(WasmModuleObjectBuilder&&); + + std::vector received_buffers_; + size_t total_size_ = 0; +}; + #ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT // The number of required internal fields can be defined by embedder. #define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2 @@ -4025,7 +4191,8 @@ class V8_EXPORT ArrayBuffer : public Object { /** * malloc/free based convenience allocator. * - * Caller takes ownership. + * Caller takes ownership, i.e. the returned object needs to be freed using + * |delete allocator| once it is no longer in use. */ static Allocator* NewDefaultAllocator(); }; @@ -4069,8 +4236,11 @@ class V8_EXPORT ArrayBuffer : public Object { /** * Create a new ArrayBuffer over an existing memory block. * The created array buffer is by default immediately in externalized state. - * The memory block will not be reclaimed when a created ArrayBuffer - * is garbage-collected. + * In externalized state, the memory block will not be reclaimed when a + * created ArrayBuffer is garbage-collected. + * In internalized state, the memory block will be released using + * |Allocator::Free| once all ArrayBuffers referencing it are collected by + * the garbage collector. */ static Local New( Isolate* isolate, void* data, size_t byte_length, @@ -4121,6 +4291,7 @@ class V8_EXPORT ArrayBuffer : public Object { V8_INLINE static ArrayBuffer* Cast(Value* obj); static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; + static const int kEmbedderFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; private: ArrayBuffer(); @@ -4174,6 +4345,8 @@ class V8_EXPORT ArrayBufferView : public Object { static const int kInternalFieldCount = V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT; + static const int kEmbedderFieldCount = + V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT; private: ArrayBufferView(); @@ -4583,11 +4756,12 @@ class V8_EXPORT RegExp : public Object { */ enum Flags { kNone = 0, - kGlobal = 1, - kIgnoreCase = 2, - kMultiline = 4, - kSticky = 8, - kUnicode = 16 + kGlobal = 1 << 0, + kIgnoreCase = 1 << 1, + kMultiline = 1 << 2, + kSticky = 1 << 3, + kUnicode = 1 << 4, + kDotAll = 1 << 5, }; /** @@ -4642,7 +4816,8 @@ class V8_EXPORT External : public Value { F(ArrayProto_entries, array_entries_iterator) \ F(ArrayProto_forEach, array_for_each_iterator) \ F(ArrayProto_keys, array_keys_iterator) \ - F(ArrayProto_values, array_values_iterator) + F(ArrayProto_values, array_values_iterator) \ + F(IteratorPrototype, initial_iterator_prototype) enum Intrinsic { #define V8_DECL_INTRINSIC(name, iname) k##name, @@ -5980,19 +6155,7 @@ typedef void (*FailedAccessCheckCallback)(Local target, typedef bool (*AllowCodeGenerationFromStringsCallback)(Local context); // --- WASM compilation callbacks --- - -/** - * Callback to check if a buffer source may be compiled to WASM, given - * the compilation is attempted as a promise or not. - */ - -typedef bool (*AllowWasmCompileCallback)(Isolate* isolate, Local source, - bool as_promise); - -typedef bool (*AllowWasmInstantiateCallback)(Isolate* isolate, - Local module_or_bytes, - MaybeLocal ffi, - bool as_promise); +typedef bool (*ExtensionCallback)(const FunctionCallbackInfo&); // --- Garbage Collection Callbacks --- @@ -6058,6 +6221,12 @@ class V8_EXPORT HeapStatistics { size_t heap_size_limit() { return heap_size_limit_; } size_t malloced_memory() { return malloced_memory_; } size_t peak_malloced_memory() { return peak_malloced_memory_; } + + /** + * Returns a 0/1 boolean, which signifies whether the |--zap_code_space| + * option is enabled or not, which makes V8 overwrite heap garbage with a bit + * pattern. + */ size_t does_zap_garbage() { return does_zap_garbage_; } private: @@ -6306,7 +6475,7 @@ class V8_EXPORT EmbedderHeapTracer { * wrappers from them when called through |AdvanceTracing|. */ virtual void RegisterV8References( - const std::vector >& internal_fields) = 0; + const std::vector >& embedder_fields) = 0; /** * Called at the beginning of a GC cycle. @@ -6369,6 +6538,9 @@ struct SerializeInternalFieldsCallback { CallbackFunction callback; void* data; }; +// Note that these fields are called "internal fields" in the API and called +// "embedder fields" within V8. +typedef SerializeInternalFieldsCallback SerializeEmbedderFieldsCallback; /** * Callback and supporting data used to implement embedder logic to deserialize @@ -6384,6 +6556,7 @@ struct DeserializeInternalFieldsCallback { void* data); void* data; }; +typedef DeserializeInternalFieldsCallback DeserializeEmbedderFieldsCallback; /** * Isolate represents an isolated instance of the V8 engine. V8 isolates have @@ -6415,8 +6588,9 @@ class V8_EXPORT Isolate { * The optional entry_hook allows the host application to provide the * address of a function that's invoked on entry to every V8-generated * function. Note that entry_hook is invoked at the very start of each - * generated function. Furthermore, if an entry_hook is given, V8 will - * not use a snapshot, including custom snapshots. + * generated function. + * An entry_hook can only be provided in no-snapshot builds; in snapshot + * builds it must be nullptr. */ FunctionEntryHook entry_hook; @@ -6706,6 +6880,12 @@ class V8_EXPORT Isolate { */ void Dispose(); + /** + * Dumps activated low-level V8 internal stats. This can be used instead + * of performing a full isolate disposal. + */ + void DumpAndResetStats(); + /** * Discards all V8 thread-specific data for the Isolate. Should be used * if a thread is terminating and it has used an Isolate that will outlive @@ -7230,6 +7410,14 @@ class V8_EXPORT Isolate { void SetAllowCodeGenerationFromStringsCallback( AllowCodeGenerationFromStringsCallback callback); + /** + * Embedder over{ride|load} injection points for wasm APIs. + */ + void SetWasmModuleCallback(ExtensionCallback callback); + void SetWasmCompileCallback(ExtensionCallback callback); + void SetWasmInstanceCallback(ExtensionCallback callback); + void SetWasmInstantiateCallback(ExtensionCallback callback); + /** * Check if V8 is dead and therefore unusable. This is the case after * fatal errors such as out-of-memory situations. @@ -7685,6 +7873,35 @@ class V8_EXPORT V8 { */ static void ShutdownPlatform(); +#if V8_OS_LINUX && V8_TARGET_ARCH_X64 && !V8_OS_ANDROID + /** + * Give the V8 signal handler a chance to handle a fault. + * + * This function determines whether a memory access violation can be recovered + * by V8. If so, it will return true and modify context to return to a code + * fragment that can recover from the fault. Otherwise, TryHandleSignal will + * return false. + * + * The parameters to this function correspond to those passed to a Linux + * signal handler. + * + * \param signal_number The signal number. + * + * \param info A pointer to the siginfo_t structure provided to the signal + * handler. + * + * \param context The third argument passed to the Linux signal handler, which + * points to a ucontext_t structure. + */ + static bool TryHandleSignal(int signal_number, void* info, void* context); +#endif // V8_OS_LINUX + + /** + * Enable the default signal handler rather than using one provided by the + * embedder. + */ + static bool RegisterDefaultSignalHandler(); + private: V8(); @@ -7811,20 +8028,33 @@ class Maybe { V8_INLINE bool IsNothing() const { return !has_value_; } V8_INLINE bool IsJust() const { return has_value_; } - // Will crash if the Maybe<> is nothing. + /** + * An alias for |FromJust|. Will crash if the Maybe<> is nothing. + */ V8_INLINE T ToChecked() const { return FromJust(); } + /** + * Converts this Maybe<> to a value of type T. If this Maybe<> is + * nothing (empty), |false| is returned and |out| is left untouched. + */ V8_WARN_UNUSED_RESULT V8_INLINE bool To(T* out) const { if (V8_LIKELY(IsJust())) *out = value_; return IsJust(); } - // Will crash if the Maybe<> is nothing. + /** + * Converts this Maybe<> to a value of type T. If this Maybe<> is + * nothing (empty), V8 will crash the process. + */ V8_INLINE T FromJust() const { if (V8_UNLIKELY(!IsJust())) V8::FromJustIsNothing(); return value_; } + /** + * Converts this Maybe<> to a value of type T, using a default value if this + * Maybe<> is nothing (empty). + */ V8_INLINE T FromMaybe(const T& default_value) const { return has_value_ ? value_ : default_value; } @@ -8103,7 +8333,7 @@ class V8_EXPORT Context { * \param context_snapshot_index The index of the context snapshot to * deserialize from. Use v8::Context::New for the default snapshot. * - * \param internal_fields_deserializer Optional callback to deserialize + * \param embedder_fields_deserializer Optional callback to deserialize * internal fields. It should match the SerializeInternalFieldCallback used * to serialize. * @@ -8114,7 +8344,7 @@ class V8_EXPORT Context { static MaybeLocal FromSnapshot( Isolate* isolate, size_t context_snapshot_index, - DeserializeInternalFieldsCallback internal_fields_deserializer = + DeserializeInternalFieldsCallback embedder_fields_deserializer = DeserializeInternalFieldsCallback(), ExtensionConfiguration* extensions = nullptr, MaybeLocal global_object = MaybeLocal()); @@ -8695,11 +8925,11 @@ Local MaybeLocal::ToLocalChecked() { template void* WeakCallbackInfo::GetInternalField(int index) const { #ifdef V8_ENABLE_CHECKS - if (index < 0 || index >= kInternalFieldsInWeakCallback) { + if (index < 0 || index >= kEmbedderFieldsInWeakCallback) { V8::InternalFieldOutOfBounds(index); } #endif - return internal_fields_[index]; + return embedder_fields_[index]; } diff --git a/deps/v8/infra/config/cq.cfg b/deps/v8/infra/config/cq.cfg index 72381ee38801c8..e9bc8fdd3c2c9d 100644 --- a/deps/v8/infra/config/cq.cfg +++ b/deps/v8/infra/config/cq.cfg @@ -32,6 +32,10 @@ verifiers { buckets { name: "master.tryserver.v8" builders { name: "v8_android_arm_compile_rel" } + builders { + name: "v8_node_linux64_rel" + experiment_percentage: 100 + } builders { name: "v8_linux64_asan_rel_ng" } builders { name: "v8_linux64_asan_rel_ng_triggered" @@ -119,7 +123,7 @@ verifiers { } builders { name: "v8_linux64_sanitizer_coverage_rel" - experiment_percentage: 20 + experiment_percentage: 100 } } buckets { diff --git a/deps/v8/infra/mb/mb_config.pyl b/deps/v8/infra/mb/mb_config.pyl index 2a78d8627f52c0..0df30d457129f9 100644 --- a/deps/v8/infra/mb/mb_config.pyl +++ b/deps/v8/infra/mb/mb_config.pyl @@ -24,6 +24,18 @@ 'mips64el.debug': 'default_debug_mips64el', 'mips64el.optdebug': 'default_optdebug_mips64el', 'mips64el.release': 'default_release_mips64el', + 'ppc.debug': 'default_debug_ppc', + 'ppc.optdebug': 'default_optdebug_ppc', + 'ppc.release': 'default_release_ppc', + 'ppc64.debug': 'default_debug_ppc64', + 'ppc64.optdebug': 'default_optdebug_ppc64', + 'ppc64.release': 'default_release_ppc64', + 's390.debug': 'default_debug_s390', + 's390.optdebug': 'default_optdebug_s390', + 's390.release': 'default_release_s390', + 's390x.debug': 'default_debug_s390x', + 's390x.optdebug': 'default_optdebug_s390x', + 's390x.release': 'default_release_s390x', 'x64.debug': 'default_debug_x64', 'x64.optdebug': 'default_optdebug_x64', 'x64.release': 'default_release_x64', @@ -92,11 +104,11 @@ # original config also specified -O1, which we dropped because chromium # doesn't have it (anymore). 'V8 Linux64 - cfi': 'gyp_release_x64_cfi_symbolized', - 'V8 Linux - vtunejit': 'gyp_debug_x86_vtunejit', + 'V8 Linux - vtunejit': 'gn_debug_x86_vtunejit', 'V8 Linux64 - gcov coverage': 'gyp_release_x64_gcc_coverage', - 'V8 Linux - predictable': 'gyp_release_x86_predictable', + 'V8 Linux - predictable': 'gn_release_x86_predictable', 'V8 Linux - full debug': 'gyp_full_debug_x86', - 'V8 Linux - interpreted regexp': 'gyp_release_x86_interpreted_regexp', + 'V8 Linux - interpreted regexp': 'gn_release_x86_interpreted_regexp', 'V8 Random Deopt Fuzzer - debug': 'gyp_debug_x86', }, @@ -234,6 +246,34 @@ 'gn', 'debug', 'simulate_mips64el', 'v8_enable_slow_dchecks'], 'default_release_mips64el': [ 'gn', 'release', 'simulate_mips64el'], + 'default_debug_ppc': [ + 'gn', 'debug', 'simulate_ppc', 'v8_enable_slow_dchecks', + 'v8_full_debug'], + 'default_optdebug_ppc': [ + 'gn', 'debug', 'simulate_ppc', 'v8_enable_slow_dchecks'], + 'default_release_ppc': [ + 'gn', 'release', 'simulate_ppc'], + 'default_debug_ppc64': [ + 'gn', 'debug', 'simulate_ppc64', 'v8_enable_slow_dchecks', + 'v8_full_debug'], + 'default_optdebug_ppc64': [ + 'gn', 'debug', 'simulate_ppc64', 'v8_enable_slow_dchecks'], + 'default_release_ppc64': [ + 'gn', 'release', 'simulate_ppc64'], + 'default_debug_s390': [ + 'gn', 'debug', 'simulate_s390', 'v8_enable_slow_dchecks', + 'v8_full_debug'], + 'default_optdebug_s390': [ + 'gn', 'debug', 'simulate_s390', 'v8_enable_slow_dchecks'], + 'default_release_s390': [ + 'gn', 'release', 'simulate_s390'], + 'default_debug_s390x': [ + 'gn', 'debug', 'simulate_s390x', 'v8_enable_slow_dchecks', + 'v8_full_debug'], + 'default_optdebug_s390x': [ + 'gn', 'debug', 'simulate_s390x', 'v8_enable_slow_dchecks'], + 'default_release_s390x': [ + 'gn', 'release', 'simulate_s390x'], 'default_debug_x64': [ 'gn', 'debug', 'x64', 'v8_enable_slow_dchecks', 'v8_full_debug'], 'default_optdebug_x64': [ @@ -350,14 +390,15 @@ 'gn_debug_x86_minimal_symbols': [ 'gn', 'debug_bot', 'x86', 'minimal_symbols', 'swarming'], 'gn_debug_x86_no_i18n': [ - 'gn', 'debug_bot', 'x86', 'swarming', 'v8_disable_inspector', - 'v8_no_i18n'], + 'gn', 'debug_bot', 'x86', 'swarming', 'v8_no_i18n'], 'gn_debug_x86_no_snap': [ 'gn', 'debug_bot', 'x86', 'swarming', 'v8_snapshot_none'], 'gn_debug_x86_no_snap_trybot': [ 'gn', 'debug_trybot', 'x86', 'swarming', 'v8_snapshot_none'], 'gn_debug_x86_trybot': [ 'gn', 'debug_trybot', 'x86', 'swarming'], + 'gn_debug_x86_vtunejit': [ + 'gn', 'debug_bot', 'x86', 'v8_enable_vtunejit'], # GN release configs for x86. 'gn_release_x86': [ @@ -370,11 +411,12 @@ 'gn', 'release_bot', 'x86', 'gcmole', 'swarming'], 'gn_release_x86_gcmole_trybot': [ 'gn', 'release_trybot', 'x86', 'gcmole', 'swarming'], + 'gn_release_x86_interpreted_regexp': [ + 'gn', 'release_bot', 'x86', 'v8_interpreted_regexp'], 'gn_release_x86_minimal_symbols': [ 'gn', 'release_bot', 'x86', 'minimal_symbols', 'swarming'], 'gn_release_x86_no_i18n_trybot': [ - 'gn', 'release_trybot', 'x86', 'swarming', 'v8_disable_inspector', - 'v8_no_i18n'], + 'gn', 'release_trybot', 'x86', 'swarming', 'v8_no_i18n'], 'gn_release_x86_no_snap': [ 'gn', 'release_bot', 'x86', 'swarming', 'v8_snapshot_none'], 'gn_release_x86_no_snap_shared_minimal_symbols': [ @@ -382,6 +424,8 @@ 'v8_snapshot_none'], 'gn_release_x86_no_snap_trybot': [ 'gn', 'release_trybot', 'x86', 'swarming', 'v8_snapshot_none'], + 'gn_release_x86_predictable': [ + 'gn', 'release_bot', 'x86', 'v8_enable_verify_predictable'], 'gn_release_x86_shared_verify_heap': [ 'gn', 'release', 'x86', 'goma', 'shared', 'swarming', 'v8_verify_heap'], 'gn_release_x86_trybot': [ @@ -397,8 +441,6 @@ # Gyp debug configs for x86. 'gyp_debug_x86': [ 'gyp', 'debug_bot', 'x86', 'swarming'], - 'gyp_debug_x86_vtunejit': [ - 'gyp', 'debug_bot', 'x86', 'v8_enable_vtunejit'], 'gyp_full_debug_x86': [ 'gyp', 'debug', 'x86', 'goma', 'static', 'v8_enable_slow_dchecks', 'v8_full_debug'], @@ -432,10 +474,6 @@ # Gyp release configs for x86. 'gyp_release_x86_disassembler': [ 'gyp', 'release_bot', 'x86', 'v8_enable_disassembler'], - 'gyp_release_x86_interpreted_regexp': [ - 'gyp', 'release_bot', 'x86', 'v8_interpreted_regexp'], - 'gyp_release_x86_predictable': [ - 'gyp', 'release_bot', 'x86', 'v8_enable_verify_predictable'], }, 'mixins': { @@ -661,11 +699,6 @@ 'gn_args': 'v8_correctness_fuzzer=true v8_multi_arch_build=true', }, - 'v8_disable_inspector': { - 'gn_args': 'v8_enable_inspector=false', - 'gyp_defines': 'v8_enable_inspector=0 ', - }, - 'v8_enable_disassembler': { 'gn_args': 'v8_enable_disassembler=true', 'gyp_defines': 'v8_enable_disassembler=1', diff --git a/deps/v8/src/DEPS b/deps/v8/src/DEPS index e9026b130d6bf3..bfeca932415299 100644 --- a/deps/v8/src/DEPS +++ b/deps/v8/src/DEPS @@ -18,6 +18,9 @@ include_rules = [ "+src/interpreter/bytecode-register.h", "+src/interpreter/bytecodes.h", "+src/interpreter/interpreter.h", + "+src/interpreter/setup-interpreter.h", + "-src/trap-handler", + "+src/trap-handler/trap-handler.h", "+testing/gtest/include/gtest/gtest_prod.h", "-src/libplatform", "-include/libplatform" diff --git a/deps/v8/src/OWNERS b/deps/v8/src/OWNERS index 94b7fbb32e7b9a..3a05c3a95b5b64 100644 --- a/deps/v8/src/OWNERS +++ b/deps/v8/src/OWNERS @@ -1,4 +1,5 @@ per-file i18n.*=cira@chromium.org per-file i18n.*=mnita@google.com +per-file i18n.*=jshin@chromium.org per-file typing-asm.*=aseemgarg@chromium.org per-file typing-asm.*=bradnelson@chromium.org diff --git a/deps/v8/src/api-natives.cc b/deps/v8/src/api-natives.cc index 045ff470ab232e..0957c47823decd 100644 --- a/deps/v8/src/api-natives.cc +++ b/deps/v8/src/api-natives.cc @@ -36,7 +36,8 @@ class InvokeScope { MaybeHandle InstantiateObject(Isolate* isolate, Handle data, Handle new_target, - bool is_hidden_prototype); + bool is_hidden_prototype, + bool is_prototype); MaybeHandle InstantiateFunction(Isolate* isolate, Handle data, @@ -49,7 +50,7 @@ MaybeHandle Instantiate(Isolate* isolate, Handle data, Handle::cast(data), name); } else if (data->IsObjectTemplateInfo()) { return InstantiateObject(isolate, Handle::cast(data), - Handle(), false); + Handle(), false, false); } else { return data; } @@ -338,7 +339,8 @@ bool IsSimpleInstantiation(Isolate* isolate, ObjectTemplateInfo* info, MaybeHandle InstantiateObject(Isolate* isolate, Handle info, Handle new_target, - bool is_hidden_prototype) { + bool is_hidden_prototype, + bool is_prototype) { Handle constructor; int serial_number = Smi::cast(info->serial_number())->value(); if (!new_target.is_null()) { @@ -379,19 +381,26 @@ MaybeHandle InstantiateObject(Isolate* isolate, Handle object; ASSIGN_RETURN_ON_EXCEPTION(isolate, object, JSObject::New(constructor, new_target), JSObject); + + if (is_prototype) JSObject::OptimizeAsPrototype(object, FAST_PROTOTYPE); + ASSIGN_RETURN_ON_EXCEPTION( isolate, result, ConfigureInstance(isolate, object, info, is_hidden_prototype), JSObject); if (info->immutable_proto()) { JSObject::SetImmutableProto(object); } - // TODO(dcarney): is this necessary? - JSObject::MigrateSlowToFast(result, 0, "ApiNatives::InstantiateObject"); - - if (serial_number) { - CacheTemplateInstantiation(isolate, serial_number, result); - result = isolate->factory()->CopyJSObject(result); + if (!is_prototype) { + // Keep prototypes in slow-mode. Let them be lazily turned fast later on. + // TODO(dcarney): is this necessary? + JSObject::MigrateSlowToFast(result, 0, "ApiNatives::InstantiateObject"); + // Don't cache prototypes. + if (serial_number) { + CacheTemplateInstantiation(isolate, serial_number, result); + result = isolate->factory()->CopyJSObject(result); + } } + return result; } @@ -446,7 +455,7 @@ MaybeHandle InstantiateFunction(Isolate* isolate, InstantiateObject( isolate, handle(ObjectTemplateInfo::cast(prototype_templ), isolate), - Handle(), data->hidden_prototype()), + Handle(), data->hidden_prototype(), true), JSFunction); } Object* parent = data->parent_template(); @@ -514,7 +523,8 @@ MaybeHandle ApiNatives::InstantiateObject( Handle data, Handle new_target) { Isolate* isolate = data->GetIsolate(); InvokeScope invoke_scope(isolate); - return ::v8::internal::InstantiateObject(isolate, data, new_target, false); + return ::v8::internal::InstantiateObject(isolate, data, new_target, false, + false); } MaybeHandle ApiNatives::InstantiateRemoteObject( @@ -524,22 +534,14 @@ MaybeHandle ApiNatives::InstantiateRemoteObject( Handle constructor( FunctionTemplateInfo::cast(data->constructor())); - Handle shared = - FunctionTemplateInfo::GetOrCreateSharedFunctionInfo(isolate, constructor); - Handle initial_map = isolate->factory()->CreateSloppyFunctionMap( - FUNCTION_WITH_WRITEABLE_PROTOTYPE); - Handle object_function = - isolate->factory()->NewFunctionFromSharedFunctionInfo( - initial_map, shared, isolate->factory()->undefined_value()); Handle object_map = isolate->factory()->NewMap( JS_SPECIAL_API_OBJECT_TYPE, - JSObject::kHeaderSize + data->internal_field_count() * kPointerSize, + JSObject::kHeaderSize + data->embedder_field_count() * kPointerSize, FAST_HOLEY_SMI_ELEMENTS); - JSFunction::SetInitialMap(object_function, object_map, - isolate->factory()->null_value()); + object_map->SetConstructor(*constructor); object_map->set_is_access_check_needed(true); - Handle object = isolate->factory()->NewJSObject(object_function); + Handle object = isolate->factory()->NewJSObjectFromMap(object_map); JSObject::ForceSetPrototype(object, isolate->factory()->null_value()); return object; @@ -629,18 +631,18 @@ Handle ApiNatives::CreateApiFunction( DONT_ENUM); } - int internal_field_count = 0; + int embedder_field_count = 0; bool immutable_proto = false; if (!obj->instance_template()->IsUndefined(isolate)) { Handle instance_template = Handle( ObjectTemplateInfo::cast(obj->instance_template())); - internal_field_count = instance_template->internal_field_count(); + embedder_field_count = instance_template->embedder_field_count(); immutable_proto = instance_template->immutable_proto(); } // TODO(svenpanne) Kill ApiInstanceType and refactor things by generalizing // JSObject::GetHeaderSize. - int instance_size = kPointerSize * internal_field_count; + int instance_size = kPointerSize * embedder_field_count; InstanceType type; switch (instance_type) { case JavaScriptObjectType: diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index 2610dc17104822..0e77faff7ee141 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -29,7 +29,6 @@ #include "src/code-stubs.h" #include "src/compiler-dispatcher/compiler-dispatcher.h" #include "src/compiler.h" -#include "src/context-measure.h" #include "src/contexts.h" #include "src/conversions-inl.h" #include "src/counters.h" @@ -67,6 +66,7 @@ #include "src/snapshot/snapshot.h" #include "src/startup-data-util.h" #include "src/tracing/trace-event.h" +#include "src/trap-handler/trap-handler.h" #include "src/unicode-inl.h" #include "src/v8.h" #include "src/v8threads.h" @@ -510,7 +510,7 @@ struct SnapshotCreatorData { Persistent default_context_; PersistentValueVector contexts_; PersistentValueVector