/* This file contains the definitions and documentation for the
additional tree codes used in the GNU C++ compiler (see tree.def
for the standard codes).
- Copyright (C) 1987, 1988, 1990, 1993, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1990, 1993, 1997, 1998,
+ 1999, 2000 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
/* A pointer-to-member constant. For a pointer-to-member constant
`X::Y' The PTRMEM_CST_CLASS is the RECORD_TYPE for `X' and the
PTRMEM_CST_MEMBER is the _DECL for `Y'. */
-DEFTREECODE (PTRMEM_CST, "ptrmem_cst", 'c', 1)
+DEFTREECODE (PTRMEM_CST, "ptrmem_cst", 'c', 2)
/* For NEW_EXPR, operand 0 is the placement list.
Operand 1 is the new-declarator.
else it is NULL_TREE. */
DEFTREECODE (THROW_EXPR, "throw_expr", 'e', 1)
-/* Initialization of a vector, used in build_new. Operand 0 is the target
- of the initialization, operand 1 is the initializer, and operand 2 is
- the number of elements. */
-DEFTREECODE (VEC_INIT_EXPR, "vec_init_expr", 'e', 3)
+/* An empty class object. The TREE_TYPE gives the class type. We use
+ these to avoid actually creating instances of the empty classes. */
+DEFTREECODE (EMPTY_CLASS_EXPR, "empty_class_expr", 'e', 0)
/* Template definition. The following fields have the specified uses,
although there are other macros in cp-tree.h that should be used for
the types of things; the ORIG_LEVEL is the level when we are
worrying about instantiating things. */
DEFTREECODE (TEMPLATE_PARM_INDEX, "template_parm_index", 'x',
- /* The addition of (sizeof(char*) - 1) in the next
- expression is to ensure against the case where
- sizeof(char*) does not evenly divide
- sizeof(HOST_WIDE_INT). */
- 2 + ((3 * sizeof (HOST_WIDE_INT) + sizeof(char*) - 1)
- / sizeof (char*)))
+ /* The addition of (sizeof(tree) - 1) in the next expression
+ is to handle the case when padding pushes us past an even
+ multiple of sizeof(tree). */
+ /* We used to try to calculate this using
+ 1+3*sizeof(HOST_WIDE_INT), but that fails if alignment
+ makes it bigger. */
+ ((sizeof (template_parm_index) - sizeof (struct tree_common))
+ + sizeof (tree) - 1)
+ / sizeof (tree))
/* Index into a template parameter list. This parameter must be a type.
The TYPE_FIELDS value will be a TEMPLATE_PARM_INDEX. */
/* A thunk is a stub function.
- Thunks are used to implement multiple inheritance:
- At run-time, such a thunk subtracts THUNK_DELTA (an int, not a tree)
- from the this pointer, and then jumps to DECL_INITIAL
- (which is an ADDR_EXPR whose operand is a FUNCTION_DECL).
+ A THUNK_DECL is an alternate entry point for an ordinary
+ FUNCTION_DECL. It's job is to adjust the `this' poitner before
+ transferring control to the FUNCTION_DECL.
- Other kinds of thunks may be defined later. */
+ A thunk may perform either, or both, of the following operations:
+
+ o Adjust the `this' pointer by a constant offset.
+ o Adjust the `this' pointer by looking up a vcall-offset
+ in the vtable.
+
+ If both operations are performed, then the constant adjument to
+ `this' is performed first.
+
+ The constant adjustment is given by THUNK_DELTA. If the
+ vcall-offset is required, the index into the vtable is given by
+ THUNK_VCALL_OFFSET. */
DEFTREECODE (THUNK_DECL, "thunk_decl", 'd', 0)
/* A using declaration. DECL_INITIAL contains the specified scope.
unused. */
DEFTREECODE (LOOKUP_EXPR, "lookup_expr", 'e', 1)
+/* Used to represent __PRETTY_FUNCTION__ in template bodies. */
+DEFTREECODE (FUNCTION_NAME, "function_name", 'e', 0)
+
/* A whole bunch of tree codes for the initial, superficial parsing of
templates. */
DEFTREECODE (MODOP_EXPR, "modop_expr", 'e', 3)
DEFTREECODE (CONTINUE_STMT, "continue_stmt", 'e', 0)
DEFTREECODE (SWITCH_STMT, "switch_stmt", 'e', 2)
DEFTREECODE (GOTO_STMT, "goto_stmt", 'e', 1)
+DEFTREECODE (LABEL_STMT, "label_stmt", 'e', 1)
DEFTREECODE (ASM_STMT, "asm_stmt", 'e', 5)
-
+/* 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 contstructor (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)
+/* A CLEANUP_STMT marks the point at which a declaration is fully
+ constructed. If, after this point, the CLEANUP_DECL goes out of
+ scope, the CLEANUP_EXPR must be run. */
+DEFTREECODE (CLEANUP_STMT, "cleanup_stmt", 'e', 2)
+/* A START_CATCH_STMT marks the beginning of a catch handler for the
+ the START_CATCH_TYPE. If this is CATCH_ALL_TYPE, then the handler
+ catches all types. */
+DEFTREECODE (START_CATCH_STMT, "start_catch_stmt", 'e', 0)
+/* A SCOPE_STMT marks the beginning or end of a scope. If
+ SCOPE_BEGIN_P holds, then this is the start of a scope. If
+ SCOPE_END_P holds, then this is the end of a scope. If
+ SCOPE_NULLIFIED_P holds then there turned out to be no variables in
+ this scope. The SCOPE_STMT_BLOCK is the BLOCK containing the
+ variables declared in this scope. */
+DEFTREECODE (SCOPE_STMT, "scope_stmt", 'e', 1)
DEFTREECODE (CTOR_INITIALIZER, "ctor_initializer", 'e', 2)
DEFTREECODE (CASE_LABEL, "case_label", 'e', 2)
DEFTREECODE (RETURN_INIT, "return_init", 'e', 2)
-DEFTREECODE (TRY_BLOCK, "try_stmt", 'e', 2)
-DEFTREECODE (HANDLER, "catch_stmt", 'e', 2)
+DEFTREECODE (TRY_BLOCK, "try_block", 'e', 2)
+DEFTREECODE (HANDLER, "handler", 'e', 2)
/* A STMT_EXPR represents a statement-expression. The
STMT_EXPR_STMT is the statement given by the expression. */
-DEFTREECODE (STMT_EXPR, "cp_stmt_expr", 'e', 1)
+DEFTREECODE (STMT_EXPR, "stmt_expr", 'e', 1)
DEFTREECODE (TAG_DEFN, "tag_defn", 'e', 0)