]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile/internal/typecheck: normalize go/defer statements earlier
authorMatthew Dempsky <mdempsky@google.com>
Wed, 16 Aug 2023 21:39:47 +0000 (14:39 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 17 Aug 2023 19:36:58 +0000 (19:36 +0000)
commit7e2e648a2d55547f0e541668b893329ec195691a
tree8040f7f28288ac768ba939a9ecd20cb8437d8bc0
parentf4e6815652cf3c4803001dd9ab7f0d7f125a466c
cmd/compile/internal/typecheck: normalize go/defer statements earlier

Normalizing go/defer statements to always use functions with zero
parameters and zero results was added to escape analysis, because that
was the earliest point at which all three frontends converged. Now
that we only have the unified frontend, we can do it during typecheck,
which is where we perform all other desugaring and normalization
rewrites.

Change-Id: Iebf7679b117fd78b1dffee2974bbf85ebc923b23
Reviewed-on: https://go-review.googlesource.com/c/go/+/520260
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/escape/call.go
src/cmd/compile/internal/ir/func.go
src/cmd/compile/internal/ir/sizeof_test.go
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/typecheck/stmt.go
src/runtime/race/output_test.go
test/fixedbugs/issue24491a.go
test/fixedbugs/issue31573.go