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

Side by Side Diff: Tools/Scripts/webkitpy/bindings/main.py

Issue 184233005: Pre-cache PLY yacc parse table and use optimized mode (45% build time improvement) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reupload 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (C) 2011 Google Inc. All rights reserved. 1 # Copyright (C) 2011 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 1. Redistributions of source code must retain the above copyright 6 # 1. Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # 2. Redistributions in binary form must reproduce the above copyright 8 # 2. Redistributions in binary form must reproduce the above copyright
9 # notice, this list of conditions and the following disclaimer in the 9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution. 10 # documentation and/or other materials provided with the distribution.
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 if self.verbose: 209 if self.verbose:
210 print 'PASS: %s' % reference_basename 210 print 'PASS: %s' % reference_basename
211 return True 211 return True
212 212
213 def identical_output_files(self): 213 def identical_output_files(self):
214 file_pairs = [(os.path.join(reference_directory, output_file), 214 file_pairs = [(os.path.join(reference_directory, output_file),
215 os.path.join(self.output_directory, output_file)) 215 os.path.join(self.output_directory, output_file))
216 for output_file in os.listdir(self.output_directory) 216 for output_file in os.listdir(self.output_directory)
217 # Skip cache 217 # Skip cache
218 if (output_file != 'parsetab.py' and # PLY cache 218 if not output_file.endswith(('.pickle', # PLY yacc
219 not output_file.endswith('.cache'))] # Jinja cache 219 '.cache', # Jinja
220 ))]
220 return all([self.identical_file(reference_filename, output_filename) 221 return all([self.identical_file(reference_filename, output_filename)
221 for (reference_filename, output_filename) in file_pairs]) 222 for (reference_filename, output_filename) in file_pairs])
222 223
223 def no_excess_files(self): 224 def no_excess_files(self):
224 generated_files = set(os.listdir(self.output_directory)) 225 generated_files = set(os.listdir(self.output_directory))
225 generated_files.add('.svn') # Subversion working copy directory 226 generated_files.add('.svn') # Subversion working copy directory
226 generated_files.add('EventInterfaces.in') # only in Perl, not Python 227 generated_files.add('EventInterfaces.in') # only in Perl, not Python
227 excess_files = [output_file 228 excess_files = [output_file
228 for output_file in os.listdir(reference_directory) 229 for output_file in os.listdir(reference_directory)
229 if output_file not in generated_files] 230 if output_file not in generated_files]
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 print PASS_MESSAGE 273 print PASS_MESSAGE
273 return 0 274 return 0
274 print 275 print
275 print FAIL_MESSAGE 276 print FAIL_MESSAGE
276 return -1 277 return -1
277 278
278 279
279 def run_bindings_tests(reset_results, verbose): 280 def run_bindings_tests(reset_results, verbose):
280 with ScopedTempFileProvider() as provider: 281 with ScopedTempFileProvider() as provider:
281 return BindingsTests(reset_results, verbose, provider).main() 282 return BindingsTests(reset_results, verbose, provider).main()
OLDNEW
« Source/bindings/scripts/idl_reader.py ('K') | « Source/bindings/scripts/idl_reader.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698