fast error on CATCH_ERRORS+HEAP_VERIFY, allow unicode paths

This commit is contained in:
dzaima 2021-05-15 14:51:46 +03:00
parent a1d5d87f8b
commit 915b84f028
3 changed files with 4 additions and 7 deletions

View File

@ -16,6 +16,9 @@
#define EACH_FILLS false #define EACH_FILLS false
#define PROPER_FILLS false #define PROPER_FILLS false
#endif #endif
#if defined(CATCH_ERRORS) && defined(HEAP_VERIFY)
#error CATCH_ERRORS and HEAP_VERIFY cannot both be enabled
#endif
#define i8 int8_t #define i8 int8_t
#define u8 uint8_t #define u8 uint8_t

View File

@ -50,13 +50,7 @@ void heap_getReferents(Value* v) {
if (ti[v->type].isArr && prnk(v)>1) heapVerify_visitP(shObjP(v)); if (ti[v->type].isArr && prnk(v)>1) heapVerify_visitP(shObjP(v));
ti[v->type].visit(v); ti[v->type].visit(v);
} }
#ifdef CATCH_ERRORS
bool heapVerify_msg;
#endif
void heapVerify() { void heapVerify() {
#ifdef CATCH_ERRORS
if(!heapVerify_msg) { printf("note: heapVerify() will give garbage in combination with CATCH_ERRORS\n"); heapVerify_msg=true; }
#endif
heap_observed = 0; heap_observed = 0;
heapVerify_mode=0; mm_forHeap(heapVerify_callVisit); gc_visitRoots(); heapVerify_mode=0; mm_forHeap(heapVerify_callVisit); gc_visitRoots();
mm_forHeap(heapVerify_checkFn); mm_forHeap(heapVerify_checkFn);

View File

@ -125,7 +125,7 @@ int main(int argc, char* argv[]) {
} }
popCatch(); popCatch();
} else { } else {
bqn_execFile(m_str8(strlen(argv[1]), argv[1])); bqn_execFile(fromUTF8l(argv[1]));
} }
rtPerf_print(); rtPerf_print();
CTR_FOR(CTR_PRINT) CTR_FOR(CTR_PRINT)