Simplified type system

This commit is contained in:
Eduard Urbach 2025-02-04 23:58:01 +01:00
parent 71d7cdf5b2
commit bd0a468282
Signed by: eduard
GPG key ID: 49226B848C78F6C8
16 changed files with 70 additions and 55 deletions

View file

@ -11,7 +11,7 @@ func (f *Function) CompileNew(root *expression.Expression) error {
structName := parameters[0].Token.Text(f.File.Bytes)
typ := f.Types[structName]
f.SaveRegister(f.CPU.Input[0])
f.RegisterNumber(asm.MOVE, f.CPU.Input[0], int(typ.TotalSize()))
f.RegisterNumber(asm.MOVE, f.CPU.Input[0], typ.Size())
for _, register := range f.CPU.General {
if f.RegisterIsUsed(register) {