]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile/internal/types: unexport PkgMap, remove PkgList
authorRobert Griesemer <gri@golang.org>
Wed, 19 Apr 2017 18:32:09 +0000 (11:32 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 19 Apr 2017 21:19:29 +0000 (21:19 +0000)
commit39a132cb2fe448079324db3c77f15c46a43c8d86
tree894102decc6b78cb5f9762dcd840224b23946949
parent62a2bee7a5706e9b37a6bdff3ee2cc422912f463
cmd/compile/internal/types: unexport PkgMap, remove PkgList

- PkgMap was only needed to test import/export in a "cleanroom"
  environment, with debugFormat set. Provided helper function
  instead.

- PkgList was only used to identify directly imported packages.
  Instead, compute that list explicitly from the package map.
  It happens only once, the list is small, and it's more robust
  than keeping two data structures in sync.

Change-Id: I82dce3c0b5cb816faae58708e877799359c20fcb
Reviewed-on: https://go-review.googlesource.com/41078
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/export.go
src/cmd/compile/internal/gc/reflect.go
src/cmd/compile/internal/types/pkg.go