Commit d11a2184 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/compile: allow earlier GC of freed constant value

Minor fix, because it's the right thing to do.
No significant impact.

Change-Id: I2138285d397494daa9a88c414149c2a7860edd7e
Reviewed-on: https://go-review.googlesource.com/38001
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 678f35b6
......@@ -140,6 +140,7 @@ func (f *Func) freeValue(v *Value) {
for i, cv := range vv {
if v == cv {
vv[i] = vv[len(vv)-1]
vv[len(vv)-1] = nil
f.constants[v.AuxInt] = vv[0 : len(vv)-1]
break
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment