annotate gcc/ada/sem_dist.ads @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT COMPILER COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- S E M _ D I S T --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
9 -- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
111
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
kono
parents:
diff changeset
17 -- for more details. You should have received a copy of the GNU General --
kono
parents:
diff changeset
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
kono
parents:
diff changeset
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
kono
parents:
diff changeset
20 -- --
kono
parents:
diff changeset
21 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
23 -- --
kono
parents:
diff changeset
24 ------------------------------------------------------------------------------
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 -- Semantic processing for distribution annex facilities
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 with Snames; use Snames;
kono
parents:
diff changeset
29 with Types; use Types;
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 package Sem_Dist is
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 function Get_PCS_Name return PCS_Names;
kono
parents:
diff changeset
34 -- Return the name of a literal of type DSA_Implementation_Name in package
kono
parents:
diff changeset
35 -- System.Partition_Interface indicating what PCS is currently in use.
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 function Get_PCS_Version return Int;
kono
parents:
diff changeset
38 -- Return the version number of the PCS API implemented by the PCS.
kono
parents:
diff changeset
39 -- The consistency of this version with the one expected by Exp_Dist
kono
parents:
diff changeset
40 -- (Exp_Dist.PCS_Version_Number) in Rtsfind.RTE.Check_RPC.
kono
parents:
diff changeset
41 -- If no PCS version information is available, 0 is returned.
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 function Is_Valid_Remote_Object_Type (E : Entity_Id) return Boolean;
kono
parents:
diff changeset
44 -- True if tagged type E is a valid candidate as the root type of the
kono
parents:
diff changeset
45 -- designated type for a RACW, i.e. a tagged limited private type, or a
kono
parents:
diff changeset
46 -- limited interface type, or a private extension of such a type.
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 procedure Add_Stub_Constructs (N : Node_Id);
kono
parents:
diff changeset
49 -- Create the stubs constructs for a remote call interface package
kono
parents:
diff changeset
50 -- specification or body or for a shared passive specification. For caller
kono
parents:
diff changeset
51 -- stubs, expansion takes place directly in the specification and no
kono
parents:
diff changeset
52 -- additional compilation unit is created.
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 function Build_RAS_Primitive_Specification
kono
parents:
diff changeset
55 (Subp_Spec : Node_Id;
kono
parents:
diff changeset
56 Remote_Object_Type : Node_Id) return Node_Id;
kono
parents:
diff changeset
57 -- Build a subprogram specification for the primitive operation of the
kono
parents:
diff changeset
58 -- Remote_Object_Type used to implement a remote access-to-subprogram
kono
parents:
diff changeset
59 -- type whose parameter profile is given by specification Subp_Spec.
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 function Is_All_Remote_Call (N : Node_Id) return Boolean;
kono
parents:
diff changeset
62 -- Check whether a function or procedure call should be expanded into
kono
parents:
diff changeset
63 -- a remote call, because the entity is declared in a package decl that
kono
parents:
diff changeset
64 -- is not currently in scope, and the proper pragmas apply.
kono
parents:
diff changeset
65
kono
parents:
diff changeset
66 procedure Process_Partition_Id (N : Node_Id);
kono
parents:
diff changeset
67 -- Replace attribute reference with call to runtime function. The result
kono
parents:
diff changeset
68 -- is converted to the context type, because the attribute yields a
kono
parents:
diff changeset
69 -- universal integer value.
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 procedure Process_Remote_AST_Attribute (N : Node_Id; New_Type : Entity_Id);
kono
parents:
diff changeset
72 -- Given N, an access attribute reference node whose prefix is a
kono
parents:
diff changeset
73 -- remote subprogram, rewrite N with a call to a conversion function
kono
parents:
diff changeset
74 -- whose return type is New_Type.
kono
parents:
diff changeset
75
kono
parents:
diff changeset
76 procedure Process_Remote_AST_Declaration (N : Node_Id);
kono
parents:
diff changeset
77 -- Given N, an access to subprogram type declaration node in RCI or remote
kono
parents:
diff changeset
78 -- types unit, build a new record (fat pointer) type declaration using the
kono
parents:
diff changeset
79 -- old Defining_Identifier of N and a link to the old declaration node N
kono
parents:
diff changeset
80 -- whose Defining_Identifier is changed. We also construct declarations of
kono
parents:
diff changeset
81 -- two subprograms in the unit specification which handle remote access to
kono
parents:
diff changeset
82 -- subprogram type (fat pointer) dereference and the unit receiver that
kono
parents:
diff changeset
83 -- handles remote calls (from remote access to subprogram type values.)
kono
parents:
diff changeset
84
kono
parents:
diff changeset
85 function Remote_AST_E_Dereference (P : Node_Id) return Boolean;
kono
parents:
diff changeset
86 -- If the prefix of an explicit dereference is a record type that
kono
parents:
diff changeset
87 -- represent the fat pointer for an Remote access to subprogram, in the
kono
parents:
diff changeset
88 -- context of a call, rewrite the enclosing call node into remote call,
kono
parents:
diff changeset
89 -- the first actual of which is the fat pointer. Return true if the
kono
parents:
diff changeset
90 -- context is correct and the transformation took place.
kono
parents:
diff changeset
91
kono
parents:
diff changeset
92 function Remote_AST_I_Dereference (P : Node_Id) return Boolean;
kono
parents:
diff changeset
93 -- If P is a record type that represents the fat pointer for a remote
kono
parents:
diff changeset
94 -- access to subprogram, and P is the prefix of a call, insert an explicit
kono
parents:
diff changeset
95 -- dereference and perform the transformation described for the previous
kono
parents:
diff changeset
96 -- function.
kono
parents:
diff changeset
97
kono
parents:
diff changeset
98 function Remote_AST_Null_Value
kono
parents:
diff changeset
99 (N : Node_Id;
kono
parents:
diff changeset
100 Typ : Entity_Id) return Boolean;
kono
parents:
diff changeset
101 -- If N is a null value and Typ a remote access to subprogram type, this
kono
parents:
diff changeset
102 -- function will check if null needs to be replaced with an aggregate and
kono
parents:
diff changeset
103 -- will return True in this case. Otherwise, it will return False.
kono
parents:
diff changeset
104
kono
parents:
diff changeset
105 function Package_Specification_Of_Scope (E : Entity_Id) return Node_Id;
kono
parents:
diff changeset
106 -- Return the N_Package_Specification corresponding to a scope E
kono
parents:
diff changeset
107
kono
parents:
diff changeset
108 function Is_RACW_Stub_Type_Operation (Op : Entity_Id) return Boolean;
kono
parents:
diff changeset
109 -- True when Op is a primitive operation of an RACW stub type
kono
parents:
diff changeset
110
kono
parents:
diff changeset
111 end Sem_Dist;