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

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

Issue 21339002: Rename MirrorSystem.getName calls in dart2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments and added tests. Created 7 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
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 collector.tryMakeLocalPlaceholder(element, node.selector); 99 collector.tryMakeLocalPlaceholder(element, node.selector);
100 } else { 100 } else {
101 assert(node.selector is FunctionExpression); 101 assert(node.selector is FunctionExpression);
102 } 102 }
103 } 103 }
104 } 104 }
105 } 105 }
106 106
107 visitStaticSend(Send node) { 107 visitStaticSend(Send node) {
108 final element = elements[node]; 108 final element = elements[node];
109 compiler.backend.registerStaticSend(element, node);
ahe 2013/08/06 15:53:36 Since this is already place in a backend, I don't
zarah 2013/08/08 12:17:10 Done.
110
109 if (Elements.isUnresolved(element) 111 if (Elements.isUnresolved(element)
110 || identical(element, compiler.assertMethod)) { 112 || identical(element, compiler.assertMethod)) {
111 return; 113 return;
112 } 114 }
113 if (element.isConstructor() || element.isFactoryConstructor()) { 115 if (element.isConstructor() || element.isFactoryConstructor()) {
114 // Rename named constructor in redirection position: 116 // Rename named constructor in redirection position:
115 // class C { C.named(); C.redirecting() : this.named(); } 117 // class C { C.named(); C.redirecting() : this.named(); }
116 if (node.receiver is Identifier 118 if (node.receiver is Identifier
117 && node.receiver.asIdentifier().isThis()) { 119 && node.receiver.asIdentifier().isThis()) {
118 assert(node.selector is Identifier); 120 assert(node.selector is Identifier);
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 617
616 visitBlock(Block node) { 618 visitBlock(Block node) {
617 for (Node statement in node.statements.nodes) { 619 for (Node statement in node.statements.nodes) {
618 if (statement is VariableDefinitions) { 620 if (statement is VariableDefinitions) {
619 makeVarDeclarationTypePlaceholder(statement); 621 makeVarDeclarationTypePlaceholder(statement);
620 } 622 }
621 } 623 }
622 node.visitChildren(this); 624 node.visitChildren(this);
623 } 625 }
624 } 626 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698