Implement -mmemcpy-strategy= and -mmemset-strategy= options
[official-gcc.git] / gcc / ada / sem_ch9.ads
blob1ab0b8ceca4bfad7004e7ee976fc0baf27b137cc
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S E M _ C H 9 --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2012, 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 Table;
27 with Types; use Types;
29 package Sem_Ch9 is
30 procedure Analyze_Abort_Statement (N : Node_Id);
31 procedure Analyze_Accept_Alternative (N : Node_Id);
32 procedure Analyze_Accept_Statement (N : Node_Id);
33 procedure Analyze_Asynchronous_Select (N : Node_Id);
34 procedure Analyze_Conditional_Entry_Call (N : Node_Id);
35 procedure Analyze_Delay_Alternative (N : Node_Id);
36 procedure Analyze_Delay_Relative (N : Node_Id);
37 procedure Analyze_Delay_Until (N : Node_Id);
38 procedure Analyze_Entry_Body (N : Node_Id);
39 procedure Analyze_Entry_Body_Formal_Part (N : Node_Id);
40 procedure Analyze_Entry_Call_Alternative (N : Node_Id);
41 procedure Analyze_Entry_Declaration (N : Node_Id);
42 procedure Analyze_Entry_Index_Specification (N : Node_Id);
43 procedure Analyze_Protected_Body (N : Node_Id);
44 procedure Analyze_Protected_Definition (N : Node_Id);
45 procedure Analyze_Protected_Type_Declaration (N : Node_Id);
46 procedure Analyze_Requeue (N : Node_Id);
47 procedure Analyze_Selective_Accept (N : Node_Id);
48 procedure Analyze_Single_Protected_Declaration (N : Node_Id);
49 procedure Analyze_Single_Task_Declaration (N : Node_Id);
50 procedure Analyze_Task_Body (N : Node_Id);
51 procedure Analyze_Task_Definition (N : Node_Id);
52 procedure Analyze_Task_Type_Declaration (N : Node_Id);
53 procedure Analyze_Terminate_Alternative (N : Node_Id);
54 procedure Analyze_Timed_Entry_Call (N : Node_Id);
55 procedure Analyze_Triggering_Alternative (N : Node_Id);
57 procedure Install_Declarations (Spec : Entity_Id);
58 -- Make visible in corresponding body the entities defined in a task,
59 -- protected type declaration, or entry declaration.
61 procedure Install_Discriminants (E : Entity_Id);
62 -- Make visible the discriminants of type entity E
64 procedure Push_Scope_And_Install_Discriminants (E : Entity_Id);
65 -- Push scope E and makes visible the discriminants of type entity E if E
66 -- has discriminants.
68 procedure Uninstall_Discriminants (E : Entity_Id);
69 -- Remove visibility to the discriminants of type entity E
71 procedure Uninstall_Discriminants_And_Pop_Scope (E : Entity_Id);
72 -- Remove visibility to the discriminants of type entity E and pop the
73 -- scope stack if E has discriminants.
75 ------------------------------
76 -- Lock Free Data Structure --
77 ------------------------------
79 -- A lock-free subprogram is a protected routine which references a unique
80 -- protected scalar component and does not contain statements that cause
81 -- side effects. Due to this restricted behavior, all references to shared
82 -- data from within the subprogram can be synchronized through the use of
83 -- atomic operations rather than relying on locks.
85 type Lock_Free_Subprogram is record
86 Sub_Body : Node_Id;
87 -- Reference to the body of a protected subprogram which meets the lock-
88 -- free requirements.
90 Comp_Id : Entity_Id;
91 -- Reference to the scalar component referenced from within Sub_Body
92 end record;
94 -- This table establishes a relation between a protected subprogram body
95 -- and a unique component it references. The table is used when building
96 -- the lock-free versions of a protected subprogram body.
98 package Lock_Free_Subprogram_Table is new Table.Table (
99 Table_Component_Type => Lock_Free_Subprogram,
100 Table_Index_Type => Nat,
101 Table_Low_Bound => 1,
102 Table_Initial => 5,
103 Table_Increment => 5,
104 Table_Name => "Lock_Free_Subprogram_Table");
105 end Sem_Ch9;