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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Functions for asserting equivalence across serialization. 5 /// Functions for asserting equivalence across serialization.
6 6
7 library dart2js.serialization.equivalence; 7 library dart2js.serialization.equivalence;
8 8
9 import '../closure.dart'; 9 import '../closure.dart';
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 1814 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 @override 1825 @override
1826 bool visitStatement(Statement node1, Statement node2) { 1826 bool visitStatement(Statement node1, Statement node2) {
1827 throw new UnsupportedError('Unexpected nodes: $node1 <> $node2'); 1827 throw new UnsupportedError('Unexpected nodes: $node1 <> $node2');
1828 } 1828 }
1829 1829
1830 @override 1830 @override
1831 bool visitStringNode(StringNode node1, StringNode node2) { 1831 bool visitStringNode(StringNode node1, StringNode node2) {
1832 throw new UnsupportedError('Unexpected nodes: $node1 <> $node2'); 1832 throw new UnsupportedError('Unexpected nodes: $node1 <> $node2');
1833 } 1833 }
1834 } 1834 }
1835
1836 bool areMetadataAnnotationsEquivalent(
1837 MetadataAnnotation metadata1, MetadataAnnotation metadata2) {
1838 if (metadata1 == metadata2) return true;
1839 if (metadata1 == null || metadata2 == null) return false;
1840 return areElementsEquivalent(
1841 metadata1.annotatedElement, metadata2.annotatedElement) &&
1842 areConstantsEquivalent(metadata1.constant, metadata2.constant);
1843 }
OLDNEW
« 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