Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Unified Diff: Source/build/scripts/name_macros.py

Issue 221233005: Remove remaining Dart-specific perl code in Dartium (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/1847
Patch Set: Remove msvs setting Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/dart/gyp/scripts/xxd.pl ('k') | Source/core/core_generated.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/build/scripts/name_macros.py
diff --git a/Source/build/scripts/name_macros.py b/Source/build/scripts/name_macros.py
index 9aa4e570ff817e0e8e946707d65adcf392c163e2..1ebd07c8d0a47f1e573a5b40726199bddd685624 100644
--- a/Source/build/scripts/name_macros.py
+++ b/Source/build/scripts/name_macros.py
@@ -71,7 +71,8 @@ class Writer(in_generator.Writer):
self._unconditional_entries = []
self._validate_entries()
self._sort_entries_by_conditional()
- self._outputs = {(self.namespace + "Headers.h"): self.generate_headers_header,
+ self._outputs = {(self.namespace + "Headers.h"): self.generate_v8_headers_header,
+ ('Dart' + self.namespace + "Headers.h"): self.generate_dart_headers_header,
(self.namespace + "Interfaces.h"): self.generate_interfaces_header,
}
@@ -123,27 +124,34 @@ class Writer(in_generator.Writer):
path = entry['name']
return path + '.h'
- def _headers_header_includes(self, entries):
+ def _headers_header_includes(self, entries, engine):
includes = dict()
for entry in entries:
cpp_name = name_utilities.cpp_name(entry)
# Avoid duplicate includes.
if cpp_name in includes:
continue
- include = '#include "%(path)s"\n#include "V8%(script_name)s.h"' % {
+ include = '#include "%(path)s"\n#include "%(engine)s%(script_name)s.h"' % {
'path': self._headers_header_include_path(entry),
'script_name': name_utilities.script_name(entry),
+ 'engine': engine,
}
includes[cpp_name] = self.wrap_with_condition(include, entry['Conditional'])
return includes.values()
- def generate_headers_header(self):
+ def _generate_headers_header(self, engine):
return HEADER_TEMPLATE % {
'license': license.license_for_generated_cpp(),
'namespace': self.namespace,
- 'includes': '\n'.join(self._headers_header_includes(self.in_file.name_dictionaries)),
+ 'includes': '\n'.join(self._headers_header_includes(self.in_file.name_dictionaries, engine)),
}
+ def generate_dart_headers_header(self):
+ return self._generate_headers_header('Dart')
+
+ def generate_v8_headers_header(self):
+ return self._generate_headers_header('V8')
+
def _declare_one_conditional_macro(self, conditional, entries):
macro_name = '%(macro_style_name)s_INTERFACES_FOR_EACH_%(conditional)s' % {
'macro_style_name': name_utilities.to_macro_style(self.namespace),
« no previous file with comments | « Source/bindings/dart/gyp/scripts/xxd.pl ('k') | Source/core/core_generated.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698