[Ada] Clarify use of Activation_Record_Component
authorEd Schonberg <schonberg@adacore.com>
Tue, 29 May 2018 09:41:59 +0000 (09:41 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 29 May 2018 09:41:59 +0000 (09:41 +0000)
2018-05-29  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* einfo.ads, einfo.adb: Clarify use of Activation_Record_Component:
discriminants and exceptions are never components of such.  The flag
Needs_Activation_Record is set on subprogram types, not on access to
them.

From-SVN: r260881

gcc/ada/ChangeLog
gcc/ada/einfo.adb
gcc/ada/einfo.ads

index fe5b58b..86d6680 100644 (file)
@@ -1,5 +1,12 @@
 2018-05-29  Ed Schonberg  <schonberg@adacore.com>
 
+       * einfo.ads, einfo.adb: Clarify use of Activation_Record_Component:
+       discriminants and exceptions are never components of such.  The flag
+       Needs_Activation_Record is set on subprogram types, not on access to
+       them.
+
+2018-05-29  Ed Schonberg  <schonberg@adacore.com>
+
        * sem_ch3.adb: Set scope of component of subtype.
 
 2018-05-29  Ed Schonberg  <schonberg@adacore.com>
index fd77d41..5d1433b 100644 (file)
@@ -743,8 +743,6 @@ package body Einfo is
    function Activation_Record_Component (Id : E) return E is
    begin
       pragma Assert (Ekind_In (Id, E_Constant,
-                                   E_Discriminant,
-                                   E_Exception,
                                    E_In_Parameter,
                                    E_In_Out_Parameter,
                                    E_Loop_Parameter,
@@ -3958,8 +3956,6 @@ package body Einfo is
    procedure Set_Activation_Record_Component (Id : E; V : E) is
    begin
       pragma Assert (Ekind_In (Id, E_Constant,
-                                   E_Discriminant,
-                                   E_Exception,
                                    E_In_Parameter,
                                    E_In_Out_Parameter,
                                    E_Loop_Parameter,
index 665d578..6c37941 100644 (file)
@@ -364,12 +364,10 @@ package Einfo is
 --       the IP routine to avoid performing this elaboration twice.
 
 --    Activation_Record_Component (Node31)
---       Defined in E_Variable, E_Constant, E_Discriminant, E_Loop_Parameter,
---       E_In_Parameter, E_Out_Parameter, E_In_Out_Parameter nodes. Used only
---       if we are in Opt.Unnest_Subprogram_Mode, in which case for the case of
---       an uplevel referenced entity, this field contains the entity for the
---       component in the generated ARECnT activation record (Exp_Unst for
---       details).
+--       Defined for E_Variable, E_Constant, E_Loop_Parameter, and formal
+--       parameter entities. Used in Opt.Unnest_Subprogram_Mode, in which case
+--       a reference to an uplevel entity produces a corresponding component
+--       in the generated ARECnT activation record (Exp_Unst for details).
 
 --    Actual_Subtype (Node17)
 --       Defined in variables, constants, and formal parameters. This is the
@@ -3535,7 +3533,7 @@ package Einfo is
 --       to the freeze point because of the rule about overriding Initialize).
 
 --    Needs_Activation_Record (Flag306)
---       Defined on access_to_subprogram types. Indicates that a call through
+--       Defined on generated subprogram types. Indicates that a call through
 --       a named or anonymous access to subprogram requires an activation
 --       record when compiling with unnesting for C or LLVM.