OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library dart2js.serialization_test; | 5 library dart2js.serialization_test; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 import '../memory_compiler.dart'; | 8 import '../memory_compiler.dart'; |
9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
10 import 'package:compiler/src/commandline_options.dart'; | 10 import 'package:compiler/src/commandline_options.dart'; |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 | 473 |
474 List<ConstructorElement> getConstructors(ClassElement cls) { | 474 List<ConstructorElement> getConstructors(ClassElement cls) { |
475 return cls.implementation.constructors.map((c) => c.declaration).toList(); | 475 return cls.implementation.constructors.map((c) => c.declaration).toList(); |
476 } | 476 } |
477 | 477 |
478 checkElementLists( | 478 checkElementLists( |
479 element1, element2, 'constructors', | 479 element1, element2, 'constructors', |
480 getConstructors(element1), | 480 getConstructors(element1), |
481 getConstructors(element2)); | 481 getConstructors(element2)); |
482 | 482 |
| 483 checkElementIdentities(element1, element2, 'defaultConstructor', |
| 484 element1.lookupDefaultConstructor(), |
| 485 element2.lookupDefaultConstructor()); |
| 486 |
483 visitMembers(element1, element2); | 487 visitMembers(element1, element2); |
484 | 488 |
485 ClassElement superclass1 = element1.superclass; | 489 ClassElement superclass1 = element1.superclass; |
486 ClassElement superclass2 = element2.superclass; | 490 ClassElement superclass2 = element2.superclass; |
487 while (superclass1 != null && superclass1.isMixinApplication) { | 491 while (superclass1 != null && superclass1.isMixinApplication) { |
488 checkElementProperties(element1, element2, 'supermixin', | 492 checkElementProperties(element1, element2, 'supermixin', |
489 superclass1, superclass2); | 493 superclass1, superclass2); |
490 superclass1 = superclass1.superclass; | 494 superclass1 = superclass1.superclass; |
491 superclass2 = superclass2.superclass; | 495 superclass2 = superclass2.superclass; |
492 } | 496 } |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 void visitPrefixElement(PrefixElement element1, PrefixElement element2) { | 764 void visitPrefixElement(PrefixElement element1, PrefixElement element2) { |
761 check( | 765 check( |
762 element1, element2, 'isDeferred', | 766 element1, element2, 'isDeferred', |
763 element1.isDeferred, element2.isDeferred); | 767 element1.isDeferred, element2.isDeferred); |
764 checkElementIdentities( | 768 checkElementIdentities( |
765 element1, element2, 'importedLibrary', | 769 element1, element2, 'importedLibrary', |
766 element1.deferredImport, element2.deferredImport); | 770 element1.deferredImport, element2.deferredImport); |
767 // TODO(johnniwinther): Check members. | 771 // TODO(johnniwinther): Check members. |
768 } | 772 } |
769 } | 773 } |
OLD | NEW |