mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: add convnop helper function
Like the conv helper function but for creating OCONVNOP nodes instead of OCONV nodes. passes toolstash -cmp Change-Id: Ib93ffe66590ebaa2b4fa552c81f1a2902e789d8e Reviewed-on: https://go-review.googlesource.com/112597 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
9e2a04d5eb
commit
c5d38b896d
5 changed files with 21 additions and 27 deletions
|
|
@ -1674,8 +1674,7 @@ func genwrapper(rcvr *types.Type, method *types.Field, newnam *types.Sym) {
|
|||
if !dotlist[0].field.Type.IsPtr() {
|
||||
dot = nod(OADDR, dot, nil)
|
||||
}
|
||||
as := nod(OAS, nthis, nod(OCONVNOP, dot, nil))
|
||||
as.Right.Type = rcvr
|
||||
as := nod(OAS, nthis, convnop(dot, rcvr))
|
||||
fn.Nbody.Append(as)
|
||||
fn.Nbody.Append(nodSym(ORETJMP, nil, methodSym(methodrcvr, method.Sym)))
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue