diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-29 16:13:49 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-29 16:13:49 +0000 |
commit | 64cf6b82de85eb31d1caad9e4b4f3461ac02d4fb (patch) | |
tree | e7c14b871e640a120c4aa0c9906cbbc68c1ad47d /gcc/ada/exp_disp.adb | |
parent | 23c6b287092131a103aabcd6a6c2baa435aa22d8 (diff) | |
download | gcc-64cf6b82de85eb31d1caad9e4b4f3461ac02d4fb.tar.gz |
2005-03-29 Javier Miranda <miranda@adacore.com>
* a-tags.ads, a-tags.adb (Get_TSD): Subprogram removed.
(Inherit_DT): The first formal has been redefined as a Tag.
This allows us the removal of the subprogram Get_TSD.
(TSD): Replace the call to Get_TSD by the actual code.
* exp_disp.ads, exp_disp.adb: Remove support to call Get_TSD.
(Make_DT): Upgrade the call to Inherit_TSD according to the
new interface: the first formal is now a Tag.
* i-cpp.ads, i-cpp.adb (CPP_Inherit_DT): The first formal has been
redefined as a Tag.
This change allows us to remove the subprogram Get_TSD.
(CPP_Get_TSD): Subprogram removed.
(TSD): Replace the call to CPP_Get_TSD by the actual code.
* rtsfind.ads: Remove support to call the run-time
subprogram Get_TSD
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_disp.adb')
-rw-r--r-- | gcc/ada/exp_disp.adb | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index cfe9a6b46f4..8bb0cac38db 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -58,7 +58,6 @@ package body Exp_Disp is Get_Prim_Op_Address => RE_Get_Prim_Op_Address, Get_RC_Offset => RE_Get_RC_Offset, Get_Remotely_Callable => RE_Get_Remotely_Callable, - Get_TSD => RE_Get_TSD, Inherit_DT => RE_Inherit_DT, Inherit_TSD => RE_Inherit_TSD, Register_Tag => RE_Register_Tag, @@ -79,7 +78,6 @@ package body Exp_Disp is Get_Prim_Op_Address => RE_CPP_Get_Prim_Op_Address, Get_RC_Offset => RE_CPP_Get_RC_Offset, Get_Remotely_Callable => RE_CPP_Get_Remotely_Callable, - Get_TSD => RE_CPP_Get_TSD, Inherit_DT => RE_CPP_Inherit_DT, Inherit_TSD => RE_CPP_Inherit_TSD, Register_Tag => RE_CPP_Register_Tag, @@ -100,7 +98,6 @@ package body Exp_Disp is Get_Prim_Op_Address => False, Get_Remotely_Callable => False, Get_RC_Offset => False, - Get_TSD => False, Inherit_DT => True, Inherit_TSD => True, Register_Tag => True, @@ -121,7 +118,6 @@ package body Exp_Disp is Get_Prim_Op_Address => 2, Get_RC_Offset => 1, Get_Remotely_Callable => 1, - Get_TSD => 1, Inherit_DT => 3, Inherit_TSD => 2, Register_Tag => 1, @@ -640,8 +636,8 @@ package body Exp_Disp is I_Depth : Int; Generalized_Tag : Entity_Id; Size_Expr_Node : Node_Id; - Old_Tag : Node_Id; - Old_TSD : Node_Id; + Old_Tag1 : Node_Id; + Old_Tag2 : Node_Id; begin if not RTE_Available (RE_Tag) then @@ -834,24 +830,20 @@ package body Exp_Disp is if Typ = Etype (Typ) or else Is_CPP_Class (Etype (Typ)) then - Old_Tag := + Old_Tag1 := Unchecked_Convert_To (Generalized_Tag, Make_Integer_Literal (Loc, 0)); - - Old_TSD := - Unchecked_Convert_To (RTE (RE_Address), + Old_Tag2 := + Unchecked_Convert_To (Generalized_Tag, Make_Integer_Literal (Loc, 0)); else - Old_Tag := + Old_Tag1 := + New_Reference_To + (Node (First_Elmt (Access_Disp_Table (Etype (Typ)))), Loc); + Old_Tag2 := New_Reference_To (Node (First_Elmt (Access_Disp_Table (Etype (Typ)))), Loc); - Old_TSD := - Make_DT_Access_Action (Typ, - Action => Get_TSD, - Args => New_List ( - New_Reference_To - (Node (First_Elmt (Access_Disp_Table (Etype (Typ)))), Loc))); end if; -- Generate: Inherit_DT (parent'tag, DT_Ptr, nb_prim of parent); @@ -860,18 +852,18 @@ package body Exp_Disp is Make_DT_Access_Action (Typ, Action => Inherit_DT, Args => New_List ( - Node1 => Old_Tag, + Node1 => Old_Tag1, Node2 => New_Reference_To (DT_Ptr, Loc), Node3 => Make_Integer_Literal (Loc, DT_Entry_Count (First_Tag_Component (Etype (Typ))))))); - -- Generate: Inherit_TSD (Get_TSD (parent), DT_Ptr); + -- Generate: Inherit_TSD (parent'tag, DT_Ptr); Append_To (Elab_Code, Make_DT_Access_Action (Typ, Action => Inherit_TSD, Args => New_List ( - Node1 => Old_TSD, + Node1 => Old_Tag2, Node2 => New_Reference_To (DT_Ptr, Loc)))); -- Generate: Exname : constant String := full_qualified_name (typ); |