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

Unified Diff: pkg/compiler/lib/src/common/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/common/codegen.dart ('k') | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common/registry.dart
diff --git a/pkg/compiler/lib/src/common/registry.dart b/pkg/compiler/lib/src/common/registry.dart
index a37fb872c8549f87ec744f7b19b1b6b09762cd08..d2cec53046d6573896a743ebc518e80b75a1a7b5 100644
--- a/pkg/compiler/lib/src/common/registry.dart
+++ b/pkg/compiler/lib/src/common/registry.dart
@@ -13,6 +13,8 @@ import '../elements/elements.dart' show
FunctionElement;
import '../universe/universe.dart' show
UniverseSelector;
+import '../universe/use.dart' show
+ StaticUse;
/// Interface for registration of element dependencies.
abstract class Registry {
@@ -21,17 +23,11 @@ abstract class Registry {
bool get isForResolution;
- void registerDynamicInvocation(UniverseSelector selector);
+ void registerDynamicUse(UniverseSelector staticUse);
- void registerDynamicGetter(UniverseSelector selector);
-
- void registerDynamicSetter(UniverseSelector selector);
-
- void registerStaticInvocation(Element element);
+ void registerStaticUse(StaticUse staticUse);
void registerInstantiation(InterfaceType type);
-
- void registerGetOfStaticFunction(FunctionElement element);
}
// TODO(johnniwinther): Remove this.
@@ -44,23 +40,8 @@ class EagerRegistry extends Registry {
bool get isForResolution => world.isResolutionQueue;
@override
- void registerDynamicGetter(UniverseSelector selector) {
- world.registerDynamicGetter(selector);
- }
-
- @override
- void registerDynamicInvocation(UniverseSelector selector) {
- world.registerDynamicInvocation(selector);
- }
-
- @override
- void registerDynamicSetter(UniverseSelector selector) {
- world.registerDynamicSetter(selector);
- }
-
- @override
- void registerGetOfStaticFunction(FunctionElement element) {
- world.registerGetOfStaticFunction(element);
+ void registerDynamicUse(UniverseSelector selector) {
+ world.registerDynamicUse(selector);
}
@override
@@ -69,8 +50,8 @@ class EagerRegistry extends Registry {
}
@override
- void registerStaticInvocation(Element element) {
- world.registerStaticUse(element);
+ void registerStaticUse(StaticUse staticUse) {
+ world.registerStaticUse(staticUse);
}
String toString() => name;
« no previous file with comments | « pkg/compiler/lib/src/common/codegen.dart ('k') | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698