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

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

Issue 2938193003: Revert "Towards compiling Hello World!" and "Compile and run Hello World!" (Closed)
Patch Set: 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 b9d53cd4140425ecc2203e4c2247c079b89e8100..260b23ac322d265251876f7ba44c382db99f94d3 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<ClassEntity> computeInterceptorsReferencedFromConstants() {
- Set<ClassEntity> classes = new Set<ClassEntity>();
+ Set<ClassElement> computeInterceptorsReferencedFromConstants() {
+ Set<ClassElement> classes = new Set<ClassElement>();
List<ConstantValue> constants = _worldBuilder.getConstantsForEmission();
for (ConstantValue constant in constants) {
if (constant is InterceptorConstantValue) {
@@ -321,10 +321,12 @@ class Collector {
Iterable<FieldEntity> fields =
// TODO(johnniwinther): This should be accessed from a codegen closed
// world.
- _worldBuilder.allReferencedStaticFields.where((FieldEntity field) {
+ _worldBuilder.allReferencedStaticFields.where((FieldElement field) {
if (!field.isConst) {
- return field.isAssignable &&
- _worldBuilder.hasConstantFieldInitializer(field);
+ return field.isField &&
+ !field.isInstanceMember &&
+ !field.isFinal &&
+ field.constant != null;
} else {
// We also need to emit static const fields if they are available for
// reflection.

Powered by Google App Engine
This is Rietveld 408576698