-- Modify_Tree_For_C is set. Denotes the internally built procedure
-- with an extra out parameter created for it.
--- Corresponding_Protected_Entry (Node18)
--- Defined in subprogram bodies. Set for subprogram bodies that implement
--- a protected type entry to point to the entity for the entry.
-
-- Corresponding_Record_Component (Node21)
-- Defined in components of a derived untagged record type, including
-- discriminants. For a regular component or a girder discriminant,
raise Program_Error;
end case;
- -- Establish link between subprogram body entity and source entry
-
- Set_Corresponding_Protected_Entry (Bod_Id, Ent);
-
-- Create body of entry procedure. The renaming declarations are
-- placed ahead of the block that contains the actual entry body.
New_Occurrence_Of
(RTE (RE_Get_GNAT_Exception), Loc)))))))));
+ -- Establish link between subprogram body and source entry body
+
+ Set_Corresponding_Entry_Body (Proc_Body, N);
+
Reset_Scopes_To (Proc_Body, Protected_Body_Subprogram (Ent));
return Proc_Body;
end if;
Convert_To_Return_False,
Corresponding_Aspect,
Corresponding_Body,
+ Corresponding_Entry_Body,
Corresponding_Formal_Spec,
Corresponding_Generic_Association,
Corresponding_Integer_Value,
Corresponding_Equality,
Corresponding_Function,
Corresponding_Procedure,
- Corresponding_Protected_Entry,
Corresponding_Record_Component,
Corresponding_Record_Type,
Corresponding_Remote_Type,
Sm (Scope_Depth_Value, Uint),
Sm (SPARK_Pragma, Node_Id),
Sm (SPARK_Pragma_Inherited, Flag),
- Sm (Corresponding_Protected_Entry, Node_Id), -- setter only
Sm (Current_Value, Node_Id), -- setter only
Sm (Has_Predicates, Flag), -- setter only
Sm (Initialization_Statements, Node_Id), -- setter only
Cc (E_Subprogram_Body, Entity_Kind,
(Sm (Anonymous_Masters, Elist_Id),
Sm (Contract, Node_Id),
- Sm (Corresponding_Protected_Entry, Node_Id),
Sm (Extra_Formals, Node_Id),
Sm (First_Entity, Node_Id),
Sm (Ignore_SPARK_Mode_Pragmas, Flag),
Sy (Bad_Is_Detected, Flag),
Sm (Activation_Chain_Entity, Node_Id),
Sm (Acts_As_Spec, Flag),
+ Sm (Corresponding_Entry_Body, Node_Id),
Sm (Do_Storage_Check, Flag),
Sm (Has_Relative_Deadline_Pragma, Flag),
Sm (Is_Entry_Barrier_Function, Flag),
if Nkind (N) = N_Function_Specification then
Set_Ekind (Designator, E_Function);
Set_Mechanism (Designator, Default_Mechanism);
-
else
- case Ekind (Designator) is
- when E_Subprogram_Body | E_Void =>
- Reinit_Field_To_Zero
- (Designator, Corresponding_Protected_Entry);
- Set_Ekind (Designator, E_Procedure);
-
- when E_Procedure | E_Generic_Procedure =>
- null;
-
- when others =>
- pragma Assert (False);
- end case;
-
+ Set_Ekind (Designator, E_Procedure);
Set_Etype (Designator, Standard_Void_Type);
end if;
-- to the defining entity for the corresponding body (NOT the node for
-- the body itself).
+ -- Corresponding_Entry_Body
+ -- Defined in N_Subprogram_Body. Set for subprogram bodies that implement
+ -- a protected type entry; points to the body for the entry.
+
-- Corresponding_Formal_Spec (Node3-Sem)
-- This field is set in subprogram renaming declarations, where it points
-- to the defining entity for a formal subprogram in the case where the