| 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 26 matching lines...) Expand all Loading... |
| 37 outputProvider: outputProvider, | 37 outputProvider: outputProvider, |
| 38 enableTypeAssertions: hasOption(options, '--enable-checked-mode'), | 38 enableTypeAssertions: hasOption(options, '--enable-checked-mode'), |
| 39 enableUserAssertions: hasOption(options, '--enable-checked-mode'), | 39 enableUserAssertions: hasOption(options, '--enable-checked-mode'), |
| 40 trustTypeAnnotations: | 40 trustTypeAnnotations: |
| 41 hasOption(options, '--trust-type-annotations'), | 41 hasOption(options, '--trust-type-annotations'), |
| 42 enableMinification: hasOption(options, '--minify'), | 42 enableMinification: hasOption(options, '--minify'), |
| 43 enableNativeLiveTypeAnalysis: | 43 enableNativeLiveTypeAnalysis: |
| 44 !hasOption(options, '--disable-native-live-type-analysis'), | 44 !hasOption(options, '--disable-native-live-type-analysis'), |
| 45 emitJavaScript: !hasOption(options, '--output-type=dart'), | 45 emitJavaScript: !hasOption(options, '--output-type=dart'), |
| 46 disallowUnsafeEval: hasOption(options, '--disallow-unsafe-eval'), | 46 disallowUnsafeEval: hasOption(options, '--disallow-unsafe-eval'), |
| 47 analyzeAll: hasOption(options, '--analyze-all'), | 47 analyzeAllFlag: hasOption(options, '--analyze-all'), |
| 48 analyzeOnly: hasOption(options, '--analyze-only'), | 48 analyzeOnly: hasOption(options, '--analyze-only'), |
| 49 analyzeSignaturesOnly: | 49 analyzeSignaturesOnly: |
| 50 hasOption(options, '--analyze-signatures-only'), | 50 hasOption(options, '--analyze-signatures-only'), |
| 51 rejectDeprecatedFeatures: | 51 rejectDeprecatedFeatures: |
| 52 hasOption(options, '--reject-deprecated-language-features'), | 52 hasOption(options, '--reject-deprecated-language-features'), |
| 53 checkDeprecationInSdk: | 53 checkDeprecationInSdk: |
| 54 hasOption(options, | 54 hasOption(options, |
| 55 '--report-sdk-use-of-deprecated-language-features'), | 55 '--report-sdk-use-of-deprecated-language-features'), |
| 56 strips: extractCsvOption(options, '--force-strip='), | 56 strips: extractCsvOption(options, '--force-strip='), |
| 57 enableConcreteTypeInference: | 57 enableConcreteTypeInference: |
| 58 hasOption(options, '--enable-concrete-type-inference'), | 58 hasOption(options, '--enable-concrete-type-inference'), |
| 59 disableTypeInference: | 59 disableTypeInferenceFlag: |
| 60 hasOption(options, '--disable-type-inference'), | 60 hasOption(options, '--disable-type-inference'), |
| 61 preserveComments: hasOption(options, '--preserve-comments'), | 61 preserveComments: hasOption(options, '--preserve-comments'), |
| 62 verbose: hasOption(options, '--verbose'), | 62 verbose: hasOption(options, '--verbose'), |
| 63 sourceMapUri: extractSourceMapUri(options), | 63 sourceMapUri: extractSourceMapUri(options), |
| 64 globalJsName: extractStringOption( | 64 globalJsName: extractStringOption( |
| 65 options, '--global-js-name=', r'$'), | 65 options, '--global-js-name=', r'$'), |
| 66 buildId: extractStringOption( | 66 buildId: extractStringOption( |
| 67 options, '--build-id=', | 67 options, '--build-id=', |
| 68 "build number could not be determined")) { | 68 "build number could not be determined")) { |
| 69 if (!libraryRoot.path.endsWith("/")) { | 69 if (!libraryRoot.path.endsWith("/")) { |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 handler(translateUri(span.uri, null), span.begin, span.end, | 285 handler(translateUri(span.uri, null), span.begin, span.end, |
| 286 message, kind); | 286 message, kind); |
| 287 } | 287 } |
| 288 } | 288 } |
| 289 | 289 |
| 290 bool get isMockCompilation { | 290 bool get isMockCompilation { |
| 291 return mockableLibraryUsed | 291 return mockableLibraryUsed |
| 292 && (options.indexOf('--allow-mock-compilation') != -1); | 292 && (options.indexOf('--allow-mock-compilation') != -1); |
| 293 } | 293 } |
| 294 } | 294 } |
| OLD | NEW |