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

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

Issue 1950243002: Do not evaluate on-demand to prevent breaking the deferred loading task (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: also run dartfmt 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b75a6ab1fe50550f63fa98ef4349ee362595f453..6141447892f5802c8efe4f4af2bbd0affa5ab5a7 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -339,11 +339,14 @@ class DeferredLoadTask extends CompilerTask {
treeElements
.forEachConstantNode((Node node, ConstantExpression expression) {
// Explicitly depend on the backend constants.
- ConstantValue value = backend.constants.getConstantValue(expression);
- assert(invariant(node, value != null,
- message:
- "No constant value for ${expression.toStructuredText()}."));
- constants.add(value);
+ ConstantValue value;
+ value = backend.constants.getConstantValue(expression);
+ // TODO(johnniwinther): ensure `value` is not null or use directly the
+ // expression to calculate dependencies. See dartbug.com/26406 for
+ // context.
+ if (value != null) {
+ constants.add(value);
+ }
});
}
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698