]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: remove SetClosureCalled(false) hacks
authorMatthew Dempsky <mdempsky@google.com>
Wed, 23 Jun 2021 05:21:09 +0000 (22:21 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 23 Jun 2021 15:11:06 +0000 (15:11 +0000)
commit70f4ab656575842b3a4ce54960f2c3eb7230e8a6
tree67f4df46a95de012bbe60f4f60d63a49d5906c20
parent107b1fce6401b7f5fa12f6e51746a2d0c86b65ca
[dev.typeparams] cmd/compile: remove SetClosureCalled(false) hacks

The current go/defer wrapping code goes to some length to clear
ClosureCalled when a function call will end up not being called
directly, and so it will need to use the context register.

But we already have a flag to indicate we need to use the context
register: Needctxt. The real issue here is just that buildssa was
using fn.ClosureCalled instead of fn.Needctxt.

Change-Id: Ic9f5f23b66eb467fc61fa84eacb45d46c54133d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/330329
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/ssagen/ssa.go
src/cmd/compile/internal/walk/order.go