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

Unified Diff: pkg/compiler/lib/src/common/resolution.dart

Issue 1405443004: Remove calls to registerDependency from within resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common/resolution.dart
diff --git a/pkg/compiler/lib/src/common/resolution.dart b/pkg/compiler/lib/src/common/resolution.dart
index 88cb4b97532f2ba7453e5e6e824d1585d50ebab3..9357ed9c4f698a4c200e4cc7c01550360599453d 100644
--- a/pkg/compiler/lib/src/common/resolution.dart
+++ b/pkg/compiler/lib/src/common/resolution.dart
@@ -229,14 +229,6 @@ class TransformedWorldImpact extends WorldImpact {
@override
Iterable<DartType> get isChecks => worldImpact.isChecks;
- @override
- Iterable<Element> get staticUses {
- if (_staticUses == null) {
- return worldImpact.staticUses;
- }
- return _staticUses;
- }
-
_unsupported(String message) => throw new UnsupportedError(message);
void registerDynamicGetter(UniverseSelector selector) {
@@ -264,11 +256,9 @@ class TransformedWorldImpact extends WorldImpact {
}
void registerInstantiatedType(InterfaceType type) {
- // TODO(johnniwinther): Remove this when dependency tracking is done on
- // the world impact itself.
- worldImpact.registerDependency(type.element);
if (_instantiatedTypes == null) {
_instantiatedTypes = new Setlet<InterfaceType>();
+ _instantiatedTypes.addAll(worldImpact.instantiatedTypes);
}
_instantiatedTypes.add(type);
}
@@ -276,7 +266,7 @@ class TransformedWorldImpact extends WorldImpact {
@override
Iterable<InterfaceType> get instantiatedTypes {
return _instantiatedTypes != null
- ? _instantiatedTypes : const <InterfaceType>[];
+ ? _instantiatedTypes : worldImpact.instantiatedTypes;
}
@override
@@ -285,16 +275,19 @@ class TransformedWorldImpact extends WorldImpact {
}
void registerStaticUse(Element element) {
- // TODO(johnniwinther): Remove this when dependency tracking is done on
- // the world impact itself.
- worldImpact.registerDependency(element);
if (_staticUses == null) {
_staticUses = new Setlet<Element>();
+ _staticUses.addAll(worldImpact.staticUses);
}
_staticUses.add(element);
}
@override
+ Iterable<Element> get staticUses {
+ return _staticUses != null ? _staticUses : worldImpact.staticUses;
+ }
+
+ @override
Iterable<LocalFunctionElement> get closures => worldImpact.closures;
String toString() {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698