function Build_Array_VS_Func
(Attr : Node_Id;
Formal_Typ : Entity_Id;
- Array_Typ : Entity_Id;
- Comp_Typ : Entity_Id) return Entity_Id;
+ Array_Typ : Entity_Id) return Entity_Id;
-- Validate the components of an array type by means of a function. Return
-- the entity of the validation function. The parameters are as follows:
--
-- parameter.
--
-- * Array_Typ - the array type whose components are to be validated
- --
- -- * Comp_Typ - the component type of the array
function Build_Disp_Get_Task_Id_Call (Actual : Node_Id) return Node_Id;
-- Build a call to Disp_Get_Task_Id, passing Actual as actual parameter
function Build_Array_VS_Func
(Attr : Node_Id;
Formal_Typ : Entity_Id;
- Array_Typ : Entity_Id;
- Comp_Typ : Entity_Id) return Entity_Id
+ Array_Typ : Entity_Id) return Entity_Id
is
- Loc : constant Source_Ptr := Sloc (Attr);
+ Loc : constant Source_Ptr := Sloc (Attr);
+ Comp_Typ : constant Entity_Id :=
+ Validated_View (Component_Type (Array_Typ));
function Validate_Component
(Obj_Id : Entity_Id;
-------------------
when Attribute_Valid_Scalars => Valid_Scalars : declare
- Val_Typ : constant Entity_Id := Validated_View (Ptyp);
- Comp_Typ : Entity_Id;
- Expr : Node_Id;
+ Val_Typ : constant Entity_Id := Validated_View (Ptyp);
+ Expr : Node_Id;
begin
-- Assume that the prefix does not need validation
-- dimensions of the array while checking individual components.
elsif Is_Array_Type (Val_Typ) then
- Comp_Typ := Validated_View (Component_Type (Val_Typ));
-
- if Scalar_Part_Present (Comp_Typ) then
- Expr :=
- Make_Function_Call (Loc,
- Name =>
- New_Occurrence_Of
- (Build_Array_VS_Func
- (Attr => N,
- Formal_Typ => Ptyp,
- Array_Typ => Val_Typ,
- Comp_Typ => Comp_Typ),
- Loc),
- Parameter_Associations => New_List (Pref));
- end if;
+ Expr :=
+ Make_Function_Call (Loc,
+ Name =>
+ New_Occurrence_Of
+ (Build_Array_VS_Func
+ (Attr => N,
+ Formal_Typ => Ptyp,
+ Array_Typ => Val_Typ),
+ Loc),
+ Parameter_Associations => New_List (Pref));
-- Validate the scalar components, discriminants of a record type by
-- examining the structure of a record type.