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

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

Issue 11033016: Added TODO. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 CloningVisitor implements Visitor<Node> { 5 class CloningVisitor implements Visitor<Node> {
6 final TreeElements originalTreeElements; 6 final TreeElements originalTreeElements;
7 final TreeElements cloneTreeElements; 7 final TreeElementMapping cloneTreeElements;
8 8
9 CloningVisitor(this.originalTreeElements) 9 CloningVisitor(this.originalTreeElements)
10 : cloneTreeElements = new TreeElementMapping(); 10 : cloneTreeElements = new TreeElementMapping();
11 11
12 visit(Node node) { 12 visit(Node node) {
13 if (node === null) return null; 13 if (node === null) return null;
14 final clone = node.accept(this); 14 final clone = node.accept(this);
15 final originalElement = originalTreeElements[node]; 15 final originalElement = originalTreeElements[node];
16 if (originalElement !== null) { 16 if (originalElement !== null) {
17 cloneTreeElements[clone] = originalElement; 17 cloneTreeElements[clone] = originalElement;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 visitTypeVariable(TypeVariable node) => new TypeVariable( 201 visitTypeVariable(TypeVariable node) => new TypeVariable(
202 visit(node.name), visit(node.bound)); 202 visit(node.name), visit(node.bound));
203 203
204 visitVariableDefinitions(VariableDefinitions node) => new VariableDefinitions( 204 visitVariableDefinitions(VariableDefinitions node) => new VariableDefinitions(
205 visit(node.type), visit(node.modifiers), visit(node.definitions), 205 visit(node.type), visit(node.modifiers), visit(node.definitions),
206 node.endToken); 206 node.endToken);
207 207
208 visitWhile(While node) => new While( 208 visitWhile(While node) => new While(
209 visit(node.condition), visit(node.body), node.whileKeyword); 209 visit(node.condition), visit(node.body), node.whileKeyword);
210 } 210 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/constants.dart ('k') | lib/compiler/implementation/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698