* c-decl.c (duplicate_decls): Conditionalize DECL_SAVED_TREE copy.
[official-gcc.git] / gcc / ada / exp_disp.ads
blobf5ff995d61b00f3e51522d07b525b5b97a363390
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- E X P _ D I S P --
6 -- --
7 -- S p e c --
8 -- --
9 -- $Revision: 1.9 $ --
10 -- --
11 -- Copyright (C) 1992-1998 Free Software Foundation, Inc. --
12 -- --
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. --
23 -- --
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). --
26 -- --
27 ------------------------------------------------------------------------------
29 -- This package contains routines involved in tagged types and dynamic
30 -- dispatching expansion
32 with Types; use Types;
33 package Exp_Disp is
35 type DT_Access_Action is
36 (CW_Membership,
37 DT_Entry_Size,
38 DT_Prologue_Size,
39 Get_Expanded_Name,
40 Get_External_Tag,
41 Get_Prim_Op_Address,
42 Get_RC_Offset,
43 Get_Remotely_Callable,
44 Get_TSD,
45 Inherit_DT,
46 Inherit_TSD,
47 Register_Tag,
48 Set_Expanded_Name,
49 Set_External_Tag,
50 Set_Prim_Op_Address,
51 Set_RC_Offset,
52 Set_Remotely_Callable,
53 Set_TSD,
54 TSD_Entry_Size,
55 TSD_Prologue_Size);
58 function Fill_DT_Entry
59 (Loc : Source_Ptr;
60 Prim : Entity_Id)
61 return Node_Id;
62 -- Generate the code necessary to fill the appropriate entry of the
63 -- dispatch table of Prim's controlling type with Prim's address.
65 function Make_DT_Access_Action
66 (Typ : Entity_Id;
67 Action : DT_Access_Action;
68 Args : List_Id)
69 return Node_Id;
70 -- Generate a call to one of the Dispatch Table Access Subprograms defined
71 -- in Ada.Tags or in Interfaces.Cpp
73 function Make_DT (Typ : Entity_Id) return List_Id;
74 -- Expand the declarations for the Dispatch Table (or the Vtable in
75 -- the case of type whose ancestor is a CPP_Class)
77 procedure Set_All_DT_Position (Typ : Entity_Id);
78 -- Set the DT_Position field for each primitive operation. In the CPP
79 -- Class case check that no pragma CPP_Virtual is missing and that the
80 -- DT_Position are coherent
82 procedure Expand_Dispatch_Call (Call_Node : Node_Id);
83 -- Expand the call to the operation through the dispatch table and perform
84 -- the required tag checks when appropriate. For CPP types the call is
85 -- done through the Vtable (tag checks are not relevant)
87 procedure Set_Default_Constructor (Typ : Entity_Id);
88 -- Typ is a CPP_Class type. Create the Init procedure of that type to
89 -- be the default constructor (i.e. the function returning this type,
90 -- having a pragma CPP_Constructor and no parameter)
92 function Get_Remotely_Callable (Obj : Node_Id) return Node_Id;
93 -- Return an expression that holds True if the object can be transmitted
94 -- onto another partition according to E.4 (18)
96 end Exp_Disp;