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 List<String> options, | 37 List<String> options, |
38 this.environment) | 38 this.environment) |
39 : this.options = options, | 39 : this.options = options, |
40 this.allowedLibraryCategories = getAllowedLibraryCategories(options), | 40 this.allowedLibraryCategories = getAllowedLibraryCategories(options), |
41 super( | 41 super( |
42 outputProvider: outputProvider, | 42 outputProvider: outputProvider, |
43 enableTypeAssertions: hasOption(options, '--enable-checked-mode'), | 43 enableTypeAssertions: hasOption(options, '--enable-checked-mode'), |
44 enableUserAssertions: hasOption(options, '--enable-checked-mode'), | 44 enableUserAssertions: hasOption(options, '--enable-checked-mode'), |
45 trustTypeAnnotations: | 45 trustTypeAnnotations: |
46 hasOption(options, '--trust-type-annotations'), | 46 hasOption(options, '--trust-type-annotations'), |
| 47 trustPrimitives: |
| 48 hasOption(options, '--trust-primitives'), |
47 enableMinification: hasOption(options, '--minify'), | 49 enableMinification: hasOption(options, '--minify'), |
48 preserveUris: hasOption(options, '--preserve-uris'), | 50 preserveUris: hasOption(options, '--preserve-uris'), |
49 enableNativeLiveTypeAnalysis: | 51 enableNativeLiveTypeAnalysis: |
50 !hasOption(options, '--disable-native-live-type-analysis'), | 52 !hasOption(options, '--disable-native-live-type-analysis'), |
51 emitJavaScript: !(hasOption(options, '--output-type=dart') || | 53 emitJavaScript: !(hasOption(options, '--output-type=dart') || |
52 hasOption(options, '--output-type=dart-multi')), | 54 hasOption(options, '--output-type=dart-multi')), |
53 dart2dartMultiFile: hasOption(options, '--output-type=dart-multi'), | 55 dart2dartMultiFile: hasOption(options, '--output-type=dart-multi'), |
54 generateSourceMap: !hasOption(options, '--no-source-maps'), | 56 generateSourceMap: !hasOption(options, '--no-source-maps'), |
55 analyzeAllFlag: hasOption(options, '--analyze-all'), | 57 analyzeAllFlag: hasOption(options, '--analyze-all'), |
56 analyzeOnly: hasOption(options, '--analyze-only'), | 58 analyzeOnly: hasOption(options, '--analyze-only'), |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 } | 356 } |
355 | 357 |
356 void diagnoseCrashInUserCode(String message, exception, stackTrace) { | 358 void diagnoseCrashInUserCode(String message, exception, stackTrace) { |
357 hasCrashed = true; | 359 hasCrashed = true; |
358 print('$message: ${tryToString(exception)}'); | 360 print('$message: ${tryToString(exception)}'); |
359 print(tryToString(stackTrace)); | 361 print(tryToString(stackTrace)); |
360 } | 362 } |
361 | 363 |
362 fromEnvironment(String name) => environment[name]; | 364 fromEnvironment(String name) => environment[name]; |
363 } | 365 } |
OLD | NEW |