exp_dist.ads, [...] (Build_To_Any_Call, [...]): Do an Unchecked_Conversion to handle...
authorThomas Quinot <quinot@adacore.com>
Fri, 6 Apr 2007 09:20:52 +0000 (11:20 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 6 Apr 2007 09:20:52 +0000 (11:20 +0200)
commit8aa23fe306c816b02ff00a1419489b2fd071ae16
tree0dd48c34b08c529fb9f2e08df639fdaa6fe62e88
parentcc2c4c656715397ac4f815c5b4987c03dd839cbf
exp_dist.ads, [...] (Build_To_Any_Call, [...]): Do an Unchecked_Conversion to handle the passage from the Underlying Type to...

2007-04-06  Thomas Quinot  <quinot@adacore.com>

* exp_dist.ads, exp_dist.adb (Build_To_Any_Call, Build_From_Any_Call):
Do an Unchecked_Conversion to handle the passage from the Underlying
Type to the Base Type when calling Build_To_Any_Call and
Build_From_Any_Call.
(Build_Actual_Object_Declaration): Set Object's Ekind to E_Variable or
E_Constant, depending upon Variable formal.
(GARLIC_Support.Build_Subprogram_Receiving_Stubs,
PolyORB_Support.Build_Subprogram_Receiving_Stubs): For a formal
parameter that requires an extra constrained parameter, declare
temporary for actual as a variable, not a constant.
(Add_RACW_Primitive_Declarations_And_Bodies): Generate bodies only when
the unit being compiled is the one that contains the stub type.
Change primitive operation name for the RACW associated with a RAS
from Call to _Call so it cannot clash with any legal identifier.
(PolyORB_Support.Add_RACW_Write_Attribute): Remove unused constant
Is_RAS.
(Append_RACW_Bodies): New subprogram.
(Expand_Receiving_Stubs_Bodies): Pass a 'Stmts' list to
Add_Receiving_Stubs_To_Declarations functions.
When expanding a package body, this list correspond to the
statements in the HSS at the end of the pacakge.
When expanding a package spec, this list correspond to the
spec declarations.
(Add_Receiving_Stubs_To_Declarations): Append the function
registering the receiving stubs at the end of the 'Stmts' list.
(RCI_Package_Locator): Pass the new Version generic formal when
instantiating a RCI_Locator package.
(Build_From_Any_Function): To compute the High bound for an
unconstrained array actual, we add the Low bound with the length.
Thus we must convert the low bound and the length to an appropriate
type before doing the sum.
(Build_Subprogram_Receiving_Stubs, PolyORB):
 * Retrieve the extra formals parameters at the
   end of the parameter stream.
 * Use Move_Any_Value to write back out parameters
   after executing the request as it is more efficient
   than Copy_Any_Value.
 * Build the any containing Extra Formals with the
   appropriate typecode.
(PolyORB_Support.Helpers.Append_Record_Traversal): Nothing to do for an
empty Component_List.
(Build_Actual_Object_Declaration): New subprogram. Build and insert into
the tree the declaration for an object that serves as actual parameter
in server-side stubs.
(GARLIC_Support.Build_Subprogram_Receiving_Stubs,
PolyORB_Support.Build_Subprogram_Receiving_Stubs):
Use Build_Actual_Object_Declaration to prepare the actuals.
(Add_Parameter_To_NVList): Set the parameter mode to In for
Extra Constrained Parameters.
(Build_General_Calling_Stubs): Set the parameter type to boolean for
Extra Constrained parameters.
(Build_To_Any_Function, Build_From_Any_Function,
Built_TypeCode_Function): When Typ is implicit, call the correct
function with the first not implicit parent type.
(TC_Rec_Add_Process_Element, FA_Rec_Add_Process_Element,
(FA_Ary_Add_Process_Element): When Datum is an Any, we cannot infer the
typecode from the Etype. Therefore we retrieve the correct typecode
with a call to Get_Any_Type.
(Copy_Specification): Do controlling formal type substitution based on
Is_Controlling_Formal flag, instead of caller-provided object type.
(Build_Subprogram_Calling_Stubs): When retrieveing the original spec for
a RACW primitive operation, we might get a subprogram declaration for an
ancestor of the RACW designated type (not for the designated type
itself), in the case where this operation is inherited. In this case we
have no easy means of determining the original tagged type for which
the primitive was declared, so instead we now rely on
Copy_Specification to use the Is_Controlling_Formal flag to determine
which formals require type substitution.

From-SVN: r123565
gcc/ada/exp_dist.adb
gcc/ada/exp_dist.ads