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

Unified Diff: pkg/compiler/lib/src/serialization/system.dart

Issue 2023863002: Register deserialized lazy statics. (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/serialization/system.dart
diff --git a/pkg/compiler/lib/src/serialization/system.dart b/pkg/compiler/lib/src/serialization/system.dart
index 8b54e98d5754d6af2c62bce641f9d0502aff6b15..a3c8464d885d209b265df6047f19d8351d2a215b 100644
--- a/pkg/compiler/lib/src/serialization/system.dart
+++ b/pkg/compiler/lib/src/serialization/system.dart
@@ -129,6 +129,17 @@ class DeserializerSystemImpl extends DeserializerSystem {
if (element is ExecutableElement) {
getResolvedAst(element);
}
+ if (element.isField && !element.isConst) {
+ FieldElement field = element;
+ if (field.isTopLevel || field.isStatic) {
+ if (field.constant == null) {
+ // TODO(johnniwinther): Find a cleaner way to do this. Maybe
Siggi Cherem (dart-lang) 2016/05/31 16:48:11 Is this the first call to register something that
Johnni Winther 2016/06/02 09:25:44 I'll look into it now (I have a solution in mind).
+ // `Feature.LAZY_FIELD` of the resolution impact should be used
+ // instead.
+ _compiler.backend.constants.registerLazyStatic(element);
+ }
+ }
+ }
return _impactTransformer.transformResolutionImpact(resolutionImpact);
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart ('k') | tests/compiler/dart2js/serialization/model_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698