diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-15 13:54:36 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-15 13:54:36 +0000 |
commit | 76a1c25b5ba521501bd8e2ce30573c34cc0da1fb (patch) | |
tree | 873996443f0c7e7119eead6a25a380b1d3b5441a /gcc/ada/exp_dbug.ads | |
parent | 986fb7dd6375783b9f492a215dd9d767575cdb7c (diff) | |
download | gcc-76a1c25b5ba521501bd8e2ce30573c34cc0da1fb.tar.gz |
2005-11-14 Hristian Kirtchev <kirtchev@adacore.com>
Javier Miranda <miranda@adacore.com>
* rtsfind.ads, exp_util.adb, exp_util.ads, exp_disp.adb, exp_disp.ads,
exp_ch7.adb, sem_ch9.adb, snames.adb, snames.ads,
exp_ch9.adb, exp_ch9.ads, exp_ch6.adb, exp_ch3.adb, exp_ch3.ads,
einfo.ads, einfo.adb: Complete support for Ada 2005 interfaces.
* a-tags.ads, a-tags.adb: Major rewrite and additions to implement
properly new Ada 2005 interfaces (AI-345) and add run-time checks (via
assertions).
* exp_dbug.ads, exp_dbug.adb (Get_Secondary_DT_External_Name): New
subprogram that generates the external name associated with a
secondary dispatch table.
(Get_Secondary_DT_External_Name): New subprogram that generates the
external name associated with a secondary dispatch table.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106965 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_dbug.ads')
-rw-r--r-- | gcc/ada/exp_dbug.ads | 74 |
1 files changed, 70 insertions, 4 deletions
diff --git a/gcc/ada/exp_dbug.ads b/gcc/ada/exp_dbug.ads index 9100d9c2fab..ccd80f38f8a 100644 --- a/gcc/ada/exp_dbug.ads +++ b/gcc/ada/exp_dbug.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1996-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2005, 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- -- @@ -360,7 +360,7 @@ package Exp_Dbug is -- Operations generated for protected entries follow the same encoding. -- Each entry results in two suprograms: a procedure that holds the -- entry body, and a function that holds the evaluation of the barrier. - -- The names of these subprograms include the prefix 'E' or 'B' res- + -- The names of these subprograms include the prefix '_E' or '_B' res- -- pectively. The names also include a numeric suffix to render them -- unique in the presence of overloaded entries. @@ -382,8 +382,8 @@ package Exp_Dbug is -- lock_setN -- lock_setP - -- lock_update1sE - -- lock_udpate2sB + -- lock_update_E1s + -- lock_udpate_B2s -- If the protected type implements at least one interface, the -- following additional operations are created: @@ -538,6 +538,12 @@ package Exp_Dbug is -- field, and neither the outer structure name, nor the field name -- should appear when the value is printed. + -- When the debugger sees a record named REP being a field inside + -- another record, it should treat the fields inside REP as being + -- part of the outer record (this REP field is only present for + -- code generation purposes). The REP record should not appear in + -- the values printed by the debugger. + ----------------------- -- Fixed-Point Types -- ----------------------- @@ -1432,6 +1438,66 @@ package Exp_Dbug is -- the second enumeration literal would be named QU43 and the -- value assigned to it would be 1. + ----------------------------------------------- + -- Secondary Dispatch tables of tagged types -- + ----------------------------------------------- + + procedure Get_Secondary_DT_External_Name + (Typ : Entity_Id; + Ancestor_Typ : Entity_Id; + Suffix_Index : Int); + -- Set Name_Buffer and Name_Len to the external name of one secondary + -- dispatch table of Typ. If the interface has been inherited from some + -- ancestor then Ancestor_Typ is such node (in this case the secondary + -- DT is needed to handle overriden primitives); if there is no such + -- ancestor then Ancestor_Typ is equal to Typ. + -- + -- Internal rule followed for the generation of the external name: + -- + -- Case 1. If the secondary dispatch has not been inherited from some + -- ancestor of Typ then the external name is composed as + -- follows: + -- External_Name (Typ) + Suffix_Number + 'P' + -- + -- Case 2. if the secondary dispatch table has been inherited from some + -- ancestor then the external name is composed as follows: + -- External_Name (Typ) + '_' + External_Name (Ancestor_Typ) + -- + Suffix_Number + 'P' + -- + -- Note: We have to use the external names (instead of simply their + -- names) to protect the frontend against programs that give the same + -- name to all the interfaces and use the expanded name to reference + -- them. The Suffix_Number is used to differentiate all the secondary + -- dispatch tables of a given type. + -- + -- Examples: + -- + -- package Pkg1 is | package Pkg2 is | package Pkg3 is + -- type Typ is | type Typ is | type Typ is + -- interface; | interface; | interface; + -- end Pkg1; | end Pkg; | end Pkg3; + -- + -- with Pkg1, Pkg2, Pkg3; + -- package Case_1 is + -- type Typ is new Pkg1.Typ and Pkg2.Typ and Pkg3.Typ with ... + -- end Case_1; + -- + -- with Case_1; + -- package Case_2 is + -- type Typ is new Case_1.Typ with ... + -- end Case_2; + -- + -- These are the external names generated for Case_1.Typ (note that + -- Pkg1.Typ is associated with the Primary Dispatch Table, because it + -- is the the parent of this type, and hence no external name is + -- generated for it). + -- case_1__typ0P (associated with Pkg2.Typ) + -- case_1__typ1P (associated with Pkg3.Typ) + -- + -- These are the external names generated for Case_2.Typ: + -- case_2__typ_case_1__typ0P + -- case_2__typ_case_1__typ1P + ---------------------------- -- Effect of Optimization -- ---------------------------- |