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

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

Issue 10828250: Support for generic type variables and unresolved types added. (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
Index: lib/compiler/implementation/dart_backend/renamer.dart
diff --git a/lib/compiler/implementation/dart_backend/renamer.dart b/lib/compiler/implementation/dart_backend/renamer.dart
index 684a212cea9b2a7edc5dc18e5c2a778c89fdeff9..70c5d4e0c6a07dd3b5a9452c2a63320f40d0f304 100644
--- a/lib/compiler/implementation/dart_backend/renamer.dart
+++ b/lib/compiler/implementation/dart_backend/renamer.dart
@@ -35,16 +35,16 @@ class ConflictingRenamer {
String renamePrivateIdentifier(LibraryElement library, String id) =>
getName(library, id, () => '_${privateNameCounter++}${id}');
+ String generateUniqueName(name) {
+ while (usedTopLevelIdentifiers.contains(name)) name = 'p_$name';
+ usedTopLevelIdentifiers.add(name);
+ return name;
+ }
+
String renameElement(Element element) {
assert(element.isTopLevel());
// TODO(smok): Make sure that the new name does not conflict with existing
// local identifiers.
- generateUniqueName(name) {
- while (usedTopLevelIdentifiers.contains(name)) name = 'p_$name';
- usedTopLevelIdentifiers.add(name);
- return name;
- }
-
String originalName = element.name.slowToString();
LibraryElement library = element.getLibrary();
if (library === compiler.coreLibrary) return originalName;

Powered by Google App Engine
This is Rietveld 408576698