aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-03-07release.2011-03-07weekly.2011-03-07Andrew Gerrand
R=r, rsc, dfc CC=golang-dev https://golang.org/cl/4240081
2011-03-06io/ioutil: use filepath.Join, handle trailing / in $TMPDIRRuss Cox
R=niemeyer CC=golang-dev https://golang.org/cl/4256057
2011-03-07path/filepath: disable test on windows to fix buildAlex Brainman
R=golang-dev, rsc1 CC=golang-dev https://golang.org/cl/4235054
2011-03-06mime/multipart: switch from map to MIMEHeaderBrad Fitzpatrick
R=rsc CC=golang-dev https://golang.org/cl/4253058
2011-03-06cgo: fix dwarf type parsingGustavo Niemeyer
The recursive algorithm used to parse types in cgo has a bug related to building the C type representation. As an example, when the recursion starts at a type *T, the C type representation won't be known until type T itself is parsed. But then, it is possible that type T references the type **T internally. The latter representation is built based on the one of *T, which started the recursion, so it won't attempt to parse it again, and will instead use the current representation value for *T, which is still empty at this point. This problem was fixed by introducing a simple TypeRepr type which builds the string representation lazily, analogous to how the Go type information is built within the same algorithm. This way, even if a type representation is still unknown at some level in the recursion, representations dependant on it can still be created correctly. R=rsc CC=golang-dev https://golang.org/cl/4244052
2011-03-06path/filepath: new OS-specific path supportGustavo Niemeyer
The path package now contains only functions which deal with slashed paths, sensible for any OS when dealing with network paths or URLs. OS-specific functionality has been moved into the new path/filepath package. This also includes fixes for godoc, goinstall and other packages which were mixing slashed and OS-specific paths. R=rsc, gri, mattn, brainman CC=golang-dev https://golang.org/cl/4252044
2011-03-06websocket: use httptest.Server for testsRobert Hencke
R=rsc CC=golang-dev https://golang.org/cl/4266044
2011-03-06build: remove old cgo filesRuss Cox
Cgo changed to write these files into _obj, but some trees may still have the old ones in the source directory. They need to be removed during make clean so that a subsequent build will use the ones in _obj. R=r, r2 CC=golang-dev https://golang.org/cl/4254056
2011-03-06http: add cookie supportPetar Maymounkov
R=rsc1, mattn, bradfitzwork, pascal, bradfitzgo CC=golang-dev https://golang.org/cl/4214042
2011-03-06syscall: work around FreeBSD execve kernel bugDevon H. O'Dell
FreeBSD's execve implementation has an integer underflow in a bounds test which causes it to erroneously think the argument list is too long when argv[0] is longer than interpreter + path. R=rsc, bradfitz, rsc1 CC=golang-dev https://golang.org/cl/4259056
2011-03-06gob: clean up getTypeInfo (address a TODO)Rob Pike
also fix a caching bug. R=rsc CC=golang-dev https://golang.org/cl/4261049
2011-03-06http/cgi: skip test if perl or CGI.pm not availableRuss Cox
R=bradfitzgo, bradfitzwork CC=golang-dev https://golang.org/cl/4264047
2011-03-05fmt: trivial cleanupRobert Hencke
R=golang-dev, bradfitzgo CC=golang-dev https://golang.org/cl/4235052
2011-03-05A+C: Robert Hencke (individual CLA)Brad Fitzpatrick
R=dsymonds CC=golang-dev https://golang.org/cl/4256053
2011-03-05gob: don't send type information about unexported fields.Rob Pike
A change a while back stop sending data for unexported fields but due to an oversight the type info was being sent also. It's inconsequential but wrong to do that. R=rsc, rh CC=golang-dev https://golang.org/cl/4252058
2011-03-05httptest: fix docs out-of-sync from earlier renamingBrad Fitzpatrick
R=rh CC=golang-dev https://golang.org/cl/4239060
2011-03-05httptest: introduce TempServer, clean up testsBrad Fitzpatrick
This also breaks fs_test into two parts as the range tests test http's private httpRange and I had to change the fs_test package from "http" to "http_test" to use httptest which otherwise has a cyclic depedency back on http. Aside: we should start exposing the Range stuff in the future. R=rsc CC=golang-dev https://golang.org/cl/4261047
2011-03-05build: avoid calling gomake wrapper in recursive makeDave Cheney
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4243058
2011-03-05http: fixed race condition in persist.goPetar Maymounkov
R=rsc, bradfitzgo, bradfitzwork CC=golang-dev https://golang.org/cl/4266042
2011-03-05http: fix, use WriteProxyRuss Cox
Fixes #53. R=bradfitzgo, bradfitzwork CC=golang-dev https://golang.org/cl/4240075
2011-03-05compress/flate: fix testRuss Cox
The test was checking for a buffer to be empty but actually racing with the background goroutine that was emptying it. Left a comment so that the check is not reintroduced later. Fixes #1557. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4248063
2011-03-05cgo: use correct frame size for 0 argumentsRuss Cox
Passing a frame size of 1 was causing the cgo callback to push 1 byte of arguments onto the stack, making the stack pointer misaligned, which had the effect of hiding all the pointers on the stack from the garbage collector. SWIG only wraps calls to C++ virtual methods, so it always has at least 1 argument, so SWIG does not need to be fixed too. Fixes #1328. R=iant CC=golang-dev https://golang.org/cl/4261046
2011-03-05A+C: Pascal S. de Kloe (individual CLA)Russ Cox
R=r CC=golang-dev https://golang.org/cl/4266041
2011-03-04gc, gopack: add some missing flags to the docs.David Symonds
R=rsc, r CC=golang-dev https://golang.org/cl/4260051
2011-03-04time: split os-dependent part into sys.go.David Symonds
R=rsc CC=golang-dev https://golang.org/cl/4259051
2011-03-04gob: enable the GobEncoder and GobDecoder interfaces.Rob Pike
These allow data items to control their own representation. For now, the implementation requires that the value passed to Encode and Decode must be exactly the type of the methods' receiver; it cannot be, for instance, T if the receiver is of type *T. This will be fixed in a later CL. R=rsc CC=golang-dev https://golang.org/cl/4235051
2011-03-04http/cgi: skip tests on WindowsBrad Fitzpatrick
The tests require Perl, not commonly installed on Windows. R=rsc, brainman CC=golang-dev https://golang.org/cl/4239057
2011-03-04runtime: make printf work on misaligned stackRuss Cox
(Shouldn't happen, but if it does, it's useful to be able to use printf to debug it.) R=r CC=golang-dev https://golang.org/cl/4250057
2011-03-04gob: beginning of support for GobEncoder/GobDecoder interfaces.Rob Pike
This allows a data item that can marshal itself to be transmitted by its own encoding, enabling some types to be handled that cannot be normally, plus providing a way to use gobs on data with unexported fields. In this CL, the necessary methods are protected by leading _, so only package gob can use the facilities (in its tests, of course); this code is not ready for real use yet. I could be talked into enabling it for experimentation, though. The main drawback is that the methods must be implemented by the actual type passed through, not by an indirection from it. For instance, if *T implements GobEncoder, you must send a *T, not a T. This will be addressed in due course. Also there is improved commentary and a couple of unrelated minor bug fixes. R=rsc CC=golang-dev https://golang.org/cl/4243056
2011-03-04http: rename ClientTransport to TransportBrad Fitzpatrick
http.Transport looks nicer, and ServerTransport doesn't make much sense anyway. R=rsc CC=golang-dev https://golang.org/cl/4239056
2011-03-04http: add packages http/cgi and http/httptestBrad Fitzpatrick
R=rsc, adg, jnw, bradfitzwork CC=golang-dev https://golang.org/cl/4247048
2011-03-04doc: there's no such thing as a .cgo fileAndrew Gerrand
R=rsc CC=golang-dev https://golang.org/cl/4264043
2011-03-04doc: add "implements" question to FAQAndrew Gerrand
R=r, fw, gri, r2, yiyus CC=golang-dev https://golang.org/cl/4248051
2011-03-04doc: describe platform-specific conventions in code.htmlAndrew Gerrand
R=r, rsc, gri CC=golang-dev https://golang.org/cl/4257049
2011-03-03gofmt: exclude test file that is not legal GoRobert Griesemer
R=r, r2 CC=golang-dev https://golang.org/cl/4252053
2011-03-03go spec: minor clarification of scope rule for functionsRobert Griesemer
R=rsc, iant, r, r2 CC=golang-dev https://golang.org/cl/4256050
2011-03-03http: change localhost URL; maybe fix WindowsBrad Fitzpatrick
R=golang-dev, rsc, bradfitzwork CC=golang-dev https://golang.org/cl/4259048
2011-03-03http: allow handlers to send non-chunked responsesBrad Fitzpatrick
Currently all http handlers reply to HTTP/1.1 requests with chunked responses. This patch allows handlers to opt-out of that behavior by pre-declaring their Content-Length (which is then enforced) and unsetting their Transfer-Encoding or setting it to the "identity" encoding. R=rsc, bradfitzwork CC=golang-dev https://golang.org/cl/4245058
2011-03-03io/ioutil: add TempDirRuss Cox
It's a little confusing that os.TempDir and ioutil.TempDir have different meanings. I don't know what to change the names to, if anything. At least they also have different signatures. R=golang-dev, bradfitzgo, r, gri CC=golang-dev https://golang.org/cl/4247051
2011-03-03testing: run GC before each benchmark run.Roger Peppe
R=r, rh, gri, rsc CC=golang-dev https://golang.org/cl/4237055
2011-03-03fmt: make recursive scan more efficient.Roger Peppe
Detect when scan is being called recursively and re-use the same scan state. On my machine, for a recursion-heavy benchmark, this results in 44x speed up. This does impose a 4% penalty on the non-recursive case, which can be removed by heap-allocating the saved state, at 40% performance penalty on the recursive case. Either way is fine with me. R=r CC=golang-dev https://golang.org/cl/4253049
2011-03-03reflect: add PtrTo, add Value.Addr (old Addr is now UnsafeAddr)Russ Cox
This change makes it possible to take the address of a struct field or slice element in order to call a method that requires a pointer receiver. Existing code that uses the Value.Addr method will have to change (as gob does in this CL) to call UnsafeAddr instead. R=r, rog CC=golang-dev https://golang.org/cl/4239052
2011-03-03gc, ld: reflect support for PtrToRuss Cox
R=ken2 CC=golang-dev https://golang.org/cl/4245055
2011-03-03fix build (observed in wild, not on dashboard)Russ Cox
TBR=r CC=golang-dev https://golang.org/cl/4257054
2011-03-03bzip2: speed up decompression.Adam Langley
This borrows a trick from the bzip2 source and effects a decent speed up when decompressing highly compressed sources. Rather than unshuffle the BTW block when performing the IBTW, a linked-list is threaded through the array, in place. This improves cache hit rates. R=bradfitzgo, bradfitzwork, cw CC=golang-dev https://golang.org/cl/4247047
2011-03-03image: add a decoding test for common file formats.Nigel Tao
The test image was converted from doc/video-001.png using the convert command line tool (ImageMagick 6.5.7-8) at -quality 100. R=r, nigeltao_gnome CC=golang-dev https://golang.org/cl/4259047
2011-03-03doc: remove reference to bug count from install.htmlAndrew Gerrand
Fixes #1574. R=rsc, r2 CC=golang-dev https://golang.org/cl/4240066
2011-03-03gobuilder: add -package flag to build external packagesAndrew Gerrand
Also add -v for verbose logging. R=rsc, gri, r, r2 CC=golang-dev https://golang.org/cl/4172056
2011-03-02unsafe: fix the documentationRob Pike
Reflection is about Pointer, not uintptr. Also clarify that Reflect and Unreflect are indirect. R=rsc CC=golang-dev https://golang.org/cl/4254052
2011-03-02gc: fix init of packages named mainGustavo Niemeyer
This change removes the special case which existed for handling the initalization of the main package, so that other modules named 'main' get properly initialized when imported. Note that gotest of main packages will break in most cases without this. R=rsc CC=golang-dev https://golang.org/cl/4190050