1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
11 -- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
13 -- GNAT is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNAT; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
24 -- GNAT was originally developed by the GNAT team at New York University. --
25 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
27 ------------------------------------------------------------------------------
29 -- This package contains routines involved in tagged types and dynamic
30 -- dispatching expansion
32 with Types; use Types;
35 type DT_Access_Action is
43 Get_Remotely_Callable,
52 Set_Remotely_Callable,
57 function Fill_DT_Entry
61 -- Generate the code necessary to fill the appropriate entry of the
62 -- dispatch table of Prim's controlling type with Prim's address.
64 function Make_DT_Access_Action
66 Action : DT_Access_Action;
69 -- Generate a call to one of the Dispatch Table Access Subprograms defined
70 -- in Ada.Tags or in Interfaces.Cpp
72 function Make_DT (Typ : Entity_Id) return List_Id;
73 -- Expand the declarations for the Dispatch Table (or the Vtable in
74 -- the case of type whose ancestor is a CPP_Class)
76 procedure Set_All_DT_Position (Typ : Entity_Id);
77 -- Set the DT_Position field for each primitive operation. In the CPP
78 -- Class case check that no pragma CPP_Virtual is missing and that the
79 -- DT_Position are coherent
81 procedure Expand_Dispatch_Call (Call_Node : Node_Id);
82 -- Expand the call to the operation through the dispatch table and perform
83 -- the required tag checks when appropriate. For CPP types the call is
84 -- done through the Vtable (tag checks are not relevant)
86 procedure Set_Default_Constructor (Typ : Entity_Id);
87 -- Typ is a CPP_Class type. Create the Init procedure of that type to
88 -- be the default constructor (i.e. the function returning this type,
89 -- having a pragma CPP_Constructor and no parameter)
91 function Get_Remotely_Callable (Obj : Node_Id) return Node_Id;
92 -- Return an expression that holds True if the object can be transmitted
93 -- onto another partition according to E.4 (18)