| 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:uri'; | 7 import 'dart:uri'; |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 | 9 |
| 10 import '../compiler.dart' as api; | 10 import '../compiler.dart' as api; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 this.packageRoot, | 31 this.packageRoot, |
| 32 List<String> options) | 32 List<String> options) |
| 33 : this.options = options, | 33 : this.options = options, |
| 34 this.allowedLibraryCategories = getAllowedLibraryCategories(options), | 34 this.allowedLibraryCategories = getAllowedLibraryCategories(options), |
| 35 super( | 35 super( |
| 36 tracer: new ssa.HTracer( | 36 tracer: new ssa.HTracer( |
| 37 ssa.GENERATE_SSA_TRACE ? outputProvider('dart', 'cfg') : null), | 37 ssa.GENERATE_SSA_TRACE ? outputProvider('dart', 'cfg') : null), |
| 38 outputProvider: outputProvider, | 38 outputProvider: outputProvider, |
| 39 enableTypeAssertions: hasOption(options, '--enable-checked-mode'), | 39 enableTypeAssertions: hasOption(options, '--enable-checked-mode'), |
| 40 enableUserAssertions: hasOption(options, '--enable-checked-mode'), | 40 enableUserAssertions: hasOption(options, '--enable-checked-mode'), |
| 41 trustTypeAnnotations: |
| 42 hasOption(options, '--trust-type-annotations'), |
| 41 enableMinification: hasOption(options, '--minify'), | 43 enableMinification: hasOption(options, '--minify'), |
| 42 enableNativeLiveTypeAnalysis: | 44 enableNativeLiveTypeAnalysis: |
| 43 !hasOption(options, '--disable-native-live-type-analysis'), | 45 !hasOption(options, '--disable-native-live-type-analysis'), |
| 44 emitJavaScript: !hasOption(options, '--output-type=dart'), | 46 emitJavaScript: !hasOption(options, '--output-type=dart'), |
| 45 disallowUnsafeEval: hasOption(options, '--disallow-unsafe-eval'), | 47 disallowUnsafeEval: hasOption(options, '--disallow-unsafe-eval'), |
| 46 analyzeAll: hasOption(options, '--analyze-all'), | 48 analyzeAll: hasOption(options, '--analyze-all'), |
| 47 analyzeOnly: hasOption(options, '--analyze-only'), | 49 analyzeOnly: hasOption(options, '--analyze-only'), |
| 48 analyzeSignaturesOnly: | 50 analyzeSignaturesOnly: |
| 49 hasOption(options, '--analyze-signatures-only'), | 51 hasOption(options, '--analyze-signatures-only'), |
| 50 rejectDeprecatedFeatures: | 52 rejectDeprecatedFeatures: |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 handler(translateUri(span.uri, null), span.begin, span.end, | 282 handler(translateUri(span.uri, null), span.begin, span.end, |
| 281 message, kind); | 283 message, kind); |
| 282 } | 284 } |
| 283 } | 285 } |
| 284 | 286 |
| 285 bool get isMockCompilation { | 287 bool get isMockCompilation { |
| 286 return mockableLibraryUsed | 288 return mockableLibraryUsed |
| 287 && (options.indexOf('--allow-mock-compilation') != -1); | 289 && (options.indexOf('--allow-mock-compilation') != -1); |
| 288 } | 290 } |
| 289 } | 291 } |
| OLD | NEW |