]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: keep variables alive in testing.B.Loop loops
authorsunnymilk <shaojunyang@google.com>
Tue, 10 Sep 2024 16:27:55 +0000 (12:27 -0400)
committerGo LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Mon, 11 Nov 2024 21:52:00 +0000 (21:52 +0000)
commitfe2da30cb54aadeab243f3fc7bd3e14dd4da2892
tree17d7160c87cba9071034c34196c2c8271618a2ae
parent73ac82f99046a8b0b0b76f767f4b2e25ef6989ca
cmd/compile: keep variables alive in testing.B.Loop loops

For the loop body guarded by testing.B.Loop, we disable function inlining and devirtualization inside. The only legal form to be matched is `for b.Loop() {...}`.

For #61515

Change-Id: I2e226f08cb4614667cbded498a7821dffe3f72d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/612043
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Bypass: Junyang Shao <shaojunyang@google.com>
Commit-Queue: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/compile/internal/inline/interleaved/interleaved.go
test/inline_testingbloop.go [new file with mode: 0644]