+2008-04-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * s-secsta.adb, s-sequio.ads, s-shasto.ads,
+ s-soflin.ads, s-stalib.ads, s-stausa.adb,
+ s-stausa.ads, s-strxdr.adb, s-taenca.adb, s-taenca.ads,
+ s-taprob.adb, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
+ s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-posix.adb,
+ s-taprop-solaris.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
+ s-taprop-vxworks.adb, s-taprop.ads, s-tarest.adb,
+ s-tarest.ads, s-tasini.adb, s-tasini.ads, s-taskin.ads,
+ s-tasque.ads, s-tassta.adb, s-tassta.ads, s-tasuti.ads,
+ s-tpoben.adb, s-tpoben.ads, s-tpobop.adb,
+ s-tpopsp-posix.adb, s-tpopsp-rtems.adb, s-tposen.adb,
+ s-tposen.ads, s-traceb-hpux.adb, s-traces.ads,
+ s-trafor-default.ads, s-unstyp.ads, s-utf_32.ads,
+ s-vaflop.adb, s-vaflop.ads, s-valrea.adb, s-valuti.adb,
+ s-wchstw.ads, s-wchwts.adb, s-wchwts.ads, scans.ads,
+ scn.adb, scng.adb, seh_init.c, sem.ads, sem_aggr.adb,
+ sem_attr.adb, sem_attr.ads, sem_case.adb, sem_case.ads,
+ sem_cat.adb, sem_cat.ads: Fix comment typos.
+
2008-04-12 Joel Sherrill <joel@oarcorp.com>
PR ada/35825
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- For the static case, the secondary stack is a single contiguous
-- chunk of storage, carved out of the primary stack, and represented
- -- by the following data strcuture
+ -- by the following data structure
type Fixed_Stack_Id is record
Top : SS_Ptr;
end loop;
-- Find out if the available memory in the current chunk is
- -- sufficient, if not, go to the next one and eventally create
+ -- sufficient, if not, go to the next one and eventually create
-- the necessary room.
while Chunk.Last - Stack.Top + 1 < Max_Size loop
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
------------------------------------------------------------------------------
-- This package contains the declaration of the control block used for
--- Seqential_IO. This must be declared at the outer library level. It also
+-- Sequential_IO. This must be declared at the outer library level. It also
-- contains code that is shared between instances of Sequential_IO.
with System.File_Control_Block;
-- --
-- S p e c --
-- --
--- Copyright (C) 1998-2006, Free Software Foundation, Inc. --
+-- Copyright (C) 1998-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- --
------------------------------------------------------------------------------
--- This package manages the shared/persistant storage required for
+-- This package manages the shared/persistent storage required for
-- full implementation of variables in Shared_Passive packages, more
-- precisely variables whose enclosing dynamic scope is a shared
-- passive package. This implementation is specific to GNAT and GLADE
-- the same stream is used simultaneously, both operations can
-- terminate abruptly by raising exception Mode_Error because the
-- stream has been opened in read mode and then in write mode and at
--- least used by the read opartion. To avoid this unexpected
+-- least used by the read operation. To avoid this unexpected
-- behaviour, we introduce a synchronization at the partition level.
-- Note: a special circuit allows the use of stream attributes Read and
-- the lock is busy.
procedure Shared_Var_Unlock (Var : String);
- -- This procedure releases the shared storage lock obtaind by a
+ -- This procedure releases the shared storage lock obtained by a
-- prior call to the Shared_Mem_Lock procedure, and is to be
-- generated as the last operation in the body of a protected
-- subprogram.
function return String;
pragma Favor_Top_Level (Task_Name_Call);
- -- Suppress checks on all these types, since we know the corrresponding
+ -- Suppress checks on all these types, since we know the corresponding
-- values can never be null (the soft links are always initialized).
pragma Suppress (Access_Check, No_Param_Proc);
-- The following record defines the underlying representation of exceptions
- -- WARNING! Any changes to this may need to be reflectd in the following
+ -- WARNING! Any changes to this may need to be reflected in the following
-- locations in the compiler and runtime code:
-- 1. The Internal_Exception routine in s-exctab.adb
-- Definitions for standard predefined exceptions defined in Standard,
- -- Why are the Nul's necessary here, seems like they should not be
+ -- Why are the NULs necessary here, seems like they should not be
-- required, since Gigi is supposed to add a Nul to each name ???
Constraint_Error_Name : constant String := "CONSTRAINT_ERROR" & ASCII.NUL;
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2008, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- If variable GNAT_STACK_LIMIT is set, then we will take care of the
-- environment task, using GNAT_STASK_LIMIT as the size of the stack.
- -- It doens't make sens to process the stack when no bound is set (e.g.
+ -- It doesn't make sens to process the stack when no bound is set (e.g.
-- limit is typically up to 4 GB).
if Stack_Size_Chars /= Null_Address then
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2008, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- this point, it will increase the measured stack size.
-- Strategy: We could augment this stack frame and see if it changes the
- -- measure. However, this error should be negligeable.
+ -- measure. However, this error should be negligible.
-- Pattern zone overflow:
-- When this flag is true, then stack analysis is enabled
procedure Compute_Result (Analyzer : in out Stack_Analyzer);
- -- Read the patern zone and deduce the stack usage. It should be called
+ -- Read the pattern zone and deduce the stack usage. It should be called
-- from the same frame as Fill_Stack. If Analyzer.Probe is not null, an
-- array of Unsigned_32 with Analyzer.Probe elements is allocated on
-- Compute_Result's stack frame. Probe can be used to detect the error:
procedure Report_Result (Analyzer : Stack_Analyzer);
-- Store the results of the computation in memory, at the address
-- corresponding to the symbol __gnat_stack_usage_results. This is not
- -- done inside Compute_Resuls in order to use as less stack as possible
+ -- done inside Compute_Result in order to use as less stack as possible
-- within a task.
procedure Output_Results;
-- Pattern used to recognize untouched memory
Bottom_Pattern_Mark : Stack_Address;
- -- Bound of the pattern area on the stack clostest to the bottom
+ -- Bound of the pattern area on the stack closest to the bottom
Top_Pattern_Mark : Stack_Address;
-- Topmost bound of the pattern area on the stack
(SP_Low : Stack_Address;
SP_High : Stack_Address) return Natural;
pragma Inline (Stack_Size);
- -- Return the size of a portion of stack delimeted by SP_High and SP_Low
+ -- Return the size of a portion of stack delimited by SP_High and SP_Low
-- (), i.e. the difference between SP_High and SP_Low. The storage element
-- pointed by SP_Low is not included in the size. Inlined to reduce the
-- size of the stack used by the instrumentation code.
-- This file is an alternate version of s-stratt.adb based on the XDR
-- standard. It is especially useful for exchanging streams between two
--- different systems with different basic type representations and endianess.
+-- different systems with different basic type representations and endianness.
with Ada.IO_Exceptions;
with Ada.Streams; use Ada.Streams;
F_Size : Integer; -- Fraction bit size
E_Last : Integer; -- Max exponent value
F_Mask : SE; -- Mask to apply on first fraction byte
- E_Bytes : SEO; -- N. of exponent bytes completly used
- F_Bytes : SEO; -- N. of fraction bytes completly used
+ E_Bytes : SEO; -- N. of exponent bytes completely used
+ F_Bytes : SEO; -- N. of fraction bytes completely used
F_Bits : Integer; -- N. of bits used on first fraction word
end record;
pragma Inline (Poll_Base_Priority_Change_At_Entry_Call);
-- A specialized version of Poll_Base_Priority_Change, that does the
-- optional entry queue reordering. Has to be called with the Self_ID's
- -- ATCB write-locked. May temporariliy release the lock.
+ -- ATCB write-locked. May temporarily release the lock.
---------------------
-- Check_Exception --
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
pragma Inline (Try_To_Cancel_Entry_Call);
-- Try to cancel async. entry call.
-- Effect includes Abort_To_Level and Wait_For_Completion.
- -- Cancelled = True iff the cancelation was successful, i.e.,
+ -- Cancelled = True iff the cancellation was successful, i.e.,
-- the call was not Done before this call.
-- On return, the call is off-queue and the ATC level is reduced by one.
Ceiling_Violation : Boolean;
begin
- -- The lock is made without defering abort
+ -- The lock is made without deferring abort
-- Therefore the abort has to be deferred before calling this routine.
-- This means that the compiler has to generate a Defer_Abort call
-- read ownership of the protected object, so that this method of
-- storing the (single) protected object's owner does not work reliably
-- for read locks. However, this is the approach taken for two major
- -- reasosn: first, this function is not currently being used (it is
+ -- reasons: first, this function is not currently being used (it is
-- provided for possible future use), and second, it largely simplifies
-- the implementation.
-- Note: mutexes and cond_variables needed per-task basis are initialized
-- in Initialize_TCB and the Storage_Error is handled. Other mutexes (such
-- as RTS_Lock, Memory_Lock...) used in RTS is initialized before any
- -- status change of RTS. Therefore rasing Storage_Error in the following
+ -- status change of RTS. Therefore raising Storage_Error in the following
-- routines should be able to be handled safely.
procedure Initialize_Lock
Succeeded := Result = 0;
pthread_detach (T.Common.LL.Thread'Access);
- -- Detach the thread using pthread_detach, sinc DCE threads do not have
+ -- Detach the thread using pthread_detach, since DCE threads do not have
-- pthread_attr_set_detachstate.
Result := pthread_attr_destroy (Attributes'Access);
-- Note: mutexes and cond_variables needed per-task basis are initialized
-- in Initialize_TCB and the Storage_Error is handled. Other mutexes (such
-- as RTS_Lock, Memory_Lock...) used in RTS is initialized before any
- -- status change of RTS. Therefore rasing Storage_Error in the following
+ -- status change of RTS. Therefore raising Storage_Error in the following
-- routines should be able to be handled safely.
procedure Initialize_Lock
-- Note: mutexes and cond_variables needed per-task basis are initialized
-- in Initialize_TCB and the Storage_Error is handled. Other mutexes (such
-- as RTS_Lock, Memory_Lock...) used in RTS is initialized before any
- -- status change of RTS. Therefore rasing Storage_Error in the following
+ -- status change of RTS. Therefore raising Storage_Error in the following
-- routines should be able to be handled safely.
procedure Initialize_Lock
---------------------
-- Note: mutexes and cond_variables needed per-task basis are initialized
- -- in Intialize_TCB and the Storage_Error is handled. Other mutexes (such
+ -- in Initialize_TCB and the Storage_Error is handled. Other mutexes (such
-- as RTS_Lock, Memory_Lock...) used in the RTS is initialized before any
-- status change of RTS. Therefore raising Storage_Error in the following
-- routines should be able to be handled safely.
-- This is because the GetCurrentThread NT call does not return the real
-- thread handler but only a "pseudo" one. It is not possible to release
- -- the thread handle and free the system ressources from this "pseudo"
+ -- the thread handle and free the system resources from this "pseudo"
-- handle. So we really want to keep the real thread handle set in
-- System.Task_Primitives.Operations.Create_Task during thread creation.
if Self_ID.Common.LL.Thread /= 0 then
-- This task has been activated. Wait for the thread to terminate
- -- then close it. this is needed to release system ressources.
+ -- then close it. This is needed to release system resources.
Result := WaitForSingleObject (T.Common.LL.Thread, Wait_Infinite);
pragma Assert (Result /= WAIT_FAILED);
---------------------
-- Note: mutexes and cond_variables needed per-task basis are
- -- initialized in Intialize_TCB and the Storage_Error is
+ -- initialized in Initialize_TCB and the Storage_Error is
-- handled. Other mutexes (such as RTS_Lock, Memory_Lock...)
-- used in RTS is initialized before any status change of RTS.
- -- Therefore rasing Storage_Error in the following routines
+ -- Therefore raising Storage_Error in the following routines
-- should be able to be handled safely.
procedure Initialize_Lock
-- controls whether we emulate priority ceiling locking
-- To get a scheduling close to annex D requirements, we use the real-time
- -- class provided for LWP's and map each task/thread to a specific and
+ -- class provided for LWPs and map each task/thread to a specific and
-- unique LWP (there is 1 thread per LWP, and 1 LWP per thread).
-- The real time class can only be set when the process has root
- -- priviledges, so in the other cases, we use the normal thread scheduling
+ -- privileges, so in the other cases, we use the normal thread scheduling
-- and priority handling.
Using_Real_Time_Class : Boolean := False;
- -- indicates wether the real time class is being used (i.e the process
- -- has root priviledges).
+ -- indicates whether the real time class is being used (i.e the process
+ -- has root privileges).
Prio_Param : aliased struct_pcparms;
-- Hold priority info (Real_Time) initialized during the package
-- Note: mutexes and cond_variables needed per-task basis are initialized
-- in Initialize_TCB and the Storage_Error is handled. Other mutexes (such
-- as RTS_Lock, Memory_Lock...) used in RTS is initialized before any
- -- status change of RTS. Therefore rasing Storage_Error in the following
+ -- status change of RTS. Therefore raising Storage_Error in the following
-- routines should be able to be handled safely.
procedure Initialize_Lock
pragma Assert (Result = 0 or else Result = EINTR);
end Sleep;
- -- Note that we are relying heaviliy here on GNAT represting Calendar.Time,
- -- System.Real_Time.Time, Duration, System.Real_Time.Time_Span in the same
- -- way, i.e., as a 64-bit count of nanoseconds.
+ -- Note that we are relying heavily here on GNAT representing
+ -- Calendar.Time, System.Real_Time.Time, Duration,
+ -- System.Real_Time.Time_Span in the same way, i.e., as a 64-bit count of
+ -- nanoseconds.
- -- This allows us to always pass the timeout value as a Duration
+ -- This allows us to always pass the timeout value as a Duration.
-- ???
-- We are taking liberties here with the semantics of the delays. That is,
-- Note: mutexes and cond_variables needed per-task basis are initialized
-- in Initialize_TCB and the Storage_Error is handled. Other mutexes (such
-- as RTS_Lock, Memory_Lock...) used in RTS is initialized before any
- -- status change of RTS. Therefore rasing Storage_Error in the following
+ -- status change of RTS. Therefore raising Storage_Error in the following
-- routines should be able to be handled safely.
procedure Initialize_Lock
-- Note: mutexes and cond_variables needed per-task basis are initialized
-- in Initialize_TCB and the Storage_Error is handled. Other mutexes (such
-- as RTS_Lock, Memory_Lock...) used in RTS is initialized before any
- -- status change of RTS. Therefore rasing Storage_Error in the following
+ -- status change of RTS. Therefore raising Storage_Error in the following
-- routines should be able to be handled safely.
procedure Initialize_Lock
else
-- If Ticks = int'last, it was most probably truncated so
-- let's make another round after recomputing Ticks from
- -- the the absolute time.
+ -- the absolute time.
if Ticks /= int'Last then
Timedout := True;
-- If Ticks = int'last, it was most probably truncated
-- so let's make another round after recomputing Ticks
- -- from the the absolute time.
+ -- from the absolute time.
if errno = S_objLib_OBJ_TIMEOUT and then Ticks /= int'Last then
Timedout := True;
-- It is not clear what to do about ceiling violations due to RTS calls
-- done at interrupt priority. In general, it is not acceptable to give
- -- all RTS locks interrupt priority, since that whould give terrible
+ -- all RTS locks interrupt priority, since that would give terrible
-- performance on systems where this has the effect of masking hardware
-- interrupts, though we could get away allowing Interrupt_Priority'last
-- where we are layered on an OS that does not allow us to mask interrupts.
-- thread of control in the RTS. Since we intend these routines to be used
-- for implementing the Single_Lock RTS, Lock_RTS should follow the first
-- Defer_Abort operation entering RTS. In the same fashion Unlock_RTS
- -- should preceed the last Undefer_Abort exiting RTS.
+ -- should precede the last Undefer_Abort exiting RTS.
--
-- These routines also replace the functions Lock/Unlock_All_Tasks_List
-- a task terminating due to completing the last statement of its body.
-- If the task terminates because of an exception raised by the
-- execution of its task body, then Cause is set to Unhandled_Exception.
- -- Aborts are not allowed in the restriced profile to which this file
+ -- Aborts are not allowed in the restricted profile to which this file
-- belongs.
EO : Exception_Occurrence;
-- single argument to State.
--
-- Elaborated is a pointer to a Boolean that must be set to true on exit
- -- if the task could be sucessfully elaborated.
+ -- if the task could be successfully elaborated.
--
-- Chain is a linked list of task that needs to be created. On exit,
-- Created_Task.Activation_Link will be Chain.T_ID, and Chain.T_ID will be
-- should not be necessary here, if Abort_Task is implemented correctly,
-- since Abort_Task should include the effect of Wakeup. However, the
-- above call was in earlier versions of this file, and at least for
- -- some targets Abort_Task has not beek doing Wakeup. It should not
+ -- some targets Abort_Task has not been doing Wakeup. It should not
-- hurt to uncomment the above call, until the error is corrected for
-- all targets.
-- and let it decide if it wants to complete the aborted construct
-- immediately.
- -- Note that the effect of the lowl-level Abort_Task is not persistent.
+ -- Note that the effect of the low-level Abort_Task is not persistent.
-- If the target task is not blocked, this wakeup will be missed.
-- We don't bother calling Abort_Task if this task is aborting itself,
-- Note that an earlier version of this code had some false reasoning
-- about being able to reliably wake up a task that had suspended on
- -- a blocking system call that does not atomically relase the task's
+ -- a blocking system call that does not atomically release the task's
-- lock (e.g., UNIX nanosleep, which we once thought could be used to
-- implement delays). That still left the possibility of missed
-- wakeups.
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- nested. The symptom of over-deferring abort is that an exception may
-- fail to be raised, or an abort may fail to take place.
- -- Therefore, there are two sets of the inlinable defer/undefer routines,
+ -- Therefore, there are two sets of the inlineable defer/undefer routines,
-- which are the ones to be used inside GNARL. One set allows nesting. The
-- other does not. People who maintain the GNARL should try to avoid using
-- the nested versions, or at least look very critically at the places
-- internal calls to the tasking runtime system assume abort is already
-- deferred, and do not modify the deferral level.
- -- There is also a set of non-linable defer/undefer routines, for direct
- -- call from the compiler. These are not in-lineable because they may need
+ -- There is also a set of non-inlineable defer/undefer routines, for direct
+ -- call from the compiler. These are not inlineable because they may need
-- to be called via pointers ("soft links"). For the sake of efficiency,
-- the version with Self_ID as parameter should used wherever possible.
-- These are all nestable.
procedure Change_Base_Priority (T : Task_Id);
-- Change the base priority of T. Has to be called with the affected
- -- task's ATCB write-locked. May temporariliy release the lock.
+ -- task's ATCB write-locked. May temporarily release the lock.
----------------------
-- Task Lock/Unlock --
-- Never undefer abort while holding a lock
-- Overlapping critical sections must be properly nested, and locks must
- -- be released in LIFO order. e.g., the following is not allowed:
+ -- be released in LIFO order. E.g., the following is not allowed:
-- Lock (X);
-- ...
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
procedure Requeue_Call_With_New_Prio
(Entry_Call : Entry_Call_Link; Prio : System.Any_Priority);
-- Change Priority of the call and re insert to the queue when priority
- -- queueing is in effect. When FIFO is inforced, this routine
+ -- queueing is in effect. When FIFO is enforced, this routine
-- should not have any effect.
end System.Tasking.Queuing;
with System.Soft_Links;
-- These are procedure pointers to non-tasking routines that use task
-- specific data. In the absence of tasking, these routines refer to global
--- data. In the presense of tasking, they must be replaced with pointers to
+-- data. In the presence of tasking, they must be replaced with pointers to
-- task-specific versions. Also used for Create_TSD, Destroy_TSD,
-- Get_Current_Excep, Finalize_Global_List, Task_Termination, Handler.
procedure Vulnerable_Complete_Task (Self_ID : Task_Id);
-- Complete the calling task. This procedure must be called with
-- abort deferred. It should only be called by Complete_Task and
- -- Finalizate_Global_Tasks (for the environment task).
+ -- Finalize_Global_Tasks (for the environment task).
procedure Vulnerable_Complete_Master (Self_ID : Task_Id);
-- Complete the current master of the calling task. This procedure
-- Package elaboration code
begin
- -- Establish the Adafinal softlink
+ -- Establish the Adafinal oftlink
-- This is not done inside the central RTS initialization routine
-- to avoid with-ing this package from System.Tasking.Initialization.
-- are those of the task to create. This parameter should be passed as
-- the single argument to State.
-- Elaborated is a pointer to a Boolean that must be set to true on exit
- -- if the task could be sucessfully elaborated.
+ -- if the task could be successfully elaborated.
-- Chain is a linked list of task that needs to be created. On exit,
-- Created_Task.Activation_Link will be Chain.T_ID, and Chain.T_ID
-- will be Created_Task (e.g the created task will be linked at the front
procedure Abort_Tasks (Tasks : Task_List);
-- Abort_Tasks is called to initiate abort, however, the actual
- -- aborti is done by aborted task by means of Abort_Handler
+ -- aborting is done by aborted task by means of Abort_Handler
procedure Make_Passive (Self_ID : Task_Id; Task_Completed : Boolean);
-- Update counts to indicate current task is either terminated or
raise Program_Error;
end if;
- -- The lock is made without defering abort
+ -- The lock is made without deferring abort
-- Therefore the abort has to be deferred before calling this routine.
-- This means that the compiler has to generate a Defer_Abort call
-- have read ownership of the protected object, so that this method of
-- storing the (single) protected object's owner does not work
-- reliably for read locks. However, this is the approach taken for two
- -- major reasosn: first, this function is not currently being used (it
+ -- major reasons: first, this function is not currently being used (it
-- is provided for possible future use), and second, it largely
-- simplifies the implementation.
(Object : Protection_Entries_Access) return Boolean;
-- Returns True if an Interrupt_Handler or Attach_Handler pragma applies
-- to the protected object. That is to say this primitive returns False for
- -- Protection, but is overriden to return True when interrupt handlers are
+ -- Protection, but is overridden to return True when interrupt handlers are
-- declared so the check required by C.3.1(11) can be implemented in
-- System.Tasking.Protected_Objects.Initialize_Protection.
-- See also Cancel_Protected_Entry_Call for code expansion of asynchronous
-- entry call.
- -- The initial part of this procedure does not need to lock the the calling
+ -- The initial part of this procedure does not need to lock the calling
-- task's ATCB, up to the point where the call record first may be queued
-- (PO_Do_Or_Queue), since before that no other task will have access to
-- the record.
-- There are some heuristics here, just to save time for frequently
-- occurring cases. For example, we check Initially_Abortable to try to
-- avoid calling the procedure Wait_Until_Abortable, since the normal case
- -- for async. entry calls is to be queued abortably.
+ -- for async. entry calls is to be queued abortably.
-- Another heuristic uses the Block.Enqueued to try to avoid calling
-- Cancel_Protected_Entry_Call if the call can be served immediately.
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- $Revision: 1.2 $
-- --
-- Copyright (C) 1991-2003, Florida State University --
+-- Copyright (C) 2008, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
------------------------------------------------------------------------------
-- This is a RTEMS version of this package which uses a special
--- variable for Ada self which is contexted switch implicitly by RTEMS.
+-- variable for Ada self which is context switched implicitly by RTEMS.
--
-- This is the same as the POSIX version except that an RTEMS variable
-- is used instead of a POSIX key.
-- have read ownership of the protected object, so that this method of
-- storing the (single) protected object's owner does not work
-- reliably for read locks. However, this is the approach taken for two
- -- major reasosn: first, this function is not currently being used (it
+ -- major reasons: first, this function is not currently being used (it
-- is provided for possible future use), and second, it largely
-- simplifies the implementation.
-- Lock a protected object for read access. Upon return, the caller
-- owns the lock for read access, and no other calls to Lock
-- with the same argument will return until the corresponding call
- -- to Unlock has been made by the caller. Other cals to Lock_Read_Only
+ -- to Unlock has been made by the caller. Other calls to Lock_Read_Only
-- may (but need not) return before the call to Unlock, and the
-- corresponding callers will also own the lock for read access.
-- B o d y --
-- --
-- Copyright (C) 1999-2006, AdaCore --
+-- Copyright (C) 2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- Frames with dynamic stack allocation are handled using the associated
-- frame pointer, but HP compilers and GCC setup this pointer differently.
-- HP compilers set it to point at the top (highest address) of the static
- -- part of the frame, wheras GCC sets it to point at the bottom of this
+ -- part of the frame, whereas GCC sets it to point at the bottom of this
-- region. We have to fake the unwinder to compensate for this difference,
-- for which we'll need to access some subprograms unwind descriptors.
-- --
-- S p e c --
-- --
--- Copyright (C) 2001-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2008, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- A new primitive, Send_Trace_Info (Id : Trace_T; 'data') is introduced.
-- Trace_T is an event identifier, 'data' are the informations to pass
--- with the event. Thid procedure is used from within the Runtime to send
+-- with the event. This procedure is used from within the Runtime to send
-- debug informations.
-- This primitive is overloaded in System.Traces.Tasking and this package
--- Send_Trace_Info calls Send_Trace, in System.Traces.Send, which is trarget
+-- Send_Trace_Info calls Send_Trace, in System.Traces.Send, which is target
-- dependent, to send the debug informations to a debugger, stream ..
-- To add a new event, just add them to the Trace_T type, and write the
-- corresponding Send_Trace_Info procedure. It may be required for some
--- target to modify Send_Trace (eg. VxWorks).
+-- target to modify Send_Trace (e.g. VxWorks).
-- To add a new target, just adapt System.Traces.Send to your own purposes
-- --
-- S p e c --
-- --
--- Copyright (C) 2001-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2008, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
subtype String_Trace is String (1 .. Max_Size);
-- Specific type in which trace information is stored. An ASCII.NUL
-- character ends the string so that it is compatible with C strings
- -- which is useful on some targets (eg. VxWorks)
+ -- which is useful on some targets (e.g. VxWorks)
-- These private functions handles String_Trace formatting
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
type Packed_Byte is mod 2 ** 8;
for Packed_Byte'Size use 8;
- -- Component type for Packed_Butes array
+ -- Component type for Packed_Bytes array
type Packed_Bytes1 is array (Natural range <>) of Packed_Byte;
for Packed_Bytes1'Alignment use 1;
pragma Import (Intrinsic, Rotate_Left);
pragma Import (Intrinsic, Rotate_Right);
- -- The following definitions are obsolsecent. They were needed by the
+ -- The following definitions are obsolescent. They were needed by the
-- previous version of the compiler and runtime, but are not needed
-- by the current version. We retain them to help with bootstrap path
-- problems. Also they seem harmless, and if any user programs have
-- --
-- S p e c --
-- --
--- Copyright (C) 2005-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 2005-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
function Is_UTF_32_Digit (U : UTF_32) return Boolean;
function Is_UTF_32_Digit (C : Category) return Boolean;
pragma Inline (Is_UTF_32_Digit);
- -- Returns true iff U is a digit that can be used to extend an identifer,
+ -- Returns true iff U is a digit that can be used to extend an identifier,
-- or if C is one of the corresponding categories, which are the following:
-- Number, Decimal_Digit (Nd)
function Is_UTF_32_Line_Terminator (U : UTF_32) return Boolean;
pragma Inline (Is_UTF_32_Line_Terminator);
-- Returns true iff U is an allowed line terminator for source programs,
- -- if U is in the category Zp (Separator, Paragaph), or Zs (Separator,
+ -- if U is in the category Zp (Separator, Paragraph), or Zs (Separator,
-- Line), or if U is a conventional line terminator (CR, LF, VT, FF).
-- There is no category version for this function, since the set of
-- characters does not correspond to a set of Unicode categories.
pragma Inline (Is_UTF_32_Other);
-- Returns true iff U is an other format character, which means that it
-- can be used to extend an identifier, but is ignored for the purposes of
- -- matching of identiers, or if C is one of the corresponding categories,
+ -- matching of identifiers, or if C is one of the corresponding categories,
-- which are the following:
-- Other, Format (Cf)
function Is_UTF_32_Punctuation (C : Category) return Boolean;
pragma Inline (Is_UTF_32_Punctuation);
-- Returns true iff U is a punctuation character that can be used to
- -- separate pices of an identifier, or if C is one of the corresponding
+ -- separate pieces of an identifier, or if C is one of the corresponding
-- categories, which are the following:
-- Punctuation, Connector (Pc)
-- Note that the Ada category format effector is subsumed by the above
-- list of Unicode categories.
--
- -- Note that Other, Unassiged (Cn) is quite deliberately not included
+ -- Note that Other, Unassigned (Cn) is quite deliberately not included
-- in the list of categories above. This means that should any of these
-- code positions be defined in future with graphic characters they will
-- be allowed without a need to change implementations or the standard.
-- --
-- B o d y --
-- --
--- Copyright (C) 1997-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1997-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- This is a dummy body for use on non-Alpha systems so that the library
-- can compile. This dummy version uses ordinary conversions and other
--- arithmetic operations. it is used only for testing purposes in the
+-- arithmetic operations. It is used only for testing purposes in the
-- case where the -gnatdm switch is used to force testing of VMS features
-- on non-VMS systems.
-- --
-- S p e c --
-- --
--- Copyright (C) 1997-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1997-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- These routines return a decimal C string image of their argument.
-- They are provided for implicit use by the debugger, in response to
-- the special encoding used for Vax floating-point types (see Exp_Dbug
- -- for details). They supercede the above Debug_Output_D/F/G routines
+ -- for details). They supersede the above Debug_Output_D/F/G routines
-- which didn't work properly with GDBTK.
procedure pd (Arg : D);
Num_Saved_Zeroes : Natural := 0;
-- This counts zeroes after the decimal point. A non-zero value means
- -- that this number of previously scanned digits are zero. if the end
+ -- that this number of previously scanned digits are zero. If the end
-- of the number is reached, these zeroes are simply discarded, which
-- ensures that trailing zeroes after the point never affect the value
-- (which might otherwise happen as a result of rounding). With this
P := P + 1;
-- If underscore is at the end of string, then this is an error and
- -- we raise Constraint_Error, leaving the pointer past the undescore.
- -- This seems a bit strange. It means e,g, that if the field is:
+ -- we raise Constraint_Error, leaving the pointer past the underscore.
+ -- This seems a bit strange. It means e.g. that if the field is:
-- 345_
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
EM : System.WCh_Con.WC_Encoding_Method);
-- This routine simply takes its argument and converts it to wide string
-- format, storing the result in R (1 .. L), with L being set appropriately
- -- on return. The caller guarantees that R is long enough to accomodate the
- -- result. This is used in the context of the Wide_Image attribute, where
- -- the argument is the corresponding 'Image attribute. Any wide character
- -- escape sequences in the string are converted to the corresponding wide
- -- character value. No syntax checks are made, it is assumed that any such
- -- sequences are validly formed (this must be assured by the caller), and
- -- results from the fact that Wide_Image is only used on strings that have
- -- been built by the compiler, such as images of enumeration literals. If
- -- the method for encoding is a shift-in, shift-out convention, then it is
- -- assumed that normal (non-wide character) mode holds at the start and end
- -- of the argument string. EM indicates the wide character encoding method.
+ -- on return. The caller guarantees that R is long enough to accommodate
+ -- the result. This is used in the context of the Wide_Image attribute,
+ -- where the argument is the corresponding 'Image attribute. Any wide
+ -- character escape sequences in the string are converted to the
+ -- corresponding wide character value. No syntax checks are made, it is
+ -- assumed that any such sequences are validly formed (this must be assured
+ -- by the caller), and results from the fact that Wide_Image is only used
+ -- on strings that have been built by the compiler, such as images of
+ -- enumeration literals. If the method for encoding is a shift-in,
+ -- shift-out convention, then it is assumed that normal (non-wide
+ -- character) mode holds at the start and end of the argument string. EM
+ -- indicates the wide character encoding method.
-- Note: in the WCEM_Brackets case, the brackets escape sequence is used
-- only for codes greater than 16#FF#.
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
end Wide_String_To_String;
--------------------------------
- -- Wide_Wide_Sring_To_String --
+ -- Wide_Wide_String_To_String --
--------------------------------
function Wide_Wide_String_To_String
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
------------------------------------------------------------------------------
-- This package contains the routine used to convert wide strings and wide
--- wide stringsto strings for use by wide and wide wide character attributes
+-- wide strings to strings for use by wide and wide wide character attributes
-- (value, image etc.) and also by the numeric IO subpackages of
-- Ada.Text_IO.Wide_Text_IO and Ada.Text_IO.Wide_Wide_Text_IO.
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- The following type is used to identify token types returned by Scan.
-- The class column in this table indicates the token classes which
- -- apply to the token, as defined by subsquent subtype declarations.
+ -- apply to the token, as defined by subsequent subtype declarations.
-- Note: Namet.Is_Keyword_Name depends on the fact that the first entry in
-- this type declaration is *not* for a reserved word. For details on why
Tok_Operator_Symbol, -- op symbol Name, Literal, Lit_Or_Name, Desig
- Tok_Identifier, -- identifer Name, Lit_Or_Name, Desig
+ Tok_Identifier, -- identifier Name, Lit_Or_Name, Desig
Tok_Double_Asterisk, -- **
Tok_End_Of_Line,
-- Represents an end of line. Not used during normal compilation scans
-- where end of line is ignored. Active for preprocessor scanning and
- -- also when scanning project files (where it is neede because of ???)
+ -- also when scanning project files (where it is needed because of ???)
Tok_Special,
-- Used only in preprocessor scanning (to represent one of the
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
Scan;
end if;
- -- Clear flags for reserved words used as indentifiers
+ -- Clear flags for reserved words used as identifiers
for J in Token_Type loop
Used_As_Identifier (J) := False;
-- Scan_Ptr points to the opening string quote (the checksum for this
-- character has not been accumulated yet). On return Scan_Ptr points
-- past the closing quote of the string literal, Token and Token_Node
- -- are set appropriately, and the checksum is upated.
+ -- are set appropriately, and the checksum is updated.
-----------------------
-- Check_End_Of_Line --
Underline_Found := False;
goto Scan_Identifier;
- -- Mark character is an error (at start of identifer)
+ -- Mark character is an error (at start of identifier)
elsif Is_UTF_32_Mark (Cat) then
Error_Msg
Underline_Found := False;
goto Scan_Identifier;
- -- Other format character is an error (at start of identifer)
+ -- Other format character is an error (at start of identifier)
elsif Is_UTF_32_Other (Cat) then
Error_Msg
-- Routine to scan line terminator. On entry Scan_Ptr points to a
-- character which is one of FF,LR,CR,VT, or one of the wide characters
- -- that is treated as a line termiantor.
+ -- that is treated as a line terminator.
<<Scan_Line_Terminator>>
-- Identifier scanning routine. On entry, some initial characters of
-- the identifier may have already been stored in Name_Buffer. If so,
- -- Name_Len has the number of characters stored. otherwise Name_Len is
+ -- Name_Len has the number of characters stored, otherwise Name_Len is
-- set to zero on entry. Underline_Found is also set False on entry.
<<Scan_Identifier>>
Underline_Found := True;
end if;
- -- Wide character in Unicode cateogory "Other, Format"
+ -- Wide character in Unicode category "Other, Format"
-- is accepted in an identifier, but is ignored and not
-- stored. It seems reasonable to exclude it from the
-- checksum.
* *
* C Implementation File *
* *
- * Copyright (C) 2005, Free Software Foundation, Inc. *
+ * Copyright (C) 2005-2008, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
#include "tconfig.h"
#include "tsystem.h"
-/* We don't have libiberty, so us malloc. */
+/* We don't have libiberty, so use malloc. */
#define xmalloc(S) malloc (S)
#else
-- Semantic Analysis: General Model --
--------------------------------------
--- Semantic processing involves 3 phases which are highly interwined
--- (ie mutually recursive):
+-- Semantic processing involves 3 phases which are highly intertwined
+-- (i.e. mutually recursive):
-- Analysis implements the bulk of semantic analysis such as
-- name analysis and type resolution for declarations,
-- recursive calls to itself to resolve operands.
-- Expansion if we are not generating code this phase is a no-op.
--- otherwise this phase expands, ie transforms, original
+-- otherwise this phase expands, i.e. transforms, original
-- declaration, expressions or instructions into simpler
-- structures that can be handled by the back-end. This
-- phase is also in charge of generating code which is
-- it up without causing too much distortion to our basic model.
-- A switch (In_Spec_Expression) is set to show that we are in the initial
--- occurence of a default expression. The analyzer is then called on this
+-- occurrence of a default expression. The analyzer is then called on this
-- expression with the switch set true. Analysis and resolution proceed almost
-- as usual, except that Freeze_Expression will not freeze non-static
-- expressions if this switch is set, and the call to Expand at the end of
-- The normal Analysis-Resolution-Expansion mechanism where expansion of the
-- children is performed before expansion of the parent does not work if the
-- code generated for the children by the expander needs to be evaluated
--- repeatdly (for instance in the above aggregate "new Thing (Function_Call)"
+-- repeatedly (for instance in the above aggregate "new Thing (Function_Call)"
-- needs to be called 100 times.)
--- The reason why this mecanism does not work is that, the expanded code for
+-- The reason why this mechanism does not work is that, the expanded code for
-- the children is typically inserted above the parent and thus when the
-- father gets expanded no re-evaluation takes place. For instance in the case
-- of aggregates if "new Thing (Function_Call)" is expanded before of the
-- expanded code for "new Thing (Function_Call)".
-- To remedy this situation we introduce a new flag which signals whether we
--- want a full analysis (ie expansion is enabled) or a pre-analysis which
+-- want a full analysis (i.e. expansion is enabled) or a pre-analysis which
-- performs Analysis and Resolution but no expansion.
-- After the complete pre-analysis of an expression has been carried out we
-- expansion phase is skipped.
--
-- When this flag is False the flag Expander_Active is also False (the
- -- Expander_Activer flag defined in the spec of package Expander tells you
+ -- Expander_Active flag defined in the spec of package Expander tells you
-- whether expansion is currently enabled). You should really regard this
-- as a read only flag.
-- Scope based suppress checks for the predefined checks (from initial
-- command line arguments, or from Suppress pragmas not including an entity
- -- entity name) are recorded in the Sem.Supress variable, and all that is
+ -- entity name) are recorded in the Sem.Suppress variable, and all that is
-- necessary is to save the state of this variable on scope entry, and
-- restore it on scope exit. This mechanism allows for fast checking of
-- the scope suppress state without needing complex data structures.
-- It is clear in retrospect that all semantic processing and visibility
-- structures should have been fully recursive. The rtsfind mechanism,
-- and the complexities brought about by subunits and by generic child
- -- units and their instantitions, have led to a hybrid model that carries
+ -- units and their instantiations, have led to a hybrid model that carries
-- more state than one would wish.
type Scope_Stack_Entry is record
Component : Node_Id);
-- Give possible misspelling diagnostic if Component is likely to be
-- a misspelling of one of the components of the Assoc_List.
- -- This is called by Resolv_Aggr_Expr after producing
+ -- This is called by Resolve_Aggr_Expr after producing
-- an invalid component error message.
procedure Check_Static_Discriminated_Subtype (T : Entity_Id; V : Node_Id);
-- appears last in the sub-aggregate. Check that we do not have
-- positional and named components in the array sub-aggregate (unless
-- the named association is an others choice). Finally if an others
- -- choice is present, make sure it is allowed in the aggregate contex.
+ -- choice is present, make sure it is allowed in the aggregate context.
--
-- 2. If the array sub-aggregate contains discrete_choices:
--
function Resolve_Aggr_Expr
(Expr : Node_Id;
Single_Elmt : Boolean) return Boolean;
- -- Resolves aggregate expression Expr. Returs False if resolution
+ -- Resolves aggregate expression Expr. Returns False if resolution
-- fails. If Single_Elmt is set to False, the expression Expr may be
-- used to initialize several array aggregate elements (this can
-- happen for discrete choices such as "L .. H => Expr" or the others
is
Nxt_Ind : constant Node_Id := Next_Index (Index);
Nxt_Ind_Constr : constant Node_Id := Next_Index (Index_Constr);
- -- Index is the current index corresponding to the expresion
+ -- Index is the current index corresponding to the expression
Resolution_OK : Boolean := True;
-- Set to False if resolution of the expression failed
Expr_Type := Etype (Component);
-- Otherwise we have to pick up the new type of the component from
- -- the new costrained subtype of the aggregate. In fact components
+ -- the new constrained subtype of the aggregate. In fact components
-- which are of a composite type might be constrained by a
-- discriminant, and we want to resolve Expr against the subtype were
-- all discriminant occurrences are replaced with their actual value.
-- in sem_ch3 and here rather than have a copy of the code which is a
-- maintenance nightmare.
- -- ??? Performace WARNING. The current implementation creates a new
+ -- ??? Performance WARNING. The current implementation creates a new
-- itype for all aggregates whose base type is discriminated.
-- This means that for record aggregates nested inside an array
-- aggregate we will create a new itype for each record aggregate
- -- if the array cmponent type has discriminants. For large aggregates
+ -- if the array component type has discriminants. For large aggregates
-- this may be a problem. What should be done in this case is
-- to reuse itypes as much as possible.
-- Note: This fragment of the tree is temporarily malformed
-- because the correct tree requires an E_Subprogram_Type entity
-- as the designated type. In most cases this designated type is
- -- later overriden by the semantics with the type imposed by the
+ -- later overridden by the semantics with the type imposed by the
-- context during the resolution phase. In the specific case of
-- the expression Address!(Prim'Unrestricted_Access), used to
-- initialize slots of dispatch tables, this work will be done by
-----------------
-- Constrained is never folded for now, there may be cases that
- -- could be handled at compile time. to be looked at later.
+ -- could be handled at compile time. To be looked at later.
when Attribute_Constrained =>
null;
when Attribute_Small =>
- -- The floating-point case is present only for Ada 83 compatability.
+ -- The floating-point case is present only for Ada 83 compatibility.
-- Note that strictly this is an illegal addition, since we are
-- extending an Ada 95 defined attribute, but we anticipate an
-- ARG ruling that will permit this.
-- We treat protected types like task types. It would make more
-- sense to have another enumeration value, but after all the
-- whole point of this feature is to be exactly DEC compatible,
- -- and changing the type Type_Clas would not meet this requirement.
+ -- and changing the type Type_Class would not meet this requirement.
elsif Is_Protected_Type (Typ) then
Id := RE_Type_Class_Task;
-- that generic unit. This includes any such attribute that
-- occurs within the body of a generic unit that is a child
-- of the generic unit where the subprogram is declared.
- -- The rule also prohibits applying the attibute when the
+ -- The rule also prohibits applying the attribute when the
-- access type is a generic formal access type (since the
-- level of the actual type is not known). This restriction
-- does not apply when the attribute type is an anonymous
--------------------
Attribute_Mechanism_Code => True,
- -- function'Mechanism_Code yeilds an integer code for the mechanism
+ -- function'Mechanism_Code yields an integer code for the mechanism
-- used for the result of function, and subprogram'Mechanism_Code (n)
-- yields the mechanism used for formal parameter number n (a static
-- integer value, 1 = first parameter). The code returned is:
-- A reference T'Null_Parameter denotes an (imaginary) object of type or
-- subtype T allocated at (machine) address zero. The attribute is
-- allowed only as the default expression of a formal parameter, or as
- -- an actual expression of a subporgram call. In either case, the
+ -- an actual expression of a subprogram call. In either case, the
-- subprogram must be imported.
--
-- The identity of the object is represented by the address zero in the
-- to convert this to an address using the same semantics as the
-- System.Storage_Elements.To_Address function. The important difference
-- is that this is a static attribute so it can be used in
- -- initializations in preealborate packages.
+ -- initializations in preelaborate packages.
----------------
-- Type_Class --
type Sort_Choice_Table_Type is array (Nat range <>) of Choice_Bounds;
-- This new array type is used as the actual table type for sorting
-- discrete choices. The reason for not using Choice_Table_Type, is that
- -- in Sort_Choice_Table_Type we reserve entry 0 for the sorting algortim
+ -- in Sort_Choice_Table_Type we reserve entry 0 for the sorting algorithm
-- (this is not absolutely necessary but it makes the code more
-- efficient).
-- --
-- S p e c --
-- --
--- Copyright (C) 1996-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1996-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
procedure No_OP (C : Node_Id);
-- The no-operation routine. Does absolutely nothing. Can be used
- -- in the following generic for the parameter Proces_Empty_Choice.
+ -- in the following generic for the parameter Process_Empty_Choice.
generic
with function Get_Alternatives (N : Node_Id) return List_Id;
-- alternatives, or array aggregate component associations or
-- record variants from which we can then access the actual lists
-- of discrete choices. N is the node for the original construct
- -- ie a case statement, an array aggregate or a record variant.
+ -- i.e. a case statement, an array aggregate or a record variant.
with function Get_Choices (A : Node_Id) return List_Id;
-- Given a case statement alternative, array aggregate component
-- to apply to the same library unit, in which case the unit has
-- all associated categories, so we need to be careful here to
-- check pragmas in proper Categorization order in order to
- -- return the lowest appplicable value.
+ -- return the lowest applicable value.
-- Ignore Pure specification if set by pragma Pure_Function
Unit_Category := Get_Categorization (Unit_Entity);
With_Category := Get_Categorization (Depended_Entity);
- -- These messages are wanings in GNAT mode, to allow it to be
+ -- These messages are warnings in GNAT mode, to allow it to be
-- judiciously turned off. Otherwise it is a real error.
Error_Msg_Warn := GNAT_Mode;
-- Static_Discriminant_Expr --
------------------------------
- -- We need to accomodate a Why_Not_Static call somehow here ???
+ -- We need to accommodate a Why_Not_Static call somehow here ???
function Static_Discriminant_Expr (L : List_Id) return Boolean is
Discriminant_Spec : Node_Id;
end;
-- Child depends on parent; therefore parent should also be categorized
- -- and satify the dependency hierarchy.
+ -- and satisfy the dependency hierarchy.
-- Check if N is a child spec
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- True when there is a attribute definition clause specifying attribute
-- Nam for Typ. In Ada 2005 mode, returns True only when the attribute
-- definition clause is visible, unless At_Any_Place is True (in which case
- -- no visiblity test is made, and True is returned as long as an attribute
+ -- no visibility test is made, and True is returned as long as an attribute
-- is visible at any place). Note that attribute definition clauses
-- inherited from parent types are taken into account by this predicate
-- (to test for presence of an attribute definition clause for one