8 #define ELEMENTS(a) (sizeof(a)/sizeof((a)[0]))
11 #define vm_assert(cond) { \
12 if(vm_sanitychecklevel > 0 && !(cond)) { \
13 printf("VM:%s:%d: assert failed: %s\n", \
14 __FILE__, __LINE__, #cond); \
15 panic("VM", "assert failed", NO_NUM); \
19 #define vm_assert(cond) ;
22 #define vm_panic(str, n) { char _pline[100]; \
23 sprintf(_pline, "%s:%d: %s", __FILE__, __LINE__, (str)); \
24 panic("VM", _pline, (n)); \