From caa63dd77f126d0fcb1146a70dae1835b42b1156 Mon Sep 17 00:00:00 2001 From: bothner Date: Sun, 21 Feb 1999 15:42:27 +0000 Subject: d * decl.c (build_result_decl), java-tree.h: New method. (complete_start_java_method): Handle synchronized methods. Don't build DECL_RESULT here. (Ordering dependency problem.) (start_java_method): Call build_result_decl here instead ... * parse.y (java_complete_expand_method): ... and here. (expand_start_java_method): Don't call complete_start_java_method here. (java_complete_expand_method): Call it here instead. * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to .. * java-tree.h: ... here. * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF. * parse.y (java_complete_lhs): Don't call force_evaluation_order for ARRAY_REF - it doesn't work when array bounds are checked. (patch_array_ref): Handle it here instead. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25346 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/java-tree.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'gcc/java/java-tree.h') diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index ad1880d9601..28cba1c7104 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -552,6 +552,7 @@ extern int get_access_flags_from_decl PROTO ((tree)); extern int interface_of_p PROTO ((tree, tree)); extern int inherits_from_p PROTO ((tree, tree)); extern void complete_start_java_method PROTO ((tree)); +extern tree build_result_decl PROTO ((tree)); extern void emit_handlers PROTO (()); extern void init_outgoing_cpool PROTO (()); extern void make_class_data PROTO ((tree)); @@ -861,6 +862,24 @@ extern tree *type_map; #define BLOCK_EXPR_DECLS(NODE) BLOCK_VARS(NODE) #define BLOCK_EXPR_BODY(NODE) BLOCK_SUBBLOCKS(NODE) +#define BUILD_MONITOR_ENTER(WHERE, ARG) \ + { \ + (WHERE) = build (CALL_EXPR, int_type_node, \ + build_address_of (soft_monitorenter_node), \ + build_tree_list (NULL_TREE, (ARG)), \ + NULL_TREE); \ + TREE_SIDE_EFFECTS (WHERE) = 1; \ + } + +#define BUILD_MONITOR_EXIT(WHERE, ARG) \ + { \ + (WHERE) = build (CALL_EXPR, int_type_node, \ + build_address_of (soft_monitorexit_node), \ + build_tree_list (NULL_TREE, (ARG)), \ + NULL_TREE); \ + TREE_SIDE_EFFECTS (WHERE) = 1; \ + } + /* Non zero if TYPE is an unchecked exception */ #define IS_UNCHECKED_EXCEPTION_P(TYPE) \ (inherits_from_p ((TYPE), runtime_exception_type_node) \ -- cgit v1.2.3