summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_disp.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-06 09:20:11 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-06 09:20:11 +0000
commit343d35dc66bb93bde59e03709f7cb27e3d9c7d8f (patch)
treec3f2bb77ee7464518c0c0018ae8c01b2611f32d4 /gcc/ada/exp_disp.ads
parent3692bc6657f9d4a7a81ade98127a03a60ca5c9c8 (diff)
downloadgcc-343d35dc66bb93bde59e03709f7cb27e3d9c7d8f.tar.gz
2007-04-06 Javier Miranda <miranda@adacore.com>
Gary Dismukes <dismukes@adacore.com> Ed Schonberg <schonberg@adacore.com> * exp_ch13.adb (Expand_External_Tag_Definition): Replace call to the run-time subprogram Set_External_Tag by call to Build_Set_External_Tag. * exp_ch4.adb (Expand_Allocator_Expression): Don't perform a run-time accessibility on class-wide allocators if the allocator occurs at the same scope level as the allocator's type. The check is guaranteed to succeed in that case, even when the expression originates from a parameter of the containing subprogram. (Expand_N_Op_Eq): Do nothing in case of dispatching call if compiling under No_Dispatching_Calls restriction. During the semantic analysis we already notified such violation. (Tagged_Membership): Constant folding. There is no need to check the tag at run-time if the type of the right operand is non class-wide abstract. Replace call to Is_Ancestor by call to Is_Parent to support concurrent types with interface types. (Expand_N_Allocator): Add an assertion associated with the generation of the master_id. (Expand_N_Slice): Do not enable range check to nodes associated with the frontend expansion of the dispatch table. (Is_Local_Access_Discriminant): Subsidiary function to Expand_N_Allocator. (Tagged_Membership): Replace generation of call to the run-time subprogram CW_Membership by call to Build_CW_Membership. (Expand_Allocator_Expression): Replace generation of call to the run-time subprogram Get_Access_Level by call to Build_Get_Access_Level. * exp_disp.ads, exp_disp.adb (Make_DT): Code reorganization to initialize most the TSD components by means of an aggregate. Modify the declaration of the object containing the TSD because we now expand code that has a higher level of abstraction. The TSD has a discriminant containing the Inheritance Depth Level, value that is used in the membership test but also to fix the size of the table of ancestors. (Expand_Interface_Conversion): Insert function body at the closest place to the conversion expression, to prevent access-before-elaboration errors in the backend. Code improved to reduce the size of the dispatch table if compiling under restriction No_Dispatching_Calls plus code cleanup. Code reorganization plus removal of calls to Set_Num_Prim_Ops (Make_Secondary_DT): Remove call to Set_Num_Prim_Ops. (Expand_Dispatching_Call): Minor code reorganization plus addition of code to return immediately if compiling under No_Dispatching_Calls restriction. (Set_All_DT_Position): Remove code associated with the old CPP pragmas. CPP_Virtual and CPP_Vtable are no longer supported. (Expand_Interface_Conversion): Add missing support for interface type derivations. (Expand_Interface_Actuals): Replace calls to Is_Ancestor by calls to Is_Parent to support concurrent types with interfaces. (Init_Predefined_Interface_Primitives): Removed. (Make_Secondary_DT): Modified to support concurrent record types. (Set_All_DT_Position): Modified to support concurrent record types. (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Remove entries associated with Get_External_Tag, Inherit_TSD, Set_External_Tag. (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Remove entry associated with CW_Membership. (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Remove entries associated with Get_Access_Level, Get_Predefined_Prim_Op_Address, Get_Prim_Op_Address Get_RC_Offset, Get_Remotely_Callable, Inherit_DT, Set_Access_Level, Set_Expanded_Name, Set_Predefined_Prim_Op_Address, Set_Prim_Op_Address, Set_RC_Offset, Set_Remotely_Callable, Set_TSD. (Expand_Dispatching_Call): Replace generation of call to the run-time subprograms Get_Predefined_Prim_Op_Address and Get_Prim_Op_Address by calls to Build_Get_Predefined_Prim_Op_Address, and Build_Get_Prim_Op_ Address. (Fill_DT_Entry, Fill_Secondary_DT_Entry): Replace generation of call to the run-time subprograms Set_Predefined_Prim_Op_Address and Set_Prim_ Op_Address by calls to Build_Set_Predefined_Prim_Op_Address, and Build_Set_Prim_Op_Address. (Get_Remotely_Callable): Subprogram removed. (Init_Predefined_Interface_Primitives): Replace generation of call to the run-time subprograms Inherit_DT by call to Build_Inherit_Predefined_ Prims. * sem_elab.adb (Set_Elaboration_Constraint): Replace the call to First (Parameter_Associations ()) with the call to First_Actual that returns an actual parameter expression for both named and positional associations. * sem_disp.adb (Check_Dispatching_Call): In case of dispatching call check violation of restriction No_Dispatching_Calls. (Check_Controlling_Type): A formal of a tagged incomplete type is a controlling argument. * exp_util.ads, exp_util.adb (Type_May_Have_Bit_Aligned_Components): Use First/Next_Component_Or_Discriminant (Insert_Actions): Add entries for new N_Push and N_Pop nodes (Find_Implemented_Interface): Removed. All the calls to this subprogram specify Any_Limited_Interface, and this functionality is already provided by the function Has_Abstract_Interfaces. (Find_Interface, Find_Interface_Tag, Find_Interface_ADT): Modified to support concurrent types implementing interfaces. (Find_Implemented_Interface): Removed. All the calls to this subprogram specify kind Any_Limited_Interface, and this functionality is already provided by the function Has_Abstract_Interfaces. (Remove_Side_Effects): replace Controlled_Type by CW_Or_Controlled_Type whenever the issue is related to using or not the secondary stack. * par-ch12.adb (P_Formal_Type_Definition): Update calls to P_Interface_Type_Definition to fulfill the new interface (the formal Is_Synchronized is no longer required). * Make-lang.in (GNAT_ADA_OBJS): Addition of exp_atag.o Update dependencies. * exp_atag.ads, exp_atag.adb: New file git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123562 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_disp.ads')
-rw-r--r--gcc/ada/exp_disp.ads41
1 files changed, 5 insertions, 36 deletions
diff --git a/gcc/ada/exp_disp.ads b/gcc/ada/exp_disp.ads
index f68fe458b74..7314ae255e3 100644
--- a/gcc/ada/exp_disp.ads
+++ b/gcc/ada/exp_disp.ads
@@ -168,46 +168,24 @@ package Exp_Disp is
-- Exp_Disp.Set_All_DT_Position - direct use
type DT_Access_Action is
- (CW_Membership,
- IW_Membership,
- DT_Entry_Size,
- DT_Prologue_Size,
- Get_Access_Level,
+ (IW_Membership,
Get_Entry_Index,
- Get_External_Tag,
- Get_Predefined_Prim_Op_Address,
- Get_Prim_Op_Address,
Get_Prim_Op_Kind,
- Get_RC_Offset,
- Get_Remotely_Callable,
Get_Tagged_Kind,
- Inherit_DT,
- Inherit_TSD,
Register_Interface_Tag,
Register_Tag,
- Set_Access_Level,
Set_Entry_Index,
- Set_Expanded_Name,
- Set_External_Tag,
- Set_Interface_Table,
Set_Offset_Index,
Set_OSD,
- Set_Predefined_Prim_Op_Address,
- Set_Prim_Op_Address,
Set_Prim_Op_Kind,
- Set_RC_Offset,
- Set_Remotely_Callable,
Set_Signature,
Set_SSD,
- Set_TSD,
- Set_Tagged_Kind,
- TSD_Entry_Size,
- TSD_Prologue_Size);
+ Set_Tagged_Kind);
procedure Expand_Dispatching_Call (Call_Node : Node_Id);
-- Expand the call to the operation through the dispatch table and perform
- -- the required tag checks when appropriate. For CPP types the call is
- -- done through the Vtable (tag checks are not relevant)
+ -- the required tag checks when appropriate. For CPP types tag checks are
+ -- not relevant.
procedure Expand_Interface_Actuals (Call_Node : Node_Id);
-- Ada 2005 (AI-251): Displace all the actuals corresponding to class-wide
@@ -245,15 +223,6 @@ package Exp_Disp is
-- the secondary dispatch table of Prim's controlling type with Thunk_Id's
-- address.
- function Get_Remotely_Callable (Obj : Node_Id) return Node_Id;
- -- Return an expression that holds True if the object can be transmitted
- -- onto another partition according to E.4 (18)
-
- function Init_Predefined_Interface_Primitives
- (Typ : Entity_Id) return List_Id;
- -- Ada 2005 (AI-251): Initialize the entries associated with predefined
- -- primitives in all the secondary dispatch tables of Typ.
-
function Make_DT_Access_Action
(Typ : Entity_Id;
Action : DT_Access_Action;
@@ -333,7 +302,7 @@ package Exp_Disp is
procedure Make_Secondary_DT
(Typ : Entity_Id;
Ancestor_Typ : Entity_Id;
- Suffix_Index : Int;
+ Suffix_Index : Nat;
Iface : Entity_Id;
AI_Tag : Entity_Id;
Acc_Disp_Tables : in out Elist_Id;