Commit 54e33e5f by Ed Schonberg Committed by Pierre-Marie de Rodat

[Ada] Clarify use of Activation_Record_Component

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
parent 895500a2
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>
......
......@@ -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,
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment