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

Side by Side Diff: pkg/compiler/lib/src/inferrer/inferrer_visitor.dart

Issue 1083063002: Deprecate visitAssertSend and visitTypePrefixSend (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library inferrer_visitor; 5 library inferrer_visitor;
6 6
7 import '../dart2jslib.dart' hide Selector, TypedSelector; 7 import '../dart2jslib.dart' hide Selector, TypedSelector;
8 import '../dart_types.dart'; 8 import '../dart_types.dart';
9 import '../elements/elements.dart'; 9 import '../elements/elements.dart';
10 import '../tree/tree.dart'; 10 import '../tree/tree.dart';
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 T visitDynamicSend(Send node); 716 T visitDynamicSend(Send node);
717 717
718 T visitAsyncForIn(AsyncForIn node); 718 T visitAsyncForIn(AsyncForIn node);
719 719
720 T visitSyncForIn(SyncForIn node); 720 T visitSyncForIn(SyncForIn node);
721 721
722 T visitReturn(Return node); 722 T visitReturn(Return node);
723 723
724 T visitFunctionExpression(FunctionExpression node); 724 T visitFunctionExpression(FunctionExpression node);
725 725
726 T visitAssertSend(Send node) { 726 @override
727 T visitAssert(Send node, Node expression, _) {
727 if (!compiler.enableUserAssertions) { 728 if (!compiler.enableUserAssertions) {
728 return types.nullType; 729 return types.nullType;
729 } 730 }
730 // TODO(johnniwinther): Don't handle assert like a regular static call since 731 return handleAssert(node, expression);
731 // it break the selector name check.
732 return visitStaticSend(node);
733 } 732 }
734 733
734 /// Handle an enabled assertion of [expression].
735 T handleAssert(Send node, Node expression);
736
735 T visitNode(Node node) { 737 T visitNode(Node node) {
736 return node.visitChildren(this); 738 return node.visitChildren(this);
737 } 739 }
738 740
739 T handleNewExpression(NewExpression node) { 741 T handleNewExpression(NewExpression node) {
740 return node.send.accept(this); 742 return node.send.accept(this);
741 } 743 }
742 744
743 T visit(Node node) { 745 T visit(Node node) {
744 return node == null ? null : node.accept(this); 746 return node == null ? null : node.accept(this);
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 return type; 1307 return type;
1306 } 1308 }
1307 1309
1308 T visitCascade(Cascade node) { 1310 T visitCascade(Cascade node) {
1309 // Ignore the result of the cascade send and return the type of the cascade 1311 // Ignore the result of the cascade send and return the type of the cascade
1310 // receiver. 1312 // receiver.
1311 visit(node.expression); 1313 visit(node.expression);
1312 return cascadeReceiverStack.removeLast(); 1314 return cascadeReceiverStack.removeLast();
1313 } 1315 }
1314 } 1316 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698