LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 /* | 5 /* |
6 * select | 6 * select |
7 */ | 7 */ |
8 | 8 |
9 #include <u.h> | 9 #include <u.h> |
10 #include <libc.h> | 10 #include <libc.h> |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 scase->list = list(scase->list, nod(ODCLFIELD, newname(lookup("so")), ty
penod(types[TUINT16]))); | 353 scase->list = list(scase->list, nod(ODCLFIELD, newname(lookup("so")), ty
penod(types[TUINT16]))); |
354 scase->list = list(scase->list, nod(ODCLFIELD, newname(lookup("receivedp
")), typenod(ptrto(types[TUINT8])))); | 354 scase->list = list(scase->list, nod(ODCLFIELD, newname(lookup("receivedp
")), typenod(ptrto(types[TUINT8])))); |
355 typecheck(&scase, Etype); | 355 typecheck(&scase, Etype); |
356 scase->type->noalg = 1; | 356 scase->type->noalg = 1; |
357 scase->type->local = 1; | 357 scase->type->local = 1; |
358 | 358 |
359 sel = nod(OTSTRUCT, N, N); | 359 sel = nod(OTSTRUCT, N, N); |
360 sel->list = list(sel->list, nod(ODCLFIELD, newname(lookup("tcase")), typ
enod(types[TUINT16]))); | 360 sel->list = list(sel->list, nod(ODCLFIELD, newname(lookup("tcase")), typ
enod(types[TUINT16]))); |
361 sel->list = list(sel->list, nod(ODCLFIELD, newname(lookup("ncase")), typ
enod(types[TUINT16]))); | 361 sel->list = list(sel->list, nod(ODCLFIELD, newname(lookup("ncase")), typ
enod(types[TUINT16]))); |
362 sel->list = list(sel->list, nod(ODCLFIELD, newname(lookup("pollorder")),
typenod(ptrto(types[TUINT8])))); | 362 sel->list = list(sel->list, nod(ODCLFIELD, newname(lookup("pollorder")),
typenod(ptrto(types[TUINT8])))); |
363 sel->list = list(sel->list, nod(ODCLFIELD, newname(lookup("lockorder")),
typenod(ptrto(types[TUINT8])))); | |
364 arr = nod(OTARRAY, nodintconst(size), scase); | 363 arr = nod(OTARRAY, nodintconst(size), scase); |
365 sel->list = list(sel->list, nod(ODCLFIELD, newname(lookup("scase")), arr
)); | 364 sel->list = list(sel->list, nod(ODCLFIELD, newname(lookup("scase")), arr
)); |
366 arr = nod(OTARRAY, nodintconst(size), typenod(ptrto(types[TUINT8]))); | |
367 sel->list = list(sel->list, nod(ODCLFIELD, newname(lookup("lockorderarr"
)), arr)); | |
368 arr = nod(OTARRAY, nodintconst(size), typenod(types[TUINT16])); | 365 arr = nod(OTARRAY, nodintconst(size), typenod(types[TUINT16])); |
369 sel->list = list(sel->list, nod(ODCLFIELD, newname(lookup("pollorderarr"
)), arr)); | 366 sel->list = list(sel->list, nod(ODCLFIELD, newname(lookup("pollorderarr"
)), arr)); |
370 typecheck(&sel, Etype); | 367 typecheck(&sel, Etype); |
371 sel->type->noalg = 1; | 368 sel->type->noalg = 1; |
372 sel->type->local = 1; | 369 sel->type->local = 1; |
373 | 370 |
374 return sel->type; | 371 return sel->type; |
375 } | 372 } |
LEFT | RIGHT |