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

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

Issue 10825445: dart2dart Fix renaming of top-level setters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | tests/compiler/dart2js/unparser_test.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 class LocalPlaceholder implements Hashable { 5 class LocalPlaceholder implements Hashable {
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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 visitSend(Send send) { 296 visitSend(Send send) {
297 new SendVisitor(this, treeElements).visitSend(send); 297 new SendVisitor(this, treeElements).visitSend(send);
298 send.visitChildren(this); 298 send.visitChildren(this);
299 } 299 }
300 300
301 visitSendSet(SendSet send) { 301 visitSendSet(SendSet send) {
302 final element = treeElements[send]; 302 final element = treeElements[send];
303 if (element !== null) { 303 if (element !== null) {
304 if (element.isInstanceMember()) { 304 if (element.isInstanceMember()) {
305 tryMakePrivateIdentifier(send.selector.asIdentifier()); 305 tryMakePrivateIdentifier(send.selector.asIdentifier());
306 } else if (element.isTopLevel()) {
307 assert(element is VariableElement || element.isSetter());
308 makeElementPlaceholder(send.selector, element);
306 } else { 309 } else {
307 assert(send.selector is Identifier); 310 assert(send.selector is Identifier);
308 tryMakeLocalPlaceholder(element, send.selector); 311 tryMakeLocalPlaceholder(element, send.selector);
309 } 312 }
310 } 313 }
311 send.visitChildren(this); 314 send.visitChildren(this);
312 } 315 }
313 316
314 static bool isPlainTypeName(TypeAnnotation typeAnnotation) { 317 static bool isPlainTypeName(TypeAnnotation typeAnnotation) {
315 if (typeAnnotation.typeName is !Identifier) return false; 318 if (typeAnnotation.typeName is !Identifier) return false;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 makeElementPlaceholder(node.name, currentElement); 415 makeElementPlaceholder(node.name, currentElement);
413 node.visitChildren(this); 416 node.visitChildren(this);
414 } 417 }
415 418
416 visitTypedef(Typedef node) { 419 visitTypedef(Typedef node) {
417 assert(currentElement is TypedefElement); 420 assert(currentElement is TypedefElement);
418 makeElementPlaceholder(node.name, currentElement); 421 makeElementPlaceholder(node.name, currentElement);
419 node.visitChildren(this); 422 node.visitChildren(this);
420 } 423 }
421 } 424 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698