Index: pkg/compiler/lib/src/js_emitter/program_builder/collector.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart b/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart |
index 260b23ac322d265251876f7ba44c382db99f94d3..b9d53cd4140425ecc2203e4c2247c079b89e8100 100644 |
--- a/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart |
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart |
@@ -70,8 +70,8 @@ class Collector { |
this._generatedCode, |
this._sorter); |
- Set<ClassElement> computeInterceptorsReferencedFromConstants() { |
- Set<ClassElement> classes = new Set<ClassElement>(); |
+ Set<ClassEntity> computeInterceptorsReferencedFromConstants() { |
+ Set<ClassEntity> classes = new Set<ClassEntity>(); |
List<ConstantValue> constants = _worldBuilder.getConstantsForEmission(); |
for (ConstantValue constant in constants) { |
if (constant is InterceptorConstantValue) { |
@@ -321,12 +321,10 @@ class Collector { |
Iterable<FieldEntity> fields = |
// TODO(johnniwinther): This should be accessed from a codegen closed |
// world. |
- _worldBuilder.allReferencedStaticFields.where((FieldElement field) { |
+ _worldBuilder.allReferencedStaticFields.where((FieldEntity field) { |
if (!field.isConst) { |
- return field.isField && |
- !field.isInstanceMember && |
- !field.isFinal && |
- field.constant != null; |
+ return field.isAssignable && |
+ _worldBuilder.hasConstantFieldInitializer(field); |
} else { |
// We also need to emit static const fields if they are available for |
// reflection. |