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

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

Issue 10824329: dart2dart properly collect top level fields (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 | tests/compiler/dart2js/unparser_test.dart » ('j') | tests/compiler/dart2js/unparser_test.dart » ('J')
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 76bc31d41b60119eea82f51abc3bd068d5f78e0e..8ce0648b81d9e257b9f0ab4ba7c168ee7f9d2dcd 100644
--- a/lib/compiler/implementation/dart_backend/placeholder_collector.dart
+++ b/lib/compiler/implementation/dart_backend/placeholder_collector.dart
@@ -175,6 +175,15 @@ class PlaceholderCollector extends AbstractVisitor {
internalError('Unreachable case');
}
}
+ } else if (element.isTopLevel()) {
+ Node fieldNode = element.parseNode(compiler);
+ if (fieldNode is Identifier) {
+ makeElementPlaceholder(fieldNode, element);
+ } else if (fieldNode is SendSet) {
+ makeElementPlaceholder(fieldNode.selector, element);
+ } else {
+ assert(false); // Unreachable.
Anton Muhin 2012/08/16 11:05:48 nit: internalError, please
Roman 2012/08/16 11:46:09 Done.
+ }
}
}
« no previous file with comments | « no previous file | tests/compiler/dart2js/unparser_test.dart » ('j') | tests/compiler/dart2js/unparser_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698