aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/java-tree.h
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/java-tree.h
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/java-tree.h')
-rw-r--r--gcc/java/java-tree.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index 8a7fb9e..a08ec58 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -902,6 +902,12 @@ union lang_tree_node
/* The original WFL of a final variable. */
#define DECL_FIELD_FINAL_WFL(NODE) \
(DECL_LANG_SPECIFIC(NODE)->u.v.wfl)
+/* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this is
+ the approximate number of statements in this function. There is
+ no need for this number to be exact; it is only used in various
+ heuristics regarding optimization. */
+#define DECL_NUM_STMTS(NODE) \
+ (FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
/* True if NODE is a local variable final. */
#define LOCAL_FINAL_P(NODE) (DECL_LANG_SPECIFIC (NODE) && DECL_FINAL (NODE))
/* True if NODE is a final field. */
@@ -1274,6 +1280,9 @@ extern void append_gpp_mangled_name PARAMS ((const char *, int));
extern void add_predefined_file PARAMS ((tree));
extern int predefined_filename_p PARAMS ((tree));
+extern void java_optimize_inline PARAMS ((tree));
+extern tree decl_constant_value PARAMS ((tree));
+
#if defined(RTX_CODE) && defined (HAVE_MACHINE_MODES)
struct rtx_def * java_expand_expr PARAMS ((tree, rtx, enum machine_mode,
int));