1 /* This file contains the definitions and documentation for the
2 additional tree codes used in the GNU C++ compiler (see tree.def
3 for the standard codes).
4 Copyright (C) 1987, 1988, 1990, 1993 Free Software Foundation, Inc.
5 Hacked by Michael Tiemann (tiemann@cygnus.com)
7 This file is part of GNU CC.
9 GNU CC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
14 GNU CC is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GNU CC; see the file COPYING. If not, write to
21 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
24 /* Reference to the contents of an offset
25 (a value whose type is an OFFSET_TYPE).
26 Operand 0 is the object within which the offset is taken.
27 Operand 1 is the offset. The language independent OFFSET_REF
28 just won't work for us. */
29 DEFTREECODE (CP_OFFSET_REF, "cp_offset_ref", "r", 2)
31 /* For DELETE_EXPR, operand 0 is the store to be destroyed.
32 Operand 1 is the value to pass to the destroying function
33 saying whether the store should be deallocated as well. */
34 DEFTREECODE (DELETE_EXPR, "dl_expr", "e", 2)
36 /* Value is reference to particular overloaded class method.
37 Operand 0 is the class name (an IDENTIFIER_NODE);
38 operand 1 is the field (also an IDENTIFIER_NODE).
39 The COMPLEXITY field holds the class level (usually 0). */
40 DEFTREECODE (SCOPE_REF, "scope_ref", "r", 2)
42 /* When composing an object with a member, this is the result.
43 Operand 0 is the object. Operand 1 is the member (usually
44 a dereferenced pointer to member). */
45 DEFTREECODE (MEMBER_REF, "member_ref", "r", 2)
47 /* Type conversion operator in C++. TREE_TYPE is type that this
48 operator converts to. Operand is expression to be converted. */
49 DEFTREECODE (TYPE_EXPR, "type_expr", "e", 1)
51 /* For CPLUS_NEW_EXPR, operand 0 is function which performs initialization,
52 operand 1 is argument list to initialization function,
53 and operand 2 is the slot which was allocated for this expression. */
54 DEFTREECODE (NEW_EXPR, "nw_expr", "e", 3)
56 /* Distinguish variables that are only used to identify exceptions
57 that were caught. Only the DECL_NAME (and TREE_CHAIN)
59 DEFTREECODE (CPLUS_CATCH_DECL, "catch_decl", "d", 0)
61 /* Template definition. The following fields have the specified uses,
62 although there are other macros in cp-tree.h that should be used for
64 DECL_ARGUMENTS template parm vector
65 DECL_TEMPLATE_INFO template text &c
66 DECL_VINDEX list of instantiations already produced;
67 only done for functions so far
69 DECL_INITIAL associated templates (methods &c)
71 For non-class templates:
72 TREE_TYPE type of object to be constructed
73 DECL_RESULT decl for object to be created
74 (e.g., FUNCTION_DECL with tmpl parms used)
76 DEFTREECODE (TEMPLATE_DECL, "template_decl", "d", 0)
78 /* Index into a template parameter list. This parameter must be a type.
79 Use TYPE_FIELDS to find parmlist and index. */
80 DEFTREECODE (TEMPLATE_TYPE_PARM, "template_type_parm", "t", 0)
82 /* Index into a template parameter list. This parameter must not be a
84 DEFTREECODE (TEMPLATE_CONST_PARM, "template_const_parm", "c", 2)
86 /* For uninstantiated parameterized types.
87 TYPE_VALUES tree list:
88 TREE_PURPOSE template decl
89 TREE_VALUE parm vector
91 Other useful fields to be defined later. */
92 DEFTREECODE (UNINSTANTIATED_P_TYPE, "uninstantiated_p_type", "t", 0)