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

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

Issue 1802883002: 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
86 ClassElement get enclosingClass => null; 83 ClassElement get enclosingClass => null;
87 84
88 @override 85 @override
89 Element get enclosingClassOrCompilationUnit { 86 Element get enclosingClassOrCompilationUnit {
90 return _unsupported('enclosingClassOrCompilationUnit'); 87 return _unsupported('enclosingClassOrCompilationUnit');
91 } 88 }
92 89
93 @override 90 @override
94 String get fixedBackendName => _unsupported('fixedBackendName');
95
96 @override
97 LibraryElement get implementationLibrary => library; 91 LibraryElement get implementationLibrary => library;
98 92
99 @override 93 @override
100 bool get isAbstract => false; 94 bool get isAbstract => false;
101 95
102 @override 96 @override
103 bool get isAssignable => _unsupported('isAssignable'); 97 bool get isAssignable => _unsupported('isAssignable');
104 98
105 @override 99 @override
106 bool get isClassMember => false; 100 bool get isClassMember => false;
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 CompilationUnitElementZ(ObjectDecoder decoder) 520 CompilationUnitElementZ(ObjectDecoder decoder)
527 : super(decoder); 521 : super(decoder);
528 522
529 @override 523 @override
530 ElementKind get kind => ElementKind.COMPILATION_UNIT; 524 ElementKind get kind => ElementKind.COMPILATION_UNIT;
531 525
532 @override 526 @override
533 CompilationUnitElement get compilationUnit => this; 527 CompilationUnitElement get compilationUnit => this;
534 528
535 @override 529 @override
530 Element get enclosingElement => library;
531
532 @override
536 accept(ElementVisitor visitor, arg) { 533 accept(ElementVisitor visitor, arg) {
537 return visitor.visitCompilationUnitElement(this, arg); 534 return visitor.visitCompilationUnitElement(this, arg);
538 } 535 }
539 536
540 @override 537 @override
541 void forEachLocalMember(f(Element element)) { 538 void forEachLocalMember(f(Element element)) {
542 if (_members == null) { 539 if (_members == null) {
543 _members = 540 _members =
544 _decoder.getElements(Key.ELEMENTS, isOptional: true); 541 _decoder.getElements(Key.ELEMENTS, isOptional: true);
545 } 542 }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 if (_parameters == null) { 716 if (_parameters == null) {
720 _parameters = _decoder.getElements(Key.PARAMETERS, isOptional: true); 717 _parameters = _decoder.getElements(Key.PARAMETERS, isOptional: true);
721 } 718 }
722 return _parameters; 719 return _parameters;
723 } 720 }
724 } 721 }
725 722
726 abstract class FunctionTypedElementMixin 723 abstract class FunctionTypedElementMixin
727 implements FunctionElement, DeserializedElementZ { 724 implements FunctionElement, DeserializedElementZ {
728 @override 725 @override
729 AsyncMarker get asyncMarker => _unsupported(''); 726 AsyncMarker get asyncMarker => _unsupported('asyncMarker');
730
731 @override
732 bool get isExternal => _unsupported('');
733 727
734 @override 728 @override
735 FunctionElement asFunctionElement() => this; 729 FunctionElement asFunctionElement() => this;
730
731 @override
732 bool get isExternal {
733 return _decoder.getBool(
734 Key.IS_EXTERNAL, isOptional: true, defaultValue: false);
735 }
736 } 736 }
737 737
738 class ClassElementZ extends DeserializedElementZ 738 class ClassElementZ extends DeserializedElementZ
739 with AnalyzableElementMixin, 739 with AnalyzableElementMixin,
740 AstElementMixin, 740 AstElementMixin,
741 ClassElementCommon, 741 ClassElementCommon,
742 class_members.ClassMemberMixin, 742 class_members.ClassMemberMixin,
743 ContainerMixin, 743 ContainerMixin,
744 LibraryMemberMixin, 744 LibraryMemberMixin,
745 TypeDeclarationMixin<InterfaceType> 745 TypeDeclarationMixin<InterfaceType>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 879
880 @override 880 @override
881 ClassElement get superclass => supertype != null ? supertype.element : null; 881 ClassElement get superclass => supertype != null ? supertype.element : null;
882 882
883 @override 883 @override
884 void ensureResolved(Resolution resolution) { 884 void ensureResolved(Resolution resolution) {
885 resolution.registerClass(this); 885 resolution.registerClass(this);
886 } 886 }
887 } 887 }
888 888
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
889 abstract class ConstructorElementZ extends DeserializedElementZ 908 abstract class ConstructorElementZ extends DeserializedElementZ
890 with AnalyzableElementMixin, 909 with AnalyzableElementMixin,
891 AstElementMixin, 910 AstElementMixin,
892 ClassMemberMixin, 911 ClassMemberMixin,
893 FunctionTypedElementMixin, 912 FunctionTypedElementMixin,
894 ParametersMixin, 913 ParametersMixin,
895 TypedElementMixin, 914 TypedElementMixin,
896 MemberElementMixin 915 MemberElementMixin
897 implements ConstructorElement { 916 implements ConstructorElement {
898 ConstantConstructor _constantConstructor; 917 ConstantConstructor _constantConstructor;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 ConstructorElement get effectiveTarget { 967 ConstructorElement get effectiveTarget {
949 return _unsupported('effectiveTarget'); 968 return _unsupported('effectiveTarget');
950 } 969 }
951 970
952 @override 971 @override
953 ConstructorElement get immediateRedirectionTarget { 972 ConstructorElement get immediateRedirectionTarget {
954 return _unsupported('immediateRedirectionTarget'); 973 return _unsupported('immediateRedirectionTarget');
955 } 974 }
956 975
957 @override 976 @override
977 bool get isEffectiveTargetMalformed {
978 return _unsupported('isEffectiveTargetMalformed');
979 }
980
981 @override
958 bool get isRedirectingFactory => _unsupported('isRedirectingFactory'); 982 bool get isRedirectingFactory => _unsupported('isRedirectingFactory');
959 983
960 @override 984 @override
961 bool get isRedirectingGenerative => _unsupported('isRedirectingGenerative'); 985 bool get isRedirectingGenerative => _unsupported('isRedirectingGenerative');
962 986
963 @override 987 @override
964 bool get isCyclicRedirection => _unsupported('isCyclicRedirection'); 988 bool get isCyclicRedirection => _unsupported('isCyclicRedirection');
965 989
966 @override 990 @override
967 PrefixElement get redirectionDeferredPrefix { 991 PrefixElement get redirectionDeferredPrefix {
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 } 1570 }
1547 1571
1548 @override 1572 @override
1549 ElementKind get kind => ElementKind.PREFIX; 1573 ElementKind get kind => ElementKind.PREFIX;
1550 1574
1551 @override 1575 @override
1552 Element lookupLocalMember(String memberName) { 1576 Element lookupLocalMember(String memberName) {
1553 return _unsupported('lookupLocalMember'); 1577 return _unsupported('lookupLocalMember');
1554 } 1578 }
1555 } 1579 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698