compiler, runtime: simplify select and channel operations
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 14 Sep 2017 03:57:18 +0000 (03:57 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 14 Sep 2017 03:57:18 +0000 (03:57 +0000)
commit022aa0ce5eebafe60f20245c8ff26b60a5074dfd
tree4cff4e3e7be2beb8a86e66e9f1d6346a9e55fb36
parent0468f67f27f49972dcd77758284a2709bd9249fe
compiler, runtime: simplify select and channel operations

    In preparation for upgrading libgo to the 1.9 release, this
    approximately incorporates https://golang.org/cl/37661 and
    https://golang.org/cl/38351.

    CL 37661 changed the gc compiler such that the select statement simply
    returns an integer which is then used as the argument for a switch.
    Since gccgo already worked that way, this just adjusts the switch code
    to look like the gc switch code by removing the explicit case index
    expression and calculating it from the order of calls to selectsend,
    selectrecv, and selectdefault.

    CL 38351 simplifies the channel code by not passing the unused channel
    type descriptor pointer.

    Reviewed-on: https://go-review.googlesource.com/62730

From-SVN: r252749
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/runtime.def
gcc/go/gofrontend/statements.cc
gcc/go/gofrontend/statements.h
libgo/go/reflect/value.go
libgo/go/runtime/chan.go
libgo/go/runtime/select.go