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

Side by Side Diff: lib/compiler/implementation/dart2js.dart

Issue 10353014: Start implementing checked mode and tools support for using it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library('dart2js'); 5 #library('dart2js');
6 6
7 #import('dart:io'); 7 #import('dart:io');
8 #import('dart:uri'); 8 #import('dart:uri');
9 #import('dart:utf'); 9 #import('dart:utf');
10 10
(...skipping 28 matching lines...) Expand all
39 if (!path.endsWith("/")) path = "$path/"; 39 if (!path.endsWith("/")) path = "$path/";
40 libraryRoot = cwd.resolve(path); 40 libraryRoot = cwd.resolve(path);
41 } else if (argument.startsWith('--out=')) { 41 } else if (argument.startsWith('--out=')) {
42 String path = 42 String path =
43 nativeToUriPath(argument.substring(argument.indexOf('=') + 1)); 43 nativeToUriPath(argument.substring(argument.indexOf('=') + 1));
44 out = cwd.resolve(path); 44 out = cwd.resolve(path);
45 } else if ('--allow-mock-compilation' == argument) { 45 } else if ('--allow-mock-compilation' == argument) {
46 options.add(argument); 46 options.add(argument);
47 } else if ('--no-colors' == argument) { 47 } else if ('--no-colors' == argument) {
48 colors.enabled = false; 48 colors.enabled = false;
49 } else if ('--enable-checked-mode' == argument) {
50 options.add(argument);
49 } else if (argument.startsWith('-')) { 51 } else if (argument.startsWith('-')) {
50 fail('Unknown option $argument.'); 52 fail('Unknown option $argument.');
51 } else { 53 } else {
52 arguments.add(nativeToUriPath(argument)); 54 arguments.add(nativeToUriPath(argument));
53 } 55 }
54 } 56 }
55 if (arguments.isEmpty()) { 57 if (arguments.isEmpty()) {
56 fail('No file to compile.'); 58 fail('No file to compile.');
57 } 59 }
58 if (arguments.length > 1) { 60 if (arguments.length > 1) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } catch (var ignored) { 157 } catch (var ignored) {
156 print('Internal error: error while printing exception'); 158 print('Internal error: error while printing exception');
157 } 159 }
158 try { 160 try {
159 print(trace); 161 print(trace);
160 } finally { 162 } finally {
161 exit(253); // 253 is recognized as a crash by our test scripts. 163 exit(253); // 253 is recognized as a crash by our test scripts.
162 } 164 }
163 } 165 }
164 } 166 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698