aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
authorAndrew Haley <aph@cambridge.redhat.com>2002-08-16 10:32:30 +0000
committerAndrew Haley <aph@gcc.gnu.org>2002-08-16 10:32:30 +0000
commit7149627b8ede8a1f9b4735da0690f8b28209503e (patch)
tree664000a6e258478f587c0810b5dcd1a729ff2308 /gcc/java/expr.c
parentd436bff8d6709d083432a14b8c7ff2fb753d6b2a (diff)
downloadgcc-7149627b8ede8a1f9b4735da0690f8b28209503e.zip
gcc-7149627b8ede8a1f9b4735da0690f8b28209503e.tar.gz
gcc-7149627b8ede8a1f9b4735da0690f8b28209503e.tar.bz2
Make-lang.in (java-tree-inline.o): New.
2002-07-30 Andrew Haley <aph@cambridge.redhat.com> * Make-lang.in (java-tree-inline.o): New. (JAVA_OBJS): Add java-tree-inline.o. * parse.y (source_end_java_method): Call java_optimize_inline. (java_expand_method_bodies): Save method's tree in DECL_SAVED_TREE. (add_stmt_to_compound): Keep track of the number of statments. * lang.c (java_init): Enable flag_inline_trees. (java_post_options): If flag_inline_functions is on, enable flag_inline_trees instread. (decl_constant_value): New. (java_tree_inlining_walk_subtrees): New. * java-tree.h (DECL_NUM_STMTS): New macro. (java_optimize_inline): Declare. * expr.c (java_expand_expr): Allow a BLOCK to return a value. Handle a LABEL_EXPR. * decl.c (build_result_decl): If we already have a DECL_RESULT don't make another. (dump_function): New. (java_optimize_inline): New. (dump_function): New. From-SVN: r56377
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 133fa03..d6a443d 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -2534,6 +2534,7 @@ java_expand_expr (exp, target, tmode, modifier)
if (BLOCK_EXPR_BODY (exp))
{
tree local;
+ rtx last;
tree body = BLOCK_EXPR_BODY (exp);
/* Set to 1 or more when we found a static class
initialization flag. */
@@ -2567,11 +2568,11 @@ java_expand_expr (exp, target, tmode, modifier)
emit_queue ();
body = TREE_OPERAND (body, 1);
}
- expand_expr (body, const0_rtx, VOIDmode, 0);
+ last = expand_expr (body, NULL_RTX, VOIDmode, 0);
emit_queue ();
expand_end_bindings (getdecls (), 1, 0);
poplevel (1, 1, 0);
- return const0_rtx;
+ return last;
}
return const0_rtx;
@@ -2628,6 +2629,11 @@ java_expand_expr (exp, target, tmode, modifier)
return expand_expr (build_exception_object_ref (TREE_TYPE (exp)),
target, tmode, modifier);
+ case LABEL_EXPR:
+ /* Used only by expanded inline functions. */
+ expand_label (TREE_OPERAND (exp, 0));
+ return const0_rtx;
+
default:
internal_error ("can't expand %s", tree_code_name [TREE_CODE (exp)]);
}