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

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

Issue 2110323003: Support serialization of loadLibrary (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: dartfmt Created 4 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/serialization/modelz.dart
diff --git a/pkg/compiler/lib/src/serialization/modelz.dart b/pkg/compiler/lib/src/serialization/modelz.dart
index c909f9acf56e4b26405ae9635102f41815c643d6..4c932f3d0dce8b3500a05055462ddac211163152 100644
--- a/pkg/compiler/lib/src/serialization/modelz.dart
+++ b/pkg/compiler/lib/src/serialization/modelz.dart
@@ -458,7 +458,8 @@ class LibraryElementZ extends DeserializedElementZ
void _ensureExports() {
if (_exportsMap == null) {
- _exportsMap = new ListedContainer(_decoder.getElements(Key.EXPORT_SCOPE));
+ _exportsMap = new ListedContainer(
+ _decoder.getElements(Key.EXPORT_SCOPE, isOptional: true));
}
}
@@ -2257,6 +2258,7 @@ class PrefixElementZ extends DeserializedElementZ
implements PrefixElement {
bool _isDeferred;
ImportElement _deferredImport;
+ GetterElement _loadLibrary;
PrefixElementZ(ObjectDecoder decoder) : super(decoder);
@@ -2266,7 +2268,10 @@ class PrefixElementZ extends DeserializedElementZ
void _ensureDeferred() {
if (_isDeferred == null) {
_isDeferred = _decoder.getBool(Key.IS_DEFERRED);
- _deferredImport = _decoder.getElement(Key.IMPORT, isOptional: true);
+ if (_isDeferred) {
+ _deferredImport = _decoder.getElement(Key.IMPORT);
+ _loadLibrary = _decoder.getElement(Key.GETTER);
+ }
}
}
@@ -2283,6 +2288,11 @@ class PrefixElementZ extends DeserializedElementZ
}
@override
+ GetterElement get loadLibrary {
+ return _loadLibrary;
+ }
+
+ @override
ElementKind get kind => ElementKind.PREFIX;
@override

Powered by Google App Engine
This is Rietveld 408576698