]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: calculate variable sizes in walk
authorMatthew Dempsky <mdempsky@google.com>
Sat, 9 Jan 2021 04:46:03 +0000 (20:46 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 11 Jan 2021 19:24:28 +0000 (19:24 +0000)
commit8c5aa42c798cac76cab67f85521c68e9dbff70b0
tree3c511f5bad2c811ab7b2c7488dae872055a1e0c6
parent1ce08541574f749947400a051bb40c8352743887
[dev.typeparams] cmd/compile: calculate variable sizes in walk

Walk already explicitly calculates the size of all expression types,
to make sure they're known before SSA generation (which is concurrent,
and thus not safe to modify shared state like types). Might as well
compute all local variable sizes too, to be consistent.

Reduces the burden of the frontend to make sure it's calculated the
size of types that only the backend cares about.

Passes toolstash -cmp.

Change-Id: I68bcca67b4640bfc875467e4ed4d47104b1932f4
Reviewed-on: https://go-review.googlesource.com/c/go/+/282912
Trust: Matthew Dempsky <mdempsky@google.com>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/walk/walk.go