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

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

Issue 183013013: Pre-cache PLY lex table and use optimized mode (5% build time improvement) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix order 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
« no previous file with comments | « Source/bindings/scripts/blink_idl_parser.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 return False 207 return False
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 caches
218 if not output_file.endswith(('.pickle', # PLY yacc 218 if not (output_file in ('lextab.py', # PLY lex
219 '.cache', # Jinja 219 'lextab.pyc',
220 ))] 220 'parsetab.pickle') or # PLY yacc
221 output_file.endswith('.cache'))] # Jinja
221 return all([self.identical_file(reference_filename, output_filename) 222 return all([self.identical_file(reference_filename, output_filename)
222 for (reference_filename, output_filename) in file_pairs]) 223 for (reference_filename, output_filename) in file_pairs])
223 224
224 def no_excess_files(self): 225 def no_excess_files(self):
225 generated_files = set(os.listdir(self.output_directory)) 226 generated_files = set(os.listdir(self.output_directory))
226 generated_files.add('.svn') # Subversion working copy directory 227 generated_files.add('.svn') # Subversion working copy directory
227 generated_files.add('EventInterfaces.in') # only in Perl, not Python 228 generated_files.add('EventInterfaces.in') # only in Perl, not Python
228 excess_files = [output_file 229 excess_files = [output_file
229 for output_file in os.listdir(reference_directory) 230 for output_file in os.listdir(reference_directory)
230 if output_file not in generated_files] 231 if output_file not in generated_files]
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 print PASS_MESSAGE 274 print PASS_MESSAGE
274 return 0 275 return 0
275 print 276 print
276 print FAIL_MESSAGE 277 print FAIL_MESSAGE
277 return -1 278 return -1
278 279
279 280
280 def run_bindings_tests(reset_results, verbose): 281 def run_bindings_tests(reset_results, verbose):
281 with ScopedTempFileProvider() as provider: 282 with ScopedTempFileProvider() as provider:
282 return BindingsTests(reset_results, verbose, provider).main() 283 return BindingsTests(reset_results, verbose, provider).main()
OLDNEW
« no previous file with comments | « Source/bindings/scripts/blink_idl_parser.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698