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

Unified Diff: tests/compiler/dart2js/serialization_helper.dart

Issue 1896843002: Store and serialize NativeBehavior in TreeElements. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 8 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/universe/side_effects.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « pkg/compiler/lib/src/universe/side_effects.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698