Daily bump.
[official-gcc.git] / gcc / ada / sem_dist.ads
blobe4264ea2a0a6a24df9f7cf6482bdedca8bd6828a
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S E M _ D I S T --
6 -- --
7 -- S p e c --
8 -- --
9 -- $Revision: 1.1 $
10 -- --
11 -- Copyright (C) 1992-2000 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 -- Extensive contributions were provided by Ada Core Technologies Inc. --
26 -- --
27 ------------------------------------------------------------------------------
29 -- Semantic processing for distribution annex facilities
31 with Types; use Types;
33 package Sem_Dist is
35 procedure Add_Stub_Constructs (N : Node_Id);
36 -- Create the stubs constructs for a remote call interface package
37 -- specification or body or for a shared passive specification. For
38 -- caller stubs, expansion takes place directly in the specification and
39 -- no additional compilation unit is created.
41 function Is_All_Remote_Call (N : Node_Id) return Boolean;
42 -- Check whether a function or procedure call should be expanded into
43 -- a remote call, because the entity is declared in a package decl that
44 -- is not currently in scope, and the proper pragmas apply.
46 procedure Process_Partition_Id (N : Node_Id);
47 -- Replace attribute reference with call to runtime function. The result
48 -- is converted to the context type, because the attribute yields a
49 -- universal integer value.
51 procedure Process_Remote_AST_Attribute (N : Node_Id; New_Type : Entity_Id);
52 -- Given N, an access attribute reference node whose prefix is a
53 -- remote subprogram, rewrite N with a call to a conversion function
54 -- whose return type is New_Type.
56 procedure Process_Remote_AST_Declaration (N : Node_Id);
57 -- Given N, an access to subprogram type declaration node in RCI or
58 -- remote types unit, build a new record (fat pointer) type declaration
59 -- using the old Defining_Identifier of N and a link to the old
60 -- declaration node N whose Defining_Identifier is changed.
61 -- We also construct declarations of two subprograms in the unit
62 -- specification which handle remote access to subprogram type
63 -- (fat pointer) dereference and the unit receiver that handles
64 -- remote calls (from remote access to subprogram type values.)
66 function Remote_AST_E_Dereference (P : Node_Id) return Boolean;
67 -- If the prefix of an explicit dereference is a record type that
68 -- represent the fat pointer for an Remote access to subprogram, in
69 -- the context of a call, rewrite the enclosing call node into a
70 -- remote call, the first actual of which is the fat pointer. Return
71 -- true if the context is correct and the transformation took place.
73 function Remote_AST_I_Dereference (P : Node_Id) return Boolean;
74 -- If P is a record type that represents the fat pointer for a remote
75 -- access to subprogram, and P is the prefix of a call, insert an
76 -- explicit dereference and perform the transformation described for
77 -- the previous function.
79 function Remote_AST_Null_Value
80 (N : Node_Id;
81 Typ : Entity_Id)
82 return Boolean;
83 -- If N is a null value and Typ a remote access to subprogram type,
84 -- this function will check if null needs to be replaced with an
85 -- aggregate and will return True in this case. Otherwise, it will
86 -- return False.
88 function Get_Subprogram_Id (E : Entity_Id) return Int;
89 -- Given a subprogram defined in a RCI package, get its subprogram id
90 -- which will be used for remote calls.
92 function Package_Specification_Of_Scope (E : Entity_Id) return Node_Id;
93 -- Return the N_Package_Specification corresponding to a scope E
95 end Sem_Dist;