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

Side by Side Diff: dart/lib/compiler/implementation/dart_backend/placeholder_collector.dart

Issue 10982089: Remove AbstractVisitor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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) 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 class LocalPlaceholder { 5 class LocalPlaceholder {
6 final String identifier; 6 final String identifier;
7 final Set<Node> nodes; 7 final Set<Node> nodes;
8 LocalPlaceholder(this.identifier) : nodes = new Set<Node>(); 8 LocalPlaceholder(this.identifier) : nodes = new Set<Node>();
9 int hashCode() => identifier.hashCode(); 9 int hashCode() => identifier.hashCode();
10 String toString() => 10 String toString() =>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // Hack: putting null into map overrides receiver of original node. 130 // Hack: putting null into map overrides receiver of original node.
131 collector.makeNullPlaceholder(node.receiver); 131 collector.makeNullPlaceholder(node.receiver);
132 } 132 }
133 } 133 }
134 134
135 internalError(String reason, [Node node]) { 135 internalError(String reason, [Node node]) {
136 collector.internalError(reason, node); 136 collector.internalError(reason, node);
137 } 137 }
138 } 138 }
139 139
140 class PlaceholderCollector extends AbstractVisitor { 140 class PlaceholderCollector extends Visitor {
141 final Compiler compiler; 141 final Compiler compiler;
142 final Set<String> fixedMemberNames; // member names which cannot be renamed. 142 final Set<String> fixedMemberNames; // member names which cannot be renamed.
143 final Map<Element, ElementAst> elementAsts; 143 final Map<Element, ElementAst> elementAsts;
144 final Set<Node> nullNodes; // Nodes that should not be in output. 144 final Set<Node> nullNodes; // Nodes that should not be in output.
145 final Set<Identifier> unresolvedNodes; 145 final Set<Identifier> unresolvedNodes;
146 final Map<Element, Set<Node>> elementNodes; 146 final Map<Element, Set<Node>> elementNodes;
147 final Map<FunctionElement, FunctionScope> functionScopes; 147 final Map<FunctionElement, FunctionScope> functionScopes;
148 final Map<LibraryElement, Set<Identifier>> privateNodes; 148 final Map<LibraryElement, Set<Identifier>> privateNodes;
149 final List<DeclarationTypePlaceholder> declarationTypePlaceholders; 149 final List<DeclarationTypePlaceholder> declarationTypePlaceholders;
150 final Map<String, Set<Identifier>> memberPlaceholders; 150 final Map<String, Set<Identifier>> memberPlaceholders;
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 603
604 visitBlock(Block node) { 604 visitBlock(Block node) {
605 for (Node statement in node.statements.nodes) { 605 for (Node statement in node.statements.nodes) {
606 if (statement is VariableDefinitions) { 606 if (statement is VariableDefinitions) {
607 makeVarDeclarationTypePlaceholder(statement); 607 makeVarDeclarationTypePlaceholder(statement);
608 } 608 }
609 } 609 }
610 node.visitChildren(this); 610 node.visitChildren(this);
611 } 611 }
612 } 612 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/dart_backend/backend.dart ('k') | dart/lib/compiler/implementation/resolved_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698