Mercurial > hg > CbC > CbC_gcc
comparison gcc/ada/gcc-interface/ada-tree.h @ 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 * A D A - T R E E * | 5 * A D A - T R E E * |
6 * * | 6 * * |
7 * C Header File * | 7 * C Header File * |
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- * |
81 | 81 |
82 #define TYPE_IS_PACKED_ARRAY_TYPE_P(NODE) \ | 82 #define TYPE_IS_PACKED_ARRAY_TYPE_P(NODE) \ |
83 ((TREE_CODE (NODE) == INTEGER_TYPE || TREE_CODE (NODE) == ARRAY_TYPE) \ | 83 ((TREE_CODE (NODE) == INTEGER_TYPE || TREE_CODE (NODE) == ARRAY_TYPE) \ |
84 && TYPE_PACKED_ARRAY_TYPE_P (NODE)) | 84 && TYPE_PACKED_ARRAY_TYPE_P (NODE)) |
85 | 85 |
86 /* For FUNCTION_TYPE and METHOD_TYPE, nonzero if the function returns by | |
87 direct reference, i.e. the callee returns a pointer to a memory location | |
88 it has allocated and the caller only needs to dereference the pointer. */ | |
89 #define TYPE_RETURN_BY_DIRECT_REF_P(NODE) \ | |
90 TYPE_LANG_FLAG_0 (FUNC_OR_METHOD_CHECK (NODE)) | |
91 | |
86 /* For INTEGER_TYPE, nonzero if this is a modular type with a modulus that | 92 /* For INTEGER_TYPE, nonzero if this is a modular type with a modulus that |
87 is not equal to two to the power of its mode's size. */ | 93 is not equal to two to the power of its mode's size. */ |
88 #define TYPE_MODULAR_P(NODE) TYPE_LANG_FLAG_1 (INTEGER_TYPE_CHECK (NODE)) | 94 #define TYPE_MODULAR_P(NODE) TYPE_LANG_FLAG_1 (INTEGER_TYPE_CHECK (NODE)) |
89 | 95 |
90 /* For ARRAY_TYPE, nonzero if this type corresponds to a dimension of | 96 /* For ARRAY_TYPE, nonzero if this type corresponds to a dimension of |
91 an Ada array other than the first. */ | 97 an Ada array other than the first. */ |
92 #define TYPE_MULTI_ARRAY_P(NODE) TYPE_LANG_FLAG_1 (ARRAY_TYPE_CHECK (NODE)) | 98 #define TYPE_MULTI_ARRAY_P(NODE) TYPE_LANG_FLAG_1 (ARRAY_TYPE_CHECK (NODE)) |
93 | 99 |
94 /* For FUNCTION_TYPE, nonzero if this denotes a function returning an | 100 /* For FUNCTION_TYPE and METHOD_TYPE, nonzero if function returns an |
95 unconstrained array or record. */ | 101 unconstrained array or record type. */ |
96 #define TYPE_RETURN_UNCONSTRAINED_P(NODE) \ | 102 #define TYPE_RETURN_UNCONSTRAINED_P(NODE) \ |
97 TYPE_LANG_FLAG_1 (FUNCTION_TYPE_CHECK (NODE)) | 103 TYPE_LANG_FLAG_1 (FUNC_OR_METHOD_CHECK (NODE)) |
98 | 104 |
99 /* For RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE, nonzero if this denotes | 105 /* For RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE, nonzero if this denotes |
100 a justified modular type (will only be true for RECORD_TYPE). */ | 106 a justified modular type (will only be true for RECORD_TYPE). */ |
101 #define TYPE_JUSTIFIED_MODULAR_P(NODE) \ | 107 #define TYPE_JUSTIFIED_MODULAR_P(NODE) \ |
102 TYPE_LANG_FLAG_1 (RECORD_OR_UNION_CHECK (NODE)) | 108 TYPE_LANG_FLAG_1 (RECORD_OR_UNION_CHECK (NODE)) |
150 | 156 |
151 /* For ARRAY_TYPEs, nonzero if the array type has Convention_Fortran. */ | 157 /* For ARRAY_TYPEs, nonzero if the array type has Convention_Fortran. */ |
152 #define TYPE_CONVENTION_FORTRAN_P(NODE) \ | 158 #define TYPE_CONVENTION_FORTRAN_P(NODE) \ |
153 TYPE_LANG_FLAG_4 (ARRAY_TYPE_CHECK (NODE)) | 159 TYPE_LANG_FLAG_4 (ARRAY_TYPE_CHECK (NODE)) |
154 | 160 |
155 /* For FUNCTION_TYPEs, nonzero if the function returns by direct reference, | |
156 i.e. the callee returns a pointer to a memory location it has allocated | |
157 and the caller only needs to dereference the pointer. */ | |
158 #define TYPE_RETURN_BY_DIRECT_REF_P(NODE) \ | |
159 TYPE_LANG_FLAG_4 (FUNCTION_TYPE_CHECK (NODE)) | |
160 | |
161 /* For RECORD_TYPE, UNION_TYPE and ENUMERAL_TYPE, nonzero if this is a dummy | 161 /* For RECORD_TYPE, UNION_TYPE and ENUMERAL_TYPE, nonzero if this is a dummy |
162 type, made to correspond to a private or incomplete type. */ | 162 type, made to correspond to a private or incomplete type. */ |
163 #define TYPE_DUMMY_P(NODE) \ | 163 #define TYPE_DUMMY_P(NODE) \ |
164 TYPE_LANG_FLAG_4 (TREE_CHECK3 (NODE, RECORD_TYPE, UNION_TYPE, ENUMERAL_TYPE)) | 164 TYPE_LANG_FLAG_4 (TREE_CHECK3 (NODE, RECORD_TYPE, UNION_TYPE, ENUMERAL_TYPE)) |
165 | 165 |
184 #define TYPE_UNIVERSAL_ALIASING_P(NODE) TYPE_LANG_FLAG_6 (NODE) | 184 #define TYPE_UNIVERSAL_ALIASING_P(NODE) TYPE_LANG_FLAG_6 (NODE) |
185 | 185 |
186 /* True for a dummy type if TYPE appears in a profile. */ | 186 /* True for a dummy type if TYPE appears in a profile. */ |
187 #define TYPE_DUMMY_IN_PROFILE_P(NODE) TYPE_LANG_FLAG_6 (NODE) | 187 #define TYPE_DUMMY_IN_PROFILE_P(NODE) TYPE_LANG_FLAG_6 (NODE) |
188 | 188 |
189 /* True if objects of this type are guaranteed to be properly aligned. */ | |
190 #define TYPE_ALIGN_OK(NODE) TYPE_LANG_FLAG_7 (NODE) | |
191 | |
189 /* True for types that implement a packed array and for original packed array | 192 /* True for types that implement a packed array and for original packed array |
190 types. */ | 193 types. */ |
191 #define TYPE_IMPL_PACKED_ARRAY_P(NODE) \ | 194 #define TYPE_IMPL_PACKED_ARRAY_P(NODE) \ |
192 ((TREE_CODE (NODE) == ARRAY_TYPE && TYPE_PACKED (NODE)) \ | 195 ((TREE_CODE (NODE) == ARRAY_TYPE && TYPE_PACKED (NODE)) \ |
193 || (TREE_CODE (NODE) == INTEGER_TYPE && TYPE_PACKED_ARRAY_TYPE_P (NODE))) | 196 || (TREE_CODE (NODE) == INTEGER_TYPE && TYPE_PACKED_ARRAY_TYPE_P (NODE))) |
196 #define TYPE_CAN_HAVE_DEBUG_TYPE_P(NODE) (!TYPE_IMPL_PACKED_ARRAY_P (NODE)) | 199 #define TYPE_CAN_HAVE_DEBUG_TYPE_P(NODE) (!TYPE_IMPL_PACKED_ARRAY_P (NODE)) |
197 | 200 |
198 /* For RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE, this holds the maximum | 201 /* For RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE, this holds the maximum |
199 alignment value the type ought to have. */ | 202 alignment value the type ought to have. */ |
200 #define TYPE_MAX_ALIGN(NODE) (TYPE_PRECISION (RECORD_OR_UNION_CHECK (NODE))) | 203 #define TYPE_MAX_ALIGN(NODE) (TYPE_PRECISION (RECORD_OR_UNION_CHECK (NODE))) |
201 | |
202 /* True if objects of tagged types are guaranteed to be properly aligned. */ | |
203 #define TYPE_ALIGN_OK(NODE) TYPE_LANG_FLAG_7 (NODE) | |
204 | 204 |
205 /* For an UNCONSTRAINED_ARRAY_TYPE, this is the record containing both the | 205 /* For an UNCONSTRAINED_ARRAY_TYPE, this is the record containing both the |
206 template and the object. | 206 template and the object. |
207 | 207 |
208 ??? We also put this on an ENUMERAL_TYPE that is dummy. Technically, | 208 ??? We also put this on an ENUMERAL_TYPE that is dummy. Technically, |
226 the behavior is undefined. The optimizer takes advantage of this and | 226 the behavior is undefined. The optimizer takes advantage of this and |
227 considers that the assertion X <= UB is always true. */ | 227 considers that the assertion X <= UB is always true. */ |
228 #define TYPE_GCC_MAX_VALUE(NODE) \ | 228 #define TYPE_GCC_MAX_VALUE(NODE) \ |
229 (TYPE_MAX_VALUE_RAW (NUMERICAL_TYPE_CHECK (NODE))) | 229 (TYPE_MAX_VALUE_RAW (NUMERICAL_TYPE_CHECK (NODE))) |
230 | 230 |
231 /* For a FUNCTION_TYPE, if the subprogram has parameters passed by copy in/ | 231 /* For a FUNCTION_TYPE and METHOD_TYPE, if the function has parameters passed |
232 copy out, this is the list of nodes used to specify the return values of | 232 by copy in/copy out, this is the list of nodes used to specify the return |
233 the out (or in out) parameters that are passed by copy in/copy out. For | 233 values of these parameters. For a full description of the copy in/copy out |
234 a full description of the copy in/copy out parameter passing mechanism | 234 parameter passing mechanism refer to the routine gnat_to_gnu_entity. */ |
235 refer to the routine gnat_to_gnu_entity. */ | 235 #define TYPE_CI_CO_LIST(NODE) TYPE_LANG_SLOT_1 (FUNC_OR_METHOD_CHECK (NODE)) |
236 #define TYPE_CI_CO_LIST(NODE) TYPE_LANG_SLOT_1 (FUNCTION_TYPE_CHECK (NODE)) | 236 |
237 /* For an ARRAY_TYPE with variable size, this is the padding type built for | |
238 the array type when it is itself the component type of another array. */ | |
239 #define TYPE_PADDING_FOR_COMPONENT(NODE) \ | |
240 TYPE_LANG_SLOT_1 (ARRAY_TYPE_CHECK (NODE)) | |
237 | 241 |
238 /* For a VECTOR_TYPE, this is the representative array type. */ | 242 /* For a VECTOR_TYPE, this is the representative array type. */ |
239 #define TYPE_REPRESENTATIVE_ARRAY(NODE) \ | 243 #define TYPE_REPRESENTATIVE_ARRAY(NODE) \ |
240 TYPE_LANG_SLOT_1 (VECTOR_TYPE_CHECK (NODE)) | 244 TYPE_LANG_SLOT_1 (VECTOR_TYPE_CHECK (NODE)) |
241 | 245 |