diff options
Diffstat (limited to 'contrib/gcc/cp/cp-tree.def')
-rw-r--r-- | contrib/gcc/cp/cp-tree.def | 66 |
1 files changed, 43 insertions, 23 deletions
diff --git a/contrib/gcc/cp/cp-tree.def b/contrib/gcc/cp/cp-tree.def index 3854525..cee19ab 100644 --- a/contrib/gcc/cp/cp-tree.def +++ b/contrib/gcc/cp/cp-tree.def @@ -23,11 +23,25 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Reference to the contents of an offset - (a value whose type is an OFFSET_TYPE). - Operand 0 is the object within which the offset is taken. - Operand 1 is the offset. The language independent OFFSET_REF - just won't work for us. */ +/* An OFFSET_REF is used in two situations: + + 1. An expression of the form `A::m' where `A' is a class and `m' is + a non-static data member. In this case, operand 0 will be a + TYPE (corresponding to `A') and operand 1 will be a FIELD_DECL + (corresponding to `m'. + + The expression is a pointer-to-member if its address is taken, + but simply denotes a member of the object if its address isnot + taken. In the latter case, resolve_offset_ref is used to + convert it to a representation of the member referred to by the + OFFSET_REF. + + 2. An expression of the form `x.*p'. In this case, operand 0 will + be an expression corresponding to `x' and operand 1 will be an + expression with pointer-to-member type. + + OFFSET_REFs are only used during the parsing phase; once semantic + analysis has taken place they are eliminated. */ DEFTREECODE (OFFSET_REF, "offset_ref", 'r', 2) /* A pointer-to-member constant. For a pointer-to-member constant @@ -75,6 +89,20 @@ DEFTREECODE (THROW_EXPR, "throw_expr", 'e', 1) these to avoid actually creating instances of the empty classes. */ DEFTREECODE (EMPTY_CLASS_EXPR, "empty_class_expr", 'e', 0) +/* A reference to a member function or member functions from a base + class. BASELINK_FUNCTIONS gives the FUNCTION_DECL, + TEMPLATE_DECL, OVERLOAD, or TEMPLATE_ID_EXPR corresponding to the + functions. BASELINK_BINFO gives the base from which the functions + come, i.e., the base to which the `this' pointer must be converted + before the functions are called. BASELINK_ACCESS_BINFO gives the + base used to name the functions. + + A BASELINK is an expression; the TREE_TYPE of the BASELINK gives + the type of the expression. This type is either a FUNCTION_TYPE, + METHOD_TYPE, or `unknown_type_node' indicating that the function is + overloaded. */ +DEFTREECODE (BASELINK, "baselink", 'e', 3) + /* Template definition. The following fields have the specified uses, although there are other macros in cp-tree.h that should be used for accessing this data. @@ -186,14 +214,10 @@ DEFTREECODE (DEFAULT_ARG, "default_arg", 'x', 2) The second is the TREE_LIST or TREE_VEC of explicitly specified arguments. The template will be a FUNCTION_DECL, TEMPLATE_DECL, or an OVERLOAD. If the template-id refers to a member template, the - template may be an IDENTIFIER_NODE. */ + template may be an IDENTIFIER_NODE. In an uninstantiated template, + the template may be a LOOKUP_EXPR. */ DEFTREECODE (TEMPLATE_ID_EXPR, "template_id_expr", 'e', 2) -/* An association between name and entity. Parameters are the scope - and the (non-type) value. TREE_TYPE indicates the type bound to - the name. */ -DEFTREECODE (CPLUS_BINDING, "binding", 'x', 2) - /* A list-like node for chaining overloading candidates. TREE_TYPE is the original name, and the parameter is the FUNCTION_DECL. */ DEFTREECODE (OVERLOAD, "overload", 'x', 1) @@ -220,19 +244,9 @@ DEFTREECODE (DOTSTAR_EXPR, "dotstar_expr", 'e', 2) DEFTREECODE (TYPEID_EXPR, "typeid_expr", 'e', 1) DEFTREECODE (PSEUDO_DTOR_EXPR, "pseudo_dtor_expr", 'e', 3) -/* A SUBOBJECT statement marks the point at which a sub-object is - fully constructed. After this point, the SUBOBJECT_CLEANUP must be - run if an exception is thrown before the end of the enclosing - function. */ -DEFTREECODE (SUBOBJECT, "subobject", 'e', 1) -/* An CTOR_STMT marks the beginning (if CTOR_BEGIN_P holds) or end of - a constructor (if CTOR_END_P) holds. At the end of a constructor, - the cleanups associated with any SUBOBJECT_CLEANUPS need no longer - be run. */ -DEFTREECODE (CTOR_STMT, "ctor_stmt", 'e', 0) /* CTOR_INITIALIZER is a placeholder in template code for a call to setup_vtbl_pointer (and appears in all functions, not just ctors). */ -DEFTREECODE (CTOR_INITIALIZER, "ctor_initializer", 'e', 2) +DEFTREECODE (CTOR_INITIALIZER, "ctor_initializer", 'e', 1) DEFTREECODE (RETURN_INIT, "return_init", 'e', 2) DEFTREECODE (TRY_BLOCK, "try_block", 'e', 2) DEFTREECODE (EH_SPEC_BLOCK, "eh_spec_block", 'e', 2) @@ -248,7 +262,13 @@ DEFTREECODE (MUST_NOT_THROW_EXPR, "must_not_throw_expr", 'e', 1) DEFTREECODE (TAG_DEFN, "tag_defn", 'e', 0) -/* And some codes for expressing conversions for overload resolution. */ +/* The following codes are used to represent implicit conversion + sequences, in the sense of [over.best.ics]. The conversion + sequences are connected through their first operands, with the + first conversion to be performed at the end of the chain. + + The innermost conversion (i.e, the one at the end of the chain) is + always an IDENTITY_CONV, corresponding to the identity conversion. */ DEFTREECODE (IDENTITY_CONV, "identity_conv", 'e', 1) DEFTREECODE (LVALUE_CONV, "lvalue_conv", 'e', 1) |