]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.19] cmd/compile: only inline method wrapper if method don't conta...
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Mon, 29 Aug 2022 03:48:28 +0000 (10:48 +0700)
committerHeschi Kreinick <heschi@google.com>
Wed, 31 Aug 2022 16:23:03 +0000 (16:23 +0000)
commit11033eac90c14a2d4768deb42601767c800ddef0
tree4a0bc06d1b8a2d32eaa186d08b8f646aa913bd6f
parent4580d6dc6d8c7c06de9a5c07d4232a63c3a06da1
[release-branch.go1.19] cmd/compile: only inline method wrapper if method don't contain closures

CL 327871 changes methodWrapper to always perform inlining after global
escape analysis. However, inlining the method may reveal closures, which
require walking all function bodies to decide whether to capture free
variables by value or by ref.

To fix it, just not doing inline if the method contains any closures.

Fixes #54726

Change-Id: I4b0255b86257cc6fe7e5fafbc545cc5cff9113e1
Reviewed-on: https://go-review.googlesource.com/c/go/+/426334
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/426160
src/cmd/compile/internal/reflectdata/reflect.go
test/fixedbugs/issue53702.go [new file with mode: 0644]