summaryrefslogtreecommitdiffstats
path: root/gcc/java/decl.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-28 08:59:30 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-28 08:59:30 +0000
commitd3ab49408bd5b876d10076caea78dc81a5f85dd7 (patch)
tree4e0cd6667d1a644a7351591937d44f5c7b75db48 /gcc/java/decl.c
parent69a1723d99e98665656fdad933aaff86ebf5c4dd (diff)
downloadppe42-gcc-d3ab49408bd5b876d10076caea78dc81a5f85dd7.tar.gz
ppe42-gcc-d3ab49408bd5b876d10076caea78dc81a5f85dd7.zip
* java-tree.h (throw_node): Define as a single member of
java_global_trees instead of a separate array. (JTI_THROW_NODE): New. * decl.c (throw_node): Don't declare. (init_decl_processing): Init a scalar throw_node. Don't register it for gc. * check-init.c (check_init): Reference scalar throw_node. * expr.c (build_java_athrow): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * parse.h (BUILD_THROW): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40922 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r--gcc/java/decl.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index c81c3421104..c0b67b22d7c 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -72,8 +72,6 @@ tree decl_map;
static tree pending_local_decls = NULL_TREE;
-tree throw_node [2];
-
/* Push a local variable or stack slot into the decl_map,
and assign it an rtl. */
@@ -727,18 +725,13 @@ init_decl_processing ()
t),
0, NOT_BUILT_IN,
NULL_PTR);
- throw_node[0] = builtin_function ("_Jv_Throw",
- build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ throw_node = builtin_function ((USING_SJLJ_EXCEPTIONS
+ ? "_Jv_Throw" : "_Jv_Sjlj_Throw"),
+ build_function_type (ptr_type_node, t),
+ 0, NOT_BUILT_IN, NULL_PTR);
/* Mark throw_nodes as `noreturn' functions with side effects. */
- TREE_THIS_VOLATILE (throw_node[0]) = 1;
- TREE_SIDE_EFFECTS (throw_node[0]) = 1;
- t = tree_cons (NULL_TREE, ptr_type_node, endlink);
- throw_node[1] = builtin_function ("_Jv_Sjlj_Throw",
- build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
- TREE_THIS_VOLATILE (throw_node[1]) = 1;
- TREE_SIDE_EFFECTS (throw_node[1]) = 1;
+ TREE_THIS_VOLATILE (throw_node) = 1;
+ TREE_SIDE_EFFECTS (throw_node) = 1;
t = build_function_type (int_type_node, endlink);
soft_monitorenter_node
= builtin_function ("_Jv_MonitorEnter", t, 0, NOT_BUILT_IN,
@@ -884,8 +877,6 @@ init_decl_processing ()
/* Register nodes with the garbage collector. */
ggc_add_tree_root (java_global_trees,
sizeof (java_global_trees) / sizeof (tree));
- ggc_add_tree_root (throw_node,
- sizeof (throw_node) / sizeof (tree));
ggc_add_tree_root (predef_filenames,
sizeof (predef_filenames) / sizeof (tree));
ggc_add_tree_root (&decl_map, 1);
OpenPOWER on IntegriCloud