| OLD | NEW |
| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 }) | 166 }) |
| 167 ]; | 167 ]; |
| 168 | 168 |
| 169 parseCommandLine(handlers, argv); | 169 parseCommandLine(handlers, argv); |
| 170 if (wantHelp) helpAndExit(verbose); | 170 if (wantHelp) helpAndExit(verbose); |
| 171 | 171 |
| 172 if (outputLanguage != OUTPUT_LANGUAGE_DART && stripArgumentSet) { | 172 if (outputLanguage != OUTPUT_LANGUAGE_DART && stripArgumentSet) { |
| 173 helpAndFail('Error: --force-strip may only be used with ' | 173 helpAndFail('Error: --force-strip may only be used with ' |
| 174 '--output-type=dart'); | 174 '--output-type=dart'); |
| 175 } | 175 } |
| 176 if (arguments.isEmpty()) { | 176 if (arguments.isEmpty) { |
| 177 helpAndFail('Error: No Dart file specified.'); | 177 helpAndFail('Error: No Dart file specified.'); |
| 178 } | 178 } |
| 179 if (arguments.length > 1) { | 179 if (arguments.length > 1) { |
| 180 var extra = arguments.getRange(1, arguments.length - 1); | 180 var extra = arguments.getRange(1, arguments.length - 1); |
| 181 helpAndFail('Error: Extra arguments: ${Strings.join(extra, " ")}'); | 181 helpAndFail('Error: Extra arguments: ${Strings.join(extra, " ")}'); |
| 182 } | 182 } |
| 183 | 183 |
| 184 Map<String, SourceFile> sourceFiles = <String, SourceFile>{}; | 184 Map<String, SourceFile> sourceFiles = <String, SourceFile>{}; |
| 185 int dartBytesRead = 0; | 185 int dartBytesRead = 0; |
| 186 | 186 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 } catch (ignored) { | 426 } catch (ignored) { |
| 427 print('Internal error: error while printing exception'); | 427 print('Internal error: error while printing exception'); |
| 428 } | 428 } |
| 429 try { | 429 try { |
| 430 print(trace); | 430 print(trace); |
| 431 } finally { | 431 } finally { |
| 432 exit(253); // 253 is recognized as a crash by our test scripts. | 432 exit(253); // 253 is recognized as a crash by our test scripts. |
| 433 } | 433 } |
| 434 } | 434 } |
| 435 } | 435 } |
| OLD | NEW |