]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile/internal/noder: refactor irgen import handling
authorMatthew Dempsky <mdempsky@google.com>
Thu, 27 May 2021 09:48:33 +0000 (02:48 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 27 May 2021 23:54:29 +0000 (23:54 +0000)
commit22f5ece3b13b7e5f6dece399c96d1d665b3a05bc
tree0917173ad8bfb39b97334c06bdb5d8f595e23983
parent417955d151359629ca11be968e3056e6636b828e
[dev.typeparams] cmd/compile/internal/noder: refactor irgen import handling

Rather than re-parsing and re-resolving the import path string, use
the PkgName object provided by types2 to determine what package path
it refers to.

Also, decompose importfile into smaller functions, so that we can
directly pass the already-resolved package path to the importer.

Finally, switch to simply using height as calculated by types2 rather
than redoing the calculations.

Change-Id: I3338f4e68387b2835b2e58d6df65d740d6a648cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/323309
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Trust: Dan Scales <danscales@google.com>
Trust: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/noder/decl.go
src/cmd/compile/internal/noder/import.go
src/cmd/compile/internal/noder/irgen.go