OSDN Git Service

2007-04-20 Ed Schonberg <schonberg@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / lib-writ.ads
index 6741c9d..0d4a160 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2004 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2006, 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- --
@@ -16,8 +16,8 @@
 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
 -- for  more details.  You should have  received  a copy of the GNU General --
 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
--- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
--- MA 02111-1307, USA.                                                      --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
 --                                                                          --
 -- GNAT was originally developed  by the GNAT team at  New York University. --
 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
@@ -63,7 +63,7 @@ package Lib.Writ is
    --  If the following guidelines are respected, downward compatibility
    --  problems (old tools reading new ali files) should be minimized:
 
-   --    The basic key character format must be kept.
+   --    The basic key character format must be kept
 
    --    The V line must be the first line, this is checked by ali.adb
    --    even in Ignore_Errors mode, and is used to verify that the file
@@ -233,10 +233,6 @@ package Lib.Writ is
    --         UA  Unreserve_All_Interrupts pragma was processed in one or
    --             more units in this file
    --
-   --         UX  Generated code contains unit exception table pointer
-   --             (i.e. it uses zero-cost exceptions, and there is at
-   --             least one subprogram present).
-   --
    --         ZX  Units in this file use zero-cost exceptions and have
    --             generated exception tables. If ZX is not present, the
    --             longjmp/setjmp exception scheme is in use.
@@ -372,6 +368,26 @@ package Lib.Writ is
    --      line number of the corresponding Interrupt_State pragma.
    --      This is used in consistency messages.
 
+   --  -------------------------------------
+   --  -- S Priority Specific Dispatching --
+   --  -------------------------------------
+
+   --    S policy_identifier first_priority last_priority line-number
+
+   --      This line records information from a Priority_Specific_Dispatching
+   --      pragma. There is one line for each separate pragma, and if no such
+   --      pragmas are used, then no S lines are present.
+
+   --      The policy_identifier is the first character (upper case) of the
+   --      corresponding policy name (e.g. 'F' for FIFO_Within_Priorities).
+
+   --      The first_priority and last_priority fields define the range of
+   --      priorities to which the specified dispatching policy apply.
+
+   --      The line number is an unsigned decimal integer giving the
+   --      line number of the corresponding Priority_Specific_Dispatching
+   --      pragma. This is used in consistency messages.
+
    ----------------------------
    -- Compilation Unit Lines --
    ----------------------------
@@ -390,7 +406,7 @@ package Lib.Writ is
    --  -- U  Unit Header --
    --  --------------------
 
-   --  The lines for each compilation unit have the following form.
+   --  The lines for each compilation unit have the following form
 
    --    U unit-name source-name version <<attributes>>
    --
@@ -407,6 +423,14 @@ package Lib.Writ is
    --      The <<attributes>> are a series of two letter codes indicating
    --      information about the unit:
    --
+   --         BD  Unit does not have pragma Elaborate_Body, but the elaboration
+   --             circuit has determined that it would be a good idea if this
+   --             pragma were present, since the body of the package contains
+   --             elaboration code that modifies one or more variables in the
+   --             visible part of the package. The binder will try, but does
+   --             not promise, to keep the elaboration of the body close to
+   --             the elaboration of the spec.
+   --
    --         DE  Dynamic Elaboration. This unit was compiled with the
    --             dynamic elaboration model, as set by either the -gnatE
    --             switch or pragma Elaboration_Checks (Dynamic).
@@ -466,7 +490,7 @@ package Lib.Writ is
 
    --  Following each U line, is a series of lines of the form
 
-   --    W unit-name [source-name lib-name] [E] [EA] [ED]
+   --    W unit-name [source-name lib-name] [E] [EA] [ED] [AD]
    --
    --      One of these lines is present for each unit that is mentioned in
    --      an explicit with clause by the current unit. The first parameter
@@ -483,11 +507,17 @@ package Lib.Writ is
    --
    --        EA  pragma Elaborate_All applies to this unit
    --
-   --        ED  Elaborate_All_Desirable set for this unit, which means
+   --        ED  Elaborate_Desirable set for this unit, which means
+   --            that there is no Elaborate, but the analysis suggests
+   --            that Program_Error may be raised if the Elaborate
+   --            conditions cannot be satisfied. The binder will attempt
+   --            to treat ED as E if it can.
+   --
+   --        AD  Elaborate_All_Desirable set for this unit, which means
    --            that there is no Elaborate_All, but the analysis suggests
    --            that Program_Error may be raised if the Elaborate_All
    --            conditions cannot be satisfied. The binder will attempt
-   --            to treat ED as EA if it can.
+   --            to treat AD as EA if it can.
    --
    --      The parameter source-name and lib-name are omitted for the case
    --      of a generic unit compiled with earlier versions of GNAT which
@@ -641,6 +671,36 @@ package Lib.Writ is
      Table_Increment      => 200,
      Table_Name           => "Name_Interrupt_States");
 
+   --  The table structure defined here stores one entry for each
+   --  Priority_Specific_Dispatching pragma encountered either in the main
+   --  source or in an ancillary with'ed source. Since
+   --  have to be consistent across all units in a partition, we may
+   --  as well detect inconsistencies at compile time when we can.
+
+   type Specific_Dispatching_Entry is record
+      Dispatching_Policy : Character;
+      --  First character (upper case) of the corresponding policy name
+
+      First_Priority     : Nat;
+      --  Lower bound of the priority range to which the specified dispatching
+      --  policy applies.
+
+      Last_Priority      : Nat;
+      --  Upper bound of the priority range to which the specified dispatching
+      --  policy applies.
+
+      Pragma_Loc         : Source_Ptr;
+      --  Location of pragma setting this value in place
+   end record;
+
+   package Specific_Dispatching is new Table.Table (
+     Table_Component_Type => Specific_Dispatching_Entry,
+     Table_Index_Type     => Nat,
+     Table_Low_Bound      => 1,
+     Table_Initial        => 10,
+     Table_Increment      => 100,
+     Table_Name           => "Name_Priority_Specific_Dispatching");
+
    -----------------
    -- Subprograms --
    -----------------