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

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: Rebased, frogsh, type warning 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
« no previous file with comments | « dart/frog/leg/typechecker.dart ('k') | dart/frog/tests/leg_only/leg_only.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 mode = 'in checked mode + compile all'
62 b('in checked mode')) 62 print 'Compiling on Dart VM took %s seconds %s' % (b(elapsed), b(mode))
63
64 # VM Checked, produces checked
65 start = time.time()
66 RunCommand('./frog.py',
67 '--vm_flags=--enable_type_checks --enable_asserts',
68 '--', '--enable_type_checks', '--out=frogsh', 'frog.dart')
69 elapsed = time.time() - start
70 mode = 'in checked mode'
71 print 'Compiling on Dart VM took %s seconds %s' % (b(elapsed), b(mode))
63 72
64 # VM Normal, produces checked 73 # VM Normal, produces checked
65 start = time.time() 74 start = time.time()
66 RunCommand('./frog.py', '--out=frogsh', '--enable_type_checks', 'frog.dart') 75 RunCommand('./frog.py', '--out=frogsh', '--enable_type_checks', 'frog.dart')
67 elapsed = time.time() - start 76 elapsed = time.time() - start
68 print 'Compiling on Dart VM took %s seconds' % b(elapsed) 77 print 'Compiling on Dart VM took %s seconds' % b(elapsed)
69 78
70 # Selfhost Checked 79 # Selfhost Checked
71 start = time.time() 80 start = time.time()
72 RunCommand('./frogsh', '--out=frogsh', '--enable_type_checks', 'frog.dart', 81 RunCommand('./frogsh', '--out=frogsh', '--enable_type_checks', 'frog.dart',
(...skipping 13 matching lines...) Expand all
86 test_cmd.extend(['language', 'corelib', 'leg', 95 test_cmd.extend(['language', 'corelib', 'leg',
87 'isolate', 'peg', 'leg_only']) 96 'isolate', 'peg', 'leg_only'])
88 RunCommand(*test_cmd, verbose=True) 97 RunCommand(*test_cmd, verbose=True)
89 98
90 if __name__ == '__main__': 99 if __name__ == '__main__':
91 try: 100 try:
92 sys.exit(main(sys.argv)) 101 sys.exit(main(sys.argv))
93 except Error as e: 102 except Error as e:
94 sys.stderr.write('%s\n' % e) 103 sys.stderr.write('%s\n' % e)
95 sys.exit(1) 104 sys.exit(1)
OLDNEW
« no previous file with comments | « dart/frog/leg/typechecker.dart ('k') | dart/frog/tests/leg_only/leg_only.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698