diff options
author | Javier Miranda <miranda@adacore.com> | 2005-03-29 18:13:49 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-03-29 18:13:49 +0200 |
commit | d127f91b1d4b99d53d31a80076bf178ceb4053df (patch) | |
tree | e7c14b871e640a120c4aa0c9906cbbc68c1ad47d /gcc/ada/i-cpp.adb | |
parent | 78dabc95d53fa3a6c41039456eeec9ac9763fea8 (diff) | |
download | gcc-d127f91b1d4b99d53d31a80076bf178ceb4053df.zip gcc-d127f91b1d4b99d53d31a80076bf178ceb4053df.tar.gz gcc-d127f91b1d4b99d53d31a80076bf178ceb4053df.tar.bz2 |
a-tags.ads, a-tags.adb (Get_TSD): Subprogram removed.
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
From-SVN: r97168
Diffstat (limited to 'gcc/ada/i-cpp.adb')
-rw-r--r-- | gcc/ada/i-cpp.adb | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/gcc/ada/i-cpp.adb b/gcc/ada/i-cpp.adb index 248d09e..ca872c2 100644 --- a/gcc/ada/i-cpp.adb +++ b/gcc/ada/i-cpp.adb @@ -187,18 +187,6 @@ package body Interfaces.CPP is return True; end CPP_Get_Remotely_Callable; - ----------------- - -- CPP_Get_TSD -- - ----------------- - - function CPP_Get_TSD (T : Vtable_Ptr) return Address is - use type System.Storage_Elements.Storage_Offset; - TSD_Ptr : constant Addr_Ptr := - To_Addr_Ptr (To_Address (T) - CPP_DT_Typeinfo_Ptr_Size); - begin - return TSD_Ptr.all; - end CPP_Get_TSD; - -------------------- -- CPP_Inherit_DT -- -------------------- @@ -220,17 +208,15 @@ package body Interfaces.CPP is --------------------- procedure CPP_Inherit_TSD - (Old_TSD : Address; + (Old_Tag : Vtable_Ptr; New_Tag : Vtable_Ptr) is - Old_TSD_Ptr : constant Type_Specific_Data_Ptr := - To_Type_Specific_Data_Ptr (Old_TSD); - - New_TSD_Ptr : constant Type_Specific_Data_Ptr := - TSD (New_Tag); + New_TSD_Ptr : constant Type_Specific_Data_Ptr := TSD (New_Tag); + Old_TSD_Ptr : Type_Specific_Data_Ptr; begin - if Old_TSD_Ptr /= null then + if Old_Tag /= null then + Old_TSD_Ptr := TSD (Old_Tag); New_TSD_Ptr.Idepth := Old_TSD_Ptr.Idepth + 1; New_TSD_Ptr.Ancestor_Tags (1 .. New_TSD_Ptr.Idepth) := Old_TSD_Ptr.Ancestor_Tags (0 .. Old_TSD_Ptr.Idepth); @@ -391,8 +377,11 @@ package body Interfaces.CPP is --------- function TSD (T : Vtable_Ptr) return Type_Specific_Data_Ptr is + use type System.Storage_Elements.Storage_Offset; + TSD_Ptr : constant Addr_Ptr := + To_Addr_Ptr (To_Address (T) - CPP_DT_Typeinfo_Ptr_Size); begin - return To_Type_Specific_Data_Ptr (CPP_Get_TSD (T)); + return To_Type_Specific_Data_Ptr (TSD_Ptr.all); end TSD; end Interfaces.CPP; |