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

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

Issue 10870008: dart2dart Rename statics as globals. (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 b00517bc75164b126c3079d7bcb8de476623ea60..f6d88926972dfabc95039eed02fa0526de7fba4b 100644
--- a/lib/compiler/implementation/dart_backend/renamer.dart
+++ b/lib/compiler/implementation/dart_backend/renamer.dart
@@ -32,9 +32,11 @@ void renamePlaceholders(
.putIfAbsent(originalName, () => generateUniqueName(originalName));
String renameElement(Element element) {
- assert(element.isTopLevel() || element is TypeVariableElement);
+ assert(Elements.isStaticOrTopLevel(element)
+ || element is TypeVariableElement);
// TODO(smok): Make sure that the new name does not conflict with existing
// local identifiers.
+ // TODO(smok): We may want to reuse class static field and method names.
String originalName = element.name.slowToString();
LibraryElement library = element.getLibrary();
if (isDartCoreLib(compiler, library)) {
« no previous file with comments | « lib/compiler/implementation/dart_backend/placeholder_collector.dart ('k') | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698