used only for debugging, debug.go is not normally part of the package source.
also add a dump program to call it.
R=rsc
CC=golang-dev
https://golang.org/cl/183075
tabs after an empty line where not converted.
Also, made it more robust in the presence of
(unexpected) ' ' and '\v' chars in indentation
mode.
R=r
CC=golang-dev
https://golang.org/cl/181085
(I was looking at this code accidentally because of some gofmt
issues and thought that one could write this more effectively.
You may have deliberately chosen not to use ranges here to make
the index range clearer. Just let me know.)
R=agl, agl1
CC=golang-dev
https://golang.org/cl/181084
Listener contains private members and 6g now enforces that private
members cannot be assigned outside of their package.
R=rsc
CC=golang-dev
https://golang.org/cl/183073
also a way to run code when object is deleted.
both of these are possibilities, not certainties.
R=rsc, iant
CC=golang-dev
https://golang.org/cl/181057
This was convenient for me to have without being forced
to parse the regexp myself. I'd understand if it's not
really wanted, but I also think that some meta information
about compiled regexps would be fine.
R=r, rsc
CC=golang-dev
https://golang.org/cl/183044
for now, it's amd64 and 386 only but it's trivial to add more.
Fixes#385.
(why couldn't it have been issue 386?)
tested for amd64 and 386 on darwin.
R=rsc
CC=golang-dev
https://golang.org/cl/182043
It's expected to be shared between all files so that all types are output.
Fixes bug reported on mailing list by Peter Froehlich.
R=rsc, phf
CC=golang-dev
https://golang.org/cl/183043
as it is not needed anymore (only one impl.
of vector package).
Makefile, vector_test.go, and nogen_test.go
were modified manually (find/replace), the
other files (intvector_test.go, strinvector_test.go
are generated).
Runs all tests.
R=r
https://golang.org/cl/182041
Manual changes to the following files:
src/pkg/Makefile
src/pkg/exp/vector/Makefile (now: src/pkg/container/vector/Makefile)
R=rsc, r
CC=golang-dev
https://golang.org/cl/181041
- use an interface {Get()}
- implement Get for maps, slices
- for slices, retrieves the address of the end of the array, which will give the
same value for every slice of the same array.
R=rsc
CC=golang-dev
https://golang.org/cl/179129
(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
https://golang.org/cl/180068