]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agoencoding/binary: add Write and Read examples
Andrew Gerrand [Tue, 20 Dec 2011 02:16:36 +0000 (13:16 +1100)]
encoding/binary: add Write and Read examples

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

13 years ago5l/6l/8l: add support for netbsd signature note section
Joel Sing [Tue, 20 Dec 2011 01:25:06 +0000 (12:25 +1100)]
5l/6l/8l: add support for netbsd signature note section

R=m4dh4tt3r, jsing, rsc
CC=golang-dev
https://golang.org/cl/5493068

13 years agonet/http: test should not leave tmp files behind on windows
Alex Brainman [Tue, 20 Dec 2011 00:53:24 +0000 (11:53 +1100)]
net/http: test should not leave tmp files behind on windows

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

13 years agoos: make sure Remove returns correct error on windows
Alex Brainman [Tue, 20 Dec 2011 00:52:20 +0000 (11:52 +1100)]
os: make sure Remove returns correct error on windows

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

13 years agoold/template: close file in TestAll before deleting it
Alex Brainman [Tue, 20 Dec 2011 00:51:31 +0000 (11:51 +1100)]
old/template: close file in TestAll before deleting it

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

13 years agodashboard: display correct package build state
Andrew Gerrand [Tue, 20 Dec 2011 00:30:48 +0000 (11:30 +1100)]
dashboard: display correct package build state

Includes some boring whitespace tweaks.

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

13 years agohtml: ignore <caption>, <col>, <tbody> etc. when parsing table fragments
Andrew Balholm [Mon, 19 Dec 2011 23:57:06 +0000 (10:57 +1100)]
html: ignore <caption>, <col>, <tbody> etc. when parsing table fragments

Pass tests6.dat, test 36:
<caption><col><colgroup><tbody><tfoot><thead><tr>

| <tr>

Pass tests through test 44:
<body></body></html>

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

13 years agozip: fix data race in test
Brad Fitzpatrick [Mon, 19 Dec 2011 23:40:10 +0000 (15:40 -0800)]
zip: fix data race in test

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

13 years agosyscall: regenerate z-files for linux/arm
Mikio Hara [Mon, 19 Dec 2011 22:42:00 +0000 (07:42 +0900)]
syscall: regenerate z-files for linux/arm

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

13 years agoexec: disable new test to fix build
Ian Lance Taylor [Mon, 19 Dec 2011 22:09:12 +0000 (14:09 -0800)]
exec: disable new test to fix build

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

13 years agostrconv: implement faster parsing of decimal numbers.
Rémy Oudompheng [Mon, 19 Dec 2011 21:45:51 +0000 (16:45 -0500)]
strconv: implement faster parsing of decimal numbers.

The algorithm is the same as in the double-conversion library
which also implements Florian Loitsch's fast printing algorithm.
It uses extended floats with a 64-bit mantissa, but cannot give
an answer for all cases.

                           old ns/op  new ns/op  speedup
BenchmarkAtof64Decimal         332        322      1.0x
BenchmarkAtof64Float           385        373      1.0x
BenchmarkAtof64FloatExp       9777        419     23.3x
BenchmarkAtof64Big            3934        691      5.7x
BenchmarkAtof64RandomBits    34060        899     37.9x
BenchmarkAtof64RandomFloats   1329        680      2.0x

See F. Loitsch, ``Printing Floating-Point Numbers Quickly and
Accurately with Integers'', Proceedings of the ACM, 2010.

R=ality, rsc
CC=golang-dev, remy
https://golang.org/cl/5494068

13 years agodoc: delete go course notes
Rob Pike [Mon, 19 Dec 2011 21:23:27 +0000 (13:23 -0800)]
doc: delete go course notes
They're out of date, a pain to maintain, and most of the material
is better served by the Go Tour.

Fixes #2101.

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

13 years agonet, syscall, os: set CLOEXEC flag on epoll/kqueue descriptor
Ian Lance Taylor [Mon, 19 Dec 2011 20:57:49 +0000 (12:57 -0800)]
net, syscall, os: set CLOEXEC flag on epoll/kqueue descriptor
Enable new test in os.

R=dave, iant, rsc
CC=golang-dev
https://golang.org/cl/5494061

13 years agogc: avoid unsafe in defn of package runtime
Russ Cox [Mon, 19 Dec 2011 20:52:15 +0000 (15:52 -0500)]
gc: avoid unsafe in defn of package runtime

Keeps -u tracking simple.

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

13 years agoruntime: separate out auto-generated files, take 2
Russ Cox [Mon, 19 Dec 2011 20:51:13 +0000 (15:51 -0500)]
runtime: separate out auto-generated files, take 2

This is like the ill-fated CL 5493063 except that
I have written a shell script (autogen.sh) instead of
thinking I could possibly write a correct Makefile.

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

13 years agoencoding/json: cleanup leftover variables in array decoding.
Rémy Oudompheng [Mon, 19 Dec 2011 20:32:06 +0000 (15:32 -0500)]
encoding/json: cleanup leftover variables in array decoding.

An old update for API changes in reflect package left several
helper variables that do not have a meaning anymore, and
the type checking of arrays vs slices was broken.
Fixes #2513.

R=ultrotter, rsc
CC=golang-dev, remy
https://golang.org/cl/5488094

13 years agostrconv: reduce buffer size for multi-precision decimals.
Rémy Oudompheng [Mon, 19 Dec 2011 20:03:53 +0000 (15:03 -0500)]
strconv: reduce buffer size for multi-precision decimals.

The longest numbers we have to represent are the smallest denormals.
Their decimal mantissa is not longer than 5^1100. Taking into
account some extra size for in-place operations, 800 digits are
enough. This saves time used for zero intiialization of extra
bytes.

                                        old ns/op  new ns/op    delta
strconv_test.BenchmarkAtof64Decimal           521        334   -35.9%
strconv_test.BenchmarkAtof64Float             572        391   -31.6%
strconv_test.BenchmarkAtof64FloatExp        10242      10036    -2.0%
strconv_test.BenchmarkAtof64Big              4229       4029    -4.7%
strconv_test.BenchmarkFormatFloatDecimal     1396        934   -33.1%
strconv_test.BenchmarkFormatFloat            4295       3341   -22.2%
strconv_test.BenchmarkFormatFloatExp        12035      11181    -7.1%
strconv_test.BenchmarkFormatFloatBig         4213       3229   -23.4%
strconv_test.BenchmarkAppendFloatDecimal     1031        600   -41.8%
strconv_test.BenchmarkAppendFloat            3971       3044   -23.3%
strconv_test.BenchmarkAppendFloatExp        11699      11003    -5.9%
strconv_test.BenchmarkAppendFloatBig         3836       2915   -24.0%

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

13 years agoexec: add test to verify net package's epoll fd doesn't go to child
Brad Fitzpatrick [Mon, 19 Dec 2011 17:23:07 +0000 (09:23 -0800)]
exec: add test to verify net package's epoll fd doesn't go to child

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

13 years agosyscall: Changes to the syscall package to support NetBSD.
Christopher Nielsen [Mon, 19 Dec 2011 16:57:58 +0000 (03:57 +1100)]
syscall: Changes to the syscall package to support NetBSD.

Not all syscalls are implemented, but many are. On the suggestion
of Joel Sing <jsing@google.com>, the generated files were added
with hg add instead of hg cp, since they are generated on an OS
dependant basis.

R=golang-dev, jsing, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5491050

13 years agocrypto/tls: don't assume an RSA private key in the API.
Adam Langley [Mon, 19 Dec 2011 15:39:30 +0000 (10:39 -0500)]
crypto/tls: don't assume an RSA private key in the API.

We still very much assume it in the code, but with this change in
place we can implement other things later without changing and users
of the package.

Fixes #2319.

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

13 years agonet/http: test both texta and textb values, not texta twice
Alex Brainman [Mon, 19 Dec 2011 06:31:20 +0000 (17:31 +1100)]
net/http: test both texta and textb values, not texta twice

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

13 years agoio/ioutil: close file in TestWriteFile before deleting it
Alex Brainman [Mon, 19 Dec 2011 06:30:14 +0000 (17:30 +1100)]
io/ioutil: close file in TestWriteFile before deleting it

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

13 years agodashboard: improve formatting of build status page
Andrew Gerrand [Mon, 19 Dec 2011 05:57:25 +0000 (16:57 +1100)]
dashboard: improve formatting of build status page

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

13 years agobuilder: send commit time to dashboard
Andrew Gerrand [Mon, 19 Dec 2011 05:57:03 +0000 (16:57 +1100)]
builder: send commit time to dashboard

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

13 years agoarchive/zip: add SetModTime method to FileHeader
Andrew Gerrand [Mon, 19 Dec 2011 03:59:41 +0000 (14:59 +1100)]
archive/zip: add SetModTime method to FileHeader

Fixes #2574.

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

13 years agodashboard: hide build status column (package builder is out of action)
Andrew Gerrand [Mon, 19 Dec 2011 01:37:39 +0000 (12:37 +1100)]
dashboard: hide build status column (package builder is out of action)

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

13 years agohtml: handle text nodes in foreign content.
Nigel Tao [Mon, 19 Dec 2011 01:20:00 +0000 (12:20 +1100)]
html: handle text nodes in foreign content.

Passes tests10.dat, test 6:
<!DOCTYPE html><body><table><svg><g>foo</g></svg></table>

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <svg svg>
|       <svg g>
|         "foo"
|     <table>

Also pass tests through test 12:
<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g></svg><p>baz</caption></table>

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

13 years agoencoding/json: examples for Marshal and Unmarshal
Andrew Gerrand [Mon, 19 Dec 2011 00:16:55 +0000 (11:16 +1100)]
encoding/json: examples for Marshal and Unmarshal

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

13 years agotext/template: fix handing of nil arguments to functions
Gustavo Niemeyer [Mon, 19 Dec 2011 00:14:11 +0000 (22:14 -0200)]
text/template: fix handing of nil arguments to functions

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

13 years agovim: fix go filetype detection
Paul Sbarra [Sun, 18 Dec 2011 23:42:32 +0000 (10:42 +1100)]
vim: fix go filetype detection

The filetype needs to be set during BufRead in order for the did_filetype() check to prevent the file being detected as a conf file.  One example where this can occur is if a cgo file has a #include at the top of the file.  The # is detected in vim's generic configuration (conf file) toward the bottom of filetype.vim

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

13 years agodoc: suggest code.google.com/p/go instead of go.googlecode.com/hg
Andrew Gerrand [Sun, 18 Dec 2011 23:17:44 +0000 (10:17 +1100)]
doc: suggest code.google.com/p/go instead of go.googlecode.com/hg

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

13 years agoos: Add NetBSD support for recent signal changes.
Christopher Nielsen [Sat, 17 Dec 2011 15:29:18 +0000 (02:29 +1100)]
os: Add NetBSD support for recent signal changes.

Add NetBSD to mksignals.sh and generate files.
While we're here, also add netbsd to the +build list where appropriate.

R=golang-dev, jsing
CC=golang-dev
https://golang.org/cl/5492064

13 years agoruntime: use correct traceback file on arm
Rob Pike [Sat, 17 Dec 2011 06:52:02 +0000 (22:52 -0800)]
runtime: use correct traceback file on arm
reported by fred richter

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

13 years agogoinstall: only suggest -fix for bad imports when appropriate
Andrew Gerrand [Sat, 17 Dec 2011 02:14:59 +0000 (13:14 +1100)]
goinstall: only suggest -fix for bad imports when appropriate

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

13 years agogo/build: remove 'go/build' from error messages
Andrew Gerrand [Sat, 17 Dec 2011 02:14:18 +0000 (13:14 +1100)]
go/build: remove 'go/build' from error messages

This leads to really confusing messages in goinstall.

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

13 years agoruntime: hg revert -r 6ec0a5c12d75
Russ Cox [Fri, 16 Dec 2011 23:50:40 +0000 (18:50 -0500)]
runtime: hg revert -r 6ec0a5c12d75

That was the last build that was close to working.
I will try that change again next week.
Make is being very subtle today.

At the reverted-to CL, the ARM traceback appears
to be broken.  I'll look into that next week too.

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

13 years agogo/printer, gofmt: fine tuning of line spacing
Robert Griesemer [Fri, 16 Dec 2011 23:43:06 +0000 (15:43 -0800)]
go/printer, gofmt: fine tuning of line spacing

- no empty lines inside empty structs and interfaces
- top-level declarations are separated by a blank line if
  a) they are of different kind (e.g. const vs type); or
  b) there are documentation comments associated with a
     declaration (this is new)
- applied gofmt -w misc src

The actual changes are in go/printer/nodes.go:397-400 (empty structs/interfaces),
and go/printer/printer.go:307-309 (extra line break). The remaining
changes are cleanups w/o changing the existing functionality.

Fixes issue  2570.

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

13 years agoruntime: fix build on gri's machine
Russ Cox [Fri, 16 Dec 2011 23:31:09 +0000 (18:31 -0500)]
runtime: fix build on gri's machine

Why it was not failing anywhere else I don't know,
but the Makefile was definitely wrong.  The rules
must not run in parallel.

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

13 years agoruntime: fix build
Russ Cox [Fri, 16 Dec 2011 22:58:53 +0000 (17:58 -0500)]
runtime: fix build

I am looking forward to not supporting two build
systems simultaneously.  Make complains about
a circular dependency still, but I don't understand it
and it's probably not worth the time to figure out.

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

13 years agowebsocket: fix a trivial example server
Olivier Duperray [Fri, 16 Dec 2011 22:24:37 +0000 (14:24 -0800)]
websocket: fix a trivial example server

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

13 years agoruntime: separate out auto-generated files
Russ Cox [Fri, 16 Dec 2011 22:04:32 +0000 (17:04 -0500)]
runtime: separate out auto-generated files

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

13 years agoruntime: fix build
Russ Cox [Fri, 16 Dec 2011 20:46:25 +0000 (15:46 -0500)]
runtime: fix build

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

13 years agoruntime: make more build-friendly
Russ Cox [Fri, 16 Dec 2011 20:33:58 +0000 (15:33 -0500)]
runtime: make more build-friendly

Collapse the arch,os-specific directories into the main directory
by renaming xxx/foo.c to foo_xxx.c, and so on.

There are no substantial edits here, except to the Makefile.
The assumption is that the Go tool will #define GOOS_darwin
and GOARCH_amd64 and will make any file named something
like signals_darwin.h available as signals_GOOS.h during the
build.  This replaces what used to be done with -I$(GOOS).

There is still work to be done to make runtime build with
standard tools, but this is a big step.  After this we will have
to write a script to generate all the generated files so they
can be checked in (instead of generated during the build).

R=r, iant, r, lucio.dere
CC=golang-dev
https://golang.org/cl/5490053

13 years agoencoding/gob: arrays are zero only if their elements are zero
Rob Pike [Fri, 16 Dec 2011 19:52:58 +0000 (11:52 -0800)]
encoding/gob: arrays are zero only if their elements are zero

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

13 years agogob: isZero for struct values
Rob Pike [Fri, 16 Dec 2011 19:33:57 +0000 (11:33 -0800)]
gob: isZero for struct values
Fixes #2577.

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

13 years agovarious: use $GCFLAGS and $GCIMPORTS like Make does
Maxim Pimenov [Fri, 16 Dec 2011 16:31:39 +0000 (11:31 -0500)]
various: use $GCFLAGS and $GCIMPORTS like Make does

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

13 years agonet/http: Added interface for a cookie jar.
Volker Dobler [Fri, 16 Dec 2011 15:48:41 +0000 (10:48 -0500)]
net/http: Added interface for a cookie jar.

Types implementing CookieJar may be used in a Client
to persist cookies.

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

13 years agocodereview: Initialize "found" in codereview.py.
Miki Tebeka [Fri, 16 Dec 2011 15:39:20 +0000 (10:39 -0500)]
codereview: Initialize "found" in codereview.py.

Fixes #2569 (hg undo crashes when CL not found).

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

13 years agosyscall: sort Makefile, mkall.sh and mkerrors.sh entries
Mikio Hara [Fri, 16 Dec 2011 10:51:25 +0000 (19:51 +0900)]
syscall: sort Makefile, mkall.sh and mkerrors.sh entries

R=golang-dev, jsing
CC=golang-dev
https://golang.org/cl/5495062

13 years agonet: sort Makefile entries
Mikio Hara [Fri, 16 Dec 2011 10:50:55 +0000 (19:50 +0900)]
net: sort Makefile entries

R=golang-dev, jsing
CC=golang-dev
https://golang.org/cl/5493058

13 years agogo/build: make sure syslist.go is gofmted
Alex Brainman [Fri, 16 Dec 2011 04:52:30 +0000 (15:52 +1100)]
go/build: make sure syslist.go is gofmted

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

13 years agogo: implement test command
Russ Cox [Fri, 16 Dec 2011 04:51:04 +0000 (23:51 -0500)]
go: implement test command

Gotest tries to build things, for which it invokes make,
and it was too hard to coordinate go invoking gotest
invoking go to build the test binary, so put all the code
here instead.  Gotest will be deleted once we switch.

The only code that really made sense to copy verbatim
was the flag parsing.

This remains a work in progress.  There are still plenty
of things to clean up and make better, but this is a good
checkpoint.  It can run all the tests in the tree (except
runtime, which it can't build yet).

$ go test all -short
ok   archive/tar
ok   archive/zip
ok   bufio
?    builtin [no test files]
ok   bytes
ok   compress/bzip2
ok   compress/flate
ok   compress/gzip
ok   compress/lzw
ok   compress/zlib
ok   container/heap
ok   container/list
ok   container/ring
?    crypto [no test files]
ok   crypto/aes
ok   crypto/bcrypt
ok   crypto/blowfish
ok   crypto/cast5
ok   crypto/cipher
ok   crypto/des
ok   crypto/dsa
ok   crypto/ecdsa
ok   crypto/elliptic
ok   crypto/hmac
ok   crypto/md4
ok   crypto/md5
ok   crypto/ocsp
ok   crypto/openpgp
ok   crypto/openpgp/armor
ok   crypto/openpgp/elgamal
?    crypto/openpgp/error [no test files]
ok   crypto/openpgp/packet
ok   crypto/openpgp/s2k
ok   crypto/rand
ok   crypto/rc4
ok   crypto/ripemd160
ok   crypto/rsa
ok   crypto/sha1
ok   crypto/sha256
ok   crypto/sha512
ok   crypto/subtle
ok   crypto/tls
ok   crypto/twofish
ok   crypto/x509
?    crypto/x509/pkix [no test files]
ok   crypto/xtea
ok   debug/dwarf
ok   debug/elf
ok   debug/gosym
ok   debug/macho
ok   debug/pe
ok   encoding/ascii85
ok   encoding/asn1
ok   encoding/base32
ok   encoding/base64
ok   encoding/binary
ok   encoding/csv
ok   encoding/git85
ok   encoding/gob
ok   encoding/hex
ok   encoding/json
ok   encoding/pem
ok   encoding/xml
ok   errors
ok   exp/ebnf
?    exp/ebnflint [no test files]
ok   exp/gotype
ok   exp/norm
ok   exp/spdy
ok   exp/sql
ok   exp/sql/driver
ok   exp/ssh
ok   exp/types
ok   expvar
ok   flag
ok   fmt
ok   go/ast
ok   go/build
ok   go/doc
ok   go/parser
ok   go/printer
ok   go/scanner
ok   go/token
?    hash [no test files]
ok   hash/adler32
ok   hash/crc32
ok   hash/crc64
ok   hash/fnv
ok   html
ok   html/template
ok   image
?    image/bmp [no test files]
?    image/color [no test files]
ok   image/draw
?    image/gif [no test files]
ok   image/jpeg
ok   image/png
ok   image/tiff
ok   image/ycbcr
ok   index/suffixarray
ok   io
ok   io/ioutil
ok   log
ok   log/syslog
ok   math
ok   math/big
ok   math/cmplx
ok   math/rand
ok   mime
ok   mime/multipart
ok   net
?    net/dict [no test files]
ok   net/http
ok   net/http/cgi
ok   net/http/fcgi
?    net/http/httptest [no test files]
ok   net/http/httputil
?    net/http/pprof [no test files]
ok   net/mail
ok   net/rpc
ok   net/rpc/jsonrpc
ok   net/smtp
ok   net/textproto
ok   net/url
ok   old/netchan
ok   old/regexp
ok   old/template
ok   os
ok   os/exec
ok   os/signal
ok   os/user
ok   patch
ok   path
ok   path/filepath
ok   reflect
ok   regexp
ok   regexp/syntax
# cd /Users/rsc/g/go/src/pkg/runtime; 6g -o /var/folders/mw/qfnx8hhd1_s9mm9wtbng0hw80000gn/T/go-build874847916/runtime_test/_obj/_go_.6 -p runtime_test -I /var/folders/mw/qfnx8hhd1_s9mm9wtbng0hw80000gn/T/go-build874847916 append_test.go chan_test.go closure_test.go gc_test.go mfinal_test.go proc_test.go sema_test.go softfloat64_test.go symtab_test.go
proc_test.go:87: undefined: runtime.Entersyscall
proc_test.go:88: undefined: runtime.Exitsyscall
proc_test.go:111: undefined: runtime.Entersyscall
proc_test.go:116: undefined: runtime.Exitsyscall
softfloat64_test.go:79: undefined: Fadd64
softfloat64_test.go:80: undefined: Fsub64
softfloat64_test.go:82: undefined: Fmul64
softfloat64_test.go:83: undefined: Fdiv64
softfloat64_test.go:94: undefined: F64to32
softfloat64_test.go:99: undefined: F32to64
softfloat64_test.go:99: too many errors

exit status 1
FAIL runtime [build failed]
?    runtime/cgo [no test files]
ok   runtime/debug
ok   runtime/pprof
ok   sort
ok   strconv
ok   strings
ok   sync
ok   sync/atomic
?    syscall [no test files]
?    testing [no test files]
?    testing/iotest [no test files]
ok   testing/quick
ok   testing/script
ok   text/scanner
ok   text/tabwriter
ok   text/template
ok   text/template/parse
ok   time
ok   unicode
ok   unicode/utf16
ok   unicode/utf8
?    unsafe [no test files]
ok   websocket
$

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

13 years agodashboard: improve key panic message
Andrew Gerrand [Fri, 16 Dec 2011 03:59:50 +0000 (14:59 +1100)]
dashboard: improve key panic message

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

13 years agoio/ioutil: remove another reference to _test
Russ Cox [Fri, 16 Dec 2011 00:32:47 +0000 (19:32 -0500)]
io/ioutil: remove another reference to _test

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

13 years agomisc/dashboard: user interface
Andrew Gerrand [Thu, 15 Dec 2011 23:48:06 +0000 (10:48 +1100)]
misc/dashboard: user interface

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

13 years agocrypto/tls: quiet build
Russ Cox [Thu, 15 Dec 2011 23:37:31 +0000 (18:37 -0500)]
crypto/tls: quiet build

On a Mac, all the useful functions are deprecated.

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

13 years agold: allow for IMAGE_REL_AMD64_ADDR32NB relocation type
Alex Brainman [Thu, 15 Dec 2011 23:32:14 +0000 (10:32 +1100)]
ld: allow for IMAGE_REL_AMD64_ADDR32NB relocation type

enable cgo again on windows/amd64

R=rsc, vcc.163
CC=golang-dev
https://golang.org/cl/5488074

13 years agoos/exec: fix -test.run argument for new 'go test'
Russ Cox [Thu, 15 Dec 2011 23:21:38 +0000 (18:21 -0500)]
os/exec: fix -test.run argument for new 'go test'

In 'go test' I deleted the leading package. prefix
from all the test names, since it contained no actual
information.  Adjust the -test.run argument accordingly.
This will still work with the current gotest too, since
the argument is an unanchored pattern.

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

13 years agoio/ioutil, old/template: do not assume _test exists for scratch space
Russ Cox [Thu, 15 Dec 2011 23:21:29 +0000 (18:21 -0500)]
io/ioutil, old/template: do not assume _test exists for scratch space

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

13 years agogovet: add checking for printf verbs
Rob Pike [Thu, 15 Dec 2011 23:17:52 +0000 (15:17 -0800)]
govet: add checking for printf verbs
Also fix the errors it catches.

Fixes #1654.

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

13 years agogodoc: Allow examples for methods.
Volker Dobler [Thu, 15 Dec 2011 23:01:54 +0000 (10:01 +1100)]
godoc: Allow examples for methods.

An example for a method M() of type T can be written as
func ExampleT_M() { ... }.
To differentiate between multiple examples for one function, type or
method a suffix with a lowercase start may be appended to the name
of the example function, e.g. ExampleFoo_basicUsage.

Fixes #2465.

R=golang-dev, adg, r, rsc, duperray.olivier, r
CC=golang-dev
https://golang.org/cl/5440100

13 years agotesting: trim spaces before comparing example output
Andrew Gerrand [Thu, 15 Dec 2011 22:43:58 +0000 (09:43 +1100)]
testing: trim spaces before comparing example output
bytes: add two Buffer examples

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

13 years agohtml: handle end tags in foreign objects.
Nigel Tao [Thu, 15 Dec 2011 22:36:50 +0000 (09:36 +1100)]
html: handle end tags in foreign objects.

I'm not 100% sure I get all the corner cases right, for end tags, but
I'll let the test suite smoke it out.

Pass tests10.dat, test 1:
<!DOCTYPE html><svg></svg><![CDATA[a]]>

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <svg svg>
|     <!-- [CDATA[a]] -->

Also pass tests through test 5:
<!DOCTYPE html><body><table><svg></svg></table>

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

13 years agogo/printer, gofmt: don't write too many newlines
Robert Griesemer [Thu, 15 Dec 2011 21:51:47 +0000 (13:51 -0800)]
go/printer, gofmt: don't write too many newlines

In some rare cases, gofmt would accept more than the maximum
number of empty lines (1) between source code snippets.

The actual change is in printer.go, lines 773-775; the rest
is some minor restructuring.

Applied gofmt -w src misc .

Fixes #2387.

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

13 years agoexp/ssh: simplify Stdin/out/errPipe methods
Dave Cheney [Thu, 15 Dec 2011 21:50:41 +0000 (16:50 -0500)]
exp/ssh: simplify Stdin/out/errPipe methods

If a Pipe method is called, return the underlying
reader/writer from session.clientChan, bypassing the
io.Copy and io.Pipe harness.

StdoutPipe and StderrPipe now return an io.Reader not
an io.ReadCloser as SSH cannot signal the close of the
local reader to the remote process.

R=rsc, agl, gustav.paul, cw
CC=golang-dev
https://golang.org/cl/5493047

13 years agogovet: divide the program into one file per vetting suite
Rob Pike [Thu, 15 Dec 2011 21:44:35 +0000 (13:44 -0800)]
govet: divide the program into one file per vetting suite
Just a rearrangement except for a couple of new functions
and names so govet.go can have all the generic walk routines.

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

13 years agofmt: speed up floating point print, clean up some code
Rob Pike [Thu, 15 Dec 2011 20:52:29 +0000 (12:52 -0800)]
fmt: speed up floating point print, clean up some code
%g down to two mallocs from four. Also a mild speedup.

fmt_test.BenchmarkSprintfFloat         3016         2703  -10.38%

Fixes #2557.

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

13 years agojson: use strconv.Append variants to avoid allocations in encoding
Brad Fitzpatrick [Thu, 15 Dec 2011 19:21:21 +0000 (11:21 -0800)]
json: use strconv.Append variants to avoid allocations in encoding

Before/after, best of 3:
json.BenchmarkCodeEncoder  10  183495300 ns/op  10.58 MB/s
->
json.BenchmarkCodeEncoder  10  133025100 ns/op  14.59 MB/s

But don't get too excited about this.  These benchmarks, while
stable at any point of time, fluctuate wildly with any line of
code added or removed anywhere in the path due to stack splitting
issues.

It's currently much faster, though, and this is the API that
doesn't allocate so should always be faster in theory.

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

13 years agogo: help messages for 'go test'
Russ Cox [Thu, 15 Dec 2011 18:54:19 +0000 (13:54 -0500)]
go: help messages for 'go test'

The plan is to make 'go test' replace gotest entirely, so it
cannot refer to gotest's godoc.  Instead, copy gotest's
documentation in as three different help messages:
'go help test', 'go help testflag', and 'go help testfunc'.

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

13 years agogo spec: be precise about newlines
Robert Griesemer [Thu, 15 Dec 2011 18:51:51 +0000 (10:51 -0800)]
go spec: be precise about newlines

Several places mentioned tokens spanning "multiple lines"
which is not a well-defined term in the spec; newline is.

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

13 years agogo/scanner: strip CRs from raw literals
Robert Griesemer [Thu, 15 Dec 2011 18:51:32 +0000 (10:51 -0800)]
go/scanner: strip CRs from raw literals

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

13 years agomore tags for go/build
Russ Cox [Thu, 15 Dec 2011 18:35:59 +0000 (13:35 -0500)]
more tags for go/build

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

13 years agosql: add Rows.Columns
Brad Fitzpatrick [Thu, 15 Dec 2011 18:14:57 +0000 (10:14 -0800)]
sql: add Rows.Columns

Also, fix package name in error messages.

Fixes #2453

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

13 years agojson: some tests to demonstrate bad error messages
Brad Fitzpatrick [Thu, 15 Dec 2011 18:02:47 +0000 (10:02 -0800)]
json: some tests to demonstrate bad error messages

Not a fix yet (help wanted), but part of Issue 2331

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

13 years agoos: make compatible with go/build
Russ Cox [Thu, 15 Dec 2011 17:33:36 +0000 (12:33 -0500)]
os: make compatible with go/build

It is probably a mistake to have these here at all -
os is supposed to be portable - but this only fixes
the build issue.

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

13 years agotest/bench/go1: first draft of Go 1 benchmark suite
Russ Cox [Thu, 15 Dec 2011 17:32:59 +0000 (12:32 -0500)]
test/bench/go1: first draft of Go 1 benchmark suite

I have included a few important microbenchmarks,
but the overall intent is to have mostly end-to-end
benchmarks timing real world operations.

The jsondata.go file is a summary of agl's
activity in various open source repositories.
It gets used as test data for many of the benchmarks.

Everything links into one binary (even the test data)
so that it is easy to run the benchmarks on many
computers: there is just one file to copy around.

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

13 years agoos: OS-dependent bits to support NetBSD.
Christopher Nielsen [Thu, 15 Dec 2011 17:19:19 +0000 (12:19 -0500)]
os: OS-dependent bits to support NetBSD.

R=golang-dev, jsing
CC=golang-dev
https://golang.org/cl/5482068

13 years agogc: inlining, allow empty bodies, fix _ arguments.
Luuk van Dijk [Thu, 15 Dec 2011 16:50:59 +0000 (17:50 +0100)]
gc: inlining, allow empty bodies, fix _ arguments.

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

13 years agogc: omit argument names from function types in error messages
Luuk van Dijk [Thu, 15 Dec 2011 16:38:47 +0000 (17:38 +0100)]
gc: omit argument names from function types in error messages

Fixes #2563

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

13 years agogc: better loopdepth analysis for labels
Luuk van Dijk [Thu, 15 Dec 2011 16:35:59 +0000 (17:35 +0100)]
gc: better loopdepth analysis for labels

This avoids degraded performance caused by extra labels
emitted by inlining (breaking strconv ftoa alloc count unittest) and is better in any case.

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

13 years agotime: new AddDate method
Roger Peppe [Thu, 15 Dec 2011 16:23:01 +0000 (11:23 -0500)]
time: new AddDate method

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

13 years agoexp/ssh: rename ClientAuthPublicKey helper ClientAuthKeyring
Dave Cheney [Thu, 15 Dec 2011 16:06:10 +0000 (11:06 -0500)]
exp/ssh: rename ClientAuthPublicKey helper ClientAuthKeyring

Also, rename ServerConfig.PubKeyCallback to PublicKeyCallback.

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

13 years agogc: implement and test \r in raw strings
Russ Cox [Thu, 15 Dec 2011 15:47:09 +0000 (10:47 -0500)]
gc: implement and test \r in raw strings

For issue 680.

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

13 years agodoc: remove an errant dot.
Andrew Gerrand [Thu, 15 Dec 2011 06:17:39 +0000 (17:17 +1100)]
doc: remove an errant dot.

Curses!

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

13 years agotag weekly.2011-12-14
Andrew Gerrand [Thu, 15 Dec 2011 05:57:28 +0000 (16:57 +1100)]
tag weekly.2011-12-14

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

13 years agoweekly.2011-12-14 weekly.2011-12-14
Andrew Gerrand [Thu, 15 Dec 2011 05:56:12 +0000 (16:56 +1100)]
weekly.2011-12-14

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

13 years agospec: skip carriage returns in raw literals
Rob Pike [Thu, 15 Dec 2011 05:52:41 +0000 (21:52 -0800)]
spec: skip carriage returns in raw literals

This change guarantees that whether the line ending convention
when the source is created includes carriage returns is irrelevant
to the value of the string. See issue 680.

The compilers do not yet implement this.

R=golang-dev, adg, r, gri, rsc, iant
CC=golang-dev
https://golang.org/cl/5491043

13 years agogo: implement build, install, run
Russ Cox [Thu, 15 Dec 2011 03:42:42 +0000 (22:42 -0500)]
go: implement build, install, run

clean is gone; all the intermediate files are created
in a temporary tree that is wiped when the command ends.

Not using go/build's Script because it is not well aligned
with this API.  The various builder methods are copied from
go/build and adapted.  Probably once we delete goinstall
we can delete the Script API too.

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

13 years agofmt: don't recur if String method (etc.) misbehaves
Rob Pike [Thu, 15 Dec 2011 00:37:54 +0000 (16:37 -0800)]
fmt: don't recur if String method (etc.) misbehaves

Fixes #2555.

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

13 years agohtml: don't leave "in column group" mode when ignoring a token
Andrew Balholm [Wed, 14 Dec 2011 23:45:19 +0000 (10:45 +1100)]
html: don't leave "in column group" mode when ignoring a token

Pass tests6.dat, test 26:
foo<col>

| <col>

Also pass tests through test 35:
<table><tr><div><td>

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

13 years agocgo: add basic gccgo support.
Rémy Oudompheng [Wed, 14 Dec 2011 23:40:35 +0000 (15:40 -0800)]
cgo: add basic gccgo support.

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

13 years ago5c, 6c, 8c: support 64-bit switch value
Anthony Martin [Wed, 14 Dec 2011 22:30:40 +0000 (17:30 -0500)]
5c, 6c, 8c: support 64-bit switch value

For real this time. :-)

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

13 years agogzip: Convert between Latin-1 and Unicode
Vadim Vygonets [Wed, 14 Dec 2011 22:17:40 +0000 (17:17 -0500)]
gzip: Convert between Latin-1 and Unicode

I realize I didn't send the tests in last time.  Anyway, I added
a test that knows too much about the package's internal structure,
and I'm not sure whether it's the right thing to do.

Vadik.

R=bradfitz, rsc, go.peter.90
CC=golang-dev
https://golang.org/cl/5450073

13 years agonet/smtp: add CRAM-MD5 authentication
Vadim Vygonets [Wed, 14 Dec 2011 22:17:25 +0000 (17:17 -0500)]
net/smtp: add CRAM-MD5 authentication

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

13 years agoA+C: Vadim Vygonets (individual CLA)
Russ Cox [Wed, 14 Dec 2011 22:17:09 +0000 (17:17 -0500)]
A+C: Vadim Vygonets (individual CLA)

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

13 years agomisc/osx: Rename profile.go to profile_go to avoid confusing scripts
Scott Lawrence [Wed, 14 Dec 2011 21:26:48 +0000 (16:26 -0500)]
misc/osx: Rename profile.go to profile_go to avoid confusing scripts

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

13 years agohtml/template: define the FuncMap type locally
Rob Pike [Wed, 14 Dec 2011 19:22:17 +0000 (11:22 -0800)]
html/template: define the FuncMap type locally
This redefinition means that the public signature of html/template
does not refer to text/template.

Fixes #2546.

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

13 years agogotest: use build.DefaultContext.GOARCH
Robert Hencke [Wed, 14 Dec 2011 19:21:30 +0000 (11:21 -0800)]
gotest: use build.DefaultContext.GOARCH

Fixes https://golang.org/cl/5480060/#msg4

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

13 years agohttp: fix failing Transport HEAD request with gzip-looking response
Brad Fitzpatrick [Wed, 14 Dec 2011 19:20:21 +0000 (11:20 -0800)]
http: fix failing Transport HEAD request with gzip-looking response

We only want to attempt to un-gzip if there's a body (not in
response to a HEAD)

This was accidentally passing before, but revealed to be broken
when c3c6e72d7cc went in.

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

13 years agostrconv: slightly faster int conversion for GOARCH=386
Robert Griesemer [Wed, 14 Dec 2011 19:14:10 +0000 (11:14 -0800)]
strconv: slightly faster int conversion for GOARCH=386

benchmark                           old ns/op    new ns/op    delta
strconv_test.BenchmarkFormatInt         12198        12031   -1.37%
strconv_test.BenchmarkAppendInt          9268         9153   -1.24%
strconv_test.BenchmarkFormatUint         3538         3429   -3.08%
strconv_test.BenchmarkAppendUint         3133         3062   -2.27%

No performance difference for GOARCH=amd64.

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