diff options
author | Robert Dewar <dewar@adacore.com> | 2007-06-06 12:23:26 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-06-06 12:23:26 +0200 |
commit | 1c28fe3afee2a7dde65f9aa96560d0170af3aae7 (patch) | |
tree | cfb263da79acf0351b12e03edf6c58d335c721a2 /gcc/ada/lib.ads | |
parent | 0a36105d5657dd7126160c5bae2b9b68af63fcff (diff) | |
download | gcc-1c28fe3afee2a7dde65f9aa96560d0170af3aae7.zip gcc-1c28fe3afee2a7dde65f9aa96560d0170af3aae7.tar.gz gcc-1c28fe3afee2a7dde65f9aa96560d0170af3aae7.tar.bz2 |
sinput.ads, [...] (Unlock): New procedure.
2007-04-20 Robert Dewar <dewar@adacore.com>
* sinput.ads, sinput.adb, uintp.ads, urealp.adb, stringt.adb,
sem_elim.adb, prj-strt.adb, repinfo.ads, repinfo.adb, namet.ads,
elists.ads, elists.adb, lib.ads, lib.adb (Unlock): New procedure.
Fix lower bound of tables.
Add rep clauses.
* nlists.adb: Ditto.
(Prev_Node, Next_Node): Change index type to Int so that it properly
covers the range First_Node_Id - 1 up.
From-SVN: r125391
Diffstat (limited to 'gcc/ada/lib.ads')
-rw-r--r-- | gcc/ada/lib.ads | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/gcc/ada/lib.ads b/gcc/ada/lib.ads index afa7862..73c7b7a 100644 --- a/gcc/ada/lib.ads +++ b/gcc/ada/lib.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2007, 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- -- @@ -35,8 +35,9 @@ -- information. It contains the routine to load subsidiary units. with Alloc; +with Namet; use Namet; with Table; -with Types; use Types; +with Types; use Types; package Lib is @@ -562,6 +563,9 @@ package Lib is procedure Lock; -- Lock internal tables before calling back end + procedure Unlock; + -- Unlock internal tables, in cases where the back end needs to modify them + procedure Tree_Read; -- Initializes internal tables from current tree file using the relevant -- Table.Tree_Read routines. @@ -658,18 +662,46 @@ private Cunit : Node_Id; Cunit_Entity : Entity_Id; Dependency_Num : Int; - Fatal_Error : Boolean; - Generate_Code : Boolean; - Has_RACW : Boolean; Ident_String : Node_Id; - Loading : Boolean; Main_Priority : Int; Serial_Number : Nat; Version : Word; - Dynamic_Elab : Boolean; Error_Location : Source_Ptr; + Fatal_Error : Boolean; + Generate_Code : Boolean; + Has_RACW : Boolean; + Dynamic_Elab : Boolean; + Loading : Boolean; end record; + -- The following representation clause ensures that the above record + -- has no holes. We do this so that when instances of this record are + -- written by Tree_Gen, we do not write uninitialized values to the file. + + for Unit_Record use record + Unit_File_Name at 0 range 0 .. 31; + Unit_Name at 4 range 0 .. 31; + Munit_Index at 8 range 0 .. 31; + Expected_Unit at 12 range 0 .. 31; + Source_Index at 16 range 0 .. 31; + Cunit at 20 range 0 .. 31; + Cunit_Entity at 24 range 0 .. 31; + Dependency_Num at 28 range 0 .. 31; + Ident_String at 32 range 0 .. 31; + Main_Priority at 36 range 0 .. 31; + Serial_Number at 40 range 0 .. 31; + Version at 44 range 0 .. 31; + Error_Location at 48 range 0 .. 31; + Fatal_Error at 52 range 0 .. 7; + Generate_Code at 53 range 0 .. 7; + Has_RACW at 54 range 0 .. 7; + Dynamic_Elab at 55 range 0 .. 7; + Loading at 56 range 0 .. 31; + end record; + + for Unit_Record'Size use 60 * 8; + -- This ensures that we did not leave out any fields + package Units is new Table.Table ( Table_Component_Type => Unit_Record, Table_Index_Type => Unit_Number_Type, @@ -740,7 +772,7 @@ private package Load_Stack is new Table.Table ( Table_Component_Type => Load_Stack_Entry, - Table_Index_Type => Nat, + Table_Index_Type => Int, Table_Low_Bound => 0, Table_Initial => Alloc.Load_Stack_Initial, Table_Increment => Alloc.Load_Stack_Increment, |