Improved code generation

This commit is contained in:
Eduard Urbach 2024-07-09 12:43:29 +02:00
parent 82f040f7d1
commit 6e22febc01
Signed by: eduard
GPG key ID: 49226B848C78F6C8
4 changed files with 12 additions and 7 deletions

View file

@ -10,6 +10,10 @@ import (
// SaveRegister attempts to move a variable occupying this register to another register.
func (f *Function) SaveRegister(register cpu.Register) {
if !f.cpu.IsUsed(register) {
return
}
var variable *Variable
for _, v := range f.variables {