]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add exception propagation support as per N2179.
authorSebastian Redl <sebastian.redl@getdesigned.at>
Wed, 13 Aug 2008 18:14:51 +0000 (20:14 +0200)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 13 Aug 2008 18:14:51 +0000 (18:14 +0000)
commit0292e6d2bbadd4f0c49b048b3bfa1c0c5e334197
tree0cc1652e5f7480c1012ab1708c42c33f61cc975b
parent4003301d719865df5b0f445ab4d80339d86572d7
Add exception propagation support as per N2179.

2008-08-13  Sebastian Redl <sebastian.redl@getdesigned.at>

Add exception propagation support as per N2179.
        * libsupc++/exception_ptr.h (exception_ptr, current_exception,
        copy_exception, rethrow_exception): New file, implement exception
propagation.
        * libsupc++/eh_ptr.cc (exception_ptr, current_exception,
        rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
        * libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
        __cxa_free_dependent_exception, __get_dependent_exception_from_ue,
        __GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
        __gxx_dependent_exception_class, __get_object_from_ue,
        __get_object_from_ambiguous_exception): Add.
        (__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
        (__is_gxx_exception_class): Handle dependent exceptions.
        * libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
        * libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
        * libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
        * libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
        * libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
        __cxa_free_dependent_exception): Add.
        * libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
        counting.
        * libsupc++/exception: Conditionally include exception_ptr.h.
        * libsupc++/Makefile.am: Register new files.
        * libsupc++/Makefile.in: Regenerate.
        * config/abi/pre/gnu.ver: Add new symbols.
        * testsuite/18_support/exception_ptr/current_exception.cc: Test the
        core functionality of current_exception().
        * testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
        core functionality of rethrow_exception().
        * testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
        exception objects during exception propagation.

From-SVN: r139064
17 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/libsupc++/Makefile.am
libstdc++-v3/libsupc++/Makefile.in
libstdc++-v3/libsupc++/eh_alloc.cc
libstdc++-v3/libsupc++/eh_arm.cc
libstdc++-v3/libsupc++/eh_call.cc
libstdc++-v3/libsupc++/eh_personality.cc
libstdc++-v3/libsupc++/eh_ptr.cc [new file with mode: 0644]
libstdc++-v3/libsupc++/eh_throw.cc
libstdc++-v3/libsupc++/eh_type.cc
libstdc++-v3/libsupc++/exception
libstdc++-v3/libsupc++/exception_ptr.h [new file with mode: 0644]
libstdc++-v3/libsupc++/unwind-cxx.h
libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc [new file with mode: 0644]
libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc [new file with mode: 0644]
libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc [new file with mode: 0644]