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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 buildId: extractStringOption( | 71 buildId: extractStringOption( |
72 options, '--build-id=', | 72 options, '--build-id=', |
73 "build number could not be determined"), | 73 "build number could not be determined"), |
74 showPackageWarnings: | 74 showPackageWarnings: |
75 hasOption(options, '--show-package-warnings'), | 75 hasOption(options, '--show-package-warnings'), |
76 useContentSecurityPolicy: hasOption(options, '--csp'), | 76 useContentSecurityPolicy: hasOption(options, '--csp'), |
77 hasIncrementalSupport: | 77 hasIncrementalSupport: |
78 forceIncrementalSupport || | 78 forceIncrementalSupport || |
79 hasOption(options, '--incremental-support'), | 79 hasOption(options, '--incremental-support'), |
80 suppressWarnings: hasOption(options, '--suppress-warnings'), | 80 suppressWarnings: hasOption(options, '--suppress-warnings'), |
81 enableAsyncAwait: hasOption(options, '--enable-async')) { | 81 enableAsyncAwait: hasOption(options, '--enable-async'), |
| 82 enableEnums: hasOption(options, '--enable-enum')) { |
82 tasks.addAll([ | 83 tasks.addAll([ |
83 userHandlerTask = new leg.GenericTask('Diagnostic handler', this), | 84 userHandlerTask = new leg.GenericTask('Diagnostic handler', this), |
84 userProviderTask = new leg.GenericTask('Input provider', this), | 85 userProviderTask = new leg.GenericTask('Input provider', this), |
85 ]); | 86 ]); |
86 if (!libraryRoot.path.endsWith("/")) { | 87 if (!libraryRoot.path.endsWith("/")) { |
87 throw new ArgumentError("libraryRoot must end with a /"); | 88 throw new ArgumentError("libraryRoot must end with a /"); |
88 } | 89 } |
89 if (packageRoot != null && !packageRoot.path.endsWith("/")) { | 90 if (packageRoot != null && !packageRoot.path.endsWith("/")) { |
90 throw new ArgumentError("packageRoot must end with a /"); | 91 throw new ArgumentError("packageRoot must end with a /"); |
91 } | 92 } |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 } | 355 } |
355 | 356 |
356 void diagnoseCrashInUserCode(String message, exception, stackTrace) { | 357 void diagnoseCrashInUserCode(String message, exception, stackTrace) { |
357 hasCrashed = true; | 358 hasCrashed = true; |
358 print('$message: ${tryToString(exception)}'); | 359 print('$message: ${tryToString(exception)}'); |
359 print(tryToString(stackTrace)); | 360 print(tryToString(stackTrace)); |
360 } | 361 } |
361 | 362 |
362 fromEnvironment(String name) => environment[name]; | 363 fromEnvironment(String name) => environment[name]; |
363 } | 364 } |
OLD | NEW |