• Daniel Martí's avatar
    runtime: remove unused *chantype parameters · 2e29eb57
    Daniel Martí authored
    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: 's avatarMatthew Dempsky <mdempsky@google.com>
    2e29eb57
runtime.go 6.66 KB