Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
* adds pass 3 to dequeue from channels eagerly
various other cleanup/churn:
* use switch on cas->send in each pass to
factor out common code.
* longer goto labels, commented at target
* be more agressive about can't happen:
throw instead of print + cope.
* use "select" instead of "selectgo" in errors
* use printf for debug prints when possible
R=ken2, ken3
CC=golang-dev, r
http://codereview.appspot.com/875041
|
|
note that sortmain.go has been run through hg gofmt;
only the formatting of the day initializers changed.
i'm happy to revert that formatting if you'd prefer.
stop on error in doc/progs/run
R=r
CC=golang-dev
http://codereview.appspot.com/850041
|
|
in the tests, println+panic.
gofmt some tests too.
R=rsc
CC=golang-dev
http://codereview.appspot.com/741041
|
|
"naive" version.
R=r
CC=golang-dev
http://codereview.appspot.com/218046
Committer: Rob Pike <r@golang.org>
|
|
(Thanks to ken and rsc for pointing this out)
rsc:
ken pointed out that there's a race in the new
one-lock-per-channel code. the issue is that
if one goroutine has gone to sleep doing
select {
case <-c1:
case <-c2:
}
and then two more goroutines try to send
on c1 and c2 simultaneously, the way that
the code makes sure only one wins is the
selgen field manipulation in dequeue:
// if sgp is stale, ignore it
if(sgp->selgen != sgp->g->selgen) {
//prints("INVALID PSEUDOG POINTER\n");
freesg(c, sgp);
goto loop;
}
// invalidate any others
sgp->g->selgen++;
but because the global lock is gone both
goroutines will be fiddling with sgp->g->selgen
at the same time.
This results in a 7% slowdown in the single threaded case for a
ping-pong microbenchmark.
Since the cas predominantly succeeds, adding a simple check first
didn't make any difference.
R=rsc
CC=golang-dev
http://codereview.appspot.com/180068
|
|
R=rsc, r
http://codereview.appspot.com/172045
|
|
R=rsc, r
http://codereview.appspot.com/171051
|
|
R=r
DELTA=127 (38 added, 3 deleted, 86 changed)
OCL=34640
CL=34650
|
|
R=rsc
OCL=33382
CL=33391
|
|
mostly removing forward declarations.
R=r
DELTA=138 (2 added, 127 deleted, 9 changed)
OCL=33068
CL=33099
|
|
typecheck.c is now responsible for all type checking
except for assignment and function argument "..."
R=ken
OCL=32661
CL=32667
|
|
The change to assign.go is because the gcc testsuite fails to
handle .* in a normal way: it matches against the entire
compiler output, not just a single line.
assign.go:15:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:19:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:23:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:27:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
chan/perm.go:14:5: error: incompatible types in assignment
chan/perm.go:15:5: error: incompatible types in assignment
chan/perm.go:16:6: error: incompatible types in assignment
chan/perm.go:17:6: error: incompatible types in assignment
chan/perm.go:24:7: error: invalid send on receive-only channel
chan/perm.go:25:12: error: invalid send on receive-only channel
chan/perm.go:31:4: error: invalid receive on send-only channel
chan/perm.go:32:9: error: invalid receive on send-only channel
chan/perm.go:38:2: error: invalid send on receive-only channel
chan/perm.go:42:2: error: invalid receive on send-only channel
initializerr.go:14:17: error: reference to undefined variable 'X'
initializerr.go:14:19: error: mixture of field and value initializers
initializerr.go:15:26: error: duplicate value for field 'Y'
initializerr.go:16:10: error: too many values in struct composite literal
initializerr.go:18:19: error: index expression is not integer constant
initializerr.go:17:11: error: too many elements in composite literal
R=rsc
DELTA=12 (0 added, 0 deleted, 12 changed)
OCL=29657
CL=29665
|
|
(will submit with compiler fixes).
R=r
DELTA=44 (44 added, 0 deleted, 0 changed)
OCL=29211
CL=29248
|
|
os.Exit(0) at the end of main.
R=rsc
DELTA=6 (0 added, 6 deleted, 0 changed)
OCL=28967
CL=28969
|
|
R=r
OCL=28569
CL=28573
|
|
*os.Errors with os.Errors.
lib/template updated to use new setup; its clients also updated.
Step 2 will make os's error support internally much cleaner.
R=rsc
OCL=27586
CL=27586
|
|
also fix multiple-evaluation bug in range over arrays.
R=ken
OCL=26576
CL=26576
|
|
plus significant hand editing.
Back to T{x} for composite literals.
R=r
OCL=25612
CL=25632
|
|
only non-trivial changes are in
convlit1.go
golden.out
R=gri
OCL=25019
CL=25024
|
|
R=r
OCL=24349
CL=24913
|
|
- don't need *struct
- don't need item/rat both
- closures make the inner slaves easier
- delete some old BUG comments
powser2 is left mostly alone, for variety.
R=rsc
DELTA=134 (2 added, 20 deleted, 112 changed)
OCL=24579
CL=24581
|
|
R=ken
OCL=23422
CL=23422
|
|
TBR=r
OCL=23121
CL=23127
|
|
R=r
OCL=23012
CL=23014
|
|
R=r
OCL=22978
CL=22984
|
|
R=r
DELTA=568 (0 added, 9 deleted, 559 changed)
OCL=22898
CL=22901
|
|
R=r
OCL=22166
CL=22166
|
|
fix bugs left over from *[] to [] conversion.
TBR=r
OCL=21576
CL=21581
|
|
R=r
OCL=21563
CL=21571
|
|
R=r
DELTA=746 (729 added, 1 deleted, 16 changed)
OCL=20858
CL=20858
|
|
R=r
DELTA=137 (56 added, 4 deleted, 77 changed)
OCL=19505
CL=19522
|
|
in new package strconv.
move atoi etc to strconv too.
update fmt, etc to use strconv.
R=r
DELTA=2232 (1691 added, 424 deleted, 117 changed)
OCL=19286
CL=19380
|
|
R=r
DELTA=47 (47 added, 0 deleted, 0 changed)
OCL=18581
CL=18748
|
|
recognize methods for a variable whose type is a named type
which is a pointer type. Add bug117 to test this case.
R=r
DELTA=24 (22 added, 0 deleted, 2 changed)
OCL=18547
CL=18554
|
|
current spec forbids it:
The type specified by the type name is called ``receiver
base type''. The receiver base type must be a type
declared in the current file, and it must not be a pointer
type.
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=18527
CL=18541
|
|
* 1. all statements and declarations are terminated by semicolons
* 2. semicolons can be omitted at top level.
* 3. semicolons can be omitted before and after the closing ) or }
* on a list of statements or declarations.
/home/rsc/bin/addsemi and then diff+tweak.
R=r,gri
OCL=16620
CL=16643
|
|
R=r
DELTA=7 (2 added, 2 deleted, 3 changed)
OCL=16495
CL=16499
|
|
update golden
add the "goroutines" test
R=iant
DELTA=74 (36 added, 23 deleted, 15 changed)
OCL=16194
CL=16206
|
|
R=ken
DELTA=68 (19 added, 0 deleted, 49 changed)
OCL=15966
CL=15969
|
|
powser1.go has not been tested - waiting for compiler to catch up
R=ken
OCL=15415
CL=15415
|
|
R=ken
OCL=15170
CL=15170
|
|
R=r
OCL=14603
CL=14603
|
|
1) fix print statements, panic statements (parentheses required)
2) len is now allowed as a var name (bug053)
R=gri
OCL=14106
CL=14106
|
|
TBR=iant
OCL=13873
CL=13873
|