diff options
author | Per Bothner <per@bothner.com> | 2001-01-14 12:46:32 -0800 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2001-01-14 12:46:32 -0800 |
commit | 00b4575d1eb041bac1d0b5f46f4e8e1e506de02c (patch) | |
tree | 9e4aef705f18edbdce9dd190a5e5106926a873cd /gcc/java/lex.c | |
parent | 521b92248e4ce84a4106887ac8104d820037717f (diff) | |
download | gcc-00b4575d1eb041bac1d0b5f46f4e8e1e506de02c.zip gcc-00b4575d1eb041bac1d0b5f46f4e8e1e506de02c.tar.gz gcc-00b4575d1eb041bac1d0b5f46f4e8e1e506de02c.tar.bz2 |
parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is constant, return body without wrapper.
* parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
constant, return body without wrapper. (Improves constant folding.)
* lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
From-SVN: r39017
Diffstat (limited to 'gcc/java/lex.c')
-rw-r--r-- | gcc/java/lex.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/java/lex.c b/gcc/java/lex.c index dddb3cd..338f3d5 100644 --- a/gcc/java/lex.c +++ b/gcc/java/lex.c @@ -1642,7 +1642,10 @@ static tree build_wfl_node (node) tree node; { - return build_expr_wfl (node, ctxp->filename, ctxp->elc.line, ctxp->elc.col); + node = build_expr_wfl (node, ctxp->filename, ctxp->elc.line, ctxp->elc.col); + /* Prevent java_complete_lhs from short-circuiting node (if constant). */ + TREE_TYPE (node) = NULL_TREE; + return node; } #endif |