]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: remove Func.ClosureType
authorMatthew Dempsky <mdempsky@google.com>
Tue, 12 Jan 2021 20:25:33 +0000 (12:25 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 12 Jan 2021 23:23:14 +0000 (23:23 +0000)
commitd9acf6f3a3758c3096ee5ef5a24c2bc5df9d9c8b
treeede376d622212051cd966fa8c6de2a0feee86757
parent41352fd401f4f22eceeca375361e018ea787f0fd
[dev.regabi] cmd/compile: remove Func.ClosureType

The closure's type always matches the corresponding function's type,
so just use one instance rather than carrying around two. Simplifies
construction of closures, rewriting them during walk, and shrinks
memory usage.

Passes toolstash -cmp.

Change-Id: I83b8b8f435b02ab25a30fb7aa15d5ec7ad97189d
Reviewed-on: https://go-review.googlesource.com/c/go/+/283152
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ir/func.go
src/cmd/compile/internal/ir/sizeof_test.go
src/cmd/compile/internal/noder/noder.go
src/cmd/compile/internal/typecheck/func.go
src/cmd/compile/internal/walk/closure.go