]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: better Call constructor
authorMatthew Dempsky <mdempsky@google.com>
Sat, 3 Jul 2021 18:55:31 +0000 (11:55 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Sun, 4 Jul 2021 00:19:36 +0000 (00:19 +0000)
commitcd00499c6125692d704ac8a04b07825ee1648207
tree006c9ddadc06122138860f15fa9f5ca2e5480fe5
parent899b158ee9e99642bdbea2008d7cc70382db6545
[dev.typeparams] cmd/compile: better Call constructor

Historically, it's been tedious to create and typecheck ir.OCALL
nodes, except by handing them off entirely to typecheck. This is
because typecheck needed context on whether the call is an expression
or statement, and to set flags like Func.ClosureCalled and
CallExpr.Use.

However, those flags have now been removed entirely by recent CLs, so
we can instead just provide a better typecheck.Call function for
constructing and typechecking arbitrary call nodes. Notably, this
simplifies things for unified IR, which can now incrementally
typecheck call expressions as it goes without worrying about context.

Change-Id: Icbdc55c3bd8be84a242323bc45006f9dec09fdcd
Reviewed-on: https://go-review.googlesource.com/c/go/+/332692
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Trust: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/reflectdata/alg.go
src/cmd/compile/internal/typecheck/typecheck.go
src/cmd/compile/internal/walk/walk.go