| 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('parser'); | 5 #library('parser'); |
| 6 | 6 |
| 7 #import('dart:io'); | 7 #import('dart:io'); |
| 8 | 8 |
| 9 #import('../../../utf/utf.dart'); | 9 #import('../../../utf/utf.dart'); |
| 10 | 10 |
| 11 #import('../elements/elements.dart'); | 11 #import('../elements/elements.dart'); |
| 12 #import('../scanner/scanner_implementation.dart'); | 12 #import('../scanner/scanner_implementation.dart'); |
| 13 #import('../scanner/scannerlib.dart'); | 13 #import('../scanner/scannerlib.dart'); |
| 14 #import('../tree/tree.dart'); | 14 #import('../tree/tree.dart'); |
| 15 #import('../util/characters.dart'); | 15 #import('../util/characters.dart'); |
| 16 #import('../source_file.dart'); | 16 #import('../source_file.dart'); |
| 17 | 17 |
| 18 #source('../diagnostic_listener.dart'); | 18 #source('../diagnostic_listener.dart'); |
| 19 #source('../scanner/byte_array_scanner.dart'); | 19 #source('../scanner/byte_array_scanner.dart'); |
| 20 #source('../scanner/byte_strings.dart'); | 20 #source('../scanner/byte_strings.dart'); |
| 21 | 21 |
| 22 int charCount = 0; | 22 int charCount = 0; |
| 23 Stopwatch stopwatch; | 23 Stopwatch stopwatch; |
| 24 | 24 |
| 25 void main() { toolMain(new Options().arguments); } | 25 void main() { |
| 26 toolMain(new Options().arguments); |
| 27 } |
| 26 | 28 |
| 27 void toolMain(List<String> arguments) { | 29 void toolMain(List<String> arguments) { |
| 28 filesWithCrashes = []; | 30 filesWithCrashes = []; |
| 29 stopwatch = new Stopwatch(); | 31 stopwatch = new Stopwatch(); |
| 30 MyOptions options = new MyOptions(); | 32 MyOptions options = new MyOptions(); |
| 31 | 33 |
| 32 void printStats() { | 34 void printStats() { |
| 33 int kb = (charCount / 1024).round().toInt(); | 35 int kb = (charCount / 1024).round().toInt(); |
| 34 String stats = | 36 String stats = |
| 35 '$classCount classes (${kb}Kb) in ${stopwatch.elapsedInMs()}ms'; | 37 '$classCount classes (${kb}Kb) in ${stopwatch.elapsedInMs()}ms'; |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 set text(String newText) { | 320 set text(String newText) { |
| 319 throw "not supported"; | 321 throw "not supported"; |
| 320 } | 322 } |
| 321 } | 323 } |
| 322 | 324 |
| 323 class Mock { | 325 class Mock { |
| 324 const Mock(); | 326 const Mock(); |
| 325 bool get useColors() => true; | 327 bool get useColors() => true; |
| 326 internalError(message) { throw message.toString(); } | 328 internalError(message) { throw message.toString(); } |
| 327 } | 329 } |
| OLD | NEW |