diff options
author | Yannick Moy <moy@adacore.com> | 2021-07-15 10:40:05 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-09-22 15:01:43 +0000 |
commit | 81a0f4a391dd3cef102feda6c509db349b4545bd (patch) | |
tree | b310e027251e32ea5b3a083a1e579a25cff662ff /gcc | |
parent | 064056d7b54538dbe47834e8951edf837ee91dc4 (diff) | |
download | gcc-81a0f4a391dd3cef102feda6c509db349b4545bd.zip gcc-81a0f4a391dd3cef102feda6c509db349b4545bd.tar.gz gcc-81a0f4a391dd3cef102feda6c509db349b4545bd.tar.bz2 |
[Ada] Fix obsolete comments/name referring to girder discriminants
gcc/ada/
* einfo.ads: Fix comments.
* exp_aggr.adb: Fix variable name.
* exp_util.adb: Fix comments.
* sem_ch13.adb: Fix comments.
* sem_ch3.adb: Fix comments and variable name.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/einfo.ads | 16 | ||||
-rw-r--r-- | gcc/ada/exp_aggr.adb | 6 | ||||
-rw-r--r-- | gcc/ada/exp_util.adb | 8 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.adb | 4 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 22 |
5 files changed, 28 insertions, 28 deletions
diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 39ddd66..94c5662 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -746,9 +746,9 @@ package Einfo is -- Corresponding_Record_Component -- Defined in components of a derived untagged record type, including --- discriminants. For a regular component or a girder discriminant, +-- discriminants. For a regular component or a stored discriminant, -- points to the corresponding component in the parent type. Set to --- Empty for a non-girder discriminant. It is used by the back end to +-- Empty for a non-stored discriminant. It is used by the back end to -- ensure the layout of the derived type matches that of the parent -- type when there is no representation clause on the derived type. @@ -2400,11 +2400,11 @@ package Einfo is -- parent, we do not consider them to be separate units for this flag). -- Is_Completely_Hidden --- Defined on discriminants. Only set on girder discriminants of --- untagged types. When set, the entity is a girder discriminant of a +-- Defined on discriminants. Only set on stored discriminants of +-- untagged types. When set, the entity is a stored discriminant of a -- derived untagged type which is not directly visible in the derived -- type because the derived type or one of its ancestors have renamed the --- discriminants in the root type. Note: there are girder discriminants +-- discriminants in the root type. Note: there are stored discriminants -- which are not Completely_Hidden (e.g. discriminants of a root type). -- Is_Composite_Type (synthesized) @@ -3652,7 +3652,7 @@ package Einfo is -- Next_Discriminant (synthesized) -- Applies to discriminants returned by First/Next_Discriminant. Returns --- the next language-defined (i.e. perhaps non-girder) discriminant by +-- the next language-defined (i.e. perhaps non-stored) discriminant by -- following the chain of declared entities as long as the kind of the -- entity corresponds to a discriminant. Note that the discriminants -- might be the only components of the record. Returns Empty if there @@ -3842,8 +3842,8 @@ package Einfo is -- Rec_Ext.Comp -> Rec_Ext.Parent. ... .Parent.Comp -- -- In base untagged types: --- Always points to itself except for non-girder discriminants, where --- it points to the girder discriminant it renames. +-- Always points to itself except for non-stored discriminants, where +-- it points to the stored discriminant it renames. -- -- In subtypes (tagged and untagged): -- Points to the component in the base type. diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 88303c9..63a0666 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -8046,7 +8046,7 @@ package body Exp_Aggr is Discr : Entity_Id; Decl : Node_Id; Num_Disc : Nat := 0; - Num_Gird : Nat := 0; + Num_Stor : Nat := 0; -- Start of processing for Generate_Aggregate_For_Derived_Type @@ -8082,13 +8082,13 @@ package body Exp_Aggr is Discr := First_Stored_Discriminant (Base_Type (Typ)); while Present (Discr) loop - Num_Gird := Num_Gird + 1; + Num_Stor := Num_Stor + 1; Next_Stored_Discriminant (Discr); end loop; -- Case of more stored discriminants than new discriminants - if Num_Gird > Num_Disc then + if Num_Stor > Num_Disc then -- Create a proper subtype of the parent type, which is the -- proper implementation type for the aggregate, and convert diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index ad5a6fa..59c8763 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -10645,7 +10645,7 @@ package body Exp_Util is end if; -- Otherwise the constraint denotes a reference to some name - -- which results in a Girder discriminant: + -- which results in a Stored discriminant: -- vvvv -- Name : ...; @@ -10666,7 +10666,7 @@ package body Exp_Util is return Find_Constraint_Value (Entity (Constr)); -- Otherwise the current constraint is an expression which yields - -- a Girder discriminant: + -- a Stored discriminant: -- type Typ (D1 : ...; DN : ...) is -- new Anc (Discr => <expression>) with ... @@ -10741,7 +10741,7 @@ package body Exp_Util is -- that D_2 constrains D_1, therefore if the algorithm finds the -- value of D_2, then this would also be the value for D_1. - -- 2.2) The constraint is a name (aka Girder): + -- 2.2) The constraint is a name (aka Stored): -- Name : ... -- type Ancestor_1 (D_1 : ...) is tagged ... @@ -10750,7 +10750,7 @@ package body Exp_Util is -- In this case the name is the final value of D_1 because the -- discriminant cannot be further constrained. - -- 2.3) The constraint is an expression (aka Girder): + -- 2.3) The constraint is an expression (aka Stored): -- type Ancestor_1 (D_1 : ...) is tagged ... -- type Ancestor_2 is new Ancestor_1 (D_1 => 1 + 2) ... diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 228fd39..8cb3b42 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -12361,8 +12361,8 @@ package body Sem_Ch13 is end if; -- Outer level of record definition, check discriminants - -- but be careful not to flag a non-girder discriminant - -- and the girder discriminant it renames as overlapping. + -- but be careful not to flag a non-stored discriminant + -- and the stored discriminant it renames as overlapping. if Nkind (Clist) in N_Full_Type_Declaration | N_Private_Type_Declaration diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index cc8a9b7..0e36cc2 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -696,8 +696,8 @@ package body Sem_Ch3 is -- copy will leave the references to the ancestor discriminants unchanged -- in the declaration tree and they need to be fixed up. If the derived -- type has a known discriminant part, then the remapping done during the - -- copy will only create references to the girder discriminants and they - -- need to be replaced with references to the non-girder discriminants. + -- copy will only create references to the stored discriminants and they + -- need to be replaced with references to the non-stored discriminants. procedure Set_Fixed_Range (E : Entity_Id; @@ -8475,11 +8475,11 @@ package body Sem_Ch3 is -- discriminants in R and T1 through T4: -- Type Discrim Stored Discrim Comment - -- R (D1, D2, D3) (D1, D2, D3) Girder discrims implicit in R - -- T1 (D1, D2, D3) (D1, D2, D3) Girder discrims implicit in T1 - -- T2 (X1, X2) (D1, D2, D3) Girder discrims EXPLICIT in T2 - -- T3 (X1, X2) (D1, D2, D3) Girder discrims EXPLICIT in T3 - -- T4 (Y) (D1, D2, D3) Girder discrims EXPLICIT in T4 + -- R (D1, D2, D3) (D1, D2, D3) Stored discrims implicit in R + -- T1 (D1, D2, D3) (D1, D2, D3) Stored discrims implicit in T1 + -- T2 (X1, X2) (D1, D2, D3) Stored discrims EXPLICIT in T2 + -- T3 (X1, X2) (D1, D2, D3) Stored discrims EXPLICIT in T3 + -- T4 (Y) (D1, D2, D3) Stored discrims EXPLICIT in T4 -- Field Corresponding_Discriminant (abbreviated CD below) allows us to -- find the corresponding discriminant in the parent type, while @@ -15133,7 +15133,7 @@ package body Sem_Ch3 is Add_Discriminants : declare Num_Disc : Nat; - Num_Gird : Nat; + Num_Stor : Nat; begin Num_Disc := 0; @@ -15154,7 +15154,7 @@ package body Sem_Ch3 is -- the GCC 4.x back-end decides to break apart assignments between -- objects using the parent view into member-wise assignments. - Num_Gird := 0; + Num_Stor := 0; if Is_Derived_Type (Typ) and then not Is_Tagged_Type (Typ) @@ -15162,12 +15162,12 @@ package body Sem_Ch3 is Old_C := First_Stored_Discriminant (Typ); while Present (Old_C) loop - Num_Gird := Num_Gird + 1; + Num_Stor := Num_Stor + 1; Next_Stored_Discriminant (Old_C); end loop; end if; - if Num_Gird > Num_Disc then + if Num_Stor > Num_Disc then -- Find out multiple uses of new discriminants, and add hidden -- components for the extra renamed discriminants. We recognize |