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

Side by Side Diff: pkg/compiler/lib/src/dart_backend/placeholder_collector.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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/inferrer_visitor.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of dart_backend; 5 part of dart_backend;
6 6
7 class LocalPlaceholder { 7 class LocalPlaceholder {
8 final String identifier; 8 final String identifier;
9 final Set<Node> nodes; 9 final Set<Node> nodes;
10 LocalPlaceholder(this.identifier) : nodes = new Set<Node>(); 10 LocalPlaceholder(this.identifier) : nodes = new Set<Node>();
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 visitTypeLiteralSend(Send node) { 145 visitTypeLiteralSend(Send node) {
146 DartType type = elements.getTypeLiteralType(node); 146 DartType type = elements.getTypeLiteralType(node);
147 if (!type.isDynamic) { 147 if (!type.isDynamic) {
148 if (type is TypeVariableType) { 148 if (type is TypeVariableType) {
149 collector.makeTypeVariablePlaceholder(node.selector, type); 149 collector.makeTypeVariablePlaceholder(node.selector, type);
150 } else { 150 } else {
151 collector.makeTypePlaceholder(node.selector, type); 151 collector.makeTypePlaceholder(node.selector, type);
152 } 152 }
153 } 153 }
154 } 154 }
155
156 @override
157 handleNewExpression(NewExpression node) => visitNode(node);
158
159 @override
160 handleSendSet(SendSet node) => visitNode(node);
155 } 161 }
156 162
157 class PlaceholderCollector extends Visitor { 163 class PlaceholderCollector extends Visitor {
158 final DiagnosticListener listener; 164 final DiagnosticListener listener;
159 final MirrorRenamer mirrorRenamer; 165 final MirrorRenamer mirrorRenamer;
160 final FunctionElement mainFunction; 166 final FunctionElement mainFunction;
161 final Set<String> fixedMemberNames; // member names which cannot be renamed. 167 final Set<String> fixedMemberNames; // member names which cannot be renamed.
162 final Map<Element, ElementAst> elementAsts; 168 final Map<Element, ElementAst> elementAsts;
163 final Set<Node> prefixNodesToErase = new Set<Node>(); 169 final Set<Node> prefixNodesToErase = new Set<Node>();
164 final Set<Node> unresolvedNodes = new Set<Node>(); 170 final Set<Node> unresolvedNodes = new Set<Node>();
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 706
701 visitBlock(Block node) { 707 visitBlock(Block node) {
702 for (Node statement in node.statements.nodes) { 708 for (Node statement in node.statements.nodes) {
703 if (statement is VariableDefinitions) { 709 if (statement is VariableDefinitions) {
704 makeVarDeclarationTypePlaceholder(statement); 710 makeVarDeclarationTypePlaceholder(statement);
705 } 711 }
706 } 712 }
707 node.visitChildren(this); 713 node.visitChildren(this);
708 } 714 }
709 } 715 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/inferrer_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698