From: Martin Möhrmann Date: Sun, 21 Jan 2018 09:25:07 +0000 (+0100) Subject: cmd/compile: replace misleading variable name X-Git-Tag: go1.11beta1~1565 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=284a4a734662b3c1a93f993ef55c8c2f42513c06;p=gostls13.git 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 Reviewed-by: Daniel Martí Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/compile/internal/gc/order.go b/src/cmd/compile/internal/gc/order.go index b0115fe733..01da56ce28 100644 --- a/src/cmd/compile/internal/gc/order.go +++ b/src/cmd/compile/internal/gc/order.go @@ -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)