| 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 dart2js and measure its performance. | 5 /// An entrypoint used to run portions of dart2js and measure its performance. |
| 6 library compiler.tool.perf; | 6 library compiler.tool.perf; |
| 7 | 7 |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 | 10 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 void exitDirective() { | 202 void exitDirective() { |
| 203 inDirective = false; | 203 inDirective = false; |
| 204 } | 204 } |
| 205 | 205 |
| 206 void beginImport(Token importKeyword) => enterDirective(); | 206 void beginImport(Token importKeyword) => enterDirective(); |
| 207 void beginExport(Token token) => enterDirective(); | 207 void beginExport(Token token) => enterDirective(); |
| 208 void beginPart(Token token) => enterDirective(); | 208 void beginPart(Token token) => enterDirective(); |
| 209 | 209 |
| 210 void beginLiteralString(Token token) { | 210 void beginLiteralString(Token token) { |
| 211 if (inDirective) { | 211 if (inDirective) { |
| 212 var quotedString = token.value; | 212 var quotedString = token.lexeme; |
| 213 targets.add(quotedString.substring(1, quotedString.length - 1)); | 213 targets.add(quotedString.substring(1, quotedString.length - 1)); |
| 214 } | 214 } |
| 215 } | 215 } |
| 216 | 216 |
| 217 void endExport(Token exportKeyword, Token semicolon) => exitDirective(); | 217 void endExport(Token exportKeyword, Token semicolon) => exitDirective(); |
| 218 void endImport(Token importKeyword, Token deferredKeyword, Token asKeyword, | 218 void endImport(Token importKeyword, Token deferredKeyword, Token asKeyword, |
| 219 Token semicolon) => | 219 Token semicolon) => |
| 220 exitDirective(); | 220 exitDirective(); |
| 221 void endPart(Token partKeyword, Token semicolon) => exitDirective(); | 221 void endPart(Token partKeyword, Token semicolon) => exitDirective(); |
| 222 } | 222 } |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 // TODO(sigmund): more diagnostics? | 379 // TODO(sigmund): more diagnostics? |
| 380 print('compilation failed!'); | 380 print('compilation failed!'); |
| 381 exit(1); | 381 exit(1); |
| 382 } | 382 } |
| 383 | 383 |
| 384 closeResolution(); | 384 closeResolution(); |
| 385 var program = (backend as dynamic).kernelTask.program; | 385 var program = (backend as dynamic).kernelTask.program; |
| 386 print('total libraries: ${program.libraries.length}'); | 386 print('total libraries: ${program.libraries.length}'); |
| 387 }); | 387 }); |
| 388 } | 388 } |
| OLD | NEW |