Comments
Patch
===================================================================
@@ -131,7 +131,7 @@
-- d.K Alfa detection only mode for gnat2why
-- d.L Depend on back end for limited types in conditional expressions
-- d.M
- -- d.N
+ -- d.N Add node to all entities
-- d.O Dump internal SCO tables
-- d.P Previous (non-optimized) handling of length comparisons
-- d.Q
@@ -629,6 +629,10 @@
-- case expansion, leaving it up to the back end to handle conditional
-- expressions correctly.
+ -- d.N Enlarge entities by one node (but don't attempt to use this extra
+ -- node for storage of any flags or fields). This can be used to do
+ -- experiments on the impact of increasing entity sizes.
+
-- d.O Dump internal SCO tables. Before outputting the SCO information to
-- the ALI file, the internal SCO tables (SCO_Table/SCO_Unit_Table)
-- are dumped for debugging purposes.
===================================================================
@@ -289,6 +289,12 @@
Ttypes.Target_Strict_Alignment := True;
end if;
+ -- Increase size of allocated entities if debug flag -gnatd.N is set
+
+ if Debug_Flag_Dot_NN then
+ Atree.Num_Extension_Nodes := Atree.Num_Extension_Nodes + 1;
+ end if;
+
-- Disable static allocation of dispatch tables if -gnatd.t or if layout
-- is enabled. The front end's layout phase currently treats types that
-- have discriminant-dependent arrays as not being static even when a
===================================================================
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
+-- Copyright (C) 1992-2012, 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- --
@@ -516,11 +516,11 @@
if With_Extension then
if Present (Src) and then Has_Extension (Src) then
- for J in 1 .. 4 loop
+ for J in 1 .. Num_Extension_Nodes loop
Nodes.Append (Nodes.Table (Src + Node_Id (J)));
end loop;
else
- for J in 1 .. 4 loop
+ for J in 1 .. Num_Extension_Nodes loop
Nodes.Append (Default_Node_Extension);
end loop;
end if;
===================================================================
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
+-- Copyright (C) 1992-2012, 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- --
@@ -65,6 +65,17 @@
-- syntax tree format. Subsequent processing in the front end traverses the
-- tree, transforming it in various ways and adding semantic information.
+ ----------------------
+ -- Size of Entities --
+ ----------------------
+
+ -- Currently entities are composed of 5 sequentially allocated 32-byte
+ -- nodes, considered as a single record. The following definition gives
+ -- the number of extension nodes.
+
+ Num_Extension_Nodes : Int := 4;
+ -- This value is increased by one if debug flag -gnatd.N is set
+
----------------------------------------
-- Definitions of Fields in Tree Node --
----------------------------------------