[RS6000] lqarx and stqcx. registers
[official-gcc.git] / gcc / ada / sem_ch7.ads
blob59f27b086bb8662beebfe74194450d010e9ba639
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S E M _ C H 7 --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2015, 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 ------------------------------------------------------------------------------
26 with Types; use Types;
28 package Sem_Ch7 is
30 procedure Analyze_Package_Body (N : Node_Id);
31 procedure Analyze_Package_Declaration (N : Node_Id);
32 procedure Analyze_Package_Specification (N : Node_Id);
33 procedure Analyze_Private_Type_Declaration (N : Node_Id);
35 procedure End_Package_Scope (P : Entity_Id);
36 -- Calls Uninstall_Declarations, and then pops the scope stack
38 procedure Exchange_Declarations (Id : Entity_Id);
39 -- Exchange private and full declaration on entry/exit from a package
40 -- declaration or body. The semantic links of the respective nodes
41 -- are preserved in the exchange.
43 procedure Install_Visible_Declarations (P : Entity_Id);
44 procedure Install_Private_Declarations (P : Entity_Id);
46 -- On entrance to a package body, make declarations in package spec
47 -- immediately visible.
49 -- When compiling the body of a package, both routines are called in
50 -- succession. When compiling the body of a child package, the call
51 -- to Install_Private_Declaration is immediate for private children,
52 -- but is deferred until the compilation of the private part of the
53 -- child for public child packages.
55 function Unit_Requires_Body
56 (Pack_Id : Entity_Id;
57 Ignore_Abstract_State : Boolean := False) return Boolean;
58 -- Determine whether package Pack_Id requires a body. A specification needs
59 -- a body if it contains declarations that require completion in the body.
60 -- A non-Ghost [generic] package does not require a body when it declares
61 -- Ghost entities exclusively. If flag Ignore_Abstract_State is True, then
62 -- the test for a non-null abstract state (which normally requires a body)
63 -- is not carried out. The flag is not currently used, but may be useful
64 -- in the future if we implement a compatibility mode which warns about
65 -- possible incompatibilities if a SPARK 2014 program is compiled with a
66 -- SPARK-unaware compiler.
68 procedure May_Need_Implicit_Body (E : Entity_Id);
69 -- If a package declaration contains tasks or RACWs and does not require
70 -- a body, create an implicit body at the end of the current declarative
71 -- part to activate those tasks or contain the bodies for the RACW
72 -- calling stubs.
74 procedure New_Private_Type (N : Node_Id; Id : Entity_Id; Def : Node_Id);
75 -- Common processing for private type declarations and for formal private
76 -- type declarations. For private types, N and Def are the type declaration
77 -- node; for formal private types, Def is the formal type definition.
79 procedure Uninstall_Declarations (P : Entity_Id);
80 -- At the end of a package declaration or body, declarations in the visible
81 -- part are no longer immediately visible, and declarations in the private
82 -- part are not visible at all. For inner packages, place visible entities
83 -- at the end of their homonym chains. For compilation units, make
84 -- all entities invisible. In both cases, exchange private and visible
85 -- declarations to restore order of elaboration.
87 end Sem_Ch7;