Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 '../elements/elements.dart' show Element; | 7 import '../elements/elements.dart' show Element; |
| 8 import '../util/util.dart' show Setlet; | 8 import '../util/util.dart' show Setlet; |
| 9 import 'use.dart' show DynamicUse, StaticUse, TypeUse; | 9 import 'use.dart' show DynamicUse, StaticUse, TypeUse; |
| 10 | 10 |
| 11 /// Describes of how an element (e.g. a method) impacts the closed-world | |
|
Harry Terkelsen
2016/08/16 19:36:13
Either delete "of" or change Describes to Descript
Siggi Cherem (dart-lang)
2016/08/16 19:43:30
Done.
| |
| 12 /// semantics of a program. | |
| 13 /// | |
| 14 /// A [WorldImpact] contains information about how a program element affects our | |
| 15 /// understanding of what's live in a program. For example, it can indicate | |
| 16 /// that a method uses certain feature, or allocates a specific type. | |
|
Harry Terkelsen
2016/08/16 19:36:13
"uses a certain feature"
Siggi Cherem (dart-lang)
2016/08/16 19:43:30
Done.
| |
| 17 /// | |
| 18 /// The impact object can be computed locally by inspecting just the resolution | |
| 19 /// information of that element alone. The compiler uses [Universe] and | |
| 20 /// [ClassWorld] to combine the information discoverred in the impact objects of | |
|
Harry Terkelsen
2016/08/16 19:36:13
discovered
Siggi Cherem (dart-lang)
2016/08/16 19:43:30
Done.
| |
| 21 /// all elements reachable in an application. | |
| 11 class WorldImpact { | 22 class WorldImpact { |
| 12 const WorldImpact(); | 23 const WorldImpact(); |
| 13 | 24 |
| 14 Iterable<DynamicUse> get dynamicUses => const <DynamicUse>[]; | 25 Iterable<DynamicUse> get dynamicUses => const <DynamicUse>[]; |
| 15 | 26 |
| 16 Iterable<StaticUse> get staticUses => const <StaticUse>[]; | 27 Iterable<StaticUse> get staticUses => const <StaticUse>[]; |
| 17 | 28 |
| 18 // TODO(johnniwinther): Replace this by called constructors with type | 29 // TODO(johnniwinther): Replace this by called constructors with type |
| 19 // arguments. | 30 // arguments. |
| 20 // TODO(johnniwinther): Collect all checked types for checked mode separately | 31 // TODO(johnniwinther): Collect all checked types for checked mode separately |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 222 } | 233 } |
| 223 } | 234 } |
| 224 | 235 |
| 225 @override | 236 @override |
| 226 void visitTypeUse(TypeUse use) { | 237 void visitTypeUse(TypeUse use) { |
| 227 if (_visitTypeUse != null) { | 238 if (_visitTypeUse != null) { |
| 228 _visitTypeUse(use); | 239 _visitTypeUse(use); |
| 229 } | 240 } |
| 230 } | 241 } |
| 231 } | 242 } |
| OLD | NEW |