aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types/size.go
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2021-03-10 20:54:11 -0500
committerDavid Chase <drchase@google.com>2021-03-16 19:22:44 +0000
commit0ec2c4abbad7d678ebc4afc4c69af7d952fc3404 (patch)
tree82ab8d9323deb085f5a4d7bd2b44856dfbcc9bf6 /src/cmd/compile/internal/types/size.go
parent832a01aad409dc0e41eabb53bfdb64d1a41b2c83 (diff)
downloadgo-0ec2c4abbad7d678ebc4afc4c69af7d952fc3404.tar.gz
go-0ec2c4abbad7d678ebc4afc4c69af7d952fc3404.zip
cmd/compile: (fixed) spill output parameters passed in registers as autos
Repair of CL 300749. ALSO: found evidence that stack maps for bodyless methods are wrong. gofmt in test/abi removed never-executed code in types/size.go Updates #44816. Updates #40724. Change-Id: Ifeb5fee60f60e7c7b58ee0457f58a3265d6cf3f6 Reviewed-on: https://go-review.googlesource.com/c/go/+/302071 Trust: David Chase <drchase@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types/size.go')
-rw-r--r--src/cmd/compile/internal/types/size.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/cmd/compile/internal/types/size.go b/src/cmd/compile/internal/types/size.go
index ef23cdf5fe..a75429f0ab 100644
--- a/src/cmd/compile/internal/types/size.go
+++ b/src/cmd/compile/internal/types/size.go
@@ -163,19 +163,9 @@ func calcStructOffset(errtype *Type, t *Type, o int64, flag int) int64 {
if f.Type.Align > 0 {
o = Rnd(o, int64(f.Type.Align))
}
- if isStruct { // For receiver/args/results, depends on ABI
+ if isStruct { // For receiver/args/results, do not set, it depends on ABI
f.Offset = o
}
- if f.Nname != nil {
- // addrescapes has similar code to update these offsets.
- // Usually addrescapes runs after calcStructOffset,
- // in which case we could drop this,
- // but function closure functions are the exception.
- // NOTE(rsc): This comment may be stale.
- // It's possible the ordering has changed and this is
- // now the common case. I'm not sure.
- f.Nname.(VarObject).RecordFrameOffset(o)
- }
w := f.Type.Width
if w < 0 {