Chromium Code Reviews| 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..11282745df498d20b00dc436c3d755341fd43170 100644 |
| --- a/pkg/compiler/lib/src/resolution/send_resolver.dart |
| +++ b/pkg/compiler/lib/src/resolution/send_resolver.dart |
| @@ -196,7 +196,13 @@ abstract class SendResolverMixin { |
| } |
| SendStructure computeSendStructure(Send node) { |
| + SendStructure sendStructure = elements.getSendStructure(node); |
| + if (sendStructure != null) { |
| + return sendStructure; |
| + } |
| + |
| if (elements.isAssert(node)) { |
| + assert(invariant(node, false, message: "Unexpected assert.")); |
|
karlklose
2015/05/22 10:08:36
Shouldn't we always throw instead of creating stru
Johnni Winther
2015/05/22 12:24:58
Done.
|
| if (!node.arguments.isEmpty && node.arguments.tail.isEmpty) { |
| return const AssertStructure(); |
| } else { |
| @@ -212,6 +218,7 @@ abstract class SendResolverMixin { |
| if (node.isOperator) { |
| String operatorText = node.selector.asOperator().source; |
| if (operatorText == 'is') { |
| + assert(invariant(node, false, message: "Unexpected is test.")); |
| if (node.isIsNotCheck) { |
| return new IsNotStructure( |
| elements.getType(node.arguments.single.asSend().receiver)); |
| @@ -219,10 +226,13 @@ abstract class SendResolverMixin { |
| return new IsStructure(elements.getType(node.arguments.single)); |
| } |
| } else if (operatorText == 'as') { |
| + assert(invariant(node, false, message: "Unexpected as cast.")); |
| return new AsStructure(elements.getType(node.arguments.single)); |
| } else if (operatorText == '&&') { |
| + assert(invariant(node, false, message: "Unexpected logical and.")); |
| return const LogicalAndStructure(); |
| } else if (operatorText == '||') { |
| + assert(invariant(node, false, message: "Unexpected logical or.")); |
| return const LogicalOrStructure(); |
| } |
| } |