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

Side by Side Diff: dart/frog/presubmit.py

Issue 8497011: Parse formal parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 import os 6 import os
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 import time 9 import time
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 sys.stderr.write('Command failed:\n%s\n' % quoted_arguments) 44 sys.stderr.write('Command failed:\n%s\n' % quoted_arguments)
45 if stdout: 45 if stdout:
46 sys.stderr.write(stdout) 46 sys.stderr.write(stdout)
47 47
48 48
49 def main(args): 49 def main(args):
50 def b(s): 50 def b(s):
51 """Adds ANSI escape-code for bold-face""" 51 """Adds ANSI escape-code for bold-face"""
52 return "\033[1m%s\033[0m" % s 52 return "\033[1m%s\033[0m" % s
53 53
54 # VM Checked, produces checked 54 # VM Checked/CompileAll, produces checked
55 print 'Started' 55 print 'Started'
56 start = time.time() 56 start = time.time()
57 RunCommand('./frog.py', 57 RunCommand('./frog.py',
58 '--vm_flags=--compile_all --enable_type_checks --enable_asserts', 58 '--vm_flags=--compile_all --enable_type_checks --enable_asserts',
59 '--', '--enable_type_checks', '--out=frogsh', 'frog.dart') 59 '--', '--enable_type_checks', '--out=frogsh', 'frog.dart')
60 elapsed = time.time() - start 60 elapsed = time.time() - start
61 print 'Compiling on Dart VM took %s seconds %s' % (b(elapsed), 61 print 'Compiling on Dart VM took %s seconds %s' % (b(elapsed),
kasperl 2011/11/08 12:32:49 Maybe throw 'in checked mode + compile all' in a l
ahe 2011/11/08 12:40:31 Done.
62 b('in checked mode '
63 '+ compile all'))
64
65 # VM Checked, produces checked
66 start = time.time()
67 RunCommand('./frog.py',
68 '--vm_flags=--enable_type_checks --enable_asserts',
69 '--', '--enable_type_checks', '--out=frogsh', 'frog.dart')
70 elapsed = time.time() - start
71 print 'Compiling on Dart VM took %s seconds %s' % (b(elapsed),
62 b('in checked mode')) 72 b('in checked mode'))
63 73
64 # VM Normal, produces checked 74 # VM Normal, produces checked
65 start = time.time() 75 start = time.time()
66 RunCommand('./frog.py', '--out=frogsh', '--enable_type_checks', 'frog.dart') 76 RunCommand('./frog.py', '--out=frogsh', '--enable_type_checks', 'frog.dart')
67 elapsed = time.time() - start 77 elapsed = time.time() - start
68 print 'Compiling on Dart VM took %s seconds' % b(elapsed) 78 print 'Compiling on Dart VM took %s seconds' % b(elapsed)
69 79
70 # Selfhost Checked 80 # Selfhost Checked
71 start = time.time() 81 start = time.time()
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 '--vm_flags=--enable_type_checks --enable_asserts', 116 '--vm_flags=--enable_type_checks --enable_asserts',
107 '--', '--enable_leg', '--verbose', '--throw_on_errors', 117 '--', '--enable_leg', '--verbose', '--throw_on_errors',
108 filename, pattern=pattern, exit_code=vm_exit_code) 118 filename, pattern=pattern, exit_code=vm_exit_code)
109 119
110 if __name__ == '__main__': 120 if __name__ == '__main__':
111 try: 121 try:
112 sys.exit(main(sys.argv)) 122 sys.exit(main(sys.argv))
113 except Error as e: 123 except Error as e:
114 sys.stderr.write('%s\n' % e) 124 sys.stderr.write('%s\n' % e)
115 sys.exit(1) 125 sys.exit(1)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698