begin
pragma Assert (Nkind (Obj_Decl) = N_Object_Declaration);
- if Has_Task (Typ) or else Might_Have_Tasks (Typ) then
+ if Might_Have_Tasks (Typ) then
Build_Activation_Chain_Entity (Obj_Decl);
if Has_Task (Typ) then
Typ := Etype (Comp);
if Ekind (Typ) = E_Anonymous_Access_Type
- and then
- (Has_Task (Available_View (Designated_Type (Typ)))
- or else
- Might_Have_Tasks (Available_View (Designated_Type (Typ))))
+ and then Might_Have_Tasks
+ (Available_View (Designated_Type (Typ)))
and then No (Master_Id (Typ))
then
-- Ensure that the record or array type have a _master
-- of the stacks in this scenario, the stacks of the first array are
-- not counted.
- if (Has_Task (Typ) or else Might_Have_Tasks (Typ))
+ if Might_Have_Tasks (Typ)
and then not Restriction_Active (No_Secondary_Stack)
and then (Restriction_Active (No_Implicit_Heap_Allocations)
or else Restriction_Active (No_Implicit_Task_Allocations))
-- rather than some outer chain.
begin
- if Has_Task (Result_Subt) or else Might_Have_Tasks (Result_Subt) then
+ if Might_Have_Tasks (Result_Subt) then
Actions := New_List;
Build_Task_Allocate_Block_With_Init_Stmts
(Actions, Allocator, Init_Stmts => New_List (Assign));
begin
return not Global_No_Tasking
and then not No_Run_Time_Mode
- and then Is_Class_Wide_Type (Typ)
- and then Is_Limited_Record (Typ);
+ and then (Has_Task (Typ)
+ or else (Is_Class_Wide_Type (Typ)
+ and then Is_Limited_Record (Typ)));
end Might_Have_Tasks;
----------------------------
-- object. Function_Call must denote a call to a CPP_Constructor function.
function Might_Have_Tasks (Typ : Entity_Id) return Boolean;
- -- Return True if Typ is a limited class-wide type (or subtype), since it
- -- might have task components.
+ -- Return True when type Typ has tasks or when it is a limited class-wide
+ -- type (or subtype), since it might have task components.
function Needs_BIP_Alloc_Form (Func_Id : Entity_Id) return Boolean;
-- Ada 2005 (AI-318-02): Return True if the function needs an implicit