mirror of
https://github.com/golang/go
synced 2024-11-23 21:40:05 -07:00
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: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
f4bb25c937
commit
284a4a7346
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user