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

Unified Diff: pkg/compiler/lib/src/serialization/equivalence.dart

Issue 2060183002: Serialize metadata (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 4 years, 6 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/equivalence.dart
diff --git a/pkg/compiler/lib/src/serialization/equivalence.dart b/pkg/compiler/lib/src/serialization/equivalence.dart
index a1f341c02416191407e997c846affb12e9431567..a7c08b5b09fa95dafee95b2d4cd5d46c57490695 100644
--- a/pkg/compiler/lib/src/serialization/equivalence.dart
+++ b/pkg/compiler/lib/src/serialization/equivalence.dart
@@ -1832,3 +1832,12 @@ class NodeEquivalenceVisitor implements Visitor1<bool, Node> {
throw new UnsupportedError('Unexpected nodes: $node1 <> $node2');
}
}
+
+bool areMetadataAnnotationsEquivalent(
+ MetadataAnnotation metadata1, MetadataAnnotation metadata2) {
+ if (metadata1 == metadata2) return true;
+ if (metadata1 == null || metadata2 == null) return false;
+ return areElementsEquivalent(
+ metadata1.annotatedElement, metadata2.annotatedElement) &&
+ areConstantsEquivalent(metadata1.constant, metadata2.constant);
+}
« no previous file with comments | « pkg/compiler/lib/src/serialization/element_serialization.dart ('k') | pkg/compiler/lib/src/serialization/keys.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698