Commit 284a4a73 authored by Martin Möhrmann's avatar Martin Möhrmann

cmd/compile: replace misleading variable name

One of the variables declared in cleantempnopop named 'kill'
does not hold a OVARKILL node but an OVARLIVE node.
Rename that variable to 'live' to differentiate it from the other
variable named kill that holds a OVARKILL node.

Passes toolstash -cmp.

Change-Id: I34c8729e5c303b8cdabe44c9af980d4f16000e4b
Reviewed-on: https://go-review.googlesource.com/88816
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
Reviewed-by: 's avatarDaniel Martí <mvdan@mvdan.cc>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent f4bb25c9
......@@ -231,18 +231,18 @@ func poptemp(mark ordermarker, order *Order) {
order.temp = order.temp[:mark]
}
// Cleantempnopop emits to *out VARKILL instructions for each temporary
// above the mark on the temporary stack, but it does not pop them
// from the stack.
// Cleantempnopop emits VARKILL and if needed VARLIVE instructions
// to *out for each temporary above the mark on the temporary stack.
// It does not pop the temporaries from the stack.
func cleantempnopop(mark ordermarker, order *Order, out *[]*Node) {
for i := len(order.temp) - 1; i >= int(mark); i-- {
n := order.temp[i]
if n.Name.Keepalive() {
n.Name.SetKeepalive(false)
n.SetAddrtaken(true) // ensure SSA keeps the n variable
kill := nod(OVARLIVE, n, nil)
kill = typecheck(kill, Etop)
*out = append(*out, kill)
live := nod(OVARLIVE, n, nil)
live = typecheck(live, Etop)
*out = append(*out, live)
}
kill := nod(OVARKILL, n, nil)
kill = typecheck(kill, Etop)
......
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