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

Unified Diff: lib/compiler/implementation/dart_backend/placeholder_collector.dart

Issue 10837343: Unify private names treatment. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/compiler/implementation/dart_backend/renamer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/dart_backend/placeholder_collector.dart
diff --git a/lib/compiler/implementation/dart_backend/placeholder_collector.dart b/lib/compiler/implementation/dart_backend/placeholder_collector.dart
index ac3a8bff96ca1d805fd015f94c1e13e2cecabaa0..d7ed5d5af021d5d4b19958c92efe7be021e8650c 100644
--- a/lib/compiler/implementation/dart_backend/placeholder_collector.dart
+++ b/lib/compiler/implementation/dart_backend/placeholder_collector.dart
@@ -34,7 +34,7 @@ class SendVisitor extends ResolvedVisitor {
visitGetterSend(Send node) {
final element = elements[node];
// element === null means dynamic property access.
- if (element === null || element.isInstanceMember()) {
+ if (element === null || element.isMember()) {
tryRenamePrivateSelector(node);
return;
}
@@ -296,11 +296,12 @@ class PlaceholderCollector extends AbstractVisitor {
}
visitSendSet(SendSet send) {
+ if (send.selector is Identifier) {
+ tryMakePrivateIdentifier(send.selector.asIdentifier());
+ }
final element = treeElements[send];
if (element !== null) {
- if (element.isInstanceMember()) {
- tryMakePrivateIdentifier(send.selector.asIdentifier());
- } else if (element.isTopLevel()) {
+ if (element.isTopLevel()) {
assert(element is VariableElement || element.isSetter());
makeElementPlaceholder(send.selector, element);
} else {
« no previous file with comments | « no previous file | lib/compiler/implementation/dart_backend/renamer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698