cmd/internal/gc: unembed Node.Func
This is a follow-up to CL 7360.
It was generated with eg and gofmt -r.
The only manual changes are the unembedding in syntax.go
and backporting changes from y.go to go.y.
Passes toolstash -cmp.
Change-Id: I3d6d06ecb659809a4bc8592395d5b9a18967218e
Reviewed-on: https://go-review.googlesource.com/8053
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
diff --git a/src/cmd/internal/gc/subr.go b/src/cmd/internal/gc/subr.go
index 17ee1d3..5508e07 100644
--- a/src/cmd/internal/gc/subr.go
+++ b/src/cmd/internal/gc/subr.go
@@ -1582,7 +1582,7 @@
l = externdcl
} else if Curfn != nil {
fmt.Printf("--- %v frame ---\n", Sconv(Curfn.Nname.Sym, 0))
- l = Curfn.Dcl
+ l = Curfn.Func.Dcl
} else {
return
}
@@ -2432,7 +2432,7 @@
n.Left = newname(methodsym(method.Sym, methodrcvr, 0))
fn.Nbody = list(fn.Nbody, n)
} else {
- fn.Wrapper = true // ignore frame for panic+recover matching
+ fn.Func.Wrapper = true // ignore frame for panic+recover matching
call := Nod(OCALL, dot, nil)
call.List = args
call.Isddd = isddd
@@ -2454,7 +2454,7 @@
// wrappers where T is anonymous (struct or interface) can be duplicated.
if rcvr.Etype == TSTRUCT || rcvr.Etype == TINTER || Isptr[rcvr.Etype] && rcvr.Type.Etype == TSTRUCT {
- fn.Dupok = true
+ fn.Func.Dupok = true
}
typecheck(&fn, Etop)
typechecklist(fn.Nbody, Etop)
@@ -2709,7 +2709,7 @@
funcbody(fn)
Curfn = fn
- fn.Dupok = true
+ fn.Func.Dupok = true
typecheck(&fn, Etop)
typechecklist(fn.Nbody, Etop)
Curfn = nil
@@ -2924,7 +2924,7 @@
funcbody(fn)
Curfn = fn
- fn.Dupok = true
+ fn.Func.Dupok = true
typecheck(&fn, Etop)
typechecklist(fn.Nbody, Etop)
Curfn = nil