mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/ir: remove NewClosureExpr
The only usage of NewClosureExpr is inside NewClosureFunc, which is its alternative version. So just remove NewClosureExpr and inline it there. Change-Id: I1900f4fbb48d7b4f6e6a857f7f7760cd27302671 Reviewed-on: https://go-review.googlesource.com/c/go/+/395855 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
1d19cea740
commit
f25631b490
2 changed files with 3 additions and 9 deletions
|
|
@ -368,7 +368,9 @@ func NewClosureFunc(pos src.XPos, hidden bool) *Func {
|
|||
fn.Nname.Func = fn
|
||||
fn.Nname.Defn = fn
|
||||
|
||||
fn.OClosure = NewClosureExpr(pos, fn)
|
||||
fn.OClosure = &ClosureExpr{Func: fn}
|
||||
fn.OClosure.op = OCLOSURE
|
||||
fn.OClosure.pos = pos
|
||||
|
||||
return fn
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue