#ifndef _PF_PRIMITIVE_ #define _PF_PRIMITIVE_ /* Nesting primitives in C only works if they do not exit to the interpreter loop using longjmp. Use these with care! */ //#define CALL_PRIMITIVE(word) word (vm) //#define TRY(p) if (e = CALL_PRIMITIVE(p)) goto error //#define TAIL(p) return CALL_PRIMITIVE(p) //#define TRY_THROW(p) {pf_error_t e = CALL_PRIMITIVE(p); if (e) return e; } #define CALL(prim) {prim(vm);} #define TAIL(prim) {CALL(prim); EXIT;} #endif // _PF_PRIMITIVE_