]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: set ir.Name.Func in more cases
authorAustin Clements <austin@google.com>
Sat, 27 Mar 2021 14:14:30 +0000 (10:14 -0400)
committerAustin Clements <austin@google.com>
Mon, 29 Mar 2021 18:46:28 +0000 (18:46 +0000)
commit0d1423583b9106d398740862bca4ad5661fd67ad
treee69d8ea616d5bd80656edb7c308066039d8376b6
parent33b4ffc3573eb81854591d39f1029dabacbdec72
cmd/compile: set ir.Name.Func in more cases

ir.Name.Func is non-nil for *almost* all function names. This CL fixes
a few more major cases that leave it nil, though there are still a few
cases left: interface method values, and algorithms generated by
eqFor, hashfor, and hashmem.

We'll need this for mapping from ir.Names to function ABIs shortly.
The remaining cases would be nice to fix, but they're all guaranteed
to be ABIInternal, so we can at least work around them.

For #40724.

Change-Id: Ifcfa781c78899ccea0bf155d80f8cfc27f30351e
Reviewed-on: https://go-review.googlesource.com/c/go/+/305271
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/ir/expr.go
src/cmd/compile/internal/ir/name.go
src/cmd/compile/internal/reflectdata/alg.go
src/cmd/compile/internal/reflectdata/reflect.go
src/cmd/compile/internal/typecheck/syms.go
src/cmd/compile/internal/walk/compare.go