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

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

Issue 10868020: [dart2dart] In renamer only add import prefix for top-level elements. (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 f6d88926972dfabc95039eed02fa0526de7fba4b..959f8d8994c16a1a6b9212754d698a7f79176a5d 100644
--- a/lib/compiler/implementation/dart_backend/renamer.dart
+++ b/lib/compiler/implementation/dart_backend/renamer.dart
@@ -40,6 +40,7 @@ void renamePlaceholders(
String originalName = element.name.slowToString();
LibraryElement library = element.getLibrary();
if (isDartCoreLib(compiler, library)) {
+ assert(element.isTopLevel());
final prefix =
imports.putIfAbsent(library, () => generateUniqueName('p'));
return '$prefix.$originalName';
« 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