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) { |