]> Cypherpunks repositories - gostls13.git/commit
test: add test for package-scope method value GC
authorMatthew Dempsky <mdempsky@google.com>
Tue, 9 Aug 2022 05:00:09 +0000 (22:00 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 9 Aug 2022 16:41:51 +0000 (16:41 +0000)
commitf93b668842ae3d6e96d7348dbd05592811ce3990
tree050ddb30ccb2fcd17e9b3d81cf11692bc62bf654
parent0c2f87f23d72841544e372fac0bcf5168324d8c9
test: add test for package-scope method value GC

The Go 1.18 frontend handles package-scope generic method values by
spilling the receiver value to a global temporary variable, which pins
it into memory. This issue isn't present in unified IR, which uses
OMETHVALUE when the receiver type is statically known.

Updates #54343.

Change-Id: I2c4ffeb125a3cf338f949a93b0baac75fff6cd31
Reviewed-on: https://go-review.googlesource.com/c/go/+/422198
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
test/fixedbugs/issue54343.go [new file with mode: 0644]
test/run.go