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

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

Issue 1856953003: Test closed world model after deserialization. (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 unified diff | Download patch
OLDNEW
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 /// Implementation of the element model used for deserialiation. 5 /// Implementation of the element model used for deserialiation.
6 /// 6 ///
7 /// These classes are created by [ElementDeserializer] triggered by the 7 /// These classes are created by [ElementDeserializer] triggered by the
8 /// [Deserializer]. 8 /// [Deserializer].
9 9
10 library dart2js.serialization.modelz; 10 library dart2js.serialization.modelz;
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 FunctionElement asFunctionElement() => this; 740 FunctionElement asFunctionElement() => this;
741 741
742 @override 742 @override
743 bool get isExternal { 743 bool get isExternal {
744 return _decoder.getBool( 744 return _decoder.getBool(
745 Key.IS_EXTERNAL, isOptional: true, defaultValue: false); 745 Key.IS_EXTERNAL, isOptional: true, defaultValue: false);
746 } 746 }
747 } 747 }
748 748
749 abstract class ClassElementMixin implements ElementZ, ClassElement { 749 abstract class ClassElementMixin implements ElementZ, ClassElement {
750
751 InterfaceType _createType(List<DartType> typeArguments) { 750 InterfaceType _createType(List<DartType> typeArguments) {
752 return new InterfaceType(this, typeArguments); 751 return new InterfaceType(this, typeArguments);
753 } 752 }
754 753
755 @override 754 @override
756 ElementKind get kind => ElementKind.CLASS; 755 ElementKind get kind => ElementKind.CLASS;
757 756
758 @override 757 @override
759 void addBackendMember(Element element) => _unsupported('addBackendMember'); 758 void addBackendMember(Element element) => _unsupported('addBackendMember');
760 759
(...skipping 11 matching lines...) Expand all
772 @override 771 @override
773 bool hasFieldShadowedBy(Element fieldMember) => _unsupported(''); 772 bool hasFieldShadowedBy(Element fieldMember) => _unsupported('');
774 773
775 @override 774 @override
776 bool get hasIncompleteHierarchy => _unsupported('hasIncompleteHierarchy'); 775 bool get hasIncompleteHierarchy => _unsupported('hasIncompleteHierarchy');
777 776
778 @override 777 @override
779 bool get hasLocalScopeMembers => _unsupported('hasLocalScopeMembers'); 778 bool get hasLocalScopeMembers => _unsupported('hasLocalScopeMembers');
780 779
781 @override 780 @override
782 bool implementsFunction(CoreClasses coreClasses) {
783 return _unsupported('implementsFunction');
784 }
785
786 @override
787 bool get isEnumClass => false; 781 bool get isEnumClass => false;
788 782
789 @override 783 @override
790 Element lookupBackendMember(String memberName) { 784 Element lookupBackendMember(String memberName) {
791 return _unsupported('lookupBackendMember'); 785 return _unsupported('lookupBackendMember');
792 } 786 }
793 787
794 @override 788 @override
795 ConstructorElement lookupDefaultConstructor() { 789 ConstructorElement lookupDefaultConstructor() {
796 ConstructorElement constructor = lookupConstructor(""); 790 ConstructorElement constructor = lookupConstructor("");
(...skipping 23 matching lines...) Expand all
820 class_members.ClassMemberMixin, 814 class_members.ClassMemberMixin,
821 ContainerMixin, 815 ContainerMixin,
822 LibraryMemberMixin, 816 LibraryMemberMixin,
823 TypeDeclarationMixin<InterfaceType>, 817 TypeDeclarationMixin<InterfaceType>,
824 ClassElementMixin 818 ClassElementMixin
825 implements ClassElement { 819 implements ClassElement {
826 bool _isObject; 820 bool _isObject;
827 DartType _supertype; 821 DartType _supertype;
828 OrderedTypeSet _allSupertypesAndSelf; 822 OrderedTypeSet _allSupertypesAndSelf;
829 Link<DartType> _interfaces; 823 Link<DartType> _interfaces;
824 FunctionType _callType;
830 825
831 ClassElementZ(ObjectDecoder decoder) 826 ClassElementZ(ObjectDecoder decoder)
832 : super(decoder); 827 : super(decoder);
833 828
834 @override 829 @override
835 List<DartType> _getTypeVariables() { 830 List<DartType> _getTypeVariables() {
836 return _decoder.getTypes(Key.TYPE_VARIABLES, isOptional: true); 831 return _decoder.getTypes(Key.TYPE_VARIABLES, isOptional: true);
837 } 832 }
838 833
839 void _ensureSuperHierarchy() { 834 void _ensureSuperHierarchy() {
(...skipping 13 matching lines...) Expand all
853 for (InterfaceType mixin in mixins) { 848 for (InterfaceType mixin in mixins) {
854 MixinApplicationElement mixinElement = 849 MixinApplicationElement mixinElement =
855 new UnnamedMixinApplicationElementZ(this, supertype, mixin); 850 new UnnamedMixinApplicationElementZ(this, supertype, mixin);
856 supertype = mixinElement.thisType.subst( 851 supertype = mixinElement.thisType.subst(
857 typeVariables, mixinElement.typeVariables); 852 typeVariables, mixinElement.typeVariables);
858 } 853 }
859 _supertype = supertype; 854 _supertype = supertype;
860 _allSupertypesAndSelf = 855 _allSupertypesAndSelf =
861 new OrderedTypeSetBuilder(this) 856 new OrderedTypeSetBuilder(this)
862 .createOrderedTypeSet(_supertype, _interfaces); 857 .createOrderedTypeSet(_supertype, _interfaces);
858 _callType = _decoder.getType(Key.CALL_TYPE, isOptional: true);
863 } 859 }
864 } 860 }
865 } 861 }
866 862
867 @override 863 @override
868 accept(ElementVisitor visitor, arg) { 864 accept(ElementVisitor visitor, arg) {
869 return visitor.visitClassElement(this, arg); 865 return visitor.visitClassElement(this, arg);
870 } 866 }
871 867
872 @override 868 @override
(...skipping 21 matching lines...) Expand all
894 Link<DartType> get interfaces { 890 Link<DartType> get interfaces {
895 _ensureSuperHierarchy(); 891 _ensureSuperHierarchy();
896 return _interfaces; 892 return _interfaces;
897 } 893 }
898 894
899 @override 895 @override
900 bool get isProxy => _decoder.getBool(Key.IS_PROXY); 896 bool get isProxy => _decoder.getBool(Key.IS_PROXY);
901 897
902 @override 898 @override
903 bool get isUnnamedMixinApplication => false; 899 bool get isUnnamedMixinApplication => false;
900
901 @override
902 FunctionType get callType {
903 _ensureSuperHierarchy();
904 return _callType;
905 }
904 } 906 }
905 907
906 abstract class MixinApplicationElementMixin 908 abstract class MixinApplicationElementMixin
907 implements ElementZ, MixinApplicationElement { 909 implements ElementZ, MixinApplicationElement {
908 Link<ConstructorElement> _constructors; 910 Link<ConstructorElement> _constructors;
909 911
910 @override 912 @override
911 bool get isMixinApplication => false; 913 bool get isMixinApplication => false;
912 914
913 @override 915 @override
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 } 1964 }
1963 1965
1964 @override 1966 @override
1965 ElementKind get kind => ElementKind.PREFIX; 1967 ElementKind get kind => ElementKind.PREFIX;
1966 1968
1967 @override 1969 @override
1968 Element lookupLocalMember(String memberName) { 1970 Element lookupLocalMember(String memberName) {
1969 return _unsupported('lookupLocalMember'); 1971 return _unsupported('lookupLocalMember');
1970 } 1972 }
1971 } 1973 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/serialization/keys.dart ('k') | pkg/compiler/lib/src/universe/class_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698