diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2023-08-09 08:39:47 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-08-11 18:12:07 +0000 |
| commit | e7e5913161e94f77f29443e8b8ddd22714a0f01d (patch) | |
| tree | d31538891e0709be705d6b12c8e67244af3c1374 /src/cmd/compile/internal/reflectdata/alg.go | |
| parent | 59037ac93a49889eb6a7d6b3b8fbc70321615f1f (diff) | |
| download | go-e7e5913161e94f77f29443e8b8ddd22714a0f01d.tar.xz | |
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>
Diffstat (limited to 'src/cmd/compile/internal/reflectdata/alg.go')
| -rw-r--r-- | src/cmd/compile/internal/reflectdata/alg.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/reflectdata/alg.go b/src/cmd/compile/internal/reflectdata/alg.go index 69de685ca0..4489f59c26 100644 --- a/src/cmd/compile/internal/reflectdata/alg.go +++ b/src/cmd/compile/internal/reflectdata/alg.go @@ -242,7 +242,7 @@ func hashFunc(t *types.Type) *ir.Func { }) fn.SetNilCheckDisabled(true) - typecheck.Target.Decls = append(typecheck.Target.Decls, fn) + typecheck.Target.Funcs = append(typecheck.Target.Funcs, fn) return fn } @@ -630,7 +630,7 @@ func eqFunc(t *types.Type) *ir.Func { // neither of which can be nil, and our comparisons // are shallow. fn.SetNilCheckDisabled(true) - typecheck.Target.Decls = append(typecheck.Target.Decls, fn) + typecheck.Target.Funcs = append(typecheck.Target.Funcs, fn) return fn } |
