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

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

Issue 1422623014: Add TypeUse. (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 cdced76e60fef6d114b9f28dd39b8988983f01d2..64df6d54cdc7707ab6d9d0084904283240634517 100644
--- a/pkg/compiler/lib/src/resolution/registry.dart
+++ b/pkg/compiler/lib/src/resolution/registry.dart
@@ -31,7 +31,8 @@ import '../universe/selector.dart' show
Selector;
import '../universe/use.dart' show
DynamicUse,
- StaticUse;
+ StaticUse,
+ TypeUse;
import '../universe/world_impact.dart' show
WorldImpactBuilder;
import '../world.dart' show World;
@@ -315,24 +316,9 @@ class ResolutionRegistry extends Registry {
worldImpact.registerFeature(Feature.THROW_NO_SUCH_METHOD);
}
- /// Register a checked mode check against [type].
- void registerCheckedModeCheck(DartType type) {
- worldImpact.registerCheckedModeCheckedType(type);
- }
-
- /// Register an on-catch clause of [type].
- void registerOnCatchType(DartType type) {
- worldImpact.registerOnCatchType(type);
- }
-
- /// Register an is-test or is-not-test of [type].
- void registerIsCheck(DartType type) {
- worldImpact.registerIsCheck(type);
- }
-
- /// Register an as-cast of [type].
- void registerAsCast(DartType type) {
- worldImpact.registerAsCast(type);
+ /// Register the use of a type.
+ void registerTypeUse(TypeUse typeUse) {
+ worldImpact.registerTypeUse(typeUse);
}
void registerClosure(LocalFunctionElement element) {
@@ -349,7 +335,7 @@ class ResolutionRegistry extends Registry {
void registerTypeLiteral(Send node, DartType type) {
mapping.setType(node, type);
- worldImpact.registerTypeLiteral(type);
+ worldImpact.registerTypeUse(new TypeUse.typeLiteral(type));
}
void registerLiteralList(Node node,
@@ -391,10 +377,6 @@ class ResolutionRegistry extends Registry {
worldImpact.registerFeature(Feature.SYMBOL_CONSTRUCTOR);
}
- void registerInstantiatedType(InterfaceType type) {
- worldImpact.registerInstantiatedType(type);
- }
-
void registerAbstractClassInstantiation() {
worldImpact.registerFeature(Feature.ABSTRACT_CLASS_INSTANTIATION);
}
@@ -433,7 +415,7 @@ class ResolutionRegistry extends Registry {
}
void registerInstantiation(InterfaceType type) {
- registerInstantiatedType(type);
+ worldImpact.registerTypeUse(new TypeUse.instantiation(type));
}
void registerAssert(bool hasMessage) {
@@ -493,7 +475,7 @@ class ForeignResolutionResolver implements ForeignResolver {
@override
void registerInstantiatedType(InterfaceType type) {
- registry.registerInstantiatedType(type);
+ registry.registerInstantiation(type);
}
@override
« 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