From 8ed438c077d82c4b4662c327dbbdb3c64e7547ca Mon Sep 17 00:00:00 2001 From: David Chase Date: Wed, 10 Mar 2021 20:54:11 -0500 Subject: 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 Run-TryBot: David Chase TryBot-Result: Go Bot Reviewed-by: Cherry Zhang --- src/cmd/compile/internal/types/size.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/cmd/compile/internal/types/size.go') 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 { -- cgit v1.2.3-54-g00ecf