]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: apply FixVariadicCall and FixMethodCall during typecheck
authorMatthew Dempsky <mdempsky@google.com>
Tue, 20 Dec 2022 19:23:23 +0000 (11:23 -0800)
committerGopher Robot <gobot@golang.org>
Fri, 27 Jan 2023 03:37:13 +0000 (03:37 +0000)
commit7cf8593140f41358f77041ab0fc6ca7e99f6e715
tree753ffd849ef8fe4a0e6e0bf7f87b32c700524cb0
parent4e3abee245755d741987132fb22c442af2dab1de
cmd/compile: apply FixVariadicCall and FixMethodCall during typecheck

To simplify backend analysis, we normalize variadic and method calls:
variadic calls are rewritten with an explicit slice argument, and
method calls are turned into function calls that pass the receiver
argument as the first parameter.

But because we've been supporting multiple frontends, this
normalization was scattered in various later passes. Now that we're
back to just one frontend, we can move the normalization forward into
typecheck (where most other IR normalization already happens).

Change-Id: Idd05ae231fc180ae3dd1664452414f6b6d578962
Reviewed-on: https://go-review.googlesource.com/c/go/+/463737
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/escape/call.go
src/cmd/compile/internal/inline/inl.go
src/cmd/compile/internal/typecheck/func.go
src/cmd/compile/internal/walk/order.go