Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: pkg/compiler/lib/src/deferred_load.dart

Issue 2696483005: Move global dependencies to BackendUsage (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 deferred_load; 5 library deferred_load;
6 6
7 import 'common/tasks.dart' show CompilerTask; 7 import 'common/tasks.dart' show CompilerTask;
8 import 'common.dart'; 8 import 'common.dart';
9 import 'compiler.dart' show Compiler; 9 import 'compiler.dart' show Compiler;
10 import 'constants/expressions.dart' show ConstantExpression; 10 import 'constants/expressions.dart' show ConstantExpression;
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 () => measure(() { 673 () => measure(() {
674 // Starting from main, traverse the program and find all 674 // Starting from main, traverse the program and find all
675 // dependencies. 675 // dependencies.
676 _mapDependencies( 676 _mapDependencies(
677 element: compiler.mainFunction, import: _fakeMainImport); 677 element: compiler.mainFunction, import: _fakeMainImport);
678 678
679 // Also add "global" dependencies to the main OutputUnit. These 679 // Also add "global" dependencies to the main OutputUnit. These
680 // are things that the backend needs but cannot associate with a 680 // are things that the backend needs but cannot associate with a
681 // particular element, for example, startRootIsolate. This set 681 // particular element, for example, startRootIsolate. This set
682 // also contains elements for which we lack precise information. 682 // also contains elements for which we lack precise information.
683 for (Element element 683 for (Element element in backend.backendUsage.globalDependencies) {
684 in compiler.globalDependencies.otherDependencies) {
685 _mapDependencies(element: element, import: _fakeMainImport); 684 _mapDependencies(element: element, import: _fakeMainImport);
686 } 685 }
687 686
688 // Now check to see if we have to add more elements due to 687 // Now check to see if we have to add more elements due to
689 // mirrors. 688 // mirrors.
690 if (compiler.commonElements.mirrorsLibrary != null) { 689 if (compiler.commonElements.mirrorsLibrary != null) {
691 _addMirrorElements(); 690 _addMirrorElements();
692 } 691 }
693 692
694 // Build the OutputUnits using these two maps. 693 // Build the OutputUnits using these two maps.
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 1050
1052 bool operator ==(other) { 1051 bool operator ==(other) {
1053 if (other is! _DeclaredDeferredImport) return false; 1052 if (other is! _DeclaredDeferredImport) return false;
1054 return declaration == other.declaration; 1053 return declaration == other.declaration;
1055 } 1054 }
1056 1055
1057 int get hashCode => declaration.hashCode * 17; 1056 int get hashCode => declaration.hashCode * 17;
1058 1057
1059 String toString() => '$declaration'; 1058 String toString() => '$declaration';
1060 } 1059 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698