From: Russ Cox Date: Mon, 20 Jul 2009 20:29:56 +0000 (-0700) Subject: explain selectsend problem X-Git-Tag: weekly.2009-11-06~1096 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f664d0e90421cf7b6257ce2f0ad197a7d76ff7a0;p=gostls13.git explain selectsend problem R=ken OCL=31865 CL=31867 --- diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c index 65c4f7efd6..be3f0b9cb7 100644 --- a/src/cmd/gc/walk.c +++ b/src/cmd/gc/walk.c @@ -606,7 +606,10 @@ reswitch: ll = ascompatte(n->op, getinarg(t), n->list, 0, init); n->list = reorder1(ll); if(isselect(n)) { - // clear output bool - special prob with selectsend + // special prob with selectsend and selectrecv: + // if chan is nil, they don't know big the channel + // element is and therefore don't know how to find + // the output bool, so we clear it before the call. Node *b; b = nodbool(0); lr = ascompatte(n->op, getoutarg(t), list1(b), 0, init);