diff options
author | Andrew Haley <aph@redhat.com> | 2003-08-20 17:27:56 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2003-08-20 17:27:56 +0000 |
commit | f2f3f409f6b69750caf647923bfc8c622f4dd991 (patch) | |
tree | 8cc9800fc859447329cd4c9ba42a32a51f71de0f /gcc/java/except.c | |
parent | 3e6d83ec9c6d81c8b060ca7ec9307825d4e76360 (diff) | |
download | gcc-f2f3f409f6b69750caf647923bfc8c622f4dd991.zip gcc-f2f3f409f6b69750caf647923bfc8c622f4dd991.tar.gz gcc-f2f3f409f6b69750caf647923bfc8c622f4dd991.tar.bz2 |
[multiple changes]
2003-01-31 Andrew Haley <aph@redhat.com>
* except.c (prepare_eh_table_type): Use new encoding for exception
handlers when using -fno-assume-compiled.
2003-08-20 Andrew Haley <aph@redhat.com>
* gnu/gcj/runtime/StackTrace.java (getClass): New method.
* gnu/gcj/runtime/natStackTrace.cc (getClass): New method.
(classAt): Break out class lookup function into getClass().
* exception.cc (PERSONALITY_FUNCTION): Use new encoding for exception
handlers when using -fno-assume-compiled.
From-SVN: r70605
Diffstat (limited to 'gcc/java/except.c')
-rw-r--r-- | gcc/java/except.c | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/gcc/java/except.c b/gcc/java/except.c index 9ad41a6..6aeff65 100644 --- a/gcc/java/except.c +++ b/gcc/java/except.c @@ -324,10 +324,36 @@ prepare_eh_table_type (tree type) else if (is_compiled_class (type)) exp = build_class_ref (type); else - exp = fold (build - (PLUS_EXPR, ptr_type_node, - build_utf8_ref (DECL_NAME (TYPE_NAME (type))), - size_one_node)); + { + tree ctype = make_node (RECORD_TYPE); + tree field = NULL_TREE; + tree cinit, decl; + tree utf8_ref = build_utf8_ref (DECL_NAME (TYPE_NAME (type))); + char buf[64]; + sprintf (buf, "%s_ref", + IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (utf8_ref, 0)))); + PUSH_FIELD (ctype, field, "dummy", ptr_type_node); + PUSH_FIELD (ctype, field, "utf8", utf8const_ptr_type); + FINISH_RECORD (ctype); + START_RECORD_CONSTRUCTOR (cinit, ctype); + PUSH_FIELD_VALUE (cinit, "dummy", + convert (ptr_type_node, integer_minus_one_node)); + PUSH_FIELD_VALUE (cinit, "utf8", utf8_ref); + FINISH_RECORD_CONSTRUCTOR (cinit); + TREE_CONSTANT (cinit) = 1; + decl = build_decl (VAR_DECL, get_identifier (buf), ctype); + TREE_STATIC (decl) = 1; + DECL_ARTIFICIAL (decl) = 1; + DECL_IGNORED_P (decl) = 1; + TREE_READONLY (decl) = 1; + TREE_THIS_VOLATILE (decl) = 0; + DECL_INITIAL (decl) = cinit; + layout_decl (decl, 0); + pushdecl (decl); + rest_of_decl_compilation (decl, (char*) 0, global_bindings_p (), 0); + make_decl_rtl (decl, (char*) 0); + exp = build1 (ADDR_EXPR, build_pointer_type (ctype), decl); + } return exp; } |