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

Unified Diff: bindings/scripts/idl_compiler.py

Issue 581453002: Dartium Roll 38 roll (Closed) Base URL: https://dart.googlecode.com/svn/third_party/WebCore
Patch Set: Sync'd w/ r 182210 Created 6 years, 3 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 | « bindings/scripts/generate_global_constructors.py ('k') | bindings/scripts/idl_definitions.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bindings/scripts/idl_compiler.py
diff --git a/bindings/scripts/idl_compiler.py b/bindings/scripts/idl_compiler.py
index 6728aff45c10cadb38a7d536c0c5c8e7dd531e08..c74aae7a002777349c65c6c18c68f1ae8c266ba8 100755
--- a/bindings/scripts/idl_compiler.py
+++ b/bindings/scripts/idl_compiler.py
@@ -100,14 +100,13 @@ class IdlCompiler(object):
self.output_directory = output_directory
self.reader = IdlReader(interfaces_info, cache_directory)
- def compile_and_write(self, idl_filename, output_filenames):
+ def compile_and_write(self, idl_filename):
interface_name = idl_filename_to_interface_name(idl_filename)
definitions = self.reader.read_idl_definitions(idl_filename)
output_code_list = self.code_generator.generate_code(
definitions, interface_name)
- for output_code, output_filename in zip(output_code_list,
- output_filenames):
- write_file(output_code, output_filename, self.only_if_changed)
+ for output_path, output_code in output_code_list:
+ write_file(output_code, output_path, self.only_if_changed)
@abc.abstractmethod
def compile_file(self, idl_filename):
@@ -118,15 +117,11 @@ class IdlCompilerV8(IdlCompiler):
def __init__(self, *args, **kwargs):
IdlCompiler.__init__(self, *args, **kwargs)
self.code_generator = CodeGeneratorV8(self.interfaces_info,
- self.cache_directory)
+ self.cache_directory,
+ self.output_directory)
def compile_file(self, idl_filename):
- interface_name = idl_filename_to_interface_name(idl_filename)
- header_filename = os.path.join(self.output_directory,
- 'V8%s.h' % interface_name)
- cpp_filename = os.path.join(self.output_directory,
- 'V8%s.cpp' % interface_name)
- self.compile_and_write(idl_filename, (header_filename, cpp_filename))
+ self.compile_and_write(idl_filename)
def main():
« no previous file with comments | « bindings/scripts/generate_global_constructors.py ('k') | bindings/scripts/idl_definitions.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698