OSDN Git Service

2007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / sem_ch10.ads
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-2006, 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 2,  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 COPYING.  If not, write --
19 -- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
20 -- Boston, MA 02110-1301, USA.                                              --
21 --                                                                          --
22 -- GNAT was originally developed  by the GNAT team at  New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
24 --                                                                          --
25 ------------------------------------------------------------------------------
26
27 with Types; use Types;
28 package Sem_Ch10 is
29    procedure Analyze_Compilation_Unit                   (N : Node_Id);
30    procedure Analyze_With_Clause                        (N : Node_Id);
31    procedure Analyze_Subprogram_Body_Stub               (N : Node_Id);
32    procedure Analyze_Package_Body_Stub                  (N : Node_Id);
33    procedure Analyze_Task_Body_Stub                     (N : Node_Id);
34    procedure Analyze_Protected_Body_Stub                (N : Node_Id);
35    procedure Analyze_Subunit                            (N : Node_Id);
36
37    procedure Install_Context (N : Node_Id);
38    --  Installs the entities from the context clause of the given compilation
39    --  unit into the visibility chains. This is done before analyzing a unit.
40    --  For a child unit, install context of parents as well.
41
42    procedure Install_Private_With_Clauses (P : Entity_Id);
43    --  Install the private with_clauses of a compilation unit, when compiling
44    --  its private part, compiling a private child unit, or compiling the
45    --  private declarations of a public child unit.
46
47    procedure Remove_Context (N : Node_Id);
48    --  Removes the entities from the context clause of the given compilation
49    --  unit from the visibility chains. This is done on exit from a unit as
50    --  part of cleaning up the visibility chains for the caller. A special
51    --  case is that the call from the Main_Unit can be ignored, since at the
52    --  end of the main unit the visibility table won't be needed in any case.
53    --  For a child unit, remove parents and their context as well.
54
55    procedure Remove_Private_With_Clauses (Comp_Unit : Node_Id);
56    --  The private_with_clauses of a compilation unit are visible in the
57    --  private part of a nested package, even if this package appears in
58    --  the visible part of the enclosing compilation unit. This Ada 2005
59    --  rule imposes extra steps in order to install/remove the private_with
60    --  clauses of the an enclosing unit.
61
62    procedure Load_Needed_Body (N : Node_Id; OK : out Boolean);
63    --  Load and analyze the body of a context unit that is generic, or
64    --  that contains generic units or inlined units. The body becomes
65    --  part of the semantic dependency set of the unit that needs it.
66    --  The returned result in OK is True if the load is successful,
67    --  and False if the requested file cannot be found.
68
69 end Sem_Ch10;