]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: scanning closures body when visiting wrapper function
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 22 Jun 2023 18:04:29 +0000 (01:04 +0700)
committerGopher Robot <gobot@golang.org>
Fri, 23 Jun 2023 14:29:16 +0000 (14:29 +0000)
commit6dce882b3aad86b8c3e2928d3be6a87e425c1754
tree90648195dcbc1b69fc9eea301ac8dc7ba0bf523e
parent164aceea08a4c56b9bf451e315c5dbe3f4727971
cmd/compile: scanning closures body when visiting wrapper function

CL 410344 fixed missing method value wrapper, by visiting body of
wrapper function after applying inlining pass.

CL 492017 allow more inlining of functions that construct closures,
which ends up making the wrapper function now inlineable, but can
contain closure nodes that couldn't be inlined. These closures body may
contain OMETHVALUE nodes that we never seen, thus we need to scan
closures body for finding them.

Fixes #60945

Change-Id: Ia1e31420bb172ff87d7321d2da2989ef23e6ebb6
Reviewed-on: https://go-review.googlesource.com/c/go/+/505255
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/ir/visit.go
src/cmd/compile/internal/noder/reader.go
test/fixedbugs/issue60945.dir/a.go [new file with mode: 0644]
test/fixedbugs/issue60945.dir/b.go [new file with mode: 0644]
test/fixedbugs/issue60945.go [new file with mode: 0644]