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

Unified Diff: pkg/compiler/lib/src/js_emitter/program_builder/collector.dart

Issue 2939033002: Towards compiling Hello World! (Closed)
Patch Set: Fix parameter ordering Created 3 years, 6 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
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.

Powered by Google App Engine
This is Rietveld 408576698