]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: update TestIntendedInlining
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 9 Mar 2019 17:48:23 +0000 (17:48 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Sat, 9 Mar 2019 18:39:22 +0000 (18:39 +0000)
commitcc5dc00150725fec3933f7d4c571da94978b7978
treed4aef6f6ed05cb08bf29d8edbe8c1358272bc5d6
parent05051b56a0184d8dfdb857e8ee10c99bfbf4646b
cmd/compile: update TestIntendedInlining

Value.CanInterface and Value.pointer are now inlinable, since we have a
limited form of mid-stack inlining. Their calls to panic were preventing
that in previous Go releases. The other three methods still go over
budget, so update that comment.

In recent commits, sync.Once.Do and multiple lock/unlock methods have
also been made inlinable, so add those as well. They have standalone
tests like test/inline_sync.go already, but it's best if the funcs are
in this global test table too. They aren't inlinable on every platform
yet, though.

Finally, use math/bits.UintSize to check if GOARCH is 64-bit, now that
we can.

Change-Id: I65cc681b77015f7746dba3126637e236dcd494e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/166461
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/inl_test.go