mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: add Nodes.Set1 method and use it where possible
Passes toolstash -cmp. Change-Id: I05322fb5afd213f13fb247ec1a5f655c17a58774 Reviewed-on: https://go-review.googlesource.com/20522 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
72655afb4e
commit
c63dbd87c1
15 changed files with 63 additions and 54 deletions
|
|
@ -2002,7 +2002,7 @@ func genwrapper(rcvr *Type, method *Type, newnam *Sym, iface int) {
|
|||
l = append(l, nodlit(v)) // method name
|
||||
call := Nod(OCALL, syslook("panicwrap"), nil)
|
||||
call.List.Set(l)
|
||||
n.Nbody.Set([]*Node{call})
|
||||
n.Nbody.Set1(call)
|
||||
fn.Nbody.Append(n)
|
||||
}
|
||||
|
||||
|
|
@ -2029,7 +2029,7 @@ func genwrapper(rcvr *Type, method *Type, newnam *Sym, iface int) {
|
|||
call.Isddd = isddd
|
||||
if method.Type.Outtuple > 0 {
|
||||
n := Nod(ORETURN, nil, nil)
|
||||
n.List.Set([]*Node{call})
|
||||
n.List.Set1(call)
|
||||
call = n
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue