diff options
| author | CircleShift <kgunger12@gmail.com> | 2025-12-07 02:08:21 -0500 |
|---|---|---|
| committer | CircleShift <kgunger12@gmail.com> | 2025-12-07 02:08:21 -0500 |
| commit | 17620a6aae801ff22e8eb6a95b30f6e830742542 (patch) | |
| tree | ccd95517a42181bff5e462298e4a59925d83233e /tnslc/compile/var.tnsl | |
| parent | 062aefd6aa7cda6a30ae557f4813a2a967b49596 (diff) | |
in progress reg gen
Diffstat (limited to 'tnslc/compile/var.tnsl')
| -rw-r--r-- | tnslc/compile/var.tnsl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tnslc/compile/var.tnsl b/tnslc/compile/var.tnsl index df62d66..34c101a 100644 --- a/tnslc/compile/var.tnsl +++ b/tnslc/compile/var.tnsl @@ -108,6 +108,8 @@ struct Var { /; init (~parse.Node tn, id) self.name = utils.strcpy(id`.data) self.ptrc.init(4) + self.loc = 0 + self._tn = tn self._id = id ;/ @@ -148,6 +150,23 @@ struct Var { self.ptrc.push(~ptr) ;/ + /; is_reg_passed [bool] + /; if (self.ptrc.count > 0) + return true + ;/ + return false + ;/ + + /; actual_size [uint] + /; if (self.ptrc.count > 0) + return 8 + ;; else if (self._type == NULL) + return 0 + ;/ + + return self._type`.size + ;/ + # Sets up both the ptrc and the _type members, requires # parent module for resolution of types /; _resolve_type (~Module parent) |