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

Unified Diff: pkg/compiler/lib/src/js_backend/constant_handler_javascript.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_backend/constant_handler_javascript.dart
diff --git a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
index 284146755742d255563266ccbac642cedc7e08db..953a30c5ea31e9a0f9067c6057df26a90226b2c5 100644
--- a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
@@ -8,7 +8,6 @@ import '../constants/constant_system.dart';
import '../constants/expressions.dart';
import '../constants/values.dart';
import '../elements/elements.dart';
-import '../elements/entities.dart';
import '../elements/visitor.dart' show BaseElementVisitor;
import '../resolution/tree_elements.dart' show TreeElements;
import '../tree/tree.dart';
@@ -116,7 +115,7 @@ class JavaScriptConstantCompiler extends ConstantCompilerBase
implements BackendConstantEnvironment {
// TODO(johnniwinther): Move this to the backend constant handler.
/** Caches the statics where the initial value cannot be eagerly compiled. */
- final Set<FieldEntity> lazyStatics = new Set<FieldEntity>();
+ final Set<FieldElement> lazyStatics = new Set<FieldElement>();
// Constants computed for constant expressions.
final Map<Node, ConstantExpression> nodeConstantMap =
@@ -141,19 +140,18 @@ class JavaScriptConstantCompiler extends ConstantCompilerBase
element, definitions,
isConst: isConst, checkType: checkType);
if (!isConst && value == null) {
- FieldElement field = element;
- registerLazyStatic(field);
+ registerLazyStatic(element);
}
return value;
}
@override
- void registerLazyStatic(FieldEntity element) {
+ void registerLazyStatic(FieldElement element) {
lazyStatics.add(element);
}
- List<FieldEntity> getLazilyInitializedFieldsForEmission() {
- return new List<FieldEntity>.from(lazyStatics);
+ List<FieldElement> getLazilyInitializedFieldsForEmission() {
+ return new List<FieldElement>.from(lazyStatics);
}
ConstantExpression compileNode(Node node, TreeElements elements,
« no previous file with comments | « pkg/compiler/lib/src/js_backend/constant_emitter.dart ('k') | pkg/compiler/lib/src/js_backend/element_strategy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698