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

Unified Diff: pkg/compiler/lib/src/serialization/system.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 | « pkg/compiler/lib/src/serialization/serialization.dart ('k') | pkg/compiler/lib/src/serialization/task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « pkg/compiler/lib/src/serialization/serialization.dart ('k') | pkg/compiler/lib/src/serialization/task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698