From c129f77ad724aa940b53a125de0e1e4de0ca7240 Mon Sep 17 00:00:00 2001 From: lemon Date: Sun, 14 Aug 2022 09:25:16 +0200 Subject: fix arena --- bootstrap/cgen.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bootstrap/cgen.c') diff --git a/bootstrap/cgen.c b/bootstrap/cgen.c index 5a1180d..5c64a30 100644 --- a/bootstrap/cgen.c +++ b/bootstrap/cgen.c @@ -306,6 +306,7 @@ genexpr(struct expr *ex) { } } +static void gendecl(struct decl *decl, bool toplevel); static void genfn(bool externp, const char *cname, struct fn *fn); static void genstatic(bool externp, const char *cname, struct var *var); @@ -350,6 +351,7 @@ genstmt(struct stmt *stmt) { genstatic(1, decl.name, &decl.var); break; case Ddef: case Dtype: case Dmacro: case Dtepl: case Dlabel: + gendecl(&stmt->decl, 0); break; } break; @@ -579,6 +581,8 @@ liftdecl(struct decl *decl) { liftnestedex(decl->var.ini); break; case Dtype: + lifttype(decl->ty); + break; case Dtepl: for (struct teplcache *cache = decl->tepl.cache; cache; cache = cache->next) { for (int i = 0; i < cache->args.n; ++i) { -- cgit v1.2.3