]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
13 years agorelease.2010-08-04 weekly.2010-08-04
Andrew Gerrand [Thu, 5 Aug 2010 03:18:49 +0000 (13:18 +1000)]
release.2010-08-04

R=rsc
CC=golang-dev
https://golang.org/cl/1892049

13 years agopath: fix comment for Split()
Alex Brainman [Thu, 5 Aug 2010 01:43:53 +0000 (11:43 +1000)]
path: fix comment for Split()

R=golang-dev
CC=golang-dev
https://golang.org/cl/1905050

13 years agogo/parser.ParseFiles: don't override error (to nil) if there is one
Robert Griesemer [Thu, 5 Aug 2010 01:02:43 +0000 (18:02 -0700)]
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

13 years agofix build: literal types cannot be parenthesized anymore
Robert Griesemer [Thu, 5 Aug 2010 00:58:56 +0000 (17:58 -0700)]
fix build: literal types cannot be parenthesized anymore

R=rsc
CC=golang-dev
https://golang.org/cl/1849055

13 years agoamd64: use segment memory for thread-local storage
Russ Cox [Thu, 5 Aug 2010 00:50:22 +0000 (17:50 -0700)]
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

13 years agomisc/vim: highlight misspelled words only in comments
Christian Himpel [Thu, 5 Aug 2010 00:31:00 +0000 (10:31 +1000)]
misc/vim: highlight misspelled words only in comments

R=adg
CC=golang-dev
https://golang.org/cl/1915043

13 years agogofmt/go/parser: strengthen syntax checks
Robert Griesemer [Thu, 5 Aug 2010 00:21:02 +0000 (17:21 -0700)]
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

13 years agogoinstall: check for error from exec.*Cmd.Wait() before using its result
Alex Brainman [Thu, 5 Aug 2010 00:18:57 +0000 (17:18 -0700)]
goinstall: check for error from exec.*Cmd.Wait() before using its result

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/1923043

13 years agocgo: generate correct multiple return value function invocations
Christian Himpel [Thu, 5 Aug 2010 00:15:04 +0000 (17:15 -0700)]
cgo: generate correct multiple return value function invocations

Fixes #967.

R=rsc
CC=golang-dev
https://golang.org/cl/1855051

13 years agoA+C: fix email address
Russ Cox [Thu, 5 Aug 2010 00:14:51 +0000 (17:14 -0700)]
A+C: fix email address

R=adg
CC=golang-dev
https://golang.org/cl/1856052

13 years agogofmt: make code more readable by avoiding redeclaration
Robert Griesemer [Wed, 4 Aug 2010 06:39:01 +0000 (23:39 -0700)]
gofmt: make code more readable by avoiding redeclaration

R=r
CC=golang-dev
https://golang.org/cl/1910045

13 years agobytes: added test case for explode with blank string.
Scott Lawrence [Wed, 4 Aug 2010 03:33:24 +0000 (13:33 +1000)]
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

13 years agojson: object members must have a value
Anthony Martin [Wed, 4 Aug 2010 00:05:00 +0000 (17:05 -0700)]
json: object members must have a value

R=rsc
CC=golang-dev
https://golang.org/cl/1847050

13 years agoA+C: Anthony Martin, Christian Himpel (individual CLA)
Russ Cox [Wed, 4 Aug 2010 00:04:54 +0000 (17:04 -0700)]
A+C: Anthony Martin, Christian Himpel (individual CLA)

R=adg
CC=golang-dev
https://golang.org/cl/1689061

13 years agobufio: introduce Peek.
Nigel Tao [Tue, 3 Aug 2010 23:44:02 +0000 (09:44 +1000)]
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

13 years agoos: change the type of permissions argument for Open etc. to uint32.
Rob Pike [Tue, 3 Aug 2010 22:34:52 +0000 (08:34 +1000)]
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

13 years agowebsocket: correct challenge response
Tarmigan Casebolt [Tue, 3 Aug 2010 21:34:44 +0000 (14:34 -0700)]
websocket: correct challenge response

Tested against latest Chrome.

R=ukai, rsc
CC=golang-dev
https://golang.org/cl/1743053

13 years agobikeshed: only output bug when we have a regression
Kai Backman [Tue, 3 Aug 2010 20:09:16 +0000 (13:09 -0700)]
bikeshed: only output bug when we have a regression

R=rsc
CC=golang-dev
https://golang.org/cl/1897046

13 years agoCONTRIBUTORS: Rietveld alias for brad@danga.com
Russ Cox [Tue, 3 Aug 2010 20:04:02 +0000 (13:04 -0700)]
CONTRIBUTORS: Rietveld alias for brad@danga.com

R=adg
CC=bradfitz, golang-dev
https://golang.org/cl/1715060

13 years agoos: Null device
Peter Mundy [Tue, 3 Aug 2010 20:03:50 +0000 (13:03 -0700)]
os: Null device

R=rsc, cw
CC=golang-dev
https://golang.org/cl/1854042

13 years agoarm: remove old qemu dependency from gotest
Kai Backman [Tue, 3 Aug 2010 20:03:40 +0000 (13:03 -0700)]
arm: remove old qemu dependency from gotest

R=rsc
CC=golang-dev
https://golang.org/cl/1678063

13 years agotest/run: diff old new
Russ Cox [Tue, 3 Aug 2010 20:01:28 +0000 (13:01 -0700)]
test/run: diff old new

R=r, iant
CC=golang-dev
https://golang.org/cl/1907046

13 years agocrypto/x509: unwrap Subject Key Identifier
Adam Langley [Tue, 3 Aug 2010 16:26:48 +0000 (12:26 -0400)]
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

13 years agogc: empty select
Russ Cox [Tue, 3 Aug 2010 08:07:57 +0000 (01:07 -0700)]
gc: empty select

R=ken2
CC=golang-dev
https://golang.org/cl/1871057

13 years agogc: bug301
Russ Cox [Tue, 3 Aug 2010 08:07:40 +0000 (01:07 -0700)]
gc: bug301

Fixes #990.

R=ken2
CC=golang-dev
https://golang.org/cl/1742055

13 years agogc: bug299, bug300
Russ Cox [Tue, 3 Aug 2010 07:53:32 +0000 (00:53 -0700)]
gc: bug299, bug300

R=ken2
CC=golang-dev
https://golang.org/cl/1731057

13 years agoA+C: Tarmigan Casebolt
Russ Cox [Tue, 3 Aug 2010 07:36:44 +0000 (00:36 -0700)]
A+C: Tarmigan Casebolt

R=adg
CC=golang-dev, tarm
https://golang.org/cl/1923041

13 years agogc: index bounds tests and fixes
Russ Cox [Tue, 3 Aug 2010 07:26:02 +0000 (00:26 -0700)]
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

13 years agostrings: fix Split("", "", -1)
Scott Lawrence [Tue, 3 Aug 2010 03:35:14 +0000 (13:35 +1000)]
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

13 years agoAdd Scott Lawrence to C&A
Rob Pike [Tue, 3 Aug 2010 03:27:50 +0000 (13:27 +1000)]
Add Scott Lawrence to C&A

R=adg
CC=golang-dev
https://golang.org/cl/1899044

13 years agosyscall: make sure go error numbers do not clash with windows system errors
Alex Brainman [Tue, 3 Aug 2010 02:04:41 +0000 (12:04 +1000)]
syscall: make sure go error numbers do not clash with windows system errors

R=rsc
CC=golang-dev
https://golang.org/cl/1857049

13 years agobuilder: update script so it doesn't create tar-bombs
Andrew Gerrand [Tue, 3 Aug 2010 01:06:18 +0000 (11:06 +1000)]
builder: update script so it doesn't create tar-bombs

R=rsc
CC=golang-dev
https://golang.org/cl/1857048

13 years agoimage: introduce Gray and Gray16 types, and remove the named colors
Nigel Tao [Tue, 3 Aug 2010 00:57:53 +0000 (10:57 +1000)]
image: introduce Gray and Gray16 types, and remove the named colors
except for Black and White.

R=rsc
CC=golang-dev, mpl, r
https://golang.org/cl/1903049

13 years agoio: consolidate multi_reader and multi_writer into a single file, multi.go
Rob Pike [Mon, 2 Aug 2010 22:04:33 +0000 (08:04 +1000)]
io: consolidate multi_reader and multi_writer into a single file, multi.go

R=rsc
CC=golang-dev
https://golang.org/cl/1860046

13 years agoimage/png: use image-specific methods for checking opacity.
Nigel Tao [Sun, 1 Aug 2010 23:52:15 +0000 (09:52 +1000)]
image/png: use image-specific methods for checking opacity.

R=rsc
CC=golang-dev, mpl
https://golang.org/cl/1894047

13 years agowebsocket: fix bug involving spaces in header keys
Bill Neubauer [Fri, 30 Jul 2010 19:27:03 +0000 (12:27 -0700)]
websocket: fix bug involving spaces in header keys

R=rsc, ukai
CC=golang-dev
https://golang.org/cl/1669056

13 years agoCONTRIBUTORS: add wcn@google.com alias to match with code review
Russ Cox [Fri, 30 Jul 2010 19:26:50 +0000 (12:26 -0700)]
CONTRIBUTORS: add wcn@google.com alias to match with code review

R=wcn
CC=golang-dev
https://golang.org/cl/1902043

13 years agoruntime: do not fall through in SIGBUS/SIGSEGV
Russ Cox [Fri, 30 Jul 2010 18:32:55 +0000 (11:32 -0700)]
runtime: do not fall through in SIGBUS/SIGSEGV

Faults beyond the first page are not expected
and should fail loudly.  They are not subject to recover.

R=r
CC=golang-dev
https://golang.org/cl/1915042

13 years agoarm: disable another flaky test.
Kai Backman [Fri, 30 Jul 2010 09:33:40 +0000 (12:33 +0300)]
arm: disable another flaky test.

these tests work fine on n1 and gumstix. it's unclear
why they keep failing on the godashboard build.

R=rsc
CC=golang-dev
https://golang.org/cl/1664056

13 years agofix build
Kai Backman [Fri, 30 Jul 2010 07:53:26 +0000 (10:53 +0300)]
fix build

R=rsc
CC=golang-dev
https://golang.org/cl/1913042

13 years agoarm: bugfixes (stack clobbering, indices)
Kai Backman [Fri, 30 Jul 2010 07:37:51 +0000 (10:37 +0300)]
arm: bugfixes (stack clobbering, indices)

also changed zerodivide to output "BUG"

R=rsc
CC=golang-dev
https://golang.org/cl/1871055

13 years agoarm: add gdb support to android launcher script
Kai Backman [Fri, 30 Jul 2010 07:35:07 +0000 (10:35 +0300)]
arm: add gdb support to android launcher script

R=rsc
CC=golang-dev
https://golang.org/cl/1742050

13 years agotag release.2010-07-29
Andrew Gerrand [Fri, 30 Jul 2010 05:18:55 +0000 (15:18 +1000)]
tag release.2010-07-29

R=rsc
CC=golang-dev
https://golang.org/cl/1896044

13 years agorelease.2010-07-29 weekly.2010-07-29
Andrew Gerrand [Fri, 30 Jul 2010 04:48:30 +0000 (14:48 +1000)]
release.2010-07-29

R=rsc
CC=golang-dev
https://golang.org/cl/1907045

13 years agomisc/builder: support for uploading tarballs to googlecode
Andrew Gerrand [Fri, 30 Jul 2010 04:00:59 +0000 (14:00 +1000)]
misc/builder: support for uploading tarballs to googlecode

R=rsc
CC=golang-dev
https://golang.org/cl/1784042

13 years agocov and prof: implement windows version (just function stubs and build mods)
Joe Poirier [Fri, 30 Jul 2010 01:47:11 +0000 (11:47 +1000)]
cov and prof: implement windows version (just function stubs and build mods)

R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1676054

13 years agobug300: literal types must not be parenthesized
Robert Griesemer [Fri, 30 Jul 2010 01:14:49 +0000 (18:14 -0700)]
bug300: literal types must not be parenthesized

( This CL is dependent on acceptance of
https://golang.org/cl/1913041/show )

R=go-dev
CC=golang-dev
https://golang.org/cl/1860045

13 years agogo_spec: don't allow parens around the literal type of composite literals
Robert Griesemer [Fri, 30 Jul 2010 01:13:41 +0000 (18:13 -0700)]
go_spec: don't allow parens around the literal type of composite literals

Background: The current spec is imprecise with respect to the parsing ambiguity
for composite literals: It says that the ambiguity arises when the TypeName form
of the LiteralType is used. The following code:

    if (B) {} ...

is not using the TypeName form (but the parenthesized TypeName form) and thus
could be interpreted as:

    if ((B){}) ...

instead of

    if B {} ...

Both compilers and gofmt choose the latter interpretation. One could fix the
spec by making the clause regarding the parsing ambiguity more precise ("...using
the _possibly parenthesized_ TypeName form of the LiteralType..."). The alternative
(chosen here) is to simply disallow parenthesized literal types. Except for a single
test case (test/parentype.go) there appears to be no Go code under $GOROOT containing
parenthesized literal types. Furthermore, parentheses are never needed around a
literal type for correct parsing.

R=golang-dev
CC=golang-dev
https://golang.org/cl/1913041

13 years agodoc: update front page and go_learning.html
Andrew Gerrand [Fri, 30 Jul 2010 00:36:13 +0000 (10:36 +1000)]
doc: update front page and go_learning.html

This is a stop-gap change to give more current information visibility
before a more thorough reorganization.

R=r, rsc, gri
CC=golang-dev
https://golang.org/cl/1902042

13 years agomime: add AddExtensionType
Yuusei Kuwana [Thu, 29 Jul 2010 21:12:04 +0000 (14:12 -0700)]
mime: add AddExtensionType

For example:
mime.AddExtensionType(".m3u8", "application/x-mpegURL")
mime.AddExtensionType(".ts", "video/MP2T")

R=rsc, rsc1
CC=golang-dev
https://golang.org/cl/1698046

13 years agoA+C: Yuusei Kuwana (individual CLA)
Russ Cox [Thu, 29 Jul 2010 20:49:01 +0000 (13:49 -0700)]
A+C: Yuusei Kuwana (individual CLA)

R=r
CC=golang-dev
https://golang.org/cl/1871054

13 years agoscanner: better comment
Robert Griesemer [Thu, 29 Jul 2010 20:02:27 +0000 (13:02 -0700)]
scanner: better comment

R=rsc
CC=golang-dev
https://golang.org/cl/1900044

13 years agobug299: parenthesized receiver types/anonymous fields are illegal
Robert Griesemer [Thu, 29 Jul 2010 17:54:03 +0000 (10:54 -0700)]
bug299: parenthesized receiver types/anonymous fields are illegal

R=r
CC=golang-dev
https://golang.org/cl/1846051

13 years agofmt.Print: fix bug in placement of spaces introduced when ...T went in.
Rob Pike [Thu, 29 Jul 2010 17:50:09 +0000 (10:50 -0700)]
fmt.Print: fix bug in placement of spaces introduced when ...T went in.
Fixes #976.

R=rsc, chris tighe, r
CC=golang-dev
https://golang.org/cl/1697057

13 years agoruntime: fix bug introduced in revision 4a01b8d28570
Alex Brainman [Thu, 29 Jul 2010 06:54:01 +0000 (16:54 +1000)]
runtime: fix bug introduced in revision 4a01b8d28570

R=rsc
CC=golang-dev
https://golang.org/cl/1874046

13 years agonet: implement windows version of LookupHost/Port/SRV
Wei Guangjing [Thu, 29 Jul 2010 04:58:28 +0000 (14:58 +1000)]
net: implement windows version of LookupHost/Port/SRV

R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1748042

13 years agotest/sigchld.go: use syscall.Kill instead of a combination
Vinu Rajashekhar [Thu, 29 Jul 2010 01:26:29 +0000 (18:26 -0700)]
test/sigchld.go: use syscall.Kill instead of a combination
of syscall.Syscall and syscall.SYS_KILL.

In RTEMS, there is no syscall.Syscall support, but it does
support POSIX signals. So, if this testcase is changed to use
syscall.Kill, then it would run fine on RTEMS, when using gccgo.

R=rsc, iant
CC=golang-dev
https://golang.org/cl/1863046

13 years agogc: fix SIGBUS
Russ Cox [Thu, 29 Jul 2010 01:21:50 +0000 (18:21 -0700)]
gc: fix SIGBUS

R=ken2
CC=golang-dev
https://golang.org/cl/1906042

13 years agohttp: add https client support
Fazlul Shahriar [Thu, 29 Jul 2010 01:13:56 +0000 (18:13 -0700)]
http: add https client support

Fixes #851.

R=rsc
CC=golang-dev
https://golang.org/cl/1729052

13 years agofmt: move comment into doc.go.
Rob Pike [Wed, 28 Jul 2010 20:11:22 +0000 (13:11 -0700)]
fmt: move comment into doc.go.
Fix the documentation of newline handling in *f routines
to match the implementation.

R=rsc
CC=golang-dev
https://golang.org/cl/1899042

13 years agoio: MultiReader and MultiWriter
Brad Fitzpatrick [Wed, 28 Jul 2010 18:30:00 +0000 (11:30 -0700)]
io: MultiReader and MultiWriter

Little helpers I've found useful.

R=adg, rsc, r, gri
CC=golang-dev
https://golang.org/cl/1764043

13 years agoarm: fix build (dodgy floats)
Kai Backman [Wed, 28 Jul 2010 13:33:52 +0000 (16:33 +0300)]
arm: fix build (dodgy floats)

R=rsc
CC=golang-dev
https://golang.org/cl/1907041

13 years agoarm: minor bugfixes.
Kai Backman [Wed, 28 Jul 2010 12:58:35 +0000 (15:58 +0300)]
arm: minor bugfixes.

R=rsc
CC=golang-dev
https://golang.org/cl/1692057

13 years ago5g: fix build
Russ Cox [Tue, 27 Jul 2010 20:43:58 +0000 (13:43 -0700)]
5g: fix build

R=ken2
CC=golang-dev
https://golang.org/cl/1893042

13 years agobufio: fix optimisation test
Andrew Gerrand [Tue, 27 Jul 2010 07:22:45 +0000 (17:22 +1000)]
bufio: fix optimisation test

Fixes #949.

R=rsc
CC=golang-dev
https://golang.org/cl/1886046

13 years agonet: add nil checks to several String methods to avoid panics
Andrew Gerrand [Tue, 27 Jul 2010 07:22:22 +0000 (17:22 +1000)]
net: add nil checks to several String methods to avoid panics

Fixes #945.

R=r
CC=golang-dev
https://golang.org/cl/1848049

13 years agobytes, strings: mention the n < 0 case in Split/SplitAfter doc comment
Andrew Gerrand [Tue, 27 Jul 2010 05:06:08 +0000 (15:06 +1000)]
bytes, strings: mention the n < 0 case in Split/SplitAfter doc comment

R=r, rsc
CC=golang-dev
https://golang.org/cl/1669055

13 years agospec: add recover to predeclared identifiers list
Andrew Gerrand [Tue, 27 Jul 2010 05:03:30 +0000 (15:03 +1000)]
spec: add recover to predeclared identifiers list

R=gri
CC=golang-dev
https://golang.org/cl/1894043

13 years agodashboard: more aggressive caching for project/package pages
Andrew Gerrand [Tue, 27 Jul 2010 05:02:44 +0000 (15:02 +1000)]
dashboard: more aggressive caching for project/package pages

Plus automatic package<->project association script.
(This is just a helper script for now. I intend to fully automate
the associations further down the track.)

R=rsc
CC=golang-dev
https://golang.org/cl/1715054

13 years agogc: include signal.h (fix build)
Russ Cox [Tue, 27 Jul 2010 01:41:36 +0000 (18:41 -0700)]
gc: include signal.h (fix build)

R=ken2
CC=golang-dev
https://golang.org/cl/1871049

13 years agogodoc: accept '.', '!', and '?' as end of first sentence of package documentation
Robert Griesemer [Tue, 27 Jul 2010 00:34:40 +0000 (17:34 -0700)]
godoc: accept '.', '!', and '?' as end of first sentence of package documentation

R=rsc
CC=golang-dev
https://golang.org/cl/1875049

13 years agogc: more crash avoidance
Russ Cox [Tue, 27 Jul 2010 00:34:17 +0000 (17:34 -0700)]
gc: more crash avoidance

Fixes #961.
Fixes #962.

R=ken2
CC=golang-dev
https://golang.org/cl/1903043

13 years ago6l: more invalid input files
Russ Cox [Tue, 27 Jul 2010 00:34:02 +0000 (17:34 -0700)]
6l: more invalid input files

Fixes #963.
Fixes #964.

R=r
CC=golang-dev
https://golang.org/cl/1874045

13 years agocodereview: avoid crash if no config
Russ Cox [Tue, 27 Jul 2010 00:33:50 +0000 (17:33 -0700)]
codereview: avoid crash if no config

Fixes #959.

R=r
CC=golang-dev
https://golang.org/cl/1876045

13 years agogc: graceful exit on seg fault
Russ Cox [Mon, 26 Jul 2010 23:52:51 +0000 (16:52 -0700)]
gc: graceful exit on seg fault

R=ken2
CC=golang-dev
https://golang.org/cl/1882043

13 years agofmt.Scanf: handle trailing spaces.
Rob Pike [Mon, 26 Jul 2010 23:38:35 +0000 (16:38 -0700)]
fmt.Scanf: handle trailing spaces.
Fixes #954.

R=rsc
CC=golang-dev
https://golang.org/cl/1864046

13 years agoruntime: fix goc2c for rename to goc2c and *.goc
Peter Mundy [Mon, 26 Jul 2010 23:21:27 +0000 (16:21 -0700)]
runtime: fix goc2c for rename to goc2c and *.goc

Release 2010-04-27. runtime: rename cgo2c, *.cgo to goc2c, *.goc
to avoid confusion with real cgo.

R=rsc
CC=golang-dev
https://golang.org/cl/1868047

13 years agonet: TCPConn.SetNoDelay, back by popular demand
Russ Cox [Mon, 26 Jul 2010 23:19:39 +0000 (16:19 -0700)]
net: TCPConn.SetNoDelay, back by popular demand

R=r
CC=golang-dev
https://golang.org/cl/1880047

13 years agogodoc: display synopses for all packages that have some kind of documentation.
Robert Griesemer [Mon, 26 Jul 2010 22:27:42 +0000 (15:27 -0700)]
godoc: display synopses for all packages that have some kind of documentation.

Fixes #953.

R=rsc
CC=golang-dev
https://golang.org/cl/1862046

13 years agogc: fix smaller-than-pointer-sized receivers in interfaces
Russ Cox [Mon, 26 Jul 2010 22:25:10 +0000 (15:25 -0700)]
gc: fix smaller-than-pointer-sized receivers in interfaces

Fixes #812.

R=ken2
CC=golang-dev
https://golang.org/cl/1904041

13 years agogc: import dot shadowing bug
Russ Cox [Mon, 26 Jul 2010 21:21:39 +0000 (14:21 -0700)]
gc: import dot shadowing bug

R=ken2
CC=golang-dev
https://golang.org/cl/1873047

13 years agosyscall: add windows version of Pipe()
Wei Guangjing [Mon, 26 Jul 2010 05:55:01 +0000 (15:55 +1000)]
syscall: add windows version of Pipe()

R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1715046

13 years agoprof: fix typo in usage string
Andrew Gerrand [Mon, 26 Jul 2010 04:46:53 +0000 (14:46 +1000)]
prof: fix typo in usage string

Fixes #948.

R=rsc
CC=golang-dev
https://golang.org/cl/1890043

13 years agoA+C: Wei Guangjing
Andrew Gerrand [Mon, 26 Jul 2010 03:44:32 +0000 (13:44 +1000)]
A+C: Wei Guangjing

R=golang-dev, brainman
CC=golang-dev
https://golang.org/cl/1899041

13 years agonet: fix crashing Read/Write when passed empty slice on windows
Alex Brainman [Mon, 26 Jul 2010 02:50:03 +0000 (12:50 +1000)]
net: fix crashing Read/Write when passed empty slice on windows

Fixes #921.

R=rsc
CC=golang-dev
https://golang.org/cl/1862043

13 years agosyscall: improve windows errno handling
Alex Brainman [Mon, 26 Jul 2010 00:24:48 +0000 (10:24 +1000)]
syscall: improve windows errno handling

R=rsc, Joe Poirier, PeterGo
CC=golang-dev
https://golang.org/cl/1872045

13 years agofix windows Make.cmd:
Alex Brainman [Sun, 25 Jul 2010 23:55:25 +0000 (09:55 +1000)]
fix windows Make.cmd:
- TARG had extra space at the end;
- it should be set before "all" target.

R=rsc, Joe Poirier
CC=golang-dev
https://golang.org/cl/1846042

13 years agosyscall: add ForkExec, Syscall12 on Windows
Daniel Theophanes [Sun, 25 Jul 2010 23:43:35 +0000 (09:43 +1000)]
syscall: add ForkExec, Syscall12 on Windows

R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1578041

13 years agoruntime/extern.go: clear a small error in a comment.
Vinu Rajashekhar [Sun, 25 Jul 2010 02:10:21 +0000 (19:10 -0700)]
runtime/extern.go: clear a small error in a comment.

R=iant, rsc
CC=golang-dev
https://golang.org/cl/1741058

13 years agobytes: port IndexFunc and LastIndexFunc from strings package
Fazlul Shahriar [Fri, 23 Jul 2010 19:34:35 +0000 (12:34 -0700)]
bytes: port IndexFunc and LastIndexFunc from strings package

This CL basically applies the same changes as

http://code.google.com/p/go/source/detail?r=5e0a29014e8e

but for bytes package.

R=r, rog
CC=golang-dev
https://golang.org/cl/1670052

13 years agomisc/vim: updated syntax file to recognize constants of the form 1e9
Petar Maymounkov [Fri, 23 Jul 2010 01:33:17 +0000 (11:33 +1000)]
misc/vim: updated syntax file to recognize constants of the form 1e9

R=rsc, adg
CC=golang-dev
https://golang.org/cl/1864042

13 years agolibmach: correct handling of .5 files with D_REGREG addresses
Russ Cox [Thu, 22 Jul 2010 16:00:34 +0000 (09:00 -0700)]
libmach: correct handling of .5 files with D_REGREG addresses
undo workaround in gc

Fixes #943.

R=kaib
CC=golang-dev
https://golang.org/cl/1889041

13 years agofix build
Russ Cox [Thu, 22 Jul 2010 15:55:56 +0000 (08:55 -0700)]
fix build

bug introduced in https://golang.org/cl/1886043

R=r
CC=golang-dev
https://golang.org/cl/1848047

13 years agotest: fail is for bad exit status only
Russ Cox [Thu, 22 Jul 2010 15:54:32 +0000 (08:54 -0700)]
test: fail is for bad exit status only

R=kaib
CC=golang-dev
https://golang.org/cl/1847043

13 years agobuild: clean.bash to check that GOOS and GOARCH are set
Andrew Gerrand [Thu, 22 Jul 2010 00:15:36 +0000 (10:15 +1000)]
build: clean.bash to check that GOOS and GOARCH are set

R=rsc
CC=golang-dev
https://golang.org/cl/1843046

13 years agogotest: fix the glob pattern in the top-of-file comment
Micah Stetson [Thu, 22 Jul 2010 00:07:26 +0000 (10:07 +1000)]
gotest: fix the glob pattern in the top-of-file comment

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/1847042

13 years agold: various bug fixes
Russ Cox [Wed, 21 Jul 2010 20:44:49 +0000 (13:44 -0700)]
ld: various bug fixes

Fixes #937.
Fixes #938.
Fixes #939.
Fixes #940.

R=r
CC=golang-dev
https://golang.org/cl/1886043

13 years agostrings.Bytes: fix typo in comment
Andrey Mirtchovski [Wed, 21 Jul 2010 19:01:15 +0000 (12:01 -0700)]
strings.Bytes: fix typo in comment

R=adg, rsc
CC=golang-dev
https://golang.org/cl/1886042

13 years agoio: Avoid another race condition in pipes.
Ian Lance Taylor [Wed, 21 Jul 2010 17:57:46 +0000 (10:57 -0700)]
io: Avoid another race condition in pipes.

Goroutine 1:
  Call Read on read half of pipe, entering pipeHalf.rw.
  Check ioclosed field, which is false.
  Send data to p.c1
  Wait for response on p.c2.

Goroutine 2:
  Call Close on read half of pipe, entering pipeHalf.close.
  Set closed field.
  Send error to p.cclose.
  Set ioclosed field.
  Send 1 to p.done.
  Return and exit goroutine.

Goroutine 3:
  This is the goroutine running pipe.run, and for some reason
  it has started late.
  Read error from p.rclose; set rerr and continue.
  Read 1 from p.done; increment ndone and continue.
  Read data from r1 (sent by goroutine 1); set r1 = nil and continue

Now goroutine 1 is waiting for a response, and goroutine 3 is
waiting for something else to happen.

This patch fixes the race by having the runner check whether
the read half is closed when it is asked for read data, and
similarly for the corresponding race on the write half.

This patch also fixes the similar race in which ndone gets
bumped up to 2 while there is a reader or writer waiting.

There is still another race to fix.  It is possible for the
read half and the write half to both be closed, and for the
runner goroutine to exit, all before the runner goroutine sees
the request from a reader.  E.g., in the above, have goroutine
2 also close the write half, and have goroutine 3 see both
done messages before it sees the request from goroutine 1.

R=rsc
CC=golang-dev
https://golang.org/cl/1862045

13 years agosyscall: On Windows, Errstr FormatMessage has no values to insert.
Peter Mundy [Wed, 21 Jul 2010 16:40:08 +0000 (09:40 -0700)]
syscall: On Windows, Errstr FormatMessage has no values to insert.

For the Windows version of syscall Errstr, set the
FORMAT_MESSAGE_IGNORE_INSERTS value of the FormatMessage
Flags argument when there are no values to insert.

R=rsc, brainman
CC=golang-dev
https://golang.org/cl/1868043