1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
9 -- Copyright (C) 1999-2014, Free Software Foundation, Inc. --
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. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
26 -- This package obtains parameters from the target runtime version of System,
27 -- to indicate parameters relevant to the target environment.
29 -- Conceptually, these parameters could be obtained using rtsfind, but
30 -- we do not do this for four reasons:
32 -- 1. Compiling System for every compilation wastes time
34 -- 2. This compilation impedes debugging by adding extra compile steps
36 -- 3. There are recursion problems coming from compiling System itself
37 -- or any of its children.
39 -- 4. The binder also needs the parameters, and we do not want to have
40 -- to drag a lot of front end stuff into the binder.
42 -- For all these reasons, we read in the source of System, and then scan
43 -- it at the text level to extract the parameter values.
45 -- Note however, that later on, when the ali file is written, we make sure
46 -- that the System file is at least parsed, so that the checksum is properly
47 -- computed and set in the ali file. This partially negates points 1 and 2
48 -- above although just parsing is quick and does not impact debugging much.
50 -- The parameters acquired by this routine from system.ads fall into four
53 -- 1. Configuration pragmas, that must appear at the start of the file.
54 -- Any such pragmas automatically apply to any unit compiled in the
55 -- presence of this system file. Only a limited set of such pragmas
56 -- may appear as documented in the corresponding section below,
58 -- 2. Target parameters. These are boolean constants that are defined
59 -- in the private part of the package giving fixed information
60 -- about the target architecture, and the capabilities of the
61 -- code generator and run-time library.
63 -- 3. Identification information. This is an optional string constant
64 -- that gives the name of the run-time library configuration. This
65 -- line may be omitted for a version of system.ads to be used with
66 -- the full Ada 95 run time.
68 -- 4. Other characteristics of package System. At the current time the
69 -- only item in this category is whether type Address is private.
71 with Rident
; use Rident
;
72 with Namet
; use Namet
;
73 with Types
; use Types
;
77 ---------------------------
78 -- Configuration Pragmas --
79 ---------------------------
81 -- The following switches get set if the corresponding configuration
82 -- pragma is scanned from the source of system.ads. No other pragmas
83 -- are permitted to appear at the start of the system.ads source file.
85 -- If a pragma Discard_Names appears, then Opt.Global_Discard_Names is
86 -- set to True to indicate that all units must be compiled in this mode.
88 -- If a pragma Locking_Policy appears, then Opt.Locking_Policy is set
89 -- to the first character of the policy name, and Opt.Locking_Policy_Sloc
90 -- is set to System_Location.
92 -- If a pragma Normalize_Scalars appears, then Opt.Normalize_Scalars
93 -- is set True, as well as Opt.Init_Or_Norm_Scalars.
95 -- If a pragma Queuing_Policy appears, then Opt.Queuing_Policy is set
96 -- to the first character of the policy name, and Opt.Queuing_Policy_Sloc
97 -- is set to System_Location.
99 -- If a pragma Task_Dispatching_Policy appears, then the flag
100 -- Opt.Task_Dispatching_Policy is set to the first character of the
101 -- policy name, and Opt.Task_Dispatching_Policy_Sloc is set to
104 -- If a pragma Polling (On) appears, then the flag Opt.Polling_Required
107 -- If a pragma Detect_Blocking appears, then the flag Opt.Detect_Blocking
110 -- if a pragma Suppress_Exception_Locations appears, then the flag
111 -- Opt.Exception_Locations_Suppressed is set to True.
113 -- If a pragma Profile with a valid profile argument appears, then
114 -- the appropriate restrictions and policy flags are set.
116 -- The only other pragma allowed is a pragma Restrictions that specifies
117 -- a restriction that will be imposed on all units in the partition. Note
118 -- that in this context, only one restriction can be specified in a single
119 -- pragma, and the pragma must appear on its own on a single source line.
121 -- If package System contains exactly the line "type Address is private;"
122 -- then the flag Opt.Address_Is_Private is set True, otherwise this flag
125 Restrictions_On_Target
: Restrictions_Info
:= No_Restrictions
;
126 -- Records restrictions specified by system.ads. Only the Set and Value
127 -- members are modified. The Violated and Count fields are never modified.
128 -- Note that entries can be set either by a pragma Restrictions or by
135 -- This parameter should be regarded as read only by all clients of
136 -- of package. The only way they get modified is by calling the
137 -- Get_Target_Parameters routine which reads the values from a provided
138 -- text buffer containing the source of the system package.
140 -- The corresponding string constant is placed immediately at the start
141 -- of the private part of system.ads if is present, e.g. in the form:
143 -- Run_Time_Name : constant String := "Zero Footprint Run Time";
145 -- the corresponding messages will look something like
147 -- xxx not supported (Zero Footprint Run Time)
149 Run_Time_Name_On_Target
: Name_Id
:= No_Name
;
150 -- Set to appropriate names table entry Id value if a Run_Time_Name
151 -- string constant is defined in system.ads. This name is used only
152 -- for the configurable run-time case, and is used to parameterize
153 -- messages that complain about non-supported run-time features.
154 -- The name should contain only letters A-Z, digits 1-9, spaces,
157 --------------------------
158 -- Executable Extension --
159 --------------------------
161 Executable_Extension_On_Target
: Name_Id
:= No_Name
;
162 -- Executable extension on the target. This name is useful for setting
163 -- the executable extension in a dynamic way, e.g. depending on the
164 -- run time used, rather than using a configure-time macro as done by
165 -- Get_Target_Executable_Suffix. If not set (No_Name), instead use
166 -- System.OS_Lib.Get_Target_Executable_Suffix.
168 -----------------------
169 -- Target Parameters --
170 -----------------------
172 -- The following parameters correspond to the variables defined in the
173 -- private part of System (without the terminating _On_Target). Note
174 -- that it is required that all parameters defined here be specified
175 -- in the target specific version of system.ads. Thus, to add a new
176 -- parameter, add it to all system*.ads files. (There is a defaulting
177 -- mechanism, but we don't normally take advantage of it, as explained
180 -- The default values here are used if no value is found in system.ads.
181 -- This should normally happen if the special version of system.ads used
182 -- by the compiler itself is in use or if the value is only relevant to
183 -- a particular target (e.g. OpenVMS, AAMP). The default values are
184 -- suitable for use in normal environments. This approach allows the
185 -- possibility of new versions of the compiler (possibly with new system
186 -- parameters added) being used to compile older versions of the compiler
187 -- sources, as well as avoiding duplicating values in all system-*.ads
188 -- files for flags that are used on a few platforms only.
190 -- All these parameters should be regarded as read only by all clients
191 -- of the package. The only way they get modified is by calling the
192 -- Get_Target_Parameters routine which reads the values from a provided
193 -- text buffer containing the source of the system package.
195 ----------------------------
196 -- Special Target Control --
197 ----------------------------
199 -- The great majority of GNAT ports are based on GCC. The switches in
200 -- this section indicate the use of some non-standard target back end
201 -- or other special targetting requirements.
203 AAMP_On_Target
: Boolean := False;
204 -- Set to True if target is AAMP
206 OpenVMS_On_Target
: Boolean := False;
207 -- Set to True if target is OpenVMS
209 VAX_Float_On_Target
: Boolean := False;
210 -- Set to True if target float format is VAX Float
212 RTX_RTSS_Kernel_Module_On_Target
: Boolean := False;
213 -- Set to True if target is RTSS module for RTX
215 type Virtual_Machine_Kind
is (No_VM
, JVM_Target
, CLI_Target
);
216 VM_Target
: Virtual_Machine_Kind
:= No_VM
;
217 -- Kind of virtual machine targetted
218 -- No_VM: no virtual machine, default case of a standard processor
219 -- JVM_Target: Java Virtual Machine
220 -- CLI_Target: CLI/.NET Virtual Machine
222 -------------------------------
223 -- Backend Arithmetic Checks --
224 -------------------------------
226 -- Divide and overflow checks are either done in the front end or
227 -- back end. The front end will generate checks when required unless
228 -- the corresponding parameter here is set to indicate that the back
229 -- end will generate the required checks (or that the checks are
230 -- automatically performed by the hardware in an appropriate form).
232 Backend_Divide_Checks_On_Target
: Boolean := False;
233 -- Set True if the back end generates divide checks, or if the hardware
234 -- checks automatically. Set False if the front end must generate the
235 -- required tests using explicit expanded code.
237 Backend_Overflow_Checks_On_Target
: Boolean := False;
238 -- Set True if the back end generates arithmetic overflow checks, or if
239 -- the hardware checks automatically. Set False if the front end must
240 -- generate the required tests using explicit expanded code.
242 -----------------------------------
243 -- Control of Exception Handling --
244 -----------------------------------
246 -- GNAT implements three methods of implementing exceptions:
248 -- Front-End Longjmp/Setjmp Exceptions
250 -- This approach uses longjmp/setjmp to handle exceptions. It
251 -- uses less storage, and can often propagate exceptions faster,
252 -- at the expense of (sometimes considerable) overhead in setting
253 -- up an exception handler. This approach is available on all
254 -- targets, and is the default where it is the only approach.
256 -- The generation of the setjmp and longjmp calls is handled by
257 -- the front end of the compiler (this includes gigi in the case
258 -- of the standard GCC back end). It does not use any back end
259 -- support (such as the GCC3 exception handling mechanism). When
260 -- this approach is used, the compiler generates special exception
261 -- handlers for handling cleanups when an exception is raised.
263 -- Front-End Zero Cost Exceptions
265 -- This approach uses separate exception tables. These use extra
266 -- storage, and exception propagation can be quite slow, but there
267 -- is no overhead in setting up an exception handler (it is to this
268 -- latter operation that the phrase zero-cost refers). This approach
269 -- is only available on some targets, and is the default where it is
272 -- The generation of the exception tables is handled by the front
273 -- end of the compiler. It does not use any back end support (such
274 -- as the GCC3 exception handling mechanism). When this approach
275 -- is used, the compiler generates special exception handlers for
276 -- handling cleanups when an exception is raised.
278 -- Back-End Zero Cost Exceptions
280 -- With this approach, the back end handles the generation and
281 -- handling of exceptions. For example, the GCC3 exception handling
282 -- mechanisms are used in this mode. The front end simply generates
283 -- code for explicit exception handlers, and AT END cleanup handlers
284 -- are simply passed unchanged to the backend for generating cleanups
285 -- both in the exceptional and non-exceptional cases.
287 -- As the name implies, this approach generally uses a zero-cost
288 -- mechanism with tables, but the tables are generated by the back
289 -- end. However, since the back-end is entirely responsible for the
290 -- handling of exceptions, another mechanism might be used. In the
291 -- case of GCC3 for instance, it might be the case that the compiler
292 -- is configured for setjmp/longjmp handling, then everything will
293 -- work correctly. However, it is definitely preferred that the
294 -- back end provide zero cost exception handling.
296 -- Controlling the selection of methods
298 -- On most implementations, back-end zero-cost exceptions are used.
299 -- Otherwise, Front-End Longjmp/Setjmp approach is used.
300 -- Note that there is a requirement that all Ada units in a partition
301 -- be compiled with the same exception model.
303 -- Control of Available Methods and Defaults
305 -- The following switches specify whether ZCX is available, and
306 -- whether it is enabled by default.
308 ZCX_By_Default_On_Target
: Boolean := False;
309 -- Indicates if zero cost exceptions are active by default. If this
310 -- variable is False, then the only possible exception method is the
311 -- front-end setjmp/longjmp approach, and this is the default. If
312 -- this variable is True, then GCC ZCX is used.
314 ------------------------------------
315 -- Run-Time Library Configuration --
316 ------------------------------------
318 -- In configurable run-time mode, the system run-time may not support
319 -- the full Ada language. The effect of setting this switch is to let
320 -- the compiler know that it is not surprising (i.e. the system is not
321 -- misconfigured) if run-time library units or entities within units are
322 -- not present in the run-time.
324 Configurable_Run_Time_On_Target
: Boolean := False;
325 -- Indicates that the system.ads file is for a configurable run-time
327 -- This has some specific effects as follows
329 -- The binder generates the gnat_argc/argv/envp variables in the
330 -- binder file instead of being imported from the run-time library.
331 -- If Command_Line_Args_On_Target is set to False, then the
332 -- generation of these variables is suppressed completely.
334 -- The binder generates the gnat_exit_status variable in the binder
335 -- file instead of being imported from the run-time library. If
336 -- Exit_Status_Supported_On_Target is set to False, then the
337 -- generation of this variable is suppressed entirely.
339 -- The routine __gnat_break_start is defined within the binder file
340 -- instead of being imported from the run-time library.
342 -- The variable __gnat_exit_status is generated within the binder file
343 -- instead of being imported from the run-time library.
345 Suppress_Standard_Library_On_Target
: Boolean := False;
346 -- If this flag is True, then the standard library is not included by
347 -- default in the executable (see unit System.Standard_Library in file
348 -- s-stalib.ads for details of what this includes). This is for example
349 -- set True for the zero foot print case, where these files should not
350 -- be included by default.
352 -- This flag has some other related effects:
354 -- The generation of global variables in the bind file is suppressed,
355 -- with the exception of the priority of the environment task, which
356 -- is needed by the Ravenscar run-time.
358 -- The calls to __gnat_initialize and __gnat_finalize are omitted
360 -- All finalization and initialization (controlled types) is omitted
362 -- The routine __gnat_handler_installed is not imported
364 Preallocated_Stacks_On_Target
: Boolean := False;
365 -- If this flag is True, then the expander preallocates all task stacks
366 -- at compile time. If the flag is False, then task stacks are not pre-
367 -- allocated, and task stack allocation is the responsibility of the
368 -- run-time (which typically delegates the task to the underlying
369 -- operating system environment).
371 ---------------------
372 -- Duration Format --
373 ---------------------
375 -- By default, type Duration is a 64-bit fixed-point type with a delta
376 -- and small of 10**(-9) (i.e. it is a count in nanoseconds. This flag
377 -- allows that standard format to be modified.
379 Duration_32_Bits_On_Target
: Boolean := False;
380 -- If True, then Duration is represented in 32 bits and the delta and
381 -- small values are set to 20.0*(10**(-3)) (i.e. it is a count in units
382 -- of 20 milliseconds.
384 ------------------------------------
385 -- Back-End Code Generation Flags --
386 ------------------------------------
388 -- These flags indicate possible limitations in what the code generator
389 -- can handle. They will all be True for a full run-time, but one or more
390 -- of these may be false for a configurable run-time, and if a feature is
391 -- used at the source level, and the corresponding flag is false, then an
392 -- error message will be issued saying the feature is not supported.
394 Atomic_Sync_Default_On_Target
: Boolean := True;
395 -- Access to atomic variables requires memory barrier synchronization in
396 -- the general case to ensure proper behavior when such accesses are used
397 -- on a multi-processor to synchronize tasks (e.g. by using spin locks).
398 -- The setting of this flag determines the default behavior. Normally this
399 -- is True, which will mean that appropriate synchronization instructions
400 -- are generated by default. If it is False, then the default will be that
401 -- these synchronization instructions are not generated. This may be a more
402 -- appropriate default in some cases, e.g. on embedded targets which do not
403 -- allow the possibility of multi-processors. The default can be overridden
404 -- using pragmas Enable/Disable_Atomic_Synchronization and also by use of
405 -- the corresponding debug flags -gnatd.e and -gnatd.d.
407 Support_Aggregates_On_Target
: Boolean := True;
408 -- In the general case, the use of aggregates may generate calls
409 -- to run-time routines in the C library, including memset, memcpy,
410 -- memmove, and bcopy. This flag is set to True if these routines
411 -- are available. If any of these routines is not available, then
412 -- this flag is False, and the use of aggregates is not permitted.
414 Support_Atomic_Primitives_On_Target
: Boolean := False;
415 -- If this flag is True, then the back-end support GCC built-in atomic
416 -- operations for memory model such as atomic load or atomic compare
417 -- exchange (see the GCC manual for more information). If the flag is
418 -- False, then the back-end doesn't provide this support. Note this flag is
419 -- set to True only if the target supports all atomic primitives up to 64
420 -- bits. ??? To be modified.
422 Support_Composite_Assign_On_Target
: Boolean := True;
423 -- The assignment of composite objects other than small records and
424 -- arrays whose size is 64-bits or less and is set by an explicit
425 -- size clause may generate calls to memcpy, memmove, and bcopy.
426 -- If versions of all these routines are available, then this flag
427 -- is set to True. If any of these routines is not available, then
428 -- the flag is set False, and composite assignments are not allowed.
430 Support_Composite_Compare_On_Target
: Boolean := True;
431 -- If this flag is True, then the back end supports bit-wise comparison
432 -- of composite objects for equality, either generating inline code or
433 -- calling appropriate (and available) run-time routines. If this flag
434 -- is False, then the back end does not provide this support, and the
435 -- front end uses component by component comparison for composites.
437 Support_Long_Shifts_On_Target
: Boolean := True;
438 -- If True, the back end supports 64-bit shift operations. If False, then
439 -- the source program may not contain explicit 64-bit shifts. In addition,
440 -- the code generated for packed arrays will avoid the use of long shifts.
442 Support_Nondefault_SSO_On_Target
: Boolean := True;
443 -- If True, the back end supports the non-default Scalar_Storage_Order
444 -- (i.e. allows non-confirming Scalar_Storage_Order attribute definition
451 Always_Compatible_Rep_On_Target
: Boolean := True;
452 -- If True, the Can_Use_Internal_Rep flag (see Einfo) is set to False in
453 -- all cases. This corresponds to the traditional code generation
454 -- strategy. False allows the front end to choose a policy that partly or
455 -- entirely eliminates dynamically generated trampolines.
457 -------------------------------
458 -- Control of Stack Checking --
459 -------------------------------
461 -- GNAT provides three methods of implementing exceptions:
463 -- GCC Probing Mechanism
465 -- This approach uses the standard GCC mechanism for
466 -- stack checking. The method assumes that accessing
467 -- storage immediately beyond the end of the stack
468 -- will result in a trap that is converted to a storage
469 -- error by the runtime system. This mechanism has
470 -- minimal overhead, but requires complex hardware,
471 -- operating system and run-time support. Probing is
472 -- the default method where it is available. The stack
473 -- size for the environment task depends on the operating
474 -- system and cannot be set in a system-independent way.
476 -- GCC Stack-limit Mechanism
478 -- This approach uses the GCC stack limits mechanism.
479 -- It relies on comparing the stack pointer with the
480 -- values of a global symbol. If the check fails, a
481 -- trap is explicitly generated. The advantage is
482 -- that the mechanism requires no memory protection,
483 -- but operating system and run-time support are
484 -- needed to manage the per-task values of the symbol.
485 -- This is the default method after probing where it
488 -- GNAT Stack-limit Checking
490 -- This method relies on comparing the stack pointer
491 -- with per-task stack limits. If the check fails, an
492 -- exception is explicitly raised. The advantage is
493 -- that the method requires no extra system dependent
494 -- runtime support and can be used on systems without
495 -- memory protection as well, but at the cost of more
496 -- overhead for doing the check. This is the fallback
497 -- method if the above two are not supported.
499 Stack_Check_Probes_On_Target
: Boolean := False;
500 -- Indicates if the GCC probing mechanism is used
502 Stack_Check_Limits_On_Target
: Boolean := False;
503 -- Indicates if the GCC stack-limit mechanism is used
505 -- Both flags cannot be simultaneously set to True. If neither
506 -- is, the target independent fallback method is used.
508 Stack_Check_Default_On_Target
: Boolean := False;
509 -- Indicates if stack checking is on by default
511 ----------------------------
512 -- Command Line Arguments --
513 ----------------------------
515 -- For most ports of GNAT, command line arguments are supported. The
516 -- following flag is set to False for targets that do not support
517 -- command line arguments (VxWorks and AAMP). Note that support of
518 -- command line arguments is not required on such targets (RM A.15(13)).
520 Command_Line_Args_On_Target
: Boolean := True;
521 -- Set False if no command line arguments on target. Note that if this
522 -- is False in with Configurable_Run_Time_On_Target set to True, then
523 -- this causes suppression of generation of the argv/argc variables
524 -- used to record command line arguments.
526 -- Similarly, most ports support the use of an exit status, but AAMP
527 -- is an exception (as allowed by RM A.15(18-20))
529 Exit_Status_Supported_On_Target
: Boolean := True;
530 -- Set False if returning of an exit status is not supported on target.
531 -- Note that if this False in with Configurable_Run_Time_On_Target
532 -- set to True, then this causes suppression of the gnat_exit_status
533 -- variable used to record the exit status.
535 -----------------------
536 -- Main Program Name --
537 -----------------------
539 -- When the binder generates the main program to be used to create the
540 -- executable, the main program name is main by default (to match the
541 -- usual Unix practice). If this parameter is set to True, then the
542 -- name is instead by default taken from the actual Ada main program
543 -- name (just the name of the child if the main program is a child unit).
544 -- In either case, this value can be overridden using -M name.
546 Use_Ada_Main_Program_Name_On_Target
: Boolean := False;
547 -- Set True to use the Ada main program name as the main name
549 ----------------------------------------------
550 -- Boolean-Valued Floating-Point Attributes --
551 ----------------------------------------------
553 -- The constants below give the values for representation oriented
554 -- floating-point attributes that are the same for all float types
555 -- on the target. These are all boolean values.
557 -- A value is only True if the target reliably supports the corresponding
558 -- feature. Reliably here means that support is guaranteed for all
559 -- possible settings of the relevant compiler switches (like -mieee),
560 -- since we cannot control the user setting of those switches.
562 -- The attributes cannot dependent on the current setting of compiler
563 -- switches, since the values must be static and consistent throughout
564 -- the partition. We probably should add such consistency checks in future,
565 -- but for now we don't do this.
567 -- Note: the compiler itself does not use floating-point, so the
568 -- settings of the defaults here are not really relevant.
570 -- Note: in some cases, proper support of some of these floating point
571 -- features may require a specific switch (e.g. -mieee on the Alpha)
572 -- to be used to obtain full RM compliant support.
574 Denorm_On_Target
: Boolean := False;
575 -- Set to False on targets that do not reliably support denormals
577 Machine_Rounds_On_Target
: Boolean := True;
578 -- Set to False for targets where S'Machine_Rounds is False
580 Machine_Overflows_On_Target
: Boolean := False;
581 -- Set to True for targets where S'Machine_Overflows is True
583 Signed_Zeros_On_Target
: Boolean := True;
584 -- Set to False on targets that do not reliably support signed zeros
586 -------------------------------------------
587 -- Boolean-Valued Fixed-Point Attributes --
588 -------------------------------------------
590 Fractional_Fixed_Ops_On_Target
: Boolean := False;
591 -- Set to True for targets that support fixed-by-fixed multiplication
592 -- and division for fixed-point types with a small value equal to
593 -- 2 ** (-(T'Object_Size - 1)) and whose values have an absolute
594 -- value less than 1.0.
600 -- Normally when using the GCC backend, Gigi and GCC perform much of the
601 -- data layout using the standard layout capabilities of GCC. If the
602 -- parameter Backend_Layout is set to False, then the front end must
603 -- perform all data layout. For further details see the package Layout.
605 Frontend_Layout_On_Target
: Boolean := False;
606 -- Set True if front end does layout
612 -- These subprograms are used to initialize the target parameter values
613 -- from the system.ads file. Note that this is only done once, so if more
614 -- than one call is made to either routine, the second and subsequent
615 -- calls are ignored. It also reads restriction pragmas from system.ads
616 -- and records them, though as further detailed below, the caller has some
617 -- control over the handling of No_Dependence restrictions.
619 type Make_Id_Type
is access function (Str
: Text_Buffer
) return Node_Id
;
620 -- Parameter type for Get_Target_Parameters for function that creates an
621 -- identifier node with Sloc value System_Location and given string as the
624 type Make_SC_Type
is access function (Pre
, Sel
: Node_Id
) return Node_Id
;
625 -- Parameter type for Get_Target_Parameters for function that creates a
626 -- selected component with Sloc value System_Location and given Prefix
627 -- (Pre) and Selector (Sel) values.
629 type Set_RND_Type
is access procedure (Unit
: Node_Id
);
630 -- Parameter type for Get_Target_Parameters that records a Restriction
631 -- No_Dependence for the given unit (identifier or selected component).
633 procedure Get_Target_Parameters
634 (System_Text
: Source_Buffer_Ptr
;
635 Source_First
: Source_Ptr
;
636 Source_Last
: Source_Ptr
;
637 Make_Id
: Make_Id_Type
:= null;
638 Make_SC
: Make_SC_Type
:= null;
639 Set_RND
: Set_RND_Type
:= null);
640 -- Called at the start of execution to obtain target parameters from
641 -- the source of package System. The parameters provide the source
642 -- text to be scanned (in System_Text (Source_First .. Source_Last)).
643 -- if the three subprograms are left at their default value of null,
644 -- Get_Target_Parameters will ignore pragma Restrictions No_Dependence
645 -- lines, otherwise it will use these three subprograms to record them.
647 procedure Get_Target_Parameters
648 (Make_Id
: Make_Id_Type
:= null;
649 Make_SC
: Make_SC_Type
:= null;
650 Set_RND
: Set_RND_Type
:= null);
651 -- This version reads in system.ads using Osint. The idea is that the
652 -- caller uses the first version if they have to read system.ads anyway
653 -- (e.g. the compiler) and uses this simpler interface if system.ads is
654 -- not otherwise needed.