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

Unified Diff: pkg/analyzer/lib/src/generated/element_resolver.dart

Issue 712083003: Create fewer unnecessary lists (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/analyzer/lib/src/generated/element.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/element_resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index 5f70f5e3b016713e58e7f25d77a61f24cb6248c8..2b55bf6487f0df2c5a04394402bdd83ed23633f1 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart
@@ -877,7 +877,7 @@ class ElementResolver extends SimpleAstVisitor<Object> {
_resolver.reportErrorForNode(StaticWarningCode.UNDEFINED_SETTER, identifier, [identifier.name, prefixElement.name]);
} else if (node.parent is Annotation) {
Annotation annotation = node.parent as Annotation;
- _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation);
return null;
} else {
_resolver.reportErrorForNode(StaticWarningCode.UNDEFINED_GETTER, identifier, [identifier.name, prefixElement.name]);
@@ -1015,17 +1015,17 @@ class ElementResolver extends SimpleAstVisitor<Object> {
Element element = _resolveSimpleIdentifier(node);
ClassElement enclosingClass = _resolver.enclosingClass;
if (_isFactoryConstructorReturnType(node) && !identical(element, enclosingClass)) {
- _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS, node, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS, node);
} else if (_isConstructorReturnType(node) && !identical(element, enclosingClass)) {
- _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME, node, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME, node);
element = null;
} else if (element == null || (element is PrefixElement && !_isValidAsPrefix(node))) {
// TODO(brianwilkerson) Recover from this error.
if (_isConstructorReturnType(node)) {
- _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME, node, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME, node);
} else if (node.parent is Annotation) {
Annotation annotation = node.parent as Annotation;
- _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation);
} else {
_recordUndefinedNode(_resolver.enclosingClass, StaticWarningCode.UNDEFINED_IDENTIFIER, node, [node.name]);
}
@@ -1088,7 +1088,7 @@ class ElementResolver extends SimpleAstVisitor<Object> {
@override
Object visitSuperExpression(SuperExpression node) {
if (!_isSuperInValidContext(node)) {
- _resolver.reportErrorForNode(CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, node, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, node);
}
return super.visitSuperExpression(node);
}
@@ -2118,7 +2118,7 @@ class ElementResolver extends SimpleAstVisitor<Object> {
}
// we need constructor
if (constructor == null) {
- _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation);
return;
}
// record element
@@ -2130,13 +2130,13 @@ class ElementResolver extends SimpleAstVisitor<Object> {
void _resolveAnnotationElementGetter(Annotation annotation, PropertyAccessorElement accessorElement) {
// accessor should be synthetic
if (!accessorElement.isSynthetic) {
- _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation);
return;
}
// variable should be constant
VariableElement variableElement = accessorElement.variable;
if (!variableElement.isConst) {
- _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation, []);
+ _resolver.reportErrorForNode(CompileTimeErrorCode.INVALID_ANNOTATION, annotation);
}
// OK
return;
« no previous file with comments | « pkg/analyzer/lib/src/generated/element.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698