aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-10-27 18:19:17 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-10-27 18:19:17 +0000
commita2edce31a6bc68fcdb9be328eaf9f0f74bcbc64e (patch)
treea7bdfcd89f335c820f3ac6d65b81732cf611d388
parente05e2395bdab25b76b243f486994ca9d032962f1 (diff)
downloadgcc-a2edce31a6bc68fcdb9be328eaf9f0f74bcbc64e.zip
gcc-a2edce31a6bc68fcdb9be328eaf9f0f74bcbc64e.tar.gz
gcc-a2edce31a6bc68fcdb9be328eaf9f0f74bcbc64e.tar.bz2
dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.
* dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump CLEANUP_P for a TRY_BLOCK. * ir.texi: Document SAVE_EXPR. From-SVN: r30218
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/dump.c9
-rw-r--r--gcc/cp/ir.texi8
3 files changed, 22 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 1971fd2..d1537a2 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+1999-10-27 Mark Mitchell <mark@codesourcery.com>
+
+ * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
+ CLEANUP_P for a TRY_BLOCK.
+ * ir.texi: Document SAVE_EXPR.
+
Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
* call.c (build_over_call): Check that the built-in function is
diff --git a/gcc/cp/dump.c b/gcc/cp/dump.c
index a2c8b02..625804e 100644
--- a/gcc/cp/dump.c
+++ b/gcc/cp/dump.c
@@ -678,6 +678,12 @@ dequeue_and_dump (di)
dump_next_stmt (di, t);
break;
+ case HANDLER:
+ dump_stmt (di, t);
+ dump_child ("body", HANDLER_BODY (t));
+ dump_next_stmt (di, t);
+ break;
+
case IF_STMT:
dump_stmt (di, t);
dump_child ("cond", IF_COND (t));
@@ -707,6 +713,8 @@ dequeue_and_dump (di)
case TRY_BLOCK:
dump_stmt (di, t);
+ if (CLEANUP_P (t))
+ dump_string (di, "cleanup");
dump_child ("body", TRY_STMTS (t));
dump_child ("hdlr", TRY_HANDLERS (t));
dump_next_stmt (di, t);
@@ -770,6 +778,7 @@ dequeue_and_dump (di)
case INDIRECT_REF:
case THROW_EXPR:
case CLEANUP_POINT_EXPR:
+ case SAVE_EXPR:
/* These nodes are unary, but do not have code class `1'. */
dump_child ("op 0", TREE_OPERAND (t, 0));
break;
diff --git a/gcc/cp/ir.texi b/gcc/cp/ir.texi
index 2298413..b31fd1d 100644
--- a/gcc/cp/ir.texi
+++ b/gcc/cp/ir.texi
@@ -1897,7 +1897,13 @@ storage is initialized to zero.
@item SAVE_EXPR
-FIXME: Describe.
+A @code{SAVE_EXPR} represents an expression (possibly involving
+side-effects) that is used more than once. The side-effects should
+occur only the first time the expression is evaluated. Subsequent uses
+should juse reuse the computed value. The first operand to the
+@code{SAVE_EXPR} is the expression to evaluate. The side-effects should
+be executed where the @code{SAVE_EXPR} is first encountered in a
+depth-first preorder traversal of the expression tree.
@item TARGET_EXPR
A @code{TARGET_EXPR} represents a temporary object. The first operand