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-15 20:48:37 +0000
commit8ed438c077d82c4b4662c327dbbdb3c64e7547ca (patch)
tree7557794f1e7d4c78ed445d398f9c5d4401313e57 /src/cmd/compile/internal/types/size.go
parent96aecdcb36ad5240a9858f7f7d77ace30f2deaaa (diff)
downloadgo-8ed438c077d82c4b4662c327dbbdb3c64e7547ca.tar.gz
go-8ed438c077d82c4b4662c327dbbdb3c64e7547ca.zip
cmd/compile: spill output parameters passed in registers as autos
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. Change-Id: I658c33f049337fb6f1e625f0c55430d25bfa877e Reviewed-on: https://go-review.googlesource.com/c/go/+/300749 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> 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 {