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