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

Unified Diff: pkg/compiler/lib/src/serialization/serialization.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
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 95153fdc6cfda22b331a346dc4110de4d0ce0d4b..0a7ca1eaf095fba7cf258aa0b3045deb67175312 100644
--- a/pkg/compiler/lib/src/serialization/serialization.dart
+++ b/pkg/compiler/lib/src/serialization/serialization.dart
@@ -857,6 +857,9 @@ class SerializerPlugin {
/// Use [creatorEncoder] to create a data object with id [tag] for storing
/// additional data for [element].
void onElement(Element element, ObjectEncoder createEncoder(String tag)) {}
+
+ /// Called to serialize custom [data].
+ void onData(var data, ObjectEncoder encoder) {}
}
/// Plugin for deserializing additional data for an [Element].
@@ -868,6 +871,9 @@ class DeserializerPlugin {
/// Use [getDecoder] to retrieve the data object with id [tag] stored for
/// [element]. If not object is stored for [tag], [getDecoder] returns `null`.
void onElement(Element element, ObjectDecoder getDecoder(String tag)) {}
+
+ /// Called to deserialize custom data from [decoder].
+ dynamic onData(ObjectDecoder decoder);
}
/// Context for parallel deserialization.
« no previous file with comments | « pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698