26 #ifndef MICROPY_INCLUDED_PY_NLR_H 27 #define MICROPY_INCLUDED_PY_NLR_H 43 #if !defined(MICROPY_NLR_SETJMP) || !MICROPY_NLR_SETJMP 46 #elif defined(__x86_64__) 47 #if defined(__CYGWIN__) 52 #elif defined(__thumb2__) || defined(__thumb__) || defined(__arm__) 54 #elif defined(__xtensa__) 57 #define MICROPY_NLR_SETJMP (1) 62 #if MICROPY_NLR_SETJMP 67 #if MICROPY_NLR_SETJMP 73 #define nlr_push(buf) ((buf)->prev = MP_STATE_THREAD(nlr_top), MP_STATE_THREAD(nlr_top) = (buf), setjmp((buf)->jmpbuf)) 74 #define nlr_pop() { MP_STATE_THREAD(nlr_top) = MP_STATE_THREAD(nlr_top)->prev; } 75 #define nlr_jump(val) nlr_setjmp_jump(val) 88 #ifndef MICROPY_DEBUG_NLR 89 #define nlr_raise(val) nlr_jump(MP_OBJ_TO_PTR(val)) 92 #define nlr_raise(val) \ 96 void *_val = MP_OBJ_TO_PTR(val); \ 97 assert(_val != NULL); \ 98 assert(mp_obj_is_exception_instance(val)); \ 102 #if !MICROPY_NLR_SETJMP 103 #define nlr_push(val) \ 104 assert(MP_STATE_THREAD(nlr_top) != val),nlr_push(val) 115 #endif // MICROPY_INCLUDED_PY_NLR_H NORETURN void nlr_setjmp_jump(void *val)
LIBA_BEGIN_DECLS typedef int jmp_buf[31]
NORETURN void nlr_jump_fail(void *val)