[multiple changes]

2009-07-22  Robert Dewar  <dewar@adacore.com>

	* exp_tss.ads, sem_eval.adb: Minor reformatting

2009-07-22  Bob Duff  <duff@adacore.com>

	* exp_dist.adb, exp_dist.ads: Update comments.

From-SVN: r149933
This commit is contained in:
Arnaud Charlet 2009-07-22 15:24:46 +02:00
parent 09494c325c
commit 1d1bd8ad31
5 changed files with 57 additions and 51 deletions

View File

@ -1,3 +1,11 @@
2009-07-22 Robert Dewar <dewar@adacore.com>
* exp_tss.ads, sem_eval.adb: Minor reformatting
2009-07-22 Bob Duff <duff@adacore.com>
* exp_dist.adb, exp_dist.ads: Update comments.
2009-07-22 Brett Porter <porter@adacore.com>
* init.c (__gnat_init_float): For SPE, set bits in SPEFSCR instead of

View File

@ -64,10 +64,10 @@ package body Exp_Dist is
-- 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,
@ -99,7 +99,7 @@ package body Exp_Dist is
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
@ -170,10 +170,9 @@ package body Exp_Dist is
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;
@ -200,13 +199,13 @@ package body Exp_Dist is
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;
@ -233,7 +232,7 @@ package body Exp_Dist is
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;

View File

@ -58,7 +58,7 @@ package Exp_Dist is
Body_Decls : List_Id);
-- Add primitive for the stub type, and the RPC receiver. The declarations
-- are inserted after Insertion_Node, while the bodies are appended at the
-- end of Decls.
-- end of Body_Decls.
procedure Remote_Types_Tagged_Full_View_Encountered
(Full_View : Entity_Id);
@ -75,13 +75,13 @@ package Exp_Dist is
-- at the end of the compilation unit, which is a package spec.
procedure Expand_Receiving_Stubs_Bodies (Unit_Node : Node_Id);
-- Call the expansion phase for the calling stubs. The code will be added
-- Call the expansion phase for the receiving stubs. The code will be added
-- at the end of the compilation unit, which may be either a package spec
-- or a package body.
procedure Expand_All_Calls_Remote_Subprogram_Call (N : Node_Id);
-- Rewrite a call to a subprogram located in a Remote_Call_Interface
-- package on which the pragma All_Calls_Remote applies so that it
-- package to which the pragma All_Calls_Remote applies so that it
-- goes through the PCS. N is either an N_Procedure_Call_Statement
-- or an N_Function_Call node.

View File

@ -72,8 +72,8 @@ package Exp_Tss is
-- The following codes are used to denote TSSs:
-- Note: When making additions to this list, update the list in
-- snames.adb-tmpl
-- Note: When making additions to this list, make the corresponding change
-- to the list in snames.adb-tmpl.
type TSS_Name_Type is new String (1 .. 2);
subtype TNT is TSS_Name_Type;

View File

@ -1953,11 +1953,11 @@ package body Sem_Eval is
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 --
@ -1969,8 +1969,8 @@ package body Sem_Eval is
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
@ -1984,9 +1984,9 @@ package body Sem_Eval is
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
@ -2089,9 +2089,9 @@ package body Sem_Eval is
-- 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);
@ -2104,8 +2104,8 @@ package body Sem_Eval is
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
@ -2132,8 +2132,7 @@ package body Sem_Eval is
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);
@ -2189,8 +2188,8 @@ package body Sem_Eval is
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
@ -2357,10 +2356,10 @@ package body Sem_Eval is
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);
@ -2390,7 +2389,7 @@ package body Sem_Eval is
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
@ -2402,8 +2401,8 @@ package body Sem_Eval is
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);
@ -2480,9 +2479,9 @@ package body Sem_Eval is
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);
@ -2529,8 +2528,8 @@ package body Sem_Eval is
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.
-----------------------