| 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 27 matching lines...) Expand all Loading... |
| 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 enableMinification: hasOption(options, '--minify'), | 47 enableMinification: hasOption(options, '--minify'), |
| 48 preserveUris: hasOption(options, '--preserve-uris'), | |
| 49 enableNativeLiveTypeAnalysis: | 48 enableNativeLiveTypeAnalysis: |
| 50 !hasOption(options, '--disable-native-live-type-analysis'), | 49 !hasOption(options, '--disable-native-live-type-analysis'), |
| 51 emitJavaScript: !(hasOption(options, '--output-type=dart') || | 50 emitJavaScript: !(hasOption(options, '--output-type=dart') || |
| 52 hasOption(options, '--output-type=dart-multi')), | 51 hasOption(options, '--output-type=dart-multi')), |
| 53 dart2dartMultiFile: hasOption(options, '--output-type=dart-multi'), | 52 dart2dartMultiFile: hasOption(options, '--output-type=dart-multi'), |
| 54 generateSourceMap: !hasOption(options, '--no-source-maps'), | 53 generateSourceMap: !hasOption(options, '--no-source-maps'), |
| 55 analyzeAllFlag: hasOption(options, '--analyze-all'), | 54 analyzeAllFlag: hasOption(options, '--analyze-all'), |
| 56 analyzeOnly: hasOption(options, '--analyze-only'), | 55 analyzeOnly: hasOption(options, '--analyze-only'), |
| 57 analyzeMain: hasOption(options, '--analyze-main'), | 56 analyzeMain: hasOption(options, '--analyze-main'), |
| 58 analyzeSignaturesOnly: | 57 analyzeSignaturesOnly: |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 } | 348 } |
| 350 | 349 |
| 351 void diagnoseCrashInUserCode(String message, exception, stackTrace) { | 350 void diagnoseCrashInUserCode(String message, exception, stackTrace) { |
| 352 hasCrashed = true; | 351 hasCrashed = true; |
| 353 print('$message: ${tryToString(exception)}'); | 352 print('$message: ${tryToString(exception)}'); |
| 354 print(tryToString(stackTrace)); | 353 print(tryToString(stackTrace)); |
| 355 } | 354 } |
| 356 | 355 |
| 357 fromEnvironment(String name) => environment[name]; | 356 fromEnvironment(String name) => environment[name]; |
| 358 } | 357 } |
| OLD | NEW |