1
0
mirror of https://github.com/golang/go synced 2024-10-03 06:31:22 -06:00
Commit Graph

15 Commits

Author SHA1 Message Date
Adam Langley
e79bcf8bfd runtime: shift the index for the sort by one.
Makes the code look cleaner, even if it's a little harder to figure
out from the sort invariants.

R=rsc
CC=golang-dev
https://golang.org/cl/165061
2009-12-04 13:31:18 -08:00
Adam Langley
d1740bb3a6 Remove global chanlock.
On a microbenchmark that ping-pongs on lots of channels, this makes
the multithreaded case about 20% faster and the uniprocessor case
about 1% slower. (Due to cache effects, I expect.)

R=rsc, agl
CC=golang-dev
https://golang.org/cl/166043
2009-12-04 10:57:01 -08:00
Adam Langley
b89d630977 Fix bug when sending via select.
selfree maintains a cache of Select structures for several sizes. In
newselect, we'll use an entry from the cache if one is found. However,
the Scase structures corresponding to a send may have been allocated
for the wrong size. In this case we'll write off the end of the Scase
into random memory and, generally, read some amount of junk in the
receive.

This patch fixes the issue by removing the cache, on the advice of
rsc.

R=rsc
CC=go-dev
http://go/go-review/1016002
2009-10-28 18:23:53 -07:00
Russ Cox
22a5c78f44 rename sys functions to runtime,
because they are in package runtime.

another step to enforcing package boundaries.

R=r
DELTA=732  (114 added, 93 deleted, 525 changed)
OCL=35811
CL=35824
2009-10-15 23:10:49 -07:00
Russ Cox
7a0f4cac03 pass Type* to makechan and makemap so that
they can get the official alignment out of there
instead of guessing.

R=ken
OCL=34450
CL=34450
2009-09-08 13:46:54 -07:00
Russ Cox
de7920e6fd finish ChanValue: Len and Cap.
R=r
DELTA=45  (45 added, 0 deleted, 0 changed)
OCL=33873
CL=33881
2009-08-26 12:42:22 -07:00
Russ Cox
653cef1ba0 add Close() and Closed() to ChanValue
R=r
DELTA=60  (56 added, 3 deleted, 1 changed)
OCL=33868
CL=33872
2009-08-26 10:47:18 -07:00
Rob Pike
87f2208bda rename runtime internals to have modern names (array->slice etc)
R=rsc
DELTA=444  (179 added, 177 deleted, 88 changed)
OCL=33847
CL=33849
2009-08-25 15:54:25 -07:00
Russ Cox
8a45917f3d len and cap on chans
R=ken
OCL=33599
CL=33599
2009-08-20 11:12:04 -07:00
Bill Neubauer
7f09b0177f Removing dead tests from chan.c
Since pres != nil was already checked and the routine sets *pres to false
and returns, the subsequent tests are unneeded.

R=rsc
APPROVED=rsc
DELTA=4  (0 added, 4 deleted, 0 changed)
OCL=33439
CL=33441
2009-08-17 22:21:48 -07:00
Russ Cox
e52e9ca82e another step toward eliminating forward declarations.
introduce NodeList* type in compiler to replace OLIST.
this clarifies where lists can and cannot occur.
list append and concatenation are now cheap.
the _r rules are gone from yacc.
rev and unrev are gone.
no more lists of lists.

the representation of assignments is a bit clunkier.
split into OAS (1=1) and OAS2 (2 or more on one side).

delete dead chanrecv3 code.

delay construction of func types.

R=ken
OCL=31745
CL=31762
2009-07-17 01:00:44 -07:00
Russ Cox
5ddaf9a098 reflection for channels
R=r
DELTA=188  (171 added, 6 deleted, 11 changed)
OCL=31352
CL=31361
2009-07-08 15:00:54 -07:00
Russ Cox
29aa3ffbf6 move Structrnd to runtime.h
R=ken
OCL=31125
CL=31125
2009-07-02 21:25:46 -07:00
Russ Cox
20cfa4a568 change alignment rules: roll receiver into
input parameters, move output parameters
into their own struct.

R=ken
OCL=30954
CL=30966
2009-06-30 20:02:07 -07:00
Rob Pike
d90e7cbac6 mv src/lib to src/pkg
tests: all.bash passes, gobuild still works, godoc still works.

R=rsc
OCL=30096
CL=30102
2009-06-09 09:53:44 -07:00