]> Cypherpunks repositories - gostls13.git/commit
[dev.regabi] cmd/compile: remove types.InitSyms
authorMatthew Dempsky <mdempsky@google.com>
Mon, 30 Nov 2020 08:01:26 +0000 (00:01 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 1 Dec 2020 01:26:28 +0000 (01:26 +0000)
commit0f9f27287b6eaac1634248e325aaab848e0dfd55
treeeecef0d14ca1fdc8779dce007e9f00e8734493bc
parent41ad4dec991c11d9e1efff27fc0b1568f5981c9c
[dev.regabi] cmd/compile: remove types.InitSyms

It's not types's responsibility to understand how package
initialization is implemented. Instead, have gc keep track of the
order that packages were imported, and then look for inittask
declarations.

Also, use resolve to force importing of the inittask's export data, so
that we can get the appropriate linker symbol index. (This is also why
this CL doesn't satisfy "toolstash -cmp".)

Change-Id: I5b706497d4a8d1c4439178863b4a8dba4da0f5a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/274006
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/init.go
src/cmd/compile/internal/gc/noder.go
src/cmd/compile/internal/types/pkg.go