]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: remove base.Ctxt.Pkgpath fallback paths
authorMatthew Dempsky <mdempsky@google.com>
Fri, 13 May 2022 23:07:06 +0000 (16:07 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 16 May 2022 20:19:45 +0000 (20:19 +0000)
commit2540f4e49d47f951de6c7697acdc510bcb7b3ed1
tree8193e543d57299fd49de6cd798bb985b9b9fc0fd
parent99d63007a00c07bdb9571d2a206c55b72fe1295e
cmd/compile: remove base.Ctxt.Pkgpath fallback paths

Historically, the compiler set types.LocalPkg.Path to "", so a lot of
compiler code checks for this, and then falls back to using
base.Ctxt.Pkgpath instead.

Since CL 393715, we now initialize types.LocalPkg.Path to
base.Ctxt.Pkgpath, so these code paths can now simply rely on Pkg.Path
always being meaningful.

Updates #51734.

Change-Id: I0aedbd7cf8e14edbfef781106a9510344d468f2c
Reviewed-on: https://go-review.googlesource.com/c/go/+/406317
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/pkginit/init.go
src/cmd/compile/internal/ssagen/ssa.go
src/cmd/compile/internal/staticdata/embed.go
src/cmd/compile/internal/types/type.go