mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: cleanup ir.Package
Decls used to contain initializer statement for package-level variables, but now it only contains ir.Funcs. So we might as well rename it to Funcs and tighten its type to []*ir.Func. Similarly, Externs always contains *ir.Names, so its type can be constrained too. Change-Id: I85b833e2f83d9d3559ab0ef8ab5d8324f4bc37b6 Reviewed-on: https://go-review.googlesource.com/c/go/+/517855 Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
59037ac93a
commit
e7e5913161
16 changed files with 117 additions and 144 deletions
|
|
@ -462,7 +462,7 @@ func UseClosure(clo *ClosureExpr, pkg *Package) Node {
|
|||
}
|
||||
|
||||
if pkg != nil {
|
||||
pkg.Decls = append(pkg.Decls, fn)
|
||||
pkg.Funcs = append(pkg.Funcs, fn)
|
||||
}
|
||||
|
||||
if false && IsTrivialClosure(clo) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue