| OLD | NEW |
| 1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
| 2 | 2 |
| 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 4 // for details. All rights reserved. Use of this source code is governed by a | 4 // for details. All rights reserved. Use of this source code is governed by a |
| 5 // BSD-style license that can be found in the LICENSE file. | 5 // BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 /** The entry point for the analyzer. */ | 7 /** The entry point for the analyzer. */ |
| 8 library analyzer; | 8 library analyzer; |
| 9 | 9 |
| 10 import 'dart:async'; | 10 import 'dart:async'; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 ErrorSeverity result = _runAnalyzer(options); | 32 ErrorSeverity result = _runAnalyzer(options); |
| 33 | 33 |
| 34 if (options.perf) { | 34 if (options.perf) { |
| 35 int totalTime = JavaSystem.currentTimeMillis() - startTime; | 35 int totalTime = JavaSystem.currentTimeMillis() - startTime; |
| 36 print("scan:${PerformanceStatistics.scan.result}"); | 36 print("scan:${PerformanceStatistics.scan.result}"); |
| 37 print("parse:${PerformanceStatistics.parse.result}"); | 37 print("parse:${PerformanceStatistics.parse.result}"); |
| 38 print("resolve:${PerformanceStatistics.resolve.result}"); | 38 print("resolve:${PerformanceStatistics.resolve.result}"); |
| 39 print("errors:${PerformanceStatistics.errors.result}"); | 39 print("errors:${PerformanceStatistics.errors.result}"); |
| 40 print("hints:${PerformanceStatistics.hints.result}"); | 40 print("hints:${PerformanceStatistics.hints.result}"); |
| 41 print("angular:${PerformanceStatistics.angular.result}"); |
| 41 print("instanceof:${instanceOfTimer.elapsedMilliseconds}"); | 42 print("instanceof:${instanceOfTimer.elapsedMilliseconds}"); |
| 42 print("total:$totalTime"); | 43 print("total:$totalTime"); |
| 43 } | 44 } |
| 44 | 45 |
| 45 exit(result.ordinal); | 46 exit(result.ordinal); |
| 46 } | 47 } |
| 47 } | 48 } |
| 48 | 49 |
| 49 ErrorSeverity _runAnalyzer(CommandLineOptions options) { | 50 ErrorSeverity _runAnalyzer(CommandLineOptions options) { |
| 50 if (!options.machineFormat) { | 51 if (!options.machineFormat) { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 stdout.writeln('>>> TEST $resultPassString ${stopwatch.elapsedMillisecon
ds}ms'); | 131 stdout.writeln('>>> TEST $resultPassString ${stopwatch.elapsedMillisecon
ds}ms'); |
| 131 } catch (e, stackTrace) { | 132 } catch (e, stackTrace) { |
| 132 stderr.writeln(e); | 133 stderr.writeln(e); |
| 133 stderr.writeln(stackTrace); | 134 stderr.writeln(stackTrace); |
| 134 stderr.writeln('>>> EOF STDERR'); | 135 stderr.writeln('>>> EOF STDERR'); |
| 135 stdout.writeln('>>> TEST CRASH'); | 136 stdout.writeln('>>> TEST CRASH'); |
| 136 } | 137 } |
| 137 }); | 138 }); |
| 138 } | 139 } |
| 139 } | 140 } |
| OLD | NEW |