]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: workaround inlining of closures with range statements
authorLeonard Wang <wangdeyu0907@gmail.com>
Sat, 28 Aug 2021 16:53:00 +0000 (00:53 +0800)
committerDan Scales <danscales@google.com>
Thu, 2 Sep 2021 12:49:05 +0000 (12:49 +0000)
commit08e2519ded32a1a7d4e6056406c356b4496ca24a
tree704374d141022c5699a5a05038f2ab5327b94ba3
parent6705191e02d7e5e849a7877928003b797e0bc4f6
cmd/compile: workaround inlining of closures with range statements

ORANGE is still not inlineable now. This CL is correct only when the range statement is statically dead, and thus not counted during the inline budget check.
If we support range statements in inlining closures in the future, may require additional processing.

Fixes #48033.

Change-Id: I28f5755c28cfa27e41daef9eff2ae332059909bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/345436
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/inline/inl.go
test/fixedbugs/issue48033.go [new file with mode: 0644]