From 6428c892c04831fda8529973b7031caf60768866 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 13 Mar 2018 13:01:36 +0100 Subject: [PATCH] cmd/compile: use nodl in zeroResults Use nodl instead of nod to avoid setting and resetting lineo. Passes toolstash-check. Updates #19683 Change-Id: I6a47a7ba43a11352767029eced29f08dff8501a2 Reviewed-on: https://go-review.googlesource.com/100335 Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot Reviewed-by: Josh Bleecher Snyder --- src/cmd/compile/internal/gc/walk.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cmd/compile/internal/gc/walk.go b/src/cmd/compile/internal/gc/walk.go index edf0657923..ead578fb33 100644 --- a/src/cmd/compile/internal/gc/walk.go +++ b/src/cmd/compile/internal/gc/walk.go @@ -2669,8 +2669,6 @@ func paramstoheap(params *types.Type) []*Node { // even allocations to move params/results to the heap. // The generated code is added to Curfn's Enter list. func zeroResults() { - lno := lineno - lineno = Curfn.Pos for _, f := range Curfn.Type.Results().Fields().Slice() { if v := asNode(f.Nname); v != nil && v.Name.Param.Heapaddr != nil { // The local which points to the return value is the @@ -2679,9 +2677,8 @@ func zeroResults() { continue } // Zero the stack location containing f. - Curfn.Func.Enter.Append(nod(OAS, nodarg(f, 1), nil)) + Curfn.Func.Enter.Append(nodl(Curfn.Pos, OAS, nodarg(f, 1), nil)) } - lineno = lno } // returnsfromheap returns code to copy values for heap-escaped parameters