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

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

Issue 1424923004: Add StaticUse for more precise registration of statically known element use. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/registry.dart
diff --git a/pkg/compiler/lib/src/resolution/registry.dart b/pkg/compiler/lib/src/resolution/registry.dart
index 8b68a18adbfcb57a20bd9db79180ad39a5c026a6..840449451e422666c8ad2d7f6f2292363870f5bf 100644
--- a/pkg/compiler/lib/src/resolution/registry.dart
+++ b/pkg/compiler/lib/src/resolution/registry.dart
@@ -31,6 +31,8 @@ import '../universe/selector.dart' show
Selector;
import '../universe/universe.dart' show
UniverseSelector;
+import '../universe/use.dart' show
+ StaticUse;
import '../universe/world_impact.dart' show
WorldImpactBuilder;
import '../world.dart' show World;
@@ -300,12 +302,8 @@ class ResolutionRegistry extends Registry {
// Various Backend/Enqueuer/World registration.
//////////////////////////////////////////////////////////////////////////////
- void registerStaticUse(Element element) {
- worldImpact.registerStaticUse(element);
- }
-
- void registerImplicitSuperCall(FunctionElement superConstructor) {
- registerStaticUse(superConstructor);
+ void registerStaticUse(StaticUse staticUse) {
+ worldImpact.registerStaticUse(staticUse);
}
void registerLazyField() {
@@ -360,10 +358,6 @@ class ResolutionRegistry extends Registry {
mapping.addSuperUse(node);
}
- void registerDynamicInvocation(UniverseSelector selector) {
- worldImpact.registerDynamicInvocation(selector);
- }
-
void registerSuperNoSuchMethod() {
worldImpact.registerFeature(Feature.SUPER_NO_SUCH_METHOD);
}
@@ -400,18 +394,8 @@ class ResolutionRegistry extends Registry {
new ForeignResolutionResolver(visitor, this));
}
- void registerGetOfStaticFunction(FunctionElement element) {
- worldImpact.registerClosurizedFunction(element);
- }
-
- void registerDynamicGetter(UniverseSelector selector) {
- assert(selector.selector.isGetter);
- worldImpact.registerDynamicGetter(selector);
- }
-
- void registerDynamicSetter(UniverseSelector selector) {
- assert(selector.selector.isSetter);
- worldImpact.registerDynamicSetter(selector);
+ void registerDynamicUse(UniverseSelector selector) {
+ worldImpact.registerDynamicUse(selector);
}
void registerConstSymbol(String name) {
@@ -463,12 +447,6 @@ class ResolutionRegistry extends Registry {
worldImpact.registerFeature(Feature.THROW_EXPRESSION);
}
- void registerStaticInvocation(Element element) {
- // TODO(johnniwinther): Increase precision of [registerStaticUse].
- if (element == null) return;
- registerStaticUse(element);
- }
-
void registerInstantiation(InterfaceType type) {
registerInstantiatedType(type);
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698