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

Side by Side Diff: pkg/compiler/lib/src/dart_backend/placeholder_collector.dart

Issue 1313893004: Move isPrivateName and isPublicName to Name. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 } 373 }
374 elementNodes.putIfAbsent(element, () => new Set<Node>()).add(node); 374 elementNodes.putIfAbsent(element, () => new Set<Node>()).add(node);
375 } 375 }
376 376
377 /// Marks [node] to be renamed per-library if it names an instance member 377 /// Marks [node] to be renamed per-library if it names an instance member
378 /// and has a private name. 378 /// and has a private name.
379 void tryMakePrivateIdentifier(Node node, Element element) { 379 void tryMakePrivateIdentifier(Node node, Element element) {
380 if (node is Identifier && 380 if (node is Identifier &&
381 !Elements.isStaticOrTopLevel(element) && 381 !Elements.isStaticOrTopLevel(element) &&
382 !Elements.isLocal(element) && 382 !Elements.isLocal(element) &&
383 isPrivateName(node.source)) { 383 Name.isPrivateName(node.source)) {
384 privateNodes.putIfAbsent( 384 privateNodes.putIfAbsent(
385 currentElement.library, () => new Set<Identifier>()).add(node); 385 currentElement.library, () => new Set<Identifier>()).add(node);
386 } 386 }
387 } 387 }
388 388
389 void makeUnresolvedPlaceholder(Node node) { 389 void makeUnresolvedPlaceholder(Node node) {
390 unresolvedNodes.add(node); 390 unresolvedNodes.add(node);
391 } 391 }
392 392
393 void makeLocalPlaceholder(Identifier identifier) { 393 void makeLocalPlaceholder(Identifier identifier) {
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 717
718 visitBlock(Block node) { 718 visitBlock(Block node) {
719 for (Node statement in node.statements.nodes) { 719 for (Node statement in node.statements.nodes) {
720 if (statement is VariableDefinitions) { 720 if (statement is VariableDefinitions) {
721 makeVarDeclarationTypePlaceholder(statement); 721 makeVarDeclarationTypePlaceholder(statement);
722 } 722 }
723 } 723 }
724 node.visitChildren(this); 724 node.visitChildren(this);
725 } 725 }
726 } 726 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/dart_backend.dart ('k') | pkg/compiler/lib/src/elements/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698