From 3e5c11563f8cb7c843c71a0f761e5b644f39db46 Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 13 Jun 2023 10:55:35 +0200 Subject: lower allocas in isel() instead of emit() and misc fixes --- common.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common.h') diff --git a/common.h b/common.h index 45d50d5..3628c89 100644 --- a/common.h +++ b/common.h @@ -314,6 +314,10 @@ struct arena { #define vec_of(T) struct { T *p; int _cap; uint n; } +extern void *xcalloc(size_t n, const char *); +extern void *xrealloc(void *, size_t n, const char *); +#define xcalloc(n) xcalloc(n, __func__) +#define xrealloc(p,n) xrealloc(p, n, __func__) struct arena *newarena(uint chunksiz); void *alloc(struct arena **, uint siz, uint align); static inline void * -- cgit v1.2.3