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

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

Issue 1079533002: Handle SendSet and NewExpression through NewResolvedVisitor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix problems with prefix/postfix and erroneous const invocations. 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 super(analyzedElement.resolvedAst.elements) { 696 super(analyzedElement.resolvedAst.elements) {
697 if (handler != null) return; 697 if (handler != null) return;
698 Node node = analyzedElement.node; 698 Node node = analyzedElement.node;
699 FieldInitializationScope<T> fieldScope = 699 FieldInitializationScope<T> fieldScope =
700 analyzedElement.isGenerativeConstructor 700 analyzedElement.isGenerativeConstructor
701 ? new FieldInitializationScope<T>(types) 701 ? new FieldInitializationScope<T>(types)
702 : null; 702 : null;
703 locals = new LocalsHandler<T>(inferrer, types, compiler, node, fieldScope); 703 locals = new LocalsHandler<T>(inferrer, types, compiler, node, fieldScope);
704 } 704 }
705 705
706 T visitSendSet(SendSet node); 706 T handleSendSet(SendSet node);
707 707
708 T visitSuperSend(Send node); 708 T visitSuperSend(Send node);
709 709
710 T visitStaticSend(Send node); 710 T visitStaticSend(Send node);
711 711
712 T visitGetterSend(Send node); 712 T visitGetterSend(Send node);
713 713
714 T visitClosureSend(Send node); 714 T visitClosureSend(Send node);
715 715
716 T visitDynamicSend(Send node); 716 T visitDynamicSend(Send node);
(...skipping 12 matching lines...) Expand all
729 } 729 }
730 // TODO(johnniwinther): Don't handle assert like a regular static call since 730 // TODO(johnniwinther): Don't handle assert like a regular static call since
731 // it break the selector name check. 731 // it break the selector name check.
732 return visitStaticSend(node); 732 return visitStaticSend(node);
733 } 733 }
734 734
735 T visitNode(Node node) { 735 T visitNode(Node node) {
736 return node.visitChildren(this); 736 return node.visitChildren(this);
737 } 737 }
738 738
739 T visitNewExpression(NewExpression node) { 739 T handleNewExpression(NewExpression node) {
740 return node.send.accept(this); 740 return node.send.accept(this);
741 } 741 }
742 742
743 T visit(Node node) { 743 T visit(Node node) {
744 return node == null ? null : node.accept(this); 744 return node == null ? null : node.accept(this);
745 } 745 }
746 746
747 T visitFunctionDeclaration(FunctionDeclaration node) { 747 T visitFunctionDeclaration(FunctionDeclaration node) {
748 locals.update(elements[node], types.functionType, node); 748 locals.update(elements[node], types.functionType, node);
749 return visit(node.function); 749 return visit(node.function);
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 return type; 1305 return type;
1306 } 1306 }
1307 1307
1308 T visitCascade(Cascade node) { 1308 T visitCascade(Cascade node) {
1309 // Ignore the result of the cascade send and return the type of the cascade 1309 // Ignore the result of the cascade send and return the type of the cascade
1310 // receiver. 1310 // receiver.
1311 visit(node.expression); 1311 visit(node.expression);
1312 return cascadeReceiverStack.removeLast(); 1312 return cascadeReceiverStack.removeLast();
1313 } 1313 }
1314 } 1314 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/placeholder_collector.dart ('k') | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698