Commit Graph

7071 Commits

Author SHA1 Message Date
Ken Thompson
ab4d8bf16c arm optimizer bug fixes
R=rsc
CC=golang-dev
https://golang.org/cl/3913043
2011-01-10 13:15:52 -08:00
Roger Peppe
212e074be2 time: add AfterFunc to call a function after a given duration.
The After code is trivially generalisable to provide support
for this, and it is possible to use AfterFunc to do
things that After cannot, such as waiting
for many events at varied times without an overhead
of one goroutine per event.

R=rsc, r
CC=golang-dev
https://golang.org/cl/3905041
2011-01-10 11:51:38 -08:00
Robert Griesemer
23410ced69 go/ast: correct end position for Index and TypeAssert expressions
- added position information for [ and ] brackets of Index and Slice expression nodes
- removed a TODO in go/printer

R=r, rsc
CC=golang-dev
https://golang.org/cl/3867045
2011-01-10 11:26:04 -08:00
Peter Mundy
2b0a276129 bytes: fix TrimSpace typo
Fixes #1401.

R=golang-dev, agl1
CC=golang-dev
https://golang.org/cl/3937041
2011-01-09 12:11:16 -05:00
Eoghan Sherry
0c02bd1801 time: fix tick accuracy when using multiple Tickers
* correctly ignore obsolete ticks
* fix update of next alarm time
* tighten alarm channel buffers
Fixes #1379.

R=r, adg, r2
CC=golang-dev, soul9
https://golang.org/cl/3789045
2011-01-08 21:24:44 -08:00
Peter Mundy
c6ed78a4c1 doc: contribution copyright year 2011
R=r
CC=golang-dev
https://golang.org/cl/3907042
2011-01-08 17:17:15 -08:00
Ian Lance Taylor
2d39303429 runtime: Restore scheduler stack position if cgo callback panics.
If we don't do this, then when C code calls back to Go code
which panics, we lose space on the scheduler stack.  If that
happens a lot, eventually there is no space left on the
scheduler stack.

R=rsc
CC=golang-dev
https://golang.org/cl/3898042
2011-01-08 10:22:37 -08:00
Adam Langley
66a45b486b encoding/line: add
I needed a way to read lines without worrying about \n and \r\n.

R=r, rsc
CC=golang-dev
https://golang.org/cl/2859041
2011-01-08 10:29:37 -05:00
Ken Thompson
4ed17ceace add peep
R=rsc
CC=golang-dev
https://golang.org/cl/3902042
2011-01-07 18:20:26 -08:00
Ken Thompson
90ca4d75a4 initial cut at arm optimizer
R=rsc
CC=golang-dev
https://golang.org/cl/3921041
2011-01-07 18:04:48 -08:00
Rob Pike
80055c658b arm: fix build
previous version was built with -l32; should be -b32

R=ken
CC=golang-dev
https://golang.org/cl/3867044
2011-01-07 17:17:42 -08:00
Robert Griesemer
a6820b65cb gofmt: don't attempt certain illegal rewrites
(e.g.: echo 'package main' | gofmt -r 'x->7'
cannot change the package name to 7)

R=rsc
CC=golang-dev
https://golang.org/cl/3913041
2011-01-07 15:04:41 -08:00
Rob Pike
f383062e01 time.NewTicker: panic for intervals <= 0.
Not absolutely certain it's right to do this, but since there's
no error value coming back, it seems reasonable.

Fixes #1392.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3896042
2011-01-07 14:41:46 -08:00
Rob Pike
353fd1014c bytes.Buffer: Fix bug in UnreadByte.
Error check was inverted.

Fixes #1396.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3851042
2011-01-07 14:41:33 -08:00
Robert Griesemer
9d634e50c7 gofmt: rewriter matches apply to expressions only
Fixes #1384.

R=rsc
CC=golang-dev
https://golang.org/cl/3912041
2011-01-07 13:33:29 -08:00
Adam Langley
ee58cc799e crypto/block: mark as deprecated.
R=rsc
CC=golang-dev
https://golang.org/cl/3909041
2011-01-07 16:17:47 -05:00
Andrew Gerrand
2c037b3616 tag release.2011-01-06
R=nigeltao, nigeltao_gnome
CC=golang-dev
https://golang.org/cl/3892041
2011-01-07 15:33:00 +11:00
Andrew Gerrand
41170c91e5 release.2011-01-06
R=nigeltao, nigeltao_gnome
CC=golang-dev
https://golang.org/cl/3829043
2011-01-07 15:28:25 +11:00
Ian Lance Taylor
1b2d5b4c93 ld: Permit an ELF symbol to be exported in the dynamic symbol table.
This permits exporting crosscall2 from the runtime/cgo
package.

R=rsc
CC=golang-dev
https://golang.org/cl/3885041
2011-01-06 16:37:05 -08:00
Andrew Gerrand
4cd31e8a28 doc: add golanguage.ru to foreign-language doc list
R=r, brainman, r2
CC=golang-dev
https://golang.org/cl/3881041
2011-01-07 09:34:13 +11:00
Russ Cox
02327a72d7 cgo: disallow use of C.errno
It's incorrect, and it causes cryptic linker errors.

Fixes #1360.

R=r, r2
CC=golang-dev
https://golang.org/cl/3880041
2011-01-06 15:15:31 -05:00
Russ Cox
c1fbe589a9 Make.pkg: use installed runtime.h for cgo
Fixes #1381.

R=r, r2
CC=golang-dev
https://golang.org/cl/3775050
2011-01-06 15:15:22 -05:00
Anthony Martin
db89e19d26 runtime/cgo: fix stackguard on FreeBSD/amd64
A cursory reading of the cgo code suggests this
should be necessary, though I don't have access
to a FreeBSD machine for testing.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3746047
2011-01-06 11:36:47 -05:00
Russ Cox
2281ca169c gc: fix &^=
Fixes #1394.

R=ken2
CC=golang-dev
https://golang.org/cl/3879041
2011-01-06 11:21:18 -05:00
Russ Cox
a46102d209 crypto/cipher: make NewCBCEncrypter return BlockMode
Fixes #1389.

R=agl1
CC=golang-dev
https://golang.org/cl/3827043
2011-01-06 11:21:04 -05:00
Kyle Consalus
754f0402c3 Made format string handling more efficient.
R=rsc, r, r2
CC=golang-dev
https://golang.org/cl/3421042
2011-01-05 11:42:35 -08:00
Rob Pike
29d0f02bd2 effective go: explain the effect of repanicking better.
Also fix a <p> error in go_spec.html.

Fixes #1370.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/3835043
2011-01-05 11:39:57 -08:00
Russ Cox
0f26608ebc io: fix Copyn EOF handling
Fixes #1383.

R=r
CC=golang-dev
https://golang.org/cl/3821044
2011-01-05 14:35:13 -05:00
Russ Cox
189d4ff776 syscall: correct Linux Splice definition
Fixes #1376.

R=r
CC=golang-dev
https://golang.org/cl/3869042
2011-01-05 14:35:07 -05:00
Kyle Lemons
ddc2710d69 goinstall: add -clean flag
R=adg, rsc
CC=golang-dev
https://golang.org/cl/3821042
2011-01-05 14:34:59 -05:00
Russ Cox
c22c6daca0 A+C: Kyle Lemons (individual CLA)
R=gri
CC=golang-dev
https://golang.org/cl/3766045
2011-01-05 14:34:45 -05:00
Anthony Martin
94df1a067c gc: return constant floats for parts of complex constants
Fixes #1369.

R=rsc
CC=golang-dev
https://golang.org/cl/3731046
2011-01-05 13:12:30 -05:00
Rob Pike
c0332fc93f fmt: normalize processing of format string
The old loop was a bit odd; change it to be more regular.
This also enables a diagnostic for Printf("%", 3): %!(NOVERB)

R=rsc, Kyle C
CC=golang-dev
https://golang.org/cl/3749044
2011-01-05 10:11:34 -08:00
Brad Fitzpatrick
d71d08af5a http: permit empty Reason-Phrase in response Status-Line
Fixes #1388.

R=rsc
CC=golang-dev
https://golang.org/cl/3749043
2011-01-05 13:09:38 -05:00
Robert Griesemer
4a7d1f2061 go/ast: correct Pos/End ranges for field lists
R=rsc
CC=golang-dev
https://golang.org/cl/3797045
2011-01-05 10:08:39 -08:00
Rob Pike
d84317ba58 gob: generate a better error message in one confusing place
(with maybe more to come) by printing a human-readable
representation of a remote type.

R=rsc
CC=golang-dev
https://golang.org/cl/3802045
2011-01-05 09:28:47 -08:00
Ian Lance Taylor
e9c4f09985 syscall: Make Access second argument consistently uint32.
Fixes #1377.

R=rsc, adg, r
CC=golang-dev
https://golang.org/cl/3868041
2011-01-04 22:28:31 -08:00
Nigel Tao
3f38342e24 doc: update contribution guidelines to prefix the change description
with the primary affected package.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3867041
2011-01-05 13:00:08 +11:00
Roger Peppe
2f5a5be237 strings: fix description of FieldsFunc
R=r
CC=golang-dev
https://golang.org/cl/3814041
2011-01-04 16:23:29 -08:00
Robert Griesemer
8184778abf fix occurrences of occur[^sr .,?!;\n]
R=r, r2
CC=golang-dev
https://golang.org/cl/3794043
2011-01-04 13:16:50 -08:00
Icarus Sparry
6773f1426f The Dec 06 change
changeset:   6839:545c9926d61a
	user:        Robert Griesemer <gri@golang.org>
	date:        Mon Dec 06 14:23:18 2010 -0800
	summary:     go/ast: use token.Pos instead of token.Position; adjust all dependent code
broke 'godoc -src fmt', one of the example uses of godoc. It gives a stack backtrace essentially
caused by dereferencing a NULL pointer (in C terms). This change fixes the particular issue, but
the code probably should be made more robust.
Fixes #3818044.

R=gri
CC=golang-dev
https://golang.org/cl/3818044
2011-01-04 13:16:29 -08:00
Rob Pike
6a5a527173 regexp: implement early out for failed anchored search.
R=rsc
CC=golang-dev
https://golang.org/cl/3813045
2011-01-04 12:43:52 -08:00
Patrick Gavlin
236f9638b4 encoding/binary: reject types with implementation-dependent sizes
Fixes #1201.

R=rsc
CC=golang-dev
https://golang.org/cl/3787044
2011-01-04 13:42:50 -05:00
Russ Cox
3cd10e3a0d merge tree 2011-01-04 13:40:41 -05:00
Patrick Gavlin
4e5a59591b gc: rewrite complex /= to l = l / r.
Fixes #1368.

R=rsc, ejsherry
CC=golang-dev
https://golang.org/cl/3811042
2011-01-04 13:14:17 -05:00
Robert Griesemer
9214016b3d go/ast: provide complete node text range info
- add End() method to all nodes; the text range of a node n is [n.Pos(), n.End())
- various small bug fixes in the process
- fixed several comments

R=r, rsc
CC=golang-dev
https://golang.org/cl/3769042
2011-01-04 10:14:16 -08:00
Russ Cox
71793d4b42 strconv: update ftoa comment for 'E' and 'G'
Inspired by 3827042.

R=gri, peterGo
CC=golang-dev
https://golang.org/cl/3858042
2011-01-04 13:13:12 -05:00
Russ Cox
2aa75f702c A+C: Patrick Gavlin (individual CLA)
R=r
CC=golang-dev, pgavlin
https://golang.org/cl/3763043
2011-01-04 13:07:00 -05:00
Michael Hoisie
ed1cbca81f net: fix close of Listener
Fixes #1375.

R=rsc, r
CC=golang-dev
https://golang.org/cl/3731048
2011-01-04 11:55:13 -05:00
Nigel Tao
bf453eba90 doc: update Effective Go for template API change.
The original change 3378041 was submitted in December 2010:
template: change the signature of formatters for future development.

R=adg
CC=golang-dev
https://golang.org/cl/3862041
2011-01-04 15:52:03 +11:00