ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since 955d27e9 was
307a732,
checked in by Andrew Beach <ajbeach@…>, 7 years ago
|
The exception handling code compilers and translates, but the translation crashes.
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | // |
---|
2 | // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo |
---|
3 | // |
---|
4 | // The contents of this file are covered under the licence agreement in the |
---|
5 | // file "LICENCE" distributed with Cforall. |
---|
6 | // |
---|
7 | // exception.h -- Builtins for exception handling. |
---|
8 | // |
---|
9 | // Author : Andrew Beach |
---|
10 | // Created On : Mon Jun 26 15:11:00 2017 |
---|
11 | // Last Modified By : Andrew Beach |
---|
12 | // Last Modified On : Mon Nov 26 15:11:00 2017 |
---|
13 | // Update Count : 0 |
---|
14 | // |
---|
15 | |
---|
16 | #ifndef EXCEPTION_H |
---|
17 | #define EXCEPTION_H |
---|
18 | |
---|
19 | |
---|
20 | // Later to be a special structure type. |
---|
21 | typedef int exception; |
---|
22 | |
---|
23 | #ifdef __CFORALL__ |
---|
24 | extern "BuiltinC" { |
---|
25 | #endif |
---|
26 | |
---|
27 | // Used in throw statement translation. |
---|
28 | void __cfaehm__throw_termination(exception * except) __attribute__((noreturn)); |
---|
29 | void __cfaehm__rethrow_termination() __attribute__((noreturn)); |
---|
30 | void __cfaehm__throw_resumption(exception * except); |
---|
31 | |
---|
32 | // Function catches termination exceptions. |
---|
33 | void __cfaehm__try_terminate( |
---|
34 | void (*try_block)(), |
---|
35 | void (*catch_block)(int index, exception * except), |
---|
36 | int (*match_block)(exception * except)); |
---|
37 | |
---|
38 | // Data structure creates a list of resume handlers. |
---|
39 | struct __cfaehm__try_resume_node { |
---|
40 | struct __cfaehm__try_resume_node * next; |
---|
41 | int (*handler)(exception * except); |
---|
42 | }; |
---|
43 | |
---|
44 | void __cfaehm__try_resume_setup( |
---|
45 | struct __cfaehm__try_resume_node * node, |
---|
46 | int (*handler)(exception * except)); |
---|
47 | void __cfaehm__try_resume_cleanup( |
---|
48 | struct __cfaehm__try_resume_node * node); |
---|
49 | |
---|
50 | // Check for a standard way to call fake deconstructors. |
---|
51 | struct __cfaehm__cleanup_hook { |
---|
52 | }; |
---|
53 | |
---|
54 | #ifdef __CFORALL__ |
---|
55 | } |
---|
56 | #endif |
---|
57 | |
---|
58 | #endif //EXCEPTION_H |
---|
Note: See
TracBrowser
for help on using the repository browser.