Commit Graph

5437 Commits

Author SHA1 Message Date
Russ Cox
caa149f73d net: use chan bool instead of chan *netFD to avoid cycle
The cycle is *netFD -> cw chanl *netFD in struct ->
same *netFD in channel read buffer.

Because channels are finalized, the cycle makes them
uncollectable.  A better fix is to make channels not
finalized anymore, and that will happen, but this is
an easy, reasonable workaround until then.

Another good fix would be to zero the channel receive
buffer entry after the receive.  That too will happen.

R=r
CC=golang-dev
https://golang.org/cl/875043
2010-04-06 16:50:27 -07:00
Rob Pike
6431b984db flags: better tests.
R=rsc
CC=golang-dev
https://golang.org/cl/864044
2010-04-06 16:46:52 -07:00
Russ Cox
88ce9ce40c runtime: two proc bug fixes
1. Fix bug in GOMAXPROCS when trying to cut number of procs
Race could happen on any system but was
manifesting only on Xen hosted Linux.

2. Fix recover on ARM, where FP != caller SP.

R=r
CC=golang-dev
https://golang.org/cl/880043
2010-04-06 13:48:31 -07:00
Roger Peppe
6c3befc824 Change goyacc to be reentrant.
Instead of calling the package scope Lex function,
Parse now takes an argument which is used to
do the lexing.
I reverted to having the generated switch
code inside Parse rather than a separate function because
the function needs 7 arguments or a context structure,
which seems unnecessary.
I used yyrun(), not the original $A so that
it's possible to run the backquoted code through gofmt.

R=rsc, ken2, ken3
CC=golang-dev
https://golang.org/cl/879041
2010-04-06 13:29:27 -07:00
Kai Backman
29c6c09f71 replace original float instruction with jump to make branches
to float instructions work correctly.

R=rsc
CC=golang-dev
https://golang.org/cl/870044
2010-04-06 22:17:24 +03:00
Rob Pike
b26a7a2b88 fix deps.bash. \t does not mean tab in some seds.
also: add /dev/null to the ls args to repair handling of empty dependency lists.

R=rsc
CC=golang-dev
https://golang.org/cl/883045
2010-04-06 10:53:48 -07:00
Giles Lean
ac3cf56d33 syscall package: document that errno is zeroed on success
This is a documentation enhancement only, without any code
change.

The rationale for documenting this precisely is that Unix
programmers who "know" that errno's value is undefined after
a successful system call may be surprised otherwise and
search to be sure that a zero errno may be relied upon after
successful calls.

R=r, rsc1, rsc
CC=golang-dev
https://golang.org/cl/812044
2010-04-06 10:28:55 -07:00
Ian Lance Taylor
0688a97556 GNU/Linux sed requires \? rather than ?. Just use * instead.
R=rsc, r
CC=golang-dev
https://golang.org/cl/810043
2010-04-06 10:23:21 -07:00
Joe Poirier
1d37c11657 libcgo: initial mingw port work - builds but untested
R=rsc
CC=golang-dev
https://golang.org/cl/812041
2010-04-05 23:44:05 -07:00
Russ Cox
0085e35498 io/ioutil: fix bug in ReadFile when Open succeeds but Stat fails
R=gri
CC=golang-dev
https://golang.org/cl/867044
2010-04-05 23:36:52 -07:00
Russ Cox
6d69fd1fe3 runtime: fix Caller
log: add test of Caller

New regexp in log test is picky and will require some
maintenance, but it catches off-by-one mistakes too.

Fixes #710.

R=gri
CC=esko.luontola, golang-dev
https://golang.org/cl/887043
2010-04-05 23:36:37 -07:00
Russ Cox
a267ff6a81 http: fix documentation example
R=adg
CC=golang-dev
https://golang.org/cl/813043
2010-04-05 22:55:05 -07:00
Kyle Consalus
edcd70e07a test/bench: add k-nucleotide-parallel
R=rsc
CC=golang-dev
https://golang.org/cl/881042
2010-04-05 22:32:36 -07:00
Charles L. Dorian
2e90f66eff cmath: new package
Complex math function package. Still needs more special case checking.

R=rsc
CC=golang-dev
https://golang.org/cl/874041
2010-04-05 22:10:27 -07:00
Russ Cox
d08728f1e1 deps.bash: be less strict about format of x.go lines
R=iant
CC=golang-dev
https://golang.org/cl/862042
2010-04-05 22:08:07 -07:00
David Symonds
cc99ba0a96 doc/go_mem: remove semicolons
R=adg
CC=golang-dev
https://golang.org/cl/893041
2010-04-06 11:14:44 +10:00
Russ Cox
d89b357f76 runtime: handle malloc > 2GB correctly
R=ken2
CC=golang-dev
https://golang.org/cl/821048
2010-04-05 17:26:59 -07:00
Russ Cox
99d258a2f0 crypto/tls: good defaults
R=agl1
CC=golang-dev
https://golang.org/cl/851041
2010-04-05 14:38:02 -07:00
Russ Cox
6c196015e0 runtime: various arm fixes
* correct symbol table size
  * do not reorder functions in output
  * traceback
  * signal handling
  * use same code for go + defer
  * handle leaf functions in symbol table

R=kaib, dpx
CC=golang-dev
https://golang.org/cl/884041
2010-04-05 12:51:09 -07:00
Andrew Gerrand
fb2758167f programming_faq: added question on T vs *T method sets
Adding this question on Russ' recommendation - not sure if
there is some detail here I'm missing.

The associated discussion was:
http://groups.google.com/group/golang-nuts/t/ec6b27e332ed7f77

R=rsc, r
CC=golang-dev
https://golang.org/cl/887042
2010-04-05 18:17:08 +10:00
Russ Cox
2379fdec04 gc: good syntax error for defer func() {} - missing final ()
R=ken2
CC=golang-dev
https://golang.org/cl/855044
2010-04-04 23:27:26 -07:00
Conrad Meyer
8abae596da nntp: new package, NNTP client
R=rsc, rsc1
CC=golang-dev
https://golang.org/cl/808041
2010-04-04 23:23:48 -07:00
Andrew Gerrand
8b20200fe1 run.bash: remove MAKEFLAGS=-j4 to prevent crashing on freebsd
R=rsc
CC=golang-dev
https://golang.org/cl/881044
2010-04-05 10:53:38 +10:00
Andrew Gerrand
7678c5bfa1 godashboard: fix benchmarks page (first pass)
R=rsc
CC=golang-dev
https://golang.org/cl/844044
2010-04-05 07:34:27 +10:00
Robert Griesemer
f08ce18980 debug/proc: fix typo in package documentation
R=rsc
CC=golang-dev
https://golang.org/cl/829044
2010-04-02 16:20:47 -07:00
Alex Brainman
79017aa568 syscall: implementing some mingw syscalls required by os package
R=rsc
CC=golang-dev
https://golang.org/cl/770041
2010-04-02 01:11:17 -07:00
Russ Cox
f75d0d224f runtime: turn run time errors checks into panics
R=ken2, r
CC=golang-dev
https://golang.org/cl/871042
2010-04-01 22:31:27 -07:00
Robert Griesemer
d6589377c6 debug/macho: fix error message format
R=rsc
CC=golang-dev
https://golang.org/cl/836046
2010-04-01 15:58:10 -07:00
Robert Griesemer
4a6dfda4cc debug/macho: don't crash when reading non-Mach-O files
R=rsc
CC=golang-dev
https://golang.org/cl/838046
2010-04-01 15:36:44 -07:00
Robert Griesemer
d4a1619733 go spec: correct clarification of type declaration
R=rsc, r
CC=golang-dev
https://golang.org/cl/855043
2010-04-01 12:48:34 -07:00
Russ Cox
ec53627ed5 runtime: correct memory leak in select
* 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
https://golang.org/cl/875041
2010-04-01 11:56:18 -07:00
Evan Shaw
31693e9f14 kate: Update for recent language changes
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/849045
2010-03-31 19:50:27 -07:00
Russ Cox
69fd2a4ab7 build script tweaks
factor out environment variable checks.
infer $GOROOT etc during build if not set.
it's still necessary to set them for yourself
to use the standard Makefiles.

when running all.bash, don't recompile all the
go packages in run.bash, since make.bash already did.

R=r
CC=golang-dev
https://golang.org/cl/609042
2010-03-31 19:48:33 -07:00
Rob Pike
b12007c4ed testing/regexp: use recover.
R=rsc
CC=golang-dev
https://golang.org/cl/816042
2010-03-31 17:57:50 -07:00
Andrew Gerrand
9b04c9b1ea json: use panic/recover to handle errors in Marshal
R=r, gri
CC=golang-dev
https://golang.org/cl/872041
2010-04-01 11:19:37 +11:00
Robert Griesemer
735e00d4a0 go spec: clarification of type declarations
R=r, rsc
CC=golang-dev
https://golang.org/cl/849044
2010-03-31 16:37:22 -07:00
Nigel Tao
fd3e067e0f Delete xgb from the main repository. It has moved to
http://code.google.com/p/x-go-binding/

R=rsc
CC=golang-dev
https://golang.org/cl/846043
2010-04-01 10:14:42 +11:00
Russ Cox
5d230418c7 gc: fix alignment on non-amd64
R=ken2
CC=golang-dev
https://golang.org/cl/870041
2010-03-31 16:04:03 -07:00
Robert Griesemer
f67c90f941 tabwriter: use panic/recover to handle errors
R=rsc, r
CC=golang-dev
https://golang.org/cl/864042
2010-03-31 16:01:22 -07:00
Rob Pike
7de610cc61 regexp: use panic/recover to handle errors
R=rsc, gri
CC=golang-dev
https://golang.org/cl/821046
2010-03-31 15:58:21 -07:00
Russ Cox
63e878a750 runtime: make type assertion a runtime.Error, the first of many
R=r
CC=golang-dev
https://golang.org/cl/805043
2010-03-31 15:55:10 -07:00
Russ Cox
b6ad074efc test for panic and recover
R=r, adg
CC=golang-dev
https://golang.org/cl/869041
2010-03-31 11:47:09 -07:00
Russ Cox
9b1507b050 gc: implement panic and recover
R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/831042
2010-03-31 11:46:01 -07:00
Andrew Gerrand
c72f491ac2 godashboard: new stylesheet, build status pagination
R=rsc, gri, r
CC=golang-dev
https://golang.org/cl/822044
2010-03-31 17:01:16 +11:00
Andrew Gerrand
17a3f939f2 release.2010-03-30 part two
R=rsc
CC=golang-dev
https://golang.org/cl/859042
2010-03-31 12:38:54 +11:00
Rob Pike
884f3256f0 Unicode: fix stupid typo in comment.
R=rsc
CC=golang-dev
https://golang.org/cl/864041
2010-03-30 18:33:06 -07:00
Rob Pike
4e2b7f8f41 Unicode: provide an ability to supplement the case-mapping tables
in character and string case mapping routines.

Add a custom mapper for Turkish and Azeri.

A more general solution for deriving the case information from Unicode's
SpecialCasing.txt will require more work.

Fixes #703.

R=rsc, rsc1
CC=golang-dev, mdakin
https://golang.org/cl/824043
2010-03-30 17:51:03 -07:00
Andrew Gerrand
c2f3737cb0 release 2010-03-30
R=rsc, gri
CC=golang-dev
https://golang.org/cl/821045
2010-03-31 11:40:57 +11:00
Robert Griesemer
e8e4987ba3 godoc: support for title and subtitle headers when serving .html docs
and use it to show version (date) of go spec

Fixes #68.

R=rsc
CC=golang-dev, r
https://golang.org/cl/848042
2010-03-30 17:37:42 -07:00
Russ Cox
7ecefdc03f runtime: fix arm build, slightly.
R=r
CC=golang-dev
https://golang.org/cl/842042
2010-03-30 17:00:27 -07:00