Commit Graph

6180 Commits

Author SHA1 Message Date
Evan Shaw
28a0971caf big: Several fixes to bitwise functions
Fixed:
* SetString calls in bitwise tests
* Aliasing problem with self bitwise test
* One test case that was just flat out wrong
* Slice panics in nat.or and nat.xor
* Aliasing problems in Int.And, Int.AndNot, Int.Or, Int.Xor

Fixes #1007.

R=gri
CC=golang-dev
https://golang.org/cl/1895049
2010-08-09 10:21:54 -07:00
Nicholas Waples
e2c7e53dcf asn1 incorrectly encoded signed integers. When determining the
encoded length it was not taking into account the sign bit.

Fixes #997.

R=agl1, gri
CC=golang-dev
https://golang.org/cl/1870047
2010-08-09 10:25:54 -04:00
Alex Brainman
bc4a9caa41 runtime: free memory returned by windows GetEnvironmentStrings
R=golang-dev
CC=golang-dev
https://golang.org/cl/1917048
2010-08-09 11:30:33 +10:00
Alex Brainman
dbef0711d4 os: fix ForkExec() handling of envv == nil
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1913047
2010-08-09 11:21:20 +10:00
Nigel Tao
893fdbbe5d image: introduce Decode and RegisterFormat.
R=r, rsc
CC=golang-dev
https://golang.org/cl/1849054
2010-08-09 10:44:38 +10:00
Russ Cox
844a86317d net/textproto: new package, with example net/dict
Generic text-based network protcol library for SMTP-like protocols.
HTTP and NNTP should be changed to use this package,
and I expect that SMTP and POP3 will be able to use it too.

R=cemeyer, nigeltao_golang, r
CC=golang-dev, petar-m
https://golang.org/cl/889041
2010-08-06 17:37:45 -07:00
Rob Pike
18063d4686 fmt.Scan: empty strings are errors
Fixes #1002.

R=rsc
CC=golang-dev
https://golang.org/cl/1882046
2010-08-07 10:02:04 +10:00
Kai Backman
df88fc6109 arm: bugfixes and syscall
- integer divide by zero raises panic
- float comparisons involving NaNs work
- syscall interface actually handles return
  values and errno correctly.

R=rsc, bradfitzpatrick
CC=golang-dev
https://golang.org/cl/1847047
2010-08-06 16:57:49 -07:00
Charles L. Dorian
c8c2bdbc59 math: fix amd64 Hypot.
Underflow/overflow tests for exp_amd64.s

Fixes #957.

R=rsc
CC=golang-dev
https://golang.org/cl/1817041
2010-08-06 16:50:48 -07:00
Roger Peppe
b92db49c26 encoding/binary: add complex
R=rsc
CC=golang-dev
https://golang.org/cl/1879043
2010-08-06 16:44:38 -07:00
Anschel Schaffer-Cohen
8055f47029 exp/iterable: add UintArray
all other basic types seem to be represented.

R=rsc
CC=golang-dev
https://golang.org/cl/1919042
2010-08-06 16:39:18 -07:00
Russ Cox
8c5f30c0d9 A+C: Anschel Schaffer-Cohen (individual CLA)
R=gri
CC=golang-dev
https://golang.org/cl/1893045
2010-08-06 16:31:12 -07:00
Robert Griesemer
1dd8840800 test/peano: use directly recursive type def
Test case for http://code.google.com/p/go/issues/detail?id=999

R=r
CC=golang-dev
https://golang.org/cl/1892050
2010-08-06 15:07:54 -07:00
Russ Cox
64f24107e1 A+C: Nicholas Waples and Mathieu Lonjaret (individual CLA)
R=gri
CC=golang-dev
https://golang.org/cl/1856054
2010-08-06 13:10:47 -07:00
Alex Brainman
e96b6835a9 fix windows build
R=rsc
CC=golang-dev
https://golang.org/cl/1890045
2010-08-06 09:42:55 +10:00
Rob Pike
c78be462a0 once: replace all uses of package once with sync.Once.
package once remains for now; will be deleted after next release.

R=golang-dev, brainman
CC=golang-dev
https://golang.org/cl/1914046
2010-08-06 06:14:41 +10:00
Christian Himpel
75f6a0c759 bytes: add IndexRune, FieldsFunc and To*Special
Basically these functions are implemented the same way as the
corresponding functions in the strings package.  Test functions
are implemented for IndexRune and FieldsFunc.

Additionally two typos are fixed in packages bytes and strings.

R=r
CC=golang-dev
https://golang.org/cl/1696062
2010-08-05 23:11:06 +10:00
Rob Pike
895c5db6df sync: add sync.Once, a proposed replacement for package once.
This implementation is simpler and more useful, since it can work
with methods.

R=rsc
CC=golang-dev
https://golang.org/cl/1864051
2010-08-05 13:31:10 +10:00
Andrew Gerrand
9265bc2484 tag release.2010-08-04
R=rsc
CC=golang-dev
https://golang.org/cl/1863051
2010-08-05 13:21:41 +10:00
Andrew Gerrand
a1e3826730 release.2010-08-04
R=rsc
CC=golang-dev
https://golang.org/cl/1892049
2010-08-05 13:18:49 +10:00
Alex Brainman
8251e72aea path: fix comment for Split()
R=golang-dev
CC=golang-dev
https://golang.org/cl/1905050
2010-08-05 11:43:53 +10:00
Robert Griesemer
d9e2631b53 go/parser.ParseFiles: don't override error (to nil) if there is one
Also: Return first instead of last error as that seems more useful.

R=r
CC=golang-dev
https://golang.org/cl/1897050
2010-08-04 18:02:43 -07:00
Robert Griesemer
ed8c23149f fix build: literal types cannot be parenthesized anymore
R=rsc
CC=golang-dev
https://golang.org/cl/1849055
2010-08-04 17:58:56 -07:00
Russ Cox
e473f42b2d amd64: use segment memory for thread-local storage
Returns R14 and R15 to the available register pool.
Plays more nicely with ELF ABI C code.
In particular, our signal handlers will no longer crash
when a signal arrives during execution of a cgo C call.

Fixes #720.

R=ken2, r
CC=golang-dev
https://golang.org/cl/1847051
2010-08-04 17:50:22 -07:00
Christian Himpel
3dc6c9e64d misc/vim: highlight misspelled words only in comments
R=adg
CC=golang-dev
https://golang.org/cl/1915043
2010-08-05 10:31:00 +10:00
Robert Griesemer
03f42934c1 gofmt/go/parser: strengthen syntax checks
- don't allow parenthesized receiver base types or anonymous fields
- fixed a couple of other omissions
- adjusted gofmt test script
- removed several TODOs

R=rsc
CC=golang-dev
https://golang.org/cl/1897043
2010-08-04 17:21:02 -07:00
Alex Brainman
12576f9e70 goinstall: check for error from exec.*Cmd.Wait() before using its result
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/1923043
2010-08-04 17:18:57 -07:00
Christian Himpel
6b8ec5c572 cgo: generate correct multiple return value function invocations
Fixes #967.

R=rsc
CC=golang-dev
https://golang.org/cl/1855051
2010-08-04 17:15:04 -07:00
Russ Cox
3f16c5cee1 A+C: fix email address
R=adg
CC=golang-dev
https://golang.org/cl/1856052
2010-08-04 17:14:51 -07:00
Robert Griesemer
a6449b66a4 gofmt: make code more readable by avoiding redeclaration
R=r
CC=golang-dev
https://golang.org/cl/1910045
2010-08-03 23:39:01 -07:00
Scott Lawrence
99aab8bacb bytes: added test case for explode with blank string.
Tests for the equivalent of the strings.explode("") panic bug (issue 980).

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1850052
2010-08-04 13:33:24 +10:00
Anthony Martin
2db4c3d779 json: object members must have a value
R=rsc
CC=golang-dev
https://golang.org/cl/1847050
2010-08-03 17:05:00 -07:00
Russ Cox
3ab7830d7d A+C: Anthony Martin, Christian Himpel (individual CLA)
R=adg
CC=golang-dev
https://golang.org/cl/1689061
2010-08-03 17:04:54 -07:00
Nigel Tao
27e249049e bufio: introduce Peek.
I'll leave whether or not this obsoletes UnreadByte for a future CL.

R=r, rsc
CC=golang-dev
https://golang.org/cl/1912042
2010-08-04 09:44:02 +10:00
Rob Pike
e45b58fe96 os: change the type of permissions argument for Open etc. to uint32.
Besides being more correct, it protects against people accidentally
exchanging the permission and open mode arguments to Open.

R=rsc
CC=golang-dev
https://golang.org/cl/1904045
2010-08-04 08:34:52 +10:00
Tarmigan Casebolt
1badb46313 websocket: correct challenge response
Tested against latest Chrome.

R=ukai, rsc
CC=golang-dev
https://golang.org/cl/1743053
2010-08-03 14:34:44 -07:00
Kai Backman
d0b913fe37 bikeshed: only output bug when we have a regression
R=rsc
CC=golang-dev
https://golang.org/cl/1897046
2010-08-03 13:09:16 -07:00
Russ Cox
5960f835ca CONTRIBUTORS: Rietveld alias for brad@danga.com
R=adg
CC=bradfitz, golang-dev
https://golang.org/cl/1715060
2010-08-03 13:04:02 -07:00
Peter Mundy
12befd063b os: Null device
R=rsc, cw
CC=golang-dev
https://golang.org/cl/1854042
2010-08-03 13:03:50 -07:00
Kai Backman
311973ea56 arm: remove old qemu dependency from gotest
R=rsc
CC=golang-dev
https://golang.org/cl/1678063
2010-08-03 13:03:40 -07:00
Russ Cox
d4af41f5bb test/run: diff old new
R=r, iant
CC=golang-dev
https://golang.org/cl/1907046
2010-08-03 13:01:28 -07:00
Adam Langley
7748a7f159 crypto/x509: unwrap Subject Key Identifier
RFC 5280, 4.2.1.2 says:
  SubjectKeyIdentifier ::= KeyIdentifier
  KeyIdentifier ::= OCTET STRING

Previously, we were failing to unwrap the second level of OCTET STRING
encoding.

Fixes #993.

R=rsc
CC=golang-dev
https://golang.org/cl/1917044
2010-08-03 12:26:48 -04:00
Russ Cox
3f19d8ae8d gc: empty select
R=ken2
CC=golang-dev
https://golang.org/cl/1871057
2010-08-03 01:07:57 -07:00
Russ Cox
585eae3bce gc: bug301
Fixes #990.

R=ken2
CC=golang-dev
https://golang.org/cl/1742055
2010-08-03 01:07:40 -07:00
Russ Cox
c6cb303a8a gc: bug299, bug300
R=ken2
CC=golang-dev
https://golang.org/cl/1731057
2010-08-03 00:53:32 -07:00
Russ Cox
b91c70ad52 A+C: Tarmigan Casebolt
R=adg
CC=golang-dev, tarm
https://golang.org/cl/1923041
2010-08-03 00:36:44 -07:00
Russ Cox
9bac9d23d3 gc: index bounds tests and fixes
move constant index checking to front end
x[2:1] is a compile-time error now too

R=ken2
CC=golang-dev
https://golang.org/cl/1848056
2010-08-03 00:26:02 -07:00
Scott Lawrence
0cd8777255 strings: fix Split("", "", -1)
Fixes #980.

Made it return an empty array, rather than crash.
Added relevant test cases to strings.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1914041
2010-08-03 13:35:14 +10:00
Rob Pike
b6c2bf7127 Add Scott Lawrence to C&A
R=adg
CC=golang-dev
https://golang.org/cl/1899044
2010-08-03 13:27:50 +10:00
Alex Brainman
a79a9098da syscall: make sure go error numbers do not clash with windows system errors
R=rsc
CC=golang-dev
https://golang.org/cl/1857049
2010-08-03 12:04:41 +10:00