Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart |
| index 7a809b704837a6196034428490b1419483c962a2..b01c29b76d51fc6b4c016c6bbd3f26b9ee3486b5 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart |
| @@ -1534,6 +1534,13 @@ class JavaScriptBackend extends Backend { |
| if (metaTargets != null) metaTargetsUsed.addAll(metaTargets); |
| } |
| + /// Returns `true` if [element] can be accessed through reflection, that is, |
| + /// is in the set of elements covered by a `MirrorsUsed` annotation. |
| + bool isAccessibleByReflection(Element element) { |
|
ahe
2013/08/26 20:41:15
I'm not sure this method is different from isNeede
|
| + if (hasInsufficientMirrorsUsed) return true; |
| + return isNeededForReflection(element); |
| + } |
| + |
| bool isNeededForReflection(Element element) { |
| if (hasInsufficientMirrorsUsed) return isTreeShakingDisabled; |
| /// Record the name of [element] in [symbolsUsed]. Return true for |