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

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

Issue 1149973004: Start to compute SendStructure in resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. 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
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/send_resolver.dart
diff --git a/pkg/compiler/lib/src/resolution/send_resolver.dart b/pkg/compiler/lib/src/resolution/send_resolver.dart
index 77e35827ceb1f87252eb1e1ca789da3b51221940..c265bb8639f2323e23d393f9a250bc875c28d607 100644
--- a/pkg/compiler/lib/src/resolution/send_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/send_resolver.dart
@@ -196,12 +196,13 @@ abstract class SendResolverMixin {
}
SendStructure computeSendStructure(Send node) {
+ SendStructure sendStructure = elements.getSendStructure(node);
+ if (sendStructure != null) {
+ return sendStructure;
+ }
+
if (elements.isAssert(node)) {
- if (!node.arguments.isEmpty && node.arguments.tail.isEmpty) {
- return const AssertStructure();
- } else {
- return const InvalidAssertStructure();
- }
+ return internalError(node, "Unexpected assert.");
}
AssignmentOperator assignmentOperator;
@@ -212,18 +213,15 @@ abstract class SendResolverMixin {
if (node.isOperator) {
String operatorText = node.selector.asOperator().source;
if (operatorText == 'is') {
- if (node.isIsNotCheck) {
- return new IsNotStructure(
- elements.getType(node.arguments.single.asSend().receiver));
- } else {
- return new IsStructure(elements.getType(node.arguments.single));
- }
+ return internalError(node, "Unexpected is test.");
} else if (operatorText == 'as') {
+ return internalError(node, "Unexpected as cast.");
return new AsStructure(elements.getType(node.arguments.single));
} else if (operatorText == '&&') {
+ return internalError(node, "Unexpected logical and.");
return const LogicalAndStructure();
} else if (operatorText == '||') {
- return const LogicalOrStructure();
+ return internalError(node, "Unexpected logical or.");
}
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698