diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-01-01 13:25:33 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-03 05:28:29 -0400 |
commit | bcc150393e16baa1a1ce37b64e2fc5e1f7a38fc3 (patch) | |
tree | dbbadcd29edaea4bb7e2e3cce8e9bb03c2e7229b | |
parent | 94f994283846fa3f01d7b6556b59da5509a55a60 (diff) | |
download | gcc-bcc150393e16baa1a1ce37b64e2fc5e1f7a38fc3.zip gcc-bcc150393e16baa1a1ce37b64e2fc5e1f7a38fc3.tar.gz gcc-bcc150393e16baa1a1ce37b64e2fc5e1f7a38fc3.tar.bz2 |
[Ada] Minor style fixes in Max_Aggregate_Size
gcc/ada/
* exp_aggr.adb (Max_Aggregate_Size): Add header boxes for nested
routines; move a local constant after nested subprogram bodies;
refill comment.
-rw-r--r-- | gcc/ada/exp_aggr.adb | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 00ca1e8..2d07abb 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -8800,8 +8800,6 @@ package body Exp_Aggr is (N : Node_Id; Default_Size : Nat := 5000) return Nat is - Typ : constant Entity_Id := Etype (N); - function Use_Small_Size (N : Node_Id) return Boolean; -- True if we should return a very small size, which means large -- aggregates will be implemented as a loop when possible (potentially @@ -8811,6 +8809,10 @@ package body Exp_Aggr is -- Return the context in which the aggregate appears, not counting -- qualified expressions and similar. + ------------------ + -- Aggr_Context -- + ------------------ + function Aggr_Context (N : Node_Id) return Node_Id is Result : Node_Id := Parent (N); begin @@ -8828,6 +8830,10 @@ package body Exp_Aggr is return Result; end Aggr_Context; + -------------------- + -- Use_Small_Size -- + -------------------- + function Use_Small_Size (N : Node_Id) return Boolean is C : constant Node_Id := Aggr_Context (N); -- The decision depends on the context in which the aggregate occurs, @@ -8858,11 +8864,15 @@ package body Exp_Aggr is end case; end Use_Small_Size; + -- Local variables + + Typ : constant Entity_Id := Etype (N); + -- Start of processing for Max_Aggregate_Size begin - -- We use a small limit in CodePeer mode where we favor loops - -- instead of thousands of single assignments (from large aggregates). + -- We use a small limit in CodePeer mode where we favor loops instead of + -- thousands of single assignments (from large aggregates). -- We also increase the limit to 2**24 (about 16 million) if -- Restrictions (No_Elaboration_Code) or Restrictions |