aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder/noder.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-08-31 13:21:11 -0700
committerMatthew Dempsky <mdempsky@google.com>2021-09-01 18:16:17 +0000
commit6c5f0282422043b913bb7908efb8849905777c8b (patch)
treeb633401893e126f439a65f677d74ff3e87b17df5 /src/cmd/compile/internal/noder/noder.go
parent8f397bc1183b1094f8d0c702668b1e2b43dc8797 (diff)
downloadgo-6c5f0282422043b913bb7908efb8849905777c8b.tar.xz
cmd/compile/internal/pkginit: separate "init" and "inittask" logic
This CL splits the creation of the "init" function responsible for executing package-scope variable initialization statemens from the creation of the "inittask" record that tells the runtime how to sequence all program-wide package initialization. Longer term, this is desirable because sorting variable initialization is already handled by types2 (with Info.InitOrder), so we might as well reuse that. As a more immediate impetus, for unified IR, I want to defer method wrapper generation until after inlining (to know which wrappers are needed). But the staticinit optimization used to decide whether to emit the inittask calls into reflectdata, which in turn tries to generate its own method wrappers. So separating the work allows to create the "init" function early and then emit "inittask" after inlining is done. Change-Id: Ice1d421f92feecaaeafdf7da6b9647c0f27e3571 Reviewed-on: https://go-review.googlesource.com/c/go/+/346629 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/noder/noder.go')
0 files changed, 0 insertions, 0 deletions