Changeset 7c38d53
- Timestamp:
- May 19, 2020, 1:36:42 PM (5 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
- Children:
- 7d6e01d
- Parents:
- 314dab6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/exception.hfa
r314dab6 r7c38d53 14 14 // 15 15 16 // WARNING: This is for documentation as it will match ANY type.17 16 trait is_exception(dtype T) { 18 / * The first field must be a pointer to a virtual table.19 * That virtual table must be a decendent of the base exception virtual table.20 */17 // The trait system can't describe the actual constrants. 18 // Unused, should always be a no-op. 19 void mark_exception(T *); 21 20 }; 22 21 … … 81 80 #define _VTABLE_DECLARATION(exception_name, parent_name, ...) \ 82 81 struct exception_name; \ 82 void mark_exception(exception_name *); \ 83 83 VTABLE_TYPE(exception_name); \ 84 84 extern VTABLE_TYPE(exception_name) VTABLE_NAME(exception_name); \ … … 97 97 #define VTABLE_INSTANCE(...) _EXC_DISPATCH(_VTABLE_INSTANCE, __VA_ARGS__) 98 98 #define _VTABLE_INSTANCE(exception_name, parent_name, ...) \ 99 void mark_exception(exception_name *) {} \ 99 100 void _GLUE2(exception_name,_copy)(exception_name * this, exception_name * other) { \ 100 101 *this = *other; \
Note: See TracChangeset
for help on using the changeset viewer.