source: src/libcfa/exception.h@ e213560

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 e213560 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
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 : Peter A. Buhr
12// Last Modified On : Sat Jul 22 09:57:02 2017
13// Update Count : 3
14//
15
16#pragma once
17
18// Later to be a special structure type.
19typedef int exception;
20
21#ifdef __CFORALL__
22extern "C" {
23#endif
24
25// Used in throw statement translation.
26void __cfaehm__throw_terminate(exception * except) __attribute__((noreturn));
27void __cfaehm__rethrow_terminate() __attribute__((noreturn));
28void __cfaehm__throw_resume(exception * except);
29
30// Function catches termination exceptions.
31void __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.
37struct __cfaehm__try_resume_node {
38 struct __cfaehm__try_resume_node * next;
39 int (*handler)(exception * except);
40};
41
42void __cfaehm__try_resume_setup(
43 struct __cfaehm__try_resume_node * node,
44 int (*handler)(exception * except));
45void __cfaehm__try_resume_cleanup(
46 struct __cfaehm__try_resume_node * node);
47
48// Check for a standard way to call fake deconstructors.
49struct __cfaehm__cleanup_hook {
50};
51
52#ifdef __CFORALL__
53}
54#endif
Note: See TracBrowser for help on using the repository browser.