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

Side by Side Diff: pkg/compiler/lib/src/serialization/equivalence.dart

Issue 2897903003: Support loading binary data in dart2js (Closed)
Patch Set: Updated cf. comments Created 3 years, 7 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/resolution.dart'; 10 import '../common/resolution.dart';
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 @override 464 @override
465 bool visitLibraryElement(LibraryElement element1, LibraryElement element2) { 465 bool visitLibraryElement(LibraryElement element1, LibraryElement element2) {
466 return strategy.test(element1, element2, 'canonicalUri', 466 return strategy.test(element1, element2, 'canonicalUri',
467 element1.canonicalUri, element2.canonicalUri); 467 element1.canonicalUri, element2.canonicalUri);
468 } 468 }
469 469
470 @override 470 @override
471 bool visitCompilationUnitElement( 471 bool visitCompilationUnitElement(
472 CompilationUnitElement element1, CompilationUnitElement element2) { 472 CompilationUnitElement element1, CompilationUnitElement element2) {
473 return strategy.test( 473 return strategy.test(element1, element2, 'script.resourceUri',
474 element1, element2, 'name', element1.name, element2.name) &&
475 strategy.test(element1, element2, 'script.resourceUri',
476 element1.script.resourceUri, element2.script.resourceUri) && 474 element1.script.resourceUri, element2.script.resourceUri) &&
477 visit(element1.library, element2.library); 475 visit(element1.library, element2.library);
478 } 476 }
479 477
480 @override 478 @override
481 bool visitClassElement(ClassElement element1, ClassElement element2) { 479 bool visitClassElement(ClassElement element1, ClassElement element2) {
482 if (!strategy.test( 480 if (!strategy.test(
483 element1, 481 element1,
484 element2, 482 element2,
485 'isUnnamedMixinApplication', 483 'isUnnamedMixinApplication',
(...skipping 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after
2136 } 2134 }
2137 2135
2138 bool areMetadataAnnotationsEquivalent( 2136 bool areMetadataAnnotationsEquivalent(
2139 MetadataAnnotation metadata1, MetadataAnnotation metadata2) { 2137 MetadataAnnotation metadata1, MetadataAnnotation metadata2) {
2140 if (metadata1 == metadata2) return true; 2138 if (metadata1 == metadata2) return true;
2141 if (metadata1 == null || metadata2 == null) return false; 2139 if (metadata1 == null || metadata2 == null) return false;
2142 return areElementsEquivalent( 2140 return areElementsEquivalent(
2143 metadata1.annotatedElement, metadata2.annotatedElement) && 2141 metadata1.annotatedElement, metadata2.annotatedElement) &&
2144 areConstantsEquivalent(metadata1.constant, metadata2.constant); 2142 areConstantsEquivalent(metadata1.constant, metadata2.constant);
2145 } 2143 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/platform_configuration.dart ('k') | pkg/compiler/lib/src/source_file_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698