Changeset dafbde8 for libcfa/src/exception.h
- Timestamp:
- Jan 20, 2021, 4:49:40 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 454f478
- Parents:
- 92bfda0 (diff), fd54fef (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
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/exception.h
r92bfda0 rdafbde8 101 101 // implemented in the .c file either so they all have to be inline. 102 102 103 trait is_exception( dtype exceptT, dtype virtualT) {103 trait is_exception(exceptT &, virtualT &) { 104 104 /* The first field must be a pointer to a virtual table. 105 105 * That virtual table must be a decendent of the base exception virtual table. … … 109 109 }; 110 110 111 trait is_termination_exception( dtype exceptT, dtype virtualT| is_exception(exceptT, virtualT)) {111 trait is_termination_exception(exceptT &, virtualT & | is_exception(exceptT, virtualT)) { 112 112 void defaultTerminationHandler(exceptT &); 113 113 }; 114 114 115 trait is_resumption_exception( dtype exceptT, dtype virtualT| is_exception(exceptT, virtualT)) {115 trait is_resumption_exception(exceptT &, virtualT & | is_exception(exceptT, virtualT)) { 116 116 void defaultResumptionHandler(exceptT &); 117 117 }; 118 118 119 forall( dtype exceptT, dtype virtualT| is_termination_exception(exceptT, virtualT))119 forall(exceptT &, virtualT & | is_termination_exception(exceptT, virtualT)) 120 120 static inline void $throw(exceptT & except) { 121 121 __cfaehm_throw_terminate( … … 125 125 } 126 126 127 forall( dtype exceptT, dtype virtualT| is_resumption_exception(exceptT, virtualT))127 forall(exceptT &, virtualT & | is_resumption_exception(exceptT, virtualT)) 128 128 static inline void $throwResume(exceptT & except) { 129 129 __cfaehm_throw_resume( … … 133 133 } 134 134 135 forall( dtype exceptT, dtype virtualT| is_exception(exceptT, virtualT))135 forall(exceptT &, virtualT & | is_exception(exceptT, virtualT)) 136 136 static inline void cancel_stack(exceptT & except) __attribute__((noreturn)) { 137 137 __cfaehm_cancel_stack( (exception_t *)&except ); 138 138 } 139 139 140 forall( dtype exceptT, dtype virtualT| is_exception(exceptT, virtualT))140 forall(exceptT &, virtualT & | is_exception(exceptT, virtualT)) 141 141 static inline void defaultTerminationHandler(exceptT & except) { 142 142 return cancel_stack( except ); 143 143 } 144 144 145 forall( dtype exceptT, dtype virtualT| is_exception(exceptT, virtualT))145 forall(exceptT &, virtualT & | is_exception(exceptT, virtualT)) 146 146 static inline void defaultResumptionHandler(exceptT & except) { 147 147 throw except;
Note: See TracChangeset
for help on using the changeset viewer.