1 #ifndef RB_WASM_SUPPORT_SETJMP_H
2 #define RB_WASM_SUPPORT_SETJMP_H
4 #include "ruby/internal/config.h"
7 #ifndef WASM_SETJMP_STACK_BUFFER_SIZE
8 # define WASM_SETJMP_STACK_BUFFER_SIZE 6144
14 char buffer[WASM_SETJMP_STACK_BUFFER_SIZE];
36 #define rb_wasm_setjmp(env) ((env).state = 0, _rb_wasm_setjmp(&(env)))
45 #define rb_wasm_longjmp(env, payload) (_rb_wasm_longjmp(&env, payload), __builtin_unreachable())
49 void *rb_wasm_handle_jmp_unwind(
void);
58 #define setjmp(env) rb_wasm_setjmp(env)
59 #define longjmp(env, payload) rb_wasm_longjmp(env, payload)
62 typedef void (*rb_wasm_try_catch_func_t)(
void *ctx);
65 rb_wasm_try_catch_func_t try_f;
66 rb_wasm_try_catch_func_t catch_f;
77 rb_wasm_try_catch_func_t try_f,
78 rb_wasm_try_catch_func_t catch_f,