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

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

Issue 374413002: Dart2dart rename unresolved getters & Make IsCheck not be a primitive (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 collector.tryMakeLocalPlaceholder(element, node.selector); 75 collector.tryMakeLocalPlaceholder(element, node.selector);
76 } 76 }
77 } 77 }
78 78
79 visitGetterSend(Send node) { 79 visitGetterSend(Send node) {
80 final element = elements[node]; 80 final element = elements[node];
81 // element == null means dynamic property access. 81 // element == null means dynamic property access.
82 if (element == null) { 82 if (element == null) {
83 collector.tryMakeMemberPlaceholder(node.selector); 83 collector.tryMakeMemberPlaceholder(node.selector);
84 } else if (element.isErroneous) { 84 } else if (element.isErroneous) {
85 collector.makeUnresolvedPlaceholder(node);
85 return; 86 return;
86 } else if (element.isPrefix) { 87 } else if (element.isPrefix) {
87 // Node is prefix part in case of source 'lib.somesetter = 5;' 88 // Node is prefix part in case of source 'lib.somesetter = 5;'
88 collector.makeNullPlaceholder(node); 89 collector.makeNullPlaceholder(node);
89 } else if (Elements.isStaticOrTopLevel(element)) { 90 } else if (Elements.isStaticOrTopLevel(element)) {
90 // Unqualified or prefixed top level or static. 91 // Unqualified or prefixed top level or static.
91 collector.makeElementPlaceholder(node.selector, element); 92 collector.makeElementPlaceholder(node.selector, element);
92 } else if (!element.isTopLevel) { 93 } else if (!element.isTopLevel) {
93 if (element.isInstanceMember) { 94 if (element.isInstanceMember) {
94 collector.tryMakeMemberPlaceholder(node.selector); 95 collector.tryMakeMemberPlaceholder(node.selector);
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 601
601 visitBlock(Block node) { 602 visitBlock(Block node) {
602 for (Node statement in node.statements.nodes) { 603 for (Node statement in node.statements.nodes) {
603 if (statement is VariableDefinitions) { 604 if (statement is VariableDefinitions) {
604 makeVarDeclarationTypePlaceholder(statement); 605 makeVarDeclarationTypePlaceholder(statement);
605 } 606 }
606 } 607 }
607 node.visitChildren(this); 608 node.visitChildren(this);
608 } 609 }
609 } 610 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698