]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: flatten dependency graph [generated]
authorMatthew Dempsky <mdempsky@google.com>
Sun, 27 Dec 2020 07:46:36 +0000 (23:46 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 28 Dec 2020 08:06:26 +0000 (08:06 +0000)
commit3383b5c74a4543d7232468201778a8db03cf133d
tree78f87098d4d9a06127d81316fd4d21904670df90
parentf8afb8216ad69ed0c4e5ac8b5ad86cc0cb78749d
[dev.regabi] cmd/compile: flatten dependency graph [generated]

This CL shuffles a couple functions around to help flatten the package
dependency graph somewhat:

1. ssa.LosesStmtMark is only ever used in associated with an
objw.Prog, so we might as well move it to that package. This removes a
dependency from objw (a relatively low-level utility package that
wraps cmd/internal/obj) on ssa (a large and relatively high-level
package).

2. Moves liveness.SetTypeBits into a new package typebits. A
single-function package is a bit on the silly side, but reflectdata
shouldn't need to depend on liveness (nor vice versa).

[git-generate]
cd src/cmd/compile/internal/ssa
rf '
mv LosesStmtMark prog.go
mv prog.go cmd/compile/internal/objw
'

cd ../liveness
rf '
mv SetTypeBits Set
mv Set typebits.go
rm typebits.go:/Copyright/+4,/^package/-0
mv typebits.go cmd/compile/internal/typebits
'

Change-Id: Ic9a983f0ad6c0cf1a537f99889699a8444699e6e
Reviewed-on: https://go-review.googlesource.com/c/go/+/280447
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>
src/cmd/compile/internal/liveness/plive.go
src/cmd/compile/internal/objw/prog.go
src/cmd/compile/internal/reflectdata/reflect.go
src/cmd/compile/internal/ssa/numberlines.go
src/cmd/compile/internal/ssagen/ssa.go
src/cmd/compile/internal/typebits/typebits.go [new file with mode: 0644]