aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/binde.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-01-13 11:54:43 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2017-01-13 11:54:43 +0100
commit354ae44943ca7642d2f3a48ca428bfb5df2e0049 (patch)
treef029b95ac27175fee7062ad81282fdb79d0f388a /gcc/ada/binde.ads
parent448a1eb3eb4357dcdd1e2271e267bedb0c4b7d6c (diff)
downloadgcc-354ae44943ca7642d2f3a48ca428bfb5df2e0049.zip
gcc-354ae44943ca7642d2f3a48ca428bfb5df2e0049.tar.gz
gcc-354ae44943ca7642d2f3a48ca428bfb5df2e0049.tar.bz2
[multiple changes]
2017-01-13 Javier Miranda <miranda@adacore.com> * einfo.ads (Component_Bit_Offset): Fix documentation. * sem_ch13.adb (Check_Record_Representation_Clause): Skip check on record holes for components with unknown compile-time offsets. 2017-01-13 Bob Duff <duff@adacore.com> * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag. * g-locfil.ads: Minor comment fix. 2017-01-13 Bob Duff <duff@adacore.com> * binde.adb (Elab_New): New elaboration order algorithm that is expected to cause fewer ABE issues. This is a work in progress. The new algorithm is currently disabled, and can be enable by the -dp switch, or by modifying the Do_Old and Do_New etc. flags and rebuilding. Experimental code is included to compare the results of the old and new algorithms. * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we can have multiple of these tables, so the old and new algorithms can coexist. * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in' parameter of type array. This avoids the global variable, and allows bounds checking (which is normally defeated by the tables packages). It also ensures that the Elab_Order is read-only to Bindgen. * bindgen.adb: Pass Elab_Order as an 'in' parameter to all subprograms that need it, as above. * debug.adb: Document new -dp switch. Modify doc of old -do switch. * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde and Bindgen. Move writing of closure (-R and -Ra switches) to Binde; that's more convenient. 2017-01-13 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Expression_Function): If the expression function is a completion, all entities referenced in the expression are frozen. As a consequence, a reference to an uncompleted private type from an enclosing scope is illegal. From-SVN: r244419
Diffstat (limited to 'gcc/ada/binde.ads')
-rw-r--r--gcc/ada/binde.ads40
1 files changed, 24 insertions, 16 deletions
diff --git a/gcc/ada/binde.ads b/gcc/ada/binde.ads
index 4481ef2..79d9cdf 100644
--- a/gcc/ada/binde.ads
+++ b/gcc/ada/binde.ads
@@ -23,30 +23,38 @@
-- --
------------------------------------------------------------------------------
--- This package contains the routines to determine elaboration order
+-- This package contains the routine that determines library-level elaboration
+-- order.
with ALI; use ALI;
-with Table;
+with Namet; use Namet;
with Types; use Types;
+with GNAT.Dynamic_Tables;
+
package Binde is
- -- The following table records the chosen elaboration order. It is used
- -- by Gen_Elab_Calls to generate the sequence of elaboration calls. Note
- -- that units are included in this table even if they have no elaboration
+ package Unit_Id_Tables is new GNAT.Dynamic_Tables
+ (Table_Component_Type => Unit_Id,
+ Table_Index_Type => Nat,
+ Table_Low_Bound => 1,
+ Table_Initial => 500,
+ Table_Increment => 200);
+ use Unit_Id_Tables;
+
+ subtype Unit_Id_Table is Unit_Id_Tables.Instance;
+ subtype Unit_Id_Array is Unit_Id_Tables.Table_Type;
+
+ procedure Find_Elab_Order
+ (Elab_Order : out Unit_Id_Table;
+ First_Main_Lib_File : File_Name_Type);
+ -- Determine elaboration order.
+ --
+ -- The Elab_Order table records the chosen elaboration order. It is used by
+ -- Gen_Elab_Calls to generate the sequence of elaboration calls. Note that
+ -- units are included in this table even if they have no elaboration
-- routine, since the table is also used to drive the generation of object
-- files in the binder output. Gen_Elab_Calls skips any units that have no
-- elaboration routine.
- package Elab_Order is new Table.Table (
- Table_Component_Type => Unit_Id,
- Table_Index_Type => Nat,
- Table_Low_Bound => 1,
- Table_Initial => 500,
- Table_Increment => 200,
- Table_Name => "Elab_Order");
-
- procedure Find_Elab_Order;
- -- Determine elaboration order
-
end Binde;