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

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

Issue 1130773002: Differentiate between unresolved class and constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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
Index: pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart
diff --git a/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart b/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart
index dce195b1b07de12a64b856ce9cdbb060245224bc..834bc31bb67c7fef8a1d9821370afa01c6d2d7e9 100644
--- a/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart
+++ b/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart
@@ -33,17 +33,6 @@ abstract class ErrorBulkMixin<R, A>
}
@override
- R errorAbstractClassConstructorInvoke(
- NewExpression node,
- ConstructorElement element,
- InterfaceType type,
- NodeList arguments,
- CallStructure callStructure,
- A arg) {
- return bulkHandleError(node, arg);
- }
-
- @override
R errorClassTypeLiteralCompound(
Send node,
ConstantExpression constant,
@@ -251,6 +240,17 @@ abstract class ErrorBulkMixin<R, A>
}
@override
+ R errorNonConstantConstructorInvoke(
+ NewExpression node,
+ Element element,
+ InterfaceType type,
+ NodeList arguments,
+ CallStructure callStructure,
+ A arg) {
+ return bulkHandleError(node, arg);
+ }
+
+ @override
R errorStaticFunctionSet(
Send node,
MethodElement function,
@@ -443,28 +443,6 @@ abstract class ErrorBulkMixin<R, A>
}
@override
- R errorUnresolvedClassConstructorInvoke(
- NewExpression node,
- Element element,
- MalformedType type,
- NodeList arguments,
- Selector selector,
- A arg) {
- return bulkHandleError(node, arg);
- }
-
- @override
- R errorUnresolvedConstructorInvoke(
- NewExpression node,
- Element constructor,
- DartType type,
- NodeList arguments,
- Selector selector,
- A arg) {
- return bulkHandleError(node, arg);
- }
-
- @override
R errorUnresolvedPostfix(
Send node,
Element element,
@@ -483,17 +461,6 @@ abstract class ErrorBulkMixin<R, A>
}
@override
- R errorUnresolvedRedirectingFactoryConstructorInvoke(
- NewExpression node,
- ConstructorElement constructor,
- InterfaceType type,
- NodeList arguments,
- Selector selector,
- A arg) {
- return bulkHandleError(node, arg);
- }
-
- @override
R errorUnresolvedSet(
Send node,
Element element,
@@ -2342,6 +2309,17 @@ abstract class NewBulkMixin<R, A>
}
@override
+ R visitAbstractClassConstructorInvoke(
+ NewExpression node,
+ ConstructorElement element,
+ InterfaceType type,
+ NodeList arguments,
+ CallStructure callStructure,
+ A arg) {
+ return bulkHandleNew(node, arg);
+ }
+
+ @override
R visitConstConstructorInvoke(
NewExpression node,
ConstructedConstantExpression constant,
@@ -2390,6 +2368,39 @@ abstract class NewBulkMixin<R, A>
A arg) {
return bulkHandleNew(node, arg);
}
+
+ @override
+ R visitUnresolvedClassConstructorInvoke(
+ NewExpression node,
+ Element element,
+ DartType type,
+ NodeList arguments,
+ Selector selector,
+ A arg) {
+ return bulkHandleNew(node, arg);
+ }
+
+ @override
+ R visitUnresolvedConstructorInvoke(
+ NewExpression node,
+ Element constructor,
+ DartType type,
+ NodeList arguments,
+ Selector selector,
+ A arg) {
+ return bulkHandleNew(node, arg);
+ }
+
+ @override
+ R visitUnresolvedRedirectingFactoryConstructorInvoke(
+ NewExpression node,
+ ConstructorElement constructor,
+ InterfaceType type,
+ NodeList arguments,
+ CallStructure callStructure,
+ A arg) {
+ return bulkHandleNew(node, arg);
+ }
}
/// Visitor that implements [SemanticSendVisitor] by the use of `BulkX` mixins.
@@ -4798,10 +4809,10 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> {
}
@override
- R errorUnresolvedClassConstructorInvoke(
+ R visitUnresolvedClassConstructorInvoke(
NewExpression node,
Element constructor,
- MalformedType type,
+ DartType type,
NodeList arguments,
Selector selector,
A arg) {
@@ -4810,7 +4821,7 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> {
}
@override
- R errorUnresolvedConstructorInvoke(
+ R visitUnresolvedConstructorInvoke(
NewExpression node,
Element constructor,
DartType type,
@@ -4872,7 +4883,7 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> {
}
@override
- R errorAbstractClassConstructorInvoke(
+ R visitAbstractClassConstructorInvoke(
NewExpression node,
ConstructorElement element,
InterfaceType type,
@@ -4884,12 +4895,24 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> {
}
@override
- R errorUnresolvedRedirectingFactoryConstructorInvoke(
+ R visitUnresolvedRedirectingFactoryConstructorInvoke(
NewExpression node,
ConstructorElement constructor,
InterfaceType type,
NodeList arguments,
- Selector selector,
+ CallStructure callStructure,
+ A arg) {
+ apply(arguments, arg);
+ return null;
+ }
+
+ @override
+ R errorNonConstantConstructorInvoke(
+ NewExpression node,
+ Element element,
+ InterfaceType type,
+ NodeList arguments,
+ CallStructure callStructure,
A arg) {
apply(arguments, arg);
return null;
@@ -6596,4 +6619,47 @@ abstract class BaseImplementationOfNewMixin<R, A>
return handleConstructorInvoke(
node, constructor, type, arguments, callStructure, arg);
}
+
+ R visitUnresolvedConstructorInvoke(
+ NewExpression node,
+ Element constructor,
+ DartType type,
+ NodeList arguments,
+ Selector selector,
+ A arg) {
+ return handleConstructorInvoke(
+ node, constructor, type, arguments, selector.callStructure, arg);
+ }
+
+ R visitUnresolvedClassConstructorInvoke(
+ NewExpression node,
+ Element element,
+ DartType type,
+ NodeList arguments,
+ Selector selector,
+ A arg) {
+ return handleConstructorInvoke(
+ node, element, type, arguments, selector.callStructure, arg);
+ }
+
+ R visitAbstractClassConstructorInvoke(
+ NewExpression node,
+ ConstructorElement constructor,
+ InterfaceType type,
+ NodeList arguments,
+ CallStructure callStructure,
+ A arg) {
+ return handleConstructorInvoke(
+ node, constructor, type, arguments, callStructure, arg);
+ }
+ R visitUnresolvedRedirectingFactoryConstructorInvoke(
+ NewExpression node,
+ ConstructorElement constructor,
+ InterfaceType type,
+ NodeList arguments,
+ CallStructure callStructure,
+ A arg) {
+ return handleConstructorInvoke(
+ node, constructor, type, arguments, callStructure, arg);
+ }
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/semantic_visitor.dart ('k') | pkg/compiler/lib/src/resolution/send_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698