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 8db5c4bede2fa7c1552477b06f50802af58745e6..cd73ae97cdaba0c83069ba96fe75b6e92f86f5c0 100644 |
--- a/pkg/compiler/lib/src/serialization/system.dart |
+++ b/pkg/compiler/lib/src/serialization/system.dart |
@@ -28,43 +28,39 @@ import 'task.dart'; |
class DeserializerSystemImpl extends DeserializerSystem { |
final Compiler _compiler; |
- final Deserializer _deserializer; |
+ final DeserializationContext deserializationContext; |
final List<LibraryElement> deserializedLibraries = <LibraryElement>[]; |
final ResolutionImpactDeserializer _resolutionImpactDeserializer; |
final ResolvedAstDeserializerPlugin _resolvedAstDeserializer; |
final ImpactTransformer _impactTransformer; |
- factory DeserializerSystemImpl(Compiler compiler, Deserializer deserializer, |
- ImpactTransformer impactTransformer) { |
- List<DeserializerPlugin> plugins = <DeserializerPlugin>[]; |
+ factory DeserializerSystemImpl( |
+ Compiler compiler, ImpactTransformer impactTransformer) { |
+ DeserializationContext context = new DeserializationContext(); |
DeserializerPlugin backendDeserializer = |
compiler.backend.serialization.deserializer; |
- deserializer.plugins.add(backendDeserializer); |
+ context.plugins.add(backendDeserializer); |
ResolutionImpactDeserializer resolutionImpactDeserializer = |
new ResolutionImpactDeserializer(backendDeserializer); |
- deserializer.plugins.add(resolutionImpactDeserializer); |
+ context.plugins.add(resolutionImpactDeserializer); |
ResolvedAstDeserializerPlugin resolvedAstDeserializer = |
new ResolvedAstDeserializerPlugin( |
compiler.parsingContext, backendDeserializer); |
- deserializer.plugins.add(resolvedAstDeserializer); |
- return new DeserializerSystemImpl._( |
- compiler, |
- deserializer, |
- impactTransformer, |
- resolutionImpactDeserializer, |
- resolvedAstDeserializer); |
+ context.plugins.add(resolvedAstDeserializer); |
+ return new DeserializerSystemImpl._(compiler, context, impactTransformer, |
+ resolutionImpactDeserializer, resolvedAstDeserializer); |
} |
DeserializerSystemImpl._( |
this._compiler, |
- this._deserializer, |
+ this.deserializationContext, |
this._impactTransformer, |
this._resolutionImpactDeserializer, |
this._resolvedAstDeserializer); |
@override |
Future<LibraryElement> readLibrary(Uri resolvedUri) { |
- LibraryElement library = _deserializer.lookupLibrary(resolvedUri); |
+ LibraryElement library = deserializationContext.lookupLibrary(resolvedUri); |
if (library != null) { |
deserializedLibraries.add(library); |
return Future.forEach(library.compilationUnits, |