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

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

Issue 2007573002: Support multiple serialization sources in DeserializerSystemImpl. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix test. 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/serialization/system.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/serialization/serialization.dart
diff --git a/pkg/compiler/lib/src/serialization/serialization.dart b/pkg/compiler/lib/src/serialization/serialization.dart
index a16e558eda7fb8ca6e7a8260ffc530a60e275eea..a2f08a77500483c89662693edd3ea3065b1f60cb 100644
--- a/pkg/compiler/lib/src/serialization/serialization.dart
+++ b/pkg/compiler/lib/src/serialization/serialization.dart
@@ -880,6 +880,7 @@ class DeserializerPlugin {
class DeserializationContext {
Map<Uri, LibraryElement> _uriMap = <Uri, LibraryElement>{};
List<Deserializer> deserializers = <Deserializer>[];
+ List<DeserializerPlugin> plugins = <DeserializerPlugin>[];
LibraryElement lookupLibrary(Uri uri) {
return _uriMap.putIfAbsent(uri, () {
@@ -900,7 +901,6 @@ class DeserializationContext {
class Deserializer {
final DeserializationContext context;
final SerializationDecoder decoder;
- List<DeserializerPlugin> plugins = <DeserializerPlugin>[];
ObjectDecoder _headerObject;
ListDecoder _elementList;
ListDecoder _typeList;
@@ -911,7 +911,6 @@ class Deserializer {
Deserializer.fromText(this.context, String text, this.decoder) {
_headerObject = new ObjectDecoder(this, decoder.decode(text));
- context.deserializers.add(this);
}
/// Returns the [ListDecoder] for the [Element]s in this deserializer.
@@ -1000,7 +999,7 @@ class Deserializer {
MapDecoder pluginData = decoder.getMap(Key.DATA, isOptional: true);
// Call plugins even when there is no data, so they can take action in
// this case.
- for (DeserializerPlugin plugin in plugins) {
+ for (DeserializerPlugin plugin in context.plugins) {
plugin.onElement(element,
(String tag) => pluginData?.getObject(tag, isOptional: true));
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/serialization/system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698