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

Side by Side Diff: pkg/compiler/lib/src/universe/world_impact.dart

Issue 1422323007: dart2js: use WorldImpact for dump_info (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/universe/universe.dart ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.universe.world_impact; 5 library dart2js.universe.world_impact;
6 6
7 import '../dart_types.dart' show 7 import '../dart_types.dart' show
8 DartType, 8 DartType,
9 InterfaceType; 9 InterfaceType;
10 import '../elements/elements.dart' show 10 import '../elements/elements.dart' show
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 add('type uses', worldImpact.typeUses); 55 add('type uses', worldImpact.typeUses);
56 } 56 }
57 } 57 }
58 58
59 class WorldImpactBuilder { 59 class WorldImpactBuilder {
60 // TODO(johnniwinther): Do we benefit from lazy initialization of the 60 // TODO(johnniwinther): Do we benefit from lazy initialization of the
61 // [Setlet]s? 61 // [Setlet]s?
62 Setlet<DynamicUse> _dynamicUses; 62 Setlet<DynamicUse> _dynamicUses;
63 Setlet<StaticUse> _staticUses; 63 Setlet<StaticUse> _staticUses;
64 Setlet<TypeUse> _typeUses; 64 Setlet<TypeUse> _typeUses;
65 Setlet<LocalFunctionElement> _closures;
66 65
67 void registerDynamicUse(DynamicUse dynamicUse) { 66 void registerDynamicUse(DynamicUse dynamicUse) {
68 assert(dynamicUse != null); 67 assert(dynamicUse != null);
69 if (_dynamicUses == null) { 68 if (_dynamicUses == null) {
70 _dynamicUses = new Setlet<DynamicUse>(); 69 _dynamicUses = new Setlet<DynamicUse>();
71 } 70 }
72 _dynamicUses.add(dynamicUse); 71 _dynamicUses.add(dynamicUse);
73 } 72 }
74 73
75 Iterable<DynamicUse> get dynamicUses { 74 Iterable<DynamicUse> get dynamicUses {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 return _staticUses != null ? _staticUses : worldImpact.staticUses; 154 return _staticUses != null ? _staticUses : worldImpact.staticUses;
156 } 155 }
157 156
158 String toString() { 157 String toString() {
159 StringBuffer sb = new StringBuffer(); 158 StringBuffer sb = new StringBuffer();
160 sb.write('TransformedWorldImpact($worldImpact)'); 159 sb.write('TransformedWorldImpact($worldImpact)');
161 WorldImpact.printOn(sb, this); 160 WorldImpact.printOn(sb, this);
162 return sb.toString(); 161 return sb.toString();
163 } 162 }
164 } 163 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/universe/universe.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698