2007-08-14 Ed Schonberg <schonberg@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Aug 2007 08:39:00 +0000 (08:39 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Aug 2007 08:39:00 +0000 (08:39 +0000)
commit17e1445149e4bef8ee8dd04359823d3dd3661aa3
treed4efd163d6df2c16952d272ae73419ac96fdf0e2
parent0d62118c727650669b97dda9090bcb3cfc03d749
2007-08-14  Ed Schonberg  <schonberg@adacore.com>
    Javier Miranda  <miranda@adacore.com>

* exp_disp.ads, exp_disp.adb (Build_Dispatch_Tables): Handle tagged
types declared in the declarative part of a nested package body or in
the proper body of a stub.
(Set_All_DT_Position): Add missing check to avoid wrong assignation
of the same dispatch table slot to renamed primitives.
(Make_Select_Specific_Data_Table): Handle private types.
(Tagged_Kind): Handle private types.
(Make_Tags, Make_DT): Set tag entity as internal to ensure proper dg
output of implicit importation and exportation.
(Expand_Interface_Thunk): Fix bug in the expansion assuming that the
first formal of the thunk is always associated with the controlling
type. In addition perform the following code cleanup: remove formal
Thunk_Alias which is no longer required, cleanup evaluation of the
the controlling type, and update the documentation.
Replace occurrence of Default_Prim_Op_Count by
Max_Predef_Prims. Addition of compile-time check to verify
that the value of Max_Predef_Prims is correct.
(Check_Premature_Freezing): Apply check in Ada95 mode as well.
(Make_DT): Add parameter to indicate when type has been frozen by an
object declaration, for diagnostic purposes.
(Build_Static_Dispatch_Tables): New subprogram that takes care of the
construction of statically allocated dispatch tables.
(Make_DT): In case of library-level tagged types export the declaration
of the primary tag. Remove generation of tags (now done by Make_Tags).
Additional modifications to handle non-static generation of dispatch
tables. Take care of building tables for asynchronous interface types
(Make_Tags): New subprogram that generates the entities associated with
the primary and secondary tags of Typ and fills the contents of Access_
Disp_Table. In case of library-level tagged types imports the forward
declaration of the primary tag that will be declared later by Make_DT.
(Expand_Interface_Conversion): In case of access types to interfaces
replace an itype declaration by an explicit type declaration to avoid
problems associated with the scope of such itype in transient blocks.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127418 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/exp_disp.adb
gcc/ada/exp_disp.ads