This removes a couple of redundant/unused things. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk
2015-10-16 Eric Botcazou <ebotca...@adacore.com> * a-tags.ads (Parent_Size): Remove obsolete pragma Export. * s-finmas.ads (Header_Offset): Delete. * s-finmas.adb (Header_Offset): Likewise. (Finalize): Call Header_Size instead of Header_Offset. * s-stposu.adb (Allocate_Any_Controlled): Likewise. (Deallocate_Any_Controlled): Likewise.
Index: a-tags.ads =================================================================== --- a-tags.ads (revision 228884) +++ a-tags.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -526,9 +526,6 @@ -- ancestor is the parent of the type represented by tag T. This function -- assumes that _size is always in slot one of the dispatch table. - pragma Export (Ada, Parent_Size, "ada__tags__parent_size"); - -- This procedure is used in s-finimp and is thus exported manually - procedure Register_Interface_Offset (This : System.Address; Interface_T : Tag; Index: s-stposu.adb =================================================================== --- s-stposu.adb (revision 228884) +++ s-stposu.adb (working copy) @@ -281,7 +281,7 @@ -- +- Header_And_Padding --+ N_Ptr := Address_To_FM_Node_Ptr - (N_Addr + Header_And_Padding - Header_Offset); + (N_Addr + Header_And_Padding - Header_Size); -- Prepend the allocated object to the finalization master @@ -414,7 +414,7 @@ -- Convert the bits preceding the object into a list header - N_Ptr := Address_To_FM_Node_Ptr (Addr - Header_Offset); + N_Ptr := Address_To_FM_Node_Ptr (Addr - Header_Size); -- Detach the object from the related finalization master. This -- action does not need to know the prior context used during Index: s-finmas.adb =================================================================== --- s-finmas.adb (revision 228884) +++ s-finmas.adb (working copy) @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -212,7 +212,7 @@ -- Skip the list header in order to offer proper object layout for -- finalization. - Obj_Addr := Curr_Ptr.all'Address + Header_Offset; + Obj_Addr := Curr_Ptr.all'Address + Header_Size; -- Retrieve TSS primitive Finalize_Address depending on the master's -- mode of operation. @@ -327,15 +327,6 @@ return FM_Node'Size / Storage_Unit; end Header_Size; - ------------------- - -- Header_Offset -- - ------------------- - - function Header_Offset return System.Storage_Elements.Storage_Offset is - begin - return FM_Node'Size / Storage_Unit; - end Header_Offset; - ---------------- -- Initialize -- ---------------- Index: s-finmas.ads =================================================================== --- s-finmas.ads (revision 228884) +++ s-finmas.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -111,9 +111,6 @@ function Finalization_Started (Master : Finalization_Master) return Boolean; -- Return the finalization status of a master - function Header_Offset return System.Storage_Elements.Storage_Offset; - -- Return the size of type FM_Node as Storage_Offset - function Header_Size return System.Storage_Elements.Storage_Count; -- Return the size of type FM_Node as Storage_Count