diff --git a/common.gypi b/common.gypi index 223043e55194c3..c08ddaee73cc1a 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.18', + 'v8_embedder_string': '-node.13', ##### V8 defaults for Node.js ##### @@ -70,6 +70,11 @@ # https://github.com/nodejs/node/pull/22920/files#r222779926 'v8_enable_fast_mksnapshot': 0, + 'v8_win64_unwinding_info': 1, + + # TODO(refack): make v8-perfetto happen + 'v8_use_perfetto': 0, + ##### end V8 defaults ##### 'conditions': [ @@ -81,23 +86,23 @@ }], ['GENERATOR=="ninja"', { 'obj_dir': '<(PRODUCT_DIR)/obj', - 'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_base.a', + 'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_snapshot.a', }, { 'obj_dir%': '<(PRODUCT_DIR)/obj.target', - 'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_base.a', + 'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_snapshot.a', }], ['OS == "win"', { 'os_posix': 0, 'v8_postmortem_support%': 0, 'obj_dir': '<(PRODUCT_DIR)/obj', - 'v8_base': '<(PRODUCT_DIR)/lib/v8_libbase.lib', + 'v8_base': '<(PRODUCT_DIR)/lib/libv8_snapshot.a', }, { 'os_posix': 1, 'v8_postmortem_support%': 1, }], ['OS == "mac"', { 'obj_dir%': '<(PRODUCT_DIR)/obj.target', - 'v8_base': '<(PRODUCT_DIR)/libv8_base.a', + 'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a', }], ['openssl_fips != ""', { 'openssl_product': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)', @@ -225,39 +230,29 @@ 'msvs_settings': { 'VCCLCompilerTool': { 'BufferSecurityCheck': 'true', - 'DebugInformationFormat': 1, # /Z7 embed info in .obj files - 'ExceptionHandling': 0, # /EHsc + 'DebugInformationFormat': 1, # /Z7 embed info in .obj files + 'ExceptionHandling': 0, # /EHsc 'MultiProcessorCompilation': 'true', - 'StringPooling': 'true', # pool string literals + 'StringPooling': 'true', # pool string literals 'SuppressStartupBanner': 'true', 'WarnAsError': 'false', - 'WarningLevel': 3, # /W3 + 'WarningLevel': 3, # /W3 }, 'VCLinkerTool': { + 'target_conditions': [ + ['_type=="executable"', { + 'SubSystem': 1, # /SUBSYSTEM:CONSOLE + }], + ], 'conditions': [ ['target_arch=="ia32"', { - 'TargetMachine' : 1, # /MACHINE:X86 - 'target_conditions': [ - ['_type=="executable"', { - 'AdditionalOptions': [ '/SubSystem:Console,"5.01"' ], - }], - ], + 'TargetMachine' : 1, # /MACHINE:X86 }], ['target_arch=="x64"', { - 'TargetMachine' : 17, # /MACHINE:AMD64 - 'target_conditions': [ - ['_type=="executable"', { - 'AdditionalOptions': [ '/SubSystem:Console,"5.02"' ], - }], - ], + 'TargetMachine' : 17, # /MACHINE:X64 }], ['target_arch=="arm64"', { - 'TargetMachine' : 0, # /MACHINE:ARM64 is inferred from the input files. - 'target_conditions': [ - ['_type=="executable"', { - 'AdditionalOptions': [ '/SubSystem:Console' ], - }], - ], + 'TargetMachine' : 0, # NotSet. MACHINE:ARM64 is inferred from the input files. }], ], 'GenerateDebugInformation': 'true', diff --git a/configure.py b/configure.py index 15ea5687cf1cd8..38ff742e3a76ef 100755 --- a/configure.py +++ b/configure.py @@ -615,6 +615,13 @@ def b(value): else: return 'false' +def B(value): + """Returns 1 if value is truthy, 0 otherwise.""" + if value: + return 1 + else: + return 0 + def pkg_config(pkg): """Run pkg-config on the specified package @@ -1594,6 +1601,7 @@ def make_bin_override(): # move everything else to target_defaults variables = output['variables'] del output['variables'] +variables['is_debug'] = B(options.debug) # make_global_settings for special FIPS linking # should not be used to compile modules in node-gyp diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index a32b13c66993e6..5182ae52014ac8 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -140,6 +140,7 @@ Peter Rybin Peter Varga Peter Wong Paul Lind +Pavel Medvedev PhistucK Qingyan Li Qiuyi Zhang @@ -158,6 +159,7 @@ Sander Mathijs van Veen Sandro Santilli Sanjoy Das Seo Sanghyeon +Shawn Anastasio Stefan Penner Sylvestre Ledru Taketoshi Aono diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 7a50b192f0a9eb..10fee264203ae0 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -88,9 +88,18 @@ declare_args() { # Enable embedded builtins. v8_enable_embedded_builtins = true + # Enable the registration of unwinding info for Windows/x64. + v8_win64_unwinding_info = false + # Enable code comments for builtins in the snapshot (impacts performance). v8_enable_snapshot_code_comments = false + # Enable native counters from the snapshot (impacts performance, sets + # -dV8_SNAPSHOT_NATIVE_CODE_COUNTERS). + # This option will generate extra code in the snapshot to increment counters, + # as per the --native-code-counters flag. + v8_enable_snapshot_native_code_counters = "" + # Enable code-generation-time checking of types in the CodeStubAssembler. v8_enable_verify_csa = false @@ -127,6 +136,10 @@ declare_args() { # Use Siphash as added protection against hash flooding attacks. v8_use_siphash = false + # Use Perfetto (https://perfetto.dev) as the default TracingController. Not + # currently implemented. + v8_use_perfetto = false + # Switches off inlining in V8. v8_no_inline = false @@ -171,6 +184,9 @@ declare_args() { # setting the "check_v8_header_includes" gclient variable to run a # specific hook). v8_check_header_includes = false + + # Enable sharing read-only space across isolates. + v8_enable_shared_ro_heap = false } # We reuse the snapshot toolchain for building torque and other generators to @@ -205,6 +221,9 @@ if (v8_check_microtasks_scopes_consistency == "") { v8_check_microtasks_scopes_consistency = v8_enable_debugging_features || dcheck_always_on } +if (v8_enable_snapshot_native_code_counters == "") { + v8_enable_snapshot_native_code_counters = v8_enable_debugging_features +} assert(v8_current_cpu != "x86" || !v8_untrusted_code_mitigations, "Untrusted code mitigations are unsupported on ia32") @@ -214,6 +233,9 @@ assert(!v8_enable_lite_mode || v8_enable_embedded_builtins, assert(!v8_enable_lite_mode || v8_use_snapshot, "Lite mode requires a snapshot build") +assert(v8_use_snapshot || !v8_enable_shared_ro_heap, + "Nosnapshot builds are not supported with shared read-only heap enabled") + v8_random_seed = "314159265" v8_toolset_for_shell = "host" @@ -336,6 +358,9 @@ config("features") { } defines += [ "V8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=${v8_typed_array_max_size_in_heap}" ] + if (v8_enable_raw_heap_snapshots) { + defines += [ "V8_ENABLE_RAW_HEAP_SNAPSHOTS" ] + } if (v8_enable_future) { defines += [ "V8_ENABLE_FUTURE" ] } @@ -385,6 +410,9 @@ config("features") { } if (v8_use_snapshot) { defines += [ "V8_USE_SNAPSHOT" ] + if (v8_enable_snapshot_native_code_counters) { + defines += [ "V8_SNAPSHOT_NATIVE_CODE_COUNTERS" ] + } } if (v8_use_external_startup_data) { defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] @@ -404,6 +432,15 @@ config("features") { if (v8_use_siphash) { defines += [ "V8_USE_SIPHASH" ] } + if (v8_enable_shared_ro_heap) { + defines += [ "V8_SHARED_RO_HEAP" ] + } + if (v8_use_perfetto) { + defines += [ "V8_USE_PERFETTO" ] + } + if (v8_win64_unwinding_info) { + defines += [ "V8_WIN64_UNWINDING_INFO" ] + } } config("toolchain") { @@ -608,15 +645,7 @@ config("toolchain") { } if (is_clang) { - cflags += [ - "-Wmissing-field-initializers", - - # TODO(thakis): Remove once enabled globally, https://crbug.com/926235 - "-Wextra-semi", - - # TODO(hans): Remove once http://crbug.com/428099 is resolved. - "-Winconsistent-missing-override", - ] + cflags += [ "-Wmissing-field-initializers" ] if (v8_current_cpu != "mips" && v8_current_cpu != "mipsel") { # We exclude MIPS because the IsMipsArchVariant macro causes trouble. @@ -670,29 +699,17 @@ config("toolchain") { } } -config("default_optimization") { - if (is_debug && !v8_optimized_debug) { - configs = [ "//build/config/compiler:no_optimize" ] - } else { - # TODO(crbug.com/621335) Rework this so that we don't have the confusion - # between "optimize_speed" and "optimize_max". - if (((is_posix && !is_android) || is_fuchsia) && !using_sanitizer) { - configs = [ "//build/config/compiler:optimize_speed" ] - } else { - configs = [ "//build/config/compiler:optimize_max" ] - } - } -} - -# For code that is only run a few times during the build, C++ optimizations -# are a waste of time. -config("unoptimized_initializer") { +# For code that is hot during mksnapshot. In fast-mksnapshot builds, we +# optimize some files even in debug builds to speed up mksnapshot times. +config("always_optimize") { configs = [ ":internal_config" ] - if (using_sanitizer) { - # Some sanitizers rely on optimizations. - configs += [ ":default_optimization" ] + + # TODO(crbug.com/621335) Rework this so that we don't have the confusion + # between "optimize_speed" and "optimize_max". + if (((is_posix && !is_android) || is_fuchsia) && !using_sanitizer) { + configs += [ "//build/config/compiler:optimize_speed" ] } else { - configs += [ "//build/config/compiler:no_optimize" ] + configs += [ "//build/config/compiler:optimize_max" ] } } @@ -913,6 +930,7 @@ torque_files = [ "src/builtins/array-reduce.tq", "src/builtins/array-reduce-right.tq", "src/builtins/array-reverse.tq", + "src/builtins/array-shift.tq", "src/builtins/array-slice.tq", "src/builtins/array-some.tq", "src/builtins/array-splice.tq", @@ -920,17 +938,29 @@ torque_files = [ "src/builtins/collections.tq", "src/builtins/data-view.tq", "src/builtins/extras-utils.tq", - "src/builtins/object-fromentries.tq", "src/builtins/iterator.tq", + "src/builtins/object-fromentries.tq", + "src/builtins/proxy.tq", + "src/builtins/proxy-constructor.tq", + "src/builtins/proxy-revocable.tq", + "src/builtins/proxy-revoke.tq", + "src/builtins/regexp.tq", + "src/builtins/regexp-replace.tq", "src/builtins/string-endswith.tq", + "src/builtins/string-html.tq", + "src/builtins/string-repeat.tq", "src/builtins/string-startswith.tq", "src/builtins/typed-array.tq", "src/builtins/typed-array-createtypedarray.tq", + "src/builtins/typed-array-every.tq", "src/builtins/typed-array-filter.tq", + "src/builtins/typed-array-find.tq", + "src/builtins/typed-array-findindex.tq", "src/builtins/typed-array-foreach.tq", "src/builtins/typed-array-reduce.tq", "src/builtins/typed-array-reduceright.tq", "src/builtins/typed-array-slice.tq", + "src/builtins/typed-array-some.tq", "src/builtins/typed-array-subarray.tq", "test/torque/test-torque.tq", "third_party/v8/builtins/array-sort.tq", @@ -948,6 +978,7 @@ torque_namespaces = [ "array-map", "array-of", "array-reverse", + "array-shift", "array-slice", "array-splice", "array-unshift", @@ -959,15 +990,24 @@ torque_namespaces = [ "growable-fixed-array", "iterator", "object", + "proxy", + "regexp", + "regexp-replace", "string", + "string-html", + "string-repeat", "test", "typed-array", "typed-array-createtypedarray", + "typed-array-every", "typed-array-filter", + "typed-array-find", + "typed-array-findindex", "typed-array-foreach", "typed-array-reduce", "typed-array-reduceright", "typed-array-slice", + "typed-array-some", "typed-array-subarray", ] @@ -989,6 +1029,7 @@ action("run_torque") { outputs = [ "$target_gen_dir/torque-generated/builtin-definitions-from-dsl.h", "$target_gen_dir/torque-generated/class-definitions-from-dsl.h", + "$target_gen_dir/torque-generated/objects-printer-from-dsl.cc", ] foreach(namespace, torque_namespaces) { outputs += [ @@ -1010,6 +1051,14 @@ action("run_torque") { } } +group("v8_maybe_icu") { + if (v8_enable_i18n_support) { + public_deps = [ + "//third_party/icu", + ] + } +} + v8_source_set("torque_generated_initializers") { visibility = [ ":*" ] # Only targets in this file can depend on this. @@ -1018,11 +1067,9 @@ v8_source_set("torque_generated_initializers") { ":run_torque", ] - if (v8_enable_i18n_support) { - public_deps = [ - "//third_party/icu", - ] - } + public_deps = [ + ":v8_maybe_icu", + ] sources = [] foreach(namespace, torque_namespaces) { @@ -1032,8 +1079,26 @@ v8_source_set("torque_generated_initializers") { ] } - remove_configs = [ v8_path_prefix + ":default_optimization" ] - configs = [ ":unoptimized_initializer" ] + configs = [ ":internal_config" ] +} + +v8_source_set("torque_generated_definitions") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + deps = [ + ":generate_bytecode_builtins_list", + ":run_torque", + ] + + public_deps = [ + ":v8_maybe_icu", + ] + + sources = [ + "$target_gen_dir/torque-generated/objects-printer-from-dsl.cc", + ] + + configs = [ ":internal_config" ] } action("generate_bytecode_builtins_list") { @@ -1092,10 +1157,20 @@ template("run_mksnapshot") { "root_out_dir") + "/mksnapshot", root_build_dir), "--turbo_instruction_scheduling", + + # In cross builds, the snapshot may be generated for both the host and + # target toolchains. The same host binary is used to generate both, so + # mksnapshot needs to know which target OS to use at runtime. It's weird, + # but the target OS is really |current_os|. + "--target_os=$current_os", ] args += invoker.args + if (v8_win64_unwinding_info) { + args += [ "--win64-unwinding-info" ] + } + if (v8_enable_embedded_builtins) { outputs += [ "$target_gen_dir/embedded${suffix}.S" ] args += [ @@ -1148,6 +1223,14 @@ template("run_mksnapshot") { args += [ "--code-comments" ] } + if (v8_enable_snapshot_native_code_counters) { + args += [ "--native-code-counters" ] + } else { + # --native-code-counters is the default in debug mode so make sure we can + # unset it. + args += [ "--no-native-code-counters" ] + } + if (v8_enable_fast_mksnapshot) { args += [ "--no-turbo-rewrite-far-jumps", @@ -1257,7 +1340,11 @@ v8_source_set("v8_nosnapshot") { deps = [ ":js2c_extras", - ":v8_base", + ":torque_generated_initializers", + ] + + public_deps = [ + ":v8_maybe_icu", ] sources = [ @@ -1280,12 +1367,13 @@ if (v8_use_snapshot && !v8_use_external_startup_data) { deps = [ ":js2c_extras", - ":v8_base", ] + public_deps = [ # This should be public so downstream targets can declare the snapshot # output file as their inputs. ":run_mksnapshot_default", + ":v8_maybe_icu", ] # Do not publicize any header to remove build dependency. @@ -1373,10 +1461,6 @@ v8_source_set("v8_initializers") { ":torque_generated_initializers", ] - public_deps = [ - ":v8_base", - ] - sources = [ ### gcmole(all) ### "src/builtins/builtins-arguments-gen.cc", @@ -1510,8 +1594,7 @@ v8_source_set("v8_initializers") { sources -= [ "src/builtins/builtins-intl-gen.cc" ] } - remove_configs = [ v8_path_prefix + ":default_optimization" ] - configs = [ ":unoptimized_initializer" ] + configs = [ ":internal_config" ] } v8_source_set("v8_init") { @@ -1525,11 +1608,10 @@ v8_source_set("v8_init") { ### gcmole(all) ### "src/setup-isolate-full.cc", ] - if (v8_enable_i18n_support) { - public_deps = [ - "//third_party/icu", - ] - } + + public_deps = [ + ":v8_maybe_icu", + ] configs = [ ":internal_config" ] } @@ -1585,7 +1667,277 @@ v8_header_set("v8_shared_internal_headers") { ] } -v8_source_set("v8_base") { +v8_compiler_sources = [ + "src/compiler/access-builder.cc", + "src/compiler/access-builder.h", + "src/compiler/access-info.cc", + "src/compiler/access-info.h", + "src/compiler/all-nodes.cc", + "src/compiler/all-nodes.h", + "src/compiler/allocation-builder-inl.h", + "src/compiler/allocation-builder.h", + "src/compiler/backend/code-generator-impl.h", + "src/compiler/backend/code-generator.cc", + "src/compiler/backend/code-generator.h", + "src/compiler/backend/frame-elider.cc", + "src/compiler/backend/frame-elider.h", + "src/compiler/backend/gap-resolver.cc", + "src/compiler/backend/gap-resolver.h", + "src/compiler/backend/instruction-codes.h", + "src/compiler/backend/instruction-scheduler.cc", + "src/compiler/backend/instruction-scheduler.h", + "src/compiler/backend/instruction-selector-impl.h", + "src/compiler/backend/instruction-selector.cc", + "src/compiler/backend/instruction-selector.h", + "src/compiler/backend/instruction.cc", + "src/compiler/backend/instruction.h", + "src/compiler/backend/jump-threading.cc", + "src/compiler/backend/jump-threading.h", + "src/compiler/backend/live-range-separator.cc", + "src/compiler/backend/live-range-separator.h", + "src/compiler/backend/move-optimizer.cc", + "src/compiler/backend/move-optimizer.h", + "src/compiler/backend/register-allocator-verifier.cc", + "src/compiler/backend/register-allocator-verifier.h", + "src/compiler/backend/register-allocator.cc", + "src/compiler/backend/register-allocator.h", + "src/compiler/backend/unwinding-info-writer.h", + "src/compiler/basic-block-instrumentor.cc", + "src/compiler/basic-block-instrumentor.h", + "src/compiler/branch-elimination.cc", + "src/compiler/branch-elimination.h", + "src/compiler/bytecode-analysis.cc", + "src/compiler/bytecode-analysis.h", + "src/compiler/bytecode-graph-builder.cc", + "src/compiler/bytecode-graph-builder.h", + "src/compiler/bytecode-liveness-map.cc", + "src/compiler/bytecode-liveness-map.h", + "src/compiler/c-linkage.cc", + "src/compiler/checkpoint-elimination.cc", + "src/compiler/checkpoint-elimination.h", + "src/compiler/code-assembler.cc", + "src/compiler/code-assembler.h", + "src/compiler/common-node-cache.cc", + "src/compiler/common-node-cache.h", + "src/compiler/common-operator-reducer.cc", + "src/compiler/common-operator-reducer.h", + "src/compiler/common-operator.cc", + "src/compiler/common-operator.h", + "src/compiler/compilation-dependencies.cc", + "src/compiler/compilation-dependencies.h", + "src/compiler/compiler-source-position-table.cc", + "src/compiler/compiler-source-position-table.h", + "src/compiler/constant-folding-reducer.cc", + "src/compiler/constant-folding-reducer.h", + "src/compiler/control-equivalence.cc", + "src/compiler/control-equivalence.h", + "src/compiler/control-flow-optimizer.cc", + "src/compiler/control-flow-optimizer.h", + "src/compiler/dead-code-elimination.cc", + "src/compiler/dead-code-elimination.h", + "src/compiler/diamond.h", + "src/compiler/effect-control-linearizer.cc", + "src/compiler/effect-control-linearizer.h", + "src/compiler/escape-analysis-reducer.cc", + "src/compiler/escape-analysis-reducer.h", + "src/compiler/escape-analysis.cc", + "src/compiler/escape-analysis.h", + "src/compiler/frame-states.cc", + "src/compiler/frame-states.h", + "src/compiler/frame.cc", + "src/compiler/frame.h", + "src/compiler/functional-list.h", + "src/compiler/graph-assembler.cc", + "src/compiler/graph-assembler.h", + "src/compiler/graph-reducer.cc", + "src/compiler/graph-reducer.h", + "src/compiler/graph-trimmer.cc", + "src/compiler/graph-trimmer.h", + "src/compiler/graph-visualizer.cc", + "src/compiler/graph-visualizer.h", + "src/compiler/graph.cc", + "src/compiler/graph.h", + "src/compiler/int64-lowering.cc", + "src/compiler/int64-lowering.h", + "src/compiler/js-call-reducer.cc", + "src/compiler/js-call-reducer.h", + "src/compiler/js-context-specialization.cc", + "src/compiler/js-context-specialization.h", + "src/compiler/js-create-lowering.cc", + "src/compiler/js-create-lowering.h", + "src/compiler/js-generic-lowering.cc", + "src/compiler/js-generic-lowering.h", + "src/compiler/js-graph.cc", + "src/compiler/js-graph.h", + "src/compiler/js-heap-broker.cc", + "src/compiler/js-heap-broker.h", + "src/compiler/js-heap-copy-reducer.cc", + "src/compiler/js-heap-copy-reducer.h", + "src/compiler/js-inlining-heuristic.cc", + "src/compiler/js-inlining-heuristic.h", + "src/compiler/js-inlining.cc", + "src/compiler/js-inlining.h", + "src/compiler/js-intrinsic-lowering.cc", + "src/compiler/js-intrinsic-lowering.h", + "src/compiler/js-native-context-specialization.cc", + "src/compiler/js-native-context-specialization.h", + "src/compiler/js-operator.cc", + "src/compiler/js-operator.h", + "src/compiler/js-type-hint-lowering.cc", + "src/compiler/js-type-hint-lowering.h", + "src/compiler/js-typed-lowering.cc", + "src/compiler/js-typed-lowering.h", + "src/compiler/linkage.cc", + "src/compiler/linkage.h", + "src/compiler/load-elimination.cc", + "src/compiler/load-elimination.h", + "src/compiler/loop-analysis.cc", + "src/compiler/loop-analysis.h", + "src/compiler/loop-peeling.cc", + "src/compiler/loop-peeling.h", + "src/compiler/loop-variable-optimizer.cc", + "src/compiler/loop-variable-optimizer.h", + "src/compiler/machine-graph-verifier.cc", + "src/compiler/machine-graph-verifier.h", + "src/compiler/machine-graph.cc", + "src/compiler/machine-graph.h", + "src/compiler/machine-operator-reducer.cc", + "src/compiler/machine-operator-reducer.h", + "src/compiler/machine-operator.cc", + "src/compiler/machine-operator.h", + "src/compiler/memory-optimizer.cc", + "src/compiler/memory-optimizer.h", + "src/compiler/node-aux-data.h", + "src/compiler/node-cache.cc", + "src/compiler/node-cache.h", + "src/compiler/node-marker.cc", + "src/compiler/node-marker.h", + "src/compiler/node-matchers.cc", + "src/compiler/node-matchers.h", + "src/compiler/node-origin-table.cc", + "src/compiler/node-origin-table.h", + "src/compiler/node-properties.cc", + "src/compiler/node-properties.h", + "src/compiler/node.cc", + "src/compiler/node.h", + "src/compiler/opcodes.cc", + "src/compiler/opcodes.h", + "src/compiler/operation-typer.cc", + "src/compiler/operation-typer.h", + "src/compiler/operator-properties.cc", + "src/compiler/operator-properties.h", + "src/compiler/operator.cc", + "src/compiler/operator.h", + "src/compiler/osr.cc", + "src/compiler/osr.h", + "src/compiler/per-isolate-compiler-cache.h", + "src/compiler/persistent-map.h", + "src/compiler/pipeline-statistics.cc", + "src/compiler/pipeline-statistics.h", + "src/compiler/pipeline.cc", + "src/compiler/pipeline.h", + "src/compiler/property-access-builder.cc", + "src/compiler/property-access-builder.h", + "src/compiler/raw-machine-assembler.cc", + "src/compiler/raw-machine-assembler.h", + "src/compiler/redundancy-elimination.cc", + "src/compiler/redundancy-elimination.h", + "src/compiler/refs-map.cc", + "src/compiler/refs-map.h", + "src/compiler/representation-change.cc", + "src/compiler/representation-change.h", + "src/compiler/schedule.cc", + "src/compiler/schedule.h", + "src/compiler/scheduler.cc", + "src/compiler/scheduler.h", + "src/compiler/select-lowering.cc", + "src/compiler/select-lowering.h", + "src/compiler/serializer-for-background-compilation.cc", + "src/compiler/serializer-for-background-compilation.h", + "src/compiler/simd-scalar-lowering.cc", + "src/compiler/simd-scalar-lowering.h", + "src/compiler/simplified-lowering.cc", + "src/compiler/simplified-lowering.h", + "src/compiler/simplified-operator-reducer.cc", + "src/compiler/simplified-operator-reducer.h", + "src/compiler/simplified-operator.cc", + "src/compiler/simplified-operator.h", + "src/compiler/state-values-utils.cc", + "src/compiler/state-values-utils.h", + "src/compiler/store-store-elimination.cc", + "src/compiler/store-store-elimination.h", + "src/compiler/type-cache.cc", + "src/compiler/type-cache.h", + "src/compiler/type-narrowing-reducer.cc", + "src/compiler/type-narrowing-reducer.h", + "src/compiler/typed-optimization.cc", + "src/compiler/typed-optimization.h", + "src/compiler/typer.cc", + "src/compiler/typer.h", + "src/compiler/types.cc", + "src/compiler/types.h", + "src/compiler/value-numbering-reducer.cc", + "src/compiler/value-numbering-reducer.h", + "src/compiler/verifier.cc", + "src/compiler/verifier.h", + "src/compiler/wasm-compiler.cc", + "src/compiler/wasm-compiler.h", + "src/compiler/zone-stats.cc", + "src/compiler/zone-stats.h", +] + +# The src/compiler files with optimizations. +v8_source_set("v8_compiler_opt") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + sources = v8_compiler_sources + + public_deps = [ + ":generate_bytecode_builtins_list", + ":run_torque", + ":v8_maybe_icu", + ] + + if (is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot) { + # The :no_optimize config is added to v8_add_configs in v8.gni. + remove_configs = [ "//build/config/compiler:no_optimize" ] + configs = [ ":always_optimize" ] + } else { + # Without this else branch, gn fails to generate build files for non-debug + # builds (because we try to remove a config that is not present). + # So we include it, even if this config is not used outside of debug builds. + configs = [ ":internal_config" ] + } +} + +# The src/compiler files with default optimization behavior. +v8_source_set("v8_compiler") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + sources = v8_compiler_sources + + public_deps = [ + ":generate_bytecode_builtins_list", + ":run_torque", + ":v8_maybe_icu", + ] + + configs = [ ":internal_config" ] +} + +group("v8_compiler_for_mksnapshot") { + if (is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot) { + deps = [ + ":v8_compiler_opt", + ] + } else { + deps = [ + ":v8_compiler", + ] + } +} + +v8_source_set("v8_base_without_compiler") { visibility = [ ":*" ] # Only targets in this file can depend on this. # Split static libraries on windows into two. @@ -1741,222 +2093,6 @@ v8_source_set("v8_base") { "src/compiler-dispatcher/optimizing-compile-dispatcher.h", "src/compiler.cc", "src/compiler.h", - "src/compiler/access-builder.cc", - "src/compiler/access-builder.h", - "src/compiler/access-info.cc", - "src/compiler/access-info.h", - "src/compiler/all-nodes.cc", - "src/compiler/all-nodes.h", - "src/compiler/allocation-builder-inl.h", - "src/compiler/allocation-builder.h", - "src/compiler/backend/code-generator-impl.h", - "src/compiler/backend/code-generator.cc", - "src/compiler/backend/code-generator.h", - "src/compiler/backend/frame-elider.cc", - "src/compiler/backend/frame-elider.h", - "src/compiler/backend/gap-resolver.cc", - "src/compiler/backend/gap-resolver.h", - "src/compiler/backend/instruction-codes.h", - "src/compiler/backend/instruction-scheduler.cc", - "src/compiler/backend/instruction-scheduler.h", - "src/compiler/backend/instruction-selector-impl.h", - "src/compiler/backend/instruction-selector.cc", - "src/compiler/backend/instruction-selector.h", - "src/compiler/backend/instruction.cc", - "src/compiler/backend/instruction.h", - "src/compiler/backend/jump-threading.cc", - "src/compiler/backend/jump-threading.h", - "src/compiler/backend/live-range-separator.cc", - "src/compiler/backend/live-range-separator.h", - "src/compiler/backend/move-optimizer.cc", - "src/compiler/backend/move-optimizer.h", - "src/compiler/backend/register-allocator-verifier.cc", - "src/compiler/backend/register-allocator-verifier.h", - "src/compiler/backend/register-allocator.cc", - "src/compiler/backend/register-allocator.h", - "src/compiler/backend/unwinding-info-writer.h", - "src/compiler/basic-block-instrumentor.cc", - "src/compiler/basic-block-instrumentor.h", - "src/compiler/branch-elimination.cc", - "src/compiler/branch-elimination.h", - "src/compiler/bytecode-analysis.cc", - "src/compiler/bytecode-analysis.h", - "src/compiler/bytecode-graph-builder.cc", - "src/compiler/bytecode-graph-builder.h", - "src/compiler/bytecode-liveness-map.cc", - "src/compiler/bytecode-liveness-map.h", - "src/compiler/c-linkage.cc", - "src/compiler/checkpoint-elimination.cc", - "src/compiler/checkpoint-elimination.h", - "src/compiler/code-assembler.cc", - "src/compiler/code-assembler.h", - "src/compiler/common-node-cache.cc", - "src/compiler/common-node-cache.h", - "src/compiler/common-operator-reducer.cc", - "src/compiler/common-operator-reducer.h", - "src/compiler/common-operator.cc", - "src/compiler/common-operator.h", - "src/compiler/compilation-dependencies.cc", - "src/compiler/compilation-dependencies.h", - "src/compiler/compiler-source-position-table.cc", - "src/compiler/compiler-source-position-table.h", - "src/compiler/constant-folding-reducer.cc", - "src/compiler/constant-folding-reducer.h", - "src/compiler/control-equivalence.cc", - "src/compiler/control-equivalence.h", - "src/compiler/control-flow-optimizer.cc", - "src/compiler/control-flow-optimizer.h", - "src/compiler/dead-code-elimination.cc", - "src/compiler/dead-code-elimination.h", - "src/compiler/diamond.h", - "src/compiler/effect-control-linearizer.cc", - "src/compiler/effect-control-linearizer.h", - "src/compiler/escape-analysis-reducer.cc", - "src/compiler/escape-analysis-reducer.h", - "src/compiler/escape-analysis.cc", - "src/compiler/escape-analysis.h", - "src/compiler/frame-states.cc", - "src/compiler/frame-states.h", - "src/compiler/frame.cc", - "src/compiler/frame.h", - "src/compiler/functional-list.h", - "src/compiler/graph-assembler.cc", - "src/compiler/graph-assembler.h", - "src/compiler/graph-reducer.cc", - "src/compiler/graph-reducer.h", - "src/compiler/graph-trimmer.cc", - "src/compiler/graph-trimmer.h", - "src/compiler/graph-visualizer.cc", - "src/compiler/graph-visualizer.h", - "src/compiler/graph.cc", - "src/compiler/graph.h", - "src/compiler/int64-lowering.cc", - "src/compiler/int64-lowering.h", - "src/compiler/js-call-reducer.cc", - "src/compiler/js-call-reducer.h", - "src/compiler/js-context-specialization.cc", - "src/compiler/js-context-specialization.h", - "src/compiler/js-create-lowering.cc", - "src/compiler/js-create-lowering.h", - "src/compiler/js-generic-lowering.cc", - "src/compiler/js-generic-lowering.h", - "src/compiler/js-graph.cc", - "src/compiler/js-graph.h", - "src/compiler/js-heap-broker.cc", - "src/compiler/js-heap-broker.h", - "src/compiler/js-heap-copy-reducer.cc", - "src/compiler/js-heap-copy-reducer.h", - "src/compiler/js-inlining-heuristic.cc", - "src/compiler/js-inlining-heuristic.h", - "src/compiler/js-inlining.cc", - "src/compiler/js-inlining.h", - "src/compiler/js-intrinsic-lowering.cc", - "src/compiler/js-intrinsic-lowering.h", - "src/compiler/js-native-context-specialization.cc", - "src/compiler/js-native-context-specialization.h", - "src/compiler/js-operator.cc", - "src/compiler/js-operator.h", - "src/compiler/js-type-hint-lowering.cc", - "src/compiler/js-type-hint-lowering.h", - "src/compiler/js-typed-lowering.cc", - "src/compiler/js-typed-lowering.h", - "src/compiler/linkage.cc", - "src/compiler/linkage.h", - "src/compiler/load-elimination.cc", - "src/compiler/load-elimination.h", - "src/compiler/loop-analysis.cc", - "src/compiler/loop-analysis.h", - "src/compiler/loop-peeling.cc", - "src/compiler/loop-peeling.h", - "src/compiler/loop-variable-optimizer.cc", - "src/compiler/loop-variable-optimizer.h", - "src/compiler/machine-graph-verifier.cc", - "src/compiler/machine-graph-verifier.h", - "src/compiler/machine-graph.cc", - "src/compiler/machine-graph.h", - "src/compiler/machine-operator-reducer.cc", - "src/compiler/machine-operator-reducer.h", - "src/compiler/machine-operator.cc", - "src/compiler/machine-operator.h", - "src/compiler/memory-optimizer.cc", - "src/compiler/memory-optimizer.h", - "src/compiler/node-aux-data.h", - "src/compiler/node-cache.cc", - "src/compiler/node-cache.h", - "src/compiler/node-marker.cc", - "src/compiler/node-marker.h", - "src/compiler/node-matchers.cc", - "src/compiler/node-matchers.h", - "src/compiler/node-origin-table.cc", - "src/compiler/node-origin-table.h", - "src/compiler/node-properties.cc", - "src/compiler/node-properties.h", - "src/compiler/node.cc", - "src/compiler/node.h", - "src/compiler/opcodes.cc", - "src/compiler/opcodes.h", - "src/compiler/operation-typer.cc", - "src/compiler/operation-typer.h", - "src/compiler/operator-properties.cc", - "src/compiler/operator-properties.h", - "src/compiler/operator.cc", - "src/compiler/operator.h", - "src/compiler/osr.cc", - "src/compiler/osr.h", - "src/compiler/per-isolate-compiler-cache.h", - "src/compiler/persistent-map.h", - "src/compiler/pipeline-statistics.cc", - "src/compiler/pipeline-statistics.h", - "src/compiler/pipeline.cc", - "src/compiler/pipeline.h", - "src/compiler/property-access-builder.cc", - "src/compiler/property-access-builder.h", - "src/compiler/raw-machine-assembler.cc", - "src/compiler/raw-machine-assembler.h", - "src/compiler/redundancy-elimination.cc", - "src/compiler/redundancy-elimination.h", - "src/compiler/refs-map.cc", - "src/compiler/refs-map.h", - "src/compiler/representation-change.cc", - "src/compiler/representation-change.h", - "src/compiler/schedule.cc", - "src/compiler/schedule.h", - "src/compiler/scheduler.cc", - "src/compiler/scheduler.h", - "src/compiler/select-lowering.cc", - "src/compiler/select-lowering.h", - "src/compiler/serializer-for-background-compilation.cc", - "src/compiler/serializer-for-background-compilation.h", - "src/compiler/simd-scalar-lowering.cc", - "src/compiler/simd-scalar-lowering.h", - "src/compiler/simplified-lowering.cc", - "src/compiler/simplified-lowering.h", - "src/compiler/simplified-operator-reducer.cc", - "src/compiler/simplified-operator-reducer.h", - "src/compiler/simplified-operator.cc", - "src/compiler/simplified-operator.h", - "src/compiler/state-values-utils.cc", - "src/compiler/state-values-utils.h", - "src/compiler/store-store-elimination.cc", - "src/compiler/store-store-elimination.h", - "src/compiler/type-cache.cc", - "src/compiler/type-cache.h", - "src/compiler/type-narrowing-reducer.cc", - "src/compiler/type-narrowing-reducer.h", - "src/compiler/typed-optimization.cc", - "src/compiler/typed-optimization.h", - "src/compiler/typer.cc", - "src/compiler/typer.h", - "src/compiler/types.cc", - "src/compiler/types.h", - "src/compiler/value-numbering-reducer.cc", - "src/compiler/value-numbering-reducer.h", - "src/compiler/verifier.cc", - "src/compiler/verifier.h", - "src/compiler/wasm-compiler.cc", - "src/compiler/wasm-compiler.h", - "src/compiler/zone-stats.cc", - "src/compiler/zone-stats.h", "src/constant-pool.cc", "src/constant-pool.h", "src/constants-arch.h", @@ -1966,6 +2102,7 @@ v8_source_set("v8_base") { "src/conversions-inl.h", "src/conversions.cc", "src/conversions.h", + "src/counters-definitions.h", "src/counters-inl.h", "src/counters.cc", "src/counters.h", @@ -2268,7 +2405,6 @@ v8_source_set("v8_base") { "src/objects/arguments.h", "src/objects/bigint.cc", "src/objects/bigint.h", - "src/objects/builtin-function-id.h", "src/objects/cell-inl.h", "src/objects/cell.h", "src/objects/code-inl.h", @@ -2319,6 +2455,7 @@ v8_source_set("v8_base") { "src/objects/js-collator.cc", "src/objects/js-collator.h", "src/objects/js-collection-inl.h", + "src/objects/js-collection-iterator.h", "src/objects/js-collection.h", "src/objects/js-date-time-format-inl.h", "src/objects/js-date-time-format.cc", @@ -2480,8 +2617,6 @@ v8_source_set("v8_base") { "src/profiler/tick-sample.h", "src/profiler/tracing-cpu-profiler.cc", "src/profiler/tracing-cpu-profiler.h", - "src/profiler/unbound-queue-inl.h", - "src/profiler/unbound-queue.h", "src/property-descriptor.cc", "src/property-descriptor.h", "src/property-details.h", @@ -2650,6 +2785,7 @@ v8_source_set("v8_base") { "src/turbo-assembler.h", "src/type-hints.cc", "src/type-hints.h", + "src/type-traits.h", "src/unicode-cache.h", "src/unicode-decoder.cc", "src/unicode-decoder.h", @@ -2695,7 +2831,7 @@ v8_source_set("v8_base") { "src/wasm/function-compiler.h", "src/wasm/graph-builder-interface.cc", "src/wasm/graph-builder-interface.h", - "src/wasm/js-to-wasm-wrapper-cache-inl.h", + "src/wasm/js-to-wasm-wrapper-cache.h", "src/wasm/jump-table-assembler.cc", "src/wasm/jump-table-assembler.h", "src/wasm/leb-helper.h", @@ -2726,7 +2862,8 @@ v8_source_set("v8_base") { "src/wasm/wasm-feature-flags.h", "src/wasm/wasm-features.cc", "src/wasm/wasm-features.h", - "src/wasm/wasm-import-wrapper-cache-inl.h", + "src/wasm/wasm-import-wrapper-cache.cc", + "src/wasm/wasm-import-wrapper-cache.h", "src/wasm/wasm-interpreter.cc", "src/wasm/wasm-interpreter.h", "src/wasm/wasm-js.cc", @@ -2840,7 +2977,9 @@ v8_source_set("v8_base") { "src/x64/register-x64.h", "src/x64/sse-instr.h", ] - if (is_linux || is_mac) { + # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both + # based on Darwin and thus POSIX-compliant to a similar degree. + if (is_linux || is_mac || is_ios) { sources += [ "src/trap-handler/handler-inside-posix.cc", "src/trap-handler/handler-inside-posix.h", @@ -2852,6 +2991,8 @@ v8_source_set("v8_base") { "src/trap-handler/handler-inside-win.cc", "src/trap-handler/handler-inside-win.h", "src/trap-handler/handler-outside-win.cc", + "src/unwinding-info-win64.cc", + "src/unwinding-info-win64.h", ] } } else if (v8_current_cpu == "arm") { @@ -3046,6 +3187,7 @@ v8_source_set("v8_base") { defines = [] deps = [ + ":torque_generated_definitions", ":v8_headers", ":v8_libbase", ":v8_libsampler", @@ -3057,10 +3199,10 @@ v8_source_set("v8_base") { public_deps = [ ":generate_bytecode_builtins_list", ":run_torque", + ":v8_maybe_icu", ] if (v8_enable_i18n_support) { - public_deps += [ "//third_party/icu" ] if (is_win) { deps += [ "//third_party/icu:icudata" ] } @@ -3119,6 +3261,13 @@ v8_source_set("v8_base") { } } +group("v8_base") { + public_deps = [ + ":v8_base_without_compiler", + ":v8_compiler", + ] +} + v8_source_set("torque_base") { visibility = [ ":*" ] # Only targets in this file can depend on this. @@ -3161,13 +3310,26 @@ v8_source_set("torque_base") { ] deps = [ - ":v8_libbase", ":v8_shared_internal_headers", ] - configs = [ ":internal_config" ] + public_deps = [ + ":v8_libbase", + ] + + configs = [ + ":internal_config", + "//build/config/compiler:exceptions", + "//build/config/compiler:rtti", + ] + + remove_configs = [ + "//build/config/compiler:no_exceptions", + "//build/config/compiler:no_rtti", + ] + if (is_win && is_asan) { - remove_configs = [ "//build/config/sanitizers:default_sanitizer_flags" ] + remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] } } @@ -3185,13 +3347,23 @@ v8_source_set("torque_ls_base") { "src/torque/ls/message.h", ] - deps = [ + public_deps = [ ":torque_base", ] - configs = [ ":internal_config" ] + configs = [ + ":internal_config", + "//build/config/compiler:exceptions", + "//build/config/compiler:rtti", + ] + + remove_configs = [ + "//build/config/compiler:no_exceptions", + "//build/config/compiler:no_rtti", + ] + if (is_win && is_asan) { - remove_configs = [ "//build/config/sanitizers:default_sanitizer_flags" ] + remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] } } @@ -3259,8 +3431,6 @@ v8_component("v8_libbase") { "src/base/ring-buffer.h", "src/base/safe_conversions.h", "src/base/safe_conversions_impl.h", - "src/base/safe_math.h", - "src/base/safe_math_impl.h", "src/base/small-vector.h", "src/base/sys-info.cc", "src/base/sys-info.h", @@ -3352,7 +3522,7 @@ v8_component("v8_libbase") { "src/base/debug/stack_trace_fuchsia.cc", "src/base/platform/platform-fuchsia.cc", ] - } else if (is_mac) { + } else if (is_mac || is_ios) { sources += [ "src/base/debug/stack_trace_posix.cc", "src/base/platform/platform-macos.cc", @@ -3369,7 +3539,6 @@ v8_component("v8_libbase") { libs = [ "dbghelp.lib", - "shlwapi.lib", "winmm.lib", "ws2_32.lib", ] @@ -3404,6 +3573,8 @@ v8_component("v8_libplatform") { "src/libplatform/default-platform.h", "src/libplatform/default-worker-threads-task-runner.cc", "src/libplatform/default-worker-threads-task-runner.h", + "src/libplatform/delayed-task-queue.cc", + "src/libplatform/delayed-task-queue.h", "src/libplatform/task-queue.cc", "src/libplatform/task-queue.h", "src/libplatform/tracing/trace-buffer.cc", @@ -3429,6 +3600,9 @@ v8_component("v8_libplatform") { ":v8_headers", ":v8_libbase", ] + if (v8_use_perfetto) { + deps += [ "third_party/perfetto:libperfetto" ] + } } v8_source_set("v8_libsampler") { @@ -3463,11 +3637,8 @@ v8_source_set("fuzzer_support") { public_deps = [ ":v8_libbase", ":v8_libplatform", + ":v8_maybe_icu", ] - - if (v8_enable_i18n_support) { - public_deps += [ "//third_party/icu" ] - } } ############################################################################### @@ -3493,6 +3664,27 @@ if (v8_monolithic) { } } +v8_static_library("wee8") { + deps = [ + ":v8_base", + ":v8_libbase", + ":v8_libplatform", + ":v8_libsampler", + ":v8_maybe_snapshot", + "//build/win:default_exe_manifest", + ] + + # TODO: v8dll-main.cc equivalent for shared library builds + + configs = [ ":internal_config" ] + + sources = [ + "src/wasm/c-api.cc", + "third_party/wasm-c-api/wasm.h", + "third_party/wasm-c-api/wasm.hh", + ] +} + ############################################################################### # Executables # @@ -3533,7 +3725,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] deps = [ - ":v8_base", + ":v8_base_without_compiler", + ":v8_compiler_for_mksnapshot", ":v8_init", ":v8_libbase", ":v8_libplatform", @@ -3543,6 +3736,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { if (target_os == "fuchsia") { defines = [ "V8_TARGET_OS_FUCHSIA" ] + } else if (target_os == "win") { + defines = [ "V8_TARGET_OS_WIN" ] } } } @@ -3560,9 +3755,19 @@ if (current_toolchain == v8_snapshot_toolchain) { "//build/win:default_exe_manifest", ] - configs = [ ":internal_config" ] + configs = [ + ":internal_config", + "//build/config/compiler:exceptions", + "//build/config/compiler:rtti", + ] + + remove_configs = [ + "//build/config/compiler:no_exceptions", + "//build/config/compiler:no_rtti", + ] + if (is_win && is_asan) { - remove_configs = [ "//build/config/sanitizers:default_sanitizer_flags" ] + remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] } } } @@ -3580,9 +3785,19 @@ v8_executable("torque-language-server") { "//build/win:default_exe_manifest", ] - configs = [ ":internal_config" ] + configs = [ + ":internal_config", + "//build/config/compiler:exceptions", + "//build/config/compiler:rtti", + ] + + remove_configs = [ + "//build/config/compiler:no_exceptions", + "//build/config/compiler:no_rtti", + ] + if (is_win && is_asan) { - remove_configs = [ "//build/config/sanitizers:default_sanitizer_flags" ] + remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] } } @@ -3973,11 +4188,9 @@ v8_source_set("wasm_module_runner") { ":run_torque", ] - if (v8_enable_i18n_support) { - public_deps = [ - "//third_party/icu", - ] - } + public_deps = [ + ":v8_maybe_icu", + ] configs = [ ":external_config", @@ -4057,11 +4270,9 @@ v8_source_set("lib_wasm_fuzzer_common") { ":run_torque", ] - if (v8_enable_i18n_support) { - public_deps = [ - "//third_party/icu", - ] - } + public_deps = [ + ":v8_maybe_icu", + ] configs = [ ":external_config", @@ -4102,3 +4313,260 @@ group("v8_generated_cc_files") { "test/cctest:v8_generated_cc_files", ] } + +# Protobuf targets, used only when building outside of chromium. + +if (!build_with_chromium && v8_use_perfetto) { + # This config is applied to the autogenerated .pb.{cc,h} files in + # proto_library.gni. This config is propagated up to the source sets + # that depend on generated proto headers. + config("protobuf_gen_config") { + defines = [ + "GOOGLE_PROTOBUF_NO_RTTI", + "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", + ] + cflags = [ + # Using -isystem instead of include_dirs (-I), so we don't need to suppress + # warnings coming from libprotobuf headers. Doing so would mask warnings in + # our own code. + "-isystem", + rebase_path("third_party/protobuf/src", root_build_dir), + "-Wno-unknown-warning-option", + "-Wno-deprecated", + "-Wno-undef", + "-Wno-zero-as-null-pointer-constant", + ] + } + + # Configuration used to build libprotobuf_* and the protoc compiler. + config("protobuf_config") { + # Apply the lighter supressions and macro definitions from above. + configs = [ ":protobuf_gen_config" ] + + defines = [ "HAVE_PTHREAD=1" ] + if (is_clang) { + cflags = [ + "-Wno-unused-private-field", + "-Wno-unused-function", + "-Wno-inconsistent-missing-override", + "-Wno-unknown-warning-option", + "-Wno-enum-compare-switch", + "-Wno-user-defined-warnings", + "-Wno-tautological-constant-compare", + ] + } + } + + source_set("protobuf_lite") { + sources = [ + "third_party/protobuf/src/google/protobuf/any_lite.cc", + "third_party/protobuf/src/google/protobuf/arena.cc", + "third_party/protobuf/src/google/protobuf/extension_set.cc", + "third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc", + "third_party/protobuf/src/google/protobuf/generated_message_util.cc", + "third_party/protobuf/src/google/protobuf/implicit_weak_message.cc", + "third_party/protobuf/src/google/protobuf/io/coded_stream.cc", + "third_party/protobuf/src/google/protobuf/io/strtod.cc", + "third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc", + "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", + "third_party/protobuf/src/google/protobuf/message_lite.cc", + "third_party/protobuf/src/google/protobuf/repeated_field.cc", + "third_party/protobuf/src/google/protobuf/stubs/bytestream.cc", + "third_party/protobuf/src/google/protobuf/stubs/common.cc", + "third_party/protobuf/src/google/protobuf/stubs/int128.cc", + "third_party/protobuf/src/google/protobuf/stubs/io_win32.cc", + "third_party/protobuf/src/google/protobuf/stubs/status.cc", + "third_party/protobuf/src/google/protobuf/stubs/statusor.cc", + "third_party/protobuf/src/google/protobuf/stubs/stringpiece.cc", + "third_party/protobuf/src/google/protobuf/stubs/stringprintf.cc", + "third_party/protobuf/src/google/protobuf/stubs/structurally_valid.cc", + "third_party/protobuf/src/google/protobuf/stubs/strutil.cc", + "third_party/protobuf/src/google/protobuf/stubs/time.cc", + "third_party/protobuf/src/google/protobuf/wire_format_lite.cc", + ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ + "//build/config/compiler:no_chromium_code", + ":protobuf_config", + ] + public_configs = [ ":protobuf_gen_config" ] + } + + # This target should be used only by the protoc compiler and by test targets. + source_set("protobuf_full") { + deps = [ + ":protobuf_lite", + ] + sources = [ + "third_party/protobuf/src/google/protobuf/any.cc", + "third_party/protobuf/src/google/protobuf/any.pb.cc", + "third_party/protobuf/src/google/protobuf/api.pb.cc", + "third_party/protobuf/src/google/protobuf/compiler/importer.cc", + "third_party/protobuf/src/google/protobuf/compiler/parser.cc", + "third_party/protobuf/src/google/protobuf/descriptor.cc", + "third_party/protobuf/src/google/protobuf/descriptor.pb.cc", + "third_party/protobuf/src/google/protobuf/descriptor_database.cc", + "third_party/protobuf/src/google/protobuf/duration.pb.cc", + "third_party/protobuf/src/google/protobuf/dynamic_message.cc", + "third_party/protobuf/src/google/protobuf/empty.pb.cc", + "third_party/protobuf/src/google/protobuf/extension_set_heavy.cc", + "third_party/protobuf/src/google/protobuf/field_mask.pb.cc", + "third_party/protobuf/src/google/protobuf/generated_message_reflection.cc", + "third_party/protobuf/src/google/protobuf/generated_message_table_driven.cc", + "third_party/protobuf/src/google/protobuf/io/gzip_stream.cc", + "third_party/protobuf/src/google/protobuf/io/printer.cc", + "third_party/protobuf/src/google/protobuf/io/tokenizer.cc", + "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc", + "third_party/protobuf/src/google/protobuf/map_field.cc", + "third_party/protobuf/src/google/protobuf/message.cc", + "third_party/protobuf/src/google/protobuf/reflection_ops.cc", + "third_party/protobuf/src/google/protobuf/service.cc", + "third_party/protobuf/src/google/protobuf/source_context.pb.cc", + "third_party/protobuf/src/google/protobuf/struct.pb.cc", + "third_party/protobuf/src/google/protobuf/stubs/mathlimits.cc", + "third_party/protobuf/src/google/protobuf/stubs/substitute.cc", + "third_party/protobuf/src/google/protobuf/text_format.cc", + "third_party/protobuf/src/google/protobuf/timestamp.pb.cc", + "third_party/protobuf/src/google/protobuf/type.pb.cc", + "third_party/protobuf/src/google/protobuf/unknown_field_set.cc", + "third_party/protobuf/src/google/protobuf/util/delimited_message_util.cc", + "third_party/protobuf/src/google/protobuf/util/field_comparator.cc", + "third_party/protobuf/src/google/protobuf/util/field_mask_util.cc", + "third_party/protobuf/src/google/protobuf/util/internal/datapiece.cc", + "third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc", + "third_party/protobuf/src/google/protobuf/util/internal/error_listener.cc", + "third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc", + "third_party/protobuf/src/google/protobuf/util/internal/json_escaping.cc", + "third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc", + "third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc", + "third_party/protobuf/src/google/protobuf/util/internal/object_writer.cc", + "third_party/protobuf/src/google/protobuf/util/internal/proto_writer.cc", + "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc", + "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc", + "third_party/protobuf/src/google/protobuf/util/internal/type_info.cc", + "third_party/protobuf/src/google/protobuf/util/internal/type_info_test_helper.cc", + "third_party/protobuf/src/google/protobuf/util/internal/utility.cc", + "third_party/protobuf/src/google/protobuf/util/json_util.cc", + "third_party/protobuf/src/google/protobuf/util/message_differencer.cc", + "third_party/protobuf/src/google/protobuf/util/time_util.cc", + "third_party/protobuf/src/google/protobuf/util/type_resolver_util.cc", + "third_party/protobuf/src/google/protobuf/wire_format.cc", + "third_party/protobuf/src/google/protobuf/wrappers.pb.cc", + ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ + "//build/config/compiler:no_chromium_code", + ":protobuf_config", + ] + public_configs = [ ":protobuf_gen_config" ] + } + + if (current_toolchain == host_toolchain) { + source_set("protoc_lib") { + deps = [ + ":protobuf_full", + ] + sources = [ + "third_party/protobuf/src/google/protobuf/compiler/code_generator.cc", + "third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc", + "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_map_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", + "third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_enum.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_extension.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_extension_lite.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_file.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_generator.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_generator_factory.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_map_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_map_field_lite.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_message.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_message_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_message_field_lite.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_message_lite.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_service.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/java/java_string_field_lite.cc", + "third_party/protobuf/src/google/protobuf/compiler/js/js_generator.cc", + "third_party/protobuf/src/google/protobuf/compiler/js/well_known_types_embed.cc", + "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.cc", + "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc", + "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.cc", + "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_generator.cc", + "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc", + "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.cc", + "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc", + "third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc", + "third_party/protobuf/src/google/protobuf/compiler/php/php_generator.cc", + "third_party/protobuf/src/google/protobuf/compiler/plugin.cc", + "third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc", + "third_party/protobuf/src/google/protobuf/compiler/python/python_generator.cc", + "third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generator.cc", + "third_party/protobuf/src/google/protobuf/compiler/subprocess.cc", + "third_party/protobuf/src/google/protobuf/compiler/zip_writer.cc", + ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ + "//build/config/compiler:no_chromium_code", + ":protobuf_config", + ] + public_configs = [ ":protobuf_gen_config" ] + } + + executable("protoc") { + deps = [ + ":protoc_lib", + "//build/win:default_exe_manifest", + ] + sources = [ + "third_party/protobuf/src/google/protobuf/compiler/main.cc", + ] + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + } + } # host_toolchain +} # if (!build_with_chromium && v8_use_perfetto) diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index 23725637e62b47..6d315e6a9efdb5 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,1508 @@ +2019-04-17: Version 7.5.288 + + Performance and stability improvements on all platforms. + + +2019-04-17: Version 7.5.287 + + Performance and stability improvements on all platforms. + + +2019-04-17: Version 7.5.286 + + Performance and stability improvements on all platforms. + + +2019-04-17: Version 7.5.285 + + Performance and stability improvements on all platforms. + + +2019-04-16: Version 7.5.284 + + Performance and stability improvements on all platforms. + + +2019-04-16: Version 7.5.283 + + Performance and stability improvements on all platforms. + + +2019-04-16: Version 7.5.282 + + Performance and stability improvements on all platforms. + + +2019-04-16: Version 7.5.281 + + Performance and stability improvements on all platforms. + + +2019-04-16: Version 7.5.280 + + Performance and stability improvements on all platforms. + + +2019-04-16: Version 7.5.279 + + Performance and stability improvements on all platforms. + + +2019-04-16: Version 7.5.278 + + Performance and stability improvements on all platforms. + + +2019-04-16: Version 7.5.277 + + Performance and stability improvements on all platforms. + + +2019-04-16: Version 7.5.276 + + Performance and stability improvements on all platforms. + + +2019-04-15: Version 7.5.275 + + Performance and stability improvements on all platforms. + + +2019-04-15: Version 7.5.274 + + Performance and stability improvements on all platforms. + + +2019-04-15: Version 7.5.273 + + Performance and stability improvements on all platforms. + + +2019-04-15: Version 7.5.272 + + Performance and stability improvements on all platforms. + + +2019-04-15: Version 7.5.271 + + Performance and stability improvements on all platforms. + + +2019-04-15: Version 7.5.270 + + Performance and stability improvements on all platforms. + + +2019-04-12: Version 7.5.269 + + Performance and stability improvements on all platforms. + + +2019-04-12: Version 7.5.268 + + Performance and stability improvements on all platforms. + + +2019-04-12: Version 7.5.267 + + Performance and stability improvements on all platforms. + + +2019-04-12: Version 7.5.266 + + Performance and stability improvements on all platforms. + + +2019-04-12: Version 7.5.265 + + Performance and stability improvements on all platforms. + + +2019-04-12: Version 7.5.264 + + Performance and stability improvements on all platforms. + + +2019-04-12: Version 7.5.263 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.262 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.261 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.260 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.259 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.258 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.257 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.256 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.255 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.254 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.253 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.252 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.251 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.250 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.249 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.248 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.247 + + Performance and stability improvements on all platforms. + + +2019-04-11: Version 7.5.246 + + Performance and stability improvements on all platforms. + + +2019-04-10: Version 7.5.245 + + Performance and stability improvements on all platforms. + + +2019-04-10: Version 7.5.244 + + Performance and stability improvements on all platforms. + + +2019-04-10: Version 7.5.243 + + Performance and stability improvements on all platforms. + + +2019-04-10: Version 7.5.242 + + Performance and stability improvements on all platforms. + + +2019-04-10: Version 7.5.241 + + Performance and stability improvements on all platforms. + + +2019-04-10: Version 7.5.240 + + Performance and stability improvements on all platforms. + + +2019-04-10: Version 7.5.239 + + Performance and stability improvements on all platforms. + + +2019-04-10: Version 7.5.238 + + Performance and stability improvements on all platforms. + + +2019-04-10: Version 7.5.237 + + Performance and stability improvements on all platforms. + + +2019-04-10: Version 7.5.236 + + Performance and stability improvements on all platforms. + + +2019-04-10: Version 7.5.235 + + Performance and stability improvements on all platforms. + + +2019-04-10: Version 7.5.234 + + Performance and stability improvements on all platforms. + + +2019-04-10: Version 7.5.233 + + Performance and stability improvements on all platforms. + + +2019-04-09: Version 7.5.232 + + Performance and stability improvements on all platforms. + + +2019-04-09: Version 7.5.231 + + Performance and stability improvements on all platforms. + + +2019-04-09: Version 7.5.230 + + Performance and stability improvements on all platforms. + + +2019-04-09: Version 7.5.229 + + Performance and stability improvements on all platforms. + + +2019-04-09: Version 7.5.228 + + Performance and stability improvements on all platforms. + + +2019-04-09: Version 7.5.227 + + Performance and stability improvements on all platforms. + + +2019-04-09: Version 7.5.226 + + Performance and stability improvements on all platforms. + + +2019-04-09: Version 7.5.225 + + Performance and stability improvements on all platforms. + + +2019-04-09: Version 7.5.224 + + Performance and stability improvements on all platforms. + + +2019-04-08: Version 7.5.223 + + Performance and stability improvements on all platforms. + + +2019-04-08: Version 7.5.222 + + Performance and stability improvements on all platforms. + + +2019-04-08: Version 7.5.221 + + Performance and stability improvements on all platforms. + + +2019-04-08: Version 7.5.220 + + Performance and stability improvements on all platforms. + + +2019-04-08: Version 7.5.219 + + Performance and stability improvements on all platforms. + + +2019-04-08: Version 7.5.218 + + Performance and stability improvements on all platforms. + + +2019-04-08: Version 7.5.217 + + Performance and stability improvements on all platforms. + + +2019-04-08: Version 7.5.216 + + Performance and stability improvements on all platforms. + + +2019-04-08: Version 7.5.215 + + Performance and stability improvements on all platforms. + + +2019-04-08: Version 7.5.214 + + Performance and stability improvements on all platforms. + + +2019-04-08: Version 7.5.213 + + Performance and stability improvements on all platforms. + + +2019-04-07: Version 7.5.212 + + Performance and stability improvements on all platforms. + + +2019-04-07: Version 7.5.211 + + Performance and stability improvements on all platforms. + + +2019-04-06: Version 7.5.210 + + Performance and stability improvements on all platforms. + + +2019-04-05: Version 7.5.209 + + Performance and stability improvements on all platforms. + + +2019-04-05: Version 7.5.208 + + Performance and stability improvements on all platforms. + + +2019-04-05: Version 7.5.207 + + Performance and stability improvements on all platforms. + + +2019-04-05: Version 7.5.206 + + Performance and stability improvements on all platforms. + + +2019-04-05: Version 7.5.205 + + Performance and stability improvements on all platforms. + + +2019-04-05: Version 7.5.204 + + Performance and stability improvements on all platforms. + + +2019-04-05: Version 7.5.203 + + Performance and stability improvements on all platforms. + + +2019-04-05: Version 7.5.202 + + Performance and stability improvements on all platforms. + + +2019-04-05: Version 7.5.201 + + Performance and stability improvements on all platforms. + + +2019-04-05: Version 7.5.200 + + Performance and stability improvements on all platforms. + + +2019-04-05: Version 7.5.199 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.198 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.197 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.196 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.195 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.194 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.193 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.192 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.191 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.190 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.189 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.188 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.187 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.186 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.185 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.184 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.183 + + Performance and stability improvements on all platforms. + + +2019-04-04: Version 7.5.182 + + Performance and stability improvements on all platforms. + + +2019-04-03: Version 7.5.181 + + Performance and stability improvements on all platforms. + + +2019-04-03: Version 7.5.180 + + Performance and stability improvements on all platforms. + + +2019-04-03: Version 7.5.179 + + Performance and stability improvements on all platforms. + + +2019-04-03: Version 7.5.178 + + Performance and stability improvements on all platforms. + + +2019-04-03: Version 7.5.177 + + Performance and stability improvements on all platforms. + + +2019-04-03: Version 7.5.176 + + Performance and stability improvements on all platforms. + + +2019-04-03: Version 7.5.175 + + Performance and stability improvements on all platforms. + + +2019-04-03: Version 7.5.174 + + Performance and stability improvements on all platforms. + + +2019-04-03: Version 7.5.173 + + Performance and stability improvements on all platforms. + + +2019-04-03: Version 7.5.172 + + Performance and stability improvements on all platforms. + + +2019-04-03: Version 7.5.171 + + Performance and stability improvements on all platforms. + + +2019-04-03: Version 7.5.170 + + Performance and stability improvements on all platforms. + + +2019-04-03: Version 7.5.169 + + Performance and stability improvements on all platforms. + + +2019-04-02: Version 7.5.168 + + Performance and stability improvements on all platforms. + + +2019-04-02: Version 7.5.167 + + Performance and stability improvements on all platforms. + + +2019-04-02: Version 7.5.166 + + Performance and stability improvements on all platforms. + + +2019-04-02: Version 7.5.165 + + Performance and stability improvements on all platforms. + + +2019-04-02: Version 7.5.164 + + Performance and stability improvements on all platforms. + + +2019-04-02: Version 7.5.163 + + Performance and stability improvements on all platforms. + + +2019-04-02: Version 7.5.162 + + Performance and stability improvements on all platforms. + + +2019-04-02: Version 7.5.161 + + Performance and stability improvements on all platforms. + + +2019-04-02: Version 7.5.160 + + Performance and stability improvements on all platforms. + + +2019-04-02: Version 7.5.159 + + Performance and stability improvements on all platforms. + + +2019-04-02: Version 7.5.158 + + Performance and stability improvements on all platforms. + + +2019-04-01: Version 7.5.157 + + Performance and stability improvements on all platforms. + + +2019-04-01: Version 7.5.156 + + Performance and stability improvements on all platforms. + + +2019-04-01: Version 7.5.155 + + Performance and stability improvements on all platforms. + + +2019-04-01: Version 7.5.154 + + Performance and stability improvements on all platforms. + + +2019-04-01: Version 7.5.153 + + Performance and stability improvements on all platforms. + + +2019-04-01: Version 7.5.152 + + Performance and stability improvements on all platforms. + + +2019-04-01: Version 7.5.151 + + Performance and stability improvements on all platforms. + + +2019-03-31: Version 7.5.150 + + Performance and stability improvements on all platforms. + + +2019-03-30: Version 7.5.149 + + Performance and stability improvements on all platforms. + + +2019-03-30: Version 7.5.148 + + Performance and stability improvements on all platforms. + + +2019-03-29: Version 7.5.147 + + Performance and stability improvements on all platforms. + + +2019-03-29: Version 7.5.146 + + Performance and stability improvements on all platforms. + + +2019-03-29: Version 7.5.145 + + Performance and stability improvements on all platforms. + + +2019-03-29: Version 7.5.144 + + Performance and stability improvements on all platforms. + + +2019-03-29: Version 7.5.143 + + Performance and stability improvements on all platforms. + + +2019-03-29: Version 7.5.142 + + Performance and stability improvements on all platforms. + + +2019-03-29: Version 7.5.141 + + Performance and stability improvements on all platforms. + + +2019-03-28: Version 7.5.140 + + Performance and stability improvements on all platforms. + + +2019-03-28: Version 7.5.139 + + Performance and stability improvements on all platforms. + + +2019-03-28: Version 7.5.138 + + Performance and stability improvements on all platforms. + + +2019-03-28: Version 7.5.137 + + Performance and stability improvements on all platforms. + + +2019-03-28: Version 7.5.136 + + Performance and stability improvements on all platforms. + + +2019-03-28: Version 7.5.135 + + Performance and stability improvements on all platforms. + + +2019-03-28: Version 7.5.134 + + Performance and stability improvements on all platforms. + + +2019-03-28: Version 7.5.133 + + Performance and stability improvements on all platforms. + + +2019-03-28: Version 7.5.132 + + Performance and stability improvements on all platforms. + + +2019-03-28: Version 7.5.131 + + Performance and stability improvements on all platforms. + + +2019-03-27: Version 7.5.130 + + Performance and stability improvements on all platforms. + + +2019-03-27: Version 7.5.129 + + Performance and stability improvements on all platforms. + + +2019-03-27: Version 7.5.128 + + Performance and stability improvements on all platforms. + + +2019-03-27: Version 7.5.127 + + Performance and stability improvements on all platforms. + + +2019-03-27: Version 7.5.126 + + Performance and stability improvements on all platforms. + + +2019-03-27: Version 7.5.125 + + Performance and stability improvements on all platforms. + + +2019-03-27: Version 7.5.124 + + Performance and stability improvements on all platforms. + + +2019-03-27: Version 7.5.123 + + Performance and stability improvements on all platforms. + + +2019-03-26: Version 7.5.122 + + Performance and stability improvements on all platforms. + + +2019-03-26: Version 7.5.121 + + Performance and stability improvements on all platforms. + + +2019-03-26: Version 7.5.120 + + Performance and stability improvements on all platforms. + + +2019-03-26: Version 7.5.119 + + Performance and stability improvements on all platforms. + + +2019-03-26: Version 7.5.118 + + Performance and stability improvements on all platforms. + + +2019-03-26: Version 7.5.117 + + Performance and stability improvements on all platforms. + + +2019-03-26: Version 7.5.116 + + Performance and stability improvements on all platforms. + + +2019-03-25: Version 7.5.115 + + Performance and stability improvements on all platforms. + + +2019-03-25: Version 7.5.114 + + Performance and stability improvements on all platforms. + + +2019-03-25: Version 7.5.113 + + Performance and stability improvements on all platforms. + + +2019-03-25: Version 7.5.112 + + Performance and stability improvements on all platforms. + + +2019-03-25: Version 7.5.111 + + Performance and stability improvements on all platforms. + + +2019-03-25: Version 7.5.110 + + Performance and stability improvements on all platforms. + + +2019-03-25: Version 7.5.109 + + Performance and stability improvements on all platforms. + + +2019-03-25: Version 7.5.108 + + Performance and stability improvements on all platforms. + + +2019-03-25: Version 7.5.107 + + Performance and stability improvements on all platforms. + + +2019-03-25: Version 7.5.106 + + Performance and stability improvements on all platforms. + + +2019-03-25: Version 7.5.105 + + Performance and stability improvements on all platforms. + + +2019-03-25: Version 7.5.104 + + Performance and stability improvements on all platforms. + + +2019-03-24: Version 7.5.103 + + Performance and stability improvements on all platforms. + + +2019-03-24: Version 7.5.102 + + Performance and stability improvements on all platforms. + + +2019-03-24: Version 7.5.101 + + Performance and stability improvements on all platforms. + + +2019-03-22: Version 7.5.100 + + Performance and stability improvements on all platforms. + + +2019-03-22: Version 7.5.99 + + Performance and stability improvements on all platforms. + + +2019-03-22: Version 7.5.98 + + Performance and stability improvements on all platforms. + + +2019-03-22: Version 7.5.97 + + Performance and stability improvements on all platforms. + + +2019-03-22: Version 7.5.96 + + Performance and stability improvements on all platforms. + + +2019-03-22: Version 7.5.95 + + Performance and stability improvements on all platforms. + + +2019-03-22: Version 7.5.94 + + Performance and stability improvements on all platforms. + + +2019-03-22: Version 7.5.93 + + Performance and stability improvements on all platforms. + + +2019-03-22: Version 7.5.92 + + Performance and stability improvements on all platforms. + + +2019-03-22: Version 7.5.91 + + Performance and stability improvements on all platforms. + + +2019-03-22: Version 7.5.90 + + Performance and stability improvements on all platforms. + + +2019-03-21: Version 7.5.89 + + Performance and stability improvements on all platforms. + + +2019-03-21: Version 7.5.88 + + Performance and stability improvements on all platforms. + + +2019-03-21: Version 7.5.87 + + Performance and stability improvements on all platforms. + + +2019-03-21: Version 7.5.86 + + Performance and stability improvements on all platforms. + + +2019-03-21: Version 7.5.85 + + Performance and stability improvements on all platforms. + + +2019-03-20: Version 7.5.84 + + Performance and stability improvements on all platforms. + + +2019-03-20: Version 7.5.83 + + Performance and stability improvements on all platforms. + + +2019-03-20: Version 7.5.82 + + Performance and stability improvements on all platforms. + + +2019-03-20: Version 7.5.81 + + Performance and stability improvements on all platforms. + + +2019-03-20: Version 7.5.80 + + Performance and stability improvements on all platforms. + + +2019-03-19: Version 7.5.79 + + Performance and stability improvements on all platforms. + + +2019-03-19: Version 7.5.78 + + Performance and stability improvements on all platforms. + + +2019-03-19: Version 7.5.77 + + Performance and stability improvements on all platforms. + + +2019-03-19: Version 7.5.76 + + Performance and stability improvements on all platforms. + + +2019-03-19: Version 7.5.75 + + Performance and stability improvements on all platforms. + + +2019-03-19: Version 7.5.74 + + Performance and stability improvements on all platforms. + + +2019-03-19: Version 7.5.73 + + Performance and stability improvements on all platforms. + + +2019-03-19: Version 7.5.72 + + Performance and stability improvements on all platforms. + + +2019-03-19: Version 7.5.71 + + Performance and stability improvements on all platforms. + + +2019-03-19: Version 7.5.70 + + Performance and stability improvements on all platforms. + + +2019-03-18: Version 7.5.69 + + Performance and stability improvements on all platforms. + + +2019-03-18: Version 7.5.68 + + Performance and stability improvements on all platforms. + + +2019-03-18: Version 7.5.67 + + Performance and stability improvements on all platforms. + + +2019-03-18: Version 7.5.66 + + Performance and stability improvements on all platforms. + + +2019-03-18: Version 7.5.65 + + Performance and stability improvements on all platforms. + + +2019-03-18: Version 7.5.64 + + Performance and stability improvements on all platforms. + + +2019-03-18: Version 7.5.63 + + Performance and stability improvements on all platforms. + + +2019-03-18: Version 7.5.62 + + Performance and stability improvements on all platforms. + + +2019-03-18: Version 7.5.61 + + Performance and stability improvements on all platforms. + + +2019-03-18: Version 7.5.60 + + Performance and stability improvements on all platforms. + + +2019-03-16: Version 7.5.59 + + Performance and stability improvements on all platforms. + + +2019-03-16: Version 7.5.58 + + Performance and stability improvements on all platforms. + + +2019-03-15: Version 7.5.57 + + Performance and stability improvements on all platforms. + + +2019-03-15: Version 7.5.56 + + Performance and stability improvements on all platforms. + + +2019-03-15: Version 7.5.55 + + Performance and stability improvements on all platforms. + + +2019-03-15: Version 7.5.54 + + Performance and stability improvements on all platforms. + + +2019-03-15: Version 7.5.53 + + Performance and stability improvements on all platforms. + + +2019-03-15: Version 7.5.52 + + Performance and stability improvements on all platforms. + + +2019-03-15: Version 7.5.51 + + Performance and stability improvements on all platforms. + + +2019-03-14: Version 7.5.50 + + Performance and stability improvements on all platforms. + + +2019-03-14: Version 7.5.49 + + Performance and stability improvements on all platforms. + + +2019-03-14: Version 7.5.48 + + Performance and stability improvements on all platforms. + + +2019-03-14: Version 7.5.47 + + Performance and stability improvements on all platforms. + + +2019-03-14: Version 7.5.46 + + Performance and stability improvements on all platforms. + + +2019-03-14: Version 7.5.45 + + Performance and stability improvements on all platforms. + + +2019-03-14: Version 7.5.44 + + Performance and stability improvements on all platforms. + + +2019-03-14: Version 7.5.43 + + Performance and stability improvements on all platforms. + + +2019-03-14: Version 7.5.42 + + Performance and stability improvements on all platforms. + + +2019-03-14: Version 7.5.41 + + Performance and stability improvements on all platforms. + + +2019-03-14: Version 7.5.40 + + Performance and stability improvements on all platforms. + + +2019-03-14: Version 7.5.39 + + Performance and stability improvements on all platforms. + + +2019-03-14: Version 7.5.38 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.37 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.36 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.35 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.34 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.33 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.32 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.31 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.30 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.29 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.28 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.27 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.26 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.25 + + Performance and stability improvements on all platforms. + + +2019-03-13: Version 7.5.24 + + Performance and stability improvements on all platforms. + + +2019-03-12: Version 7.5.23 + + Performance and stability improvements on all platforms. + + +2019-03-12: Version 7.5.22 + + Performance and stability improvements on all platforms. + + +2019-03-12: Version 7.5.21 + + Performance and stability improvements on all platforms. + + +2019-03-12: Version 7.5.20 + + Performance and stability improvements on all platforms. + + +2019-03-12: Version 7.5.19 + + Performance and stability improvements on all platforms. + + +2019-03-12: Version 7.5.18 + + Performance and stability improvements on all platforms. + + +2019-03-12: Version 7.5.17 + + Performance and stability improvements on all platforms. + + +2019-03-11: Version 7.5.16 + + Performance and stability improvements on all platforms. + + +2019-03-11: Version 7.5.15 + + Performance and stability improvements on all platforms. + + +2019-03-11: Version 7.5.14 + + Performance and stability improvements on all platforms. + + +2019-03-11: Version 7.5.13 + + Performance and stability improvements on all platforms. + + +2019-03-11: Version 7.5.12 + + Performance and stability improvements on all platforms. + + +2019-03-11: Version 7.5.11 + + Performance and stability improvements on all platforms. + + +2019-03-09: Version 7.5.10 + + Performance and stability improvements on all platforms. + + +2019-03-09: Version 7.5.9 + + Performance and stability improvements on all platforms. + + +2019-03-09: Version 7.5.8 + + Performance and stability improvements on all platforms. + + +2019-03-08: Version 7.5.7 + + Performance and stability improvements on all platforms. + + +2019-03-08: Version 7.5.6 + + Performance and stability improvements on all platforms. + + +2019-03-08: Version 7.5.5 + + Performance and stability improvements on all platforms. + + +2019-03-08: Version 7.5.4 + + Performance and stability improvements on all platforms. + + +2019-03-08: Version 7.5.3 + + Performance and stability improvements on all platforms. + + +2019-03-08: Version 7.5.2 + + Performance and stability improvements on all platforms. + + +2019-03-08: Version 7.5.1 + + Performance and stability improvements on all platforms. + + +2019-03-07: Version 7.4.301 + + Performance and stability improvements on all platforms. + + +2019-03-07: Version 7.4.300 + + Performance and stability improvements on all platforms. + + +2019-03-06: Version 7.4.299 + + Performance and stability improvements on all platforms. + + +2019-03-06: Version 7.4.298 + + Performance and stability improvements on all platforms. + + +2019-03-06: Version 7.4.297 + + Performance and stability improvements on all platforms. + + +2019-03-06: Version 7.4.296 + + Performance and stability improvements on all platforms. + + +2019-03-06: Version 7.4.295 + + Performance and stability improvements on all platforms. + + +2019-03-06: Version 7.4.294 + + Performance and stability improvements on all platforms. + + +2019-03-06: Version 7.4.293 + + Performance and stability improvements on all platforms. + + +2019-03-06: Version 7.4.292 + + Performance and stability improvements on all platforms. + + +2019-03-06: Version 7.4.291 + + Performance and stability improvements on all platforms. + + +2019-03-06: Version 7.4.290 + + Performance and stability improvements on all platforms. + + +2019-03-06: Version 7.4.289 + + Performance and stability improvements on all platforms. + + 2019-03-05: Version 7.4.288 Performance and stability improvements on all platforms. diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 1837bd96bce8ad..450bfd7862403e 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -5,46 +5,160 @@ vars = { 'checkout_instrumented_libraries': False, 'chromium_url': 'https://chromium.googlesource.com', + 'android_url': 'https://android.googlesource.com', 'download_gcmole': False, 'download_jsfunfuzz': False, 'download_mips_toolchain': False, 'check_v8_header_includes': False, + # GN CIPD package version. + 'gn_version': 'git_revision:64b846c96daeb3eaf08e26d8a84d8451c6cb712b', + # luci-go CIPD package version. 'luci_go': 'git_revision:25958d48e89e980e2a97daeddc977fb5e2e1fb8c', + + # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling android_sdk_build-tools_version + # and whatever else without interference from each other. + 'android_sdk_build-tools_version': 'DLK621q5_Bga5EsOr7cp6bHWWxFKx6UHLu_Ix_m3AckC', + # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling android_sdk_emulator_version + # and whatever else without interference from each other. + 'android_sdk_emulator_version': 'ki7EDQRAiZAUYlnTWR1XmI6cJTk65fJ-DNZUU1zrtS8C', + # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling android_sdk_extras_version + # and whatever else without interference from each other. + 'android_sdk_extras_version': 'iIwhhDox5E-mHgwUhCz8JACWQCpUjdqt5KTY9VLugKQC', + # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling android_sdk_patcher_version + # and whatever else without interference from each other. + 'android_sdk_patcher_version': 'I6FNMhrXlpB-E1lOhMlvld7xt9lBVNOO83KIluXDyA0C', + # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling android_sdk_platform-tools_version + # and whatever else without interference from each other. + 'android_sdk_platform-tools_version': '4Y2Cb2LGzoc-qt-oIUIlhySotJaKeE3ELFedSVe6Uk8C', + # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling android_sdk_platforms_version + # and whatever else without interference from each other. + 'android_sdk_platforms_version': 'Kg2t9p0YnQk8bldUv4VA3o156uPXLUfIFAmVZ-Gm5ewC', + # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling android_sdk_sources_version + # and whatever else without interference from each other. + 'android_sdk_sources_version': 'K9uEn3JvNELEVjjVK_GQD3ZQD3rqAnJSxCWxjmUmRkgC', + # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling android_sdk_tools_version + # and whatever else without interference from each other. + 'android_sdk_tools_version': 'wYcRQC2WHsw2dKWs4EA7fw9Qsyzu1ds1_fRjKmGxe5QC', + # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling android_sdk_tools-lint_version + # and whatever else without interference from each other. + 'android_sdk_tools-lint_version': '89hXqZYzCum3delB5RV7J_QyWkaRodqdtQS0s3LMh3wC', } deps = { 'v8/build': - Var('chromium_url') + '/chromium/src/build.git' + '@' + '80892bfe019dc854c6acdbfbb7304cca63986d4f', + Var('chromium_url') + '/chromium/src/build.git' + '@' + 'a0b2e3b2708bcf81ec00ac1738b586bcc5e04eea', 'v8/third_party/depot_tools': - Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + 'cf661acb705fccc302901a1f8a251ad43ce2dd62', + Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '7e7523be4e21b0841ae815ef37521a5476f68549', 'v8/third_party/icu': - Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '8c67416ccb4da42d817e7081ff83a2193b1aabe7', + Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '35f7e139f33f1ddbfdb68b65dda29aff430c3f6f', 'v8/third_party/instrumented_libraries': Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + 'a959e4f0cb643003f2d75d179cede449979e3e77', 'v8/buildtools': - Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '3e50219fc4503f461b2176a9976891b28d80f9ab', + Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + 'd5c58b84d50d256968271db459cd29b22bff1ba2', 'v8/buildtools/clang_format/script': Var('chromium_url') + '/chromium/llvm-project/cfe/tools/clang-format.git' + '@' + '96636aa0e9f047f17447f2d45a094d0b59ed7917', + 'v8/buildtools/linux64': { + 'packages': [ + { + 'package': 'gn/gn/linux-amd64', + 'version': Var('gn_version'), + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "linux"', + }, + 'v8/buildtools/mac': { + 'packages': [ + { + 'package': 'gn/gn/mac-amd64', + 'version': Var('gn_version'), + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "mac"', + }, 'v8/buildtools/third_party/libc++/trunk': - Var('chromium_url') + '/chromium/llvm-project/libcxx.git' + '@' + '22d3f6dd25e5efc59124ba1c00b8f98b14be4201', + Var('chromium_url') + '/chromium/llvm-project/libcxx.git' + '@' + '9b96c3dbd4e89c10d9fd8364da4b65f93c6f4276', 'v8/buildtools/third_party/libc++abi/trunk': Var('chromium_url') + '/chromium/llvm-project/libcxxabi.git' + '@' + '0d529660e32d77d9111912d73f2c74fc5fa2a858', 'v8/buildtools/third_party/libunwind/trunk': Var('chromium_url') + '/external/llvm.org/libunwind.git' + '@' + '69d9b84cca8354117b9fe9705a4430d789ee599b', + 'v8/buildtools/win': { + 'packages': [ + { + 'package': 'gn/gn/windows-amd64', + 'version': Var('gn_version'), + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "win"', + }, 'v8/base/trace_event/common': - Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + '936ba8a963284a6b3737cf2f0474a7131073abee', + Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + 'ebb658ab38d1b23183458ed0430f5b11853a25a3', 'v8/third_party/android_ndk': { 'url': Var('chromium_url') + '/android_ndk.git' + '@' + '4e2cea441bfd43f0863d14f57b1e1844260b9884', 'condition': 'checkout_android', }, + # This is deprecated. 'v8/third_party/android_tools': { 'url': Var('chromium_url') + '/android_tools.git' + '@' + '347a7c8078a009e98995985b7ab6ec6b35696dea', 'condition': 'checkout_android', }, + 'v8/third_party/android_sdk/public': { + 'packages': [ + { + 'package': 'chromium/third_party/android_sdk/public/build-tools', + 'version': Var('android_sdk_build-tools_version'), + }, + { + 'package': 'chromium/third_party/android_sdk/public/emulator', + 'version': Var('android_sdk_emulator_version'), + }, + { + 'package': 'chromium/third_party/android_sdk/public/extras', + 'version': Var('android_sdk_extras_version'), + }, + { + 'package': 'chromium/third_party/android_sdk/public/patcher', + 'version': Var('android_sdk_patcher_version'), + }, + { + 'package': 'chromium/third_party/android_sdk/public/platform-tools', + 'version': Var('android_sdk_platform-tools_version'), + }, + { + 'package': 'chromium/third_party/android_sdk/public/platforms', + 'version': Var('android_sdk_platforms_version'), + }, + { + 'package': 'chromium/third_party/android_sdk/public/sources', + 'version': Var('android_sdk_sources_version'), + }, + { + 'package': 'chromium/third_party/android_sdk/public/tools', + 'version': Var('android_sdk_tools_version'), + }, + { + 'package': 'chromium/third_party/android_sdk/public/tools-lint', + 'version': Var('android_sdk_tools-lint_version'), + }, + ], + 'condition': 'checkout_android', + 'dep_type': 'cipd', + }, 'v8/third_party/catapult': { - 'url': Var('chromium_url') + '/catapult.git' + '@' + 'ccc29087522abefc852d1294595ae6db7e86d649', + 'url': Var('chromium_url') + '/catapult.git' + '@' + 'acbf095c15e9524a0a1116792c3b6698f8e9b85b', 'condition': 'checkout_android', }, 'v8/third_party/colorama/src': { @@ -52,25 +166,25 @@ deps = { 'condition': 'checkout_android', }, 'v8/third_party/fuchsia-sdk': { - 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-sdk.git' + '@' + '8e8db13b538ecb251e5ce9d5c781fc142f9752fd', + 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-sdk.git' + '@' + 'a42c2f604f3ae23099e73605df7864988d289d98', 'condition': 'checkout_fuchsia', }, 'v8/third_party/googletest/src': - Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + 'efecb0bfa687cf87836494f5d62868485c00fb66', + Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + 'b617b277186e03b1065ac6d43912b1c4147c2982', 'v8/third_party/jinja2': Var('chromium_url') + '/chromium/src/third_party/jinja2.git' + '@' + 'b41863e42637544c2941b574c7877d3e1f663e25', 'v8/third_party/markupsafe': Var('chromium_url') + '/chromium/src/third_party/markupsafe.git' + '@' + '8f45f5cfa0009d2a70589bcda0349b8cb2b72783', 'v8/tools/swarming_client': - Var('chromium_url') + '/infra/luci/client-py.git' + '@' + '7a61cf37d6a0163f0ec02d495289a1d038e62457', + Var('chromium_url') + '/infra/luci/client-py.git' + '@' + 'aa60736aded9fc32a0e21a81f5fc51f6009d01f3', 'v8/test/benchmarks/data': Var('chromium_url') + '/v8/deps/third_party/benchmarks.git' + '@' + '05d7188267b4560491ff9155c5ee13e207ecd65f', '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' + '@' + '565d7d5b7dd808d9267006b83ac4ea9c48f782cc', + Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + '8e5ab69e8c31135265cba570d54d41f6ade19e45', 'v8/test/test262/harness': - Var('chromium_url') + '/external/github.com/test262-utils/test262-harness-py.git' + '@' + '0f2acdd882c84cff43b9d60df7574a1901e2cdcd', + Var('chromium_url') + '/external/github.com/test262-utils/test262-harness-py.git' + '@' + '9bd99c6f33be10561970bfe16f2f16a8a3d88722', 'v8/third_party/qemu-linux-x64': { 'packages': [ { @@ -92,7 +206,7 @@ deps = { 'dep_type': 'cipd', }, 'v8/tools/clang': - Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '257c91cc44b07bd06ff03dde809ccbc46a22bec6', + Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + 'edee5c0b3641ab345cbe3cf29f1b1cdbd6819549', 'v8/tools/luci-go': { 'packages': [ { @@ -111,10 +225,23 @@ deps = { 'condition': 'host_cpu != "s390"', 'dep_type': 'cipd', }, + 'v8/tools/clang/dsymutil': { + 'packages': [ + { + 'package': 'chromium/llvm-build-tools/dsymutil', + 'version': 'OWlhXkmj18li3yhJk59Kmjbc5KdgLh56TwCd1qBdzlIC', + } + ], + 'condition': 'checkout_mac', + 'dep_type': 'cipd', + }, 'v8/test/wasm-js/data': - Var('chromium_url') + '/external/github.com/WebAssembly/spec.git' + '@' + '44dfa15cb87b1e9bef36e033ad5d2cdc4c2008fd', + Var('chromium_url') + '/external/github.com/WebAssembly/spec.git' + '@' + 'd14d538e5fccdc03a02948963addad10ad45b50d', + 'v8/third_party/perfetto': + Var('android_url') + '/platform/external/perfetto.git' + '@' + '21a33afeef568f72668acf77668a32307a363d6e', + 'v8/third_party/protobuf': + Var('chromium_url') + '/external/github.com/google/protobuf'+ '@' + 'b68a347f56137b4b1a746e8c7438495a6ac1bd91', } - recursedeps = [ 'v8/third_party/android_tools', ] @@ -216,43 +343,6 @@ hooks = [ '--platform=linux*', ], }, - # Pull GN using checked-in hashes. - { - 'name': 'gn_win', - 'pattern': '.', - 'condition': 'host_os == "win"', - 'action': [ 'download_from_google_storage', - '--no_resume', - '--platform=win32', - '--no_auth', - '--bucket', 'chromium-gn', - '-s', 'v8/buildtools/win/gn.exe.sha1', - ], - }, - { - 'name': 'gn_mac', - 'pattern': '.', - 'condition': 'host_os == "mac"', - 'action': [ 'download_from_google_storage', - '--no_resume', - '--platform=darwin', - '--no_auth', - '--bucket', 'chromium-gn', - '-s', 'v8/buildtools/mac/gn.sha1', - ], - }, - { - 'name': 'gn_linux', - 'pattern': '.', - 'condition': 'host_os == "linux"', - 'action': [ 'download_from_google_storage', - '--no_resume', - '--platform=linux*', - '--no_auth', - '--bucket', 'chromium-gn', - '-s', 'v8/buildtools/linux64/gn.sha1', - ], - }, { 'name': 'wasm_spec_tests', 'pattern': '.', diff --git a/deps/v8/LICENSE b/deps/v8/LICENSE index a1e403f82bac6b..53d9c47e33c182 100644 --- a/deps/v8/LICENSE +++ b/deps/v8/LICENSE @@ -20,11 +20,13 @@ are: This code is copyrighted by Sun Microsystems Inc. and released under a 3-clause BSD license. - - Valgrind client API header, located at third_party/valgrind/valgrind.h - This is release under the BSD license. + - Valgrind client API header, located at src/third_party/valgrind/valgrind.h + This is released under the BSD license. - - antlr4 parser generator Cpp library located in third_party/antlr4 - This is release under the BSD license. + - The Wasm C/C++ API headers, located at third_party/wasm-api/wasm.{h,hh} + This is released under the Apache license. The API's upstream prototype + implementation also formed the basis of V8's implementation in + src/wasm/c-api.cc. These libraries have their own licenses; we recommend you read them, as their terms may differ from the terms below. diff --git a/deps/v8/OWNERS b/deps/v8/OWNERS index e41066126a2be6..b2161c06ca6a2c 100644 --- a/deps/v8/OWNERS +++ b/deps/v8/OWNERS @@ -31,6 +31,7 @@ petermarshall@chromium.org rmcilroy@chromium.org sergiyb@chromium.org sigurds@chromium.org +szuend@chromium.org tebbi@chromium.org titzer@chromium.org ulan@chromium.org diff --git a/deps/v8/README.md b/deps/v8/README.md index 840c4971f91527..5c548542eeab8c 100644 --- a/deps/v8/README.md +++ b/deps/v8/README.md @@ -10,7 +10,7 @@ browser from Google. V8 can run standalone, or can be embedded into any C++ application. -V8 Project page: https://github.com/v8/v8/wiki +V8 Project page: https://v8.dev/docs Getting the Code @@ -36,5 +36,5 @@ configuration in `.git/config`: Contributing ============= -Please follow the instructions mentioned on the -[V8 wiki](https://github.com/v8/v8/wiki/Contributing). +Please follow the instructions mentioned at +[v8.dev/docs/contribute](https://v8.dev/docs/contribute). diff --git a/deps/v8/base/trace_event/common/trace_event_common.h b/deps/v8/base/trace_event/common/trace_event_common.h index 6837eb95d0227c..f9b9ad3b014063 100644 --- a/deps/v8/base/trace_event/common/trace_event_common.h +++ b/deps/v8/base/trace_event/common/trace_event_common.h @@ -985,17 +985,6 @@ TRACE_EVENT_PHASE_LEAVE_CONTEXT, category_group, name, context, \ TRACE_EVENT_FLAG_NONE) -// Macro to specify that two trace IDs are identical. For example, -// TRACE_LINK_IDS( -// "category", "name", -// TRACE_ID_WITH_SCOPE("net::URLRequest", 0x1000), -// TRACE_ID_WITH_SCOPE("blink::ResourceFetcher::FetchRequest", 0x2000)) -// tells the trace consumer that events with ID ("net::URLRequest", 0x1000) from -// the current process have the same ID as events with ID -// ("blink::ResourceFetcher::FetchRequest", 0x2000). -#define TRACE_LINK_IDS(category_group, name, id, linked_id) \ - INTERNAL_TRACE_EVENT_ADD_LINK_IDS(category_group, name, id, linked_id); - // Macro to efficiently determine if a given category group is enabled. #define TRACE_EVENT_CATEGORY_GROUP_ENABLED(category_group, ret) \ do { \ @@ -1080,6 +1069,10 @@ #define TRACE_EVENT_FLAG_HAS_PROCESS_ID (static_cast(1 << 11)) #define TRACE_EVENT_FLAG_HAS_LOCAL_ID (static_cast(1 << 12)) #define TRACE_EVENT_FLAG_HAS_GLOBAL_ID (static_cast(1 << 13)) +#define TRACE_EVENT_FLAG_DISALLOW_POSTTASK (static_cast(1 << 14)) +// TODO(eseckler): Remove once we have native support for typed proto events in +// TRACE_EVENT macros. +#define TRACE_EVENT_FLAG_TYPED_PROTO_ARGS (static_cast(1 << 15)) #define TRACE_EVENT_FLAG_SCOPE_MASK \ (static_cast(TRACE_EVENT_FLAG_SCOPE_OFFSET | \ diff --git a/deps/v8/build_overrides/build.gni b/deps/v8/build_overrides/build.gni index e4dcf1cc46a820..12ef8b28d6b612 100644 --- a/deps/v8/build_overrides/build.gni +++ b/deps/v8/build_overrides/build.gni @@ -6,6 +6,16 @@ # Chromium specific targets in a client project's GN file etc. build_with_chromium = false +# Used by perfetto to distinguish from its own standalone build and the +# chromium build. +perfetto_build_with_embedder = true + +# When embedding perfetto, its build files need to know in which BUILD.gn file +# the embedder (v8) declared the protobuf targets. In the v8 case they are +# declared in the root v8/BUILD.gn. +perfetto_protobuf_target_prefix = "//" +perfetto_protobuf_gni = "//gni/proto_library.gni" + # Uncomment these to specify a different NDK location and version in # non-Chromium builds. # default_android_ndk_root = "//third_party/android_ndk" diff --git a/deps/v8/docs/README.md b/deps/v8/docs/README.md index 0eded673b84cff..e84a81dfdc16a6 100644 --- a/deps/v8/docs/README.md +++ b/deps/v8/docs/README.md @@ -1,2 +1 @@ -The documentation for V8 can be found at the -[V8 Wiki](https://github.com/v8/v8/wiki). +The documentation for V8 can be found at [v8.dev/docs](https://v8.dev/docs). diff --git a/deps/v8/gni/proto_library.gni b/deps/v8/gni/proto_library.gni new file mode 100644 index 00000000000000..6a00276289e1d2 --- /dev/null +++ b/deps/v8/gni/proto_library.gni @@ -0,0 +1,218 @@ +# Copyright 2019 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build_overrides/build.gni") + +# This file should not be pulled in chromium builds. +assert(!build_with_chromium) + +template("proto_library") { + assert(defined(invoker.sources)) + proto_sources = invoker.sources + + set_sources_assignment_filter([]) + + # All the proto imports should be relative to the project root. + proto_in_dir = "//" + if (defined(invoker.proto_in_dir)) { + proto_in_dir = invoker.proto_in_dir + } + assert(defined(invoker.proto_out_dir), + "proto_out_dir must be explicitly defined") + proto_out_dir = invoker.proto_out_dir + + # We don't support generate_python in the standalone build, but still must + # check that the caller sets this to false. This is because when building in + # the chromium tree, chromium's proto_library.gni in chrome (!= this) defaults + # generate_python = true. + assert(defined(invoker.generate_python) && !invoker.generate_python) + + # If false will not generate the default .pb.{cc,h} files. Used for custom + # codegen plugins. + generate_cc = true + if (defined(invoker.generate_cc)) { + generate_cc = invoker.generate_cc + } + + generate_descriptor = "" + if (defined(invoker.generate_descriptor)) { + generate_descriptor = invoker.generate_descriptor + } + + if (defined(invoker.generator_plugin_label)) { + plugin_host_label = invoker.generator_plugin_label + "($host_toolchain)" + plugin_path = get_label_info(plugin_host_label, "root_out_dir") + "/" + + get_label_info(plugin_host_label, "name") + generate_with_plugin = true + } else if (defined(invoker.generator_plugin_script)) { + plugin_path = invoker.generator_plugin_script + generate_with_plugin = true + } else { + generate_with_plugin = false + } + + if (generate_with_plugin) { + if (defined(invoker.generator_plugin_suffix)) { + generator_plugin_suffixes = [ + "${invoker.generator_plugin_suffix}.h", + "${invoker.generator_plugin_suffix}.cc", + ] + } else { + generator_plugin_suffixes = invoker.generator_plugin_suffixes + } + } + + cc_out_dir = "$root_gen_dir/" + proto_out_dir + rel_cc_out_dir = rebase_path(cc_out_dir, root_build_dir) + + protos = rebase_path(proto_sources, proto_in_dir) + protogens = [] + + if (generate_descriptor != "") { + protogens += [ "$root_gen_dir/" + generate_descriptor ] + } + + foreach(proto, protos) { + proto_dir = get_path_info(proto, "dir") + proto_name = get_path_info(proto, "name") + proto_path = proto_dir + "/" + proto_name + + if (generate_cc) { + protogens += [ + "$cc_out_dir/$proto_path.pb.h", + "$cc_out_dir/$proto_path.pb.cc", + ] + } + if (generate_with_plugin) { + foreach(suffix, generator_plugin_suffixes) { + protogens += [ "$cc_out_dir/${proto_path}${suffix}" ] + } + } + } + + config_name = "${target_name}_config" + action_name = "${target_name}_gen" + source_set_name = target_name + + config(config_name) { + include_dirs = [ cc_out_dir ] + } + + # The XXX_gen action that generates the .pb.{cc,h} files. + action(action_name) { + visibility = [ ":$source_set_name" ] + script = "//build/gn_run_binary.py" + sources = proto_sources + outputs = get_path_info(protogens, "abspath") + + protoc_label = "//:protoc($host_toolchain)" + protoc_path = get_label_info(protoc_label, "root_out_dir") + "/protoc" + args = [ + # Path should be rebased because |root_build_dir| for current toolchain + # may be different from |root_out_dir| of protoc built on host toolchain. + "./" + rebase_path(protoc_path, root_build_dir), + "--proto_path", + rebase_path(proto_in_dir, root_build_dir), + ] + if (generate_cc) { + args += [ + "--cpp_out", + rel_cc_out_dir, + ] + } + if (generate_descriptor != "") { + args += [ + "--include_imports", + "--descriptor_set_out", + rebase_path("$root_gen_dir/" + generate_descriptor, root_build_dir), + ] + } + + if (generate_with_plugin) { + plugin_path_rebased = rebase_path(plugin_path, root_build_dir) + plugin_out_args = "" + if (defined(invoker.generator_plugin_options)) { + plugin_out_args += invoker.generator_plugin_options + } + plugin_out_args += ":$rel_cc_out_dir" + + args += [ + "--plugin=protoc-gen-plugin=$plugin_path_rebased", + "--plugin_out=$plugin_out_args", + ] + } + + args += rebase_path(proto_sources, root_build_dir) + + inputs = [ + protoc_path, + ] + + deps = [ + protoc_label, + ] + if (generate_with_plugin) { + inputs += [ plugin_path ] + if (defined(plugin_host_label)) { + # Action depends on native generator plugin but for host toolchain only. + deps += [ plugin_host_label ] + } + } + + if (defined(invoker.proto_deps)) { + deps += invoker.proto_deps + } + if (defined(invoker.deps)) { + deps += invoker.deps + } + } # action "${target_name}_gen" + + # The source_set that builds the generated .pb.cc files. + source_set(target_name) { + forward_variables_from(invoker, + [ + "defines", + "include_dirs", + "public_configs", + "testonly", + "visibility", + ]) + + sources = get_target_outputs(":$action_name") + + # configs -= [ "//gn/standalone:extra_warnings" ] + if (defined(invoker.extra_configs)) { + configs += invoker.extra_configs + } + + if (!defined(invoker.public_configs)) { + public_configs = [] + } + + public_configs += [ + "//:protobuf_gen_config", + ":$config_name", + ] + + # Use protobuf_full only for tests. + if (defined(invoker.use_protobuf_full) && + invoker.use_protobuf_full == true) { + deps = [ + "//:protobuf_full", + ] + } else { + deps = [ + "//:protobuf_lite", + ] + } + + deps += [ ":$action_name" ] + if (defined(invoker.deps)) { + deps += invoker.deps + } + if (defined(invoker.link_deps)) { + deps += invoker.link_deps + } + } # source_set(target_name) +} # template diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index 2a691dfa60d621..0a120df8e1a6fd 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -31,11 +31,18 @@ declare_args() { # Support for backtrace_symbols on linux. v8_enable_backtrace = "" + # Enables raw heap snapshots containing internals. Used for debugging memory + # on platform and embedder level. + v8_enable_raw_heap_snapshots = false + # Enable the snapshot feature, for fast context creation. # https://v8.dev/blog/custom-startup-snapshots # TODO(thakis): Make snapshots work in 64-bit win/cross builds, # https://803591 - v8_use_snapshot = !(is_win && host_os != "win" && target_cpu == "x64") + # On Mac hosts, 32-bit builds targeting Windows can't use snapshots, see + # https://crbug.com/794838 + v8_use_snapshot = !(is_win && host_os != "win" && target_cpu == "x64") && + !(is_win && host_os == "mac" && target_cpu == "x86") # Enable several snapshots side-by-side (e.g. default and for trusted code). v8_use_multi_snapshots = false @@ -94,8 +101,20 @@ v8_add_configs = [ v8_path_prefix + ":toolchain", ] -v8_remove_configs += [ "//build/config/compiler:default_optimization" ] -v8_add_configs += [ v8_path_prefix + ":default_optimization" ] +if (is_debug && !v8_optimized_debug) { + v8_remove_configs += [ "//build/config/compiler:default_optimization" ] + v8_add_configs += [ "//build/config/compiler:no_optimize" ] +} else { + v8_remove_configs += [ "//build/config/compiler:default_optimization" ] + + # TODO(crbug.com/621335) Rework this so that we don't have the confusion + # between "optimize_speed" and "optimize_max". + if (((is_posix && !is_android) || is_fuchsia) && !using_sanitizer) { + v8_add_configs += [ "//build/config/compiler:optimize_speed" ] + } else { + v8_add_configs += [ "//build/config/compiler:optimize_max" ] + } +} if (v8_code_coverage && !is_clang) { v8_add_configs += [ diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h index ada2dbbe5c1c04..672a694e0796be 100644 --- a/deps/v8/include/v8-profiler.h +++ b/deps/v8/include/v8-profiler.h @@ -48,7 +48,7 @@ template class V8_EXPORT std::vector; namespace v8 { // TickSample captures the information collected for each sample. -struct TickSample { +struct V8_EXPORT TickSample { // Internal profiling (with --prof + tools/$OS-tick-processor) wants to // include the runtime function we're calling. Externally exposed tick // samples don't care. @@ -129,6 +129,20 @@ class V8_EXPORT CpuProfileNode { unsigned int hit_count; }; + // An annotation hinting at the source of a CpuProfileNode. + enum SourceType { + // User-supplied script with associated resource information. + kScript = 0, + // Native scripts and provided builtins. + kBuiltin = 1, + // Callbacks into native code. + kCallback = 2, + // VM-internal functions or state. + kInternal = 3, + // A node that failed to symbolize. + kUnresolved = 4, + }; + /** Returns function name (empty string for anonymous functions.) */ Local GetFunctionName() const; @@ -152,6 +166,12 @@ class V8_EXPORT CpuProfileNode { */ const char* GetScriptResourceNameStr() const; + /** + * Return true if the script from where the function originates is flagged as + * being shared cross-origin. + */ + bool IsScriptSharedCrossOrigin() const; + /** * Returns the number, 1-based, of the line where the function originates. * kNoLineNumberInfo if no line number information is available. @@ -194,12 +214,20 @@ class V8_EXPORT CpuProfileNode { /** Returns id of the node. The id is unique within the tree */ unsigned GetNodeId() const; + /** + * Gets the type of the source which the node was captured from. + */ + SourceType GetSourceType() const; + /** Returns child nodes count of the node. */ int GetChildrenCount() const; /** Retrieves a child node by index. */ const CpuProfileNode* GetChild(int index) const; + /** Retrieves the ancestor node, or null if the root. */ + const CpuProfileNode* GetParent() const; + /** Retrieves deopt infos for the node. */ const std::vector& GetDeoptInfos() const; @@ -301,6 +329,15 @@ class V8_EXPORT CpuProfiler { */ void SetSamplingInterval(int us); + /** + * Sets whether or not the profiler should prioritize consistency of sample + * periodicity on Windows. Disabling this can greatly reduce CPU usage, but + * may result in greater variance in sample timings from the platform's + * scheduler. Defaults to enabled. This method must be called when there are + * no profiles being recorded. + */ + void SetUsePreciseSampling(bool); + /** * Starts collecting CPU profile. Title may be an empty string. It * is allowed to have several profiles being collected at diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 4093306dc83585..dfcd5b467dbf82 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 7 -#define V8_MINOR_VERSION 4 +#define V8_MINOR_VERSION 5 #define V8_BUILD_NUMBER 288 -#define V8_PATCH_LEVEL 27 +#define V8_PATCH_LEVEL 22 // 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 7e48cd422db289..b5b18a29852b47 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -2520,9 +2520,9 @@ class V8_EXPORT Value : public Data { V8_WARN_UNUSED_RESULT MaybeLocal ToBigInt( Local context) const; - V8_DEPRECATE_SOON("ToBoolean can never throw. Use Local version.", - V8_WARN_UNUSED_RESULT MaybeLocal ToBoolean( - Local context) const); + V8_DEPRECATED("ToBoolean can never throw. Use Local version.", + V8_WARN_UNUSED_RESULT MaybeLocal ToBoolean( + Local context) const); V8_WARN_UNUSED_RESULT MaybeLocal ToNumber( Local context) const; V8_WARN_UNUSED_RESULT MaybeLocal ToString( @@ -2538,16 +2538,16 @@ class V8_EXPORT Value : public Data { V8_WARN_UNUSED_RESULT MaybeLocal ToInt32(Local context) const; Local ToBoolean(Isolate* isolate) const; - V8_DEPRECATE_SOON("Use maybe version", - Local ToNumber(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToString(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToObject(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToInteger(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToInt32(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToNumber(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToString(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToObject(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToInteger(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToInt32(Isolate* isolate) const); /** * Attempts to convert a string to an array index. @@ -2906,7 +2906,7 @@ class V8_EXPORT String : public Name { int length = -1); /** Allocates a new string from UTF-16 data.*/ - static V8_DEPRECATE_SOON( + static V8_DEPRECATED( "Use maybe version", Local NewFromTwoByte(Isolate* isolate, const uint16_t* data, NewStringType type = kNormalString, @@ -2955,7 +2955,7 @@ class V8_EXPORT String : public Name { * should the underlying buffer be deallocated or modified except through the * destructor of the external string resource. */ - static V8_DEPRECATE_SOON( + static V8_DEPRECATED( "Use maybe version", Local NewExternal(Isolate* isolate, ExternalOneByteStringResource* resource)); @@ -5224,9 +5224,11 @@ class V8_EXPORT SharedArrayBuffer : public Object { * Create a new SharedArrayBuffer over an existing memory block. Propagate * flags to indicate whether the underlying buffer can be grown. */ - static Local New( - Isolate* isolate, const SharedArrayBuffer::Contents&, - ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized); + V8_DEPRECATED("Use New method with data, and byte_length instead.", + static Local New( + Isolate* isolate, const SharedArrayBuffer::Contents&, + ArrayBufferCreationMode mode = + ArrayBufferCreationMode::kExternalized)); /** * Returns true if SharedArrayBuffer is externalized, that is, does not @@ -5315,11 +5317,10 @@ class V8_EXPORT Date : public Object { * This API should not be called more than needed as it will * negatively impact the performance of date operations. */ - V8_DEPRECATE_SOON( - "Use Isolate::DateTimeConfigurationChangeNotification", - static void DateTimeConfigurationChangeNotification( - Isolate* isolate, - TimeZoneDetection time_zone_detection = TimeZoneDetection::kSkip)); + V8_DEPRECATED("Use Isolate::DateTimeConfigurationChangeNotification", + static void DateTimeConfigurationChangeNotification( + Isolate* isolate, TimeZoneDetection time_zone_detection = + TimeZoneDetection::kSkip)); private: static void CheckCast(Value* obj); @@ -6681,7 +6682,7 @@ typedef void (*HostInitializeImportMetaObjectCallback)(Local context, * first accessed. The return value will be used as the stack value. If this * callback is registed, the |Error.prepareStackTrace| API will be disabled. * |sites| is an array of call sites, specified in - * https://github.com/v8/v8/wiki/Stack-Trace-API + * https://v8.dev/docs/stack-trace-api */ typedef MaybeLocal (*PrepareStackTraceCallback)(Local context, Local error, @@ -7165,6 +7166,13 @@ enum JitCodeEventOptions { */ typedef void (*JitCodeEventHandler)(const JitCodeEvent* event); +/** + * Callback function passed to SetUnhandledExceptionCallback. + */ +#if defined(V8_OS_WIN) +typedef int (*UnhandledExceptionCallback)( + _EXCEPTION_POINTERS* exception_pointers); +#endif /** * Interface for iterating through all external resources in the heap. @@ -8379,13 +8387,13 @@ class V8_EXPORT Isolate { /** * Returns a memory range that can potentially contain jitted code. Code for * V8's 'builtins' will not be in this range if embedded builtins is enabled. - * Instead, see GetEmbeddedCodeRange. * * On Win64, embedders are advised to install function table callbacks for * these ranges, as default SEH won't be able to unwind through jitted code. - * * The first page of the code range is reserved for the embedder and is - * committed, writable, and executable. + * committed, writable, and executable, to be used to store unwind data, as + * documented in + * https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64. * * Might be empty on other platforms. * @@ -8785,6 +8793,20 @@ class V8_EXPORT V8 { */ static bool EnableWebAssemblyTrapHandler(bool use_v8_signal_handler); +#if defined(V8_OS_WIN) + /** + * On Win64, by default V8 does not emit unwinding data for jitted code, + * which means the OS cannot walk the stack frames and the system Structured + * Exception Handling (SEH) cannot unwind through V8-generated code: + * https://code.google.com/p/v8/issues/detail?id=3598. + * + * This function allows embedders to register a custom exception handler for + * exceptions in V8-generated code. + */ + static void SetUnhandledExceptionCallback( + UnhandledExceptionCallback unhandled_exception_callback); +#endif + private: V8(); diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h index e30a582e8f2649..5ec0480cf5c0c2 100644 --- a/deps/v8/include/v8config.h +++ b/deps/v8/include/v8config.h @@ -64,6 +64,7 @@ // V8_OS_FUCHSIA - Fuchsia // V8_OS_LINUX - Linux // V8_OS_MACOSX - Mac OS X +// V8_OS_IOS - iOS // V8_OS_NETBSD - NetBSD // V8_OS_OPENBSD - OpenBSD // V8_OS_POSIX - POSIX compatible (mostly everything except Windows) @@ -80,6 +81,9 @@ # define V8_OS_BSD 1 # define V8_OS_MACOSX 1 # define V8_OS_POSIX 1 +# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE +# define V8_OS_IOS 1 +# endif // defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE #elif defined(__CYGWIN__) # define V8_OS_CYGWIN 1 # define V8_OS_POSIX 1 diff --git a/deps/v8/infra/mb/mb_config.pyl b/deps/v8/infra/mb/mb_config.pyl index cdf4b81a41eb56..6d05b7f2371833 100644 --- a/deps/v8/infra/mb/mb_config.pyl +++ b/deps/v8/infra/mb/mb_config.pyl @@ -89,11 +89,8 @@ 'V8 Linux64 TSAN - builder': 'release_x64_tsan', 'V8 Linux - arm64 - sim - MSAN': 'release_simulate_arm64_msan', # Misc. - 'V8 Linux gcc': 'release_x86_gcc_no_goma', - 'V8 Linux64 gcc - debug': 'debug_x64_gcc_no_goma', - # TODO(machenbach): Remove after switching. - 'V8 Linux gcc 4.8': 'release_x86_gcc', - 'V8 Linux64 gcc 4.8 - debug': 'debug_x64_gcc', + 'V8 Linux gcc': 'release_x86_gcc', + 'V8 Linux64 gcc - debug': 'debug_x64_gcc', # FYI. 'V8 Linux64 - pointer compression': 'release_x64_pointer_compression', 'V8 Linux64 - arm64 - sim - pointer compression - builder': @@ -212,7 +209,7 @@ 'v8_linux64_compile_rel_xg': 'release_x64_test_features_trybot', 'v8_linux64_dbg_ng': 'debug_x64_trybot', 'v8_linux64_gc_stress_custom_snapshot_dbg_ng': 'debug_x64_trybot_custom', - 'v8_linux64_gcc_compile_dbg': 'debug_x64_gcc_no_goma', + 'v8_linux64_gcc_compile_dbg': 'debug_x64_gcc', 'v8_linux64_header_includes_dbg': 'debug_x64_header_includes', 'v8_linux64_fyi_rel_ng': 'release_x64_test_features_trybot', 'v8_linux64_pointer_compression_rel_ng': 'release_x64_pointer_compression', @@ -434,7 +431,8 @@ 'release_x64_fuchsia_trybot': [ 'release_trybot', 'x64', 'fuchsia'], 'release_x64_gcc_coverage': [ - 'release_bot', 'x64', 'coverage', 'gcc', 'no_custom_libcxx', 'no_sysroot'], + 'release_bot', 'x64', 'coverage', 'gcc', 'no_custom_libcxx', + 'no_sysroot'], 'release_x64_internal': [ 'release_bot', 'x64', 'v8_snapshot_internal'], 'release_x64_jumbo': [ @@ -484,9 +482,6 @@ 'debug_bot', 'x64', 'fuchsia'], 'debug_x64_gcc': [ 'debug_bot', 'x64', 'gcc'], - 'debug_x64_gcc_no_goma': [ - 'debug', 'shared', 'v8_enable_slow_dchecks', 'v8_optimized_debug', 'x64', - 'gcc', 'no_goma'], 'debug_x64_header_includes': [ 'debug_bot', 'x64', 'v8_check_header_includes'], 'debug_x64_jumbo': [ @@ -518,8 +513,7 @@ 'debug_x86_vtunejit': [ 'debug_bot', 'x86', 'v8_enable_vtunejit'], 'full_debug_x86': [ - 'debug', 'x86', 'goma', 'static', 'v8_enable_slow_dchecks', - 'v8_full_debug'], + 'debug', 'x86', 'goma', 'v8_enable_slow_dchecks', 'v8_full_debug'], # Release configs for x86. 'release_x86': [ @@ -530,11 +524,8 @@ 'release_trybot', 'x86', 'v8_no_enable_embedded_builtins'], 'release_x86_gcc': [ 'release_bot', 'x86', 'gcc'], - # TODO(machenbach): Enable back goma once supported. 'release_x86_gcc_minimal_symbols': [ - 'release', 'static', 'x86', 'gcc', 'minimal_symbols', 'no_goma'], - 'release_x86_gcc_no_goma': [ - 'release', 'static', 'x86', 'gcc', 'no_goma'], + 'release_bot', 'x86', 'gcc', 'minimal_symbols'], 'release_x86_gcmole': [ 'release_bot', 'x86', 'gcmole'], 'release_x86_gcmole_trybot': [ @@ -704,10 +695,6 @@ 'gn_args': 'use_custom_libcxx=false', }, - 'no_goma': { - 'gn_args': 'use_goma=false', - }, - 'no_sysroot': { 'gn_args': 'use_sysroot=false', }, @@ -772,13 +759,13 @@ # TODO(krasin): Remove is_ubsan_no_recover=true when # https://llvm.org/bugs/show_bug.cgi?id=25569 is fixed and just use # ubsan instead. - 'gn_args': 'is_ubsan=true is_ubsan_no_recover=true', + 'gn_args': 'is_ubsan=true is_ubsan_no_recover=true is_ubsan_vptr=true', }, 'ubsan_recover': { 'mixins': ['v8_enable_test_features'], # Ubsan with recovery. - 'gn_args': 'is_ubsan=true is_ubsan_no_recover=false', + 'gn_args': 'is_ubsan=true is_ubsan_no_recover=false is_ubsan_vptr=true', }, 'v8_check_header_includes': { diff --git a/deps/v8/infra/testing/builders.pyl b/deps/v8/infra/testing/builders.pyl index 86349a48a486c3..00e385711a0eb2 100644 --- a/deps/v8/infra/testing/builders.pyl +++ b/deps/v8/infra/testing/builders.pyl @@ -58,7 +58,7 @@ {'name': 'mjsunit_sp_frame_access'}, {'name': 'mozilla'}, {'name': 'mozilla', 'variant': 'extra'}, - {'name': 'test262'}, + {'name': 'test262', 'shards': 2}, {'name': 'test262_variants', 'variant': 'extra', 'shards': 3}, {'name': 'v8testing', 'shards': 3}, {'name': 'v8testing', 'variant': 'extra', 'shards': 2}, @@ -216,11 +216,11 @@ }, 'v8_linux_arm_rel_ng_triggered': { 'tests': [ - {'name': 'mjsunit_sp_frame_access'}, + {'name': 'mjsunit_sp_frame_access', 'shards': 2}, {'name': 'mozilla', 'shards': 2}, {'name': 'test262', 'shards': 2}, - {'name': 'v8testing', 'shards': 8}, - {'name': 'v8testing', 'variant': 'extra', 'shards': 6}, + {'name': 'v8testing', 'shards': 10}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 8}, {'name': 'v8testing', 'variant': 'trusted', 'shards': 2}, ], }, @@ -368,11 +368,11 @@ }, 'v8_linux_arm64_rel_ng_triggered': { 'tests': [ - {'name': 'mjsunit_sp_frame_access'}, + {'name': 'mjsunit_sp_frame_access', 'shards': 2}, {'name': 'mozilla', 'shards': 2}, {'name': 'test262', 'shards': 2}, - {'name': 'v8testing', 'shards': 9}, - {'name': 'v8testing', 'variant': 'extra', 'shards': 6}, + {'name': 'v8testing', 'shards': 12}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 8}, {'name': 'v8testing', 'variant': 'trusted', 'shards': 3}, ], }, @@ -422,7 +422,7 @@ 'os': 'Windows-7-SP1', }, 'tests': [ - {'name': 'v8testing', 'variant': 'default', 'shards': 3}, + {'name': 'v8testing', 'variant': 'default', 'shards': 4}, ], }, 'v8_win_rel_ng_triggered': { @@ -432,7 +432,7 @@ }, 'tests': [ {'name': 'mozilla'}, - {'name': 'test262'}, + {'name': 'test262', 'shards': 2}, {'name': 'v8testing', 'shards': 2}, ], }, @@ -449,7 +449,7 @@ 'v8_win64_dbg': { 'swarming_dimensions' : { 'cpu': 'x86-64', - 'os': 'Windows-7-SP1', + 'os': 'Windows-10-15063', }, 'tests': [ {'name': 'mozilla'}, @@ -461,7 +461,7 @@ 'v8_win64_msvc_rel_ng_triggered': { 'swarming_dimensions' : { 'cpu': 'x86-64', - 'os': 'Windows-7-SP1', + 'os': 'Windows-10-15063', }, 'tests': [ {'name': 'mozilla'}, @@ -472,7 +472,7 @@ 'v8_win64_rel_ng_triggered': { 'swarming_dimensions' : { 'cpu': 'x86-64', - 'os': 'Windows-7-SP1', + 'os': 'Windows-10-15063', }, 'tests': [ {'name': 'mozilla'}, @@ -739,15 +739,6 @@ {'name': 'v8testing'}, ], }, - # TODO(machenbach): Remove after switching. - 'V8 Linux gcc 4.8': { - 'swarming_dimensions' : { - 'os': 'Ubuntu-16.04', - }, - 'tests': [ - {'name': 'v8testing'}, - ], - }, 'V8 Linux64': { 'swarming_dimensions': { 'cpu': 'x86-64-avx2', @@ -1020,7 +1011,7 @@ }, 'V8 Win64': { 'swarming_dimensions': { - 'os': 'Windows-7-SP1', + 'os': 'Windows-10-15063', }, 'tests': [ {'name': 'mozilla'}, @@ -1031,7 +1022,7 @@ }, 'V8 Win64 - debug': { 'swarming_dimensions': { - 'os': 'Windows-7-SP1', + 'os': 'Windows-10-15063', }, 'tests': [ {'name': 'mozilla'}, @@ -1042,7 +1033,7 @@ }, 'V8 Win64 - msvc': { 'swarming_dimensions': { - 'os': 'Windows-7-SP1', + 'os': 'Windows-10-15063', }, 'tests': [ {'name': 'mozilla'}, @@ -1398,8 +1389,8 @@ # Clusterfuzz. 'V8 NumFuzz': { 'swarming_task_attrs': { - 'expiration': 14400, - 'hard_timeout': 3600, + 'expiration': 13800, + 'hard_timeout': 4200, 'priority': 35, }, 'tests': [ @@ -1412,8 +1403,8 @@ }, 'V8 NumFuzz - TSAN': { 'swarming_task_attrs': { - 'expiration': 14400, - 'hard_timeout': 3600, + 'expiration': 13800, + 'hard_timeout': 4200, 'priority': 35, }, 'tests': [ @@ -1423,22 +1414,6 @@ 'suffix': 'marking', 'test_args': ['--total-timeout-sec=2100', '--stress-marking=1'] }, - { - 'name': 'numfuzz', - 'suffix': 'endurance', - 'test_args': [ - '--total-timeout-sec=1200', - '--combine-tests', - '--combine-min=10', - '--combine-max=30', - '--stress-delay-tasks=1', - '--stress-compaction=2', - '--stress-gc=6', - '--stress-marking=6', - '--stress-scavenge=4', - '--stress-thread-pool-size=1', - ], - }, { 'name': 'numfuzz', 'suffix': 'delay', @@ -1473,8 +1448,8 @@ }, 'V8 NumFuzz - debug': { 'swarming_task_attrs': { - 'expiration': 14400, - 'hard_timeout': 3600, + 'expiration': 13800, + 'hard_timeout': 4200, 'priority': 35, }, 'tests': [ @@ -1485,23 +1460,6 @@ 'test_args': ['--total-timeout-sec=2100', '--stress-marking=1'], 'shards': 2 }, - { - 'name': 'numfuzz', - 'suffix': 'endurance', - 'test_args': [ - '--total-timeout-sec=1200', - '--combine-tests', - '--combine-min=30', - '--combine-max=50', - '--stress-delay-tasks=1', - '--stress-deopt=2', - '--stress-compaction=2', - '--stress-gc=6', - '--stress-marking=6', - '--stress-scavenge=4', - '--stress-thread-pool-size=1', - ], - }, { 'name': 'numfuzz', 'suffix': 'delay', diff --git a/deps/v8/snapshot_toolchain.gni b/deps/v8/snapshot_toolchain.gni index f1c690943946c0..f4f1f1d88e258d 100644 --- a/deps/v8/snapshot_toolchain.gni +++ b/deps/v8/snapshot_toolchain.gni @@ -60,9 +60,6 @@ if (v8_snapshot_toolchain == "") { # binaries built for the same OS, so build the snapshot with the current # toolchain here, too. v8_snapshot_toolchain = current_toolchain - } else if (current_os == "win" && host_os == "mac" && is_clang) { - # This is a mac -> win cross-compile, which is only supported w/ clang. - v8_snapshot_toolchain = "//build/toolchain/mac:clang_${v8_current_cpu}" } else if (host_cpu == "x64" && (v8_current_cpu == "mips" || v8_current_cpu == "mips64")) { # We don't support snapshot generation for big-endian targets, @@ -101,7 +98,7 @@ if (v8_snapshot_toolchain == "") { if (_cpus != "") { v8_snapshot_toolchain = "//build/toolchain/${host_os}:${_clang}${_cpus}" } else if (is_win && v8_current_cpu == "arm64") { - # cross compile Windows arm64 with Windows x64 toolchain. + # cross compile Windows arm64 with host toolchain. v8_snapshot_toolchain = host_toolchain } } diff --git a/deps/v8/src/accessors.cc b/deps/v8/src/accessors.cc index bf8db184f40406..221c1f5b92f26b 100644 --- a/deps/v8/src/accessors.cc +++ b/deps/v8/src/accessors.cc @@ -370,10 +370,7 @@ void Accessors::FunctionLengthGetter( HandleScope scope(isolate); Handle function = Handle::cast(Utils::OpenHandle(*info.Holder())); - int length = 0; - if (!JSFunction::GetLength(isolate, function).To(&length)) { - isolate->OptionalRescheduleException(false); - } + int length = function->length(); Handle result(Smi::FromInt(length), isolate); info.GetReturnValue().Set(Utils::ToLocal(result)); } @@ -789,35 +786,6 @@ Handle Accessors::MakeBoundFunctionNameInfo(Isolate* isolate) { // Accessors::ErrorStack // -namespace { - -MaybeHandle ClearInternalStackTrace(Isolate* isolate, - Handle error) { - RETURN_ON_EXCEPTION( - isolate, - Object::SetProperty( - isolate, error, isolate->factory()->stack_trace_symbol(), - isolate->factory()->undefined_value(), StoreOrigin::kMaybeKeyed, - Just(ShouldThrow::kThrowOnError)), - JSReceiver); - return error; -} - -bool IsAccessor(Handle receiver, Handle name, - Handle holder) { - LookupIterator it(receiver, name, holder, - LookupIterator::OWN_SKIP_INTERCEPTOR); - // Skip any access checks we might hit. This accessor should never hit in a - // situation where the caller does not have access. - if (it.state() == LookupIterator::ACCESS_CHECK) { - CHECK(it.HasAccess()); - it.Next(); - } - return (it.state() == LookupIterator::ACCESSOR); -} - -} // namespace - void Accessors::ErrorStackGetter( v8::Local key, const v8::PropertyCallbackInfo& info) { i::Isolate* isolate = reinterpret_cast(info.GetIsolate()); @@ -825,7 +793,9 @@ void Accessors::ErrorStackGetter( Handle holder = Handle::cast(Utils::OpenHandle(*info.Holder())); - // Retrieve the structured stack trace. + // Retrieve the stack trace. It can either be structured data in the form of + // a FrameArray, an already formatted stack trace (string) or whatever the + // "prepareStackTrace" callback produced. Handle stack_trace; Handle stack_trace_symbol = isolate->factory()->stack_trace_symbol(); @@ -838,8 +808,15 @@ void Accessors::ErrorStackGetter( return; } - // Format it, clear the internal structured trace and reconfigure as a data - // property. + // Only format the stack-trace the first time around. The check for a + // FixedArray is sufficient as the user callback can not create plain + // FixedArrays and the result is a String in case we format the stack + // trace ourselves. + + if (!stack_trace->IsFixedArray()) { + info.GetReturnValue().Set(Utils::ToLocal(stack_trace)); + return; + } Handle formatted_stack_trace; if (!ErrorUtils::FormatStackTrace(isolate, holder, stack_trace) @@ -848,34 +825,16 @@ void Accessors::ErrorStackGetter( return; } - MaybeHandle result = ClearInternalStackTrace(isolate, holder); + // Replace the structured stack-trace with the formatting result. + MaybeHandle result = Object::SetProperty( + isolate, holder, isolate->factory()->stack_trace_symbol(), + formatted_stack_trace, StoreOrigin::kMaybeKeyed, + Just(ShouldThrow::kThrowOnError)); if (result.is_null()) { isolate->OptionalRescheduleException(false); return; } - // If stack is still an accessor (this could have changed in the meantime - // since FormatStackTrace can execute arbitrary JS), replace it with a data - // property. - Handle receiver = - Utils::OpenHandle(*v8::Local(info.This())); - Handle name = Utils::OpenHandle(*key); - if (IsAccessor(receiver, name, holder)) { - result = Accessors::ReplaceAccessorWithDataProperty(receiver, holder, name, - formatted_stack_trace); - if (result.is_null()) { - isolate->OptionalRescheduleException(false); - return; - } - } else { - // The stack property has been modified in the meantime. - if (!JSObject::GetProperty(isolate, holder, name) - .ToHandle(&formatted_stack_trace)) { - isolate->OptionalRescheduleException(false); - return; - } - } - v8::Local value = Utils::ToLocal(formatted_stack_trace); info.GetReturnValue().Set(value); } @@ -887,14 +846,17 @@ void Accessors::ErrorStackSetter( HandleScope scope(isolate); Handle obj = Handle::cast( Utils::OpenHandle(*v8::Local(info.This()))); + Handle value = Handle::cast(Utils::OpenHandle(*val)); - // Clear internal properties to avoid memory leaks. - Handle stack_trace_symbol = isolate->factory()->stack_trace_symbol(); - if (JSReceiver::HasOwnProperty(obj, stack_trace_symbol).FromMaybe(false)) { - ClearInternalStackTrace(isolate, obj); + // Store the value in the internal symbol to avoid reconfiguration to + // a data property. + MaybeHandle result = Object::SetProperty( + isolate, obj, isolate->factory()->stack_trace_symbol(), value, + StoreOrigin::kMaybeKeyed, Just(ShouldThrow::kThrowOnError)); + if (result.is_null()) { + isolate->OptionalRescheduleException(false); + return; } - - Accessors::ReconfigureToDataProperty(name, val, info); } Handle Accessors::MakeErrorStackInfo(Isolate* isolate) { diff --git a/deps/v8/src/accessors.h b/deps/v8/src/accessors.h index 15c4773ec3cc3d..200e0f68807983 100644 --- a/deps/v8/src/accessors.h +++ b/deps/v8/src/accessors.h @@ -114,7 +114,7 @@ class Accessors : public AllStatic { Local property, Local value, const PropertyCallbackInfo& info); - static Handle MakeAccessor( + V8_EXPORT_PRIVATE static Handle MakeAccessor( Isolate* isolate, Handle name, AccessorNameGetterCallback getter, AccessorNameBooleanSetterCallback setter); diff --git a/deps/v8/src/allocation.h b/deps/v8/src/allocation.h index df6e416e702bf4..af1d4596548227 100644 --- a/deps/v8/src/allocation.h +++ b/deps/v8/src/allocation.h @@ -80,7 +80,7 @@ class FreeStoreAllocationPolicy { // Call free to release memory allocated with this function. void* AllocWithRetry(size_t size); -void* AlignedAlloc(size_t size, size_t alignment); +V8_EXPORT_PRIVATE void* AlignedAlloc(size_t size, size_t alignment); void AlignedFree(void *ptr); // Returns platfrom page allocator instance. Guaranteed to be a valid pointer. diff --git a/deps/v8/src/api-natives.cc b/deps/v8/src/api-natives.cc index 2e34595ab5989a..7b5541a1c3b389 100644 --- a/deps/v8/src/api-natives.cc +++ b/deps/v8/src/api-natives.cc @@ -69,15 +69,19 @@ MaybeHandle DefineAccessorProperty( !FunctionTemplateInfo::cast(*getter)->do_not_cache()); DCHECK(!setter->IsFunctionTemplateInfo() || !FunctionTemplateInfo::cast(*setter)->do_not_cache()); - if (force_instantiate) { - if (getter->IsFunctionTemplateInfo()) { + if (getter->IsFunctionTemplateInfo()) { + if (force_instantiate || + FunctionTemplateInfo::cast(*getter)->BreakAtEntry()) { ASSIGN_RETURN_ON_EXCEPTION( isolate, getter, InstantiateFunction(isolate, Handle::cast(getter)), Object); } - if (setter->IsFunctionTemplateInfo()) { + } + if (setter->IsFunctionTemplateInfo()) { + if (force_instantiate || + FunctionTemplateInfo::cast(*setter)->BreakAtEntry()) { ASSIGN_RETURN_ON_EXCEPTION( isolate, setter, InstantiateFunction(isolate, @@ -85,9 +89,10 @@ MaybeHandle DefineAccessorProperty( Object); } } - RETURN_ON_EXCEPTION(isolate, JSObject::DefineAccessor(object, name, getter, - setter, attributes), - Object); + RETURN_ON_EXCEPTION( + isolate, + JSObject::DefineAccessor(object, name, getter, setter, attributes), + Object); return object; } @@ -492,8 +497,9 @@ MaybeHandle InstantiateFunction(Isolate* isolate, ASSIGN_RETURN_ON_EXCEPTION(isolate, parent_prototype, GetInstancePrototype(isolate, parent), JSFunction); + CHECK(parent_prototype->IsHeapObject()); JSObject::ForceSetPrototype(Handle::cast(prototype), - parent_prototype); + Handle::cast(parent_prototype)); } } InstanceType function_type = diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index f3e5da870ead56..d912b8c6bb2269 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -116,10 +116,14 @@ #endif #if V8_OS_WIN +#include #include #include "include/v8-wasm-trap-handler-win.h" #include "src/trap-handler/handler-inside-win.h" -#endif +#if V8_TARGET_ARCH_X64 +#include "src/unwinding-info-win64.h" +#endif // V8_TARGET_ARCH_X64 +#endif // V8_OS_WIN namespace v8 { @@ -727,7 +731,8 @@ StartupData SnapshotCreator::CreateBlob( // We need to store the global proxy size upfront in case we need the // bootstrapper to create a global proxy before we deserialize the context. i::Handle global_proxy_sizes = - isolate->factory()->NewFixedArray(num_additional_contexts, i::TENURED); + isolate->factory()->NewFixedArray(num_additional_contexts, + i::AllocationType::kOld); for (int i = 0; i < num_additional_contexts; i++) { i::Handle context = v8::Utils::OpenHandle(*data->contexts_.Get(i)); @@ -746,7 +751,7 @@ StartupData SnapshotCreator::CreateBlob( i::GarbageCollectionReason::kSnapshotCreator); { i::HandleScope scope(isolate); - isolate->heap()->CompactWeakArrayLists(internal::TENURED); + isolate->heap()->CompactWeakArrayLists(internal::AllocationType::kOld); } isolate->heap()->read_only_space()->ClearStringPaddingIfNeeded(); @@ -1434,8 +1439,8 @@ static Local FunctionTemplateNew( v8::Local signature, int length, bool do_not_cache, v8::Local cached_property_name = v8::Local(), SideEffectType side_effect_type = SideEffectType::kHasSideEffect) { - i::Handle struct_obj = - isolate->factory()->NewStruct(i::FUNCTION_TEMPLATE_INFO_TYPE, i::TENURED); + i::Handle struct_obj = isolate->factory()->NewStruct( + i::FUNCTION_TEMPLATE_INFO_TYPE, i::AllocationType::kOld); i::Handle obj = i::Handle::cast(struct_obj); InitializeFunctionTemplate(obj); @@ -1672,8 +1677,8 @@ static Local ObjectTemplateNew( bool do_not_cache) { LOG_API(isolate, ObjectTemplate, New); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - i::Handle struct_obj = - isolate->factory()->NewStruct(i::OBJECT_TEMPLATE_INFO_TYPE, i::TENURED); + i::Handle struct_obj = isolate->factory()->NewStruct( + i::OBJECT_TEMPLATE_INFO_TYPE, i::AllocationType::kOld); i::Handle obj = i::Handle::cast(struct_obj); InitializeTemplate(obj, Consts::OBJECT_TEMPLATE); @@ -1825,8 +1830,8 @@ static i::Handle CreateInterceptorInfo( i::Isolate* isolate, Getter getter, Setter setter, Query query, Descriptor descriptor, Deleter remover, Enumerator enumerator, Definer definer, Local data, PropertyHandlerFlags flags) { - auto obj = i::Handle::cast( - isolate->factory()->NewStruct(i::INTERCEPTOR_INFO_TYPE, i::TENURED)); + auto obj = i::Handle::cast(isolate->factory()->NewStruct( + i::INTERCEPTOR_INFO_TYPE, i::AllocationType::kOld)); obj->set_flags(0); if (getter != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_getter, getter); @@ -1926,8 +1931,8 @@ void ObjectTemplate::SetAccessCheckCallback(AccessCheckCallback callback, auto cons = EnsureConstructor(isolate, this); EnsureNotInstantiated(cons, "v8::ObjectTemplate::SetAccessCheckCallback"); - i::Handle struct_info = - isolate->factory()->NewStruct(i::ACCESS_CHECK_INFO_TYPE, i::TENURED); + i::Handle struct_info = isolate->factory()->NewStruct( + i::ACCESS_CHECK_INFO_TYPE, i::AllocationType::kOld); i::Handle info = i::Handle::cast(struct_info); @@ -1956,8 +1961,8 @@ void ObjectTemplate::SetAccessCheckCallbackAndHandler( EnsureNotInstantiated( cons, "v8::ObjectTemplate::SetAccessCheckCallbackWithHandler"); - i::Handle struct_info = - isolate->factory()->NewStruct(i::ACCESS_CHECK_INFO_TYPE, i::TENURED); + i::Handle struct_info = isolate->factory()->NewStruct( + i::ACCESS_CHECK_INFO_TYPE, i::AllocationType::kOld); i::Handle info = i::Handle::cast(struct_info); @@ -5786,6 +5791,18 @@ bool V8::EnableWebAssemblyTrapHandler(bool use_v8_signal_handler) { return v8::internal::trap_handler::EnableTrapHandler(use_v8_signal_handler); } +#if defined(V8_OS_WIN) +void V8::SetUnhandledExceptionCallback( + UnhandledExceptionCallback unhandled_exception_callback) { +#if defined(V8_TARGET_ARCH_X64) + v8::internal::win64_unwindinfo::SetUnhandledExceptionCallback( + unhandled_exception_callback); +#else + // Not implemented on ARM64. +#endif +} +#endif + void v8::V8::SetEntropySource(EntropySource entropy_source) { base::RandomNumberGenerator::SetEntropySource(entropy_source); } @@ -6069,16 +6086,14 @@ MaybeLocal v8::Context::NewRemoteContext( Utils::ApiCheck(access_check_info->named_interceptor() != i::Object(), "v8::Context::NewRemoteContext", "Global template needs to have access check handlers."); - i::Handle global_proxy = - CreateEnvironment( - isolate, nullptr, global_template, global_object, 0, - DeserializeInternalFieldsCallback(), nullptr); + i::Handle global_proxy = CreateEnvironment( + isolate, nullptr, global_template, global_object, 0, + DeserializeInternalFieldsCallback(), nullptr); if (global_proxy.is_null()) { if (isolate->has_pending_exception()) isolate->clear_pending_exception(); return MaybeLocal(); } - return Utils::ToLocal( - scope.CloseAndEscape(i::Handle::cast(global_proxy))); + return Utils::ToLocal(scope.CloseAndEscape(global_proxy)); } void v8::Context::SetSecurityToken(Local token) { @@ -6628,7 +6643,7 @@ Local v8::Object::New(Isolate* isolate, } i::Handle obj = i_isolate->factory()->NewSlowJSObjectWithPropertiesAndElements( - proto, properties, elements); + i::Handle::cast(proto), properties, elements); return Utils::ToLocal(obj); } @@ -7359,16 +7374,22 @@ MaybeLocal WasmModuleObject::Compile(Isolate* isolate, const uint8_t* start, size_t length) { i::Isolate* i_isolate = reinterpret_cast(isolate); - i::wasm::ErrorThrower thrower(i_isolate, "WasmModuleObject::Compile()"); if (!i::wasm::IsWasmCodegenAllowed(i_isolate, i_isolate->native_context())) { return MaybeLocal(); } - auto enabled_features = i::wasm::WasmFeaturesFromIsolate(i_isolate); - i::MaybeHandle maybe_compiled = - i_isolate->wasm_engine()->SyncCompile( - i_isolate, enabled_features, &thrower, - i::wasm::ModuleWireBytes(start, start + length)); - if (maybe_compiled.is_null()) return MaybeLocal(); + i::MaybeHandle maybe_compiled; + { + i::wasm::ErrorThrower thrower(i_isolate, "WasmModuleObject::Compile()"); + auto enabled_features = i::wasm::WasmFeaturesFromIsolate(i_isolate); + maybe_compiled = i_isolate->wasm_engine()->SyncCompile( + i_isolate, enabled_features, &thrower, + i::wasm::ModuleWireBytes(start, start + length)); + } + CHECK_EQ(maybe_compiled.is_null(), i_isolate->has_pending_exception()); + if (maybe_compiled.is_null()) { + i_isolate->OptionalRescheduleException(false); + return MaybeLocal(); + } return Local::Cast( Utils::ToLocal(maybe_compiled.ToHandleChecked())); } @@ -7747,7 +7768,7 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::GetContents() { self->is_wasm_memory() ? static_cast(self->GetIsolate()->wasm_engine()) : static_cast(self->GetIsolate()->array_buffer_allocator()), - self->is_growable()); + false); return contents; } @@ -7787,7 +7808,6 @@ Local v8::SharedArrayBuffer::New( ArrayBufferCreationMode mode) { i::Handle buffer = SetupSharedArrayBuffer( isolate, contents.Data(), contents.ByteLength(), mode); - buffer->set_is_growable(contents.IsGrowable()); return Utils::ToLocalShared(buffer); } @@ -8395,7 +8415,8 @@ bool Isolate::GetHeapSpaceStatistics(HeapSpaceStatistics* space_statistics, i::Heap* heap = isolate->heap(); i::Space* space = heap->space(static_cast(index)); - space_statistics->space_name_ = heap->GetSpaceName(static_cast(index)); + space_statistics->space_name_ = + i::Heap::GetSpaceName(static_cast(index)); space_statistics->space_size_ = space->CommittedMemory(); space_statistics->space_used_size_ = space->SizeOfObjects(); space_statistics->space_available_size_ = space->Available(); @@ -8414,7 +8435,7 @@ size_t Isolate::NumberOfTrackedHeapObjectTypes() { bool Isolate::GetHeapObjectStatisticsAtLastGC( HeapObjectStatistics* object_statistics, size_t type_index) { if (!object_statistics) return false; - if (V8_LIKELY(!i::FLAG_gc_stats)) return false; + if (V8_LIKELY(!i::TracingFlags::is_gc_stats_enabled())) return false; i::Isolate* isolate = reinterpret_cast(this); i::Heap* heap = isolate->heap(); @@ -8685,7 +8706,7 @@ void Isolate::MemoryPressureNotification(MemoryPressureLevel level) { bool on_isolate_thread = v8::Locker::IsActive() ? isolate->thread_manager()->IsLockedByCurrentThread() - : i::ThreadId::Current().Equals(isolate->thread_id()); + : i::ThreadId::Current() == isolate->thread_id(); isolate->heap()->MemoryPressureNotification(level, on_isolate_thread); } @@ -8921,16 +8942,15 @@ std::unique_ptr MicrotaskQueue::New(Isolate* isolate) { } MicrotasksScope::MicrotasksScope(Isolate* isolate, MicrotasksScope::Type type) - : MicrotasksScope( - isolate, - reinterpret_cast(isolate)->default_microtask_queue(), - type) {} + : MicrotasksScope(isolate, nullptr, type) {} MicrotasksScope::MicrotasksScope(Isolate* isolate, MicrotaskQueue* microtask_queue, MicrotasksScope::Type type) : isolate_(reinterpret_cast(isolate)), - microtask_queue_(static_cast(microtask_queue)), + microtask_queue_(microtask_queue + ? static_cast(microtask_queue) + : isolate_->default_microtask_queue()), run_(type == MicrotasksScope::kRunMicrotasks) { if (run_) microtask_queue_->IncrementMicrotasksScopeDepth(); #ifdef DEBUG @@ -8942,7 +8962,7 @@ MicrotasksScope::~MicrotasksScope() { if (run_) { microtask_queue_->DecrementMicrotasksScopeDepth(); if (MicrotasksPolicy::kScoped == microtask_queue_->microtasks_policy()) { - PerformCheckpoint(reinterpret_cast(isolate_)); + microtask_queue_->PerformCheckpoint(reinterpret_cast(isolate_)); } } #ifdef DEBUG @@ -9972,6 +9992,11 @@ const char* CpuProfileNode::GetScriptResourceNameStr() const { return node->entry()->resource_name(); } +bool CpuProfileNode::IsScriptSharedCrossOrigin() const { + const i::ProfileNode* node = reinterpret_cast(this); + return node->entry()->is_shared_cross_origin(); +} + int CpuProfileNode::GetLineNumber() const { return reinterpret_cast(this)->line_number(); } @@ -10016,6 +10041,9 @@ unsigned CpuProfileNode::GetNodeId() const { return reinterpret_cast(this)->id(); } +CpuProfileNode::SourceType CpuProfileNode::GetSourceType() const { + return reinterpret_cast(this)->source_type(); +} int CpuProfileNode::GetChildrenCount() const { return static_cast( @@ -10029,6 +10057,11 @@ const CpuProfileNode* CpuProfileNode::GetChild(int index) const { return reinterpret_cast(child); } +const CpuProfileNode* CpuProfileNode::GetParent() const { + const i::ProfileNode* parent = + reinterpret_cast(this)->parent(); + return reinterpret_cast(parent); +} const std::vector& CpuProfileNode::GetDeoptInfos() const { const i::ProfileNode* node = reinterpret_cast(this); @@ -10105,6 +10138,11 @@ void CpuProfiler::SetSamplingInterval(int us) { base::TimeDelta::FromMicroseconds(us)); } +void CpuProfiler::SetUsePreciseSampling(bool use_precise_sampling) { + reinterpret_cast(this)->set_use_precise_sampling( + use_precise_sampling); +} + void CpuProfiler::CollectSample() { reinterpret_cast(this)->CollectSample(); } diff --git a/deps/v8/src/api.h b/deps/v8/src/api.h index 5491a9ece5cc01..e8b3dcf55b51ef 100644 --- a/deps/v8/src/api.h +++ b/deps/v8/src/api.h @@ -375,8 +375,9 @@ class HandleScopeImplementer { void FreeThreadResources(); // Garbage collection support. - void Iterate(v8::internal::RootVisitor* v); - static char* Iterate(v8::internal::RootVisitor* v, char* data); + V8_EXPORT_PRIVATE void Iterate(v8::internal::RootVisitor* v); + V8_EXPORT_PRIVATE static char* Iterate(v8::internal::RootVisitor* v, + char* data); inline internal::Address* GetSpareOrNewBlock(); inline void DeleteExtensions(internal::Address* prev_limit); diff --git a/deps/v8/src/arguments.h b/deps/v8/src/arguments.h index 920ef7c65d5337..003457a8cc2f1c 100644 --- a/deps/v8/src/arguments.h +++ b/deps/v8/src/arguments.h @@ -102,7 +102,7 @@ double ClobberDoubleRegisters(double x1, double x2, double x3, double x4); Type Name(int args_length, Address* args_object, Isolate* isolate) { \ DCHECK(isolate->context().is_null() || isolate->context()->IsContext()); \ CLOBBER_DOUBLE_REGISTERS(); \ - if (V8_UNLIKELY(FLAG_runtime_stats)) { \ + if (V8_UNLIKELY(TracingFlags::is_runtime_stats_enabled())) { \ return Stats_##Name(args_length, args_object, isolate); \ } \ Arguments args(args_length, args_object); \ diff --git a/deps/v8/src/arm/assembler-arm.cc b/deps/v8/src/arm/assembler-arm.cc index ce6209c5925c60..23c19fcfe2bec0 100644 --- a/deps/v8/src/arm/assembler-arm.cc +++ b/deps/v8/src/arm/assembler-arm.cc @@ -460,8 +460,8 @@ void Assembler::AllocateAndInstallRequestedHeapObjects(Isolate* isolate) { Handle object; switch (request.kind()) { case HeapObjectRequest::kHeapNumber: - object = - isolate->factory()->NewHeapNumber(request.heap_number(), TENURED); + object = isolate->factory()->NewHeapNumber(request.heap_number(), + AllocationType::kOld); break; case HeapObjectRequest::kStringConstant: { const StringConstantBase* str = request.string(); diff --git a/deps/v8/src/arm/assembler-arm.h b/deps/v8/src/arm/assembler-arm.h index 4528b8efb17126..c62c6041775206 100644 --- a/deps/v8/src/arm/assembler-arm.h +++ b/deps/v8/src/arm/assembler-arm.h @@ -79,7 +79,7 @@ enum Coprocessor { // Machine instruction Operands // Class Operand represents a shifter operand in data processing instructions -class Operand { +class V8_EXPORT_PRIVATE Operand { public: // immediate V8_INLINE explicit Operand(int32_t immediate, @@ -182,9 +182,8 @@ class Operand { friend class Assembler; }; - // Class MemOperand represents a memory operand in load and store instructions -class MemOperand { +class V8_EXPORT_PRIVATE MemOperand { public: // [rn +/- offset] Offset/NegOffset // [rn +/- offset]! PreIndex/NegPreIndex @@ -240,10 +239,9 @@ class MemOperand { friend class Assembler; }; - // Class NeonMemOperand represents a memory operand in load and // store NEON instructions -class NeonMemOperand { +class V8_EXPORT_PRIVATE NeonMemOperand { public: // [rn {:align}] Offset // [rn {:align}]! PostIndex @@ -264,7 +262,6 @@ class NeonMemOperand { int align_; }; - // Class NeonListOperand represents a list of NEON registers class NeonListOperand { public: @@ -1399,7 +1396,7 @@ class PatchingAssembler : public Assembler { // state, even if the list is modified by some other means. Note that this scope // can be nested but the destructors need to run in the opposite order as the // constructors. We do not have assertions for this. -class UseScratchRegisterScope { +class V8_EXPORT_PRIVATE UseScratchRegisterScope { public: explicit UseScratchRegisterScope(Assembler* assembler); ~UseScratchRegisterScope(); diff --git a/deps/v8/src/arm/cpu-arm.cc b/deps/v8/src/arm/cpu-arm.cc index 2eb1aee63d51d7..c0898bca86aede 100644 --- a/deps/v8/src/arm/cpu-arm.cc +++ b/deps/v8/src/arm/cpu-arm.cc @@ -19,7 +19,10 @@ namespace v8 { namespace internal { -void CpuFeatures::FlushICache(void* start, size_t size) { +// The inlining of this seems to trigger an LTO bug that clobbers a register on +// arm, see https://crbug.com/952759#c6. +__attribute__((noinline)) void CpuFeatures::FlushICache(void* start, + size_t size) { #if !defined(USE_SIMULATOR) #if V8_OS_QNX msync(start, size, MS_SYNC | MS_INVALIDATE_ICACHE); diff --git a/deps/v8/src/arm/frame-constants-arm.h b/deps/v8/src/arm/frame-constants-arm.h index af6f045667ecc5..3072caf9af49f7 100644 --- a/deps/v8/src/arm/frame-constants-arm.h +++ b/deps/v8/src/arm/frame-constants-arm.h @@ -26,8 +26,7 @@ class EntryFrameConstants : public AllStatic { class ExitFrameConstants : public TypedFrameConstants { public: static constexpr int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0); - static constexpr int kCodeOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(1); - DEFINE_TYPED_FRAME_SIZES(2); + DEFINE_TYPED_FRAME_SIZES(1); // The caller fields are below the frame pointer on the stack. static constexpr int kCallerFPOffset = 0 * kPointerSize; diff --git a/deps/v8/src/arm/interface-descriptors-arm.cc b/deps/v8/src/arm/interface-descriptors-arm.cc index c4140bdaf91efa..5acfe1ba0a8e05 100644 --- a/deps/v8/src/arm/interface-descriptors-arm.cc +++ b/deps/v8/src/arm/interface-descriptors-arm.cc @@ -34,6 +34,18 @@ void RecordWriteDescriptor::InitializePlatformSpecific( data->InitializePlatformSpecific(kParameterCount, default_stub_registers); } +void EphemeronKeyBarrierDescriptor::InitializePlatformSpecific( + CallInterfaceDescriptorData* data) { + const Register default_stub_registers[] = {r0, r1, r2, r3, r4}; + + data->RestrictAllocatableRegisters(default_stub_registers, + arraysize(default_stub_registers)); + + CHECK_LE(static_cast(kParameterCount), + arraysize(default_stub_registers)); + data->InitializePlatformSpecific(kParameterCount, default_stub_registers); +} + const Register FastNewFunctionContextDescriptor::ScopeInfoRegister() { return r1; } diff --git a/deps/v8/src/arm/macro-assembler-arm.cc b/deps/v8/src/arm/macro-assembler-arm.cc index 206a868f1aae13..56f323a32f3e79 100644 --- a/deps/v8/src/arm/macro-assembler-arm.cc +++ b/deps/v8/src/arm/macro-assembler-arm.cc @@ -675,6 +675,27 @@ void TurboAssembler::RestoreRegisters(RegList registers) { ldm(ia_w, sp, regs); } +void TurboAssembler::CallEphemeronKeyBarrier(Register object, Register address, + SaveFPRegsMode fp_mode) { + EphemeronKeyBarrierDescriptor descriptor; + RegList registers = descriptor.allocatable_registers(); + + SaveRegisters(registers); + + Register object_parameter( + descriptor.GetRegisterParameter(EphemeronKeyBarrierDescriptor::kObject)); + Register slot_parameter(descriptor.GetRegisterParameter( + EphemeronKeyBarrierDescriptor::kSlotAddress)); + Register fp_mode_parameter( + descriptor.GetRegisterParameter(EphemeronKeyBarrierDescriptor::kFPMode)); + + MovePair(object_parameter, object, slot_parameter, address); + Move(fp_mode_parameter, Smi::FromEnum(fp_mode)); + Call(isolate()->builtins()->builtin_handle(Builtins::kEphemeronKeyBarrier), + RelocInfo::CODE_TARGET); + RestoreRegisters(registers); +} + void TurboAssembler::CallRecordWriteStub( Register object, Register address, RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode) { @@ -781,14 +802,6 @@ void MacroAssembler::RecordWrite(Register object, Register address, bind(&done); - // Count number of write barriers in generated code. - isolate()->counters()->write_barriers_static()->Increment(); - { - UseScratchRegisterScope temps(this); - IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, - temps.Acquire(), value); - } - // Clobber clobbered registers when running with the debug-code flag // turned on to provoke errors. if (emit_debug_code()) { @@ -1307,14 +1320,12 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space, DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset); mov(scratch, Operand(StackFrame::TypeToMarker(frame_type))); PushCommonFrame(scratch); - // Reserve room for saved entry sp and code object. + // Reserve room for saved entry sp. sub(sp, fp, Operand(ExitFrameConstants::kFixedFrameSizeFromFp)); if (emit_debug_code()) { mov(scratch, Operand::Zero()); str(scratch, MemOperand(fp, ExitFrameConstants::kSPOffset)); } - Move(scratch, CodeObject()); - str(scratch, MemOperand(fp, ExitFrameConstants::kCodeOffset)); // Save the frame pointer and the context in top. Move(scratch, ExternalReference::Create(IsolateAddressId::kCEntryFPAddress, diff --git a/deps/v8/src/arm/macro-assembler-arm.h b/deps/v8/src/arm/macro-assembler-arm.h index 64aabea84de599..ce05b98f889aed 100644 --- a/deps/v8/src/arm/macro-assembler-arm.h +++ b/deps/v8/src/arm/macro-assembler-arm.h @@ -44,9 +44,7 @@ enum TargetAddressStorageMode { class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { public: - template - explicit TurboAssembler(Args&&... args) - : TurboAssemblerBase(std::forward(args)...) {} + using TurboAssemblerBase::TurboAssemblerBase; // Activation support. void EnterFrame(StackFrame::Type type, @@ -355,6 +353,8 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { void CallRecordWriteStub(Register object, Register address, RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode, Address wasm_target); + void CallEphemeronKeyBarrier(Register object, Register address, + SaveFPRegsMode fp_mode); // Does a runtime check for 16/32 FP registers. Either way, pushes 32 double // values to location, saving [d0..(d15|d31)]. @@ -550,9 +550,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { // MacroAssembler implements a collection of frequently used macros. class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { public: - template - explicit MacroAssembler(Args&&... args) - : TurboAssembler(std::forward(args)...) {} + using TurboAssembler::TurboAssembler; void Mls(Register dst, Register src1, Register src2, Register srcA, Condition cond = al); diff --git a/deps/v8/src/arm/simulator-arm.cc b/deps/v8/src/arm/simulator-arm.cc index ef5215c78d61c1..a5581a51d3cefa 100644 --- a/deps/v8/src/arm/simulator-arm.cc +++ b/deps/v8/src/arm/simulator-arm.cc @@ -19,6 +19,7 @@ #include "src/objects-inl.h" #include "src/ostreams.h" #include "src/runtime/runtime-utils.h" +#include "src/utils.h" #include "src/vector.h" // Only build the simulator if not compiling for real ARM hardware. @@ -4180,6 +4181,9 @@ void CompareGreater(Simulator* simulator, int Vd, int Vm, int Vn, bool ge) { simulator->set_neon_register(Vd, src1); } +float MinMax(float a, float b, bool is_min) { + return is_min ? JSMin(a, b) : JSMax(a, b); +} template T MinMax(T a, T b, bool is_min) { return is_min ? std::min(a, b) : std::max(a, b); diff --git a/deps/v8/src/arm64/assembler-arm64.cc b/deps/v8/src/arm64/assembler-arm64.cc index ca205a996c5192..2763a647c7a3f3 100644 --- a/deps/v8/src/arm64/assembler-arm64.cc +++ b/deps/v8/src/arm64/assembler-arm64.cc @@ -549,7 +549,6 @@ void Assembler::Reset() { memset(buffer_start_, 0, pc_ - buffer_start_); #endif pc_ = buffer_start_; - ReserveCodeTargetSpace(64); reloc_info_writer.Reposition(buffer_start_ + buffer_->size(), pc_); constpool_.Clear(); next_constant_pool_check_ = 0; @@ -563,8 +562,8 @@ void Assembler::AllocateAndInstallRequestedHeapObjects(Isolate* isolate) { Address pc = reinterpret_cast
(buffer_start_) + request.offset(); switch (request.kind()) { case HeapObjectRequest::kHeapNumber: { - Handle object = - isolate->factory()->NewHeapNumber(request.heap_number(), TENURED); + Handle object = isolate->factory()->NewHeapNumber( + request.heap_number(), AllocationType::kOld); set_target_address_at(pc, 0 /* unused */, object.address()); break; } diff --git a/deps/v8/src/arm64/assembler-arm64.h b/deps/v8/src/arm64/assembler-arm64.h index 586eff1241fed0..7dd97809e3e3d4 100644 --- a/deps/v8/src/arm64/assembler-arm64.h +++ b/deps/v8/src/arm64/assembler-arm64.h @@ -49,7 +49,7 @@ class Immediate { RelocInfo::Mode rmode() const { return rmode_; } private: - void InitializeHandle(Handle value); + V8_EXPORT_PRIVATE void InitializeHandle(Handle value); int64_t value_; RelocInfo::Mode rmode_; diff --git a/deps/v8/src/arm64/decoder-arm64.h b/deps/v8/src/arm64/decoder-arm64.h index a89bf38980e711..3bc6934e814539 100644 --- a/deps/v8/src/arm64/decoder-arm64.h +++ b/deps/v8/src/arm64/decoder-arm64.h @@ -86,7 +86,7 @@ namespace internal { // The Visitor interface. Disassembler and simulator (and other tools) // must provide implementations for all of these functions. -class DecoderVisitor { +class V8_EXPORT_PRIVATE DecoderVisitor { public: virtual ~DecoderVisitor() {} @@ -95,9 +95,8 @@ class DecoderVisitor { #undef DECLARE }; - // A visitor that dispatches to a list of visitors. -class DispatchingDecoderVisitor : public DecoderVisitor { +class V8_EXPORT_PRIVATE DispatchingDecoderVisitor : public DecoderVisitor { public: DispatchingDecoderVisitor() {} virtual ~DispatchingDecoderVisitor() {} @@ -121,7 +120,7 @@ class DispatchingDecoderVisitor : public DecoderVisitor { // // will call in order visitor methods in V3, V2, V1, V4. void AppendVisitor(DecoderVisitor* visitor); - void PrependVisitor(DecoderVisitor* visitor); + V8_EXPORT_PRIVATE void PrependVisitor(DecoderVisitor* visitor); void InsertVisitorBefore(DecoderVisitor* new_visitor, DecoderVisitor* registered_visitor); void InsertVisitorAfter(DecoderVisitor* new_visitor, @@ -142,7 +141,6 @@ class DispatchingDecoderVisitor : public DecoderVisitor { std::list visitors_; }; - template class Decoder : public V { public: diff --git a/deps/v8/src/arm64/disasm-arm64.h b/deps/v8/src/arm64/disasm-arm64.h index 0edb2ea58343af..8e218b5cf80635 100644 --- a/deps/v8/src/arm64/disasm-arm64.h +++ b/deps/v8/src/arm64/disasm-arm64.h @@ -14,8 +14,7 @@ namespace v8 { namespace internal { - -class DisassemblingDecoder : public DecoderVisitor { +class V8_EXPORT_PRIVATE DisassemblingDecoder : public DecoderVisitor { public: DisassemblingDecoder(); DisassemblingDecoder(char* text_buffer, int buffer_size); @@ -80,8 +79,7 @@ class DisassemblingDecoder : public DecoderVisitor { bool own_buffer_; }; - -class PrintDisassembler : public DisassemblingDecoder { +class V8_EXPORT_PRIVATE PrintDisassembler : public DisassemblingDecoder { public: explicit PrintDisassembler(FILE* stream) : stream_(stream) { } ~PrintDisassembler() { } @@ -92,7 +90,6 @@ class PrintDisassembler : public DisassemblingDecoder { FILE *stream_; }; - } // namespace internal } // namespace v8 diff --git a/deps/v8/src/arm64/frame-constants-arm64.h b/deps/v8/src/arm64/frame-constants-arm64.h index 3fb21ed8bcfbf3..81f89b2961fe97 100644 --- a/deps/v8/src/arm64/frame-constants-arm64.h +++ b/deps/v8/src/arm64/frame-constants-arm64.h @@ -44,10 +44,8 @@ class EntryFrameConstants : public AllStatic { class ExitFrameConstants : public TypedFrameConstants { public: static constexpr int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0); - static constexpr int kCodeOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(1); - static constexpr int kPaddingOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(2); - DEFINE_TYPED_FRAME_SIZES(3); - static constexpr int kLastExitFrameField = kPaddingOffset; + DEFINE_TYPED_FRAME_SIZES(1); + static constexpr int kLastExitFrameField = kSPOffset; static constexpr int kConstantPoolOffset = 0; // Not used }; diff --git a/deps/v8/src/arm64/instructions-arm64-constants.cc b/deps/v8/src/arm64/instructions-arm64-constants.cc index 7559946cb165ec..5c0d42a8c63373 100644 --- a/deps/v8/src/arm64/instructions-arm64-constants.cc +++ b/deps/v8/src/arm64/instructions-arm64-constants.cc @@ -4,6 +4,7 @@ #include #include "include/v8config.h" +#include "src/base/macros.h" namespace v8 { namespace internal { @@ -28,23 +29,25 @@ extern "C" { extern const uint16_t kFP16PositiveInfinity = 0x7C00; extern const uint16_t kFP16NegativeInfinity = 0xFC00; -extern const uint32_t kFP32PositiveInfinity = 0x7F800000; -extern const uint32_t kFP32NegativeInfinity = 0xFF800000; -extern const uint64_t kFP64PositiveInfinity = 0x7FF0000000000000UL; -extern const uint64_t kFP64NegativeInfinity = 0xFFF0000000000000UL; +V8_EXPORT_PRIVATE extern const uint32_t kFP32PositiveInfinity = 0x7F800000; +V8_EXPORT_PRIVATE extern const uint32_t kFP32NegativeInfinity = 0xFF800000; +V8_EXPORT_PRIVATE extern const uint64_t kFP64PositiveInfinity = + 0x7FF0000000000000UL; +V8_EXPORT_PRIVATE extern const uint64_t kFP64NegativeInfinity = + 0xFFF0000000000000UL; // This value is a signalling NaN as both a double and as a float (taking the // least-significant word). -extern const uint64_t kFP64SignallingNaN = 0x7FF000007F800001; -extern const uint32_t kFP32SignallingNaN = 0x7F800001; +V8_EXPORT_PRIVATE extern const uint64_t kFP64SignallingNaN = 0x7FF000007F800001; +V8_EXPORT_PRIVATE extern const uint32_t kFP32SignallingNaN = 0x7F800001; // A similar value, but as a quiet NaN. -extern const uint64_t kFP64QuietNaN = 0x7FF800007FC00001; -extern const uint32_t kFP32QuietNaN = 0x7FC00001; +V8_EXPORT_PRIVATE extern const uint64_t kFP64QuietNaN = 0x7FF800007FC00001; +V8_EXPORT_PRIVATE extern const uint32_t kFP32QuietNaN = 0x7FC00001; // The default NaN values (for FPCR.DN=1). -extern const uint64_t kFP64DefaultNaN = 0x7FF8000000000000UL; -extern const uint32_t kFP32DefaultNaN = 0x7FC00000; +V8_EXPORT_PRIVATE extern const uint64_t kFP64DefaultNaN = 0x7FF8000000000000UL; +V8_EXPORT_PRIVATE extern const uint32_t kFP32DefaultNaN = 0x7FC00000; extern const uint16_t kFP16DefaultNaN = 0x7E00; #if defined(V8_OS_WIN) diff --git a/deps/v8/src/arm64/instructions-arm64.h b/deps/v8/src/arm64/instructions-arm64.h index 6f46e4b88c2e7c..8514469227042b 100644 --- a/deps/v8/src/arm64/instructions-arm64.h +++ b/deps/v8/src/arm64/instructions-arm64.h @@ -26,23 +26,23 @@ extern "C" { extern const float16 kFP16PositiveInfinity; extern const float16 kFP16NegativeInfinity; -extern const float kFP32PositiveInfinity; -extern const float kFP32NegativeInfinity; -extern const double kFP64PositiveInfinity; -extern const double kFP64NegativeInfinity; +V8_EXPORT_PRIVATE extern const float kFP32PositiveInfinity; +V8_EXPORT_PRIVATE extern const float kFP32NegativeInfinity; +V8_EXPORT_PRIVATE extern const double kFP64PositiveInfinity; +V8_EXPORT_PRIVATE extern const double kFP64NegativeInfinity; // This value is a signalling NaN as both a double and as a float (taking the // least-significant word). -extern const double kFP64SignallingNaN; -extern const float kFP32SignallingNaN; +V8_EXPORT_PRIVATE extern const double kFP64SignallingNaN; +V8_EXPORT_PRIVATE extern const float kFP32SignallingNaN; // A similar value, but as a quiet NaN. -extern const double kFP64QuietNaN; -extern const float kFP32QuietNaN; +V8_EXPORT_PRIVATE extern const double kFP64QuietNaN; +V8_EXPORT_PRIVATE extern const float kFP32QuietNaN; // The default NaN values (for FPCR.DN=1). -extern const double kFP64DefaultNaN; -extern const float kFP32DefaultNaN; +V8_EXPORT_PRIVATE extern const double kFP64DefaultNaN; +V8_EXPORT_PRIVATE extern const float kFP32DefaultNaN; extern const float16 kFP16DefaultNaN; #if defined(V8_OS_WIN) @@ -401,11 +401,11 @@ class Instruction { // Find the PC offset encoded in this instruction. 'this' may be a branch or // a PC-relative addressing instruction. // The offset returned is unscaled. - int64_t ImmPCOffset(); + V8_EXPORT_PRIVATE int64_t ImmPCOffset(); // Find the target of this instruction. 'this' may be a branch or a // PC-relative addressing instruction. - Instruction* ImmPCOffsetTarget(); + V8_EXPORT_PRIVATE Instruction* ImmPCOffsetTarget(); static bool IsValidImmPCOffset(ImmBranchType branch_type, ptrdiff_t offset); bool IsTargetInImmPCOffsetRange(Instruction* target); diff --git a/deps/v8/src/arm64/interface-descriptors-arm64.cc b/deps/v8/src/arm64/interface-descriptors-arm64.cc index 4dc7b4f54ab2cb..b16fa8ae672643 100644 --- a/deps/v8/src/arm64/interface-descriptors-arm64.cc +++ b/deps/v8/src/arm64/interface-descriptors-arm64.cc @@ -34,6 +34,18 @@ void RecordWriteDescriptor::InitializePlatformSpecific( data->InitializePlatformSpecific(kParameterCount, default_stub_registers); } +void EphemeronKeyBarrierDescriptor::InitializePlatformSpecific( + CallInterfaceDescriptorData* data) { + const Register default_stub_registers[] = {x0, x1, x2, x3, x4}; + + data->RestrictAllocatableRegisters(default_stub_registers, + arraysize(default_stub_registers)); + + CHECK_LE(static_cast(kParameterCount), + arraysize(default_stub_registers)); + data->InitializePlatformSpecific(kParameterCount, default_stub_registers); +} + const Register FastNewFunctionContextDescriptor::ScopeInfoRegister() { return x1; } diff --git a/deps/v8/src/arm64/macro-assembler-arm64.cc b/deps/v8/src/arm64/macro-assembler-arm64.cc index af2605e5c57381..fcf5f3c81187c6 100644 --- a/deps/v8/src/arm64/macro-assembler-arm64.cc +++ b/deps/v8/src/arm64/macro-assembler-arm64.cc @@ -2564,14 +2564,10 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, const Register& scratch, Mov(fp, sp); Mov(scratch, StackFrame::TypeToMarker(frame_type)); Push(scratch, xzr); - Mov(scratch, CodeObject()); - Push(scratch, padreg); // fp[8]: CallerPC (lr) // fp -> fp[0]: CallerFP (old fp) // fp[-8]: STUB marker - // fp[-16]: Space reserved for SPOffset. - // fp[-24]: CodeObject() - // sp -> fp[-32]: padding + // sp -> fp[-16]: Space reserved for SPOffset. STATIC_ASSERT((2 * kSystemPointerSize) == ExitFrameConstants::kCallerSPOffset); STATIC_ASSERT((1 * kSystemPointerSize) == @@ -2579,9 +2575,6 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, const Register& scratch, STATIC_ASSERT((0 * kSystemPointerSize) == ExitFrameConstants::kCallerFPOffset); STATIC_ASSERT((-2 * kSystemPointerSize) == ExitFrameConstants::kSPOffset); - STATIC_ASSERT((-3 * kSystemPointerSize) == ExitFrameConstants::kCodeOffset); - STATIC_ASSERT((-4 * kSystemPointerSize) == - ExitFrameConstants::kPaddingOffset); // Save the frame pointer and context pointer in the top frame. Mov(scratch, @@ -2591,7 +2584,7 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, const Register& scratch, ExternalReference::Create(IsolateAddressId::kContextAddress, isolate())); Str(cp, MemOperand(scratch)); - STATIC_ASSERT((-4 * kSystemPointerSize) == + STATIC_ASSERT((-2 * kSystemPointerSize) == ExitFrameConstants::kLastExitFrameField); if (save_doubles) { ExitFramePreserveFPRegs(); @@ -2608,8 +2601,7 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, const Register& scratch, // fp -> fp[0]: CallerFP (old fp) // fp[-8]: STUB marker // fp[-16]: Space reserved for SPOffset. - // fp[-24]: CodeObject() - // fp[-24 - fp_size]: Saved doubles (if save_doubles is true). + // fp[-16 - fp_size]: Saved doubles (if save_doubles is true). // sp[8]: Extra space reserved for caller (if extra_space != 0). // sp -> sp[0]: Space reserved for the return address. @@ -2671,6 +2663,9 @@ void MacroAssembler::IncrementCounter(StatsCounter* counter, int value, Register scratch1, Register scratch2) { DCHECK_NE(value, 0); if (FLAG_native_code_counters && counter->Enabled()) { + // This operation has to be exactly 32-bit wide in case the external + // reference table redirects the counter to a uint32_t dummy_stats_counter_ + // field. Mov(scratch2, ExternalReference::Create(counter)); Ldr(scratch1.W(), MemOperand(scratch2)); Add(scratch1.W(), scratch1.W(), value); @@ -2817,18 +2812,25 @@ void TurboAssembler::DecompressTaggedPointer(const Register& destination, void TurboAssembler::DecompressAnyTagged(const Register& destination, const MemOperand& field_operand) { RecordComment("[ DecompressAnyTagged"); - UseScratchRegisterScope temps(this); Ldrsw(destination, field_operand); - // Branchlessly compute |masked_root|: - // masked_root = HAS_SMI_TAG(destination) ? 0 : kRootRegister; - STATIC_ASSERT((kSmiTagSize == 1) && (kSmiTag == 0)); - Register masked_root = temps.AcquireX(); - // Sign extend tag bit to entire register. - Sbfx(masked_root, destination, 0, kSmiTagSize); - And(masked_root, masked_root, kRootRegister); - // Now this add operation will either leave the value unchanged if it is a smi - // or add the isolate root if it is a heap object. - Add(destination, masked_root, destination); + if (kUseBranchlessPtrDecompression) { + UseScratchRegisterScope temps(this); + // Branchlessly compute |masked_root|: + // masked_root = HAS_SMI_TAG(destination) ? 0 : kRootRegister; + STATIC_ASSERT((kSmiTagSize == 1) && (kSmiTag == 0)); + Register masked_root = temps.AcquireX(); + // Sign extend tag bit to entire register. + Sbfx(masked_root, destination, 0, kSmiTagSize); + And(masked_root, masked_root, kRootRegister); + // Now this add operation will either leave the value unchanged if it is a + // smi or add the isolate root if it is a heap object. + Add(destination, masked_root, destination); + } else { + Label done; + JumpIfSmi(destination, &done); + Add(destination, kRootRegister, destination); + bind(&done); + } RecordComment("]"); } @@ -3010,6 +3012,28 @@ void TurboAssembler::RestoreRegisters(RegList registers) { PopCPURegList(regs); } +void TurboAssembler::CallEphemeronKeyBarrier(Register object, Register address, + SaveFPRegsMode fp_mode) { + EphemeronKeyBarrierDescriptor descriptor; + RegList registers = descriptor.allocatable_registers(); + + SaveRegisters(registers); + + Register object_parameter( + descriptor.GetRegisterParameter(EphemeronKeyBarrierDescriptor::kObject)); + Register slot_parameter(descriptor.GetRegisterParameter( + EphemeronKeyBarrierDescriptor::kSlotAddress)); + Register fp_mode_parameter( + descriptor.GetRegisterParameter(EphemeronKeyBarrierDescriptor::kFPMode)); + + MovePair(object_parameter, object, slot_parameter, address); + + Mov(fp_mode_parameter, Smi::FromEnum(fp_mode)); + Call(isolate()->builtins()->builtin_handle(Builtins::kEphemeronKeyBarrier), + RelocInfo::CODE_TARGET); + RestoreRegisters(registers); +} + void TurboAssembler::CallRecordWriteStub( Register object, Register address, RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode) { @@ -3114,11 +3138,6 @@ void MacroAssembler::RecordWrite(Register object, Register address, Bind(&done); - // Count number of write barriers in generated code. - isolate()->counters()->write_barriers_static()->Increment(); - IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, address, - value); - // Clobber clobbered registers when running with the debug-code flag // turned on to provoke errors. if (emit_debug_code()) { diff --git a/deps/v8/src/arm64/macro-assembler-arm64.h b/deps/v8/src/arm64/macro-assembler-arm64.h index ab8ac0851122bf..4c81c5b5f1832e 100644 --- a/deps/v8/src/arm64/macro-assembler-arm64.h +++ b/deps/v8/src/arm64/macro-assembler-arm64.h @@ -158,9 +158,7 @@ enum PreShiftImmMode { class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { public: - template - explicit TurboAssembler(Args&&... args) - : TurboAssemblerBase(std::forward(args)...) {} + using TurboAssemblerBase::TurboAssemblerBase; #if DEBUG void set_allow_macro_instructions(bool value) { @@ -748,6 +746,8 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { void CallRecordWriteStub(Register object, Register address, RememberedSetAction remembered_set_action, SaveFPRegsMode fp_mode, Address wasm_target); + void CallEphemeronKeyBarrier(Register object, Register address, + SaveFPRegsMode fp_mode); // Alternative forms of Push and Pop, taking a RegList or CPURegList that // specifies the registers that are to be pushed or popped. Higher-numbered @@ -1279,9 +1279,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { public: - template - explicit MacroAssembler(Args&&... args) - : TurboAssembler(std::forward(args)...) {} + using TurboAssembler::TurboAssembler; // Instruction set functions ------------------------------------------------ // Logical macros. @@ -2083,7 +2081,7 @@ class InstructionAccurateScope { // original state, even if the lists were modified by some other means. Note // that this scope can be nested but the destructors need to run in the opposite // order as the constructors. We do not have assertions for this. -class UseScratchRegisterScope { +class V8_EXPORT_PRIVATE UseScratchRegisterScope { public: explicit UseScratchRegisterScope(TurboAssembler* tasm) : available_(tasm->TmpList()), @@ -2094,7 +2092,7 @@ class UseScratchRegisterScope { DCHECK_EQ(availablefp_->type(), CPURegister::kVRegister); } - ~UseScratchRegisterScope(); + V8_EXPORT_PRIVATE ~UseScratchRegisterScope(); // Take a register from the appropriate temps list. It will be returned // automatically when the scope ends. @@ -2111,7 +2109,8 @@ class UseScratchRegisterScope { VRegister AcquireSameSizeAs(const VRegister& reg); private: - static CPURegister AcquireNextAvailable(CPURegList* available); + V8_EXPORT_PRIVATE static CPURegister AcquireNextAvailable( + CPURegList* available); // Available scratch registers. CPURegList* available_; // kRegister diff --git a/deps/v8/src/arm64/register-arm64.h b/deps/v8/src/arm64/register-arm64.h index 6d5b55b40e0f7f..f5a79d46f11ae5 100644 --- a/deps/v8/src/arm64/register-arm64.h +++ b/deps/v8/src/arm64/register-arm64.h @@ -316,14 +316,14 @@ VectorFormat ScalarFormatFromLaneSize(int lanesize); VectorFormat VectorFormatHalfWidthDoubleLanes(VectorFormat vform); VectorFormat VectorFormatFillQ(VectorFormat vform); VectorFormat ScalarFormatFromFormat(VectorFormat vform); -unsigned RegisterSizeInBitsFromFormat(VectorFormat vform); +V8_EXPORT_PRIVATE unsigned RegisterSizeInBitsFromFormat(VectorFormat vform); unsigned RegisterSizeInBytesFromFormat(VectorFormat vform); int LaneSizeInBytesFromFormat(VectorFormat vform); unsigned LaneSizeInBitsFromFormat(VectorFormat vform); int LaneSizeInBytesLog2FromFormat(VectorFormat vform); -int LaneCountFromFormat(VectorFormat vform); +V8_EXPORT_PRIVATE int LaneCountFromFormat(VectorFormat vform); int MaxLaneCountFromFormat(VectorFormat vform); -bool IsVectorFormat(VectorFormat vform); +V8_EXPORT_PRIVATE bool IsVectorFormat(VectorFormat vform); int64_t MaxIntFromFormat(VectorFormat vform); int64_t MinIntFromFormat(VectorFormat vform); uint64_t MaxUintFromFormat(VectorFormat vform); @@ -529,7 +529,7 @@ bool AreAliased(const CPURegister& reg1, const CPURegister& reg2, // same size, and are of the same type. The system stack pointer may be // specified. Arguments set to NoReg are ignored, as are any subsequent // arguments. At least one argument (reg1) must be valid (not NoCPUReg). -bool AreSameSizeAndType( +V8_EXPORT_PRIVATE bool AreSameSizeAndType( const CPURegister& reg1, const CPURegister& reg2 = NoCPUReg, const CPURegister& reg3 = NoCPUReg, const CPURegister& reg4 = NoCPUReg, const CPURegister& reg5 = NoCPUReg, const CPURegister& reg6 = NoCPUReg, @@ -546,9 +546,10 @@ bool AreSameFormat(const VRegister& reg1, const VRegister& reg2, // consecutive in the register file. Arguments may be set to NoVReg, and if so, // subsequent arguments must also be NoVReg. At least one argument (reg1) must // be valid (not NoVReg). -bool AreConsecutive(const VRegister& reg1, const VRegister& reg2, - const VRegister& reg3 = NoVReg, - const VRegister& reg4 = NoVReg); +V8_EXPORT_PRIVATE bool AreConsecutive(const VRegister& reg1, + const VRegister& reg2, + const VRegister& reg3 = NoVReg, + const VRegister& reg4 = NoVReg); typedef VRegister FloatRegister; typedef VRegister DoubleRegister; @@ -556,8 +557,10 @@ typedef VRegister Simd128Register; // ----------------------------------------------------------------------------- // Lists of registers. -class CPURegList { +class V8_EXPORT_PRIVATE CPURegList { public: + CPURegList() = default; + template explicit CPURegList(CPURegister reg0, CPURegisters... regs) : list_(CPURegister::ListOf(reg0, regs...)), diff --git a/deps/v8/src/arm64/simulator-arm64.h b/deps/v8/src/arm64/simulator-arm64.h index e4e3e09e45ad2e..12f9dcba8c5656 100644 --- a/deps/v8/src/arm64/simulator-arm64.h +++ b/deps/v8/src/arm64/simulator-arm64.h @@ -656,10 +656,11 @@ class Simulator : public DecoderVisitor, public SimulatorBase { USE(size); } - explicit Simulator(Decoder* decoder, - Isolate* isolate = nullptr, FILE* stream = stderr); + V8_EXPORT_PRIVATE explicit Simulator( + Decoder* decoder, Isolate* isolate = nullptr, + FILE* stream = stderr); Simulator(); - ~Simulator(); + V8_EXPORT_PRIVATE ~Simulator(); // System functions. @@ -744,7 +745,7 @@ class Simulator : public DecoderVisitor, public SimulatorBase { // Accessor to the internal simulator stack area. uintptr_t StackLimit(uintptr_t c_limit) const; - void ResetState(); + V8_EXPORT_PRIVATE void ResetState(); void DoRuntimeCall(Instruction* instr); @@ -752,7 +753,7 @@ class Simulator : public DecoderVisitor, public SimulatorBase { static const Instruction* kEndOfSimAddress; void DecodeInstruction(); void Run(); - void RunFrom(Instruction* start); + V8_EXPORT_PRIVATE void RunFrom(Instruction* start); // Simulation helpers. template diff --git a/deps/v8/src/arm64/simulator-logic-arm64.cc b/deps/v8/src/arm64/simulator-logic-arm64.cc index e23f194414157b..c074f99fac32a4 100644 --- a/deps/v8/src/arm64/simulator-logic-arm64.cc +++ b/deps/v8/src/arm64/simulator-logic-arm64.cc @@ -2967,7 +2967,7 @@ T Simulator::FPMulx(T op1, T op2) { if ((std::isinf(op1) && (op2 == 0.0)) || (std::isinf(op2) && (op1 == 0.0))) { // inf * 0.0 returns +/-2.0. T two = 2.0; - return copysign(1.0, op1) * copysign(1.0, op2) * two; + return std::copysign(1.0, op1) * std::copysign(1.0, op2) * two; } return FPMul(op1, op2); } @@ -2976,8 +2976,8 @@ template T Simulator::FPMulAdd(T a, T op1, T op2) { T result = FPProcessNaNs3(a, op1, op2); - T sign_a = copysign(1.0, a); - T sign_prod = copysign(1.0, op1) * copysign(1.0, op2); + T sign_a = std::copysign(1.0, a); + T sign_prod = std::copysign(1.0, op1) * std::copysign(1.0, op2); bool isinf_prod = std::isinf(op1) || std::isinf(op2); bool operation_generates_nan = (std::isinf(op1) && (op2 == 0.0)) || // inf * 0.0 @@ -3012,7 +3012,7 @@ T Simulator::FPMulAdd(T a, T op1, T op2) { // Work around broken fma implementations for rounded zero results: If a is // 0.0, the sign of the result is the sign of op1 * op2 before rounding. if ((a == 0.0) && (result == 0.0)) { - return copysign(0.0, sign_prod); + return std::copysign(0.0, sign_prod); } return result; @@ -3031,8 +3031,8 @@ T Simulator::FPDiv(T op1, T op2) { if (op2 == 0.0) { FPProcessException(); if (!std::isnan(op1)) { - double op1_sign = copysign(1.0, op1); - double op2_sign = copysign(1.0, op2); + double op1_sign = std::copysign(1.0, op1); + double op2_sign = std::copysign(1.0, op2); return static_cast(op1_sign * op2_sign * kFP64PositiveInfinity); } } @@ -3050,7 +3050,7 @@ T Simulator::FPSqrt(T op) { FPProcessException(); return FPDefaultNaN(); } else { - return sqrt(op); + return std::sqrt(op); } } @@ -3059,7 +3059,8 @@ T Simulator::FPMax(T a, T b) { T result = FPProcessNaNs(a, b); if (std::isnan(result)) return result; - if ((a == 0.0) && (b == 0.0) && (copysign(1.0, a) != copysign(1.0, b))) { + if ((a == 0.0) && (b == 0.0) && + (std::copysign(1.0, a) != std::copysign(1.0, b))) { // a and b are zero, and the sign differs: return +0.0. return 0.0; } else { @@ -3084,7 +3085,8 @@ T Simulator::FPMin(T a, T b) { T result = FPProcessNaNs(a, b); if (std::isnan(result)) return result; - if ((a == 0.0) && (b == 0.0) && (copysign(1.0, a) != copysign(1.0, b))) { + if ((a == 0.0) && (b == 0.0) && + (std::copysign(1.0, a) != std::copysign(1.0, b))) { // a and b are zero, and the sign differs: return -0.0. return -0.0; } else { @@ -3516,7 +3518,7 @@ LogicVRegister Simulator::fabs_(VectorFormat vform, LogicVRegister dst, dst.ClearForWrite(vform); for (int i = 0; i < LaneCountFromFormat(vform); i++) { T op = src.Float(i); - if (copysign(1.0, op) < 0.0) { + if (std::copysign(1.0, op) < 0.0) { op = -op; } dst.SetFloat(i, op); @@ -3865,12 +3867,12 @@ T Simulator::FPRecipSqrtEstimate(T op) { if (std::isnan(op)) { return FPProcessNaN(op); } else if (op == 0.0) { - if (copysign(1.0, op) < 0.0) { + if (std::copysign(1.0, op) < 0.0) { return kFP64NegativeInfinity; } else { return kFP64PositiveInfinity; } - } else if (copysign(1.0, op) < 0.0) { + } else if (std::copysign(1.0, op) < 0.0) { FPProcessException(); return FPDefaultNaN(); } else if (std::isinf(op)) { diff --git a/deps/v8/src/arm64/utils-arm64.h b/deps/v8/src/arm64/utils-arm64.h index f57dc861731c51..00ed1c20c31bd3 100644 --- a/deps/v8/src/arm64/utils-arm64.h +++ b/deps/v8/src/arm64/utils-arm64.h @@ -33,8 +33,8 @@ int float16classify(float16 value); // Bit counting. int CountLeadingZeros(uint64_t value, int width); int CountLeadingSignBits(int64_t value, int width); -int CountTrailingZeros(uint64_t value, int width); -int CountSetBits(uint64_t value, int width); +V8_EXPORT_PRIVATE int CountTrailingZeros(uint64_t value, int width); +V8_EXPORT_PRIVATE int CountSetBits(uint64_t value, int width); int LowestSetBitPosition(uint64_t value); int HighestSetBitPosition(uint64_t value); uint64_t LargestPowerOf2Divisor(uint64_t value); diff --git a/deps/v8/src/asmjs/asm-js.cc b/deps/v8/src/asmjs/asm-js.cc index a84c88546ef605..44a3f439f69eb0 100644 --- a/deps/v8/src/asmjs/asm-js.cc +++ b/deps/v8/src/asmjs/asm-js.cc @@ -355,11 +355,11 @@ MaybeHandle AsmJs::InstantiateAsmWasm(Isolate* isolate, instantiate_timer.Start(); Handle uses_bitset(wasm_data->uses_bitset(), isolate); Handle