comparison gcc/ada/table.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 -- T A B L E -- 5 -- T A B L 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- --
128 -- the actual size of the allocated table may be larger than this). 128 -- the actual size of the allocated table may be larger than this).
129 -- The program may only access and modify Table entries in the range 129 -- The program may only access and modify Table entries in the range
130 -- First .. Last. 130 -- First .. Last.
131 131
132 Locked : Boolean := False; 132 Locked : Boolean := False;
133 -- Table expansion is permitted only if this switch is set to False. A 133 -- Increasing the value of Last is permitted only if this switch is set
134 -- client may set Locked to True, in which case any attempt to expand 134 -- to False. A client may set Locked to True, in which case any attempt
135 -- the table will cause an assertion failure. Note that while a table 135 -- to increase the value of Last (which might expand the table) will
136 -- is locked, its address in memory remains fixed and unchanging. This 136 -- cause an assertion failure. Note that while a table is locked, its
137 -- feature is used to control table expansion during Gigi processing. 137 -- address in memory remains fixed and unchanging. This feature is used
138 -- Gigi assumes that tables other than the Uint and Ureal tables do 138 -- to control table expansion during Gigi processing. Gigi assumes that
139 -- not move during processing, which means that they cannot be expanded. 139 -- tables other than the Uint and Ureal tables do not move during
140 -- The Locked flag is used to enforce this restriction. 140 -- processing, which means that they cannot be expanded. The Locked
141 -- flag is used to enforce this restriction.
141 142
142 procedure Init; 143 procedure Init;
143 -- This procedure allocates a new table of size Initial (freeing any 144 -- This procedure allocates a new table of size Initial (freeing any
144 -- previously allocated larger table). It is not necessary to call 145 -- previously allocated larger table). It is not necessary to call
145 -- Init when a table is first instantiated (since the instantiation does 146 -- Init when a table is first instantiated (since the instantiation does