| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 /// Command line tool to run the checker on a Dart program. | 5 /// Command line tool to run the checker on a Dart program. |
| 6 library dev_compiler.src.compiler; | 6 library dev_compiler.src.compiler; |
| 7 | 7 |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 import 'dart:collection'; | 9 import 'dart:collection'; |
| 10 import 'dart:convert' show JSON; | 10 import 'dart:convert' show JSON; |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 loaded.remove(uri); | 348 loaded.remove(uri); |
| 349 loaded.add(uri); | 349 loaded.add(uri); |
| 350 } | 350 } |
| 351 } | 351 } |
| 352 | 352 |
| 353 abstract class AbstractCompiler { | 353 abstract class AbstractCompiler { |
| 354 final CompilerOptions options; | 354 final CompilerOptions options; |
| 355 final AnalysisContext context; | 355 final AnalysisContext context; |
| 356 final AnalysisErrorListener reporter; | 356 final AnalysisErrorListener reporter; |
| 357 | 357 |
| 358 AbstractCompiler(this.context, this.options, [this.reporter]); | 358 AbstractCompiler(this.context, this.options, [AnalysisErrorListener listener]) |
| 359 : reporter = listener ?? AnalysisErrorListener.NULL_LISTENER; |
| 359 | 360 |
| 360 String get outputDir => options.codegenOptions.outputDir; | 361 String get outputDir => options.codegenOptions.outputDir; |
| 361 | 362 |
| 362 Uri stringToUri(String uriString) { | 363 Uri stringToUri(String uriString) { |
| 363 var uri = uriString.startsWith('dart:') || uriString.startsWith('package:') | 364 var uri = uriString.startsWith('dart:') || uriString.startsWith('package:') |
| 364 ? Uri.parse(uriString) | 365 ? Uri.parse(uriString) |
| 365 : new Uri.file(path.absolute(uriString)); | 366 : new Uri.file(path.absolute(uriString)); |
| 366 return uri; | 367 return uri; |
| 367 } | 368 } |
| 368 | 369 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 '_rtti.js', | 523 '_rtti.js', |
| 523 '_classes.js', | 524 '_classes.js', |
| 524 '_operations.js', | 525 '_operations.js', |
| 525 'dart_runtime.js', | 526 'dart_runtime.js', |
| 526 ]; | 527 ]; |
| 527 files.addAll(corelibOrder.map((l) => l.replaceAll('.', '/') + '.js')); | 528 files.addAll(corelibOrder.map((l) => l.replaceAll('.', '/') + '.js')); |
| 528 return files; | 529 return files; |
| 529 }(); | 530 }(); |
| 530 | 531 |
| 531 final _log = new Logger('dev_compiler.src.compiler'); | 532 final _log = new Logger('dev_compiler.src.compiler'); |
| OLD | NEW |