Improved variable lifetime comments
This commit is contained in:
parent
724794b4aa
commit
fa373e7dc2
@ -63,10 +63,6 @@ func (f *Function) useVariable(variable *Variable) {
|
||||
continue
|
||||
}
|
||||
|
||||
if config.Comments {
|
||||
f.Comment("%s (%s) used in scope %d", local.Name, local.Register, i)
|
||||
}
|
||||
|
||||
local.Alive--
|
||||
|
||||
if local.Alive < 0 {
|
||||
@ -79,6 +75,8 @@ func (f *Function) useVariable(variable *Variable) {
|
||||
}
|
||||
|
||||
scope.Free(local.Register)
|
||||
} else if config.Comments {
|
||||
f.Comment("%s (%s) used in scope %d", local.Name, local.Register, i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user