| Index: pkg/compiler/lib/src/universe/universe.dart
|
| diff --git a/pkg/compiler/lib/src/universe/universe.dart b/pkg/compiler/lib/src/universe/universe.dart
|
| index 712b870408a4238867c9f677ddb8514f52f9359a..c1ad13fc1cd8fdc31f2862a321c4bf915ead235d 100644
|
| --- a/pkg/compiler/lib/src/universe/universe.dart
|
| +++ b/pkg/compiler/lib/src/universe/universe.dart
|
| @@ -37,6 +37,11 @@ class Universe {
|
| /// Invariant: Elements are declaration elements.
|
| final Set<ClassElement> _allInstantiatedClasses = new Set<ClassElement>();
|
|
|
| + /// The set of all referenced static fields.
|
| + ///
|
| + /// Invariant: Elements are declaration elements.
|
| + final Set<FieldElement> allReferencedStaticFields = new Set<FieldElement>();
|
| +
|
| /**
|
| * Documentation wanted -- johnniwinther
|
| *
|
| @@ -185,6 +190,13 @@ class Universe {
|
| return type;
|
| }
|
|
|
| + void registerStaticFieldUse(FieldElement staticField) {
|
| + assert(Elements.isStaticOrTopLevel(staticField) && staticField.isField);
|
| + assert(staticField.isDeclaration);
|
| +
|
| + allReferencedStaticFields.add(staticField);
|
| + }
|
| +
|
| void forgetElement(Element element, Compiler compiler) {
|
| allClosures.remove(element);
|
| slowDirectlyNestedClosures(element).forEach(compiler.forgetElement);
|
|
|