]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agodashboard: add sub-repositories to init list
Andrew Gerrand [Mon, 30 Jan 2012 00:59:06 +0000 (11:59 +1100)]
dashboard: add sub-repositories to init list
dashboard: add Kind to Package struct
dashboard: add kind parameter to /packages handler

R=rsc, bsiegert, rogpeppe
CC=golang-dev
https://golang.org/cl/5572062

13 years agocmd/goinstall: remove now that 'go get' works
Gustavo Niemeyer [Sun, 29 Jan 2012 19:22:20 +0000 (17:22 -0200)]
cmd/goinstall: remove now that 'go get' works

The changes to builder were not tested.

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

13 years agonet/http: set cookies in client jar on POST requests.
Volker Dobler [Sun, 29 Jan 2012 19:16:11 +0000 (14:16 -0500)]
net/http: set cookies in client jar on POST requests.

Cookies recieved in a response to a POST request are stored
in the client's jar like they are for GET requests.

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

13 years agocmd/go: add go tools to rearrangement
Rob Pike [Sun, 29 Jan 2012 19:07:25 +0000 (11:07 -0800)]
cmd/go: add go tools to rearrangement
fix, vet
yacc is also fixed (it was wrong before)
All that's left is the commands used during compilation
This looks like a huge CL, but it's almost all file renames.
The action is in cmd/go/pkg.go, the Makefiles, and .../doc.go.

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

13 years agocmd/go: slightly less confusing error message
Rob Pike [Sun, 29 Jan 2012 19:06:39 +0000 (11:06 -0800)]
cmd/go: slightly less confusing error message
If the argument to go fix isn't a package directory, the message said nothing helpful.
Now it at least says a package couldn't be found.

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

13 years agocodereview: fix initialization check
Russ Cox [Sun, 29 Jan 2012 19:04:24 +0000 (14:04 -0500)]
codereview: fix initialization check

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

13 years agocmd/go: c tools not used during compilation
Rob Pike [Sun, 29 Jan 2012 18:14:36 +0000 (10:14 -0800)]
cmd/go: c tools not used during compilation
cov, nm, pprof, prof

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

13 years ago5l, 6l, 8l, ld: remove memory leaks
Shenghou Ma [Sun, 29 Jan 2012 17:46:26 +0000 (12:46 -0500)]
5l, 6l, 8l, ld: remove memory leaks

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

13 years agocodereview: die if initialized twice
Russ Cox [Sun, 29 Jan 2012 17:33:13 +0000 (12:33 -0500)]
codereview: die if initialized twice

If this happens, something is misconfigured.
If we don't test for this explicitly, MatchAt ends
up calling itself recursively forever.

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

13 years agocmd/go: first piece of tool rearrangement
Rob Pike [Sun, 29 Jan 2012 17:19:05 +0000 (09:19 -0800)]
cmd/go: first piece of tool rearrangement
1) create go-tool dir in make.bash
2) clean up stale binaries in make.bash
3) add 'tool' command to go
4) convert goyacc->yacc as a first test tool
Since goyacc stands alone, it's a safe trial.

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

13 years agonet: update comments to remove redundant "net" prefix
Mikio Hara [Sun, 29 Jan 2012 10:11:05 +0000 (19:11 +0900)]
net: update comments to remove redundant "net" prefix

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

13 years agogc: use original constant expression in error messages.
Rémy Oudompheng [Sun, 29 Jan 2012 09:35:11 +0000 (10:35 +0100)]
gc: use original constant expression in error messages.

Fixes #2768.

R=golang-dev, lvd, iant
CC=golang-dev, remy
https://golang.org/cl/5572081

13 years agocmd/go: make vcs command actually gather output
Roger Peppe [Sat, 28 Jan 2012 12:02:22 +0000 (12:02 +0000)]
cmd/go: make vcs command actually gather output

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

13 years agoos: remove SIGXXX signals variables.
Brad Fitzpatrick [Fri, 27 Jan 2012 22:47:02 +0000 (14:47 -0800)]
os: remove SIGXXX signals variables.

They're not portable, and pkg os is supposed to be portable.

Fixes #2562

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

13 years agogo/doc: don't show methods of exported anonymous fields
Robert Griesemer [Fri, 27 Jan 2012 22:45:47 +0000 (14:45 -0800)]
go/doc: don't show methods of exported anonymous fields

Added flag AllMethods: if not set (future default), embedded
methods of exported (and thus visible) embedded fields are not
shown in the final package documentation

The actual change for AllMethods is just in sortedFuncs. All
other changes are simplifications of the existing logic (mostly
deletion of code): Because method conflicts due to embedding
must always be detected, remove any premature elimination of
types and methods. Instead collect all named types and all
methods and do the filtering at the end.

Miscellaneous:
- renamed baseType -> namedType
- streamline logic for recording embedded types
- record embedded types via a map (simpler data structures)

AllMethods is set by default; so the output is unchanged and
the tests pass. The next CL will enable the AllMethods flag
and have adjusted tests (and fix issue 2791).

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

13 years agogo/doc: added test case
Robert Griesemer [Fri, 27 Jan 2012 22:45:31 +0000 (14:45 -0800)]
go/doc: added test case

Don't show conflicting method embedded via
a visible and invisible anonymous field.

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

13 years agogo: introduce support for "go build" with gccgo.
Rémy Oudompheng [Fri, 27 Jan 2012 22:05:51 +0000 (17:05 -0500)]
go: introduce support for "go build" with gccgo.

The use of gccgo is triggered by GC=gccgo in environment. It
still needs the standard distribution to behave properly, but
allows using the test, build, run, install subcommands with
gccgo.

R=rsc, iant, fullung
CC=golang-dev, remy
https://golang.org/cl/5562045

13 years agoreflect: add comment about Type.Field allocation
Russ Cox [Fri, 27 Jan 2012 21:11:17 +0000 (16:11 -0500)]
reflect: add comment about Type.Field allocation

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

13 years agodoc: update Go1 release notes in light of the crypto/hmac change.
Adam Langley [Fri, 27 Jan 2012 18:12:27 +0000 (10:12 -0800)]
doc: update Go1 release notes in light of the crypto/hmac change.

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

13 years agocompress/flate: remove unused huffmanEncoder.generateChains.
Ivan Krasin [Fri, 27 Jan 2012 17:52:58 +0000 (09:52 -0800)]
compress/flate: remove unused huffmanEncoder.generateChains.

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

13 years agoflag: allow a FlagSet to not write to os.Stderr
Brad Fitzpatrick [Fri, 27 Jan 2012 17:23:06 +0000 (09:23 -0800)]
flag: allow a FlagSet to not write to os.Stderr

Fixes #2747

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

13 years agocgo: accept null pointers in gccgo flavour of C.GoString.
Rémy Oudompheng [Fri, 27 Jan 2012 08:36:53 +0000 (09:36 +0100)]
cgo: accept null pointers in gccgo flavour of C.GoString.

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

13 years agonet/rpc: fix data race on Call.Error
Dmitriy Vyukov [Fri, 27 Jan 2012 07:27:05 +0000 (11:27 +0400)]
net/rpc: fix data race on Call.Error
+eliminates a possibility of sending a call to Done several times.
+fixes memory leak in case of temporal Write errors.
+fixes data race on Client.shutdown.
+fixes data race on Client.closing.
+fixes comments.
Fixes #2780.

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

13 years agotest: match gccgo error messages
Ian Lance Taylor [Fri, 27 Jan 2012 07:06:47 +0000 (23:06 -0800)]
test: match gccgo error messages

complit1.go:37:34: error: may only omit types within composite literals of slice, array, or map type
complit1.go:38:19: error: may only omit types within composite literals of slice, array, or map type
complit1.go:18:21: error: slice of unaddressable value
complit1.go:19:10: error: slice of unaddressable value
complit1.go:20:9: error: slice of unaddressable value

convert1.go:28:13: error: invalid type conversion
convert1.go:32:12: error: invalid type conversion (cannot use type string as type Tint64)
convert1.go:36:12: error: invalid type conversion
convert1.go:37:13: error: invalid type conversion
convert1.go:40:11: error: invalid type conversion
convert1.go:41:12: error: invalid type conversion
convert1.go:44:12: error: invalid type conversion
convert1.go:46:13: error: invalid type conversion
convert1.go:48:11: error: invalid type conversion
convert1.go:50:12: error: invalid type conversion
convert1.go:52:6: error: invalid type conversion
convert1.go:53:12: error: invalid type conversion
convert1.go:54:12: error: invalid type conversion
convert1.go:56:13: error: invalid type conversion
convert1.go:57:11: error: invalid type conversion
convert1.go:58:11: error: invalid type conversion
convert1.go:64:13: error: invalid type conversion
convert1.go:68:12: error: invalid type conversion (cannot use type Tstring as type Tint64)
convert1.go:72:12: error: invalid type conversion
convert1.go:73:13: error: invalid type conversion
convert1.go:76:11: error: invalid type conversion (cannot use type Tbyte as type Trune)
convert1.go:77:12: error: invalid type conversion (cannot use type Tbyte as type Tint64)
convert1.go:80:12: error: invalid type conversion
convert1.go:82:13: error: invalid type conversion
convert1.go:84:11: error: invalid type conversion (cannot use type Trune as type Tbyte)
convert1.go:86:12: error: invalid type conversion (cannot use type Trune as type Tint64)
convert1.go:88:6: error: invalid type conversion (cannot use type Tint64 as type string)
convert1.go:89:12: error: invalid type conversion
convert1.go:90:12: error: invalid type conversion
convert1.go:92:13: error: invalid type conversion (cannot use type Tint64 as type Tstring)
convert1.go:93:11: error: invalid type conversion (cannot use type Tint64 as type Tbyte)
convert1.go:94:11: error: invalid type conversion (cannot use type Tint64 as type Trune)

fixedbugs/bug195.go:9:21: error: interface contains embedded non-interface
fixedbugs/bug195.go:12:21: error: interface contains embedded non-interface
fixedbugs/bug195.go:15:15: error: interface contains embedded non-interface
fixedbugs/bug195.go:18:2: error: invalid recursive interface
fixedbugs/bug195.go:26:2: error: invalid recursive interface
fixedbugs/bug195.go:22:2: error: invalid recursive interface

fixedbugs/bug251.go:15:2: error: invalid recursive interface
fixedbugs/bug251.go:11:2: error: invalid recursive interface

fixedbugs/bug374.go:18:34: error: use of undefined type ‘xxxx’
fixedbugs/bug374.go:16:5: error: incompatible type in initialization (incompatible type for method ‘m’ (different number of parameters))

fixedbugs/bug383.go:11:2: error: expected boolean expression
fixedbugs/bug383.go:12:2: error: expected boolean expression

fixedbugs/bug386.go:10:25: error: incompatible type for return value 1 (type has no methods)
fixedbugs/bug386.go:12:25: error: incompatible type for return value 1 (type has no methods)

fixedbugs/bug388.go:12:10: error: invalid named/anonymous mix
fixedbugs/bug388.go:17:19: error: non-name on left side of ‘:=’
fixedbugs/bug388.go:22:9: error: non-name on left side of ‘:=’
fixedbugs/bug388.go:27:10: error: expected type
fixedbugs/bug388.go:32:9: error: expected type
fixedbugs/bug388.go:23:14: error: reference to field ‘i’ in object which has no fields or methods
fixedbugs/bug388.go:18:18: error: invalid use of type

fixedbugs/bug389.go:12:5: error: incompatible type in initialization (different parameter types)

fixedbugs/bug390.go:15:24: error: expected integer, floating, or complex type

fixedbugs/bug394.go:10:1: error: expected declaration

fixedbugs/bug397.go:12:2: error: incompatible type for element 2 key in map construction

switch3.go:18:2: error: incompatible types in binary expression
switch3.go:22:2: error: incompatible types in binary expression
switch3.go:28:2: error: map can only be compared to nil
switch3.go:35:2: error: slice can only be compared to nil
switch3.go:42:2: error: func can only be compared to nil

syntax/else.go:11:9: error: expected ‘if’ or ‘{’

typeswitch2.go:15:2: error: duplicate type in switch
typeswitch2.go:19:2: error: duplicate type in switch
typeswitch2.go:26:2: error: duplicate type in switch
typeswitch2.go:40:9: error: ‘t’ declared and not used

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

13 years agotag weekly.2012-01-27
Andrew Gerrand [Fri, 27 Jan 2012 06:53:11 +0000 (17:53 +1100)]
tag weekly.2012-01-27

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

13 years agoweekly.2012-01-27 weekly.2012-01-27
Andrew Gerrand [Fri, 27 Jan 2012 06:51:53 +0000 (17:51 +1100)]
weekly.2012-01-27

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

13 years agogc: remove extra paranoia from inlining unsafe.Pointer fix.
David Symonds [Fri, 27 Jan 2012 02:59:32 +0000 (13:59 +1100)]
gc: remove extra paranoia from inlining unsafe.Pointer fix.

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

13 years agocmd/go: solve ambiguity of get lp.net/project/foo
Gustavo Niemeyer [Fri, 27 Jan 2012 02:58:24 +0000 (00:58 -0200)]
cmd/go: solve ambiguity of get lp.net/project/foo

This solves the ambiguity for "lp.net/project/foo". In these URLs,
"foo" could be a series name registered in Launchpad with its own
branch, and it could also be the name of a directory within the
main project branch one level up.

Solve it by testing if the series branch exists in Launchpad
and if it doesn't moving the root one level up.

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

13 years agogc: permit unsafe.Pointer for inlined functions.
David Symonds [Fri, 27 Jan 2012 02:44:48 +0000 (13:44 +1100)]
gc: permit unsafe.Pointer for inlined functions.

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

13 years agoarchive/zip: add functions to convert between os.FileInfo & FileHeader
Brad Fitzpatrick [Thu, 26 Jan 2012 23:31:09 +0000 (15:31 -0800)]
archive/zip: add functions to convert between os.FileInfo & FileHeader

Fixes #2186

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

13 years ago database/sql: convert SQL null values to []byte as nil.
James P. Cooper [Thu, 26 Jan 2012 23:12:48 +0000 (15:12 -0800)]
database/sql: convert SQL null values to []byte as nil.

Also allow string values to scan into []byte.
Fixes #2788.

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

13 years agoFAQ: more words about why GOMAXPROCS>1 might not speed you up
Rob Pike [Thu, 26 Jan 2012 22:44:38 +0000 (14:44 -0800)]
FAQ: more words about why GOMAXPROCS>1 might not speed you up

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

13 years agonet/http: add Request.RequestURI field
Brad Fitzpatrick [Thu, 26 Jan 2012 22:37:14 +0000 (14:37 -0800)]
net/http: add Request.RequestURI field

The new url.URL's parsing can be too canonicalizing for
certain applications. By keeping the original request URI
around, we give applications a gross escape hatch while
keeping the URL package clean and simple for normal uses.

(From a discussion with Gary Burd, Gustavo Niemeyer,
and Russ Cox.)

Fixes #2782

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

13 years agogc, runtime: handle floating point map keys
Russ Cox [Thu, 26 Jan 2012 21:25:07 +0000 (16:25 -0500)]
gc, runtime: handle floating point map keys

Fixes #2609.

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

13 years ago6c, 8c: make floating point code NaN-safe
Russ Cox [Thu, 26 Jan 2012 21:23:29 +0000 (16:23 -0500)]
6c, 8c: make floating point code NaN-safe

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

13 years agocmd/go: update doc.go with text generated from the usage strings
Andrew Gerrand [Thu, 26 Jan 2012 21:19:43 +0000 (08:19 +1100)]
cmd/go: update doc.go with text generated from the usage strings

Fixes #2783.

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

13 years agomath/big: test both bitLen and bitLen_g
Robert Griesemer [Thu, 26 Jan 2012 18:08:21 +0000 (10:08 -0800)]
math/big: test both bitLen and bitLen_g

Also: simpler, more direct test.

R=golang-dev, dave.andersen
CC=golang-dev
https://golang.org/cl/5573070

13 years agogodoc: move overview before API TOC
Russ Cox [Thu, 26 Jan 2012 18:02:03 +0000 (13:02 -0500)]
godoc: move overview before API TOC

Compare:
http://swtch.com/junk/regexp0.html [old]
http://swtch.com/junk/regexp.html [new]

Especially for packages with large APIs, this makes the
overview more promiment, so that it can give the appropriate
context for reading the API list.  This should help significantly
in packages with large APIs, like net, so that the first thing users
see is not a jumble of functions but an introduction to the package.

R=adg, gri, r, kevlar, dsymonds, rogpeppe
CC=golang-dev
https://golang.org/cl/5573068

13 years agonet/http: make ParseForm ignore unknown content types.
Roger Peppe [Thu, 26 Jan 2012 16:50:56 +0000 (16:50 +0000)]
net/http: make ParseForm ignore unknown content types.
Also fix a shadowed error variable bug.

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

13 years agonet: make WriteTo fail when UDPConn is already connected
Mikio Hara [Thu, 26 Jan 2012 16:31:42 +0000 (01:31 +0900)]
net: make WriteTo fail when UDPConn is already connected

Fixes #2773.

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

13 years agogc: softer criteria for inlinability.
Luuk van Dijk [Thu, 26 Jan 2012 16:20:48 +0000 (17:20 +0100)]
gc: softer criteria for inlinability.

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

13 years agonet/rpc: log Call reply discard
Dmitriy Vyukov [Thu, 26 Jan 2012 16:09:09 +0000 (20:09 +0400)]
net/rpc: log Call reply discard
It means serious user error that can lead to
hard to debug issues under load, log entry
will not harm.

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

13 years agonet/rpc: fix data race in benchmark
Dmitriy Vyukov [Thu, 26 Jan 2012 16:06:27 +0000 (20:06 +0400)]
net/rpc: fix data race in benchmark
Fixes #2781.

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

13 years agocmd/gc: forgotten recursion on ninit itself in order.c
Luuk van Dijk [Thu, 26 Jan 2012 14:10:24 +0000 (15:10 +0100)]
cmd/gc: forgotten recursion on ninit itself in order.c

Fixes test/reorder2.go for all cases tripped up with -lll in 5555072

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

13 years agonet/rpc: fix race in TestClientWriteError test
Dmitriy Vyukov [Thu, 26 Jan 2012 07:37:07 +0000 (11:37 +0400)]
net/rpc: fix race in TestClientWriteError test
Fixes #2752.

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

13 years agodoc/go1: minor html fixes
Robert Hencke [Thu, 26 Jan 2012 05:09:46 +0000 (21:09 -0800)]
doc/go1: minor html fixes

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

13 years agopath/filepath: fix test
Rob Pike [Thu, 26 Jan 2012 04:19:55 +0000 (20:19 -0800)]
path/filepath: fix test
If there's an error, sometimes you need to stop.
Part of issue 2787.

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

13 years agodoc/go1: add encoding/xml changes
Gustavo Niemeyer [Thu, 26 Jan 2012 02:59:50 +0000 (00:59 -0200)]
doc/go1: add encoding/xml changes

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

13 years agodatabase/sql: fix Tx.Query
Blake Mizerany [Thu, 26 Jan 2012 01:49:30 +0000 (17:49 -0800)]
database/sql: fix Tx.Query

Fixes #2784

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

13 years agocmd/goapi: new tool for tracking exported API over time
Brad Fitzpatrick [Thu, 26 Jan 2012 01:47:57 +0000 (17:47 -0800)]
cmd/goapi: new tool for tracking exported API over time

The idea is that we add files to the api/ directory which
are sets of promises for the future.  Each line in a file
is a stand-alone feature description.

When we do a release, we make sure we haven't broken or changed
any lines from the past (only added them).

We never change old files, only adding new ones. (go-1.1.txt,
etc)

R=dsymonds, adg, r, remyoudompheng, rsc
CC=golang-dev
https://golang.org/cl/5570051

13 years agodatabase/sql: add NullInt64, NullFloat64, NullBool
James P. Cooper [Thu, 26 Jan 2012 01:47:32 +0000 (17:47 -0800)]
database/sql: add NullInt64, NullFloat64, NullBool

Fixes #2699

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

13 years agodoc/go1: fix urls
Gustavo Niemeyer [Thu, 26 Jan 2012 01:42:36 +0000 (23:42 -0200)]
doc/go1: fix urls

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

13 years agoA+C: Add James P. Cooper (Individual CLA)
Brad Fitzpatrick [Thu, 26 Jan 2012 01:34:02 +0000 (17:34 -0800)]
A+C: Add James P. Cooper (Individual CLA)

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

13 years agoA+C: add Blake Mizerany (Individual CLA)
Brad Fitzpatrick [Thu, 26 Jan 2012 01:24:08 +0000 (17:24 -0800)]
A+C: add Blake Mizerany (Individual CLA)

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

13 years agodoc/go1: add net/url changes
Gustavo Niemeyer [Thu, 26 Jan 2012 01:11:25 +0000 (23:11 -0200)]
doc/go1: add net/url changes

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

13 years agogo/doc: fix typo
Robert Griesemer [Thu, 26 Jan 2012 01:09:50 +0000 (17:09 -0800)]
go/doc: fix typo

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

13 years agogo/doc: revert API change (per former discussion) and cleanup
Robert Griesemer [Thu, 26 Jan 2012 00:48:06 +0000 (16:48 -0800)]
go/doc: revert API change (per former discussion) and cleanup

Separating Method from Func made the code only more complicated
without adding much to the useability/readability of the API.
Reverted to where it was, but leaving the new method-specific
fields Orig and Level.

Former clients (godoc) of doc.Method only used the Func fields;
and because Func was embedded, no changes are needed with respect
to the removal of Method.

Changed type of Func.Recv from ast.Expr to string. This was a
long-standing TODO. Also implemented Func.Orig field (another TODO).

No further go/doc API changes are expected for Go 1.

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

13 years agomath/big: return type of bitLen is an int; use MOVL on amd64.
David G. Andersen [Thu, 26 Jan 2012 00:09:12 +0000 (16:09 -0800)]
math/big:  return type of bitLen is an int;  use MOVL on amd64.

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

13 years agogofix: handle xml.Unmarshal in xmlapi fix
Gustavo Niemeyer [Wed, 25 Jan 2012 23:07:00 +0000 (21:07 -0200)]
gofix: handle xml.Unmarshal in xmlapi fix

This improves the handling of xml.Unmarshal in
the xmlapi fix by guessing some of the common
types used on it.

This also fixes a bug in the partial typechecker.
In an expression such as f(&a), it'd mark a as
having &T rather than *T.

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

13 years agomath/big: assembly versions of bitLen for x86-64, 386, and ARM.
David G. Andersen [Wed, 25 Jan 2012 23:04:16 +0000 (15:04 -0800)]
math/big:  assembly versions of bitLen for x86-64, 386, and ARM.

Roughly 2x speedup for the internal bitLen function in arith.go.  Added TestWordBitLen test.

Performance differences against the new version of
bitLen generic:

x86-64 Macbook pro (current tip):

benchmark                old ns/op    new ns/op    delta
big.BenchmarkBitLen0             6            4  -37.40%
big.BenchmarkBitLen1             6            2  -51.79%
big.BenchmarkBitLen2             6            2  -65.04%
big.BenchmarkBitLen3             6            2  -66.10%
big.BenchmarkBitLen4             6            2  -60.96%
big.BenchmarkBitLen5             6            2  -55.80%
big.BenchmarkBitLen8             6            2  -56.19%
big.BenchmarkBitLen9             6            2  -64.73%
big.BenchmarkBitLen16            7            2  -68.84%
big.BenchmarkBitLen17            6            2  -67.11%
big.BenchmarkBitLen31            7            2  -61.57%

386 Intel Atom (current tip):
benchmark                old ns/op    new ns/op    delta
big.BenchmarkBitLen0            23           20  -13.04%
big.BenchmarkBitLen1            23           20  -14.77%
big.BenchmarkBitLen2            24           20  -19.28%
big.BenchmarkBitLen3            25           20  -21.57%
big.BenchmarkBitLen4            24           20  -16.94%
big.BenchmarkBitLen5            25           20  -20.78%
big.BenchmarkBitLen8            24           20  -19.28%
big.BenchmarkBitLen9            25           20  -20.47%
big.BenchmarkBitLen16           26           20  -23.37%
big.BenchmarkBitLen17           26           20  -25.09%
big.BenchmarkBitLen31           32           20  -35.51%

ARM v5 SheevaPlug, previous weekly patched with bitLen:
benchmark                old ns/op    new ns/op    delta
big.BenchmarkBitLen0            50           29  -41.73%
big.BenchmarkBitLen1            51           29  -42.75%
big.BenchmarkBitLen2            59           29  -50.08%
big.BenchmarkBitLen3            60           29  -50.75%
big.BenchmarkBitLen4            59           29  -50.08%
big.BenchmarkBitLen5            60           29  -50.75%
big.BenchmarkBitLen8            59           29  -50.08%
big.BenchmarkBitLen9            60           29  -50.75%
big.BenchmarkBitLen16           69           29  -57.35%
big.BenchmarkBitLen17           70           29  -57.89%
big.BenchmarkBitLen31           95           29  -69.07%

R=golang-dev, minux.ma, gri
CC=golang-dev
https://golang.org/cl/5574054

13 years agonet/http: fix Transport deadlock
Yoshiyuki Kanno [Wed, 25 Jan 2012 23:00:39 +0000 (15:00 -0800)]
net/http: fix Transport deadlock

This patch intend to fix following issues.
http://code.google.com/p/go/issues/detail?id=2616

Fixes #2616.

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

13 years agogc: fix order of evaluation
Russ Cox [Wed, 25 Jan 2012 22:53:50 +0000 (17:53 -0500)]
gc: fix order of evaluation

Pulling function calls out to happen before the
expression being evaluated was causing illegal
reorderings even without inlining; with inlining
it got worse.  This CL adds a separate ordering pass
to move things with a fixed order out of expressions
and into the statement sequence, where they will
not be reordered by walk.

Replaces lvd's CL 5534079.

Fixes #2740.

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

13 years agoregexp: remove vestigial Error type
Brad Fitzpatrick [Wed, 25 Jan 2012 22:50:37 +0000 (14:50 -0800)]
regexp: remove vestigial Error type

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

13 years agonet: fix dialing google test
Mikio Hara [Wed, 25 Jan 2012 22:38:49 +0000 (07:38 +0900)]
net: fix dialing google test

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

13 years agogo/doc: test cases for sort order
Robert Griesemer [Wed, 25 Jan 2012 21:56:12 +0000 (13:56 -0800)]
go/doc: test cases for sort order

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

13 years agogo1: sub-repositories
Rob Pike [Wed, 25 Jan 2012 21:29:25 +0000 (13:29 -0800)]
go1: sub-repositories

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

13 years agosyscall: add NOTE_* constants on OS X
Robert Figueiredo [Wed, 25 Jan 2012 20:50:23 +0000 (15:50 -0500)]
syscall: add NOTE_* constants on OS X

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

13 years agoA+C: Robert Figueiredo (individual CLA)
Russ Cox [Wed, 25 Jan 2012 20:50:19 +0000 (15:50 -0500)]
A+C: Robert Figueiredo (individual CLA)

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

13 years agobuild: fix build
Russ Cox [Wed, 25 Jan 2012 20:41:49 +0000 (15:41 -0500)]
build: fix build

I said rm, but not hg rm.
I never was good at Simon says.

TBR=bradfitz
CC=golang-dev
https://golang.org/cl/5574066

13 years agonet/http: disabled test for Transport race / deadlock bug
Brad Fitzpatrick [Wed, 25 Jan 2012 20:31:06 +0000 (12:31 -0800)]
net/http: disabled test for Transport race / deadlock bug

The real fix for Issue 2616 is in
https://golang.org/cl/5532057, to be submitted
following this CL, without the test there which doesn't work
reliably. This one seems to.

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

13 years agobuild: remove code now in subrepositories
Russ Cox [Wed, 25 Jan 2012 20:30:42 +0000 (15:30 -0500)]
build: remove code now in subrepositories

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

13 years agogofix: update go1pkgrename for subrepositories
Russ Cox [Wed, 25 Jan 2012 20:30:03 +0000 (15:30 -0500)]
gofix: update go1pkgrename for subrepositories

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

13 years agogofix: add -debug flag for quicker diagnosis of internal errors
Robert Griesemer [Wed, 25 Jan 2012 20:26:19 +0000 (15:26 -0500)]
gofix: add -debug flag for quicker diagnosis of internal errors

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

13 years agocodereview: more fixes
Russ Cox [Wed, 25 Jan 2012 19:46:10 +0000 (14:46 -0500)]
codereview: more fixes

Python and Mercurial are a matched pair.

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

13 years agocodereview: support for subrepositories
Russ Cox [Wed, 25 Jan 2012 19:32:10 +0000 (14:32 -0500)]
codereview: support for subrepositories

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

13 years agogo/printer: factor some frequently used code
Robert Griesemer [Wed, 25 Jan 2012 18:45:16 +0000 (10:45 -0800)]
go/printer: factor some frequently used code

Added a cache to compensate for extra call overhead.
go test -bench=Print marginally faster (in the noise).

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

13 years agogo/printer, gofmt: respect line breaks in signatures
Robert Griesemer [Wed, 25 Jan 2012 18:21:13 +0000 (10:21 -0800)]
go/printer, gofmt: respect line breaks in signatures

No changes when applying gofmt to src, misc.

Fixes #2597.

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

13 years agogo/doc: test case for corner case (override of predecl. type)
Robert Griesemer [Wed, 25 Jan 2012 17:54:10 +0000 (09:54 -0800)]
go/doc: test case for corner case (override of predecl. type)

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

13 years agogo/doc: clean rewrite of go/doc internals
Robert Griesemer [Wed, 25 Jan 2012 17:53:26 +0000 (09:53 -0800)]
go/doc: clean rewrite of go/doc internals

The implementation is divided into 4 phases:
1) export filtering of an incoming AST if necessary (exports.go)
2) reading of a possibly filtered AST (reader.go: type reader)
3) method set computation (reader.go)
4) sorting and creation of final documentation (reader.go)

In contrast to the old implementation, the presentation data
(Names, Docs, Decls, etc.) are created immediately upon reading
the respective AST node. Also, all types are collected (embedded
or not) in a uniform way.

Once the entire AST has been processed, all methods and types
have been collected and the method sets for each type can be
computed (phase 3).

To produce the final documentation, the method sets and value
maps are sorted.

There are no API changes. Passes the existing test suite unchanged.

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

13 years agogofmt: fix test.sh
Robert Griesemer [Wed, 25 Jan 2012 16:58:41 +0000 (08:58 -0800)]
gofmt: fix test.sh

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

13 years agoos: pass tests on Plan 9 again
Fazlul Shahriar [Wed, 25 Jan 2012 08:15:44 +0000 (00:15 -0800)]
os: pass tests on Plan 9 again

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

13 years agoruntime: move NumCPU declaration into debug.go.
David Symonds [Wed, 25 Jan 2012 03:13:11 +0000 (14:13 +1100)]
runtime: move NumCPU declaration into debug.go.

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

13 years agoarchive/tar: fix race in TestNonSeekable
Joel Sing [Wed, 25 Jan 2012 02:44:53 +0000 (13:44 +1100)]
archive/tar: fix race in TestNonSeekable

Reimplement the test based on code from adg@golang.org.

The previous version has a race since the file is closed via defer
rather than in the go routine. This meant that the file could be
closed before the go routine has actually received io.EOF. It then
receives EBADF and continues to do zero-byte writes to the pipe.

This addresses an issue seen on FreeBSD and OpenBSD, where the test
passes but exits with a SIGPIPE, resulting in a failure.

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

13 years agodoc/go1: mime, filepath.Walk
Rob Pike [Wed, 25 Jan 2012 01:02:06 +0000 (17:02 -0800)]
doc/go1: mime, filepath.Walk

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

13 years agogodoc: update metadata upon launch
Andrew Gerrand [Wed, 25 Jan 2012 00:56:31 +0000 (11:56 +1100)]
godoc: update metadata upon launch

Without this change it's possible to launch godoc,
immediately GET /, and see a directory listing instead of root.html

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

13 years agogo/scanner: Use explicit scanner.Mode type.
Robert Griesemer [Wed, 25 Jan 2012 00:49:03 +0000 (16:49 -0800)]
go/scanner: Use explicit scanner.Mode type.

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

13 years agonet/http: parse CONNECT requests
Andrew Balholm [Wed, 25 Jan 2012 00:42:00 +0000 (11:42 +1100)]
net/http: parse CONNECT requests

Fixes #2755

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

13 years agodoc/go1: add more info about hash and net changes, delete reference to html
Rob Pike [Wed, 25 Jan 2012 00:36:40 +0000 (16:36 -0800)]
doc/go1: add more info about hash and net changes, delete reference to html

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

13 years agogo/parser: Use explicit parser.Mode type.
Robert Griesemer [Wed, 25 Jan 2012 00:36:20 +0000 (16:36 -0800)]
go/parser: Use explicit parser.Mode type.

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

13 years agohtml: move the HTML parser to an exp/html package. The parser is a
Nigel Tao [Tue, 24 Jan 2012 23:54:59 +0000 (10:54 +1100)]
html: move the HTML parser to an exp/html package. The parser is a
work in progress, and we are not ready to freeze its API for Go 1.

Package html still exists, containing just two functions: EscapeString
and UnescapeString.

Both the packages at exp/html and html are "package html". The former
is a superset of the latter.

At some point in the future, the exp/html code will move back into
html, once we have finalized the parser API.

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

13 years agoencoding/xml: remove Marshaler support
Gustavo Niemeyer [Tue, 24 Jan 2012 23:51:15 +0000 (21:51 -0200)]
encoding/xml: remove Marshaler support

Marshaler has a number of open areas that need
further thought (e.g. it doesn't handle attributes,
it's supposed to handle tag names internally but has
no information to do so, etc).

We're removing it now and will bring it back with an
interface that covers these aspects, after Go 1.

Related to issue 2771, but doesn't fix it.

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

13 years agomath/big: add examples for Rat and Int's SetString and Scan methods
Andrew Gerrand [Tue, 24 Jan 2012 23:29:44 +0000 (10:29 +1100)]
math/big: add examples for Rat and Int's SetString and Scan methods

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

13 years agoencoding/xml: add docs for ignoring tag
Gustavo Niemeyer [Tue, 24 Jan 2012 23:04:40 +0000 (21:04 -0200)]
encoding/xml: add docs for ignoring tag

That was supposed to be in the original CL, but missed
the files.

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

13 years agotext/template: add example for Template
Andrew Gerrand [Tue, 24 Jan 2012 22:24:25 +0000 (09:24 +1100)]
text/template: add example for Template

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

13 years agoencoding/binary: document that PutVarint, PutUvarint may panic
Brad Fitzpatrick [Tue, 24 Jan 2012 22:19:59 +0000 (14:19 -0800)]
encoding/binary: document that PutVarint, PutUvarint may panic

Fixes #2628

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

13 years agonet: actually reset deadline when time is zero
Brad Fitzpatrick [Tue, 24 Jan 2012 22:06:12 +0000 (14:06 -0800)]
net: actually reset deadline when time is zero

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

13 years agobuild: do not build all C compilers
Shenghou Ma [Tue, 24 Jan 2012 20:03:41 +0000 (15:03 -0500)]
build: do not build all C compilers
        In order to allow buildscript.sh to generate buildscripts for all
        $GOOS/$GOARCH combinations, we have to generate dummy files for cmd/go.
        Fixes #2586.

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

13 years agorename FooError vars to ErrFoo
Brad Fitzpatrick [Tue, 24 Jan 2012 19:48:48 +0000 (11:48 -0800)]
rename FooError vars to ErrFoo

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

13 years agotest: Add the usual Copyright notice.
Olivier Duperray [Tue, 24 Jan 2012 19:48:15 +0000 (14:48 -0500)]
test: Add the usual Copyright notice.

Fixes #2759.

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

13 years agogo/build: typo
Brad Fitzpatrick [Tue, 24 Jan 2012 19:24:55 +0000 (11:24 -0800)]
go/build: typo

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