-- will be a successor of X (spec), and X (spec) will be a predecessor of
-- Y (body).
--
- -- Note that we store the successors of each unit explictly. We don't store
- -- the predecessors, but we store a count of them.
+ -- Note that we store the successors of each unit explicitly. We don't
+ -- store the predecessors, but we store a count of them.
--
-- The basic algorithm is to first compute a directed graph of units (type
-- Unit_Node_Record, below), with successors as edges. A unit is "ready"
return False;
- -- Prefer a pure or preelaborated unit to one that is not Pure should
+ -- Prefer a pure or preelaborated unit to one that is not. Pure should
-- come before preelaborated.
elsif Is_Pure_Or_Preelab_Unit (U1)
-- If either unit is predefined or internal, then we use the normal
-- Better_Choice_Optimistic rule, since we don't want to disturb the
- -- elaboration rules of the language with -p, same treatment for
+ -- elaboration rules of the language with -p; same treatment for
-- Pure/Preelab.
-- Prefer a predefined unit to a non-predefined unit
end if;
-- For all successors, decrement the number of predecessors, and if it
- -- becomes zero, then add to no predecessor list.
+ -- becomes zero, then add to no-predecessor list.
S := UNR.Table (Chosen).Successors;
while S /= No_Successor loop
-- private;", and pass in iterators to iterate over all nodes, and over
-- the successors of a given node. However, that leads to using advanced
-- features of Ada that are not allowed in the compiler and binder for
- -- bootstrapping reason. It also leads to trampolines, which are not
+ -- bootstrapping reasons. It also leads to trampolines, which are not
-- allowed in the compiler and binder. Restricting Node to be discrete
-- allows us to iterate over all nodes with a 'for' loop, and allows us
-- to attach temporary information to nodes by having an array indexed
Low_Links (N) := Index;
Index := Index + 1;
- -- Push it one the stack:
+ -- Push it on the stack:
Top := Stack_Position_Of_N;
Stack (Top) := N;
Compute_Unit_SCCs;
- -- Initialize the no predecessor list
+ -- Initialize the no-predecessor list
No_Pred := No_Unit_Id;
for U in UNR.First .. UNR.Last loop
end loop;
-- OK, now we determine the elaboration order proper. All we do is to
- -- select the best choice from the no predecessor list until all the
+ -- select the best choice from the no-predecessor list until all the
-- nodes have been chosen.
Outer : loop
Gather_Dependencies;
- -- Initialize the no predecessor list
+ -- Initialize the no-predecessor list
No_Pred := No_Unit_Id;
for U in UNR.First .. UNR.Last loop
end loop;
-- OK, now we determine the elaboration order proper. All we do is to
- -- select the best choice from the no predecessor list until all the
+ -- select the best choice from the no-predecessor list until all the
-- nodes have been chosen.
Outer : loop
-- An entity can only be frozen if it has a completion, so we must
-- check this explicitly. If it is declared elsewhere it will have
- -- been frozen already, so only types declared in currently opend
+ -- been frozen already, so only types declared in currently opened
-- scopes need to be tested.
if Ekind (Ret_Type) = E_Private_Type
-- to be used to undo the transformation.
procedure Freeze_Expr_Types (Spec_Id : Entity_Id);
- -- (AI12-0103) N is the body associated with an expression function that
- -- is a completion, and Spec_Id its defining entity. Freeze before N all
- -- the types referenced by the expression of the function.
+ -- AI12-0103: N is the body associated with an expression function that
+ -- is a completion, and Spec_Id is its defining entity. Freeze before N
+ -- all the types referenced by the expression of the function.
function Is_Private_Concurrent_Primitive
(Subp_Id : Entity_Id) return Boolean;
Set_Has_Delayed_Freeze (Spec_Id);
Freeze_Before (N, Spec_Id);
- -- At the occurrence of an expression function declaration that is
- -- a completion, its expression causes freezing (AI12-0103).
+ -- AI12-0103: At the occurrence of an expression function
+ -- declaration that is a completion, its expression causes
+ -- freezing.
if Has_Completion (Spec_Id)
and then Was_Expression_Function (N)
and then Ekind (Entity (E1)) = E_Discriminant
and then Ekind (Entity (E2)) = E_In_Parameter)
- -- AI12-050 : The loop variables of quantified expressions
+ -- AI12-050: The loop variables of quantified expressions
-- match if they have the same identifier, even though they
-- are different entities.