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

Unified Diff: pkg/compiler/lib/src/deferred_load.dart

Issue 1170673002: Begin to compute constant expressions in resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix BinaryConstantExpression.getKnownType Created 5 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/deferred_load.dart
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index 92116b8f77d792fd51a4a55ad9c908c99ccb6a0d..2f0a82c03d64aeecb78214d97c57ec47f5c0fe3b 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -286,8 +286,13 @@ class DeferredLoadTask extends CompilerTask {
}
treeElements.forEachConstantNode((Node node, _) {
// Explicitly depend on the backend constants.
- constants.add(
- backend.constants.getConstantValueForNode(node, treeElements));
+ ConstantValue value =
+ backend.constants.getConstantValueForNode(node, treeElements);
+ if (value != null) {
+ // TODO(johnniwinther): Assert that all constants have values when
+ // these are directly evaluated.
+ constants.add(value);
+ }
});
elements.addAll(treeElements.otherDependencies);
}
« no previous file with comments | « pkg/compiler/lib/src/core_types.dart ('k') | pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698