ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
deferred_resn
demangler
enum
forall-pointer-decay
jacob/cs343-translation
jenkins-sandbox
new-ast
new-ast-unique-expr
new-env
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
resolv-new
with_gc
Last change
on this file since 637568b was e4e9173, checked in by Andrew Beach <ajbeach@…>, 8 years ago |
Wrote out more tests for the new exception.h/c files.
|
-
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 shared_stack;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.