mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[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>
This commit is contained in:
parent
41352fd401
commit
d9acf6f3a3
5 changed files with 8 additions and 12 deletions
|
|
@ -71,8 +71,6 @@ type Func struct {
|
|||
// Anonymous and blank PPARAMOUTs are declared as ~rNN and ~bNN Names, respectively.
|
||||
Dcl []*Name
|
||||
|
||||
ClosureType Ntype // closure representation type
|
||||
|
||||
// ClosureVars lists the free variables that are used within a
|
||||
// function literal, but formally declared in an enclosing
|
||||
// function. The variables in this slice are the closure function's
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue