]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/typecheck: remove iexport assumption of LocalPkg.Path == ""
authorMatthew Dempsky <mdempsky@google.com>
Thu, 12 May 2022 22:46:20 +0000 (15:46 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 13 May 2022 21:12:24 +0000 (21:12 +0000)
commite3661d5f0820820d8d5e5e357244c95f788820e2
tree1d79db061bd5d23f636d773564154dc96e404c35
parent1973be519aaab9bd21d9255b0926d960d2ea2666
cmd/compile/internal/typecheck: remove iexport assumption of LocalPkg.Path == ""

The indexed export data format encodes the local package's path as "",
because that's historically how we've represented it within
cmd/compile. The format also requires the local package to be first in
the exported list of packages, and was implicitly relying on ""
sorting before other, non-empty package paths.

We can't change the format without breaking existing importers (e.g.,
go/internal/gcimporter), but we can at least remove the dependency on
LocalPkg.Path being "".

Prep refactoring for CL 393715.

Updates #51734.

Change-Id: I6dd4eafd2d538f4e81376948ef9e92fc44a5462a
Reviewed-on: https://go-review.googlesource.com/c/go/+/406057
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/typecheck/iexport.go