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 | 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 13 matching lines...) Expand all Loading... |
24 | 24 |
25 Compiler(this.provider, this.handler, this.libraryRoot, this.packageRoot, | 25 Compiler(this.provider, this.handler, this.libraryRoot, this.packageRoot, |
26 List<String> options) | 26 List<String> options) |
27 : this.options = options, | 27 : this.options = options, |
28 super( | 28 super( |
29 tracer: new ssa.HTracer(), | 29 tracer: new ssa.HTracer(), |
30 enableTypeAssertions: hasOption(options, '--enable-checked-mode'), | 30 enableTypeAssertions: hasOption(options, '--enable-checked-mode'), |
31 enableUserAssertions: hasOption(options, '--enable-checked-mode'), | 31 enableUserAssertions: hasOption(options, '--enable-checked-mode'), |
32 enableMinification: hasOption(options, '--minify'), | 32 enableMinification: hasOption(options, '--minify'), |
33 enableNativeLiveTypeAnalysis: | 33 enableNativeLiveTypeAnalysis: |
34 hasOption(options, '--enable-native-live-type-analysis'), | 34 hasOption(options, '--disable-native-live-type-analysis') |
| 35 ? false |
| 36 : hasOption(options, '--enable-native-live-type-analysis'), |
35 emitJavaScript: !hasOption(options, '--output-type=dart'), | 37 emitJavaScript: !hasOption(options, '--output-type=dart'), |
36 disallowUnsafeEval: hasOption(options, '--disallow-unsafe-eval'), | 38 disallowUnsafeEval: hasOption(options, '--disallow-unsafe-eval'), |
37 analyzeAll: hasOption(options, '--analyze-all'), | 39 analyzeAll: hasOption(options, '--analyze-all'), |
38 rejectDeprecatedFeatures: | 40 rejectDeprecatedFeatures: |
39 hasOption(options, '--reject-deprecated-language-features'), | 41 hasOption(options, '--reject-deprecated-language-features'), |
40 checkDeprecationInSdk: | 42 checkDeprecationInSdk: |
41 hasOption(options, | 43 hasOption(options, |
42 '--report-sdk-use-of-deprecated-language-features'), | 44 '--report-sdk-use-of-deprecated-language-features'), |
43 strips: getStrips(options), | 45 strips: getStrips(options), |
44 enableConcreteTypeInference: | 46 enableConcreteTypeInference: |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 handler(translateUri(span.uri, null), span.begin, span.end, | 178 handler(translateUri(span.uri, null), span.begin, span.end, |
177 message, kind); | 179 message, kind); |
178 } | 180 } |
179 } | 181 } |
180 | 182 |
181 bool get isMockCompilation { | 183 bool get isMockCompilation { |
182 return mockableLibraryUsed | 184 return mockableLibraryUsed |
183 && (options.indexOf('--allow-mock-compilation') != -1); | 185 && (options.indexOf('--allow-mock-compilation') != -1); |
184 } | 186 } |
185 } | 187 } |
OLD | NEW |