cmd/compile: remove structpkg global variable

The structpkg global variable was only used to verify internal
consistency when declaring methods during import. Track the
value in the parser and binary importer directly and pass it
to the relevant function as an argument.

Change-Id: I7e5e006f9046d84f9a3959616f073798fda36c97
Reviewed-on: https://go-review.googlesource.com/20606
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Robert Griesemer 2016-03-11 17:12:31 -08:00
parent 7c546566c3
commit 68c86a0096
5 changed files with 24 additions and 32 deletions

View file

@ -248,8 +248,6 @@ var localpkg *Pkg // package being compiled
var importpkg *Pkg // package being imported
var structpkg *Pkg // package that declared struct, during import
var gostringpkg *Pkg // fake pkg for Go strings
var itabpkg *Pkg // fake pkg for itab cache