Mercurial > hg > CbC > CbC_gcc
comparison gcc/ada/inline.ads @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
4 -- -- | 4 -- -- |
5 -- I N L I N E -- | 5 -- I N L I N E -- |
6 -- -- | 6 -- -- |
7 -- S p e c -- | 7 -- S p e c -- |
8 -- -- | 8 -- -- |
9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. -- | 9 -- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- |
10 -- -- | 10 -- -- |
11 -- GNAT is free software; you can redistribute it and/or modify it under -- | 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- -- | 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- -- | 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- -- | 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
40 -- d) Front-end inlining for GNATprove, to perform source transformations | 40 -- d) Front-end inlining for GNATprove, to perform source transformations |
41 -- to simplify formal verification. The machinery used is the same as for | 41 -- to simplify formal verification. The machinery used is the same as for |
42 -- Inline_Always subprograms, but there are fewer restrictions on the source | 42 -- Inline_Always subprograms, but there are fewer restrictions on the source |
43 -- of subprograms. | 43 -- of subprograms. |
44 | 44 |
45 with Alloc; | |
46 with Opt; use Opt; | 45 with Opt; use Opt; |
47 with Sem; use Sem; | 46 with Sem; use Sem; |
48 with Table; | |
49 with Types; use Types; | 47 with Types; use Types; |
50 with Warnsw; use Warnsw; | 48 with Warnsw; use Warnsw; |
51 | 49 |
52 package Inline is | 50 package Inline is |
53 | 51 |
98 | 96 |
99 Warnings : Warning_Record; | 97 Warnings : Warning_Record; |
100 -- Capture values of warning flags | 98 -- Capture values of warning flags |
101 end record; | 99 end record; |
102 | 100 |
103 package Pending_Instantiations is new Table.Table ( | |
104 Table_Component_Type => Pending_Body_Info, | |
105 Table_Index_Type => Int, | |
106 Table_Low_Bound => 0, | |
107 Table_Initial => Alloc.Pending_Instantiations_Initial, | |
108 Table_Increment => Alloc.Pending_Instantiations_Increment, | |
109 Table_Name => "Pending_Instantiations"); | |
110 | |
111 -- The following table records subprograms and packages for which | |
112 -- generation of subprogram descriptors must be delayed. | |
113 | |
114 package Pending_Descriptor is new Table.Table ( | |
115 Table_Component_Type => Entity_Id, | |
116 Table_Index_Type => Int, | |
117 Table_Low_Bound => 0, | |
118 Table_Initial => Alloc.Pending_Instantiations_Initial, | |
119 Table_Increment => Alloc.Pending_Instantiations_Increment, | |
120 Table_Name => "Pending_Descriptor"); | |
121 | |
122 -- The following should be initialized in an init call in Frontend, we | |
123 -- have thoughts of making the frontend reusable in future ??? | |
124 | |
125 ----------------- | 101 ----------------- |
126 -- Subprograms -- | 102 -- Subprograms -- |
127 ----------------- | 103 ----------------- |
128 | 104 |
129 procedure Initialize; | 105 procedure Initialize; |
140 procedure Add_Inlined_Body (E : Entity_Id; N : Node_Id); | 116 procedure Add_Inlined_Body (E : Entity_Id; N : Node_Id); |
141 -- E is an inlined subprogram appearing in a call, either explicitly or in | 117 -- E is an inlined subprogram appearing in a call, either explicitly or in |
142 -- a discriminant check for which gigi builds a call or an at-end handler. | 118 -- a discriminant check for which gigi builds a call or an at-end handler. |
143 -- Add E's enclosing unit to Inlined_Bodies so that E can be subsequently | 119 -- Add E's enclosing unit to Inlined_Bodies so that E can be subsequently |
144 -- retrieved and analyzed. N is the node giving rise to the call to E. | 120 -- retrieved and analyzed. N is the node giving rise to the call to E. |
121 | |
122 procedure Add_Pending_Instantiation (Inst : Node_Id; Act_Decl : Node_Id); | |
123 -- Add an entry in the table of generic bodies to be instantiated. | |
145 | 124 |
146 procedure Analyze_Inlined_Bodies; | 125 procedure Analyze_Inlined_Bodies; |
147 -- At end of compilation, analyze the bodies of all units that contain | 126 -- At end of compilation, analyze the bodies of all units that contain |
148 -- inlined subprograms that are actually called. | 127 -- inlined subprograms that are actually called. |
149 | 128 |