| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection' show Queue, LinkedHashMap; | 8 import 'dart:collection' show Queue, LinkedHashMap; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 import 'dart:uri'; | 10 import 'dart:uri'; |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 final EventSink<String> sink; | 337 final EventSink<String> sink; |
| 338 int count = 0; | 338 int count = 0; |
| 339 | 339 |
| 340 CountingSink(this.sink); | 340 CountingSink(this.sink); |
| 341 | 341 |
| 342 void add(String value) { | 342 void add(String value) { |
| 343 sink.add(value); | 343 sink.add(value); |
| 344 count += value.length; | 344 count += value.length; |
| 345 } | 345 } |
| 346 | 346 |
| 347 void addError(AsyncError error) { sink.addError(error); } | 347 void addError(Object error) { sink.addError(error); } |
| 348 | 348 |
| 349 void close() { sink.close(); } | 349 void close() { sink.close(); } |
| 350 } | 350 } |
| 351 | 351 |
| 352 class AbortLeg { | 352 class AbortLeg { |
| 353 final message; | 353 final message; |
| 354 AbortLeg(this.message); | 354 AbortLeg(this.message); |
| 355 toString() => 'Aborted due to --throw-on-error: $message'; | 355 toString() => 'Aborted due to --throw-on-error: $message'; |
| 356 } | 356 } |
| 357 | 357 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 print(trace); | 513 print(trace); |
| 514 } finally { | 514 } finally { |
| 515 exit(253); // 253 is recognized as a crash by our test scripts. | 515 exit(253); // 253 is recognized as a crash by our test scripts. |
| 516 } | 516 } |
| 517 } | 517 } |
| 518 } | 518 } |
| 519 | 519 |
| 520 void main() { | 520 void main() { |
| 521 mainWithErrorHandler(new Options()); | 521 mainWithErrorHandler(new Options()); |
| 522 } | 522 } |
| OLD | NEW |