Last change
on this file since 08e0d65 was
c3b9d639,
checked in by Andrew Beach <ajbeach@…>, 2 years ago
|
Clean-up the exception interface. It should be slightly more like the final - non-macro - interface.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[e68d092] | 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.hfa -- User facing tools for working with exceptions. |
---|
| 8 | // |
---|
| 9 | // Author : Andrew Beach |
---|
| 10 | // Created On : Thu Apr 7 10:25:00 2020 |
---|
| 11 | // Last Modified By : Andrew Beach |
---|
[c715e5f] | 12 | // Last Modified On : Wed May 25 17:20:00 2022 |
---|
| 13 | // Update Count : 5 |
---|
[e68d092] | 14 | // |
---|
| 15 | |
---|
| 16 | // Everything below this line should be considered a patch while the exception |
---|
| 17 | // objects themselves are designed and created and should be removed in time. |
---|
| 18 | // ----------------------------------------------------------------------------------------------- |
---|
| 19 | |
---|
[c3b9d639] | 20 | // EHM_DEFAULT_VTABLE(exception_type) |
---|
[5456537] | 21 | // Create a declaration for a (possibly polymorphic) default vtable. |
---|
[c3b9d639] | 22 | // Mostly used by and for the currency module. |
---|
| 23 | #define EHM_DEFAULT_VTABLE(type) vtable(type) & const _default_vtable |
---|
[21b0a23] | 24 | |
---|
[c3b9d639] | 25 | // IS_EXCEPTION(exception_type) |
---|
| 26 | // IS_RESUMPTION_EXCEPTION(exception_type) |
---|
| 27 | // IS_TERMINATION_EXCEPTION(exception_type) |
---|
| 28 | // Create an assertion that exception_type is the given kind of exception. |
---|
| 29 | // This is used to mimic associated types so the vtable type is unmentioned. |
---|
| 30 | #define IS_EXCEPTION(type) is_exception(type, vtable(type)) |
---|
| 31 | #define IS_RESUMPTION_EXCEPTION(type) is_resumption_exception(type, vtable(type)) |
---|
| 32 | #define IS_TERMINATION_EXCEPTION(type) is_termination_exception(type, vtable(type)) |
---|
Note: See
TracBrowser
for help on using the repository browser.