Russ Cox
1b3244e0db
cmd/gc: fix eval order in select
...
Ordinary variable load was assumed to be not worth saving,
but not if one of the function calls later might change
its value.
Fixes #4313 .
R=ken2
CC=golang-dev
https://golang.org/cl/6997047
2012-12-22 16:46:01 -05:00
Luuk van Dijk
e7f89fcb1c
cmd/gc: fix strict tree property for AST for OAS2RECV nodes.
...
in typecheck and walk, conversion from OAS2RECV to OAS2
and to OSELRECV2 duplicated the ->rlist->n to ->right
thereby destroying the strict tree-ness of the AST (up to
ONAMES) of course. Several recursions in esc.c and inl.c
and probably elsewhere assume nodes of the tree aren't duplicated.
rather than defensively code around this, i'd rather assert
these cases away and fix their cause.
(this was tripped in 6741044)
R=rsc
CC=golang-dev
https://golang.org/cl/6750043
2012-10-22 10:01:14 +02:00
Russ Cox
9854fd2a0e
gc: introduce temp = nod+tempname
...
R=ken2
CC=golang-dev
https://golang.org/cl/4967052
2011-09-02 15:35:16 -04:00
Russ Cox
61f84a2cdc
gc: shuffle #includes
...
#include "go.h" (or "gg.h")
becomes
#include <u.h>
#include <libc.h>
#include "go.h"
so that go.y can #include <stdio.h>
after <u.h> but before "go.h".
This is necessary on Plan 9.
R=ken2
CC=golang-dev
https://golang.org/cl/4971041
2011-08-25 16:25:10 -04:00
Luuk van Dijk
847b61b554
gc: Escape analysis.
...
For now it's switch-on-and-offable with -s, and the effects can be inspected
with -m. Defaults are the old codepaths.
R=rsc
CC=golang-dev
https://golang.org/cl/4634073
2011-08-24 19:07:08 +02:00
Russ Cox
3770b0e60c
gc: implement nil chan support
...
The spec has defined nil chans this way for months.
I'm behind.
R=ken2
CC=golang-dev
https://golang.org/cl/4897050
2011-08-17 15:54:17 -04:00
Russ Cox
cce10dacc6
gc: fix select line number
...
Fixes #1393 .
R=ken2
CC=golang-dev
https://golang.org/cl/4811054
2011-07-26 00:52:17 -04:00
Dmitriy Vyukov
33ff947cac
runtime: fix compilation of send select cases
...
Fixes #2102 .
R=fullung, rsc
CC=golang-dev
https://golang.org/cl/4825043
2011-07-25 12:25:37 -04:00
Dmitriy Vyukov
6b2ec06587
runtime: faster select
...
Make selectsend() accept pointer to the element,
it makes it possible to make Scase fixed-size
and allocate/free Select, all Scase's and all SudoG at once.
As a consequence SudoG freelist die out.
benchmark old,ns/op new,ns/op
BenchmarkSelectUncontended 1080 558
BenchmarkSelectUncontended-2 675 264
BenchmarkSelectUncontended-4 459 205
BenchmarkSelectContended 1086 560
BenchmarkSelectContended-2 1775 1672
BenchmarkSelectContended-4 2668 2149
(on Intel Q6600, 4 cores, 2.4GHz)
benchmark old ns/op new ns/op delta
BenchmarkSelectUncontended 517.00 326.00 -36.94%
BenchmarkSelectUncontended-2 281.00 166.00 -40.93%
BenchmarkSelectUncontended-4 250.00 83.10 -66.76%
BenchmarkSelectUncontended-8 107.00 47.40 -55.70%
BenchmarkSelectUncontended-16 67.80 41.30 -39.09%
BenchmarkSelectContended 513.00 325.00 -36.65%
BenchmarkSelectContended-2 699.00 628.00 -10.16%
BenchmarkSelectContended-4 1085.00 1092.00 +0.65%
BenchmarkSelectContended-8 3253.00 2477.00 -23.85%
BenchmarkSelectContended-16 5313.00 5116.00 -3.71%
(on Intel E5620, 8 HT cores, 2.4 GHz)
R=rsc, ken
CC=golang-dev
https://golang.org/cl/4811041
2011-07-21 13:57:13 -04:00
Russ Cox
8bf34e3356
gc, runtime: replace closed(c) with x, ok := <-c
...
R=ken2, ken3
CC=golang-dev
https://golang.org/cl/4259064
2011-03-11 14:47:26 -05:00
Russ Cox
8a2891fc56
gc: select receive bug fix
...
Affects receive using := when new variable escapes to heap.
Fixes #1468 .
R=ken2
CC=golang-dev
https://golang.org/cl/4119052
2011-02-02 18:34:09 -05:00
Russ Cox
5038792837
gc: special case code for single-op blocking and non-blocking selects
...
R=ken2
CC=golang-dev
https://golang.org/cl/4004045
2011-01-30 16:07:57 -05:00
Russ Cox
0db8d3df4c
gc: select receive with implicit conversion
...
Fixes #1172 .
R=ken2
CC=golang-dev
https://golang.org/cl/2615041
2010-10-20 16:38:25 -04:00
Russ Cox
3f19d8ae8d
gc: empty select
...
R=ken2
CC=golang-dev
https://golang.org/cl/1871057
2010-08-03 01:07:57 -07:00
Russ Cox
c6e316a4b9
gc: handle _ = <-c in select.
...
Fixes #238 .
R=ken2
https://golang.org/cl/163098
2009-12-03 01:30:19 -08:00
Russ Cox
2609731736
delay range processing. old2new is gone
...
R=ken
OCL=32780
CL=32780
2009-08-05 02:33:30 -07:00
Russ Cox
54b403723b
delay := processing
...
R=ken
OCL=32772
CL=32772
2009-08-05 00:42:44 -07:00
Russ Cox
f7a867e1a6
move select into its own file.
...
split into typecheck + walk
R=ken
OCL=32726
CL=32726
2009-08-04 12:57:48 -07:00