Changeset 7030dab for libcfa/src/exception.h
- Timestamp:
- Apr 6, 2020, 4:46:28 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum, stuck-waitfor-destruct
- Children:
- e3bc51c
- Parents:
- 71d6bd8 (diff), 057298e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
libcfa/src/exception.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/exception.h
r71d6bd8 r7030dab 9 9 // Author : Andrew Beach 10 10 // Created On : Mon Jun 26 15:11:00 2017 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Feb 22 18:11:15 201813 // Update Count : 811 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Mar 27 10:16:00 2020 13 // Update Count : 9 14 14 // 15 15 … … 21 21 #endif 22 22 23 struct __cfa abi_ehm__base_exception_t;24 typedef struct __cfa abi_ehm__base_exception_t exception_t;25 struct __cfa abi_ehm__base_exception_t_vtable {26 const struct __cfa abi_ehm__base_exception_t_vtable * parent;23 struct __cfaehm_base_exception_t; 24 typedef struct __cfaehm_base_exception_t exception_t; 25 struct __cfaehm_base_exception_t_vtable { 26 const struct __cfaehm_base_exception_t_vtable * parent; 27 27 size_t size; 28 void (*copy)(struct __cfa abi_ehm__base_exception_t *this,29 struct __cfa abi_ehm__base_exception_t * other);30 void (*free)(struct __cfa abi_ehm__base_exception_t *this);31 const char * (*msg)(struct __cfa abi_ehm__base_exception_t *this);28 void (*copy)(struct __cfaehm_base_exception_t *this, 29 struct __cfaehm_base_exception_t * other); 30 void (*free)(struct __cfaehm_base_exception_t *this); 31 const char * (*msg)(struct __cfaehm_base_exception_t *this); 32 32 }; 33 struct __cfa abi_ehm__base_exception_t {34 struct __cfa abi_ehm__base_exception_t_vtable const * virtual_table;33 struct __cfaehm_base_exception_t { 34 struct __cfaehm_base_exception_t_vtable const * virtual_table; 35 35 }; 36 extern struct __cfa abi_ehm__base_exception_t_vtable37 ___cfa abi_ehm__base_exception_t_vtable_instance;36 extern struct __cfaehm_base_exception_t_vtable 37 ___cfaehm_base_exception_t_vtable_instance; 38 38 39 39 40 40 // Used in throw statement translation. 41 void __cfa abi_ehm__throw_terminate(exception_t * except) __attribute__((noreturn));42 void __cfa abi_ehm__rethrow_terminate() __attribute__((noreturn));43 void __cfa abi_ehm__throw_resume(exception_t * except);41 void __cfaehm_throw_terminate(exception_t * except) __attribute__((noreturn)); 42 void __cfaehm_rethrow_terminate() __attribute__((noreturn)); 43 void __cfaehm_throw_resume(exception_t * except); 44 44 45 45 // Function catches termination exceptions. 46 void __cfa abi_ehm__try_terminate(46 void __cfaehm_try_terminate( 47 47 void (*try_block)(), 48 48 void (*catch_block)(int index, exception_t * except), … … 50 50 51 51 // Clean-up the exception in catch blocks. 52 void __cfa abi_ehm__cleanup_terminate(void * except);52 void __cfaehm_cleanup_terminate(void * except); 53 53 54 54 // Data structure creates a list of resume handlers. 55 struct __cfa abi_ehm__try_resume_node {56 struct __cfa abi_ehm__try_resume_node * next;55 struct __cfaehm_try_resume_node { 56 struct __cfaehm_try_resume_node * next; 57 57 _Bool (*handler)(exception_t * except); 58 58 }; 59 59 60 60 // These act as constructor and destructor for the resume node. 61 void __cfa abi_ehm__try_resume_setup(62 struct __cfa abi_ehm__try_resume_node * node,61 void __cfaehm_try_resume_setup( 62 struct __cfaehm_try_resume_node * node, 63 63 _Bool (*handler)(exception_t * except)); 64 void __cfa abi_ehm__try_resume_cleanup(65 struct __cfa abi_ehm__try_resume_node * node);64 void __cfaehm_try_resume_cleanup( 65 struct __cfaehm_try_resume_node * node); 66 66 67 67 // Check for a standard way to call fake deconstructors. 68 struct __cfa abi_ehm__cleanup_hook {};68 struct __cfaehm_cleanup_hook {}; 69 69 70 70 #ifdef __cforall
Note:
See TracChangeset
for help on using the changeset viewer.