Changeset 0720e049 for src/tests/except-0.c
- Timestamp:
- Aug 11, 2017, 10:33:37 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 54cd58b0
- Parents:
- 3d4b23fa (diff), 59a75cb (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
-
src/tests/except-0.c
r3d4b23fa r0720e049 6 6 #include <stdbool.h> 7 7 8 // Local type to mark exits from scopes. (see ERROR) 8 9 struct signal_exit { 9 10 const char * area; … … 19 20 } 20 21 21 void terminate(int except_value) { 22 23 // Local Exception Types and manual vtable types. 24 //#define TRIVIAL_EXCEPTION(name) //TRIVAL_EXCEPTION(yin) 25 struct yin; 26 struct yin_vtable { 27 struct exception_t_vtable const * parent; 28 size_t size; 29 void (*copy)(yin *this, yin * other); 30 void (*free)(yin *this); 31 const char (*msg)(yin *this); 32 }; 33 struct yin { 34 struct yin_vtable const * parent; 35 }; 36 void yin_msg(yin) { 37 return "in"; 38 } 39 yin_vtable _yin_vtable_instance = { 40 &_exception_t_vtable_instance, sizeof(yin), ?{}, ^?{}, yin_msg 41 } 42 43 44 void terminate(exception * except_value) { 22 45 signal_exit a = {"terminate function"}; 23 46 throw except_value; … … 25 48 } 26 49 27 void resume( intexcept_value) {50 void resume(exception * except_value) { 28 51 signal_exit a = {"resume function"}; 29 52 throwResume except_value;
Note:
See TracChangeset
for help on using the changeset viewer.