1
0
mirror of https://github.com/golang/go synced 2024-09-30 17:38:33 -06:00
Commit Graph

15216 Commits

Author SHA1 Message Date
Alex Brainman
17377ab651 os: do not use hosts file for windows tests
Not everyone has the file (http://golang.org/issue/4723#c4).

Update #4723.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7311091
2013-02-13 13:19:06 +11:00
Alan Donovan
be5deb93fb exp/ssa: omit Function's package name when printing intra-package references.
R=iant
CC=golang-dev
https://golang.org/cl/7307105
2013-02-12 16:13:14 -05:00
Shenghou Ma
83da2014a8 encoding/xml: fix htmlAutoClose and its generating script
Thanks Mitică for reporting this.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7308081
2013-02-13 02:27:42 +08:00
Alan Donovan
052c942e20 test: ensure all failing tests exit nonzero.
Previously merely printing an error would cause the golden
file comparison (in 'bash run') to fail, but that is no longer
the case with the new run.go driver.

R=iant
CC=golang-dev
https://golang.org/cl/7310087
2013-02-12 13:17:49 -05:00
Shenghou Ma
2fdd60b9b6 go/build, runtime/cgo: cgo support for NetBSD/ARM
R=golang-dev, rsc, dave
CC=golang-dev
https://golang.org/cl/7229082
2013-02-13 01:06:52 +08:00
Shenghou Ma
4d8b1feb79 sync/atomic: support NetBSD/ARM (ARM11 or above)
R=golang-dev, rsc, dave
CC=golang-dev
https://golang.org/cl/7287044
2013-02-13 01:04:13 +08:00
Shenghou Ma
8311697792 syscall: NetBSD/ARM support
R=golang-dev, rsc, dave
CC=golang-dev
https://golang.org/cl/7288050
2013-02-13 01:03:25 +08:00
Shenghou Ma
37aba1aa77 runtime: NetBSD/ARM support
R=rsc, dave
CC=golang-dev
https://golang.org/cl/7289044
2013-02-13 01:00:04 +08:00
Marcel van Lohuizen
f38da96755 exp/locale/collate: moved low-level collation functionality
into separate package.  This allows this code to be shared
with the search package without the need for these two to use
the same tables.
Adjusted various files accordingly.

R=rsc
CC=golang-dev
https://golang.org/cl/7213044
2013-02-12 15:59:55 +01:00
Robert Griesemer
ae8da3a28c go/types: len(((*T)(nil)).X) is const if X is an array
Fixes #4744.

R=adonovan
CC=golang-dev
https://golang.org/cl/7305080
2013-02-11 22:39:55 -08:00
Alan Donovan
d8e3b16f8b exp/ssa: special-case 'range' loops based on type of range expression.
The lowering of ast.RangeStmt now has three distinct cases:

1) rangeIter for maps and strings; approximately:
    it = range x
    for {
      k, v, ok = next it
      if !ok { break }
      ...
    }
   The Range instruction and the interpreter's "iter"
   datatype are now restricted to these types.

2) rangeChan for channels; approximately:
    for {
      k, ok = <-x
      if !ok { break }
      ...
    }

3) rangeIndexed for slices, arrays, and *array; approximately:
    for k, l = 0, len(x); k < l; k++ {
      v = x[k]
      ...
    }

In all cases we now evaluate the side effects of the range expression
exactly once, per comments on http://code.google.com/p/go/issues/detail?id=4644.

However the exact spec wording is still being discussed in
https://golang.org/cl/7307083/.  Further (small)
changes may be required once the dust settles.

R=iant
CC=golang-dev
https://golang.org/cl/7303074
2013-02-11 22:12:56 -05:00
Alan Donovan
1c1096ea31 test: a number of fixes.
Details:
- reorder.go: delete p8.
  (Once expectation is changed per b/4627 it is identical to p1.)
- switch.go: added some more (degenerate) switches.
- range.go: improved error messages in a few cases.
- method.go: added tests of calls to promoted methods.

R=iant
CC=golang-dev
https://golang.org/cl/7306087
2013-02-11 18:20:52 -05:00
Rob Pike
d282532901 vet: improve flag handling
Simplify the internal logic for flags controlling what to vet,
by introducing a map of flags that gathers them all together.
This change should simplify the process of adding further flags.

Add a test for untagged struct literals.
Delete a redundant test that was also in the wrong file.
Clean up some ERROR patterns that weren't working.

"make test" passes again.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7305075
2013-02-11 13:33:11 -08:00
Robin Eklind
6c119a9e70 api: Update readme.
R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/7303065
2013-02-11 09:10:35 -08:00
Russ Cox
02e05817ad sync: add caution about where to call (*WaitGroup).Add
Fixes #4762.

R=daniel.morsing, adg
CC=golang-dev
https://golang.org/cl/7308045
2013-02-11 08:05:46 -05:00
Russ Cox
71c941b6f6 spec: only require parens around ambiguous conversions
This is documenting the status quo. The previous cleanup
added this language as an implementation restriction, but
at least for now it is really part of the language proper.

Fixes #4605.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7305071
2013-02-11 07:48:14 -05:00
Russ Cox
7576179aa3 spec: document fp rounding during explicit constant conversion
The gc compilers already behave this way. It was an explicit
decision during the very long constant design discussions,
but it appears not to have made it into the spec.

Fixes #4398.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7313069
2013-02-11 07:47:41 -05:00
Russ Cox
0a22018d46 spec: reject top-level init names
Fixes #4586.

R=golang-dev, remyoudompheng, r
CC=golang-dev
https://golang.org/cl/7307082
2013-02-11 07:46:39 -05:00
Andrew Gerrand
a801c8813d misc/dashboard: add missing return value
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7300084
2013-02-11 18:01:18 +11:00
Andrew Gerrand
66c96f1abc container/list: add package example
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7306078
2013-02-11 17:59:52 +11:00
Nigel Tao
37d92d251b exp/html, exp/html/atom: delete, as they're moving to the go.net
sub-repo.

The matching change is at https://golang.org/cl/7310063

The rationale was discussed at
https://groups.google.com/d/topic/golang-nuts/Qq5hTQyPuLg/discussion

R=adg, dave
CC=golang-dev
https://golang.org/cl/7317043
2013-02-11 11:56:49 +11:00
Volker Dobler
de69401b75 exp/cookiejar: implementation of SetCookies
This CL provides the rest of the SetCookies code as well as
some test infrastructure which will be used to test also
the Cookies method. This test infrastructure is optimized
for readability and tries to make it easy to review table
driven test cases.

Tests for all the different corner cases of SetCookies
will be provided in a separate CL.

R=nigeltao, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/7306054
2013-02-11 11:47:31 +11:00
Dave Cheney
eda9590aae doc: update contribute.html
Fixes #4582.

* mentioned hg upload.
* added section on hg file.
* added small mention about being inside $GOROOT.
* added hg revert @NNNN
* reorganise the hg submit section for the common case of a non committer.
* made the Copyright section h2
* added note about leaving copyright years unchanged.

R=golang-dev, metanata4, shivakumar.gn, minux.ma, adg, shanemhansen
CC=golang-dev, metanata4
https://golang.org/cl/7278047
2013-02-10 19:40:33 -05:00
Shane Hansen
1068279904 archive/tar: read/write extended pax/gnu tar archives
Support reading pax archives and applying extended attributes
like long names, subsecond mtime resolutions, etc. Default to
writing pax archives for long file and link names.
Support reading gnu archives using the ././@LongLink extended
header for file name and link target.

Fixes #3300

R=dsymonds, dave, rogpeppe, remyoudompheng, chressie, rsc
CC=golang-dev
https://golang.org/cl/6700047
2013-02-11 11:36:29 +11:00
Lucio De Re
fece09e58a cmd/8l/asm.c: Unused function arguments, suppress warnings.
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/7304069
2013-02-11 10:15:56 +11:00
Dave Cheney
d8630694db doc: move os specific build instructions to wiki
Fixes #4010.

This proposal avoids cluttering the main install-source.html with OS specific instructions by linking to the wiki for details. See discussion in the comments.

R=adg, minux.ma
CC=golang-dev
https://golang.org/cl/7241068
2013-02-10 17:39:13 -05:00
Greg Ward
74e1577645 doc: link to wiki Projects page instead of old Project Dashboard.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7308079
2013-02-11 09:18:31 +11:00
Andrew Gerrand
abb413e350 A+C: Greg Ward (individual CLA)
Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/7303069
2013-02-11 09:17:00 +11:00
Russ Cox
81eb930f7e spec: clarify that any unsafe.Pointer type is okay in conversion
The spec is not clear about whether this is allowed or not,
but both compilers allow it, because the reflect implementation
takes advantage of it. Document current behavior.

Fixes #4679.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7303064
2013-02-09 17:36:31 -05:00
Dave Cheney
6ce3e99af0 net/http: more request benchmarks
Add benchmarks for common http benchmarking tools. The intent is to catch optimisations which favor synthetic benchmarks that do not show improvements for real clients like Chrome.

BenchmarkReadRequestChrome        200000             10133 ns/op          60.29 MB/s        3148 B/op         32 allocs/op
BenchmarkReadRequestCurl          500000              4314 ns/op          18.08 MB/s         905 B/op         15 allocs/op
BenchmarkReadRequestApachebench   500000              4363 ns/op          18.79 MB/s         956 B/op         16 allocs/op
BenchmarkReadRequestSiege         500000              6408 ns/op          24.19 MB/s        1397 B/op         22 allocs/op
BenchmarkReadRequestWrk          1000000              2838 ns/op          14.09 MB/s         757 B/op         11 allocs/op

R=golang-dev, bradfitz
CC=golang-dev, haimuiba
https://golang.org/cl/7300075
2013-02-10 08:18:09 +11:00
Russ Cox
1b3083e68d spec: clarify that f(g()) requires that g return >= 1 value
Fixes #4573.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7322043
2013-02-09 14:46:55 -05:00
Adam Langley
e0791a3adf crypto/x509: disable SCG test with system validation.
On Windows, CryptoAPI is finding an alternative validation path. Since
this is a little non-deterministic, this change disables that test
when using system validation.

R=golang-dev
CC=golang-dev
https://golang.org/cl/7313068
2013-02-09 13:51:39 -05:00
Russ Cox
6600092527 testing: be explicit about use of b.N
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7314071
2013-02-09 13:43:15 -05:00
Adam Langley
e1c309e792 crypto/x509: allow MS/NS SCG key usage as ServerAuth.
By default, crypto/x509 assumes that users wish to validate
certificates for ServerAuth. However, due to historical reasons,
COMODO's intermediates don't specify ServerAuth as an allowed key
usage.

Rather NSS and CryptoAPI both allow these SGC OIDs to be equivalent to
ServerAuth.

R=rsc
CC=golang-dev
https://golang.org/cl/7312070
2013-02-09 13:20:25 -05:00
Shenghou Ma
691e5e3b01 bytes: annotate assembly functions with //go:noescape
R=golang-dev, agl, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/7299064
2013-02-10 00:08:30 +08:00
Shenghou Ma
705b4544d6 log/syslog: remove socket files after tests
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7305065
2013-02-09 08:19:09 +08:00
Mikio Hara
a0430dae04 net: fix unixgram
The socket for AF_UNIX domain with SOCK_DGARM type isn't
allowed to work with syscall listen.

R=rsc
CC=golang-dev
https://golang.org/cl/7310068
2013-02-09 08:18:32 +09:00
Robert Daniel Kortschak
482f3e8481 cmd/go: indicate that flags unrecognized by 'go test' must follow package specification
R=rsc, minux.ma
CC=golang-dev
https://golang.org/cl/7300063
2013-02-08 16:00:59 -05:00
Jan Ziak
1e01fba2fc runtime: precise garbage collection of hashmaps
R=golang-dev, rsc
CC=dave, dvyukov, golang-dev, minux.ma, remyoudompheng
https://golang.org/cl/7252047
2013-02-08 16:00:33 -05:00
Dave Cheney
cccc96b8e9 net/http: add BenchmarkReadRequest
Add benchmark for request parsing. Fixture data is taken from https://github.com/felixge/node-http-perf

% go version
go version devel +28966b7b2f0c Thu Feb 07 20:26:12 2013 -0800 linux/amd64

% go test -run=nil -bench=ReadRequest -benchtime=10s
PASS
BenchmarkReadRequest     2000000   9900 ns/op   61.71 MB/s   3148 B/op   32 allocs/op
ok      net/http        12.180s

R=golang-dev, bradfitz, minux.ma, haimuiba
CC=golang-dev
https://golang.org/cl/7313048
2013-02-09 07:04:07 +11:00
Péter Surányi
d2252d9b07 syscall: check for invalid characters in Setenv on Unix
On POSIX, '=' in key is explicitly invalid, and '\x00' in key/value is implicitly invalid.

R=golang-dev, iant, bradfitz
CC=golang-dev
https://golang.org/cl/7311061
2013-02-08 10:45:46 -08:00
Kamil Kisiel
f26fc0c017 net/http/httptest: add examples
R=golang-dev, adg, bradfitz
CC=golang-dev
https://golang.org/cl/7314046
2013-02-08 09:20:05 -08:00
Alan Donovan
5fa6721a31 exp/ssa/interp: fix MS Windows breakage.
syscall.{Kill,Write} are not portable to MS Windows, so we
disable them for now.

R=iant, rsc
CC=golang-dev
https://golang.org/cl/7312066
2013-02-08 11:58:24 -05:00
Alan Donovan
c8f2449ea7 exp/ssa: (#5 of 5): the SSA interpreter and 'ssadump' tool.
R=gri, iant
CC=golang-dev
https://golang.org/cl/7226065
2013-02-08 10:43:53 -05:00
Dmitriy Vyukov
0a9f1ab8bb runtime/race: deflake tests
With the new scheduler races in the tests are reported during execution of other tests.
The change joins goroutines started during the tests.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7310066
2013-02-08 19:24:50 +04:00
Dmitriy Vyukov
45636db01b runtime: fix integer overflow
The problem happens when end=0, then end-1 is very big number.
Observed with the new scheduler.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7307073
2013-02-08 19:05:19 +04:00
Mikio Hara
6dfd386005 net: simplify Dial, Listen, ListenPacket and those helpers
R=golang-dev, dave, bradfitz
CC=golang-dev
https://golang.org/cl/7300065
2013-02-08 21:53:10 +09:00
Mikio Hara
dc6e51cfd2 net: delete duplicate listenerSockaddr
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7299067
2013-02-08 17:02:08 +09:00
Rémy Oudompheng
f42fa807a6 cmd/5g: add missing splitclean.
See issue 887 for the 8g analogue.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7306069
2013-02-08 08:19:47 +01:00
Shenghou Ma
6c54bf9916 runtime: fix build for Linux/ARM
R=dave, rsc
CC=golang-dev
https://golang.org/cl/7299055
2013-02-08 13:24:38 +08:00