diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-03 11:58:34 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-03 11:58:34 +0000 |
commit | 93735cb819eb1e9ab7b4f2cd34e1d86ea9ea5052 (patch) | |
tree | c63309227b71a108f3774e414aacfd0be78c8d20 /gcc/ada/a-tags.adb | |
parent | 282d771c3d5daf08bdc826cc977dad0f3c7bf05f (diff) | |
download | gcc-93735cb819eb1e9ab7b4f2cd34e1d86ea9ea5052.tar.gz |
2004-05-03 Olivier Hainque <hainque@act-europe.fr>
PR ada/15152
* exp_ch2.adb (Expand_Current_Value): Leave Machine_Code Asm arguments
alone. Replacing object references by literals is inappropriate in a
so low level context.
2004-05-03 Arnaud Charlet <charlet@act-europe.fr>
* a-exexpr.adb: Add comments
2004-05-03 Joel Brobecker <brobecker@gnat.com>
* a-tags.adb (Tag_Table): Add Index_Check pragma Suppress. Allows us to
declare the Ancestor_Tags array in Type_Specific_Data with a small size
without risking a bounds check error when accessing one of its
components.
(Type_Specific_Data): Define Ancestor_Tags as a small array.
This prevents us from hitting a limitation during the debug info
generation when using stabs.
* a-tags.adb (Dispatch_Table): Define the Prims_Ptr component as a
small array.
This prevents us from hitting a limitation during the debug info
generation when using stabs.
2004-05-03 Eric Botcazou <ebotcazou@act-europe.fr>
lang-specs.h: Remove -gnatz* from specs.
2004-05-03 Vincent Celier <celier@gnat.com>
* gprmake.adb, makegpr.ads, makegpr.adb: New files.
* Make-lang.in, Makefile.in: Add gprmake
2004-05-03 Thomas Quinot <quinot@act-europe.fr>
* sem_aggr.adb: Fix typo in comment.
2004-05-03 Robert Dewar <dewar@gnat.com>
* make.adb: Minor reformatting
* rtsfind.ads, rtsfind.adb: (RTU_Loaded): New function
* sem_attr.adb (Eval_Attribute, case Type_Class): Fix check for address
so that it works when address is not a private type.
* sem_ch13.adb (Check_Expr_Constants, case N_Integer_Literal): Deal
properly with rewritten unchecked conversions. This prevents
order-of-elaboration issues that can otherwise arise.
(Minimum_Size): Don't check size of access types under VMS
* sem_ch4.adb (Remove_Address_Interpretation): New circuit to remove
interpretations of integer literals as type System.Address.
* sem_util.ads, sem_util.adb (Is_Descendent_Of_Address): New function
(Is_Descendent_Of): New function
2004-05-03 Jose Ruiz <ruiz@act-europe.fr>
* sem_prag.adb: Boolean_Entry_Barriers is a synonym of Simple_Barriers.
Max_Entry_Queue_Depth is a synonym of Max_Entry_Queue_Length.
No_Dynamic_Interrupts is a synonym of No_Dynamic_Attachment.
* sem_res.adb: Use the new restriction Max_Entry_Queue_Length instead
of the old Max_Entry_Queue_Depth.
* snames.adb: Boolean_Entry_Barriers is a synonym of Simple_Barriers.
Max_Entry_Queue_Depth is a synonym of Max_Entry_Queue_Length
No_Dynamic_Interrupts is a synonym of No_Dynamic_Attachment
* snames.ads: New entry for proper handling of Boolean_Entry_Barriers.
New entry for proper handling of Max_Entry_Queue_Depth.
New entry for proper handling of No_Dynamic_Interrupts.
* s-rident.ads: Adding restriction Simple_Barriers (AI-00249) that
supersedes the GNAT specific restriction Boolean_Entry_Barriers.
Adding restriction Max_Entry_Queue_Length (AI-00249) that supersedes
the GNAT specific restriction Max_Entry_Queue_Depth.
Adding restriction No_Dynamic_Attachment (AI-00249) that supersedes
the GNAT specific restriction No_Dynamic_Interrupts.
* restrict.ads, restrict.adb: Use the new restriction Simple_Barriers
instead of the old Boolean_Entry_Barriers.
Use the new restriction No_Dynamic_Attachment instead of the old
No_Dynamic_Interrupts.
* exp_ch9.adb: Check restriction Simple_Barriers (AI-00249) that
supersedes the GNAT specific restriction Boolean_Entry_Barriers.
* gnatbind.adb: Use the new restriction Max_Entry_Queue_Length instead
of the old Max_Entry_Queue_Depth.
2004-05-03 GNAT Script <nobody@gnat.com>
* Make-lang.in: Makefile automatically updated
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81429 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-tags.adb')
-rw-r--r-- | gcc/ada/a-tags.adb | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/gcc/ada/a-tags.adb b/gcc/ada/a-tags.adb index a2e40f8d4ef..c232695ce75 100644 --- a/gcc/ada/a-tags.adb +++ b/gcc/ada/a-tags.adb @@ -65,8 +65,12 @@ package body Ada.Tags is subtype Cstring is String (Positive); type Cstring_Ptr is access all Cstring; + type Tag_Table is array (Natural range <>) of Tag; pragma Suppress_Initialization (Tag_Table); + pragma Suppress (Index_Check, On => Tag_Table); + -- We suppress index checks because the declared size in the record + -- below is a dummy size of one (see below). type Wide_Boolean is new Boolean; -- This name should probably be changed sometime ??? and indeed @@ -79,13 +83,33 @@ package body Ada.Tags is HT_Link : Tag; Remotely_Callable : Wide_Boolean; RC_Offset : SSE.Storage_Offset; - Ancestor_Tags : Tag_Table (Natural); + Ancestor_Tags : Tag_Table (0 .. 1); end record; + -- The size of the Ancestor_Tags array actually depends on the tagged + -- type to which it applies. We are using the same mechanism as for + -- the Prims_Ptr array in the Dispatch_Table record. See comments + -- below for more details. type Dispatch_Table is record TSD : Type_Specific_Data_Ptr; - Prims_Ptr : Address_Array (Positive); + Prims_Ptr : Address_Array (1 .. 1); end record; + -- The size of the Prims_Ptr array actually depends on the tagged + -- type to which it applies. For each tagged type, the expander + -- computes the actual array size, and allocates the Dispatch_Table + -- record accordingly. + -- + -- To avoid the use of discriminants to define the actual size + -- of the dispatch table, we used to declare the tag as a pointer + -- to a record that contains an arbitrary array of addresses, using + -- Positive as its index. This ensures that there are never range + -- checks when accessing the dispatch table, but it prevents GDB + -- from displaying tagged types properly. A better approach is + -- to declare this record type as holding a small number of addresses, + -- and to explicitly suppress checks on it. + -- + -- Note that in both cases, this type is never allocated, and serves + -- only to declare the corresponding access type. --------------------------------------------- -- Unchecked Conversions for String Fields -- @@ -182,7 +206,6 @@ package body Ada.Tags is function H is new System.HTable.Hash (HTable_Headers); Str : constant Cstring_Ptr := To_Cstring_Ptr (F); Res : constant HTable_Headers := H (Str (1 .. Length (Str))); - begin return Res; end Hash; @@ -219,7 +242,6 @@ package body Ada.Tags is function CW_Membership (Obj_Tag : Tag; Typ_Tag : Tag) return Boolean is Pos : constant Integer := Obj_Tag.TSD.Idepth - Typ_Tag.TSD.Idepth; - begin return Pos >= 0 and then Obj_Tag.TSD.Ancestor_Tags (Pos) = Typ_Tag; end CW_Membership; @@ -230,7 +252,6 @@ package body Ada.Tags is function Expanded_Name (T : Tag) return String is Result : constant Cstring_Ptr := T.TSD.Expanded_Name; - begin return Result (1 .. Length (Result)); end Expanded_Name; @@ -241,7 +262,6 @@ package body Ada.Tags is function External_Tag (T : Tag) return String is Result : constant Cstring_Ptr := T.TSD.External_Tag; - begin return Result (1 .. Length (Result)); end External_Tag; |