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 import 'dart:convert'; | 8 import 'dart:convert'; |
9 | 9 |
10 import 'package:package_config/packages.dart'; | 10 import 'package:package_config/packages.dart'; |
11 import 'package:package_config/packages_file.dart' as pkgs; | 11 import 'package:package_config/packages_file.dart' as pkgs; |
12 import 'package:package_config/src/packages_impl.dart' | 12 import 'package:package_config/src/packages_impl.dart' |
13 show MapPackages, NonFilePackagesDirectoryPackages; | 13 show MapPackages, NonFilePackagesDirectoryPackages; |
14 import 'package:package_config/src/util.dart' show checkValidPackageUri; | 14 import 'package:package_config/src/util.dart' show checkValidPackageUri; |
15 | 15 |
16 import '../compiler_new.dart' as api; | 16 import '../compiler_new.dart' as api; |
17 import 'common/tasks.dart' show GenericTask; | 17 import 'common/tasks.dart' show GenericTask; |
18 import 'common.dart'; | 18 import 'common.dart'; |
19 import 'common/backend_api.dart' show | 19 import 'common/backend_api.dart' show Backend; |
20 Backend; | |
21 import 'compiler.dart'; | 20 import 'compiler.dart'; |
22 import 'diagnostics/messages.dart' show Message; | 21 import 'diagnostics/messages.dart' show Message; |
23 import 'elements/elements.dart' as elements; | 22 import 'elements/elements.dart' as elements; |
24 import 'environment.dart'; | 23 import 'environment.dart'; |
25 import 'io/source_file.dart'; | 24 import 'io/source_file.dart'; |
26 import 'options.dart' show CompilerOptions; | 25 import 'options.dart' show CompilerOptions; |
27 import 'platform_configuration.dart' as platform_configuration; | 26 import 'platform_configuration.dart' as platform_configuration; |
28 import 'resolved_uri_translator.dart'; | 27 import 'resolved_uri_translator.dart'; |
29 import 'script.dart'; | 28 import 'script.dart'; |
30 | 29 |
(...skipping 17 matching lines...) Expand all Loading... |
48 Uri get libraryRoot => options.platformConfigUri.resolve("."); | 47 Uri get libraryRoot => options.platformConfigUri.resolve("."); |
49 | 48 |
50 CompilerImpl(this.provider, api.CompilerOutput outputProvider, this.handler, | 49 CompilerImpl(this.provider, api.CompilerOutput outputProvider, this.handler, |
51 CompilerOptions options, | 50 CompilerOptions options, |
52 {MakeBackendFuncion makeBackend, MakeReporterFunction makeReporter}) | 51 {MakeBackendFuncion makeBackend, MakeReporterFunction makeReporter}) |
53 : resolvedUriTranslator = new ForwardingResolvedUriTranslator(), | 52 : resolvedUriTranslator = new ForwardingResolvedUriTranslator(), |
54 super( | 53 super( |
55 options: options, | 54 options: options, |
56 outputProvider: outputProvider, | 55 outputProvider: outputProvider, |
57 environment: new _Environment(options.environment), | 56 environment: new _Environment(options.environment), |
58 makeBackend: makeBackend, makeReporter: makeReporter) { | 57 makeBackend: makeBackend, |
| 58 makeReporter: makeReporter) { |
59 _Environment env = environment; | 59 _Environment env = environment; |
60 env.compiler = this; | 60 env.compiler = this; |
61 tasks.addAll([ | 61 tasks.addAll([ |
62 userHandlerTask = new GenericTask('Diagnostic handler', this), | 62 userHandlerTask = new GenericTask('Diagnostic handler', this), |
63 userProviderTask = new GenericTask('Input provider', this), | 63 userProviderTask = new GenericTask('Input provider', this), |
64 userPackagesDiscoveryTask = new GenericTask('Package discovery', this), | 64 userPackagesDiscoveryTask = new GenericTask('Package discovery', this), |
65 ]); | 65 ]); |
66 } | 66 } |
67 | 67 |
68 void log(message) { | 68 void log(message) { |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 } | 353 } |
354 } | 354 } |
355 | 355 |
356 /// For every 'dart:' library, a corresponding environment variable is set | 356 /// For every 'dart:' library, a corresponding environment variable is set |
357 /// to "true". The environment variable's name is the concatenation of | 357 /// to "true". The environment variable's name is the concatenation of |
358 /// this prefix and the name (without the 'dart:'. | 358 /// this prefix and the name (without the 'dart:'. |
359 /// | 359 /// |
360 /// For example 'dart:html' has the environment variable 'dart.library.html' set | 360 /// For example 'dart:html' has the environment variable 'dart.library.html' set |
361 /// to "true". | 361 /// to "true". |
362 const String _dartLibraryEnvironmentPrefix = 'dart.library.'; | 362 const String _dartLibraryEnvironmentPrefix = 'dart.library.'; |
OLD | NEW |