]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: eagerly CalcStructSize for synthetic ABI types
authorMatthew Dempsky <mdempsky@google.com>
Thu, 26 Aug 2021 23:57:06 +0000 (16:57 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 27 Aug 2021 03:24:35 +0000 (03:24 +0000)
commitd350a6653252fe1f698ac00be99964fa31d06e89
tree9faca4389a0570d9e42bc2c2f80e1cfcc9340f1a
parentd7e2e2ec2b2a11c2bfb98a27c03d0dccba62c4fb
cmd/compile: eagerly CalcStructSize for synthetic ABI types

The next CL is going to replace Type.Width with Type.Size(), but
Type.Size() isn't safe to call concurrently. So this CL calls
CalcStructSize, which *is* allowed to be used concurrently, but then
it's the caller's responsibility to ensure it's called right after
NewStruct.

Change-Id: If9cd81650ccb3a867b4449af757375fa56227901
Reviewed-on: https://go-review.googlesource.com/c/go/+/345483
Trust: Matthew Dempsky <mdempsky@google.com>
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/abi/abiutils.go