| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 terseDiagnostics: hasOption(options, '--terse'), | 61 terseDiagnostics: hasOption(options, '--terse'), |
| 62 disableDeferredLoading: | 62 disableDeferredLoading: |
| 63 hasOption(options, '--disable-deferred-loading'), | 63 hasOption(options, '--disable-deferred-loading'), |
| 64 dumpInfo: hasOption(options, '--dump-info'), | 64 dumpInfo: hasOption(options, '--dump-info'), |
| 65 buildId: extractStringOption( | 65 buildId: extractStringOption( |
| 66 options, '--build-id=', | 66 options, '--build-id=', |
| 67 "build number could not be determined"), | 67 "build number could not be determined"), |
| 68 showPackageWarnings: | 68 showPackageWarnings: |
| 69 hasOption(options, '--show-package-warnings'), | 69 hasOption(options, '--show-package-warnings'), |
| 70 useContentSecurityPolicy: hasOption(options, '--csp'), | 70 useContentSecurityPolicy: hasOption(options, '--csp'), |
| 71 hasIncrementalSupport: hasOption(options, '--incremental-support'), |
| 71 suppressWarnings: hasOption(options, '--suppress-warnings')) { | 72 suppressWarnings: hasOption(options, '--suppress-warnings')) { |
| 72 if (!libraryRoot.path.endsWith("/")) { | 73 if (!libraryRoot.path.endsWith("/")) { |
| 73 throw new ArgumentError("libraryRoot must end with a /"); | 74 throw new ArgumentError("libraryRoot must end with a /"); |
| 74 } | 75 } |
| 75 if (packageRoot != null && !packageRoot.path.endsWith("/")) { | 76 if (packageRoot != null && !packageRoot.path.endsWith("/")) { |
| 76 throw new ArgumentError("packageRoot must end with a /"); | 77 throw new ArgumentError("packageRoot must end with a /"); |
| 77 } | 78 } |
| 78 } | 79 } |
| 79 | 80 |
| 80 static String extractStringOption(List<String> options, | 81 static String extractStringOption(List<String> options, |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 } | 332 } |
| 332 | 333 |
| 333 void diagnoseCrashInUserCode(String message, exception, stackTrace) { | 334 void diagnoseCrashInUserCode(String message, exception, stackTrace) { |
| 334 hasCrashed = true; | 335 hasCrashed = true; |
| 335 print('$message: ${tryToString(exception)}'); | 336 print('$message: ${tryToString(exception)}'); |
| 336 print(tryToString(stackTrace)); | 337 print(tryToString(stackTrace)); |
| 337 } | 338 } |
| 338 | 339 |
| 339 fromEnvironment(String name) => environment[name]; | 340 fromEnvironment(String name) => environment[name]; |
| 340 } | 341 } |
| OLD | NEW |