このページを編集する際は,編集に関する方針に従ってください.[]
概要[]
- gcc-4.1.0/gcc/tree.hにて定義
- 全ての struct tree_* 型の先頭に存在し,大量のフラグ情報を持つ構造体.
実装[]
- GTY というマクロは,読むぶんには,とりあえずは無視してかまわないらしい.
241 /* The definition of tree nodes fills the next several pages. */
242
243 /* A tree node can represent a data type, a variable, an expression
244 or a statement. Each node has a TREE_CODE which says what kind o f
245 thing it represents. Some common codes are:
246 INTEGER_TYPE -- represents a type of integers.
247 ARRAY_TYPE -- represents a type of pointer.
248 VAR_DECL -- represents a declared variable.
249 INTEGER_CST -- represents a constant integer value.
250 PLUS_EXPR -- represents a sum (an expression).
251
252 As for the contents of a tree node: there are some fields
253 that all nodes share. Each TREE_CODE has various special-purpose
254 fields as well. The fields of a node are never accessed directly,
255 always through accessor macros. */
256
257 /* Every kind of tree node starts with this structure,
258 so all nodes have these fields.
259
260 See the accessor macros, defined below, for documentation of the
261 fields. */
262 union tree_ann_d;
263
264 struct tree_common GTY(())
265 {
- tree は,union tree_node へのポインタ.
266 tree chain;
267 tree type;
268 union tree_ann_d *ann;
269
- tree_code は,enum tree_code
270 ENUM_BITFIELD(tree_code) code : 8;
271
272 unsigned side_effects_flag : 1;
273 unsigned constant_flag : 1;
274 unsigned addressable_flag : 1;
275 unsigned volatile_flag : 1;
276 unsigned readonly_flag : 1;
277 unsigned unsigned_flag : 1;
278 unsigned asm_written_flag: 1;
279 unsigned nowarning_flag : 1;
280
281 unsigned used_flag : 1;
282 unsigned nothrow_flag : 1;
283 unsigned static_flag : 1;
284 unsigned public_flag : 1;
285 unsigned private_flag : 1;
286 unsigned protected_flag : 1;
287 unsigned deprecated_flag : 1;
288 unsigned invariant_flag : 1;
289
290 unsigned lang_flag_0 : 1;
291 unsigned lang_flag_1 : 1;
292 unsigned lang_flag_2 : 1;
293 unsigned lang_flag_3 : 1;
294 unsigned lang_flag_4 : 1;
295 unsigned lang_flag_5 : 1;
296 unsigned lang_flag_6 : 1;
297 unsigned visited : 1;
298 };
code メンバの説明は,J 03_12_17] が参考になります.