--------------------------
-- The Small_Paren_Count field has range 0 .. 3. If the Paren_Count is
- -- in the range 0 .. 2, then it is stoed as Small_Paren_Count. Otherwise,
+ -- in the range 0 .. 2, then it is stored as Small_Paren_Count. Otherwise,
-- Small_Paren_Count = 3, and the actual Paren_Count is stored in the
-- Paren_Counts table.
--
-- No_Dynamic_Predicate_On_Actual
-- Defined in discrete types. Set for generic formal types that are used
--- in loops and quantified expressions. The corresponing actual cannot
+-- in loops and quantified expressions. The corresponding actual cannot
-- have dynamic predicates.
-- No_Pool_Assigned [root type only]
-- Subsidiary to the expansion of array and record aggregates. Generate
-- part of the necessary code to finalize a transient component. Aggr is
-- the related aggregate. Fin_Clear is the finalization call used to clean
- -- up the transient component. Hook_Clear is the hook reset statment. Stmts
- -- is the initialization statement list for the component. All generated
- -- code is added to Stmts.
+ -- up the transient component. Hook_Clear is the hook reset statement.
+ -- Stmts is the initialization statement list for the component. All
+ -- generated code is added to Stmts.
procedure Sort_Case_Table (Case_Table : in out Case_Table_Type);
-- Sort the Case Table using the Lower Bound of each Choice as the key.
-- In the remaining cases the aggregate appears in the RHS of an
-- assignment, which may be part of the expansion of an object
- -- delaration. If the aggregate is an actual in a call, itself
+ -- declaration. If the aggregate is an actual in a call, itself
-- possibly in a RHS, building it in the target is not possible.
elsif Maybe_In_Place_OK
-- overestimate if a filter is present, but is a safe approximation.
-- If bounds are dynamic the aggregate is created in two passes, and
-- the first generates a loop for the sole purpose of computing the
- -- number of elements that will be generated on the seocnd pass.
+ -- number of elements that will be generated on the second pass.
procedure Expand_Iterated_Component (Comp : Node_Id);
-- Handle iterated_component_association and iterated_Element
Iterator_Specification => Iterator_Specification (Comp));
else
- -- Loop_Parameter_Specifcation is parsed with a choice list.
+ -- Loop_Parameter_Specification is parsed with a choice list.
-- where the range is the first (and only) choice.
L_Range := Relocate_Node (First (Discrete_Choices (Comp)));
procedure Check_Subprogram_Variant;
-- Emit a call to the internally generated procedure with checks for
- -- aspect Subprogrgram_Variant, if present and enabled.
+ -- aspect Subprogram_Variant, if present and enabled.
function Inherited_From_Formal (S : Entity_Id) return Entity_Id;
-- Within an instance, a type derived from an untagged formal derived
end if;
-- Call _postconditions when no general finalization exceptions have
- -- occured taking care to enable the postconditions and save any
+ -- occurred taking care to enable the postconditions and save any
-- exception occurrences.
-- Generate:
-- Desired_Comp : Comp_Type := Expected_Comp;
-- Comp : Comp_Type renames Desired_Comp;
--
- -- <original delarations after the object renaming declaration
+ -- <original declarations after the object renaming declaration
-- of Comp>
--
-- begin
-- (_Object.Comp'Address));
-- Comp : Comp_Type renames Expected_Comp;
--
- -- <original delarations after the object renaming declaration of
+ -- <original declarations after the object renaming declaration of
-- Comp>
--
-- begin
begin
-- Suppress the expansion of an ignored assertion pragma. Such a pragma
- -- should not be transformed into a null statment because:
+ -- should not be transformed into a null statement because:
--
-- * The pragma may be part of the rep item chain of a type, in which
-- case rewriting it will destroy the chain.
procedure Add_Form_To_Spec (F : Entity_Id; S : Node_Id);
-- S is an N_Function/Procedure_Specification node, and F
- -- is the new entity to add to this subprogramn spec as
+ -- is the new entity to add to this subprogram spec as
-- the last Extra_Formal.
----------------------
begin
-- Ignore type references, these are implicit references that do
- -- not need rewriting (e.g. the appearence in a conversion).
+ -- not need rewriting (e.g. the appearance in a conversion).
-- Also ignore if no reference was specified or if the rewriting
-- has already been done (this can happen if the N_Identifier
-- occurs more than one time in the tree). Also ignore references
-- the subprogram is declared but not actually referenced. We remove
-- such subprograms from the tree, which simplifies our task, because
-- we don't have to worry about e.g. uplevel references from such an
- -- unreferenced subpogram, which might require (useless) activation
+ -- unreferenced subprogram, which might require (useless) activation
-- records to be created. This is computed by setting the outer level
-- subprogram (Subp itself) as reachable, and then doing a transitive
-- closure following all calls.
-- uplevel referenced. It contains both objects (which will be put in
-- the corresponding AREC activation record), and types. The types are
-- not put in the AREC activation record, but referenced bounds (i.e.
- -- generated _FIRST and _LAST entites, and formal parameters) will be
+ -- generated _FIRST and _LAST entities, and formal parameters) will be
-- in the list in their own right.
Last : SI_Type;
-- Add a runtime check to verify assertion expression DIC_Expr of
-- inherited pragma DIC_Prag. This routine applies class-wide pre-
-- and postcondition-like runtime semantics to the check. Expr is
- -- the assertion expression after substitition has been performed
+ -- the assertion expression after substitution has been performed
-- (via Replace_References). All generated code is added to list Stmts.
procedure Add_Inherited_DICs
-- ...
-- end My_Label;
- -- This is the case where we want to use the entry in the suspicous
+ -- This is the case where we want to use the entry in the suspicious
-- label table to flag the semicolon saying it should be a colon.
-- Label_OK will be false because the label does not match (we have
-- This field is used to provide the name of the construct being parsed
-- and indirectly its kind. For loops and blocks, the field contains the
-- source name or the generated one. For package specifications, bodies,
- -- subprogram specifications and bodies the field holds the correponding
- -- program unit name. For task declarations and bodies, protected types
- -- and bodies, and accept statements the field hold the name of the type
- -- or operation. For if-statements, case-statements, return statements,
- -- and selects, the field is initialized to Error.
+ -- subprogram specifications and bodies the field holds the
+ -- corresponding program unit name. For task declarations and bodies,
+ -- protected types and bodies, and accept statements the field hold the
+ -- name of the type or operation. For if-statements, case-statements,
+ -- return statements, and selects, the field is initialized to Error.
-- Note: this is a bit of an odd (mis)use of Error, since there is no
-- Error, but we use this value as a place holder to indicate that it
-- Table for Handling Suspicious Labels --
------------------------------------------
- -- This is a special data structure which is used to deal very spefifically
+ -- This is a special data structure which is used to deal very specifically
-- with the following error case
-- label;
No_Specification_Of_Aspect_Warning : array (Aspect_Id) of Boolean :=
(others => True);
- -- An entry in this array is set False in reponse to a previous call to
- -- Set_No_Speficiation_Of_Aspect for pragmas in the main unit that
+ -- An entry in this array is set False in response to a previous call to
+ -- Set_No_Specification_Of_Aspect for pragmas in the main unit that
-- specify Warning as False. Once set False, an entry is never reset.
No_Specification_Of_Aspect_Set : Boolean := False;
- -- Set True if any entry of No_Specifcation_Of_Aspects has been set True.
+ -- Set True if any entry of No_Specification_Of_Aspects has been set True.
-- Once set True, this is never turned off again.
No_Use_Of_Attribute : array (Attribute_Id) of Source_Ptr :=
-- Save contents of Check_Policy_List on entry to restore on exit. The
-- Check_Policy pragmas are chained with Check_Policy_List pointing to
-- the most recent entry. This list is searched starting here, so that
- -- the search finds the most recent appicable entry. When we restore
+ -- the search finds the most recent applicable entry. When we restore
-- Check_Policy_List on exit from the scope, the effect is to remove
-- all entries set in the scope being exited.
<<Leave>>
if Has_Aspects (N) then
- -- Unclear that any other aspects may appear here, snalyze them
+ -- Unclear that any other aspects may appear here, analyze them
-- for completion, given that the grammar allows their appearance.
Analyze_Aspect_Specifications (N, Pack_Id);
begin
-- When aspect Abstract_State appears on a generic package,
- -- it is propageted to the package instance. The context in
+ -- it is propagated to the package instance. The context in
-- this case is the instance spec.
if Nkind (Context) = N_Package_Instantiation then
begin
-- When aspect Initial_Condition appears on a generic
- -- package, it is propageted to the package instance. The
+ -- package, it is propagated to the package instance. The
-- context in this case is the instance spec.
if Nkind (Context) = N_Package_Instantiation then
begin
-- When aspect Initializes appears on a generic package,
- -- it is propageted to the package instance. The context
+ -- it is propagated to the package instance. The context
-- in this case is the instance spec.
if Nkind (Context) = N_Package_Instantiation then
else False); -- can't happen
-- For X'Size, X can be a type or object; for X'Value_Size,
-- X can be a type. Note that we already checked that 'Size
- -- can be specified only for a first subytype.
+ -- can be specified only for a first subtype.
begin
FOnly := True;
function Is_Pragma_Or_Corr_Pragma_Present_In_Rep_Item
(Rep_Item : Node_Id) return Boolean;
-- This routine checks if Rep_Item is either a pragma or an aspect
- -- specification node whose correponding pragma (if any) is present in
+ -- specification node whose corresponding pragma (if any) is present in
-- the Rep Item chain of the entity it has been specified to.
--------------------------------------------------
while Present (Form) and then Present (Act) loop
-- Check whether the formal is aliased and if the accessibility
-- level of the actual is deeper than the accessibility level
- -- of the enclosing subprogam to which the current return
+ -- of the enclosing subprogram to which the current return
-- statement applies.
-- Should we be checking Is_Entity_Name on Act? Won't this miss
-- If the right-hand side of an assignment statement is a build-in-place
-- call we cannot build in place, so we insert a temp initialized with
-- the call, and transform the assignment statement to copy the temp.
- -- Transform_BIP_Assignment does the tranformation, and
+ -- Transform_BIP_Assignment does the transformation, and
-- Should_Transform_BIP_Assignment determines whether we should.
-- The same goes for qualified expressions and conversions whose
-- operand is such a call.
procedure Check_Predicate_Use (T : Entity_Id);
-- Diagnose Attempt to iterate through non-static predicate. Note that
-- a type with inherited predicates may have both static and dynamic
- -- forms. In this case it is not sufficent to check the static predicate
- -- function only, look for a dynamic predicate aspect as well.
+ -- forms. In this case it is not sufficient to check the static
+ -- predicate function only, look for a dynamic predicate aspect as well.
procedure Process_Bounds (R : Node_Id);
-- If the iteration is given by a range, create temporaries and
Set_Is_Null_Loop (Loop_Nod);
Null_Range := True;
- -- Suppress other warnigns about the body of the loop, as
+ -- Suppress other warnings about the body of the loop, as
-- it will never execute.
Set_Suppress_Loop_Warnings (Loop_Nod);
end if;
-- object representing the minimum of the accessibility level value that
-- is passed in and the accessibility level of the callee's parameter
-- and locals and use it in the case of a call to a nested subprogram.
- -- This generated object is refered to as a "minimum accessiblity
+ -- This generated object is referred to as a "minimum accessibility
-- level."
if Present (Spec_Id) or else Present (Body_Id) then
E : Entity_Id;
begin
- -- Search for entities in the enclosing scope of this synchonized
+ -- Search for entities in the enclosing scope of this synchronized
-- type.
pragma Assert (Is_Concurrent_Type (Conc_Typ));
return;
end if;
- -- Set P back to the non-renamed package so that visiblilty of the
+ -- Set P back to the non-renamed package so that visibility of the
-- entities within the package can be properly set below.
P := Entity (Pack_Name);
-- symbol is not empty, then the symbol appears as a
-- suffix. Otherwise, a new string is created and appears
-- as a suffix of Item. This string results in the
- -- successive concatanations between each unit symbol
+ -- successive concatenations between each unit symbol
-- raised by its corresponding dimension power from the
-- dimensions of Item.
-- * Put_Dim_Of : The output is a new string resulting in the successive
- -- concatanations between each dimension symbol raised by
+ -- concatenations between each dimension symbol raised by
-- its corresponding dimension power from the dimensions of
-- Item.
function Is_Ada_Semantic_Target (Id : Entity_Id) return Boolean;
pragma Inline (Is_Ada_Semantic_Target);
- -- Determine whether arbitrary entity Id denodes a source or internally
+ -- Determine whether arbitrary entity Id denotes a source or internally
-- generated subprogram which emulates Ada semantics.
function Is_Assertion_Pragma_Target (Id : Entity_Id) return Boolean;
pragma Inline (Is_Assertion_Pragma_Target);
-- Determine whether arbitrary entity Id denotes a procedure which
- -- varifies the run-time semantics of an assertion pragma.
+ -- verifies the run-time semantics of an assertion pragma.
function Is_Bodiless_Subprogram (Subp_Id : Entity_Id) return Boolean;
pragma Inline (Is_Bodiless_Subprogram);
-- which started the recursive search. If this is not the case, then
-- there is a potential ABE if the access value is used to call the
-- subprogram. Emit a warning only when switch -gnatw.f (warnings on
- -- suspucious 'Access) is in effect.
+ -- suspicious 'Access) is in effect.
elsif Warn_On_Elab_Access
and then Present (Body_Decl)
if not Comes_From_Source (Curr) then
null;
- -- If the traversal came from the handled sequence of statments,
+ -- If the traversal came from the handled sequence of statements,
-- then the node appears at the level of the enclosing construct.
-- This is a more reliable test because transients scopes within
-- the declarative region of the encapsulator are hard to detect.
elsif Nkind (Curr) in
N_Entry_Body | N_Subprogram_Body | N_Task_Body
then
- -- If the traversal came from the handled sequence of statments,
+ -- If the traversal came from the handled sequence of statements,
-- then the node cannot possibly appear at any level. This is
-- a more reliable test because transients scopes within the
-- declarative region of the encapsulator are hard to detect.
if From_Aspect_Specification (N) then
- -- Change appearence of "pragma" in message to "aspect"
+ -- Change appearance of "pragma" in message to "aspect"
J := Res'First;
while J <= Res_Last - 5 loop
-- The current refinement clause is legally constructed following
-- the rules in SPARK RM 7.2.5, therefore it can be removed from
- -- the pool of candidates. The seach continues because a single
+ -- the pool of candidates. The search continues because a single
-- dependence clause may have multiple matching refinements.
if Inputs_Match and Outputs_Match then
return Stmt;
-- The subprogram declaration is an internally generated spec
- -- for a stand-alone subrogram body declared inside a protected
- -- body.
+ -- for a stand-alone subprogram body declared inside a
+ -- protected body.
elsif Present (Corresponding_Body (Stmt))
and then Comes_From_Source (Corresponding_Body (Stmt))
-- whether appearance of some name in a given pragma is to be considered
-- as a reference for the purposes of warnings about unreferenced objects.
- -- -1 indicates that appearence in any argument is significant
+ -- -1 indicates that appearance in any argument is significant
-- 0 indicates that appearance in any argument is not significant
-- +n indicates that appearance as argument n is significant, but all
-- other arguments are not significant
-- of the context, or the type of the other operand has a user-defined
-- literal aspect that can be applied to the literal to resolve the node.
-- If such aspect exists, replace literal with a call to the
- -- corresponing function and return True, return false otherwise.
+ -- corresponding function and return True, return false otherwise.
-------------------------
-- Ambiguous_Character --
end case;
-- Mark relevant use-type and use-package clauses as effective using
- -- the original node because constant folding may have occured and
+ -- the original node because constant folding may have occurred and
-- removed references that need to be examined.
if Nkind (Original_Node (N)) in N_Op then
end if;
-- AI12-0100: Once the qualified expression is resolved, check whether
- -- operand statisfies a static predicate of the target subtype, if any.
+ -- operand satisfies a static predicate of the target subtype, if any.
-- In the static expression case, a predicate check failure is an error.
if Has_Predicates (Target_Typ) then
end if;
-- Ada 2012: Once the type conversion is resolved, check whether the
- -- operand statisfies a static predicate of the target subtype, if any.
+ -- operand satisfies a static predicate of the target subtype, if any.
-- In the static expression case, a predicate check failure is an error.
if Has_Predicates (Target_Typ) then
function In_Instance_Code return Boolean;
-- Return True if expression is within an instance but is not in one of
-- the actuals of the instantiation. Type conversions within an instance
- -- are not rechecked because type visbility may lead to spurious errors,
+ -- are not rechecked because type visibility may lead to spurious errors
-- but conversions in an actual for a formal object must be checked.
function Is_Discrim_Of_Bad_Access_Conversion_Argument
(Scope (Defining_Identifier (Par))));
when N_Assignment_Statement =>
- -- Return the accessiblity level of the left-hand part
+ -- Return the accessibility level of the left-hand part
return Accessibility_Level
(Expr => Name (Par),
-- * Semantic fields of nodes such as First_Real_Statement must be
-- updated to reference the proper replicated nodes.
- -- Finally, quantified expressions contain an implicit delaration for
+ -- Finally, quantified expressions contain an implicit declaration for
-- the bound variable. Given that quantified expressions appearing
-- in contracts are copied to create pragmas and eventually checking
-- procedures, a new bound variable must be created for each copy, to
-- follows:
--
-- Checks - Save the status of Elaboration_Check
- -- Level - Save the declaration level of N_Id (if appicable)
+ -- Level - Save the declaration level of N_Id (if applicable)
-- Modes - Save the Ghost and SPARK modes in effect (if applicable)
-- Warnings - Save the status of Elab_Warnings
-- Is_Read
-- Present in variable reference markers. Set when the original variable
- -- reference constitues a read of the variable.
+ -- reference constitutes a read of the variable.
-- Is_Source_Call
-- Present in call marker nodes. Set when the related call came from
-- Is_Write
-- Present in variable reference markers. Set when the original variable
- -- reference constitues a write of the variable.
+ -- reference constitutes a write of the variable.
-- Itype
-- Used in N_Itype_Reference node to reference an itype for which it is
procedure Write_Param_Specs (N : Node_Id);
-- Output parameter specifications for node N (which is a subprogram, or
-- entry or entry family or access-subprogram-definition, all of which
- -- have a Parameter_Specificatioons field).
+ -- have a Parameter_Specifications field).
procedure Write_Rewrite_Str (S : String);
-- Writes out a string (typically containing <<< or >>>}) for a node
-- Note: the following code for N_Aspect_Specification is not
-- normally used, since we deal with aspects as part of a
-- declaration, but it is here in case we deliberately try
- -- to print an N_Aspect_Speficiation node (e.g. from GDB).
+ -- to print an N_Aspect_Specification node (e.g. from GDB).
when N_Aspect_Specification =>
Sprint_Node (Identifier (Node));
-- Set true if we output at least one parameter
begin
- -- Write out explicit specs from Parameter_Speficiations list
+ -- Write out explicit specs from Parameter_Specifications list
if Specs_Present then
Write_Str_With_Col_Check (" (");
-- We defer to the implementation of UR_Write in all cases, either directly
-- for values that are naturally written in a JSON compatible format, or by
- -- first computing a decimal approxixmation for other values.
+ -- first computing a decimal approximation for other values.
procedure UR_Write_To_JSON (Real : Ureal) is
Val : constant Ureal_Entry := Ureals.Table (Real);
elsif Val.Rbase = 0 and then Val.Num mod Val.Den = 0 then
T := Real;
- -- For other constants, compute an approxixmation in base 10
+ -- For other constants, compute an approximation in base 10
else
declare