]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: escape analysis of method expression calls
authorMatthew Dempsky <mdempsky@google.com>
Wed, 23 Jun 2021 07:31:16 +0000 (00:31 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 23 Jun 2021 16:48:23 +0000 (16:48 +0000)
commiteb691fdd62c9f1dc36c9c9a974ac2ddad677fd99
tree710880c1174408593cb2dbf3f037c276cfc0431c
parent0a0e3a3dea72d8d64d4250c9f7649da3b942eae5
[dev.typeparams] cmd/compile: escape analysis of method expression calls

This CL extends escape analysis to analyze function calls using method
expressions the same as it would a normal method call. That is, it now
analyzes "T.M(recv, args...)" the same as "recv.M(args...)".

This is useful because it means the frontend can eventually stop
supporting both function calls and method calls. We can simply desugar
method calls into function calls, like we already do in the backend to
simplify SSA construction.

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