-- is built. This type has two properties:
- -- 1) Since it has the same structure than RACW_Stub_Type, it can
+ -- 1) Since it has the same structure as RACW_Stub_Type, it can
-- be converted to and from this type to make it suitable for
-- System.Partition_Interface.Get_Unique_Remote_Pointer in order
- -- to avoid memory leaks when the same remote object arrive on the
+ -- to avoid memory leaks when the same remote object arrives on the
-- same partition through several paths;
-- 2) It also has the same dispatching table as the designated type D,
function Hash (F : Name_Id) return Hash_Index;
-- The generation of subprogram identifiers requires an overload counter
- -- to be associated with each remote subprogram names. These counters are
+ -- to be associated with each remote subprogram name. These counters are
-- maintained in a hash table on name ids.
type Subprogram_Identifiers is record
function Build_Remote_Subprogram_Proxy_Type
(Loc : Source_Ptr;
ACR_Expression : Node_Id) return Node_Id;
- -- Build and return a tagged record type definition for an RCI
- -- subprogram proxy type.
- -- ACR_Expression is use as the initialization value for
- -- the All_Calls_Remote component.
+ -- Build and return a tagged record type definition for an RCI subprogram
+ -- proxy type. ACR_Expression is used as the initialization value for the
+ -- All_Calls_Remote component.
function Build_Get_Unique_RP_Call
(Loc : Source_Ptr;
New_Name : Name_Id := No_Name) return Node_Id;
-- Build the calling stub for a given subprogram with the subprogram ID
-- being Subp_Id. If Stub_Type is given, then the "addr" field of
- -- parameters of this type will be marshalled instead of the object
- -- itself. It will then be converted into Stub_Type before performing
- -- the real call. If Dynamically_Asynchronous is True, then it will be
- -- computed at run time whether the call is asynchronous or not.
- -- Otherwise, the value of the formal Asynchronous will be used.
- -- If Locator is not Empty, it will be used instead of RCI_Cache. If
- -- New_Name is given, then it will be used instead of the original name.
+ -- parameters of this type will be marshalled instead of the object itself.
+ -- It will then be converted into Stub_Type before performing the real
+ -- call. If Dynamically_Asynchronous is True, then it will be computed at
+ -- run time whether the call is asynchronous or not. Otherwise, the value
+ -- of the formal Asynchronous will be used. If Locator is not Empty, it
+ -- will be used instead of RCI_Cache. If New_Name is given, then it will
+ -- be used instead of the original name.
function Build_RPC_Receiver_Specification
(RPC_Receiver : Entity_Id;
function Could_Be_Asynchronous (Spec : Node_Id) return Boolean;
-- Return True if nothing prevents the program whose specification is
- -- given to be asynchronous (i.e. no out parameter).
+ -- given to be asynchronous (i.e. no [IN] OUT parameters).
function Pack_Entity_Into_Stream_Access
(Loc : Source_Ptr;
T : constant Entity_Id := Etype (N);
function In_Any_Integer_Context return Boolean;
- -- If the literal is resolved with a specific type in a context
- -- where the expected type is Any_Integer, there are no range checks
- -- on the literal. By the time the literal is evaluated, it carries
- -- the type imposed by the enclosing expression, and we must recover
- -- the context to determine that Any_Integer is meant.
+ -- If the literal is resolved with a specific type in a context where
+ -- the expected type is Any_Integer, there are no range checks on the
+ -- literal. By the time the literal is evaluated, it carries the type
+ -- imposed by the enclosing expression, and we must recover the context
+ -- to determine that Any_Integer is meant.
----------------------------
-- In_Any_Integer_Context --
begin
-- Any_Integer also appears in digits specifications for real types,
- -- but those have bounds smaller that those of any integer base
- -- type, so we can safely ignore these cases.
+ -- but those have bounds smaller that those of any integer base type,
+ -- so we can safely ignore these cases.
return K = N_Number_Declaration
or else K = N_Attribute_Reference
begin
-- If the literal appears in a non-expression context, then it is
- -- certainly appearing in a non-static context, so check it. This
- -- is actually a redundant check, since Check_Non_Static_Context
- -- would check it, but it seems worth while avoiding the call.
+ -- certainly appearing in a non-static context, so check it. This is
+ -- actually a redundant check, since Check_Non_Static_Context would
+ -- check it, but it seems worth while avoiding the call.
if Nkind (Parent (N)) not in N_Subexpr
and then not In_Any_Integer_Context
-- Eval_Membership_Op --
------------------------
- -- A membership test is potentially static if the expression is static,
- -- and the range is a potentially static range, or is a subtype mark
- -- denoting a static subtype (RM 4.9(12)).
+ -- A membership test is potentially static if the expression is static, and
+ -- the range is a potentially static range, or is a subtype mark denoting a
+ -- static subtype (RM 4.9(12)).
procedure Eval_Membership_Op (N : Node_Id) is
Left : constant Node_Id := Left_Opnd (N);
Fold : Boolean;
begin
- -- Ignore if error in either operand, except to make sure that
- -- Any_Type is properly propagated to avoid junk cascaded errors.
+ -- Ignore if error in either operand, except to make sure that Any_Type
+ -- is properly propagated to avoid junk cascaded errors.
if Etype (Left) = Any_Type
or else Etype (Right) = Any_Type
return;
end if;
- -- For string membership tests we will check the length
- -- further below.
+ -- For string membership tests we will check the length further on
if not Is_String_Type (Def_Id) then
Lo := Type_Low_Bound (Def_Id);
end;
end if;
- -- Fold the membership test. We know we have a static range and Lo
- -- and Hi are set to the expressions for the end points of this range.
+ -- Fold the membership test. We know we have a static range and Lo and
+ -- Hi are set to the expressions for the end points of this range.
elsif Is_Real_Type (Etype (Right)) then
declare
Typ : constant Entity_Id := Etype (N);
begin
- -- Negation is equivalent to subtracting from the modulus minus
- -- one. For a binary modulus this is equivalent to the ones-
- -- component of the original value. For non-binary modulus this
- -- is an arbitrary but consistent definition.
+ -- Negation is equivalent to subtracting from the modulus minus one.
+ -- For a binary modulus this is equivalent to the ones-complement of
+ -- the original value. For non-binary modulus this is an arbitrary
+ -- but consistent definition.
if Is_Modular_Integer_Type (Typ) then
Fold_Uint (N, Modulus (Typ) - 1 - Rint, Stat);
Hex : Boolean;
begin
- -- Can only fold if target is string or scalar and subtype is static
+ -- Can only fold if target is string or scalar and subtype is static.
-- Also, do not fold if our parent is an allocator (this is because
-- the qualified expression is really part of the syntactic structure
-- of an allocator, and we do not want to end up with something that
then
Check_Non_Static_Context (Operand);
- -- If operand is known to raise constraint_error, set the
- -- flag on the expression so it does not get optimized away.
+ -- If operand is known to raise constraint_error, set the flag on the
+ -- expression so it does not get optimized away.
if Nkind (Operand) = N_Raise_Constraint_Error then
Set_Raises_Constraint_Error (N);
PK : constant Node_Kind := Nkind (Parent (N));
begin
- -- If the literal appears in a non-expression context
- -- and not as part of a number declaration, then it is
- -- appearing in a non-static context, so check it.
+ -- If the literal appears in a non-expression context and not as part of
+ -- a number declaration, then it is appearing in a non-static context,
+ -- so check it.
if PK not in N_Subexpr and then PK /= N_Number_Declaration then
Check_Non_Static_Context (N);
Length_Mismatch : declare
procedure Get_Static_Length (Op : Node_Id; Len : out Uint);
- -- If Op is an expression for a constrained array with a known
- -- at compile time length, then Len is set to this (non-negative
+ -- If Op is an expression for a constrained array with a known at
+ -- compile time length, then Len is set to this (non-negative
-- length). Otherwise Len is set to minus 1.
-----------------------