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

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

Issue 1376863004: Avoid eager enqueueing from resolution (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix deferred+mirrors bug. 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 | « pkg/compiler/lib/src/resolution/class_members.dart ('k') | pkg/compiler/lib/src/resolution/registry.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/members.dart
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index 89df08f4e9e32f33e114206b1cd680f4f6fe230a..03af0da3b17c92dfe8b01df671e12dcebd4eaf22 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -414,7 +414,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
TypeResult visitTypeAnnotation(TypeAnnotation node) {
DartType type = resolveTypeAnnotation(node);
if (inCheckContext) {
- registry.registerIsCheck(type);
+ registry.registerCheckedModeCheck(type);
}
return new TypeResult(type);
}
@@ -500,7 +500,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
});
if (inCheckContext) {
functionParameters.forEachParameter((ParameterElement element) {
- registry.registerIsCheck(element.type);
+ registry.registerCheckedModeCheck(element.type);
});
}
}
@@ -1190,7 +1190,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
Node typeNode = node.arguments.head;
DartType type = resolveTypeAnnotation(typeNode);
- registry.registerAsCheck(type);
+ registry.registerAsCast(type);
registry.registerSendStructure(node, new AsStructure(type));
return const NoneResult();
}
@@ -1952,7 +1952,6 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
} else {
semantics = new StaticAccess.typeParameterTypeLiteral(element);
}
- registry.registerTypeVariableExpression(element);
registry.useElement(node, element);
registry.registerTypeLiteral(node, element.type);
@@ -2005,14 +2004,10 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
MessageKind.ASSIGNING_TYPE, const {});
}
- if (node.isComplex) {
- // We read the type variable before trying write to it.
- registry.registerTypeVariableExpression(element);
- }
-
// TODO(23998): Remove this when all information goes through
// the [SendStructure].
registry.useElement(node, error);
+ // TODO(johnniwinther): Register only on read?
registry.registerTypeLiteral(node, element.type);
registry.registerThrowNoSuchMethod();
semantics = new StaticAccess.typeParameterTypeLiteral(element);
@@ -4008,7 +4003,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
this, node, malformedIsError: malformedIsError,
deferredIsMalformed: deferredIsMalformed);
if (inCheckContext) {
- registry.registerIsCheck(type);
+ registry.registerCheckedModeCheck(type);
registry.registerRequiredType(type, enclosingElement);
}
return type;
@@ -4048,8 +4043,11 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
} else {
listType = coreTypes.listType();
}
- registry.setType(node, listType);
- registry.registerInstantiatedType(listType);
+ registry.registerLiteralList(
+ node,
+ listType,
+ isConstant: node.isConst,
+ isEmpty: node.elements.isEmpty);
registry.registerRequiredType(listType, enclosingElement);
if (node.isConst) {
List<ConstantExpression> constantExpressions = <ConstantExpression>[];
@@ -4369,7 +4367,11 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
MessageKind.TYPE_VARIABLE_IN_CONSTANT);
isValidAsConstant = false;
}
- registry.registerMapLiteral(node, mapType, node.isConst);
+ registry.registerMapLiteral(
+ node,
+ mapType,
+ isConstant: node.isConst,
+ isEmpty: node.entries.isEmpty);
registry.registerRequiredType(mapType, enclosingElement);
if (node.isConst) {
« no previous file with comments | « pkg/compiler/lib/src/resolution/class_members.dart ('k') | pkg/compiler/lib/src/resolution/registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698