make heapverify

This commit is contained in:
dzaima 2021-05-23 22:28:59 +03:00
parent 17fa05d23a
commit 8e38de7f5c
5 changed files with 13 additions and 6 deletions

View File

@ -3,8 +3,8 @@ build/run:
1. `./genRuntime path/to/mlochbaum/BQN`
2. Optionally choose what to build by changing `src/h.h`
3. `make`
- Options are: `make o3`, `make debug`, `make rtperf`
- Do `make clean` or `make [o3|debug|rtperf]-clean` before to force recompile
- Options: `make o3`, `make debug` (`make rtperf` and `make heapverify` may also be useful)
- Do `make clean` or `make [o3|debug]-clean` before to force recompile
- `./build` and `./debugBuild` compile everything at once and allow specifying extra compiler arguments, but may be slower
4. `./BQN` (or `rlwrap ./BQN` for a fancier interface)

View File

@ -7,6 +7,8 @@ debug:
@$(MAKE) -C obj/debug debug
rtperf:
@$(MAKE) $(J) -C obj/rtperf rtperf
heapverify:
@$(MAKE) $(J) -C obj/heapverify heapverify
o3-clean:
@$(MAKE) -C obj/o3 clean
@ -14,5 +16,7 @@ debug-clean:
@$(MAKE) -C obj/debug clean
rtperf-clean:
@$(MAKE) -C obj/rtperf clean
heapverify-clean:
@$(MAKE) -C obj/heapverify clean
clean: o3-clean debug-clean rtperf-clean
clean: o3-clean debug-clean rtperf-clean heapverify-clean

1
obj/heapverify/makefile Symbolic link
View File

@ -0,0 +1 @@
/home/dzaima/CLionProjects/bqn/obj/subMakefile

View File

@ -11,6 +11,8 @@ debug: FLAGS=-g -DDEBUG
debug: gen
rtperf: FLAGS=-O3 -DRT_PERF
rtperf: gen
heapverify: FLAGS=-DDEBUG -g -DHEAP_VERIFY
heapverify: gen
gen: builtins core base utils
@$(CC) -o BQN *.o -lm

View File

@ -37,6 +37,9 @@
#include <stddef.h>
#include <stdarg.h>
#include <setjmp.h>
#ifdef HEAP_VERIFY
#undef CATCH_ERRORS
#endif
#define rtLen 63
#ifdef CATCH_ERRORS
@ -46,9 +49,6 @@
#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