From 38723762d5e3c61dab16d6e40bc905b53e21baca Mon Sep 17 00:00:00 2001 From: Kai Gunger Date: Mon, 8 Dec 2025 21:59:55 -0500 Subject: fix memory issues with type resolution --- tnslc/compile/codegen.tnsl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tnslc/compile/codegen.tnsl') diff --git a/tnslc/compile/codegen.tnsl b/tnslc/compile/codegen.tnsl index ef668c7..2dfe9d5 100644 --- a/tnslc/compile/codegen.tnsl +++ b/tnslc/compile/codegen.tnsl @@ -18,10 +18,10 @@ # Transform into a module tree Module mod mod.init(~ast, ~buffer) + _gen_prims(~mod) mod.update_children() # Compile code - _gen_prims(~mod) mod.compile(~buffer) mod.print() @@ -39,13 +39,12 @@ /; _gen_prim(~Module m, int size, ~uint8 id) ~Module mds = m`._create_methods(id) - mds`.parent = m Var t Struct s s.size = size - s.methods = mds + s.methods = NULL s.members.init(len t) s.name = utils.strcpy(id) s._up = NULL -- cgit v1.2.3