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

Unified Diff: pkg/compiler/lib/src/universe/use.dart

Issue 2506393002: Enhance precision of recorded instantiation info in ResolutionWorldBuilder (Closed)
Patch Set: Updated cf. comments. Created 4 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/universe/world_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/universe/use.dart
diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
index 5876a1814f49a0f2f4207ed9bd7fe6a56e3a4a2a..ce9a2c4f6ddda7f1e2d27626c5feeda452159c9e 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -73,6 +73,7 @@ enum StaticUseKind {
CLOSURE,
CONSTRUCTOR_INVOKE,
CONST_CONSTRUCTOR_INVOKE,
+ REDIRECTION,
DIRECT_INVOKE,
}
@@ -266,9 +267,12 @@ class StaticUse {
element, StaticUseKind.CONST_CONSTRUCTOR_INVOKE, type);
}
- /// Constructor redirection to [element].
- factory StaticUse.constructorRedirect(ConstructorElement element) {
- return new StaticUse.internal(element, StaticUseKind.GENERAL);
+ /// Constructor redirection to [element] on [type].
+ factory StaticUse.constructorRedirect(
+ ConstructorElement element, InterfaceType type) {
+ assert(invariant(element, type != null,
+ message: "No type provided for constructor invocation."));
+ return new StaticUse.internal(element, StaticUseKind.REDIRECTION, type);
}
/// Initialization of an instance field [element].
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/universe/world_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698