]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agomisc/goplay: remove redundant chdir
Andrew Gerrand [Tue, 21 Feb 2012 22:37:38 +0000 (09:37 +1100)]
misc/goplay: remove redundant chdir

R=ajstarks, r
CC=golang-dev
https://golang.org/cl/5687070

13 years agogodoc: support flat directory view again
Andrew Gerrand [Tue, 21 Feb 2012 22:25:56 +0000 (09:25 +1100)]
godoc: support flat directory view again

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

13 years agodoc: support redirect-on-share
Andrew Gerrand [Tue, 21 Feb 2012 22:16:54 +0000 (09:16 +1100)]
doc: support redirect-on-share

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

13 years agocmd/dist: fix pprof permissions
Bobby Powers [Tue, 21 Feb 2012 21:49:30 +0000 (16:49 -0500)]
cmd/dist: fix pprof permissions

When installing pprof into the tools directory, it needs to
have execute permissions on unix-like systems.

Fixes issues 3077.

R=golang-dev, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/5675095

13 years agonet/smtp: use EHLO then HELO
Russ Cox [Tue, 21 Feb 2012 21:39:02 +0000 (16:39 -0500)]
net/smtp: use EHLO then HELO

Before we were using "ESMTP" in the banner as a clue,
but that is not required by the RFC and breaks mailing
to smtp.yandex.ru.

Fixes #3045.

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

13 years agoruntime: avoid malloc during malloc
Russ Cox [Tue, 21 Feb 2012 21:36:15 +0000 (16:36 -0500)]
runtime: avoid malloc during malloc

A fault during malloc might lead to the program's
first call to findfunc, which would in turn call malloc.
Don't do that.

Fixes #1777.

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

13 years agocodereview: add submit message support for newer clone URL and subrepos
Shenghou Ma [Tue, 21 Feb 2012 21:10:48 +0000 (16:10 -0500)]
codereview: add submit message support for newer clone URL and subrepos

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

13 years agocmd/go: pass 2, remove reference to incomplete -file flag
Mike Rosset [Tue, 21 Feb 2012 20:42:03 +0000 (15:42 -0500)]
cmd/go: pass 2, remove reference to incomplete -file flag

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/5686058

13 years agocmd/go: 'go help test' remove documentation for incomplete -file flag
Mike Rosset [Tue, 21 Feb 2012 18:23:33 +0000 (13:23 -0500)]
cmd/go: 'go help test' remove documentation for incomplete -file flag

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

13 years agocmd/*: add -d option to bison.
Adam Langley [Tue, 21 Feb 2012 15:50:58 +0000 (10:50 -0500)]
cmd/*: add -d option to bison.

Without -d, bison doesn't generate y.tab.h.

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

13 years agoexp/norm: Added Iter type for iterating on segment boundaries. This type is mainly...
Marcel van Lohuizen [Tue, 21 Feb 2012 12:13:21 +0000 (13:13 +0100)]
exp/norm: Added Iter type for iterating on segment boundaries.  This type is mainly to be used
by other low-level libraries, like collate.  Extra care has been given to optimize the performance
of normalizing to NFD, as this is what will be used by the collator.  The overhead of checking
whether a string is normalized vs simply decomposing a string is neglible.  Assuming that most
strings are in the FCD form, this iterator can be used to decompose strings and normalize with
minimal overhead.

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

13 years agotest: fix bug423.go to actually fail with older releases.
Rémy Oudompheng [Tue, 21 Feb 2012 06:50:10 +0000 (07:50 +0100)]
test: fix bug423.go to actually fail with older releases.

The supposedly overflowing variable was registerized.

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

13 years agocmd/api: record return type of functions for variable typecheck.
Rémy Oudompheng [Tue, 21 Feb 2012 06:37:25 +0000 (07:37 +0100)]
cmd/api: record return type of functions for variable typecheck.

Also cleanup the resolveName method.

Fixes failure on go/build declaration:
        var ToolDir = filepath.Join(...)

R=golang-dev, bradfitz
CC=golang-dev, remy
https://golang.org/cl/5681043

13 years agodashboard: rename buttons to satisfy pedantic souls
Andrew Gerrand [Tue, 21 Feb 2012 06:13:14 +0000 (17:13 +1100)]
dashboard: rename buttons to satisfy pedantic souls

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

13 years agonet: extend the workaround to DialTCP to try to get arm building again.
Rob Pike [Tue, 21 Feb 2012 05:48:05 +0000 (16:48 +1100)]
net: extend the workaround to DialTCP to try to get arm building again.
Awfulness by the bucket that we hope
Fixes #3057.

R=golang-dev, mikioh.mikioh, dsymonds, r, rsc
CC=golang-dev
https://golang.org/cl/5687060

13 years agotest: fix broken test
Rob Pike [Tue, 21 Feb 2012 05:47:42 +0000 (16:47 +1100)]
test: fix broken test
TBR=bradfitz

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

13 years agocmd/gc: don't believe that variables mentioned 256 times are unused.
Rémy Oudompheng [Tue, 21 Feb 2012 05:38:01 +0000 (16:38 +1100)]
cmd/gc: don't believe that variables mentioned 256 times are unused.

Such variables would be put at 0(SP), leading to serious
corruptions at zero initialization.
Fixes #3084.

R=golang-dev, r
CC=golang-dev, remy
https://golang.org/cl/5683052

13 years agonet: more selfConnect debugging: panic if ra == nil in internetSocket
Rob Pike [Tue, 21 Feb 2012 04:49:08 +0000 (15:49 +1100)]
net: more selfConnect debugging: panic if ra == nil in internetSocket
TBR=dsymonds

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

13 years agonet: panic if sockaddrToTCP returns nil incorrectly
Rob Pike [Tue, 21 Feb 2012 04:21:34 +0000 (15:21 +1100)]
net: panic if sockaddrToTCP returns nil incorrectly
Part of diagnosing the selfConnect bug
TBR=dsymonds

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

13 years agonet: add diagnostic to try to catch selfConnect bug earlier
Rob Pike [Tue, 21 Feb 2012 03:53:07 +0000 (14:53 +1100)]
net: add diagnostic to try to catch selfConnect bug earlier
TBR=dsymonds

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

13 years agotest: rewrite test/run shell script + errchk (perl) in Go
Brad Fitzpatrick [Tue, 21 Feb 2012 03:28:49 +0000 (14:28 +1100)]
test: rewrite test/run shell script + errchk (perl) in Go

This doesn't run all ~750 of the tests, but most.

Progress on issue 2833

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

13 years agodoc: fix links in installation instructions
Andrew Gerrand [Tue, 21 Feb 2012 03:12:07 +0000 (14:12 +1100)]
doc: fix links in installation instructions

Fixes #3051.

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

13 years agoos: replace non-portable Waitmsg with portable ProcessState
Rob Pike [Tue, 21 Feb 2012 03:10:34 +0000 (14:10 +1100)]
os: replace non-portable Waitmsg with portable ProcessState
Use methods for key questions.
Provide access to non-portable pieces through portable methods.
Windows and Plan 9 updated.

R=golang-dev, bradfitz, bradfitz, r, dsymonds, rsc, iant, iant
CC=golang-dev
https://golang.org/cl/5673077

13 years agoruntime: remove an obsolete file
Mikio Hara [Tue, 21 Feb 2012 03:07:38 +0000 (12:07 +0900)]
runtime: remove an obsolete file

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

13 years agodoc: link to self-hosted articles from docs.html
Andrew Gerrand [Tue, 21 Feb 2012 02:59:51 +0000 (13:59 +1100)]
doc: link to self-hosted articles from docs.html

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

13 years agomisc/goplay: remain in work directory, build in temp directory
Andrew Gerrand [Tue, 21 Feb 2012 00:24:29 +0000 (11:24 +1100)]
misc/goplay: remain in work directory, build in temp directory

Fixes #2935.

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

13 years agonet: more docs on deadlines
Brad Fitzpatrick [Tue, 21 Feb 2012 00:11:18 +0000 (11:11 +1100)]
net: more docs on deadlines

Fixes #2777

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

13 years agonet/http: add optional Server.TLSConfig field
Brad Fitzpatrick [Mon, 20 Feb 2012 23:24:15 +0000 (10:24 +1100)]
net/http: add optional Server.TLSConfig field

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

13 years agoruntime: implement runtime.osyield on FreeBSD 386, amd64
Devon H. O'Dell [Mon, 20 Feb 2012 22:32:20 +0000 (07:32 +0900)]
runtime: implement runtime.osyield on FreeBSD 386, amd64

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

13 years agonet: move hosts testdata to testdata folder
Mikio Hara [Mon, 20 Feb 2012 22:11:44 +0000 (07:11 +0900)]
net: move hosts testdata to testdata folder

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

13 years agodoc/go1: delete obsolete reference to FileStat
Rob Pike [Mon, 20 Feb 2012 21:03:03 +0000 (08:03 +1100)]
doc/go1: delete obsolete reference to FileStat
Fixes #3013.

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

13 years ago5g, 6g, 8g: flush modified globals aggressively
Russ Cox [Mon, 20 Feb 2012 18:41:44 +0000 (13:41 -0500)]
5g, 6g, 8g: flush modified globals aggressively

The alternative is to record enough information that the
trap handler know which registers contain cached globals
and can flush the registers back to their original locations.
That's significantly more work.

This only affects globals that have been written to.
Code that reads from a global should continue to registerize
as well as before.

Fixes #1304.

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

13 years agobuild: remove old version*.go files from hgignore
Brad Fitzpatrick [Mon, 20 Feb 2012 10:49:58 +0000 (02:49 -0800)]
build: remove old version*.go files from hgignore

This broke a build on a Linux box I hadn't updated
in awhile. The hgignore files were preventing hg status
from showing and hg purge from cleaning up junk.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5687048

13 years agocmd/6c: add line feed after an error message
Dmitriy Vyukov [Mon, 20 Feb 2012 09:57:14 +0000 (13:57 +0400)]
cmd/6c: add line feed after an error message

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

13 years agomisc/dist/windows: app engine gopher replaced with standard bw version
Joe Poirier [Mon, 20 Feb 2012 07:00:00 +0000 (01:00 -0600)]
misc/dist/windows: app engine gopher replaced with standard bw version

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

13 years agomisc/dist/windows: ongoing dev
Joe Poirier [Mon, 20 Feb 2012 06:29:57 +0000 (00:29 -0600)]
misc/dist/windows: ongoing dev

Embedded Go images in the installer dialog and
banner boxes, Go tree cloning uses version info
from the Go tool (readme updated), the installer
allows up/down-grading and reparing of the version
that's installed, added two registry values.

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

13 years agoos: drop the Wait function and the options to Process.Wait
Rob Pike [Mon, 20 Feb 2012 04:36:08 +0000 (15:36 +1100)]
os: drop the Wait function and the options to Process.Wait
They are portability problems and the options are almost always zero in practice anyway.

R=golang-dev, dsymonds, r, bradfitz
CC=golang-dev
https://golang.org/cl/5688046

13 years agomisc/dist/windows: ongoing dev
Joe Poirier [Mon, 20 Feb 2012 04:21:41 +0000 (22:21 -0600)]
misc/dist/windows: ongoing dev

Added the (properly formatted) license file back,
the installer adds go\bin to the system PATH now,
the output package names are in line with the linux
and darwin versions, dist.bat extracts GOARCH in a
sane way, readme cleanup.

Tested on Windows 7 only. It would be helpful if
someone else could give it a try. See the readme
for details.

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

13 years agodatabase/sql/driver: API cleanups
Brad Fitzpatrick [Mon, 20 Feb 2012 03:25:28 +0000 (14:25 +1100)]
database/sql/driver: API cleanups

-- add driver.Value type and documentation,
   convert from interface{} to Value where
   appropriate.
-- don't say "subset" anywhere,
-- SubsetValuer -> Valuer
-- SubsetValue -> Value
-- IsParameterSubsetType -> IsValue
-- IsScanSubsetType -> IsScanValue

Fixes #2842

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

13 years agohtml/template: don't indirect past a Stringer
Rob Pike [Mon, 20 Feb 2012 03:23:45 +0000 (14:23 +1100)]
html/template: don't indirect past a Stringer

While we're here, get rid of the old names for the escaping functions.

Fixes #3073.

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

13 years agostrconv: run garbage collection before counting allocations in test
Russ Cox [Mon, 20 Feb 2012 03:13:04 +0000 (22:13 -0500)]
strconv: run garbage collection before counting allocations in test

My theory is that the call to f() allocates, which triggers
a garbage collection, which itself may do some allocation,
which is being counted.  Running a garbage collection
before starting the test should avoid this problem.

Fixes #2894 (I hope).

R=golang-dev, bradfitz, nigeltao
CC=golang-dev
https://golang.org/cl/5685046

13 years agogo/doc: update golden file to fix build
Rob Pike [Mon, 20 Feb 2012 03:06:38 +0000 (14:06 +1100)]
go/doc: update golden file to fix build

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5683046

13 years agoall: rewrite references to old tool names
Rob Pike [Mon, 20 Feb 2012 02:42:37 +0000 (13:42 +1100)]
all: rewrite references to old tool names

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5683045

13 years agoFAQ: many small fixes and adjustments
Rob Pike [Mon, 20 Feb 2012 01:42:50 +0000 (12:42 +1100)]
FAQ: many small fixes and adjustments

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

13 years agogodoc: fix tag mismatch validation errors
Scott Lawrence [Mon, 20 Feb 2012 01:32:43 +0000 (12:32 +1100)]
godoc: fix tag mismatch validation errors

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

13 years agoos,time: fix Plan 9 build
Fazlul Shahriar [Mon, 20 Feb 2012 01:31:24 +0000 (12:31 +1100)]
os,time: fix Plan 9 build

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

13 years agobuild: implement clean.bat
Alex Brainman [Mon, 20 Feb 2012 01:17:27 +0000 (12:17 +1100)]
build: implement clean.bat

Fixes #2893.

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

13 years agohtml/template: minor tweak to docs to improve HTML typography.
David Symonds [Mon, 20 Feb 2012 00:43:34 +0000 (11:43 +1100)]
html/template: minor tweak to docs to improve HTML typography.

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

13 years ago5a, 5c, 5g, 5l: fix build for Linux/ARM.
Shenghou Ma [Sun, 19 Feb 2012 23:11:16 +0000 (18:11 -0500)]
5a, 5c, 5g, 5l: fix build for Linux/ARM.
ARM doesn't have the concept of scale, so I renamed the field
Addr.scale to Addr.flag to better reflect its true meaning.

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

13 years agodoc/go1: update for runtime, unsafe API changes
Russ Cox [Sun, 19 Feb 2012 23:04:38 +0000 (18:04 -0500)]
doc/go1: update for runtime, unsafe API changes

Fixes #2890.

R=golang-dev, r, remyoudompheng
CC=golang-dev
https://golang.org/cl/5683044

13 years agosyscall: force Windows to always use US English error messages
Shenghou Ma [Sun, 19 Feb 2012 22:51:25 +0000 (09:51 +1100)]
syscall: force Windows to always use US English error messages
Fixes #1834.

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

13 years agodoc: update contrib.html
Bobby Powers [Sun, 19 Feb 2012 21:33:28 +0000 (08:33 +1100)]
doc: update contrib.html

Fix all the local links, as contrib.html is served as
/project/

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

13 years agocmd/fix: add runtime renamings
Russ Cox [Sun, 19 Feb 2012 21:10:45 +0000 (16:10 -0500)]
cmd/fix: add runtime renamings

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5685043

13 years agodoc/install.html: fix link
Rob Pike [Sun, 19 Feb 2012 21:08:30 +0000 (08:08 +1100)]
doc/install.html: fix link
Fixes #3072.

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

13 years agotest/initsyscall.go: delete
Rob Pike [Sun, 19 Feb 2012 20:44:41 +0000 (07:44 +1100)]
test/initsyscall.go: delete
It's testing an old property of the language and is no longer relevant.

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

13 years agotest/initcomma.go: restore what it's supposed to be testing
Rob Pike [Sun, 19 Feb 2012 20:44:24 +0000 (07:44 +1100)]
test/initcomma.go: restore what it's supposed to be testing
which is trailing commas in literals. They were gofmted away at some point.

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

13 years agotest/hashmap.go: delete
Rob Pike [Sun, 19 Feb 2012 20:43:16 +0000 (07:43 +1100)]
test/hashmap.go: delete
It's in an odd style and it's unclear what true purpose it serves as
a test other than to be another Go program.

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

13 years agocmd/cgo: bug fixes
Russ Cox [Sun, 19 Feb 2012 18:32:55 +0000 (13:32 -0500)]
cmd/cgo: bug fixes

* disallow embedding of C type (Fixes issue 2552)
* detect 0-length array (Fixes issue 2806)
* use typedefs when possible, to avoid attribute((unavailable)) (Fixes issue 2888)
* print Go types constructed from C types using original C types (Fixes issue 2612)

This fix changes _cgo_export.h to repeat the preamble from import "C".
Otherwise the fix to issue 2612 is impossible, since it cannot refer to
types that have not been defined.  If people are using //export and
putting non-header information in the preamble, they will need to
refactor their code.

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

13 years agodoc: Fixed type in documentation for FormatFloat.
Marcel van Lohuizen [Sun, 19 Feb 2012 18:26:05 +0000 (19:26 +0100)]
doc: Fixed type in documentation for FormatFloat.

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

13 years ago6l, 8l: fix build for ELF systems
Shenghou Ma [Sun, 19 Feb 2012 18:16:47 +0000 (13:16 -0500)]
6l, 8l: fix build for ELF systems

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

13 years agoruntime: fix another memory leak
Russ Cox [Sun, 19 Feb 2012 16:05:19 +0000 (11:05 -0500)]
runtime: fix another memory leak

morebuf holds a pc/sp from the last stack split or
reflect.call or panic/recover.  If the pc is a closure,
the reference will keep it from being collected.

moreargp holds a pointer to the arguments from the
last stack split or reflect.call or panic/recover.
Normally it is a stack pointer and thus not of interest,
but in the case of reflect.call it is an allocated argument
list and holds up the arguments to the call.

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

13 years agogc, ld: tag data as no-pointers and allocate in separate section
Russ Cox [Sun, 19 Feb 2012 08:19:52 +0000 (03:19 -0500)]
gc, ld: tag data as no-pointers and allocate in separate section

The garbage collector can avoid scanning this section, with
reduces collection time as well as the number of false positives.
Helps a little bit with issue 909, but certainly does not solve it.

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

13 years agolib/time/zoneinfo: delete
Russ Cox [Sun, 19 Feb 2012 08:19:05 +0000 (03:19 -0500)]
lib/time/zoneinfo: delete

Now in zoneinfo.zip.

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

13 years agotime: switch to using (uncompressed) zoneinfo zip file
Russ Cox [Sun, 19 Feb 2012 08:16:20 +0000 (03:16 -0500)]
time: switch to using (uncompressed) zoneinfo zip file

Removal of old zoneinfo files is a separate CL due to its size.

R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5676100

13 years agotest/chan: document tests
Rob Pike [Sun, 19 Feb 2012 06:44:02 +0000 (17:44 +1100)]
test/chan: document tests

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

13 years agotest/interface: document tests
Rob Pike [Sun, 19 Feb 2012 06:33:41 +0000 (17:33 +1100)]
test/interface: document tests
Most already had comments (yay); adjusted for consistency.

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

13 years agoencoding/json: disable anonymous fields
Russ Cox [Sun, 19 Feb 2012 05:27:05 +0000 (00:27 -0500)]
encoding/json: disable anonymous fields

We should, after Go 1, make them work the same as
package xml, that is, make them appear in the outer
struct.  For now turn them off so that people do not
depend on the old behavior.

Fixing them is issue 3069.

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

13 years agoruntime: fix tiny memory leak
Russ Cox [Sun, 19 Feb 2012 05:26:33 +0000 (00:26 -0500)]
runtime: fix tiny memory leak

The m->cret word holds the C return value when returning
across a stack split boundary.  It was not being cleared after
use, which means that the return value (if a C function)
or else the value of AX/R0 at the time of the last stack unsplit
was being kept alive longer than necessary.  Clear it.

I think the effect here should be very small, but worth fixing
anyway.

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

13 years agoos: remove Getenverror
Brad Fitzpatrick [Sun, 19 Feb 2012 05:18:13 +0000 (21:18 -0800)]
os: remove Getenverror

Fixes #3065

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

13 years agogc: fix error for floating-point constant %
Russ Cox [Sun, 19 Feb 2012 05:12:31 +0000 (00:12 -0500)]
gc: fix error for floating-point constant %

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

13 years agoruntime: API
Russ Cox [Sun, 19 Feb 2012 05:11:44 +0000 (00:11 -0500)]
runtime: API

Delete Alloc, Free, Lookup, Semacquire, Semrelease

Fixes #2955.

R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/5675093

13 years agotest: explanatory comments [c-g]*
Rob Pike [Sun, 19 Feb 2012 03:28:53 +0000 (14:28 +1100)]
test: explanatory comments [c-g]*

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

13 years agogo 1: add a description of the os error changes.
Rob Pike [Sun, 19 Feb 2012 03:15:26 +0000 (14:15 +1100)]
go 1: add a description of the os error changes.
I'm sure I wrote these before but they've disappeared.

R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5673100

13 years agotest: [a-c]: add introductory comments to tests
Rob Pike [Sun, 19 Feb 2012 02:19:43 +0000 (13:19 +1100)]
test: [a-c]: add introductory comments to tests
Very few of the compiler regression tests include a comment
saying waht they do. Many are obvious, some are anything but.
I've started with a-c in the top directory. More will follow once
we agree on the approach, correctness, and thoroughness here.
zerodivide.go sneaked in too.

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

13 years agogc: drop ideal bool
Russ Cox [Sun, 19 Feb 2012 02:07:08 +0000 (21:07 -0500)]
gc: drop ideal bool

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

13 years agotime: use Go distribution zoneinfo if system copy not found
Russ Cox [Sun, 19 Feb 2012 02:02:41 +0000 (21:02 -0500)]
time: use Go distribution zoneinfo if system copy not found

Fixes #2964.

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

13 years agonet: make LocalAddr on multicast return group address
Mikio Hara [Sun, 19 Feb 2012 01:50:03 +0000 (10:50 +0900)]
net: make LocalAddr on multicast return group address

Fixes #3067.

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

13 years agotime: add zoneinfo files, mainly for non-Unix systems
Russ Cox [Sun, 19 Feb 2012 01:36:51 +0000 (20:36 -0500)]
time: add zoneinfo files, mainly for non-Unix systems

Generated by lib/time/update.bash.

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

13 years agolib/time: add README, update.bash script
Russ Cox [Sun, 19 Feb 2012 01:33:58 +0000 (20:33 -0500)]
lib/time: add README, update.bash script

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

13 years agocmd/api: s/ideal-bool/bool/
Russ Cox [Sun, 19 Feb 2012 01:31:19 +0000 (20:31 -0500)]
cmd/api: s/ideal-bool/bool/

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

13 years agoall: shorten some of the longer tests
Russ Cox [Sat, 18 Feb 2012 21:24:23 +0000 (16:24 -0500)]
all: shorten some of the longer tests

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

13 years agotest: use testlib (another bunch).
Rémy Oudompheng [Sat, 18 Feb 2012 21:15:42 +0000 (22:15 +0100)]
test: use testlib (another bunch).

Apply sed with:

1s,^// $G $D/$F.go && $L $F.$A && ./$A.out || echo.*,// run,
1s,^// $G $D/$F.go || echo.*,// compile,

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

13 years agotest/run: honor $TMPDIR
Shenghou Ma [Sat, 18 Feb 2012 21:15:12 +0000 (16:15 -0500)]
test/run: honor $TMPDIR

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

13 years agotemplates: minor edits to the documentation
Rob Pike [Sat, 18 Feb 2012 20:45:12 +0000 (07:45 +1100)]
templates: minor edits to the documentation

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

13 years agodoc: update gccgo_contribute.html
Ian Lance Taylor [Sat, 18 Feb 2012 19:15:52 +0000 (11:15 -0800)]
doc: update gccgo_contribute.html

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

13 years agoos: document the type of link errors
Brad Fitzpatrick [Sat, 18 Feb 2012 12:45:43 +0000 (04:45 -0800)]
os: document the type of link errors

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

13 years agobytes: document Compare/Equal semantics for nil arguments, and add tests.
David Symonds [Sat, 18 Feb 2012 06:39:40 +0000 (17:39 +1100)]
bytes: document Compare/Equal semantics for nil arguments, and add tests.

R=golang-dev, bradfitz, r, r
CC=golang-dev
https://golang.org/cl/5676090

13 years agodoc: various updates to doc/code.html
Shenghou Ma [Sat, 18 Feb 2012 05:13:02 +0000 (16:13 +1100)]
doc: various updates to doc/code.html

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

13 years agohtml/template: replace obsolete reference to template.Set
Rob Pike [Sat, 18 Feb 2012 05:02:51 +0000 (16:02 +1100)]
html/template: replace obsolete reference to template.Set
Fixes #3053.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5656094

13 years agotest: change bug040 to use errorcheck
Ian Lance Taylor [Sat, 18 Feb 2012 04:35:40 +0000 (20:35 -0800)]
test: change bug040 to use errorcheck

Because bug040.go was ignoring all error messages, the fact
that it got an error about fuction main was being ignored.

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

13 years agotest: remove a couple of bad tests that duplicate declbad.go
Ian Lance Taylor [Sat, 18 Feb 2012 04:35:18 +0000 (20:35 -0800)]
test: remove a couple of bad tests that duplicate declbad.go

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

13 years agoimage: add Decode example.
Nigel Tao [Sat, 18 Feb 2012 04:09:01 +0000 (15:09 +1100)]
image: add Decode example.

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

13 years agoencoding/gob: cache engine for user type, not base type
Rob Pike [Sat, 18 Feb 2012 03:38:37 +0000 (14:38 +1100)]
encoding/gob: cache engine for user type, not base type
When we build the encode engine for a recursive type, we
mustn't disregard the indirections or we can try to reuse an
engine at the wrong indirection level.

Fixes #3026.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5675087

13 years agotest: add some tests that gccgo failed to handle correctly
Ian Lance Taylor [Sat, 18 Feb 2012 01:52:05 +0000 (17:52 -0800)]
test: add some tests that gccgo failed to handle correctly

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

13 years agoencoding/gob: fix mutually recursive slices of structs
Rob Pike [Sat, 18 Feb 2012 01:43:08 +0000 (12:43 +1100)]
encoding/gob: fix mutually recursive slices of structs

Fix by setting the element type if we discover it's zero while building.
We could have fixed this better with foresight by doing the id setting in a
different sequence, but doing that now would break binary compatibility.

Fixes #2995.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5675083

13 years agopkg: a slew of examples
Andrew Gerrand [Sat, 18 Feb 2012 00:48:33 +0000 (11:48 +1100)]
pkg: a slew of examples

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

13 years agocrypto/dsa: add missing period in package comment
Robert Griesemer [Fri, 17 Feb 2012 22:48:44 +0000 (14:48 -0800)]
crypto/dsa: add missing period in package comment

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

13 years agodoc: fix tables
Russ Cox [Fri, 17 Feb 2012 21:59:33 +0000 (16:59 -0500)]
doc: fix tables

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

13 years agomath/rand: Intn etc. should panic if their argument is <= 0.
Rob Pike [Fri, 17 Feb 2012 21:53:03 +0000 (08:53 +1100)]
math/rand: Intn etc. should panic if their argument is <= 0.

I am making a unilateral decision here. I could also settle for returning 0,
as long it's documented, but I argue that it's equivalent to an index
out of bounds.

Fixes #2892.

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

13 years agoos: fix existential typo
Anthony Martin [Fri, 17 Feb 2012 20:44:38 +0000 (07:44 +1100)]
os: fix existential typo

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