| 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 leg_apiimpl; | 5 library leg_apiimpl; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 | 9 |
| 10 import '../compiler.dart' as api; | 10 import '../compiler.dart' as api; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 forceIncrementalSupport || | 97 forceIncrementalSupport || |
| 98 hasOption(options, '--incremental-support'), | 98 hasOption(options, '--incremental-support'), |
| 99 suppressWarnings: hasOption(options, '--suppress-warnings'), | 99 suppressWarnings: hasOption(options, '--suppress-warnings'), |
| 100 fatalWarnings: hasOption(options, '--fatal-warnings'), | 100 fatalWarnings: hasOption(options, '--fatal-warnings'), |
| 101 enableExperimentalMirrors: | 101 enableExperimentalMirrors: |
| 102 hasOption(options, '--enable-experimental-mirrors'), | 102 hasOption(options, '--enable-experimental-mirrors'), |
| 103 generateCodeWithCompileTimeErrors: | 103 generateCodeWithCompileTimeErrors: |
| 104 hasOption(options, '--generate-code-with-compile-time-errors'), | 104 hasOption(options, '--generate-code-with-compile-time-errors'), |
| 105 testMode: hasOption(options, '--test-mode'), | 105 testMode: hasOption(options, '--test-mode'), |
| 106 allowNativeExtensions: | 106 allowNativeExtensions: |
| 107 hasOption(options, '--allow-native-extensions'), | 107 hasOption(options, '--allow-native-extensions')) { |
| 108 enableNullAwareOperators: | |
| 109 hasOption(options, '--enable-null-aware-operators')) { | |
| 110 tasks.addAll([ | 108 tasks.addAll([ |
| 111 userHandlerTask = new leg.GenericTask('Diagnostic handler', this), | 109 userHandlerTask = new leg.GenericTask('Diagnostic handler', this), |
| 112 userProviderTask = new leg.GenericTask('Input provider', this), | 110 userProviderTask = new leg.GenericTask('Input provider', this), |
| 113 userPackagesDiscoveryTask = | 111 userPackagesDiscoveryTask = |
| 114 new leg.GenericTask('Package discovery', this), | 112 new leg.GenericTask('Package discovery', this), |
| 115 ]); | 113 ]); |
| 116 if (libraryRoot == null) { | 114 if (libraryRoot == null) { |
| 117 throw new ArgumentError("[libraryRoot] is null."); | 115 throw new ArgumentError("[libraryRoot] is null."); |
| 118 } | 116 } |
| 119 if (!libraryRoot.path.endsWith("/")) { | 117 if (!libraryRoot.path.endsWith("/")) { |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 print('$message: ${tryToString(exception)}'); | 469 print('$message: ${tryToString(exception)}'); |
| 472 print(tryToString(stackTrace)); | 470 print(tryToString(stackTrace)); |
| 473 } | 471 } |
| 474 | 472 |
| 475 fromEnvironment(String name) => environment[name]; | 473 fromEnvironment(String name) => environment[name]; |
| 476 | 474 |
| 477 LibraryInfo lookupLibraryInfo(String libraryName) { | 475 LibraryInfo lookupLibraryInfo(String libraryName) { |
| 478 return library_info.LIBRARIES[libraryName]; | 476 return library_info.LIBRARIES[libraryName]; |
| 479 } | 477 } |
| 480 } | 478 } |
| OLD | NEW |