diff options
author | Per Bothner <bothner@gcc.gnu.org> | 1999-02-21 07:42:27 -0800 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 1999-02-21 07:42:27 -0800 |
commit | 939d7216dca76eac6675e54f10154ad5d2898cfa (patch) | |
tree | bc94f54b074dc8162b8ed7adee22a07f1784413d /gcc/java/java-tree.h | |
parent | 2d5a51939f53e104020ac07784f5f2087aa06275 (diff) | |
download | gcc-939d7216dca76eac6675e54f10154ad5d2898cfa.zip gcc-939d7216dca76eac6675e54f10154ad5d2898cfa.tar.gz gcc-939d7216dca76eac6675e54f10154ad5d2898cfa.tar.bz2 |
decl.c (build_result_decl): New method.
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.
From-SVN: r25346
Diffstat (limited to 'gcc/java/java-tree.h')
-rw-r--r-- | gcc/java/java-tree.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index ad1880d..28cba1c 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) \ |