]> Cypherpunks repositories - gostls13.git/commit
runtime: remove unused *chantype parameters
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 18 Mar 2017 15:55:41 +0000 (15:55 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 21 Mar 2017 17:10:16 +0000 (17:10 +0000)
commit2e29eb57dbd2bc7b022fadc33943b0a5ee69324d
treec66b0c85660bf1426ee7561211bcacb0b361e5b6
parentc65ceff125ded084c6f3b47f830050339e7cc74e
runtime: remove unused *chantype parameters

The chanrecv funcs don't use it at all. The chansend ones do, but the
element type is now part of the hchan struct, which is already a
parameter.

hchan can be nil in chansend when sending to a nil channel, so when
instrumenting we must copy to the stack to be able to read the channel
type.

name             old time/op  new time/op  delta
ChanUncontended  6.42µs ± 1%  6.22µs ± 0%  -3.06%  (p=0.000 n=19+18)

Initially found by github.com/mvdan/unparam.

Fixes #19591.

Change-Id: I3a5e8a0082e8445cc3f0074695e3593fd9c88412
Reviewed-on: https://go-review.googlesource.com/38351
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/builtin.go
src/cmd/compile/internal/gc/builtin/runtime.go
src/cmd/compile/internal/gc/order.go
src/cmd/compile/internal/gc/select.go
src/cmd/compile/internal/gc/walk.go
src/reflect/value.go
src/runtime/chan.go