diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-12-16 11:48:12 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-12-16 11:48:12 +0000 |
| commit | 401a9f0cc7b5792d11e4c9b889578ff0f110d65e (patch) | |
| tree | 4ff2569ec2ee322ce1e575c5917419c44051b3a1 /runtime/src/exceptions.c | |
| parent | faa7e7649e25e6f25f56be3bec5cd5ffd741e511 (diff) | |
Move exceptions code to patio directory
Diffstat (limited to 'runtime/src/exceptions.c')
| -rw-r--r-- | runtime/src/exceptions.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/runtime/src/exceptions.c b/runtime/src/exceptions.c deleted file mode 100644 index deaaa25b..00000000 --- a/runtime/src/exceptions.c +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __WASM__ - -#include <setjmp.h> -#include <stdint.h> -#include <stdlib.h> - -uint32_t patio__runtime__exceptions_exception_value; -jmp_buf* patio__runtime__exceptions_exception_handler = 0; - -void patio__runtime__exceptions_throw(uint32_t exception_tag, uint64_t value) { - if (patio__runtime__exceptions_exception_handler == 0) { - exit(1); - } - patio__runtime__exceptions_exception_value = value; - _longjmp(*patio__runtime__exceptions_exception_handler, exception_tag); -} - -void patio__runtime__exceptions_rethrow(uint32_t exception_tag) { - if (patio__runtime__exceptions_exception_handler == 0) { - exit(1); - } - _longjmp(*patio__runtime__exceptions_exception_handler, exception_tag); -} - -#endif |
