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 6165ce7 was 6b0b624, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago |
change #ifndef to #pragma once
|
-
Property mode
set to
100644
|
File size:
1.5 KB
|
Rev | Line | |
---|
[fa4805f] | 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
|
---|
[6b0b624] | 11 | // Last Modified By : Peter A. Buhr
|
---|
| 12 | // Last Modified On : Sat Jul 22 09:57:02 2017
|
---|
| 13 | // Update Count : 3
|
---|
[fa4805f] | 14 | //
|
---|
| 15 |
|
---|
[6b0b624] | 16 | #pragma once
|
---|
[fa4805f] | 17 |
|
---|
| 18 | // Later to be a special structure type.
|
---|
| 19 | typedef int exception;
|
---|
| 20 |
|
---|
| 21 | #ifdef __CFORALL__
|
---|
[0fc9756b] | 22 | extern "C" {
|
---|
[fa4805f] | 23 | #endif
|
---|
| 24 |
|
---|
| 25 | // Used in throw statement translation.
|
---|
[38ac6ec] | 26 | void __cfaehm__throw_terminate(exception * except) __attribute__((noreturn));
|
---|
| 27 | void __cfaehm__rethrow_terminate() __attribute__((noreturn));
|
---|
| 28 | void __cfaehm__throw_resume(exception * except);
|
---|
[fa4805f] | 29 |
|
---|
| 30 | // Function catches termination exceptions.
|
---|
| 31 | void __cfaehm__try_terminate(
|
---|
| 32 | void (*try_block)(),
|
---|
| 33 | void (*catch_block)(int index, exception * except),
|
---|
| 34 | int (*match_block)(exception * except));
|
---|
| 35 |
|
---|
| 36 | // Data structure creates a list of resume handlers.
|
---|
| 37 | struct __cfaehm__try_resume_node {
|
---|
[307a732] | 38 | struct __cfaehm__try_resume_node * next;
|
---|
[fa4805f] | 39 | int (*handler)(exception * except);
|
---|
| 40 | };
|
---|
| 41 |
|
---|
| 42 | void __cfaehm__try_resume_setup(
|
---|
[307a732] | 43 | struct __cfaehm__try_resume_node * node,
|
---|
[fa4805f] | 44 | int (*handler)(exception * except));
|
---|
| 45 | void __cfaehm__try_resume_cleanup(
|
---|
[307a732] | 46 | struct __cfaehm__try_resume_node * node);
|
---|
[fa4805f] | 47 |
|
---|
| 48 | // Check for a standard way to call fake deconstructors.
|
---|
| 49 | struct __cfaehm__cleanup_hook {
|
---|
| 50 | };
|
---|
| 51 |
|
---|
| 52 | #ifdef __CFORALL__
|
---|
| 53 | }
|
---|
| 54 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.