Improved visualization of register usage

This commit is contained in:
Eduard Urbach 2024-08-02 10:46:39 +02:00
parent 778c125d19
commit 548e3475fb
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -19,8 +19,8 @@ func (f *Function) TokenToRegister(t token.Token, register cpu.Register) error {
return errors.New(&errors.UnknownIdentifier{Name: name}, f.File, t.Position) return errors.New(&errors.UnknownIdentifier{Name: name}, f.File, t.Position)
} }
f.RegisterRegister(asm.MOVE, register, variable.Register)
f.UseVariable(variable) f.UseVariable(variable)
f.RegisterRegister(asm.MOVE, register, variable.Register)
return nil return nil
case token.Number, token.Rune: case token.Number, token.Rune: