ADTaaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since bf70aa9 was
35dd0f42,
checked in by Andrew Beach <ajbeach@…>, 6 years ago
|
Work in progress combined file for both types of exceptions.
|
-
Property mode set to
100644
|
File size:
887 bytes
|
Line | |
---|
1 | // Trying to create the new secret header for the exception handling mechanism. |
---|
2 | |
---|
3 | // This will have to go in the public header later. |
---|
4 | typedef int exception; |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | // These might be given simpler names and made public. |
---|
9 | void __throw_terminate(exception except) __attribute__((noreturn)); |
---|
10 | void __throw_resume(exception except); |
---|
11 | |
---|
12 | void __try_terminate(void (*try_block)(), |
---|
13 | void (*catch_block)(int index, exception except), |
---|
14 | int (*match_block)(exception except)); |
---|
15 | |
---|
16 | struct __try_resume_node { |
---|
17 | struct __try_resume_node * next; |
---|
18 | _Bool (*try_to_handle)(exception except); |
---|
19 | }; |
---|
20 | |
---|
21 | struct __cleanup_hook {}; |
---|
22 | |
---|
23 | |
---|
24 | // When I have it working in a single threaded environment. |
---|
25 | struct shared_stack_t { |
---|
26 | //struct lock lock; |
---|
27 | struct __try_resume_node * top_resume; |
---|
28 | struct __try_resume_node * current_resume; |
---|
29 | |
---|
30 | exception current_exception; |
---|
31 | int current_handler_index; |
---|
32 | }; |
---|
33 | |
---|
34 | extern struct shared_stack_t stared_stack; |
---|
Note: See
TracBrowser
for help on using the repository browser.