1------------------------------------------------------------------------------ 2-- -- 3-- GNAT COMPILER COMPONENTS -- 4-- -- 5-- S E M _ C H 1 0 -- 6-- -- 7-- S p e c -- 8-- -- 9-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- 10-- -- 11-- GNAT is free software; you can redistribute it and/or modify it under -- 12-- terms of the GNU General Public License as published by the Free Soft- -- 13-- ware Foundation; either version 3, or (at your option) any later ver- -- 14-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- 15-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- 16-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- 17-- for more details. You should have received a copy of the GNU General -- 18-- Public License distributed with GNAT; see file COPYING3. If not, go to -- 19-- http://www.gnu.org/licenses for a complete copy of the license. -- 20-- -- 21-- GNAT was originally developed by the GNAT team at New York University. -- 22-- Extensive contributions were provided by Ada Core Technologies Inc. -- 23-- -- 24------------------------------------------------------------------------------ 25 26with Types; use Types; 27package Sem_Ch10 is 28 procedure Analyze_Compilation_Unit (N : Node_Id); 29 procedure Analyze_With_Clause (N : Node_Id); 30 procedure Analyze_Subprogram_Body_Stub (N : Node_Id); 31 procedure Analyze_Package_Body_Stub (N : Node_Id); 32 procedure Analyze_Task_Body_Stub (N : Node_Id); 33 procedure Analyze_Protected_Body_Stub (N : Node_Id); 34 procedure Analyze_Subunit (N : Node_Id); 35 36 procedure Analyze_Subprogram_Body_Stub_Contract (Stub_Id : Entity_Id); 37 -- Analyze all delayed aspects chained on the contract of a subprogram body 38 -- stub Stub_Id as if they appeared at the end of a declarative region. The 39 -- aspects in question are: 40 -- Contract_Cases 41 -- Depends 42 -- Global 43 -- Postcondition 44 -- Precondition 45 -- Refined_Depends 46 -- Refined_Global 47 -- Test_Case 48 49 procedure Install_Context (N : Node_Id); 50 -- Installs the entities from the context clause of the given compilation 51 -- unit into the visibility chains. This is done before analyzing a unit. 52 -- For a child unit, install context of parents as well. 53 54 procedure Install_Private_With_Clauses (P : Entity_Id); 55 -- Install the private with_clauses of a compilation unit, when compiling 56 -- its private part, compiling a private child unit, or compiling the 57 -- private declarations of a public child unit. 58 59 function Is_Legal_Shadow_Entity_In_Body (T : Entity_Id) return Boolean; 60 -- Assuming that type T is an incomplete type coming from a limited with 61 -- view, determine whether the package where T resides is imported through 62 -- a regular with clause in the current package body. 63 64 procedure Remove_Context (N : Node_Id); 65 -- Removes the entities from the context clause of the given compilation 66 -- unit from the visibility chains. This is done on exit from a unit as 67 -- part of cleaning up the visibility chains for the caller. A special 68 -- case is that the call from the Main_Unit can be ignored, since at the 69 -- end of the main unit the visibility table won't be needed in any case. 70 -- For a child unit, remove parents and their context as well. 71 72 procedure Remove_Private_With_Clauses (Comp_Unit : Node_Id); 73 -- The private_with_clauses of a compilation unit are visible in the 74 -- private part of a nested package, even if this package appears in 75 -- the visible part of the enclosing compilation unit. This Ada 2005 76 -- rule imposes extra steps in order to install/remove the private_with 77 -- clauses of an enclosing unit. 78 79 procedure Load_Needed_Body 80 (N : Node_Id; 81 OK : out Boolean; 82 Do_Analyze : Boolean := True); 83 -- Load and analyze the body of a context unit that is generic, or that 84 -- contains generic units or inlined units. The body becomes part of the 85 -- semantic dependency set of the unit that needs it. The returned result 86 -- in OK is True if the load is successful, and False if the requested file 87 -- cannot be found. If the flag Do_Analyze is false, the unit is loaded and 88 -- parsed only. This allows a selective analysis in some inlining cases 89 -- where a full analysis would lead so circularities in the back-end. 90 91end Sem_Ch10; 92