memory: clean up all arrays in the V compiler

This commit is contained in:
Alexander Medvednikov 2019-09-09 03:29:24 +03:00
parent 2f9caf49d3
commit 00687de43b
4 changed files with 32 additions and 6 deletions

View file

@ -64,6 +64,15 @@ fn (f mut Fn) mark_var_used(v Var) {
}
}
fn (f mut Fn) mark_var_returned(v Var) {
for i, vv in f.local_vars {
if vv.name == v.name {
f.local_vars[i].is_returned = true
return
}
}
}
fn (f mut Fn) mark_var_changed(v Var) {
for i, vv in f.local_vars {
if vv.name == v.name {