Chromium Code Reviews
DescriptionFix JS-backend when MirrorsUsed target a static field, but there is no mirrors usage.
r31964 (https://codereview.chromium.org/141753002) ensures that type-declarations are resolved, but that wasn't the case for static fields that weren't referenced except through "MirrorsUsed". Dart2Js didn't resolve or compile the static, but then tried to emit its getters/setters (which ended up calling the "_resolveTypeDeclaration" in members.dart).
With this patch we always enqueue static variables that are referenced by MirrorsUsed. If the user doesn't use mirrors it will increase the code-size (slightly) but that should be a rare case.
R=johnniwinther@google.com, kasperl@google.com
Committed: https://code.google.com/p/dart/source/detail?r=32159
Patch Set 1 #Patch Set 2 : Use more common variable names. #Patch Set 3 : Deal with libraries and classes in MirrorsUsed. #Patch Set 4 : One more test. #
Total comments: 1
Patch Set 5 : Fix testing framework. #
Total comments: 8
Patch Set 6 : Add another test. #Patch Set 7 : Update copyright year. #
Total comments: 4
Patch Set 8 : Address comments. #
Total comments: 2
Patch Set 9 : Extract function that finds static field targets. #Messages
Total messages: 12 (0 generated)
|