1
0
mirror of https://github.com/golang/go synced 2024-09-25 01:20:13 -06:00
Commit Graph

11426 Commits

Author SHA1 Message Date
Rob Pike
01afb79c59 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
2012-01-26 14:44:38 -08:00
Brad Fitzpatrick
899cd04e21 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
2012-01-26 14:37:14 -08:00
Russ Cox
408f0b1f74 gc, runtime: handle floating point map keys
Fixes #2609.

R=ken2
CC=golang-dev
https://golang.org/cl/5572069
2012-01-26 16:25:07 -05:00
Russ Cox
109a976355 6c, 8c: make floating point code NaN-safe
R=ken2
CC=golang-dev
https://golang.org/cl/5569071
2012-01-26 16:23:29 -05:00
Andrew Gerrand
29dbd988b8 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
2012-01-27 08:19:43 +11:00
Robert Griesemer
8a90a8861f 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
2012-01-26 10:08:21 -08:00
Russ Cox
71b1c6d3c9 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
2012-01-26 13:02:03 -05:00
Roger Peppe
32d7a7364f 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
2012-01-26 16:50:56 +00:00
Mikio Hara
974fa75557 net: make WriteTo fail when UDPConn is already connected
Fixes #2773.

R=rsc
CC=golang-dev
https://golang.org/cl/5571056
2012-01-27 01:31:42 +09:00
Luuk van Dijk
93e547a0c2 gc: softer criteria for inlinability.
R=rsc
CC=golang-dev
https://golang.org/cl/5555072
2012-01-26 17:20:48 +01:00
Dmitriy Vyukov
eaa8b30d5a 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
2012-01-26 20:09:09 +04:00
Dmitriy Vyukov
290921bbb5 net/rpc: fix data race in benchmark
Fixes #2781.

R=golang-dev, rsc
CC=golang-dev, mpimenov
https://golang.org/cl/5577053
2012-01-26 20:06:27 +04:00
Luuk van Dijk
0a55958b52 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
2012-01-26 15:10:24 +01:00
Dmitriy Vyukov
fa32b16413 net/rpc: fix race in TestClientWriteError test
Fixes #2752.

R=golang-dev, mpimenov, r
CC=golang-dev
https://golang.org/cl/5571062
2012-01-26 11:37:07 +04:00
Robert Hencke
7c9ee5f369 doc/go1: minor html fixes
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5572064
2012-01-25 21:09:46 -08:00
Rob Pike
f8a28ecc9f 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
2012-01-25 20:19:55 -08:00
Gustavo Niemeyer
7b5048570a doc/go1: add encoding/xml changes
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5569067
2012-01-26 00:59:50 -02:00
Blake Mizerany
bcb976c5b2 database/sql: fix Tx.Query
Fixes #2784

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5574073
2012-01-25 17:49:30 -08:00
Brad Fitzpatrick
5c04272ff3 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
2012-01-25 17:47:57 -08:00
James P. Cooper
c21b343438 database/sql: add NullInt64, NullFloat64, NullBool
Fixes #2699

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5557063
2012-01-25 17:47:32 -08:00
Gustavo Niemeyer
75e9d24213 doc/go1: fix urls
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5577051
2012-01-25 23:42:36 -02:00
Brad Fitzpatrick
eb1227737e A+C: Add James P. Cooper (Individual CLA)
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5573071
2012-01-25 17:34:02 -08:00
Brad Fitzpatrick
06f1be65a1 A+C: add Blake Mizerany (Individual CLA)
R=golang-dev, iant, adg
CC=golang-dev
https://golang.org/cl/5574072
2012-01-25 17:24:08 -08:00
Gustavo Niemeyer
805d620682 doc/go1: add net/url changes
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5575056
2012-01-25 23:11:25 -02:00
Robert Griesemer
ea347c0142 go/doc: fix typo
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5574071
2012-01-25 17:09:50 -08:00
Robert Griesemer
d571c5ca78 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
2012-01-25 16:48:06 -08:00
David G. Andersen
1e09031f7f 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
2012-01-25 16:09:12 -08:00
Gustavo Niemeyer
9d4ae0ae5c 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
2012-01-25 21:07:00 -02:00
David G. Andersen
316f81bb1d 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
2012-01-25 15:04:16 -08:00
Yoshiyuki Kanno
d645adc3d0 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
2012-01-25 15:00:39 -08:00
Russ Cox
ee9bfb023a 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
2012-01-25 17:53:50 -05:00
Brad Fitzpatrick
73ce14d0aa regexp: remove vestigial Error type
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5573069
2012-01-25 14:50:37 -08:00
Mikio Hara
9acea02de2 net: fix dialing google test
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5573060
2012-01-26 07:38:49 +09:00
Robert Griesemer
dbce368ef9 go/doc: test cases for sort order
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5569059
2012-01-25 13:56:12 -08:00
Rob Pike
7eaad5e640 go1: sub-repositories
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5569065
2012-01-25 13:29:25 -08:00
Robert Figueiredo
82d06e8f3c syscall: add NOTE_* constants on OS X
R=rsc
CC=golang-dev
https://golang.org/cl/5570043
2012-01-25 15:50:23 -05:00
Russ Cox
9f16d7fbee A+C: Robert Figueiredo (individual CLA)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5574067
2012-01-25 15:50:19 -05:00
Russ Cox
bf67a7b9b1 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
2012-01-25 15:41:49 -05:00
Brad Fitzpatrick
cf09a9d3bf 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
2012-01-25 12:31:06 -08:00
Russ Cox
0368ca138b build: remove code now in subrepositories
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5569064
2012-01-25 15:30:42 -05:00
Russ Cox
b6f671b901 gofix: update go1pkgrename for subrepositories
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5576044
2012-01-25 15:30:03 -05:00
Robert Griesemer
2355d18e3c gofix: add -debug flag for quicker diagnosis of internal errors
R=rsc, r
CC=golang-dev
https://golang.org/cl/5564055
2012-01-25 15:26:19 -05:00
Russ Cox
ceb59b069e codereview: more fixes
Python and Mercurial are a matched pair.

R=adg
CC=golang-dev
https://golang.org/cl/5570065
2012-01-25 14:46:10 -05:00
Russ Cox
79d2c57043 codereview: support for subrepositories
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5564054
2012-01-25 14:32:10 -05:00
Robert Griesemer
8efc020d7c 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
2012-01-25 10:45:16 -08:00
Robert Griesemer
d665ea98f3 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
2012-01-25 10:21:13 -08:00
Robert Griesemer
57af5429e6 go/doc: test case for corner case (override of predecl. type)
R=rsc
CC=golang-dev
https://golang.org/cl/5575055
2012-01-25 09:54:10 -08:00
Robert Griesemer
6d68be46dd 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
2012-01-25 09:53:26 -08:00
Robert Griesemer
6e3af46e7d gofmt: fix test.sh
R=adg, iant
CC=golang-dev
https://golang.org/cl/5573062
2012-01-25 08:58:41 -08:00
Fazlul Shahriar
c93ca600ec os: pass tests on Plan 9 again
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5563046
2012-01-25 00:15:44 -08:00