From 915b84f0286dd1944a5997db664d8b9834dda877 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sat, 15 May 2021 14:51:46 +0300 Subject: [PATCH] fast error on CATCH_ERRORS+HEAP_VERIFY, allow unicode paths --- src/h.h | 3 +++ src/heap.c | 6 ------ src/main.c | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/h.h b/src/h.h index b5ddd381..6d37f4f2 100644 --- a/src/h.h +++ b/src/h.h @@ -16,6 +16,9 @@ #define EACH_FILLS false #define PROPER_FILLS false #endif +#if defined(CATCH_ERRORS) && defined(HEAP_VERIFY) + #error CATCH_ERRORS and HEAP_VERIFY cannot both be enabled +#endif #define i8 int8_t #define u8 uint8_t diff --git a/src/heap.c b/src/heap.c index f1e7ff26..4c4aca81 100644 --- a/src/heap.c +++ b/src/heap.c @@ -50,13 +50,7 @@ void heap_getReferents(Value* v) { if (ti[v->type].isArr && prnk(v)>1) heapVerify_visitP(shObjP(v)); ti[v->type].visit(v); } -#ifdef CATCH_ERRORS -bool heapVerify_msg; -#endif 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; heapVerify_mode=0; mm_forHeap(heapVerify_callVisit); gc_visitRoots(); mm_forHeap(heapVerify_checkFn); diff --git a/src/main.c b/src/main.c index 1a0d39e0..78107691 100644 --- a/src/main.c +++ b/src/main.c @@ -125,7 +125,7 @@ int main(int argc, char* argv[]) { } popCatch(); } else { - bqn_execFile(m_str8(strlen(argv[1]), argv[1])); + bqn_execFile(fromUTF8l(argv[1])); } rtPerf_print(); CTR_FOR(CTR_PRINT)