OSDN Git Service

2006-02-13 Javier Miranda <miranda@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Feb 2006 09:39:06 +0000 (09:39 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Feb 2006 09:39:06 +0000 (09:39 +0000)
commit68f959497b06cdc05045ce637db6bfa206d5931d
tree753775bd3fb216e28cdfcb6063a015d8fecbd34a
parent357dd91a6c639dd87c1a82918d6709a674b27e96
2006-02-13  Javier Miranda  <miranda@adacore.com>

* exp_disp.ads, exp_disp.adb (Expand_Dispatching_Call): If the
controlling argument of the dispatching call is an abstract interface
class-wide type then we use it directly.
Check No_Dispatching_Calls restriction.
(Default_Prim_Op_Position): Remove the code that looks for the last
entity in the list of aliased subprograms. This code was wrong in
case of renamings.
(Fill_DT_Entry): Add assertion to avoid the use of this subprogram
when the source is compiled with the No_Dispatching_Calls restriction.
(Init_Predefined_Interface_Primitives): No need to inherit primitives
if we are compiling with restriction No_Dispatching_Calls.
(Make_Disp_XXX): Addition of assertion to avoid the use of all these
subprograms if we are compiling under No_Dispatching_Calls restriction.
(Make_DT): Generate a dispatch table with a single dummy entry if
we are compiling with the No_Dispatching_Calls restriction. In
addition, in this case we don't generate code that calls to the
following run-time subprograms: Set_Type_Kind, Inherit_DT.
(Make_Select_Specific_Data_Table): Add assertion to avoid the use
of this subprogram if compiling with the No_Dispatching_Calls
restriction.
(Expand_Type_Conversion): Instead of using the actual parameter,
the argument passed as parameter to the conversion function was
erroneously referenced by the expander.
(Ada_Actions): Addition of Get_Predefined_Prim_Op_Address,
Set_Predefined_Primitive_Op_Address and Set_Signature.
(Expand_Dispatching_Call): Generate call to
Get_Predefined_Prim_Op_Address for predefined primitives.
(Fill_DT_Entry): Generate call to Set_Predefined_Prim_Op_Address for
predefined primitives.
(Make_DT, Make_Secondary_DT): If the tagged type has no user defined
primitives we reserve one dummy entry to ensure that the tag does not
point to some memory that is associated with some other object. In
addition, remove all the old code that generated the assignments
associated with the signature of the dispatch table and replace them
by a call to the new subprogram Set_Signature.
(Set_All_DT_Position): Change the algorithm because now we have a
separate dispatch table associated with predefined primitive operations.
(Expand_Interface_Conversion): In case of non-static offset_to_top
add explicit dereference to get access to the object after the call
to displace the pointer to the object.
(Expand_Interface_Thunk): Modify the generation of the actual used
in the calls to the run-time function Offset_To_Top to fulfil its
new interface.
(Make_DT): Add the new actuals required to call Set_Offset_To_Top.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111064 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/exp_disp.adb
gcc/ada/exp_disp.ads