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

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

Issue 1108783003: Refactor SsaBuilder.visitSuperSend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 5 years, 8 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 8e9c7b5281ffd70054c9a1e121e5c10af1f0811d..b0c0472083ac9ee8fa9361a4e292fa62d88f3a5e 100644
--- a/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart
+++ b/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart
@@ -532,15 +532,6 @@ abstract class ErrorBulkMixin<R, A>
}
@override
- R errorUnresolvedSuperIndex(
- Send node,
- Element function,
- Node index,
- A arg) {
- return bulkHandleError(node, arg);
- }
-
- @override
R errorUnresolvedSuperIndexPostfix(
Send node,
Element function,
@@ -571,20 +562,10 @@ abstract class ErrorBulkMixin<R, A>
}
@override
- R errorUnresolvedSuperBinary(
- Send node,
- Element element,
- BinaryOperator operator,
- Node argument,
- A arg) {
- return bulkHandleError(node, arg);
- }
-
- @override
- R errorUnresolvedSuperUnary(
+ R errorUndefinedUnaryExpression(
Send node,
- UnaryOperator operator,
- Element element,
+ Operator operator,
+ Node expression,
A arg) {
return bulkHandleError(node, arg);
}
@@ -598,15 +579,6 @@ abstract class ErrorBulkMixin<R, A>
A arg) {
return bulkHandleError(node, arg);
}
-
- @override
- R errorUndefinedUnaryExpression(
- Send node,
- Operator operator,
- Node expression,
- A arg) {
- return bulkHandleError(node, arg);
- }
}
/// Mixin that implements all `visitXPrefix` methods of [SemanticSendVisitor] by
@@ -1306,6 +1278,16 @@ abstract class InvokeBulkMixin<R, A>
}
@override
+ R visitSuperMethodIncompatibleInvoke(
+ Send node,
+ MethodElement method,
+ NodeList arguments,
+ CallStructure callStructure,
+ A arg) {
+ return bulkHandleInvoke(node, arg);
+ }
+
+ @override
R visitThisInvoke(
Send node,
NodeList arguments,
@@ -1382,6 +1364,16 @@ abstract class InvokeBulkMixin<R, A>
A arg) {
return bulkHandleInvoke(node, arg);
}
+
+ @override
+ R visitUnresolvedSuperInvoke(
+ Send node,
+ Element function,
+ NodeList arguments,
+ Selector selector,
+ A arg) {
+ return bulkHandleInvoke(node, arg);
+ }
}
/// Mixin that implements all `visitXGet` methods of [SemanticSendVisitor] by
@@ -1553,6 +1545,14 @@ abstract class GetBulkMixin<R, A>
A arg) {
return bulkHandleGet(node, arg);
}
+
+ @override
+ R visitUnresolvedSuperGet(
+ Send node,
+ Element element,
+ A arg) {
+ return bulkHandleGet(node, arg);
+ }
}
/// Mixin that implements all `visitXSet` methods of [SemanticSendVisitor] by
@@ -1800,6 +1800,35 @@ abstract class BinaryBulkMixin<R, A>
A arg) {
return bulkHandleBinary(node, arg);
}
+
+ @override
+ R visitUnresolvedSuperBinary(
+ Send node,
+ FunctionElement function,
+ BinaryOperator operator,
+ Node argument,
+ A arg) {
+ return bulkHandleBinary(node, arg);
+ }
+
+ @override
+ R visitUnresolvedSuperInvoke(
+ Send node,
+ Element function,
+ NodeList arguments,
+ Selector selector,
+ A arg) {
+ return bulkHandleBinary(node, arg);
+ }
+
+ @override
+ R visitUnresolvedSuperIndex(
+ Send node,
+ FunctionElement function,
+ Node index,
+ A arg) {
+ return bulkHandleBinary(node, arg);
+ }
}
/// Mixin that implements all unary visitor methods in [SemanticSendVisitor] by
@@ -1823,8 +1852,11 @@ abstract class UnaryBulkMixin<R, A>
}
@override
- R visitSuperUnary(Send node, UnaryOperator operator,
- FunctionElement function, A arg) {
+ R visitSuperUnary(
+ Send node,
+ UnaryOperator operator,
+ FunctionElement function,
+ A arg) {
return bulkHandleUnary(node, arg);
}
@@ -1836,6 +1868,15 @@ abstract class UnaryBulkMixin<R, A>
A arg) {
return bulkHandleUnary(node, arg);
}
+
+ @override
+ R visitUnresolvedSuperUnary(
+ Send node,
+ UnaryOperator operator,
+ FunctionElement function,
+ A arg) {
+ return bulkHandleUnary(node, arg);
+ }
}
/// Mixin that implements all purely structural visitor methods in
@@ -2158,6 +2199,16 @@ abstract class SuperBulkMixin<R, A>
}
@override
+ R visitSuperMethodIncompatibleInvoke(
+ Send node,
+ MethodElement method,
+ NodeList arguments,
+ CallStructure callStructure,
+ A arg) {
+ return bulkHandleSuper(node, arg);
+ }
+
+ @override
R visitSuperMethodSetterCompound(
Send node,
FunctionElement method,
@@ -2214,6 +2265,52 @@ abstract class SuperBulkMixin<R, A>
A arg) {
return bulkHandleSuper(node, arg);
}
+
+ @override
+ R visitUnresolvedSuperBinary(
+ Send node,
+ Element element,
+ BinaryOperator operator,
+ Node argument,
+ A arg) {
+ return bulkHandleSuper(node, arg);
+ }
+
+ @override
+ R visitUnresolvedSuperGet(
+ Send node,
+ Element element,
+ A arg) {
+ return bulkHandleSuper(node, arg);
+ }
+
+ @override
+ R visitUnresolvedSuperInvoke(
+ Send node,
+ Element function,
+ NodeList arguments,
+ Selector selector,
+ A arg) {
+ return bulkHandleSuper(node, arg);
+ }
+
+ @override
+ R visitUnresolvedSuperIndex(
+ Send node,
+ Element function,
+ Node index,
+ A arg) {
+ return bulkHandleSuper(node, arg);
+ }
+
+ @override
+ R visitUnresolvedSuperUnary(
+ Send node,
+ UnaryOperator operator,
+ Element element,
+ A arg) {
+ return bulkHandleSuper(node, arg);
+ }
}
abstract class NewBulkMixin<R, A>
@@ -3092,7 +3189,7 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> {
}
@override
- R errorUnresolvedSuperIndex(
+ R visitUnresolvedSuperIndex(
Send node,
Element function,
Node index,
@@ -3102,6 +3199,25 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> {
}
@override
+ R visitUnresolvedSuperGet(
+ Send node,
+ Element element,
+ A arg) {
+ return null;
+ }
+
+ @override
+ R visitUnresolvedSuperInvoke(
+ Send node,
+ Element function,
+ NodeList arguments,
+ Selector selector,
+ A arg) {
+ apply(arguments, arg);
+ return null;
+ }
+
+ @override
R visitAs(
Send node,
Node expression,
@@ -4015,6 +4131,17 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> {
}
@override
+ R visitSuperMethodIncompatibleInvoke(
+ Send node,
+ MethodElement method,
+ NodeList arguments,
+ CallStructure callStructure,
+ A arg) {
+ apply(arguments, arg);
+ return null;
+ }
+
+ @override
R visitSuperMethodSetterCompound(
Send node,
FunctionElement method,
@@ -4532,7 +4659,7 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> {
}
@override
- R errorUnresolvedSuperBinary(
+ R visitUnresolvedSuperBinary(
Send node,
Element element,
BinaryOperator operator,
@@ -4543,7 +4670,7 @@ class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> {
}
@override
- R errorUnresolvedSuperUnary(
+ R visitUnresolvedSuperUnary(
Send node,
UnaryOperator operator,
Element element,
« 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