Index: tests/compiler/dart2js/serialization_helper.dart |
diff --git a/tests/compiler/dart2js/serialization_helper.dart b/tests/compiler/dart2js/serialization_helper.dart |
index c191030a0b63e9e4a9e6447ed79bc3ae28b9809f..b1fd8315d3c972879cd97eb3bab06bfed38eec68 100644 |
--- a/tests/compiler/dart2js/serialization_helper.dart |
+++ b/tests/compiler/dart2js/serialization_helper.dart |
@@ -104,7 +104,7 @@ Serializer serialize( |
serializer.plugins.add(new ResolutionImpactSerializer(compiler.resolution)); |
if (serializeResolvedAst) { |
serializer.plugins.add( |
- new ResolvedAstSerializerPlugin(compiler.resolution)); |
+ new ResolvedAstSerializerPlugin(compiler.resolution, compiler.backend)); |
} |
for (LibraryElement library in libraries) { |
@@ -177,7 +177,8 @@ class _DeserializerSystem extends DeserializerSystem { |
: this._compiler = compiler, |
this._deserializeResolvedAst = deserializeResolvedAst, |
this._resolvedAstDeserializer = deserializeResolvedAst |
- ? new ResolvedAstDeserializerPlugin(compiler.parsingContext) : null { |
+ ? new ResolvedAstDeserializerPlugin( |
+ compiler.parsingContext, compiler.backend) : null { |
_deserializer.plugins.add(_resolutionImpactDeserializer); |
if (_deserializeResolvedAst) { |
_deserializer.plugins.add(_resolvedAstDeserializer); |
@@ -246,8 +247,9 @@ const String RESOLVED_AST_TAG = 'resolvedAst'; |
class ResolvedAstSerializerPlugin extends SerializerPlugin { |
final Resolution resolution; |
+ final Backend backend; |
- ResolvedAstSerializerPlugin(this.resolution); |
+ ResolvedAstSerializerPlugin(this.resolution, this.backend); |
@override |
void onElement(Element element, ObjectEncoder createEncoder(String tag)) { |
@@ -258,20 +260,24 @@ class ResolvedAstSerializerPlugin extends SerializerPlugin { |
message: "Element $element must have a resolved ast")); |
ResolvedAst resolvedAst = resolution.getResolvedAst(element); |
ObjectEncoder objectEncoder = createEncoder(RESOLVED_AST_TAG); |
- new ResolvedAstSerializer(objectEncoder, resolvedAst).serialize(); |
+ new ResolvedAstSerializer( |
+ objectEncoder, |
+ resolvedAst, |
+ backend.serialization.serializer).serialize(); |
} |
} |
} |
class ResolvedAstDeserializerPlugin extends DeserializerPlugin { |
final ParsingContext parsingContext; |
+ final Backend backend; |
final Map<Uri, SourceFile> sourceFiles = <Uri, SourceFile>{}; |
Map<Element, ResolvedAst> _resolvedAstMap = <Element, ResolvedAst>{}; |
Map<Element, ObjectDecoder> _decoderMap = <Element, ObjectDecoder>{}; |
Map<Uri, Token> beginTokenMap = <Uri, Token>{}; |
- ResolvedAstDeserializerPlugin(this.parsingContext); |
+ ResolvedAstDeserializerPlugin(this.parsingContext, this.backend); |
bool hasResolvedAst(Element element) { |
return _resolvedAstMap.containsKey(element) || |
@@ -285,7 +291,8 @@ class ResolvedAstDeserializerPlugin extends DeserializerPlugin { |
if (decoder != null) { |
resolvedAst = _resolvedAstMap[element] = |
ResolvedAstDeserializer.deserialize( |
- element, decoder, parsingContext, findToken); |
+ element, decoder, parsingContext, findToken, |
+ backend.serialization.deserializer); |
_decoderMap.remove(element); |
} |
} |