Makefile.in: Rebuilt.
[official-gcc.git] / gcc / ada / sem_dist.ads
blob24745890b53a619b9f9b864a39290ef3efa863ee
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S E M _ D I S T --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
21 -- --
22 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 -- --
25 ------------------------------------------------------------------------------
27 -- Semantic processing for distribution annex facilities
29 with Snames; use Snames;
30 with Types; use Types;
32 package Sem_Dist is
34 function Get_PCS_Name return PCS_Names;
35 -- Return the name of a literal of type System.Partition_Interface.
36 -- DSA_Implementation_Type indicating what PCS is currently in use.
38 procedure Add_Stub_Constructs (N : Node_Id);
39 -- Create the stubs constructs for a remote call interface package
40 -- specification or body or for a shared passive specification. For caller
41 -- stubs, expansion takes place directly in the specification and no
42 -- additional compilation unit is created.
44 function Build_RAS_Primitive_Specification
45 (Subp_Spec : Node_Id;
46 Remote_Object_Type : Node_Id) return Node_Id;
47 -- Build a subprogram specification for the primitive operation of the
48 -- Remote_Object_Type used to implement a remote access-to-subprogram
49 -- type whose parameter profile is given by specification Subp_Spec.
51 function Is_All_Remote_Call (N : Node_Id) return Boolean;
52 -- Check whether a function or procedure call should be expanded into
53 -- a remote call, because the entity is declared in a package decl that
54 -- is not currently in scope, and the proper pragmas apply.
56 procedure Process_Partition_Id (N : Node_Id);
57 -- Replace attribute reference with call to runtime function. The result
58 -- is converted to the context type, because the attribute yields a
59 -- universal integer value.
61 procedure Process_Remote_AST_Attribute (N : Node_Id; New_Type : Entity_Id);
62 -- Given N, an access attribute reference node whose prefix is a
63 -- remote subprogram, rewrite N with a call to a conversion function
64 -- whose return type is New_Type.
66 procedure Process_Remote_AST_Declaration (N : Node_Id);
67 -- Given N, an access to subprogram type declaration node in RCI or remote
68 -- types unit, build a new record (fat pointer) type declaration using the
69 -- old Defining_Identifier of N and a link to the old declaration node N
70 -- whose Defining_Identifier is changed. We also construct declarations of
71 -- two subprograms in the unit specification which handle remote access to
72 -- subprogram type (fat pointer) dereference and the unit receiver that
73 -- handles remote calls (from remote access to subprogram type values.)
75 function Remote_AST_E_Dereference (P : Node_Id) return Boolean;
76 -- If the prefix of an explicit dereference is a record type that
77 -- represent the fat pointer for an Remote access to subprogram, in the
78 -- context of a call, rewrite the enclosing call node into remote call,
79 -- the first actual of which is the fat pointer. Return true if the
80 -- context is correct and the transformation took place.
82 function Remote_AST_I_Dereference (P : Node_Id) return Boolean;
83 -- If P is a record type that represents the fat pointer for a remote
84 -- access to subprogram, and P is the prefix of a call, insert an explicit
85 -- dereference and perform the transformation described for the previous
86 -- function.
88 function Remote_AST_Null_Value
89 (N : Node_Id;
90 Typ : Entity_Id) return Boolean;
91 -- If N is a null value and Typ a remote access to subprogram type, this
92 -- function will check if null needs to be replaced with an aggregate and
93 -- will return True in this case. Otherwise, it will return False.
95 function Package_Specification_Of_Scope (E : Entity_Id) return Node_Id;
96 -- Return the N_Package_Specification corresponding to a scope E
98 end Sem_Dist;