diff options
author | Richard Henderson <rth@redhat.com> | 2004-06-20 09:18:13 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2004-06-20 09:18:13 +0000 |
commit | e89e5d1290be230581654fd0791ed19b4259aa84 (patch) | |
tree | 5f34633f30f7aaefd64e454886114b31df3b8155 /gcc/cp/cp-tree.def | |
parent | a6d7d20b925527e7930aeb54ed2e2fc58405e535 (diff) |
* c-common.def (IF_STMT, CLEANUP_STMT): Move to cp-tree.def.
* c-common.h (IF_COND, THEN_CLAUSE, ELSE_CLAUSE, CLEANUP_BODY,
CLEANUP_EXPR, CLEANUP_DECL): Move to cp-tree.h.
(c_common_stmt_codes): Remove IF_STMT, CLEANUP_STMT.
* c-dump.c (c_dump_tree): Move IF_STMT, CLEANUP_STMT to cp_dump_tree.
* c-pretty-print.c (pp_c_statement): Similarly.
* c-gimplify.c (gimplify_cleanup_stmt, gimplify_cleanup_stmts,
gimplify_if_stmt): Move to cp-gimplify.c.
(c_genericize, c_gimplify_expr): Don't call them.
* c-semantics.c (push_cleanup): Move to cp/semantics.c.
* c-typeck.c (push_cleanup): New.
(c_begin_if_stmt, c_finish_if_cond, c_finish_then, c_finish_else,
c_finish_if_stmt): Use COND_EXPR.
* tree.h (CLEANUP_EH_ONLY): Update documentation.
cp/
* cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
* cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
(cp_gimplify_expr): Call it.
(gimplify_cleanup_stmt): Move from c-gimplify.c.
(cp_genericize): New.
* decl.c (finish_function): Call it.
* cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
(CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
(IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
(cp_genericize): Declare.
* cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
* dump.c (cp_dump_tree): Likewise.
* semantics.c (push_cleanup): Move from c-semantics.c.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@83407 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-tree.def')
-rw-r--r-- | gcc/cp/cp-tree.def | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.def b/gcc/cp/cp-tree.def index 3b4c6e6eb5a..4f7961b7b8a 100644 --- a/gcc/cp/cp-tree.def +++ b/gcc/cp/cp-tree.def @@ -243,8 +243,11 @@ DEFTREECODE (NON_DEPENDENT_EXPR, "non_dependent_expr", 'e', 1) /* 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', 1) + DEFTREECODE (TRY_BLOCK, "try_block", 'e', 2) + DEFTREECODE (EH_SPEC_BLOCK, "eh_spec_block", 'e', 2) + /* A HANDLER wraps a catch handler for the HANDLER_TYPE. If this is CATCH_ALL_TYPE, then the handler catches all types. The declaration of the catch variable is in HANDLER_PARMS, and the body block in @@ -255,6 +258,17 @@ DEFTREECODE (HANDLER, "handler", 'e', 2) throw, and must call terminate if it does. */ DEFTREECODE (MUST_NOT_THROW_EXPR, "must_not_throw_expr", 'e', 1) +/* A CLEANUP_STMT marks the point at which a declaration is fully + constructed. The CLEANUP_EXPR is run on behalf of CLEANUP_DECL + when CLEANUP_BODY completes. */ +DEFTREECODE (CLEANUP_STMT, "cleanup_stmt", 'e', 3) + +/* Represents an 'if' statement. The operands are IF_COND, + THEN_CLAUSE, and ELSE_CLAUSE, respectively. */ +/* ??? It is currently still necessary to distinguish between IF_STMT + and COND_EXPR for the benefit of templates. */ +DEFTREECODE (IF_STMT, "if_stmt", 'e', 3) + DEFTREECODE (TAG_DEFN, "tag_defn", 'e', 0) /* Template instantiation level node. |