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

5158 Commits

Author SHA1 Message Date
Brad Fitzpatrick
3aee82b660 encoding/line: make it an io.Reader too
R=agl1, bradfitzwork, rsc
CC=golang-dev
https://golang.org/cl/4066043
2011-01-26 09:59:53 -05:00
Russ Cox
434f1e32a0 runtime: remove tiny
It is unmaintained and untested, and I think it's broken too.
It was a toy to show that Go can run on real hardware,
and it served its purpose.

The source code will of course remain in the repository
history, so it could be brought back if needed later.

R=r, r2, uriel
CC=golang-dev
https://golang.org/cl/3996047
2011-01-26 08:41:23 -05:00
Andrew Gerrand
add4e167e3 doc/codelab/wiki: update to work with template changes, add to run.bash
Fixes #1444.

R=rsc, r
CC=golang-dev
https://golang.org/cl/3979045
2011-01-26 14:56:52 +10:00
Alex Brainman
b7949035d6 runtime: fix windows build
R=golang-dev
CC=golang-dev
https://golang.org/cl/4052046
2011-01-26 09:50:15 +11:00
Russ Cox
afc6928ad9 runtime: prefer fixed stack allocator over general memory allocator
* move stack constants from proc.c to runtime.h
  * make memclr take uintptr length

R=r
CC=golang-dev
https://golang.org/cl/3985046
2011-01-25 16:35:36 -05:00
Robert Griesemer
eaae95fa3d scanner: fix Position returned by Scan, Pos
The implementation of the position computation
was surprisingly broken. Implemented fixes and
added extra test cases.

There is a slight interface change: Calling
Pos() returns the current position; but if
called before Scan() that position may not
be the position of the next token returned
by Scan() (depending on the scan settings
and the source text) - this in contrast to
the original comment.

However, after calling Scan(), the Scanner's
Position field reports the position of the
scanned token, as before.

Fixes #1327.

R=rsc
CC=golang-dev
https://golang.org/cl/3972047
2011-01-25 13:32:56 -08:00
Roger Peppe
2ae953bfc3 time: allow cancelling of After events.
Also simplify sleeper algorithm and poll
occasionally so redundant sleeper goroutines
will quit sooner.

R=r, niemeyer, r2
CC=golang-dev
https://golang.org/cl/4063043
2011-01-25 12:25:48 -08:00
Luuk van Dijk
66905bd9ac cc: fix -q and build break.
R=rsc
CC=golang-dev, golang-dev
https://golang.org/cl/3992047
2011-01-25 19:40:36 +01:00
Luuk van Dijk
efda876a94 cc: mode to generate go-code for types and variables.
R=rsc
CC=golang-dev
https://golang.org/cl/3987045
2011-01-25 19:00:14 +01:00
Adam Langley
166008b988 crypto/dsa: add support for DSA
R=bradfitzgo, r, bradfitzwork, nsz, rsc
CC=golang-dev
https://golang.org/cl/3990043
2011-01-25 12:25:53 -05:00
David Anderson
d0e6c7e134 crypto/rsa: correct docstring for SignPKCS1v15.
The docstring claims the function uses PSS message encoding,
when the function actually implements PKCS1-v1_5 encoding.

R=agl1, rsc
CC=danderson, golang-dev
https://golang.org/cl/4097042
2011-01-25 10:52:36 -05:00
Russ Cox
d9f1ddbee1 make.bash: stricter selinux test
SELinux can be installed but not turned on.
Don't complain unless it is actually turned on.

https://bugzilla.redhat.com/show_bug.cgi?id=652987#c20

R=agl
CC=golang-dev
https://golang.org/cl/3979044
2011-01-25 10:19:39 -05:00
Hector Chu
90294a08c8 runtime: make Walk webbrowser example work
R=rsc, brainman, lxn
CC=golang-dev
https://golang.org/cl/4005045
2011-01-25 17:56:33 +11:00
Robert Griesemer
1161d19024 scanner: error handler must be provided to Init
Init may report an error on the first character and
thus one needs an ability to set the error handler
for Init. Was a design bug.

Added corresponding test cases and better documentation.
Also: Fixed a subtle infinite loop exposed by one of the
new test cases.

Fixes #1380.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/4094041
2011-01-24 14:12:20 -08:00
Eric Eisner
ab036abdf0 suffixarray: use binary search for both ends of Lookup
This prevents many unnecessary comparisons when n is large.

R=gri, gri1, rsc
CC=golang-dev
https://golang.org/cl/4068043
2011-01-24 13:03:32 -08:00
Luuk van Dijk
2aa6cf3e7e [68]l: more robust decoding of reflection type info in generating dwarf.
R=rsc
CC=golang-dev, golang-dev
https://golang.org/cl/4106041
2011-01-24 20:59:39 +01:00
Roger Peppe
72084068a4 template: treat map keys as zero, not non-existent.
R=adg, r, hoka, rsc
CC=golang-dev
https://golang.org/cl/4036045
2011-01-24 14:12:54 -05:00
Russ Cox
e7183e7518 net: return cname in LookupHost
Fixes #1395.

R=adg
CC=golang-dev
https://golang.org/cl/4036044
2011-01-24 14:12:43 -05:00
Rob Pike
4871d0d19a encoding/line: fix up a few typos and infelicities in the doc comments
R=anschelsc, agl1
CC=golang-dev
https://golang.org/cl/3988045
2011-01-24 10:19:23 -08:00
Pieter Droogendijk
c4513d3b6f json: handle capital floating point exponent (1E100).
When parsing numbers with an exponent (like "12e-1"), the JSON scanner
would only allow a lowercase 'e', while the RFC also allows the
uppercase 'E'.

R=adg
CC=golang-dev, rsc
https://golang.org/cl/3986042
2011-01-24 18:10:50 +10:00
Rob Pike
a0a4e85ad6 gob: report an error when encoding a non-empty struct with
no public fields.
Fix a couple of tests caught out by this change.

R=rsc
CC=golang-dev
https://golang.org/cl/4044043
2011-01-22 00:10:11 -08:00
Alex Brainman
f0b8f84d37 runtime: implementation of callback functions for windows
R=rsc, lxn, alex.brainman, dho
CC=golang-dev
https://golang.org/cl/1696051
2011-01-22 13:55:53 +11:00
Rob Pike
7f6ffade32 gob: fix the grammar comments to match the encoder
(or at least a correct encoder, still to come).
Change the debug structure slightly to better represent
the grammar.
Minor tweaks for consistency in type.go.

R=rsc
CC=golang-dev
https://golang.org/cl/4007044
2011-01-21 16:10:39 -08:00
Russ Cox
7e84666df1 gc: clearer error for struct == struct
cmp6.go:48: invalid operation: t3 == t3 (operator == not defined on struct)

Fixes #1438.

R=ken2
CC=golang-dev
https://golang.org/cl/4003045
2011-01-21 18:15:59 -05:00
Ian Lance Taylor
9e441e5215 net: Fix race condition in test.
The test code used to do this:

for _, tc := range tests {
	ch <- &tc
}

Note that &tc is always the same value here.  As the value is
received from the channel, the sender can loop around and
change the contents of tc.  This means that the receiver's
value is unstable and can change while it is in use.

R=adg, r2, rsc
CC=chris, golang-dev
https://golang.org/cl/3978043
2011-01-21 13:57:52 -08:00
Russ Cox
27c74d3499 spec, runtime, tests: send on closed channel panics
Close of closed channel panics.
Receive from closed channel never panics,
even if done repeatedly.

Fixes #1349.
Fixes #1419.

R=gri, iant, ken2, r, gri1, r2, iant2, rog, albert.strasheim, niemeyer, ejsherry
CC=golang-dev
https://golang.org/cl/3989042
2011-01-21 15:07:13 -05:00
Rob Pike
5b5a674b46 gob: better debugging, commentary
Re-implement the debugging helper to be independent of the existing
implementation.  This is preparatory to a rewrite to clean up issue 1416.
Include a definition of the grammar of the data stream.

R=rsc
CC=golang-dev
https://golang.org/cl/3970045
2011-01-21 11:28:53 -08:00
Luuk van Dijk
5cf120827c cc: remove pickle generation code.
R=rsc
CC=golang-dev
https://golang.org/cl/4083043
2011-01-21 17:59:35 +01:00
Anschel Schaffer-Cohen
3921d26300 Use defer to unlock mutex in crypto/rand.
R=agl1
CC=golang-dev
https://golang.org/cl/3991045
2011-01-21 10:14:43 -05:00
Anschel Schaffer-Cohen
49e2888a96 Fixed documentation for netchan import()
This was broken after the last update (2011-01-20).
	However, I'm not sure if the changed example is a
	sensible use of import(), so I'd appreciate comments.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4067043
2011-01-20 19:58:08 -08:00
Robert Griesemer
955aa159ad godoc: show line numbers for non-go files (bug fix)
Also: Give line numbers a style and make them less intrusive.

R=rsc
CC=golang-dev
https://golang.org/cl/4060043
2011-01-20 10:43:55 -08:00
Russ Cox
3c7104479c runtime: drop CLONE_PARENT
The functionality we want (shared ppid) is implied
by CLONE_THREAD already, and CLONE_PARENT
causes problems if the Go program is pid 1 (init).

See issue 1406 for more details.

Fixes #1406.

R=adg, iant
CC=golang-dev
https://golang.org/cl/3971044
2011-01-20 13:36:00 -05:00
Russ Cox
32a8f5a874 gotest: new cgo does not require LD_LIBRARY_PATH
Fixes #1410.

R=r
CC=golang-dev
https://golang.org/cl/4072043
2011-01-20 13:11:06 -05:00
Miek Gieben
40c7449044 encoding/base32: new package
R=rsc
CC=Miek Gieben, golang-dev
https://golang.org/cl/3926041
2011-01-20 12:51:15 -05:00
Russ Cox
ecbcd816dc unsafe: add missing case to doc for Pointer
Fixes #1433.

R=r, gri
CC=golang-dev
https://golang.org/cl/3999047
2011-01-20 12:50:50 -05:00
Russ Cox
50fe459ce2 6g: fix uint64(uintptr(unsafe.Pointer(&x)))
Fixes #1417.

R=ken2
CC=golang-dev
https://golang.org/cl/4079042
2011-01-20 12:50:35 -05:00
Russ Cox
8b8cd0e4c4 http: follow relative redirect in Get
Fixes #1431.

R=bradfitz, dangabrad
CC=golang-dev
https://golang.org/cl/4077042
2011-01-20 12:50:27 -05:00
Russ Cox
e8f2692ca2 5l: document -F, force it on old ARMs
Fixes #1341.

R=ken2, r
CC=golang-dev
https://golang.org/cl/4006045
2011-01-20 12:50:10 -05:00
Wei Guangjing
f1751e7de5 8l: emit DWARF in Windows PE.
R=rsc, lvd, brainman, Joe Poirier
CC=golang-dev
https://golang.org/cl/2124041
2011-01-20 11:28:30 -05:00
Wei Guangjing
1aa2d88739 cgo: windows/386 port
R=rsc, peterGo, brainman
CC=golang-dev
https://golang.org/cl/3733046
2011-01-20 10:22:20 -05:00
Wei Guangjing
3aec5516ed 6l: windows/amd64 port
R=rsc
CC=golang-dev
https://golang.org/cl/3746044
2011-01-20 09:21:10 -05:00
Hector Chu
6c240d7671 runtime: fix tabs in windows/386/sys.s
R=rsc, brainman
CC=golang-dev
https://golang.org/cl/4030043
2011-01-20 09:21:04 -05:00
Russ Cox
4f269d3060 runtime: make select fairer
The o+i*p approach to visiting select cases in random
order stops being fair when there is some case that
is never ready.  If that happens, then the case that follows
it in the order gets more chances than the others.

In general the only way to ensure fairness is to make
all permutations equally likely.  I've done that by computing
one explicitly.

Makes the permutations correct for n >= 4 where
previously they were broken.  For n > 12, there's not
enough randomness to do a perfect job but this should
still be much better than before.

Fixes #1425.

R=r, ken2, ejsherry
CC=golang-dev
https://golang.org/cl/4037043
2011-01-20 09:20:47 -05:00
Adam Langley
0bec484e6f crypto/openpgp: add s2k
s2k implements the string-to-key functions for OpenPGP

R=rsc
CC=golang-dev
https://golang.org/cl/3937043
2011-01-20 07:38:34 -05:00
Alex Brainman
6d94b14e19 syscall: include all, even duplictate, invented error messages
Otherwise syscall.Errstr() returns "" for some (EWOULDBLOCK) errors.

R=rsc
CC=golang-dev
https://golang.org/cl/3941041
2011-01-20 21:24:15 +11:00
Alex Brainman
de2184f3a8 net: get tests working to fix windows build
R=golang-dev
CC=golang-dev
https://golang.org/cl/4089041
2011-01-20 19:18:04 +11:00
Russ Cox
b7bf2a3a0b net: fix windows build (?)
TBR=adg
CC=golang-dev
https://golang.org/cl/4083042
2011-01-20 00:16:16 -05:00
Russ Cox
f2b5a07453 delete float, complex - code changes
also:
	cmplx -> complex
	float64(1.0) -> 1.0
	float64(1) -> 1.0

R=gri, r, gri1, r2
CC=golang-dev
https://golang.org/cl/3991043
2011-01-19 23:09:00 -05:00
Russ Cox
0849944694 gc: delete float, complex
rename cmplx -> complex

R=ken2
CC=golang-dev
https://golang.org/cl/4071041
2011-01-19 23:08:11 -05:00
Andrew Gerrand
5eb8c9baa7 net: remove duplicate import of runtime
R=rsc
CC=golang-dev
https://golang.org/cl/3999046
2011-01-20 12:56:32 +11:00