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

Unified Diff: pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart

Issue 2024873002: Compute non-final static fields without the constant compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 36bd7685b5d775a19384dd664d992b539edb4680..6077e6d0579633df18e7acdbcf92b904f48d2159 100644
--- a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
@@ -146,21 +146,6 @@ class JavaScriptConstantCompiler extends ConstantCompilerBase
compiledConstants.add(constant);
}
- /**
- * Returns an [Iterable] of static non final fields that need to be
- * initialized. The fields list must be evaluated in order since they might
- * depend on each other.
- */
- Iterable<VariableElement> getStaticNonFinalFieldsForEmission() {
- return initialVariableValues.keys.where((element) {
- return element.kind == ElementKind.FIELD &&
- !element.isInstanceMember &&
- !element.modifiers.isFinal &&
- // The const fields are all either emitted elsewhere or inlined.
- !element.modifiers.isConst;
- });
- }
-
List<VariableElement> getLazilyInitializedFieldsForEmission() {
return new List<VariableElement>.from(lazyStatics);
}
@@ -194,15 +179,6 @@ class JavaScriptConstantCompiler extends ConstantCompilerBase
return result;
}
- ConstantValue getInitialValueFor(VariableElement element) {
- ConstantExpression initialValue =
- initialVariableValues[element.declaration];
- if (initialValue == null) {
- reporter.internalError(element, "No initial value for given element.");
- }
- return getConstantValue(initialValue);
- }
-
ConstantExpression compileNode(Node node, TreeElements elements,
{bool enforceConst: true}) {
return compileNodeWithDefinitions(node, elements, isConst: enforceConst);
« no previous file with comments | « pkg/compiler/lib/src/compile_time_constants.dart ('k') | pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698