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

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: Add test and narrow eager resolution 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..4ec0052f101835d0fb02b83825186f8e760febc9 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -736,6 +736,20 @@ 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.
kasperl 2013/10/18 08:53:07 Maybe update the comment so it's clear where we de
Johnni Winther 2013/10/18 09:09:00 Done.
+ // 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);
+ }
+ });
+ }
+ });
+
kasperl 2013/10/18 08:53:07 Remove newline.
Johnni Winther 2013/10/18 09:09:00 Done.
}
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