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

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

Issue 1808133002: Revert "Use JS backend in serialization_analysis_test" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 @override 74 @override
75 Scope buildScope() => _unsupported('analyzableElement'); 75 Scope buildScope() => _unsupported('analyzableElement');
76 76
77 @override 77 @override
78 CompilationUnitElement get compilationUnit { 78 CompilationUnitElement get compilationUnit {
79 return _unsupported('compilationUnit'); 79 return _unsupported('compilationUnit');
80 } 80 }
81 81
82 @override 82 @override
83 ClassElement get contextClass => _unsupported('contextClass');
84
85 @override
83 ClassElement get enclosingClass => null; 86 ClassElement get enclosingClass => null;
84 87
85 @override 88 @override
86 Element get enclosingClassOrCompilationUnit { 89 Element get enclosingClassOrCompilationUnit {
87 return _unsupported('enclosingClassOrCompilationUnit'); 90 return _unsupported('enclosingClassOrCompilationUnit');
88 } 91 }
89 92
90 @override 93 @override
91 LibraryElement get implementationLibrary => library; 94 LibraryElement get implementationLibrary => library;
92 95
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 CompilationUnitElementZ(ObjectDecoder decoder) 523 CompilationUnitElementZ(ObjectDecoder decoder)
521 : super(decoder); 524 : super(decoder);
522 525
523 @override 526 @override
524 ElementKind get kind => ElementKind.COMPILATION_UNIT; 527 ElementKind get kind => ElementKind.COMPILATION_UNIT;
525 528
526 @override 529 @override
527 CompilationUnitElement get compilationUnit => this; 530 CompilationUnitElement get compilationUnit => this;
528 531
529 @override 532 @override
530 Element get enclosingElement => library;
531
532 @override
533 accept(ElementVisitor visitor, arg) { 533 accept(ElementVisitor visitor, arg) {
534 return visitor.visitCompilationUnitElement(this, arg); 534 return visitor.visitCompilationUnitElement(this, arg);
535 } 535 }
536 536
537 @override 537 @override
538 void forEachLocalMember(f(Element element)) { 538 void forEachLocalMember(f(Element element)) {
539 if (_members == null) { 539 if (_members == null) {
540 _members = 540 _members =
541 _decoder.getElements(Key.ELEMENTS, isOptional: true); 541 _decoder.getElements(Key.ELEMENTS, isOptional: true);
542 } 542 }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 if (_parameters == null) { 716 if (_parameters == null) {
717 _parameters = _decoder.getElements(Key.PARAMETERS, isOptional: true); 717 _parameters = _decoder.getElements(Key.PARAMETERS, isOptional: true);
718 } 718 }
719 return _parameters; 719 return _parameters;
720 } 720 }
721 } 721 }
722 722
723 abstract class FunctionTypedElementMixin 723 abstract class FunctionTypedElementMixin
724 implements FunctionElement, DeserializedElementZ { 724 implements FunctionElement, DeserializedElementZ {
725 @override 725 @override
726 AsyncMarker get asyncMarker => _unsupported('asyncMarker'); 726 AsyncMarker get asyncMarker => _unsupported('');
727
728 @override
729 bool get isExternal => _unsupported('');
727 730
728 @override 731 @override
729 FunctionElement asFunctionElement() => this; 732 FunctionElement asFunctionElement() => this;
730
731 @override
732 bool get isExternal {
733 return _decoder.getBool(
734 Key.IS_EXTERNAL, isOptional: true, defaultValue: false);
735 }
736 } 733 }
737 734
738 class ClassElementZ extends DeserializedElementZ 735 class ClassElementZ extends DeserializedElementZ
739 with AnalyzableElementMixin, 736 with AnalyzableElementMixin,
740 AstElementMixin, 737 AstElementMixin,
741 ClassElementCommon, 738 ClassElementCommon,
742 class_members.ClassMemberMixin, 739 class_members.ClassMemberMixin,
743 ContainerMixin, 740 ContainerMixin,
744 LibraryMemberMixin, 741 LibraryMemberMixin,
745 TypeDeclarationMixin<InterfaceType> 742 TypeDeclarationMixin<InterfaceType>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 876
880 @override 877 @override
881 ClassElement get superclass => supertype != null ? supertype.element : null; 878 ClassElement get superclass => supertype != null ? supertype.element : null;
882 879
883 @override 880 @override
884 void ensureResolved(Resolution resolution) { 881 void ensureResolved(Resolution resolution) {
885 resolution.registerClass(this); 882 resolution.registerClass(this);
886 } 883 }
887 } 884 }
888 885
889
890 class EnumClassElementZ extends ClassElementZ implements EnumClassElement {
891 List<FieldElement> _enumValues;
892
893 EnumClassElementZ(ObjectDecoder decoder)
894 : super(decoder);
895
896 @override
897 bool get isEnumClass => true;
898
899 @override
900 List<FieldElement> get enumValues {
901 if (_enumValues == null) {
902 _enumValues = _decoder.getElements(Key.FIELDS);
903 }
904 return _enumValues;
905 }
906 }
907
908 abstract class ConstructorElementZ extends DeserializedElementZ 886 abstract class ConstructorElementZ extends DeserializedElementZ
909 with AnalyzableElementMixin, 887 with AnalyzableElementMixin,
910 AstElementMixin, 888 AstElementMixin,
911 ClassMemberMixin, 889 ClassMemberMixin,
912 FunctionTypedElementMixin, 890 FunctionTypedElementMixin,
913 ParametersMixin, 891 ParametersMixin,
914 TypedElementMixin, 892 TypedElementMixin,
915 MemberElementMixin 893 MemberElementMixin
916 implements ConstructorElement { 894 implements ConstructorElement {
917 ConstantConstructor _constantConstructor; 895 ConstantConstructor _constantConstructor;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 ConstructorElement get effectiveTarget { 945 ConstructorElement get effectiveTarget {
968 return _unsupported('effectiveTarget'); 946 return _unsupported('effectiveTarget');
969 } 947 }
970 948
971 @override 949 @override
972 ConstructorElement get immediateRedirectionTarget { 950 ConstructorElement get immediateRedirectionTarget {
973 return _unsupported('immediateRedirectionTarget'); 951 return _unsupported('immediateRedirectionTarget');
974 } 952 }
975 953
976 @override 954 @override
977 bool get isEffectiveTargetMalformed {
978 return _unsupported('isEffectiveTargetMalformed');
979 }
980
981 @override
982 bool get isRedirectingFactory => _unsupported('isRedirectingFactory'); 955 bool get isRedirectingFactory => _unsupported('isRedirectingFactory');
983 956
984 @override 957 @override
985 bool get isRedirectingGenerative => _unsupported('isRedirectingGenerative'); 958 bool get isRedirectingGenerative => _unsupported('isRedirectingGenerative');
986 959
987 @override 960 @override
988 bool get isCyclicRedirection => _unsupported('isCyclicRedirection'); 961 bool get isCyclicRedirection => _unsupported('isCyclicRedirection');
989 962
990 @override 963 @override
991 PrefixElement get redirectionDeferredPrefix { 964 PrefixElement get redirectionDeferredPrefix {
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 } 1551 }
1579 1552
1580 @override 1553 @override
1581 ElementKind get kind => ElementKind.PREFIX; 1554 ElementKind get kind => ElementKind.PREFIX;
1582 1555
1583 @override 1556 @override
1584 Element lookupLocalMember(String memberName) { 1557 Element lookupLocalMember(String memberName) {
1585 return _unsupported('lookupLocalMember'); 1558 return _unsupported('lookupLocalMember');
1586 } 1559 }
1587 } 1560 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/serialization/element_serialization.dart ('k') | tests/compiler/dart2js/serialization_analysis_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698