| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 /// An entrypoint used to run portions of front_end and measure its performance. | 5 /// An entrypoint used to run portions of front_end and measure its performance. |
| 6 library front_end.tool.perf; | 6 library front_end.tool.perf; |
| 7 | 7 |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 import 'dart:io' show exit; | 9 import 'dart:io' show exit; |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 import 'package:analyzer/src/generated/source_io.dart'; | 21 import 'package:analyzer/src/generated/source_io.dart'; |
| 22 import 'package:analyzer/src/summary/format.dart'; | 22 import 'package:analyzer/src/summary/format.dart'; |
| 23 import 'package:analyzer/src/summary/idl.dart'; | 23 import 'package:analyzer/src/summary/idl.dart'; |
| 24 import 'package:analyzer/src/summary/link.dart'; | 24 import 'package:analyzer/src/summary/link.dart'; |
| 25 import 'package:analyzer/src/summary/summarize_ast.dart'; | 25 import 'package:analyzer/src/summary/summarize_ast.dart'; |
| 26 import 'package:front_end/compiler_options.dart'; | 26 import 'package:front_end/compiler_options.dart'; |
| 27 import 'package:front_end/kernel_generator.dart'; | 27 import 'package:front_end/kernel_generator.dart'; |
| 28 import 'package:front_end/src/scanner/reader.dart'; | 28 import 'package:front_end/src/scanner/reader.dart'; |
| 29 import 'package:front_end/src/scanner/scanner.dart'; | 29 import 'package:front_end/src/scanner/scanner.dart'; |
| 30 import 'package:front_end/src/scanner/token.dart'; | 30 import 'package:front_end/src/scanner/token.dart'; |
| 31 import 'package:kernel/kernel.dart'; | 31 import 'package:kernel/kernel.dart' hide Source; |
| 32 import 'package:package_config/discovery.dart'; | 32 import 'package:package_config/discovery.dart'; |
| 33 | 33 |
| 34 main(List<String> args) async { | 34 main(List<String> args) async { |
| 35 // TODO(sigmund): provide sdk folder as well. | 35 // TODO(sigmund): provide sdk folder as well. |
| 36 if (args.length < 2) { | 36 if (args.length < 2) { |
| 37 print('usage: perf.dart <bench-id> <entry.dart>'); | 37 print('usage: perf.dart <bench-id> <entry.dart>'); |
| 38 exit(1); | 38 exit(1); |
| 39 } | 39 } |
| 40 var totalTimer = new Stopwatch()..start(); | 40 var totalTimer = new Stopwatch()..start(); |
| 41 | 41 |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 class _Scanner extends Scanner { | 432 class _Scanner extends Scanner { |
| 433 _Scanner(String contents) : super(new CharSequenceReader(contents)) { | 433 _Scanner(String contents) : super(new CharSequenceReader(contents)) { |
| 434 preserveComments = false; | 434 preserveComments = false; |
| 435 } | 435 } |
| 436 | 436 |
| 437 @override | 437 @override |
| 438 void reportError(errorCode, int offset, List<Object> arguments) { | 438 void reportError(errorCode, int offset, List<Object> arguments) { |
| 439 // ignore errors. | 439 // ignore errors. |
| 440 } | 440 } |
| 441 } | 441 } |
| OLD | NEW |