]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agoruntime: fix arm5 softfloat
Russ Cox [Sun, 17 Apr 2011 18:16:26 +0000 (14:16 -0400)]
runtime: fix arm5 softfloat

R=dfc, ken2, rsc
CC=golang-dev
https://golang.org/cl/4446043

14 years agocodereview: add 'hg undo' command
Russ Cox [Sun, 17 Apr 2011 18:15:51 +0000 (14:15 -0400)]
codereview: add 'hg undo' command

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

14 years agowebsocket: fix socket leak in test
Dave Cheney [Sun, 17 Apr 2011 16:43:27 +0000 (09:43 -0700)]
websocket: fix socket leak in test

Possibly fixes issue 1694.

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

14 years agomisc/goplay: fix Tab and Shift+Enter in Firefox.
Dmitry Chestnykh [Sat, 16 Apr 2011 08:44:51 +0000 (18:44 +1000)]
misc/goplay: fix Tab and Shift+Enter in Firefox.

Fixes #1633.

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

14 years agomime: bunch more tests, few minor parsing fixes
Brad Fitzpatrick [Fri, 15 Apr 2011 23:33:52 +0000 (16:33 -0700)]
mime: bunch more tests, few minor parsing fixes

Working towards issue 1119

Using test data from http://greenbytes.de/tech/tc2231/

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

14 years agoundo 4439044
Russ Cox [Fri, 15 Apr 2011 23:17:16 +0000 (19:17 -0400)]
undo 4439044

cannot use regalloc with floating point on 386.
will redo some other way.

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

14 years agocompress/zlib: add FDICT flag in Reader/Writer
Ross Light [Fri, 15 Apr 2011 22:32:03 +0000 (15:32 -0700)]
compress/zlib: add FDICT flag in Reader/Writer

R=bradfitzgo, rsc, bradfitzwork
CC=golang-dev
https://golang.org/cl/4406046

14 years agogc: fix complex move bug
Russ Cox [Fri, 15 Apr 2011 20:16:33 +0000 (16:16 -0400)]
gc: fix complex move bug

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

14 years agogc: print of unsafe.Pointer
Russ Cox [Fri, 15 Apr 2011 20:16:20 +0000 (16:16 -0400)]
gc: print of unsafe.Pointer

Got lost when I introduced TUNSAFEPTR.

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

14 years ago5g: correct size of reg array.
Ian Lance Taylor [Fri, 15 Apr 2011 20:09:57 +0000 (13:09 -0700)]
5g: correct size of reg array.

Found by gcc 4.5.2 -Werror build reported on IRC by niemeyer.

R=ken2, rsc, r2
CC=golang-dev
https://golang.org/cl/4438042

14 years agohttp: handler timeout support
Brad Fitzpatrick [Fri, 15 Apr 2011 19:53:32 +0000 (12:53 -0700)]
http: handler timeout support

Fixes #213

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

14 years agogodoc: use "search" input type for search box.
Dmitry Chestnykh [Fri, 15 Apr 2011 17:48:45 +0000 (10:48 -0700)]
godoc: use "search" input type for search box.

Uses placeholder attribute instead of changing the value of search
field on browsers that support it.  On other browsers, the fake
placeholder text is restored when the empty box loses focus.

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

14 years ago6l: fix another "set and not used".
Rob Pike [Fri, 15 Apr 2011 15:31:32 +0000 (08:31 -0700)]
6l: fix another "set and not used".

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

14 years agonet: disable one more external network test
Russ Cox [Fri, 15 Apr 2011 15:21:29 +0000 (11:21 -0400)]
net: disable one more external network test

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/4442042

14 years agojson: keep track of error offset in SyntaxError
Brad Fitzpatrick [Fri, 15 Apr 2011 15:14:34 +0000 (08:14 -0700)]
json: keep track of error offset in SyntaxError

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

14 years agohttp: reverse proxy handler
Brad Fitzpatrick [Fri, 15 Apr 2011 15:13:52 +0000 (08:13 -0700)]
http: reverse proxy handler

R=rsc, petar-m
CC=golang-dev
https://golang.org/cl/4428041

14 years agogc: printing of multiple assignment
Russ Cox [Fri, 15 Apr 2011 14:34:55 +0000 (10:34 -0400)]
gc: printing of multiple assignment

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

14 years agogob: when decoding a string, allocate a string, not a []byte.
Ian Lance Taylor [Fri, 15 Apr 2011 13:49:39 +0000 (06:49 -0700)]
gob: when decoding a string, allocate a string, not a []byte.

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

14 years agomake: prevent rm provoking 'text file busy' errors.
Lorenzo Stoakes [Fri, 15 Apr 2011 12:25:44 +0000 (08:25 -0400)]
make: prevent rm provoking 'text file busy' errors.

Trivial patch to stop intermediate rm'ing of binaries stopping build.

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

14 years agobuild: remove DISABLE_NET_TESTS
Russ Cox [Fri, 15 Apr 2011 12:20:42 +0000 (08:20 -0400)]
build: remove DISABLE_NET_TESTS

Don't use external network during all.bash.

R=r, r2, rh, ality
CC=golang-dev
https://golang.org/cl/4429041

14 years agoexpvar: add Func for functions that return values that are JSON marshalable.
David Symonds [Fri, 15 Apr 2011 08:21:18 +0000 (01:21 -0700)]
expvar: add Func for functions that return values that are JSON marshalable.

Remove {Float,Int,String}Func, which are now redundant.

Fixes #1684.

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

14 years agoos: turn EPIPE exit into panic
Russ Cox [Fri, 15 Apr 2011 04:01:29 +0000 (00:01 -0400)]
os: turn EPIPE exit into panic

R=iant, r2
CC=golang-dev
https://golang.org/cl/4427042

14 years agolibmach: fix warnings.
Dave Cheney [Fri, 15 Apr 2011 03:58:08 +0000 (23:58 -0400)]
libmach: fix warnings.

Fixes #1706.

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

14 years agonet: fix ParseIP
Quan Yong Zhai [Fri, 15 Apr 2011 03:49:51 +0000 (23:49 -0400)]
net: fix ParseIP
Fixes #1695.

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

14 years agoA+C: Quan Yong Zhai (individual CLA)
Russ Cox [Fri, 15 Apr 2011 03:49:46 +0000 (23:49 -0400)]
A+C: Quan Yong Zhai (individual CLA)

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/4405045

14 years agohttp: add NewRequest helper
Brad Fitzpatrick [Fri, 15 Apr 2011 03:36:52 +0000 (20:36 -0700)]
http: add NewRequest helper

NewRequest will save a lot of boilerplate code.

This also updates some docs on Request.Write and
adds some tests.

R=rsc, petar-m, r
CC=golang-dev
https://golang.org/cl/4406047

14 years agogopack: fix prefix bug
Russ Cox [Fri, 15 Apr 2011 03:34:14 +0000 (23:34 -0400)]
gopack: fix prefix bug

When prefix doesn't match, was deleting entire .6 file.

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

14 years agogobuilder: respect MAKEFLAGS if provided
Dave Cheney [Fri, 15 Apr 2011 02:35:19 +0000 (12:35 +1000)]
gobuilder: respect MAKEFLAGS if provided

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

14 years agogobuilder: permit builders of the form goos-goarch-foo
Andrew Gerrand [Fri, 15 Apr 2011 01:56:56 +0000 (11:56 +1000)]
gobuilder: permit builders of the form goos-goarch-foo

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

14 years agogob: fix handling of indirect receivers for GobDecoders.
Rob Pike [Fri, 15 Apr 2011 00:26:12 +0000 (17:26 -0700)]
gob: fix handling of indirect receivers for GobDecoders.
The previous code was just wrong. Let's not talk about it.
Passes iant's new test.

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

14 years agogob: test case for indirection to large field.
Ian Lance Taylor [Fri, 15 Apr 2011 00:16:26 +0000 (17:16 -0700)]
gob: test case for indirection to large field.

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

14 years agogofmt: exclude test case that doesn't compile w/o errors
Robert Griesemer [Fri, 15 Apr 2011 00:06:38 +0000 (17:06 -0700)]
gofmt: exclude test case that doesn't compile w/o errors

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

14 years agogofmt: gofmt test harness bug fix
Robert Griesemer [Thu, 14 Apr 2011 23:33:29 +0000 (16:33 -0700)]
gofmt: gofmt test harness bug fix

Don't use the rewrite rule from a previous test
for the next test if there is no rewrite rule
provided.

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

14 years agohttp: don't quote Set-Cookie Domain and Path
Petar Maymounkov [Thu, 14 Apr 2011 22:05:02 +0000 (15:05 -0700)]
http: don't quote Set-Cookie Domain and Path

Fixes #1659

R=rsc, bradfitzgo, bradfitzwork
CC=bradfitz, golang-dev
https://golang.org/cl/4368052

14 years agogofmt: don't crash when rewriting nil interfaces in AST.
Robert Griesemer [Thu, 14 Apr 2011 21:25:25 +0000 (14:25 -0700)]
gofmt: don't crash when rewriting nil interfaces in AST.

The new reflection API makes it an error to call value.Set(x)
if x is invalid. Guard for it.

Added corresponding test case.

Fixes #1696.

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

14 years agohttp: be clear when failing to connect to a proxy
Brad Fitzpatrick [Thu, 14 Apr 2011 20:49:19 +0000 (13:49 -0700)]
http: be clear when failing to connect to a proxy

Ubuntu and/or GNOME have some bug that likes
to set the "http_proxy" environment variable
and forgets to unset it.  This is annoying
to debug.  Be clear in the error message that
a proxy was in use.

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

14 years agofor GCC4.6: fix a bunch of set-and-not-used errors.
Rob Pike [Thu, 14 Apr 2011 20:31:37 +0000 (13:31 -0700)]
for GCC4.6: fix a bunch of set-and-not-used errors.

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

14 years agopkg/runtime/plan9: Warning remediation, for Plan 9 native.
Lucio De Re [Thu, 14 Apr 2011 18:54:36 +0000 (11:54 -0700)]
pkg/runtime/plan9: Warning remediation, for Plan 9 native.

. Missing declaration of runtime.brk_();
. Argument v in runtime.SysReserve() is not used;
  (I'd prefer a Plan 9-type solution...)

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

14 years agogotest: generate gofmt-compliant code
Brad Fitzpatrick [Thu, 14 Apr 2011 18:50:00 +0000 (11:50 -0700)]
gotest: generate gofmt-compliant code

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

14 years agocrypto/tls: add server-side OCSP stapling support.
Adam Langley [Thu, 14 Apr 2011 18:47:28 +0000 (14:47 -0400)]
crypto/tls: add server-side OCSP stapling support.

We already had support on the client side. I also changed the name of
the flag in the ServerHello structure to match the name of the same
flag in the ClientHello (ocspStapling).

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

14 years agohttp: consume request bodies before replying
Brad Fitzpatrick [Thu, 14 Apr 2011 17:40:23 +0000 (10:40 -0700)]
http: consume request bodies before replying

This fixes our http behavior (even if Handlers forget to
consume a request body, we do it for them before we send
their response header), fixes the racy TestServerExpect,
and adds TestServerConsumesRequestBody.

With GOMAXPROCS>1, the http tests now seem race-free.

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

14 years agohttp: fix race in transport_test
Brad Fitzpatrick [Thu, 14 Apr 2011 16:07:20 +0000 (09:07 -0700)]
http: fix race in transport_test

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

14 years agogotest: add timing, respect $GOARCH
Russ Cox [Thu, 14 Apr 2011 14:59:33 +0000 (10:59 -0400)]
gotest: add timing, respect $GOARCH

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

14 years agold: defend against some broken object files
Russ Cox [Thu, 14 Apr 2011 14:42:48 +0000 (10:42 -0400)]
ld: defend against some broken object files

Fixes #1698.
Fixes #1699.

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

14 years agocompress/flate: dictionary support
Russ Cox [Thu, 14 Apr 2011 14:41:55 +0000 (10:41 -0400)]
compress/flate: dictionary support

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

14 years agogc: fix use of typekind array in error messages
Russ Cox [Thu, 14 Apr 2011 13:33:53 +0000 (09:33 -0400)]
gc: fix use of typekind array in error messages

Fixes #1697.

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

14 years agoruntime: fix gdb support for channels.
Luuk van Dijk [Thu, 14 Apr 2011 13:32:20 +0000 (15:32 +0200)]
runtime: fix gdb support for channels.

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

14 years agoruntime: fix set and not used in chan.c
Dave Cheney [Thu, 14 Apr 2011 12:16:40 +0000 (08:16 -0400)]
runtime: fix set and not used in chan.c

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

14 years agolib9/create.c: delete unused variable
Rob Pike [Thu, 14 Apr 2011 06:12:48 +0000 (23:12 -0700)]
lib9/create.c: delete unused variable
fixes build with GCC4.6

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

14 years agotag weekly.2011-04-13
Andrew Gerrand [Thu, 14 Apr 2011 04:19:34 +0000 (14:19 +1000)]
tag weekly.2011-04-13

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

14 years agoweekly.2011-04-13 weekly.2011-04-13
Andrew Gerrand [Thu, 14 Apr 2011 04:18:35 +0000 (14:18 +1000)]
weekly.2011-04-13

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

14 years agoruntime: drop chan circular linked list in favor of circular buffer
Russ Cox [Thu, 14 Apr 2011 03:42:06 +0000 (23:42 -0400)]
runtime: drop chan circular linked list in favor of circular buffer

The list elements are already being allocated out of a
single memory buffer.  We can drop the Link* pointer
following and the memory it requires, replacing it with
index operations.

The change also keeps a channel from containing a pointer
back into its own allocation block, which would create a
cycle.  Blocks involved in cycles are not guaranteed to be
finalized properly, and channels depend on finalizers to
free OS-level locks on some systems.  The self-reference
was keeping channels from being garbage collected.

runtime-gdb.py will need to be updated in order to dump
the content of buffered channels with the new data structure.

Fixes #1676.

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

14 years agopkg: manual cleanup of some gofixed code
Russ Cox [Thu, 14 Apr 2011 03:36:00 +0000 (23:36 -0400)]
pkg: manual cleanup of some gofixed code

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

14 years agogc: fix func syntax error
Russ Cox [Thu, 14 Apr 2011 02:48:21 +0000 (22:48 -0400)]
gc: fix func syntax error

Fixes #1685.

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

14 years agonet: sort records returned by LookupMX
Corey Thomasson [Thu, 14 Apr 2011 00:30:56 +0000 (10:30 +1000)]
net: sort records returned by LookupMX

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

14 years agodoc/install.html: document use of libc6-dev-i386
Andrew Gerrand [Thu, 14 Apr 2011 00:28:59 +0000 (10:28 +1000)]
doc/install.html: document use of libc6-dev-i386

Fixes #1689.

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

14 years agogovet: make name-matching for printf etc. case-insensitive.
Rob Pike [Wed, 13 Apr 2011 23:57:44 +0000 (16:57 -0700)]
govet: make name-matching for printf etc. case-insensitive.
Update goyacc, cgo to be more canonical in their naming and silence the new warnings.

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

14 years agoimage: allow "?" wildcards when registering image formats.
Nigel Tao [Wed, 13 Apr 2011 23:56:42 +0000 (09:56 +1000)]
image: allow "?" wildcards when registering image formats.

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

14 years agogofmt: gofmt -s -w src misc
Robert Griesemer [Wed, 13 Apr 2011 22:13:59 +0000 (15:13 -0700)]
gofmt: gofmt -s -w src misc

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

14 years agolibmach: fix the windows build.
Rob Pike [Wed, 13 Apr 2011 21:57:47 +0000 (14:57 -0700)]
libmach: fix the windows build.
Newly enabled compiler errors need workaround.

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

14 years agofix build: disable gofmt test script, enable gotest testing instead
Robert Griesemer [Wed, 13 Apr 2011 21:24:38 +0000 (14:24 -0700)]
fix build: disable gofmt test script, enable gotest testing instead

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

14 years agohttp: flesh out server Expect handling + tests
Brad Fitzpatrick [Wed, 13 Apr 2011 21:09:04 +0000 (14:09 -0700)]
http: flesh out server Expect handling + tests

This mostly adds Expect 100-continue tests (from
the perspective of server correctness) that were
missing before.

It also fixes a few missing cases that will
probably never come up in practice, but it's nice
to have handled correctly.

Proper 100-continue client support remains a TODO.

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

14 years agogofmt: add test framework in Go
Robert Griesemer [Wed, 13 Apr 2011 20:59:59 +0000 (13:59 -0700)]
gofmt: add test framework in Go

- replaced existing testdata/test.sh with new gofmt_test
- added initial test case for rewrite tests

TODO: Need to add more tests.

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

14 years agogofmt: minor refactor to permit easy testing
Robert Griesemer [Wed, 13 Apr 2011 20:57:53 +0000 (13:57 -0700)]
gofmt: minor refactor to permit easy testing

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

14 years agoreflect: inline method implementations
Russ Cox [Wed, 13 Apr 2011 20:55:20 +0000 (16:55 -0400)]
reflect: inline method implementations

This CL is only cut-and-paste, moving code around.
Moving it in a separate CL should simplify the diffs in later CLs.

There are three patterns here.

1. A function like
        func (v Value) M() (...) {
                return v.panicIfNot(K).(*kValue).M()
        }
becomes
        func (v Value) M() (...) {
                vv := v.panicIfNot(K).(*kValue)

                // body of (*kValue).M, s/v./vv./g
        }

2. A function like
        func (v Value) M() (...) {
                return v.panicIfNots(kList).(mer).M()
        }
becomes
        func (v Value) M() (...) {
                switch vv := v.panicIfNots(kList).(type) {
                case *k1Value:
                        // body of (*k1Value).M, s/v./vv./g
                case *k2Value:
                        // body of (*k2Value).M, s/v./vv./g
                ...
                }
                panic("not reached")
        }

3. The rewrite of Value.Set follows 2, but each case
is built from the bodies of (*kValue).SetValue and (*kValue).Set.
        func (v *kValue) SetValue(x Value) {
                v.Set(x.panicIfNot(K).(*kValue)
        }
        func (v *kValue) Set(x *kValue) {
                ... body
        }
becomes, in the switch from 2,
                case *kValue:
                        xx := x.panicIfNot(K).(*kValue)
                        ... body, s/v./vv./g; s/x./xx./g

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

14 years agogofix: fix embarrassing typo in osopen.go
Rob Pike [Wed, 13 Apr 2011 20:49:24 +0000 (13:49 -0700)]
gofix: fix embarrassing typo in osopen.go

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

14 years agolibmach: fix freebsd compiler errors
Russ Cox [Wed, 13 Apr 2011 20:26:25 +0000 (16:26 -0400)]
libmach: fix freebsd compiler errors

TBR=r
CC=golang-dev
https://golang.org/cl/4396045

14 years agobuild: tidy intermediate files during build
Russ Cox [Wed, 13 Apr 2011 20:24:57 +0000 (16:24 -0400)]
build: tidy intermediate files during build

This CL changes the behavior of 'make install' and 'make test'
in the src/cmd directory and the src/pkg directory to have
each recursive make clean up after itself immediately.

It does the same in test/run, removing $F.$A and $A.out
(the common byproducts) between runs.

On machines with slow disks and aggressive kernel caching,
cleaning up immediately can mean that the intermediate
objects never get written to disk.

This change eliminates almost all the disk waiting during
all.bash on my laptop (a Thinkpad X201s with an SSD running Linux).

147.50u 19.95s 277.34r before
148.53u 21.64s 179.59r after

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

14 years agobuild: use gcc -Werror
Russ Cox [Wed, 13 Apr 2011 20:18:09 +0000 (16:18 -0400)]
build: use gcc -Werror

Better to fix the warnings that we find.

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

14 years agoos/inotify: use _test for test files, not _obj
Russ Cox [Wed, 13 Apr 2011 20:17:49 +0000 (16:17 -0400)]
os/inotify: use _test for test files, not _obj

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

14 years agobufio: add ReadLine
Adam Langley [Wed, 13 Apr 2011 19:12:28 +0000 (15:12 -0400)]
bufio: add ReadLine

It matches encoding/line exactly and the tests are copied from there.
If we land this, then encoding/line will get marked as deprecated then
deleted in time.

R=rsc, rog, peterGo
CC=golang-dev
https://golang.org/cl/4389046

14 years agoio: clarify that ReadAt shouldn't move the seek offset
Brad Fitzpatrick [Wed, 13 Apr 2011 18:18:38 +0000 (11:18 -0700)]
io: clarify that ReadAt shouldn't move the seek offset

R=r, mkrautz, r2, rsc
CC=golang-dev
https://golang.org/cl/4415041

14 years agogofmt: avoid endless loops
Robert Griesemer [Wed, 13 Apr 2011 16:38:13 +0000 (09:38 -0700)]
gofmt: avoid endless loops

With the (partial) resolution of identifiers done
by the go/parser, ast.Objects point may introduce
cycles in the AST. Don't follow *ast.Objects, and
replace them with nil instead (they are likely
incorrect after a rewrite anyway).

- minor manual cleanups after reflect change automatic rewrite
- includes fix by rsc related to reflect change

Fixes #1667.

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

14 years agogo/ast: fixed bug in NotNilFilter, added test
Robert Griesemer [Wed, 13 Apr 2011 16:37:13 +0000 (09:37 -0700)]
go/ast: fixed bug in NotNilFilter, added test

- fixed a couple of comments
- cleanups after reflect change

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

14 years agobuilder: fix documentation s/\.gobuilder/.gobuildkey/
Andrew Gerrand [Wed, 13 Apr 2011 04:49:56 +0000 (14:49 +1000)]
builder: fix documentation s/\.gobuilder/.gobuildkey/

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

14 years agomisc/vim: add plugin with Fmt command.
Dmitry Chestnykh [Wed, 13 Apr 2011 01:55:41 +0000 (11:55 +1000)]
misc/vim: add plugin with Fmt command.

Fmt command filters the current Go buffer through gofmt.
It tries to preserve cursor position and avoids replacing
the buffer with stderr output.

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

14 years agoarchive/tar: fix example's handling of os.EOF.
David Symonds [Wed, 13 Apr 2011 00:56:33 +0000 (10:56 +1000)]
archive/tar: fix example's handling of os.EOF.

Fixes #1677.

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

14 years agogodashboard: Show packages at launchpad.net
Gustavo Niemeyer [Wed, 13 Apr 2011 00:34:35 +0000 (10:34 +1000)]
godashboard: Show packages at launchpad.net

The changes were not tested for real in an App Engine environment,
so extra care should be taken.  That said, some static testing
was done with pyflakes, and a few existent problems were fixed on
the way.

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

14 years agoos: fix Readdir in Plan 9
Fazlul Shahriar [Tue, 12 Apr 2011 23:58:56 +0000 (16:58 -0700)]
os: fix Readdir in Plan 9

'TestReaddir.*' tests now passes.

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

14 years ago8l: correct Plan 9 compiler warnings
Lucio De Re [Tue, 12 Apr 2011 20:21:01 +0000 (16:21 -0400)]
8l: correct Plan 9 compiler warnings

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

14 years agofmt: allow %U for unsigned integers.
Rob Pike [Tue, 12 Apr 2011 18:03:05 +0000 (11:03 -0700)]
fmt: allow %U for unsigned integers.
Suggested by jan.mercl@nic.cz.

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

14 years agold: ELF header function declarations.
Lucio De Re [Tue, 12 Apr 2011 18:00:09 +0000 (11:00 -0700)]
ld: ELF header function declarations.

Added "void" inside "()" for two functions.

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

14 years agoC+A: Add Lucio De Re
Rob Pike [Tue, 12 Apr 2011 17:58:54 +0000 (10:58 -0700)]
C+A: Add Lucio De Re
I entered only one of his several addresses, the one that recent CLs use.

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

14 years agohttp: client gzip support
Brad Fitzpatrick [Tue, 12 Apr 2011 16:35:07 +0000 (09:35 -0700)]
http: client gzip support

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

14 years agoopenpgp: Fix improper := shadowing
Gustavo Niemeyer [Tue, 12 Apr 2011 14:48:05 +0000 (11:48 -0300)]
openpgp: Fix improper := shadowing

R=golang-dev, agl1, jnml
CC=golang-dev
https://golang.org/cl/4381058

14 years agoimage/ycbcr: new package.
Nigel Tao [Tue, 12 Apr 2011 12:32:03 +0000 (22:32 +1000)]
image/ycbcr: new package.

R=r, rsc, nigeltao_gnome
CC=golang-dev, raph
https://golang.org/cl/4374043

14 years agonet: fix laddr typo in test code.
Nigel Tao [Tue, 12 Apr 2011 00:36:41 +0000 (10:36 +1000)]
net: fix laddr typo in test code.

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

14 years agold: fix dwarf decoding of strings for struct's fieldnames
Luuk van Dijk [Mon, 11 Apr 2011 20:38:37 +0000 (16:38 -0400)]
ld: fix dwarf decoding of strings for struct's fieldnames

Moved Sym printing to Yconv.
Fixed warning in data.c

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

14 years agohttp: fix incorrect prints found by govet
Robert Hencke [Mon, 11 Apr 2011 20:05:08 +0000 (13:05 -0700)]
http: fix incorrect prints found by govet

R=golang-dev, bradfitzgo
CC=golang-dev
https://golang.org/cl/4370053

14 years agosyscall: fix StartProcess in Plan 9
Fazlul Shahriar [Mon, 11 Apr 2011 19:39:53 +0000 (12:39 -0700)]
syscall: fix StartProcess in Plan 9

This makes os_test.TestStartProcess test from os package pass.

R=paulzhol, r2, r
CC=golang-dev
https://golang.org/cl/4385052

14 years agocrypto/x509: expose complete DER data
Mikkel Krautz [Mon, 11 Apr 2011 15:20:12 +0000 (11:20 -0400)]
crypto/x509: expose complete DER data

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

14 years agoasn1: Implement correct marshalling of length octets
Luit van Drongelen [Mon, 11 Apr 2011 14:28:34 +0000 (10:28 -0400)]
asn1: Implement correct marshalling of length octets

Fixes #1683

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

14 years agoA+C: Luit van Drongelen (individual CLA)
Russ Cox [Mon, 11 Apr 2011 14:20:42 +0000 (10:20 -0400)]
A+C: Luit van Drongelen (individual CLA)

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

14 years agonet: disable multicast tests by default.
Dave Cheney [Mon, 11 Apr 2011 00:39:21 +0000 (10:39 +1000)]
net: disable multicast tests by default.

Fixes #1649.

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

14 years agomisc/vim: update type highlighting for new reflect package
David Symonds [Sun, 10 Apr 2011 22:48:19 +0000 (08:48 +1000)]
misc/vim: update type highlighting for new reflect package

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

14 years agoarchive/zip: add new type ReadCloser, make OpenReader return it.
Dmitry Chestnykh [Sun, 10 Apr 2011 01:23:23 +0000 (11:23 +1000)]
archive/zip: add new type ReadCloser, make OpenReader return it.
Fixes #1678.

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

14 years agold: 25% faster
Russ Cox [Sat, 9 Apr 2011 13:44:20 +0000 (09:44 -0400)]
ld: 25% faster

The ld time was dominated by symbol table processing, so
  * increase hash table size
  * emit fewer symbols in gc (just 1 per string, 1 per type)
  * add read-only lookup to avoid creating spurious symbols
  * add linked list to speed whole-table traversals

Breaks dwarf generator (no idea why), so disable dwarf.

Reduces time for 6l to link godoc by 25%.

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

14 years agogo/printer, gofmt: use blank to separate import rename from import path
Robert Griesemer [Fri, 8 Apr 2011 22:47:21 +0000 (15:47 -0700)]
go/printer, gofmt: use blank to separate import rename from import path

Note that declarations.golden is not using spaces for alignment (so
that the alignment tabs are visible) which is why this change affects
the test cases significantly. gofmt uses spaces for alignment (by default)
and only tabs for indentation.

gofmt -w src misc (no changes)

Fixes #1673.

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

14 years agobig: don't crash when printing nil ints
Adam Langley [Fri, 8 Apr 2011 19:43:19 +0000 (15:43 -0400)]
big: don't crash when printing nil ints

"%#v" of a structure with *big.Int's tends to crash a lot otherwise.

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

14 years ago8g: optimize byte mov
Russ Cox [Fri, 8 Apr 2011 17:53:59 +0000 (13:53 -0400)]
8g: optimize byte mov

Rewrite MOVB with less expensive
instruction when possible.

Suggested by atomic symbol.

benchmark                                        old ns/op    new ns/op    delta
crc32.BenchmarkCrc32KB                               13066         3942  -69.83%
crc64.BenchmarkCrc64KB                                8780         5949  -32.24%
lzw.BenchmarkDecoder1e4                             771224       636538  -17.46%
lzw.BenchmarkDecoder1e5                            7101218      6096634  -14.15%
lzw.BenchmarkDecoder1e6                           69762020     60789400  -12.86%
lzw.BenchmarkEncoder1e4                             707968       638812   -9.77%
lzw.BenchmarkEncoder1e5                            6567122      5965552   -9.16%
lzw.BenchmarkEncoder1e6                           65006000     58911680   -9.38%
utf8_test.BenchmarkRuneCountTenASCIIChars              166          165   -0.60%
utf8_test.BenchmarkRuneCountTenJapaneseChars           246          258   +4.88%
utf8_test.BenchmarkEncodeASCIIRune                      13           10  -23.08%
utf8_test.BenchmarkEncodeJapaneseRune                   37           16  -56.76%
utf8_test.BenchmarkDecodeASCIIRune                      23           21   -8.70%
utf8_test.BenchmarkDecodeJapaneseRune                   58           32  -44.83%

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