]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: more incremental typecheck for unified IR
authorMatthew Dempsky <mdempsky@google.com>
Sat, 10 Jul 2021 00:47:15 +0000 (17:47 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Sat, 10 Jul 2021 04:02:52 +0000 (04:02 +0000)
commit3c3c1d8d2856e7859f4ba36b19c91f1538546d2a
tree65edade5496515baf44379931f48307975a747ae
parenta12ad271195d88ffa8f68ad01547560fb4d2ab49
[dev.typeparams] cmd/compile: more incremental typecheck for unified IR

CL 332469 changed the unified IR reader to incrementally typecheck
each statement as they're read/constructed. This CL goes further to
incrementally typecheck each expression.

While here, this CL reorganizes a few things to make this go more
smoothly. In particular, it renames expr to expr0 and adds a new expr
wrapper that applies typecheck.Expr; gets rid of exprTypeSwitchguard
by moving that logic into switchStmt; and splits exprConvert out from
exprCall, which simplifies the logic for typechecking the calleee
expression somewhat.

Change-Id: I6289de9388dc94a947971f4b7213aafeb2faa5dc
Reviewed-on: https://go-review.googlesource.com/c/go/+/333730
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/noder/codes.go
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/noder/writer.go