• Matthew Dempsky's avatar
    runtime: eliminate runtime.hselect · 3aa53b31
    Matthew Dempsky authored
    Now the registration phase looks like:
    
        var cases [4]runtime.scases
        var order [8]uint16
        selectsend(&cases[0], c1, &v1)
        selectrecv(&cases[1], c2, &v2, nil)
        selectrecv(&cases[2], c3, &v3, &ok)
        selectdefault(&cases[3])
        chosen := selectgo(&cases[0], &order[0], 4)
    
    Primarily, this is just preparation for having the compiler open-code
    selectsend, selectrecv, and selectdefault.
    
    As a minor benefit, order can now be layed out separately on the stack
    in the pointer-free segment, so it won't take up space in the
    function's stack pointer maps.
    
    Change-Id: I5552ba594201efd31fcb40084da20b42ea569a45
    Reviewed-on: https://go-review.googlesource.com/37933
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarAustin Clements <austin@google.com>
    3aa53b31
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...