From a79a6d8f9be059b2bf2c1fc6548592546322f53d Mon Sep 17 00:00:00 2001 From: Kai Gunger Date: Sun, 14 Jun 2026 03:24:29 -0400 Subject: [tnslc] string literal gen in func scope --- tnslc/compile/var.tnsl | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'tnslc/compile/var.tnsl') diff --git a/tnslc/compile/var.tnsl b/tnslc/compile/var.tnsl index 3ec7e8d..a840437 100644 --- a/tnslc/compile/var.tnsl +++ b/tnslc/compile/var.tnsl @@ -276,6 +276,7 @@ struct Var { return 0 ;/ + idx++ int count = self.ptrc.count - idx ~int32 out = self.ptrc.get(count) return out` @@ -1170,24 +1171,6 @@ struct Var { ~uint8 out = self._set_prim_l(buf) - /; if (self.in_mem() == true) - utils.Vector vout - uint ts = self.type_size() - /; if (ts == 1) - vout.from_cstr("byte \0") - ;; else if (ts == 2) - vout.from_cstr("word \0") - ;; else if (ts == 4) - vout.from_cstr("dword \0") - ;; else if (ts == 8) - vout.from_cstr("qword \0") - ;/ - vout.push_cstr(out) - - _delete(out) - out = vout.as_cstr() - ;/ - # Sign extend if required bool ext = false uint R = self.type_size() @@ -1746,7 +1729,8 @@ struct Var { self.offset++ return ;/ - + + self._print(0) /; if (self.first_non_ref() < 0) int idx = self.first_non_ref_idx() Var vv @@ -1927,6 +1911,9 @@ struct Var { istr = self.ptrc.get(i) _print_num("%d \0", istr`) ;/ + /; if (self.ptrc.count < 1) + _printf("(nil)\0") + ;/ _printf("\n\0") _indent(idt + 1) -- cgit v1.2.3