Shenghou Ma [Wed, 13 Jun 2012 20:24:39 +0000 (16:24 -0400)]
[release-branch.go1] api: add Linux/ARM to go1 API
««« backport 5538444d6f32
api: add Linux/ARM to go1 API
It's very unfortunate that the type of Data field of struct
RawSockaddr is [14]uint8 on Linux/ARM instead of [14]int8
on all the others.
btw, it should be [14]int8 according to my header files.
Brad Fitzpatrick [Wed, 13 Jun 2012 20:24:34 +0000 (16:24 -0400)]
[release-branch.go1] api: add FreeBSD to go1 API
««« backport d8e47164f8dd
api: add FreeBSD to go1 API
Now that gri has made go/parser 15% faster, I offer this
change to slow back down cmd/api ~proportionately, adding
FreeBSD to the go1-checked set of platforms.
Really we should have done this earlier. This will prevent us
from breaking FreeBSD compatibility accidentally in the
future.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6279044
Jean-Marc Eurin [Wed, 13 Jun 2012 20:24:29 +0000 (16:24 -0400)]
[release-branch.go1] misc/emacs: Use patch output of gofmt instead of replacing the buffer.
««« backport 6c2e9ed1f714
misc/emacs: Use patch output of gofmt instead of replacing the buffer.
This uses the patch output of gofmt (-d option) and applies each
chunk to the buffer, instead of replacing the whole buffer. The
main advantage is that the undo history is kept across gofmt'ings,
so it can really be used as a before-save-hook.
Rémy Oudompheng [Wed, 13 Jun 2012 20:24:28 +0000 (16:24 -0400)]
[release-branch.go1] runtime: do not unset the special bit after finalization.
««« backport 4a10c887bb3e
runtime: do not unset the special bit after finalization.
A block with finalizer might also be profiled. The special bit
is needed to unregister the block from the profile. It will be
unset only when the block is freed.
Peter Kleiweg [Wed, 13 Jun 2012 20:24:27 +0000 (16:24 -0400)]
[release-branch.go1] Emacs go-mode: don't indent the inside of strings.
««« backport 8888febbe757
Emacs go-mode: don't indent the inside of strings.
Two fixes for indentation problems:
1. Properly recognize multi-line strings. These start with `, not ".
2. Don't indent a line if the beginning of the line is the end of a multi-line string. This happened for instance when inserting a closing bracket after a multi-line string.
Alexey Borzenkov [Wed, 13 Jun 2012 20:24:23 +0000 (16:24 -0400)]
[release-branch.go1] net/http: reuse http proxy connections for different http requests
««« backport d0bc02d414c7
net/http: reuse http proxy connections for different http requests
Comment on cache keys above connectMethod says "http to proxy, http
anywhere after that", however in reality target address was always
included, which prevented http requests to different target
addresses to reuse the same http proxy connection.
Russ Cox [Wed, 13 Jun 2012 20:24:21 +0000 (16:24 -0400)]
[release-branch.go1] cmd/gc: fix parallel assignment in range
««« backport 2252777854d2
cmd/gc: fix parallel assignment in range
for expr1, expr2 = range slice
was assigning to expr1 and expr2 in sequence
instead of in parallel. Now it assigns in parallel,
as it should. This matters for things like
for i, x[i] = range slice.
Russ Cox [Wed, 13 Jun 2012 20:24:21 +0000 (16:24 -0400)]
[release-branch.go1] runtime: handle and test large map values
««« backport 98488e2e38ee
runtime: handle and test large map values
This is from CL 5451105 but was dropped from that CL.
See also CL 6137051.
The only change compared to 5451105 is to check for
h != nil in reflect·mapiterinit; allowing use of nil maps
must have happened after that original CL.
Fixes #3573.
R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/6215078
Rob Pike [Wed, 13 Jun 2012 20:24:17 +0000 (16:24 -0400)]
[release-branch.go1] runtime: fix docs for Caller and Callers
««« backport 443c7a2dabe9
runtime: fix docs for Caller and Callers
The previous attempt to explain this got it backwards (all the more reason to be
sad we couldn't make the two functions behave the same).
Ugorji Nwoke [Wed, 13 Jun 2012 20:24:09 +0000 (16:24 -0400)]
[release-branch.go1] text/template: exec should accept interface value as valid.
««« backport 4c05c319570b
text/template: exec should accept interface value as valid.
Currently, if you pass some data to a template as an interface (e.g. interface{})
and extract that value that value as a parameter for a function, it fails, saying
wrong type.
This is because it is only looking at the interface type, not the interface content.
This CL uses the underlying content as the parameter to the func.
Fixes #3642.
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/6218052
Russ Cox [Wed, 13 Jun 2012 20:24:08 +0000 (16:24 -0400)]
[release-branch.go1] unicode: fix comment about variable types
««« backport 40104e4c312d
unicode: fix comment about variable types
In both the web and command line tool,
the comment is shown after the declaration.
But in the code the comment is obviously before.
Make the text not refer to a specific order.
Comment groups must end at the end of a line (or the
next non-comment token) if the group started on a line
with non-comment tokens.
This is important for correct computation of "lead"
and "line" comments (Doc and Comment fields in AST nodes).
Without this fix, the "line" comment for F1 in the
following example:
type T struct {
F1 int // comment1
// comment2
F2 int
}
is "// comment1// comment2" rather than just "// comment1".
This bug was present from Day 1 but only visible when
looking at export-filtered ASTs where only comments
associated with AST nodes are printed, and only in rare
cases (e.g, in the case above, if F2 where not exported,
godoc would show "// comment2" anyway because it was
considered part of the "line" comment for F1).
The bug fix is very small (parser.go). The bulk of the
changes are additional test cases (parser_test.go).
The fix exposed a caching bug in go/printer via one of the
existing tests, hence the changes to printer.go.
As an aside, the fix removes the the need for empty lines
before an "// Output" comment for some special cases of
code examples (e.g.: src/pkg/strings/example_test.go, Count
example).
NOTE: A new OID has been defined for the combination
of the v1.5 signature scheme and the SHA-224 hash function:
sha224WithRSAEncryption OBJECT IDENTIFIER ::=
Like the other sha*WithRSAEncryption OIDs in PKCS #1 v2.1,
this OID has NULL parameters.
The DigestInfo encoding for SHA-224 (see Section 9.2, Note 1) is:
(0x)30 2d 30 0d 06 09 60 86 48 01 65 03 04 02 04 05 00 04 1c || H
Volker Dobler [Wed, 13 Jun 2012 20:24:02 +0000 (16:24 -0400)]
[release-branch.go1] net/http: add cookies from jar to POST request.
««« backport 05fc2ee43b46
net/http: add cookies from jar to POST request.
The main content of this CL is a test case checking the reported
issue 3511 and a tiny fix for it. A subsequent CL will refactor
the fix as proposed issue 3511.
Russ Cox [Wed, 13 Jun 2012 20:23:54 +0000 (16:23 -0400)]
[release-branch.go1] cmd/go: invoke godoc with import path when possible
««« backport 5b1e024a5e89
cmd/go: invoke godoc with import path when possible
Also add -n -x flags to doc, fmt, vet.
Also shorten unknown command error.
Fixes #3612.
Fixes #3613.
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/6211053
Brad Fitzpatrick [Wed, 13 Jun 2012 20:23:52 +0000 (16:23 -0400)]
[release-branch.go1] mime/multipart: fix handling of empty parts without CRLF before next part
««« backport 32a8b0e41031
mime/multipart: fix handling of empty parts without CRLF before next part
Empty parts can be either of the form:
a) "--separator\r\n", header (w/ trailing 2xCRLF), \r\n "--separator"...
or
b) "--separator\r\n", header (w/ trailing 2xCRLF), "--separator"...
We never handled case b). In fact the RFC seems kinda vague about
it, but browsers seem to do a), and App Engine's synthetic POST
bodies after blob uploads is of form b).
So handle them both, and add a bunch of tests.
(I can't promise these are the last fixes to multipart, especially
considering its history, but I'm growing increasingly confident at
least, and I've never submitted a multipart CL with known bugs
outstanding, including this time.)
Nigel Tao [Wed, 13 Jun 2012 20:23:47 +0000 (16:23 -0400)]
[release-branch.go1] go: fix the import path "./..." not matching ".".
««« backport cdd1fa20bb08
go: fix the import path "./..." not matching ".".
Tested manually.
Fixes #3554.
Before:
$ cd $GOROOT/src/pkg
$ go list io
io
$ go list io/...
io
io/ioutil
$ cd $GOROOT/src/pkg/io
$ go list .
io
$ go list ./...
io/ioutil
After:
$ cd $GOROOT/src/pkg
$ go list io
io
$ go list io/...
io
io/ioutil
$ cd $GOROOT/src/pkg/io
$ go list .
io
$ go list ./...
io
io/ioutil
$ go list ././...
io
io/ioutil
$ go list ././.././io/...
io
io/ioutil
$ go list ../image
image
$ go list ../image/...
image
image/color
image/draw
image/gif
image/jpeg
image/png
$ go list ../.../template
html/template
text/template
$ cd $GOROOT/src/pkg
$ go list ./io
io
$ go list ./io/...
io
io/ioutil
$ go list ./.../pprof
net/http/pprof
runtime/pprof
$ go list ./compress
can't load package: package compress: no Go source files in /home/nigeltao/go/src/pkg/compress
$ go list ./compress/...
compress/bzip2
compress/flate
compress/gzip
compress/lzw
compress/zlib
$ cd $GOROOT/src/pkg/code.google.com
$ go list ./p/leveldb-go/...
code.google.com/p/leveldb-go/leveldb
code.google.com/p/leveldb-go/leveldb/crc
code.google.com/p/leveldb-go/leveldb/db
code.google.com/p/leveldb-go/leveldb/memdb
code.google.com/p/leveldb-go/leveldb/memfs
code.google.com/p/leveldb-go/leveldb/record
code.google.com/p/leveldb-go/leveldb/table
code.google.com/p/leveldb-go/manualtest/filelock
$ go list ./p/.../truetype
code.google.com/p/freetype-go/example/truetype
code.google.com/p/freetype-go/freetype/truetype
$ go list ./p/.../example
warning: "./p/.../example" matched no packages
$ go list ./p/.../example/...
code.google.com/p/freetype-go/example/freetype
code.google.com/p/freetype-go/example/gamma
code.google.com/p/freetype-go/example/raster
code.google.com/p/freetype-go/example/round
code.google.com/p/freetype-go/example/truetype
code.google.com/p/x-go-binding/example/imgview
code.google.com/p/x-go-binding/example/xgb
Sameer Ajmani [Wed, 13 Jun 2012 20:23:24 +0000 (16:23 -0400)]
[release-branch.go1] misc/emacs: fix go-mode syntax table and whitespace handling.
««« backport d3896e6fb40e
misc/emacs: fix go-mode syntax table and whitespace handling.
- flag * and / as comment characters
- mark newline as a comment-ender
- include newline in go-mode-whitespace-p
Thanks Jonathan Amsterdam and Steve Yegge for the patch!