begin
-- Restore visibility of previous scope stack, if any
+ -- Should use Remove_Elmt, so that elements can be reused ???
+
Elmt := First_Elmt (List);
while Present (Elmt) loop
Set_Is_Immediately_Visible (Node (Elmt));
procedure Remove_From_Visibility (E : Entity_Id);
-- If E is immediately visible then append it to the result and remove
- -- it temporarily from visibility
+ -- it temporarily from visibility.
+
+ ----------------------------
+ -- Remove_From_Visibility --
+ ----------------------------
+
+ -- Need comment on why we do this instead of old approach???
procedure Remove_From_Visibility (E : Entity_Id) is
begin
end if;
end Remove_From_Visibility;
+ -- Start of processing for Save_Scope_Stack
+
begin
if SS_Last >= Scope_Stack.First
and then Scope_Stack.Table (SS_Last).Entity /= Standard_Standard
-- with-clause on system. N is absent when the function is called to find
-- the visibility of implicit operators.
- function Save_Scope_Stack (Handle_Use : Boolean := True) return Elist_Id;
+ function Save_Scope_Stack
+ (Handle_Use : Boolean := True) return Elist_Id;
procedure Restore_Scope_Stack
(List : Elist_Id;
Handle_Use : Boolean := True);
-- be compiled in the course of the compilation of another unit U2. This
-- happens whenever Rtsfind is called. U1, the unit retrieved by Rtsfind,
-- must be compiled in its own context, and the current scope stack
- -- containing U2 and local scopes must be made unreachable. On return, the
- -- contents of the scope stack must be made accessible again. The flag
- -- Handle_Use indicates whether local use clauses must be removed or
- -- installed. In the case of inlining of instance bodies, the visibility
+ -- containing U2 and local scopes must be made unreachable. This is
+ -- achieved using a call to Save_Scope_Stack. On return, the contents
+ -- of the scope stack must be made accessible again with a call to
+ -- Restore_Scope_Stack.
+ --
+ -- The flag Handle_Use indicates whether local use clauses must be removed
+ -- or installed. In the case of inlining of instance bodies, the visibility
-- handling is done fully in Inline_Instance_Body, and use clauses are
-- handled there. Save_Scope_Stack returns the list of entities which have
-- been temporarily removed from visibility; that list must be passed to