| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 hasOption(options, '--analyze-signatures-only'), | 51 hasOption(options, '--analyze-signatures-only'), |
| 52 strips: extractCsvOption(options, '--force-strip='), | 52 strips: extractCsvOption(options, '--force-strip='), |
| 53 enableConcreteTypeInference: | 53 enableConcreteTypeInference: |
| 54 hasOption(options, '--enable-concrete-type-inference'), | 54 hasOption(options, '--enable-concrete-type-inference'), |
| 55 disableTypeInferenceFlag: | 55 disableTypeInferenceFlag: |
| 56 hasOption(options, '--disable-type-inference'), | 56 hasOption(options, '--disable-type-inference'), |
| 57 preserveComments: hasOption(options, '--preserve-comments'), | 57 preserveComments: hasOption(options, '--preserve-comments'), |
| 58 verbose: hasOption(options, '--verbose'), | 58 verbose: hasOption(options, '--verbose'), |
| 59 sourceMapUri: extractSourceMapUri(options), | 59 sourceMapUri: extractSourceMapUri(options), |
| 60 terseDiagnostics: hasOption(options, '--terse'), | 60 terseDiagnostics: hasOption(options, '--terse'), |
| 61 dumpInfo: hasOption(options, '--dump-info'), |
| 61 buildId: extractStringOption( | 62 buildId: extractStringOption( |
| 62 options, '--build-id=', | 63 options, '--build-id=', |
| 63 "build number could not be determined")) { | 64 "build number could not be determined")) { |
| 64 if (!libraryRoot.path.endsWith("/")) { | 65 if (!libraryRoot.path.endsWith("/")) { |
| 65 throw new ArgumentError("libraryRoot must end with a /"); | 66 throw new ArgumentError("libraryRoot must end with a /"); |
| 66 } | 67 } |
| 67 if (packageRoot != null && !packageRoot.path.endsWith("/")) { | 68 if (packageRoot != null && !packageRoot.path.endsWith("/")) { |
| 68 throw new ArgumentError("packageRoot must end with a /"); | 69 throw new ArgumentError("packageRoot must end with a /"); |
| 69 } | 70 } |
| 70 } | 71 } |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 } | 326 } |
| 326 | 327 |
| 327 void diagnoseCrashInUserCode(String message, exception, stackTrace) { | 328 void diagnoseCrashInUserCode(String message, exception, stackTrace) { |
| 328 hasCrashed = true; | 329 hasCrashed = true; |
| 329 print('$message: ${tryToString(exception)}'); | 330 print('$message: ${tryToString(exception)}'); |
| 330 print(tryToString(stackTrace)); | 331 print(tryToString(stackTrace)); |
| 331 } | 332 } |
| 332 | 333 |
| 333 fromEnvironment(String name) => environment[name]; | 334 fromEnvironment(String name) => environment[name]; |
| 334 } | 335 } |
| OLD | NEW |