@@ -609,8 +609,6 @@ class Portion {
609609 virtual const Decl *
610610 getReferrentOfScope (const GenericTypeOrExtensionScope *s) const ;
611611
612- virtual void beCurrent (IterableTypeScope *) const = 0;
613- virtual bool isCurrentIfWasExpanded (const IterableTypeScope *) const = 0;
614612 virtual NullablePtr<ASTScopeImpl>
615613 insertionPointForDeferredExpansion (IterableTypeScope *) const = 0 ;
616614 virtual SourceRange
@@ -636,19 +634,6 @@ class Portion {
636634 const Decl *
637635 getReferrentOfScope (const GenericTypeOrExtensionScope *s) const override ;
638636
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-
652637 NullablePtr<ASTScopeImpl>
653638 insertionPointForDeferredExpansion (IterableTypeScope *) const override ;
654639 SourceRange
@@ -682,9 +667,6 @@ class GenericTypeOrExtensionWherePortion final
682667 SourceRange getChildlessSourceRangeOf (const GenericTypeOrExtensionScope *,
683668 bool omitAssertions) const override ;
684669
685- void beCurrent (IterableTypeScope *) const override ;
686- bool isCurrentIfWasExpanded (const IterableTypeScope *) const override ;
687-
688670 NullablePtr<ASTScopeImpl>
689671 insertionPointForDeferredExpansion (IterableTypeScope *) const override ;
690672 SourceRange
@@ -704,8 +686,6 @@ class IterableTypeBodyPortion final
704686 SourceRange getChildlessSourceRangeOf (const GenericTypeOrExtensionScope *,
705687 bool omitAssertions) const override ;
706688
707- void beCurrent (IterableTypeScope *) const override ;
708- bool isCurrentIfWasExpanded (const IterableTypeScope *) const override ;
709689 NullablePtr<ASTScopeImpl>
710690 insertionPointForDeferredExpansion (IterableTypeScope *) const override ;
711691 SourceRange
@@ -796,11 +776,6 @@ class GenericTypeScope : public GenericTypeOrExtensionScope {
796776};
797777
798778class 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-
804779public:
805780 IterableTypeScope (const Portion *p) : GenericTypeScope(p) {}
806781 virtual ~IterableTypeScope () {}
@@ -810,15 +785,7 @@ class IterableTypeScope : public GenericTypeScope {
810785 bool doesDeclHaveABody () const override ;
811786 void expandBody (ScopeCreator &) override ;
812787
813- protected:
814- void beCurrent () override ;
815- bool isCurrentIfWasExpanded () const override ;
816-
817788public:
818- void makeWholeCurrent ();
819- bool isWholeCurrent () const ;
820- void makeBodyCurrent ();
821- bool isBodyCurrent () const ;
822789 NullablePtr<ASTScopeImpl> insertionPointForDeferredExpansion () override ;
823790 SourceRange sourceRangeForDeferredExpansion () const override ;
824791
0 commit comments