Commit 6428c892 authored by Tobias Klauser's avatar Tobias Klauser Committed by Josh Bleecher Snyder

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 <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
parent b00f72e0
......@@ -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
......
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