mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/gc: remove a bunch of uses of typenod
Passes toolstash-check -all. Change-Id: Ic9eb0c52bedac185ab86cc62207f199d93700344 Reviewed-on: https://go-review.googlesource.com/39795 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
25fc842f17
commit
2e1b42a814
4 changed files with 22 additions and 20 deletions
|
|
@ -395,7 +395,7 @@ func transformclosure(xfunc *Node) {
|
|||
// Declare variable holding addresses taken from closure
|
||||
// and initialize in entry prologue.
|
||||
addr := newname(lookup("&" + v.Sym.Name))
|
||||
addr.Name.Param.Ntype = nod(OIND, typenod(v.Type), nil)
|
||||
addr.Type = typPtr(v.Type)
|
||||
addr.Class = PAUTO
|
||||
addr.SetUsed(true)
|
||||
addr.Name.Curfn = xfunc
|
||||
|
|
@ -626,10 +626,10 @@ func makepartialcall(fn *Node, t0 *Type, meth *Sym) *Node {
|
|||
xfunc.Func.Dcl = append(xfunc.Func.Dcl, ptr)
|
||||
var body []*Node
|
||||
if rcvrtype.IsPtr() || rcvrtype.IsInterface() {
|
||||
ptr.Name.Param.Ntype = typenod(rcvrtype)
|
||||
ptr.Type = rcvrtype
|
||||
body = append(body, nod(OAS, ptr, cv))
|
||||
} else {
|
||||
ptr.Name.Param.Ntype = typenod(typPtr(rcvrtype))
|
||||
ptr.Type = typPtr(rcvrtype)
|
||||
body = append(body, nod(OAS, ptr, nod(OADDR, cv, nil)))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue