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

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 26800008: Force resolution on metadata of static members (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 2 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/lib/mirrors/static_metatarget_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index 4387ef1168e5dcc830d21f94f599e86cf1123b0e..c14b895f913c259c8f5d0cab67c812e26c154548 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -736,6 +736,21 @@ class ResolverTask extends CompilerTask {
for (MetadataAnnotation metadata in element.metadata) {
metadata.ensureResolved(compiler);
}
+
+ // Force resolution of metadata on non-instance members since they may be
+ // inspected by the backend while emitting. Metadata on instance members is
+ // handled as a result of processing instantiated class members in the
+ // enqueuer.
+ // TODO(ahe): Avoid this eager resolution.
+ element.forEachMember((_, Element member) {
+ if (!member.isInstanceMember()) {
+ compiler.withCurrentElement(member, () {
+ for (MetadataAnnotation metadata in member.metadata) {
+ metadata.ensureResolved(compiler);
+ }
+ });
+ }
+ });
}
void checkClass(ClassElement element) {
« no previous file with comments | « no previous file | tests/lib/mirrors/static_metatarget_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698