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

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

Issue 2034973003: Handle deferred access of unserialized code. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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
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 18e85adfe2095ba5700e8b2dc03286d757c2d4cf..0f4f8d74eefbb56c0e34a9ee46dfdd154b1785de 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -349,6 +349,13 @@ class DeferredLoadTask extends CompilerTask {
// See dartbug.com/26406 for context.
treeElements
.forEachConstantNode((Node node, ConstantExpression expression) {
+ if (compiler.serialization.isDeserialized(analyzableElement)) {
+ if (!expression.isImplicit && !expression.isPotential) {
+ // Enforce evaluation of [expression].
+ backend.constants.getConstantValue(expression);
+ }
+ }
+
// Explicitly depend on the backend constants.
if (backend.constants.hasConstantValue(expression)) {
ConstantValue value =
« no previous file with comments | « pkg/compiler/lib/src/constants/expressions.dart ('k') | pkg/compiler/lib/src/js_backend/type_variable_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698