diff options
| author | Kai Gunger <kgunger12@gmail.com> | 2026-06-14 03:24:29 -0400 |
|---|---|---|
| committer | Kai Gunger <kgunger12@gmail.com> | 2026-06-14 03:24:29 -0400 |
| commit | a79a6d8f9be059b2bf2c1fc6548592546322f53d (patch) | |
| tree | db99ee1b932c2e668929c02098fd5c78e0ee6cb6 /tnslc/compile/var.tnsl | |
| parent | 20b9f5a8418670665ff5c5d3f5de538d35ec161b (diff) | |
[tnslc] string literal gen in func scopedevel
Diffstat (limited to 'tnslc/compile/var.tnsl')
| -rw-r--r-- | tnslc/compile/var.tnsl | 25 |
1 files changed, 6 insertions, 19 deletions
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) |