@@ -609,8 +609,6 @@ class Portion {
609
609
virtual const Decl *
610
610
getReferrentOfScope (const GenericTypeOrExtensionScope *s) const ;
611
611
612
- virtual void beCurrent (IterableTypeScope *) const = 0;
613
- virtual bool isCurrentIfWasExpanded (const IterableTypeScope *) const = 0;
614
612
virtual NullablePtr<ASTScopeImpl>
615
613
insertionPointForDeferredExpansion (IterableTypeScope *) const = 0 ;
616
614
virtual SourceRange
@@ -636,19 +634,6 @@ class Portion {
636
634
const Decl *
637
635
getReferrentOfScope (const GenericTypeOrExtensionScope *s) const override ;
638
636
639
- // / Make whole portion lazy to avoid circularity in lookup of generic
640
- // / parameters of extensions. When \c bindExtension is called, it needs to
641
- // / unqualifed-lookup the type being extended. That causes an \c
642
- // / ExtensionScope
643
- // / (\c GenericTypeOrExtensionWholePortion) to be built.
644
- // / The building process needs the generic parameters, but that results in a
645
- // / request for the extended nominal type of the \c ExtensionDecl, which is
646
- // / an endless recursion. Although we only need to make \c ExtensionScope
647
- // / lazy, might as well do it for all \c IterableTypeScopes.
648
-
649
- void beCurrent (IterableTypeScope *) const override ;
650
- bool isCurrentIfWasExpanded (const IterableTypeScope *) const override ;
651
-
652
637
NullablePtr<ASTScopeImpl>
653
638
insertionPointForDeferredExpansion (IterableTypeScope *) const override ;
654
639
SourceRange
@@ -682,9 +667,6 @@ class GenericTypeOrExtensionWherePortion final
682
667
SourceRange getChildlessSourceRangeOf (const GenericTypeOrExtensionScope *,
683
668
bool omitAssertions) const override ;
684
669
685
- void beCurrent (IterableTypeScope *) const override ;
686
- bool isCurrentIfWasExpanded (const IterableTypeScope *) const override ;
687
-
688
670
NullablePtr<ASTScopeImpl>
689
671
insertionPointForDeferredExpansion (IterableTypeScope *) const override ;
690
672
SourceRange
@@ -704,8 +686,6 @@ class IterableTypeBodyPortion final
704
686
SourceRange getChildlessSourceRangeOf (const GenericTypeOrExtensionScope *,
705
687
bool omitAssertions) const override ;
706
688
707
- void beCurrent (IterableTypeScope *) const override ;
708
- bool isCurrentIfWasExpanded (const IterableTypeScope *) const override ;
709
689
NullablePtr<ASTScopeImpl>
710
690
insertionPointForDeferredExpansion (IterableTypeScope *) const override ;
711
691
SourceRange
@@ -796,11 +776,6 @@ class GenericTypeScope : public GenericTypeOrExtensionScope {
796
776
};
797
777
798
778
class IterableTypeScope : public GenericTypeScope {
799
- // / Because of \c parseDelayedDecl members can get added after the tree is
800
- // / constructed, and they can be out of order. Detect this happening by
801
- // / remembering the member count.
802
- unsigned memberCount = 0 ;
803
-
804
779
public:
805
780
IterableTypeScope (const Portion *p) : GenericTypeScope(p) {}
806
781
virtual ~IterableTypeScope () {}
@@ -810,15 +785,7 @@ class IterableTypeScope : public GenericTypeScope {
810
785
bool doesDeclHaveABody () const override ;
811
786
void expandBody (ScopeCreator &) override ;
812
787
813
- protected:
814
- void beCurrent () override ;
815
- bool isCurrentIfWasExpanded () const override ;
816
-
817
788
public:
818
- void makeWholeCurrent ();
819
- bool isWholeCurrent () const ;
820
- void makeBodyCurrent ();
821
- bool isBodyCurrent () const ;
822
789
NullablePtr<ASTScopeImpl> insertionPointForDeferredExpansion () override ;
823
790
SourceRange sourceRangeForDeferredExpansion () const override ;
824
791
0 commit comments