]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: always construct typechecked closures
authorMatthew Dempsky <mdempsky@google.com>
Thu, 17 Aug 2023 01:56:41 +0000 (18:56 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 17 Aug 2023 19:36:26 +0000 (19:36 +0000)
commit5c6fbd2c3ee4a71493d3a7aa6f09a70ddcf0b230
tree223fe819041df81f3a631f83ad1500d9825613cf
parente45397100584e0ca55901f203d16c2acadbb4447
cmd/compile: always construct typechecked closures

This CL extends ir.NewClosureFunc to take the signature type argument,
and to handle naming the closure and adding it to typecheck.Target.

It also removes the code for typechecking OCLOSURE and ODCLFUNC nodes,
by having them always constructed as typechecked. ODCLFUNC node
construction will be further simplified in the followup CL.

Change-Id: Iabde4557d33051ee470a3bc4fd49599490024cba
Reviewed-on: https://go-review.googlesource.com/c/go/+/520337
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
12 files changed:
src/cmd/compile/internal/escape/call.go
src/cmd/compile/internal/ir/func.go
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/noder/unified.go
src/cmd/compile/internal/pkginit/init.go
src/cmd/compile/internal/reflectdata/alg.go
src/cmd/compile/internal/ssagen/abi.go
src/cmd/compile/internal/staticinit/sched.go
src/cmd/compile/internal/typecheck/dcl.go
src/cmd/compile/internal/typecheck/func.go
src/cmd/compile/internal/typecheck/stmt.go
src/cmd/compile/internal/typecheck/typecheck.go