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), |