Deal with errors generated when RELEASE build made
This commit is contained in:
2
Makefile
2
Makefile
@@ -13,7 +13,7 @@ DEPFLAGS=-MT $@ -MMD -MP -MF
|
|||||||
ifeq ($(RELEASE), 1)
|
ifeq ($(RELEASE), 1)
|
||||||
CFLAGS=$(GFLAGS) $(RFLAGS) -DDEBUG=0
|
CFLAGS=$(GFLAGS) $(RFLAGS) -DDEBUG=0
|
||||||
else
|
else
|
||||||
CFLAGS=$(GFLAGS) $(DFLAGS)
|
CFLAGS=$(GFLAGS) $(DFLAGS) -DDEBUG=2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DIST=build
|
DIST=build
|
||||||
|
|||||||
4
base.h
4
base.h
@@ -45,7 +45,7 @@ static_assert(sizeof(f64) == sizeof(u64));
|
|||||||
#define TODO(MSG) (assert(false && MSG));
|
#define TODO(MSG) (assert(false && MSG));
|
||||||
|
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
#define DEBUG 2
|
#define DEBUG 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline void debug(char *fmt, ...)
|
static inline void debug(char *fmt, ...)
|
||||||
@@ -55,6 +55,8 @@ static inline void debug(char *fmt, ...)
|
|||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
vprintf(fmt, ap);
|
vprintf(fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
#else
|
||||||
|
(void)fmt;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,5 +88,7 @@ void context_report(context_t *context)
|
|||||||
info("<Context>: %luB/%luB main memory used\n", mem_used, mem_cap);
|
info("<Context>: %luB/%luB main memory used\n", mem_used, mem_cap);
|
||||||
info("<Context>: %luB/%luB read space used\n", read_used, read_cap);
|
info("<Context>: %luB/%luB read space used\n", read_used, read_cap);
|
||||||
info("<Context>: %luB/%luB scratch space used\n", scr_used, scr_cap);
|
info("<Context>: %luB/%luB scratch space used\n", scr_used, scr_cap);
|
||||||
|
#else
|
||||||
|
(void)context;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
5
main.c
5
main.c
@@ -88,10 +88,9 @@ int main(int argc, char *argv[])
|
|||||||
u64 size = results.size / sizeof(*lisps);
|
u64 size = results.size / sizeof(*lisps);
|
||||||
for (u64 i = 0; i < size; ++i)
|
for (u64 i = 0; i < size; ++i)
|
||||||
{
|
{
|
||||||
lisp_t *lisp = lisps[i];
|
lisp_t *lisp = lisps[i];
|
||||||
// printf("tag=%x\n", tag_get(lisp));
|
|
||||||
sv_t serialised = serialise(&ctx, lisp);
|
sv_t serialised = serialise(&ctx, lisp);
|
||||||
info("lisp[%lu]: %p => " PR_SV "\n", i, lisp, SV_FMT(serialised));
|
debug("lisp[%lu]: %p => " PR_SV "\n", i, lisp, SV_FMT(serialised));
|
||||||
}
|
}
|
||||||
context_report(&ctx);
|
context_report(&ctx);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user