Changeset 6d43cdde for tests/exceptions
- Timestamp:
- Apr 2, 2020, 11:35:13 AM (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:
- 3eb5a478
- Parents:
- cfbc703d
- Location:
- tests/exceptions
- Files:
-
- 11 added
- 8 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tests/exceptions/except-mac.hfa ¶
rcfbc703d r6d43cdde 6 6 #define GLUE3(left, middle, right) left##middle##right 7 7 8 // The fully (perhaps overly)qualified name of the base exception type:8 // The fully qualified name of the base exception type: 9 9 #define BASE_EXCEPT __cfaehm_base_exception_t 10 10 … … 34 34 __VA_ARGS__ \ 35 35 }; \ 36 extern TABLE(except_name) INSTANCE(except_name) ;36 extern TABLE(except_name) INSTANCE(except_name) 37 37 38 38 // The first field of the exception structure should be created with this. … … 50 50 &INSTANCE(parent_name), sizeof(except_name), \ 51 51 copy, free, msg, ## __VA_ARGS__ \ 52 } ;52 } 53 53 54 54 // Same, but used declarators for arguments. … … 57 57 .parent : &INSTANCE(parent_name), .size : sizeof(except_name), \ 58 58 .copy : copy, .free : free, .msg : msg, ## __VA_ARGS__ \ 59 } ;59 } 60 60 61 61 62 62 63 63 // Declare a trivial exception, one that adds no features: 64 #define TRIVIAL_EXCEPTION(name) \65 DECLARE_EXCEPT(name, BASE_EXCEPT,)\64 #define _TRIVIAL_EXCEPTION(name, parent_name, ...) \ 65 DECLARE_EXCEPT(name,parent_name,); \ 66 66 struct name { \ 67 67 VTABLE_FIELD(name); \ … … 76 76 VTABLE_INIT(this,name); \ 77 77 } \ 78 VTABLE_INSTANCE(name,BASE_EXCEPT,GLUE2(name,_copy),^?{},GLUE2(name,_msg),) 78 VTABLE_INSTANCE(name,parent_name,GLUE2(name,_copy),^?{},GLUE2(name,_msg),) 79 80 // TRIVIAL_EXCEPTION(name_of_exception, [parent_exception]) 81 #define TRIVIAL_EXCEPTION(...) _TRIVIAL_EXCEPTION(__VA_ARGS__,BASE_EXCEPT,)
Note: See TracChangeset
for help on using the changeset viewer.