]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: collect global compilation state
authorRuss Cox <rsc@golang.org>
Mon, 21 Dec 2020 06:29:02 +0000 (01:29 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 21 Dec 2020 19:23:28 +0000 (19:23 +0000)
commit1a3b036b836d5b41871515ec350b203377e087a6
tree52f0c6be36f2607486df1970c7824d273a8c8e5e
parent2153a99914c3c24b98cd4cfccd1d2f670273a4ac
[dev.regabi] cmd/compile: collect global compilation state

There are various global variables tracking the state of the
compilation. Collect them in a single global struct instead.
The struct definition is in package ir, but the struct itself is
still in package gc. It may eventually be threaded through the
code, but in the short term will end up in package typecheck.

Change-Id: I019db07aaedaed2c9b67dd45a4e138dc6028e54c
Reviewed-on: https://go-review.googlesource.com/c/go/+/279297
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
18 files changed:
src/cmd/compile/internal/gc/alg.go
src/cmd/compile/internal/gc/bexport.go
src/cmd/compile/internal/gc/closure.go
src/cmd/compile/internal/gc/dcl.go
src/cmd/compile/internal/gc/embed.go
src/cmd/compile/internal/gc/export.go
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/iexport.go
src/cmd/compile/internal/gc/iimport.go
src/cmd/compile/internal/gc/init.go
src/cmd/compile/internal/gc/inl.go
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/gc/noder.go
src/cmd/compile/internal/gc/obj.go
src/cmd/compile/internal/gc/pgen.go
src/cmd/compile/internal/gc/subr.go
src/cmd/compile/internal/gc/walk.go
src/cmd/compile/internal/ir/package.go [new file with mode: 0644]