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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 hasOption(options, '--show-package-warnings'), | 79 hasOption(options, '--show-package-warnings'), |
80 useContentSecurityPolicy: hasOption(options, '--csp'), | 80 useContentSecurityPolicy: hasOption(options, '--csp'), |
81 hasIncrementalSupport: | 81 hasIncrementalSupport: |
82 forceIncrementalSupport || | 82 forceIncrementalSupport || |
83 hasOption(options, '--incremental-support'), | 83 hasOption(options, '--incremental-support'), |
84 suppressWarnings: hasOption(options, '--suppress-warnings'), | 84 suppressWarnings: hasOption(options, '--suppress-warnings'), |
85 enableExperimentalMirrors: | 85 enableExperimentalMirrors: |
86 hasOption(options, '--enable-experimental-mirrors'), | 86 hasOption(options, '--enable-experimental-mirrors'), |
87 enableAsyncAwait: hasOption(options, '--enable-async'), | 87 enableAsyncAwait: hasOption(options, '--enable-async'), |
88 enableEnums: hasOption(options, '--enable-enum'), | 88 enableEnums: hasOption(options, '--enable-enum'), |
| 89 generateCodeWithCompileTimeErrors: |
| 90 hasOption(options, '--generate-code-with-compile-time-errors'), |
89 allowNativeExtensions: | 91 allowNativeExtensions: |
90 hasOption(options, '--allow-native-extensions')) { | 92 hasOption(options, '--allow-native-extensions')) { |
91 tasks.addAll([ | 93 tasks.addAll([ |
92 userHandlerTask = new leg.GenericTask('Diagnostic handler', this), | 94 userHandlerTask = new leg.GenericTask('Diagnostic handler', this), |
93 userProviderTask = new leg.GenericTask('Input provider', this), | 95 userProviderTask = new leg.GenericTask('Input provider', this), |
94 ]); | 96 ]); |
95 if (libraryRoot == null) { | 97 if (libraryRoot == null) { |
96 throw new ArgumentError("[libraryRoot] is null."); | 98 throw new ArgumentError("[libraryRoot] is null."); |
97 } | 99 } |
98 if (!libraryRoot.path.endsWith("/")) { | 100 if (!libraryRoot.path.endsWith("/")) { |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 print('$message: ${tryToString(exception)}'); | 406 print('$message: ${tryToString(exception)}'); |
405 print(tryToString(stackTrace)); | 407 print(tryToString(stackTrace)); |
406 } | 408 } |
407 | 409 |
408 fromEnvironment(String name) => environment[name]; | 410 fromEnvironment(String name) => environment[name]; |
409 | 411 |
410 LibraryInfo lookupLibraryInfo(String libraryName) { | 412 LibraryInfo lookupLibraryInfo(String libraryName) { |
411 return library_info.LIBRARIES[libraryName]; | 413 return library_info.LIBRARIES[libraryName]; |
412 } | 414 } |
413 } | 415 } |
OLD | NEW |