Simplified type system

This commit is contained in:
2025-02-04 23:58:01 +01:00
parent bde68d4d64
commit 8421a21c9a
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) {