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 dart2js.compiler_base; | 5 library dart2js.compiler_base; |
6 | 6 |
7 import 'dart:async' show | 7 import 'dart:async' show |
8 EventSink, | 8 EventSink, |
9 Future; | 9 Future; |
10 | 10 |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 /// | 676 /// |
677 /// [loadedLibraries] contains the newly loaded libraries. | 677 /// [loadedLibraries] contains the newly loaded libraries. |
678 /// | 678 /// |
679 /// The method returns a [Future] allowing for the loading of additional | 679 /// The method returns a [Future] allowing for the loading of additional |
680 /// libraries. | 680 /// libraries. |
681 Future onLibrariesLoaded(LoadedLibraries loadedLibraries) { | 681 Future onLibrariesLoaded(LoadedLibraries loadedLibraries) { |
682 return new Future.sync(() { | 682 return new Future.sync(() { |
683 for (Uri uri in disallowedLibraryUris) { | 683 for (Uri uri in disallowedLibraryUris) { |
684 if (loadedLibraries.containsLibrary(uri)) { | 684 if (loadedLibraries.containsLibrary(uri)) { |
685 Set<String> importChains = | 685 Set<String> importChains = |
686 computeImportChainsFor(loadedLibraries, Uri.parse('dart:io')); | 686 computeImportChainsFor(loadedLibraries, uri); |
687 reporter.reportInfo(NO_LOCATION_SPANNABLE, | 687 reporter.reportInfo(NO_LOCATION_SPANNABLE, |
688 MessageKind.DISALLOWED_LIBRARY_IMPORT, | 688 MessageKind.DISALLOWED_LIBRARY_IMPORT, |
689 {'uri': uri, | 689 {'uri': uri, |
690 'importChain': importChains.join( | 690 'importChain': importChains.join( |
691 MessageTemplate.DISALLOWED_LIBRARY_IMPORT_PADDING)}); | 691 MessageTemplate.DISALLOWED_LIBRARY_IMPORT_PADDING)}); |
692 } | 692 } |
693 } | 693 } |
694 | 694 |
695 if (!loadedLibraries.containsLibrary(Uris.dart_core)) { | 695 if (!loadedLibraries.containsLibrary(Uris.dart_core)) { |
696 return null; | 696 return null; |
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2045 if (_otherDependencies == null) { | 2045 if (_otherDependencies == null) { |
2046 _otherDependencies = new Setlet<Element>(); | 2046 _otherDependencies = new Setlet<Element>(); |
2047 } | 2047 } |
2048 _otherDependencies.add(element.implementation); | 2048 _otherDependencies.add(element.implementation); |
2049 } | 2049 } |
2050 | 2050 |
2051 Iterable<Element> get otherDependencies { | 2051 Iterable<Element> get otherDependencies { |
2052 return _otherDependencies != null ? _otherDependencies : const <Element>[]; | 2052 return _otherDependencies != null ? _otherDependencies : const <Element>[]; |
2053 } | 2053 } |
2054 } | 2054 } |
OLD | NEW |