From 027dcff20759143095e7d28144879008936ad568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 31 May 2019 09:32:19 +0200 Subject: [PATCH] tools: sync gypfiles with V8 7.7 Co-authored-by: Ujjwal Sharma Backport-PR-URL: https://github.com/nodejs/node/pull/29241 PR-URL: https://github.com/nodejs/node/pull/28918 Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis Reviewed-By: Jiawen Geng Reviewed-By: Rich Trott --- src/inspector/node_inspector.gypi | 2 +- tools/v8_gypfiles/ForEachReplace.py | 7 +++ tools/v8_gypfiles/features.gypi | 1 + tools/v8_gypfiles/inspector.gypi | 39 +++++++++++-- tools/v8_gypfiles/v8.gyp | 85 ++++++----------------------- 5 files changed, 58 insertions(+), 76 deletions(-) create mode 100644 tools/v8_gypfiles/ForEachReplace.py diff --git a/src/inspector/node_inspector.gypi b/src/inspector/node_inspector.gypi index 1d1dbefd866645..221972a0b5a168 100644 --- a/src/inspector/node_inspector.gypi +++ b/src/inspector/node_inspector.gypi @@ -113,7 +113,7 @@ { 'action_name': 'concatenate_protocols', 'inputs': [ - '../../deps/v8/src/inspector/js_protocol.pdl', + '../../deps/v8/include/js_protocol.pdl', '<(SHARED_INTERMEDIATE_DIR)/src/node_protocol.json', ], 'outputs': [ diff --git a/tools/v8_gypfiles/ForEachReplace.py b/tools/v8_gypfiles/ForEachReplace.py new file mode 100644 index 00000000000000..730487a2baa22c --- /dev/null +++ b/tools/v8_gypfiles/ForEachReplace.py @@ -0,0 +1,7 @@ +# Copyright (c) 2019 Ujjwal Sharma . All rights reserved. +# Use of this source code is governed by an MIT-style license. + +def DoMain(args): + old = args.pop(0) + new = args.pop(0) + return ' '.join(a.replace(old, new) for a in args) diff --git a/tools/v8_gypfiles/features.gypi b/tools/v8_gypfiles/features.gypi index a670f3bc80691c..bcbd9d2268bcbc 100644 --- a/tools/v8_gypfiles/features.gypi +++ b/tools/v8_gypfiles/features.gypi @@ -253,6 +253,7 @@ 'defines': [ 'V8_ENABLE_ALLOCATION_TIMEOUT', 'V8_ENABLE_FORCE_SLOW_PATH', + 'V8_ENABLE_DOUBLE_CONST_STORE_CHECK', ], }], ['v8_enable_v8_checks==1', { diff --git a/tools/v8_gypfiles/inspector.gypi b/tools/v8_gypfiles/inspector.gypi index 5e89f400ab8adf..562583126d3f7f 100644 --- a/tools/v8_gypfiles/inspector.gypi +++ b/tools/v8_gypfiles/inspector.gypi @@ -3,11 +3,31 @@ # found in the LICENSE file. { - 'includes': [ - '../../deps/v8/third_party/inspector_protocol/inspector_protocol.gypi', - ], 'variables': { 'inspector_protocol_path': '<(V8_ROOT)/third_party/inspector_protocol', + 'inspector_protocol_files': [ + '<(inspector_protocol_path)/lib/base_string_adapter_cc.template', + '<(inspector_protocol_path)/lib/base_string_adapter_h.template', + '<(inspector_protocol_path)/lib/DispatcherBase_cpp.template', + '<(inspector_protocol_path)/lib/DispatcherBase_h.template', + '<(inspector_protocol_path)/lib/ErrorSupport_cpp.template', + '<(inspector_protocol_path)/lib/ErrorSupport_h.template', + '<(inspector_protocol_path)/lib/Forward_h.template', + '<(inspector_protocol_path)/lib/FrontendChannel_h.template', + '<(inspector_protocol_path)/lib/Object_cpp.template', + '<(inspector_protocol_path)/lib/Object_h.template', + '<(inspector_protocol_path)/lib/Parser_cpp.template', + '<(inspector_protocol_path)/lib/Parser_h.template', + '<(inspector_protocol_path)/lib/Protocol_cpp.template', + '<(inspector_protocol_path)/lib/ValueConversions_h.template', + '<(inspector_protocol_path)/lib/Values_cpp.template', + '<(inspector_protocol_path)/lib/Values_h.template', + '<(inspector_protocol_path)/templates/Exported_h.template', + '<(inspector_protocol_path)/templates/Imported_h.template', + '<(inspector_protocol_path)/templates/TypeBuilder_cpp.template', + '<(inspector_protocol_path)/templates/TypeBuilder_h.template', + '<(inspector_protocol_path)/code_generator.py', + ], 'inspector_path': '<(V8_ROOT)/src/inspector', 'inspector_generated_output_root': '<(SHARED_INTERMEDIATE_DIR)/inspector-generated-output-root', 'inspector_generated_sources': [ @@ -92,16 +112,22 @@ # Flat merge `third_party/inspector_protocol:encoding` '<(inspector_protocol_path)/encoding/encoding.cc', '<(inspector_protocol_path)/encoding/encoding.h', - ] + # Flat merge `third_party/inspector_protocol:bindings` + '<(inspector_protocol_path)/bindings/bindings.cc', + '<(inspector_protocol_path)/bindings/bindings.h', + + ], + 'v8_inspector_js_protocol': '<(V8_ROOT)/include/js_protocol.pdl', }, 'include_dirs': [ '<(inspector_generated_output_root)', + '<(inspector_protocol_path)', ], 'actions': [ { 'action_name': 'protocol_compatibility', 'inputs': [ - '<(inspector_path)/js_protocol.pdl', + '<(v8_inspector_js_protocol)', ], 'outputs': [ '<@(inspector_generated_output_root)/src/js_protocol.stamp', @@ -117,7 +143,7 @@ { 'action_name': 'protocol_generated_sources', 'inputs': [ - '<(inspector_path)/js_protocol.pdl', + '<(v8_inspector_js_protocol)', '<(inspector_path)/inspector_protocol_config.json', '<@(inspector_protocol_files)', ], @@ -131,6 +157,7 @@ '--jinja_dir', '<(V8_ROOT)/third_party', '--output_base', '<(inspector_generated_output_root)/src/inspector', '--config', '<(inspector_path)/inspector_protocol_config.json', + '--inspector_protocol_dir', '<(inspector_protocol_path)', ], 'message': 'Generating inspector protocol sources from protocol json', }, diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index ce33b8cd53acd8..f133aea61178e8 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -34,6 +34,7 @@ "<(V8_ROOT)/src/builtins/array-unshift.tq", "<(V8_ROOT)/src/builtins/array.tq", "<(V8_ROOT)/src/builtins/base.tq", + "<(V8_ROOT)/src/builtins/bigint.tq", "<(V8_ROOT)/src/builtins/boolean.tq", "<(V8_ROOT)/src/builtins/collections.tq", "<(V8_ROOT)/src/builtins/data-view.tq", @@ -44,13 +45,20 @@ "<(V8_ROOT)/src/builtins/iterator.tq", "<(V8_ROOT)/src/builtins/math.tq", "<(V8_ROOT)/src/builtins/object-fromentries.tq", + "<(V8_ROOT)/src/builtins/object.tq", "<(V8_ROOT)/src/builtins/proxy-constructor.tq", + "<(V8_ROOT)/src/builtins/proxy-delete-property.tq", "<(V8_ROOT)/src/builtins/proxy-get-property.tq", + "<(V8_ROOT)/src/builtins/proxy-get-prototype-of.tq", "<(V8_ROOT)/src/builtins/proxy-has-property.tq", + "<(V8_ROOT)/src/builtins/proxy-is-extensible.tq", + "<(V8_ROOT)/src/builtins/proxy-prevent-extensions.tq", "<(V8_ROOT)/src/builtins/proxy-revocable.tq", "<(V8_ROOT)/src/builtins/proxy-revoke.tq", "<(V8_ROOT)/src/builtins/proxy-set-property.tq", + "<(V8_ROOT)/src/builtins/proxy-set-prototype-of.tq", "<(V8_ROOT)/src/builtins/proxy.tq", + "<(V8_ROOT)/src/builtins/reflect.tq", "<(V8_ROOT)/src/builtins/regexp-replace.tq", "<(V8_ROOT)/src/builtins/regexp.tq", "<(V8_ROOT)/src/builtins/string.tq", @@ -74,66 +82,12 @@ "<(V8_ROOT)/src/builtins/typed-array-subarray.tq", "<(V8_ROOT)/src/builtins/typed-array.tq", "<(V8_ROOT)/third_party/v8/builtins/array-sort.tq", - ], - 'torque_namespaces': [ - "arguments", - "array", - "array-copywithin", - "array-filter", - "array-find", - "array-findindex", - "array-foreach", - "array-join", - "array-map", - "array-of", - "array-reverse", - "array-shift", - "array-slice", - "array-splice", - "array-unshift", - "array-lastindexof", - "base", - "boolean", - "collections", - "data-view", - "extras-utils", - "growable-fixed-array", - "internal-coverage", - "iterator", - "math", - "object", - "proxy", - "regexp", - "regexp-replace", - "string", - "string-html", - "string-iterator", - "string-repeat", - "string-slice", - "string-substring", - "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", + "<(V8_ROOT)/test/torque/test-torque.tq", ], 'torque_output_root': '<(SHARED_INTERMEDIATE_DIR)/torque-output-root', - # Since there is no foreach in GYP we use `ForEachFormat` to unroll the following: - # foreach(namespace, torque_namespaces) { - # outputs += [ - # "$target_gen_dir/torque-generated/builtins-$namespace-gen-tq.cc", - # "$target_gen_dir/torque-generated/builtins-$namespace-gen-tq.h", - # ] - # } - 'torque_outputs': ['