]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: inline functions evaluated in go and defer statements
authorBranden J Brown <zephyrtronium@gmail.com>
Sun, 25 Oct 2020 18:26:19 +0000 (14:26 -0400)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 29 Oct 2020 16:47:10 +0000 (16:47 +0000)
commit4fb429138881e3fe171e4c2e958ed0da26ddfd9c
tree1536e989bf91b42352ac09a4829be1b5c1574289
parent25d28ec55aded46e0be9c2298f24287d296a9e47
cmd/compile: inline functions evaluated in go and defer statements

The inlining pass previously bailed upon encountering a go or defer statement, so it would not inline functions e.g. used to provide arguments to the deferred function. This change preserves the behavior of not inlining the
deferred function itself, but it allows the inlining walk to proceed into its arguments.

Fixes #42194

Change-Id: I4e82029d8dcbe69019cc83ae63a4b29af45ec777
Reviewed-on: https://go-review.googlesource.com/c/go/+/264997
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/gc/inl.go
test/inline.go