comparison gcc/ada/exp_ch3.ads @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
4 -- -- 4 -- --
5 -- E X P _ C H 3 -- 5 -- E X P _ C H 3 --
6 -- -- 6 -- --
7 -- S p e c -- 7 -- S p e c --
8 -- -- 8 -- --
9 -- Copyright (C) 1992-2017, Free Software Foundation, Inc. -- 9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. --
10 -- -- 10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under -- 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- -- 12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- 13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
82 -- of an aggregate. 82 -- of an aggregate.
83 -- 83 --
84 -- Constructor_Ref is a call to a constructor subprogram. It is currently 84 -- Constructor_Ref is a call to a constructor subprogram. It is currently
85 -- used only to support C++ constructors. 85 -- used only to support C++ constructors.
86 86
87 function Build_Variant_Record_Equality
88 (Typ : Entity_Id;
89 Body_Id : Entity_Id;
90 Param_Specs : List_Id) return Node_Id;
91 -- Build the body of the equality function Body_Id for the untagged variant
92 -- record Typ with the given parameters specification list.
93
87 function Freeze_Type (N : Node_Id) return Boolean; 94 function Freeze_Type (N : Node_Id) return Boolean;
88 -- This function executes the freezing actions associated with the given 95 -- This function executes the freezing actions associated with the given
89 -- freeze type node N and returns True if the node is to be deleted. We 96 -- freeze type node N and returns True if the node is to be deleted. We
90 -- delete the node if it is present just for front end purpose and we don't 97 -- delete the node if it is present just for front end purpose and we don't
91 -- want Gigi to see the node. This function can't delete the node itself 98 -- want Gigi to see the node. This function can't delete the node itself
92 -- since it would confuse any remaining processing of the freeze node. 99 -- since it would confuse any remaining processing of the freeze node.
100
101 function Get_Simple_Init_Val
102 (Typ : Entity_Id;
103 N : Node_Id;
104 Size : Uint := No_Uint) return Node_Id;
105 -- Build an expression which represents the required initial value of type
106 -- Typ for which predicate Needs_Simple_Initialization is True. N is a node
107 -- whose source location used in the construction of the expression. Size
108 -- is utilized as follows:
109 --
110 -- * If the size of the object to be initialized it is known, it should
111 -- be passed to the routine.
112 --
113 -- * If the size is unknown or is zero, then the Esize of Typ is used as
114 -- an estimate of the size.
115 --
116 -- The object size is needed to prepare a known invalid value for use by
117 -- Normalize_Scalars. A call to this routine where Typ denotes a scalar
118 -- type is only valid when Normalize_Scalars or Initialize_Scalars is
119 -- active, or if N is the node for a 'Invalid_Value attribute node.
93 120
94 procedure Init_Secondary_Tags 121 procedure Init_Secondary_Tags
95 (Typ : Entity_Id; 122 (Typ : Entity_Id;
96 Target : Node_Id; 123 Target : Node_Id;
97 Init_Tags_List : List_Id; 124 Init_Tags_List : List_Id;
112 -- the expression may include an unchecked conversion. This tag assignment 139 -- the expression may include an unchecked conversion. This tag assignment
113 -- is inserted after the declaration, but if the object has an address 140 -- is inserted after the declaration, but if the object has an address
114 -- clause the assignment is handled as part of the freezing of the object, 141 -- clause the assignment is handled as part of the freezing of the object,
115 -- see Check_Address_Clause. 142 -- see Check_Address_Clause.
116 143
117 function Needs_Simple_Initialization
118 (T : Entity_Id;
119 Consider_IS : Boolean := True) return Boolean;
120 -- Certain types need initialization even though there is no specific
121 -- initialization routine:
122 -- Access types (which need initializing to null)
123 -- All scalar types if Normalize_Scalars mode set
124 -- Descendants of standard string types if Normalize_Scalars mode set
125 -- Scalar types having a Default_Value attribute
126 -- Regarding Initialize_Scalars mode, this is ignored if Consider_IS is
127 -- set to False, but if Consider_IS is set to True, then the cases above
128 -- mentioning Normalize_Scalars also apply for Initialize_Scalars mode.
129
130 function Get_Simple_Init_Val
131 (T : Entity_Id;
132 N : Node_Id;
133 Size : Uint := No_Uint) return Node_Id;
134 -- For a type which Needs_Simple_Initialization (see above), prepares the
135 -- tree for an expression representing the required initial value. N is a
136 -- node whose source location used in constructing this tree which is
137 -- returned as the result of the call. The Size parameter indicates the
138 -- target size of the object if it is known (indicated by a value that is
139 -- not No_Uint and is greater than zero). If Size is not given (Size set to
140 -- No_Uint, or non-positive), then the Esize of T is used as an estimate of
141 -- the Size. The object size is needed to prepare a known invalid value for
142 -- use by Normalize_Scalars. A call to this routine where T is a scalar
143 -- type is only valid if we are in Normalize_Scalars or Initialize_Scalars
144 -- mode, or if N is the node for a 'Invalid_Value attribute node.
145
146 end Exp_Ch3; 144 end Exp_Ch3;