| 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 | 8 |
| 9 import '../compiler.dart' as api; | 9 import '../compiler.dart' as api; |
| 10 import 'dart2jslib.dart' as leg; | 10 import 'dart2jslib.dart' as leg; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 hasIncrementalSupport: | 82 hasIncrementalSupport: |
| 83 forceIncrementalSupport || | 83 forceIncrementalSupport || |
| 84 hasOption(options, '--incremental-support'), | 84 hasOption(options, '--incremental-support'), |
| 85 suppressWarnings: hasOption(options, '--suppress-warnings'), | 85 suppressWarnings: hasOption(options, '--suppress-warnings'), |
| 86 fatalWarnings: hasOption(options, '--fatal-warnings'), | 86 fatalWarnings: hasOption(options, '--fatal-warnings'), |
| 87 enableExperimentalMirrors: | 87 enableExperimentalMirrors: |
| 88 hasOption(options, '--enable-experimental-mirrors'), | 88 hasOption(options, '--enable-experimental-mirrors'), |
| 89 generateCodeWithCompileTimeErrors: | 89 generateCodeWithCompileTimeErrors: |
| 90 hasOption(options, '--generate-code-with-compile-time-errors'), | 90 hasOption(options, '--generate-code-with-compile-time-errors'), |
| 91 allowNativeExtensions: | 91 allowNativeExtensions: |
| 92 hasOption(options, '--allow-native-extensions')) { | 92 hasOption(options, '--allow-native-extensions'), |
| 93 enableNullAwareOperators: |
| 94 hasOption(options, '--enable-null-aware-operators')) { |
| 93 tasks.addAll([ | 95 tasks.addAll([ |
| 94 userHandlerTask = new leg.GenericTask('Diagnostic handler', this), | 96 userHandlerTask = new leg.GenericTask('Diagnostic handler', this), |
| 95 userProviderTask = new leg.GenericTask('Input provider', this), | 97 userProviderTask = new leg.GenericTask('Input provider', this), |
| 96 ]); | 98 ]); |
| 97 if (libraryRoot == null) { | 99 if (libraryRoot == null) { |
| 98 throw new ArgumentError("[libraryRoot] is null."); | 100 throw new ArgumentError("[libraryRoot] is null."); |
| 99 } | 101 } |
| 100 if (!libraryRoot.path.endsWith("/")) { | 102 if (!libraryRoot.path.endsWith("/")) { |
| 101 throw new ArgumentError("[libraryRoot] must end with a /."); | 103 throw new ArgumentError("[libraryRoot] must end with a /."); |
| 102 } | 104 } |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 print('$message: ${tryToString(exception)}'); | 404 print('$message: ${tryToString(exception)}'); |
| 403 print(tryToString(stackTrace)); | 405 print(tryToString(stackTrace)); |
| 404 } | 406 } |
| 405 | 407 |
| 406 fromEnvironment(String name) => environment[name]; | 408 fromEnvironment(String name) => environment[name]; |
| 407 | 409 |
| 408 LibraryInfo lookupLibraryInfo(String libraryName) { | 410 LibraryInfo lookupLibraryInfo(String libraryName) { |
| 409 return library_info.LIBRARIES[libraryName]; | 411 return library_info.LIBRARIES[libraryName]; |
| 410 } | 412 } |
| 411 } | 413 } |
| OLD | NEW |