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

Unified Diff: sdk/lib/_internal/compiler/implementation/enqueue.dart

Issue 12299006: Start tracking all registered elements in one big full function set (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Register fields. Created 7 years, 10 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 | sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/enqueue.dart
diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart
index 55895480aa5a3cc4626612e512e5aeb3ae72b918..9d0ab9b313b6811253ce85a3385f3c4fc1fe6cec 100644
--- a/sdk/lib/_internal/compiler/implementation/enqueue.dart
+++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart
@@ -120,9 +120,12 @@ abstract class Enqueuer {
if (isProcessed(member)) return;
if (!member.isInstanceMember()) return;
if (member.isField()) {
- // Native fields need to go into instanceMembersByName as they are virtual
- // instantiation points and escape points.
- // Test the enclosing class, since the metadata has not been parsed yet.
+ // Fields are implicitly used by the constructor of the
+ // instantiated class they are part of.
+ compiler.world.registerUsedElement(member);
+ // Native fields need to go into instanceMembersByName as they
+ // are virtual instantiation points and escape points. Test the
+ // enclosing class, since the metadata has not been parsed yet.
if (!member.enclosingElement.isNative()) return;
}
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698