move heapverify CATCH_ERRORS change to build.bqn
This commit is contained in:
parent
74f3b5a012
commit
fd317ddce3
@ -330,7 +330,7 @@ po ← { # parsed options
|
|||||||
args∾↩ ( o3) / ⟨"-O3"⟩
|
args∾↩ ( o3) / ⟨"-O3"⟩
|
||||||
args∾↩ ( debug) / ⟨"-DDEBUG"⟩
|
args∾↩ ( debug) / ⟨"-DDEBUG"⟩
|
||||||
args∾↩ ( rtverify) / ⟨"-DRT_VERIFY"⟩
|
args∾↩ ( rtverify) / ⟨"-DRT_VERIFY"⟩
|
||||||
args∾↩ ( heapverify) / ⟨"-DHEAP_VERIFY"⟩
|
args∾↩ ( heapverify) / ⟨"-DHEAP_VERIFY", "-DCATCH_ERRORS=0"⟩
|
||||||
args∾↩ ( exportSymbols) / ⟨"-DCBQN_EXPORT"⟩
|
args∾↩ ( exportSymbols) / ⟨"-DCBQN_EXPORT"⟩
|
||||||
args∾↩ ( ¬pie) / ⟨"-fno-pie"⟩
|
args∾↩ ( ¬pie) / ⟨"-fno-pie"⟩
|
||||||
args∾↩ (pie ∧ ¬sharedLib) / ⟨"-fPIE"⟩
|
args∾↩ (pie ∧ ¬sharedLib) / ⟨"-fPIE"⟩
|
||||||
|
|||||||
6
src/h.h
6
src/h.h
@ -46,10 +46,6 @@
|
|||||||
#if CATCH_ERRORS
|
#if CATCH_ERRORS
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#endif
|
#endif
|
||||||
#if HEAP_VERIFY
|
|
||||||
#undef CATCH_ERRORS
|
|
||||||
#define CATCH_ERRORS 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define RT_LEN 64
|
#define RT_LEN 64
|
||||||
|
|
||||||
@ -398,7 +394,7 @@ NOINLINE NORETURN void thrM(char* s);
|
|||||||
NOINLINE NORETURN void thrF(char* s, ...);
|
NOINLINE NORETURN void thrF(char* s, ...);
|
||||||
NOINLINE NORETURN void thrOOM(void);
|
NOINLINE NORETURN void thrOOM(void);
|
||||||
#if CATCH_ERRORS
|
#if CATCH_ERRORS
|
||||||
jmp_buf* prepareCatch(void);
|
jmp_buf* prepareCatch(void);
|
||||||
#define CATCH setjmp(*prepareCatch()) // use as `if (CATCH) { /*handle error*/ freeThrown(); return; } /*potentially erroring thing*/ popCatch(); /*no errors yay*/`
|
#define CATCH setjmp(*prepareCatch()) // use as `if (CATCH) { /*handle error*/ freeThrown(); return; } /*potentially erroring thing*/ popCatch(); /*no errors yay*/`
|
||||||
void popCatch(void); // note: popCatch() must always be called if no error is thrown, so no returns before it!
|
void popCatch(void); // note: popCatch() must always be called if no error is thrown, so no returns before it!
|
||||||
#else
|
#else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user