Implemented Value interface
This commit is contained in:
@ -19,12 +19,12 @@ func (f *Machine) SaveRegister(register cpu.Register) {
|
||||
|
||||
variable := f.VariableByRegister(register)
|
||||
|
||||
if variable == nil || variable.Alive == 0 {
|
||||
if variable == nil || variable.Value.Alive == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
newRegister := f.NewRegister()
|
||||
f.RegisterRegister(asm.MOVE, newRegister, register)
|
||||
variable.Register = newRegister
|
||||
variable.Value.Register = newRegister
|
||||
f.FreeRegister(register)
|
||||
}
|
||||
|
Reference in New Issue
Block a user