exp_disp.adb
169 KB
-
exp_disp.ads, [...] (Expand_Dispatching_Call): If the controlling argument of… · b0efe69e
exp_disp.ads, [...] (Expand_Dispatching_Call): If the controlling argument of the dispatching call is an abstract interface... 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. From-SVN: r111064
Javier Miranda committed