]>
Cypherpunks repositories - gostls13.git/log
Andrew Gerrand [Wed, 20 Jul 2011 01:22:56 +0000 (11:22 +1000)]
misc/dashboard: center align build results
R=rsc, dsymonds
CC=golang-dev
https://golang.org/cl/
4806041
Rob Pike [Tue, 19 Jul 2011 22:39:24 +0000 (08:39 +1000)]
sync/atomic: delete workaround
Load seems to work on arm now.
R=dsymonds
CC=golang-dev
https://golang.org/cl/
4795042
Robert Griesemer [Tue, 19 Jul 2011 15:22:20 +0000 (08:22 -0700)]
godoc: implement http.FileSystem for zip files
R=rsc, adg, bradfitz
CC=golang-dev
https://golang.org/cl/
4750047
Lucio De Re [Tue, 19 Jul 2011 15:04:33 +0000 (11:04 -0400)]
runtime: make goc2c build on Plan 9
pkg/runtime/Makefile:
. Adjusted so "goc2c.c" is built using the Plan 9 libraries.
pkg/runtime/goc2c.c:
. Added/subtracted #include headers to correspond to Plan 9
toolkit.
. Changed fprintf(stderr,...)/exit() combinations to
sysfatal() calls, adjusted the "%u" format to "%ud".
. Added exits(0) at the end of main().
. Made main() a void-returning function and removed the
"return 0" at the end of it.
Tested on UBUNTU and Plan 9 only.
R=r, rsc
CC=golang-dev
https://golang.org/cl/
4626093
Russ Cox [Tue, 19 Jul 2011 15:01:17 +0000 (11:01 -0400)]
runtime: faster entersyscall, exitsyscall
Uses atomic memory accesses to avoid the need to acquire
and release schedlock on fast paths.
benchmark old ns/op new ns/op delta
runtime_test.BenchmarkSyscall 73 31 -56.63%
runtime_test.BenchmarkSyscall-2 538 74 -86.23%
runtime_test.BenchmarkSyscall-3 508 103 -79.72%
runtime_test.BenchmarkSyscall-4 721 97 -86.52%
runtime_test.BenchmarkSyscallWork 920 873 -5.11%
runtime_test.BenchmarkSyscallWork-2 516 481 -6.78%
runtime_test.BenchmarkSyscallWork-3 550 343 -37.64%
runtime_test.BenchmarkSyscallWork-4 632 263 -58.39%
(Intel Core i7 L640 2.13 GHz-based Lenovo X201s)
Reduced a less artificial server benchmark
from 11.5r 12.0u 8.0s to 8.3r 9.1u 1.0s.
R=dvyukov, r, bradfitz, r, iant, iant
CC=golang-dev
https://golang.org/cl/
4723042
Wei Guangjing [Tue, 19 Jul 2011 14:47:33 +0000 (10:47 -0400)]
cgo: windows amd64 port
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
4725041
Dmitriy Vyukov [Tue, 19 Jul 2011 12:10:07 +0000 (22:10 +1000)]
sync/atomic: fix LoadInt32 on ARM
R0 is clobbered after cas,
while R1 preserves its value.
R=golang-dev
CC=golang-dev
https://golang.org/cl/
4782042
Rob Pike [Tue, 19 Jul 2011 07:06:13 +0000 (17:06 +1000)]
sync/atomic: attempt to get the arm build green.
Disable the LoadInt32 and LoadUint32 tests, since they fail.
These should be fixed but we want to get through the rest of the build
to see if something else unrelated is broken. The arm build has been
bad for a long time.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
4780041
Tarmigan Casebolt [Tue, 19 Jul 2011 06:58:18 +0000 (16:58 +1000)]
goinstall, dashboard: Google Code now supports git
R=golang-dev, adg, rsc, tarmigan+golang
CC=golang-dev
https://golang.org/cl/
4760055
Rob Pike [Tue, 19 Jul 2011 05:44:25 +0000 (15:44 +1000)]
5l: fix arm linker bug introduced by
4742041
Should fix the arm build.
R=golang-dev, dsymonds, adg
CC=golang-dev
https://golang.org/cl/
4777041
Andrew Gerrand [Tue, 19 Jul 2011 04:10:12 +0000 (14:10 +1000)]
doc/talks/io2010: handle the errors
R=golang-dev, dsymonds, dsymonds, r
CC=golang-dev
https://golang.org/cl/
4771041
Alex Brainman [Tue, 19 Jul 2011 04:02:23 +0000 (14:02 +1000)]
go/build: fixes for windows paths
R=golang-dev, mattn.jp, adg
CC=golang-dev
https://golang.org/cl/
4746047
Robert Griesemer [Tue, 19 Jul 2011 03:30:44 +0000 (20:30 -0700)]
archive/zip: support functions to get modified time in ns from MS-DOS time
R=rsc, r, bradfitz, r, adg
CC=golang-dev
https://golang.org/cl/
4748056
Alex Brainman [Tue, 19 Jul 2011 03:18:21 +0000 (13:18 +1000)]
exp/wingui: make sure it builds again
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
4770041
Rob Pike [Tue, 19 Jul 2011 01:47:15 +0000 (11:47 +1000)]
gif: fix local color map and coordinates
R=nigeltao
CC=golang-dev
https://golang.org/cl/
4759051
Andrew Gerrand [Tue, 19 Jul 2011 01:12:10 +0000 (11:12 +1000)]
dashboard: list "most installed this week" with rolling count
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
4631085
Robert Griesemer [Tue, 19 Jul 2011 00:54:32 +0000 (17:54 -0700)]
time: typo in documentation
R=r
CC=golang-dev
https://golang.org/cl/
4763048
Hector Chu [Mon, 18 Jul 2011 20:15:01 +0000 (16:15 -0400)]
runtime: fix select pass 3
Fixes #2075
R=rsc, ken, r
CC=golang-dev
https://golang.org/cl/
4748045
Russ Cox [Mon, 18 Jul 2011 19:50:55 +0000 (15:50 -0400)]
runtime: track running goroutine count
Used to use mcpu+msyscall but that's
problematic for packing into a single
atomic word. The running goroutine count
(where running == Go code or syscall)
can be maintained separately, always
manipulated under lock.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
4767041
Dmitriy Vyukov [Mon, 18 Jul 2011 18:56:22 +0000 (14:56 -0400)]
runtime: add per-M caches for MemStats
Avoid touching centralized state during
memory manager operations.
R=mirtchovski
CC=golang-dev, rsc
https://golang.org/cl/
4766042
Dmitriy Vyukov [Mon, 18 Jul 2011 18:52:57 +0000 (14:52 -0400)]
runtime: add per-M caches for MemStats
Avoid touching centralized state during
memory manager opreations.
R=rsc
CC=golang-dev
https://golang.org/cl/
4766042
Ian Lance Taylor [Mon, 18 Jul 2011 16:55:09 +0000 (09:55 -0700)]
debug/proc: Remove.
The package was always GNU/Linux specific, and is no longer
used by anything now that exp/ogle has been removed.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
4757049
Dmitriy Vyukov [Mon, 18 Jul 2011 16:35:55 +0000 (12:35 -0400)]
sync: add fast paths to WaitGroup
benchmark old ns/op new ns/op delta
BenchmarkWaitGroupUncontended 93.50 33.60 -64.06%
BenchmarkWaitGroupUncontended-2 44.30 16.90 -61.85%
BenchmarkWaitGroupUncontended-4 21.80 8.47 -61.15%
BenchmarkWaitGroupUncontended-8 12.10 4.86 -59.83%
BenchmarkWaitGroupUncontended-16 7.38 3.35 -54.61%
BenchmarkWaitGroupAddDone 58.40 33.70 -42.29%
BenchmarkWaitGroupAddDone-2 293.00 85.80 -70.72%
BenchmarkWaitGroupAddDone-4 243.00 51.10 -78.97%
BenchmarkWaitGroupAddDone-8 236.00 52.20 -77.88%
BenchmarkWaitGroupAddDone-16 215.00 43.30 -79.86%
BenchmarkWaitGroupAddDoneWork 826.00 794.00 -3.87%
BenchmarkWaitGroupAddDoneWork-2 450.00 424.00 -5.78%
BenchmarkWaitGroupAddDoneWork-4 277.00 220.00 -20.58%
BenchmarkWaitGroupAddDoneWork-8 440.00 116.00 -73.64%
BenchmarkWaitGroupAddDoneWork-16 569.00 66.50 -88.31%
BenchmarkWaitGroupWait 29.00 8.04 -72.28%
BenchmarkWaitGroupWait-2 74.10 4.15 -94.40%
BenchmarkWaitGroupWait-4 117.00 2.30 -98.03%
BenchmarkWaitGroupWait-8 111.00 1.31 -98.82%
BenchmarkWaitGroupWait-16 104.00 1.27 -98.78%
BenchmarkWaitGroupWaitWork 802.00 792.00 -1.25%
BenchmarkWaitGroupWaitWork-2 411.00 401.00 -2.43%
BenchmarkWaitGroupWaitWork-4 210.00 199.00 -5.24%
BenchmarkWaitGroupWaitWork-8 206.00 105.00 -49.03%
BenchmarkWaitGroupWaitWork-16 334.00 54.40 -83.71%
R=rsc
CC=golang-dev
https://golang.org/cl/
4672050
Russ Cox [Mon, 18 Jul 2011 16:30:10 +0000 (12:30 -0400)]
5l: assume Linux binary, not Plan 9
R=bradfitz
CC=golang-dev
https://golang.org/cl/
4767042
Brad Fitzpatrick [Mon, 18 Jul 2011 16:04:48 +0000 (09:04 -0700)]
http: let FileServer work when path doesn't begin with a slash
... as when it's over-stripped with StripPrefix.
R=golang-dev, andybalholm, rsc
CC=golang-dev
https://golang.org/cl/
4759052
Russ Cox [Mon, 18 Jul 2011 16:04:09 +0000 (12:04 -0400)]
ld: allow seek within write buffer
Reduces number of write+seek's from 88516 to 2080
when linking godoc with 6l.
Thanks to Alex Brainman for pointing out the
many small writes.
R=golang-dev, r, alex.brainman, robert.hencke
CC=golang-dev
https://golang.org/cl/
4743043
Albert Strasheim [Mon, 18 Jul 2011 15:21:59 +0000 (11:21 -0400)]
syscall: Parse and encode SCM_RIGHTS and SCM_CREDENTIALS.
R=rsc, agl, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/
4667066
Dmitriy Vyukov [Mon, 18 Jul 2011 14:50:04 +0000 (10:50 -0400)]
runtime: fix data race in Plan9 sysalloc
Add mutex to protect brk limit.
Add mstats.sys update.
R=rsc
CC=golang-dev
https://golang.org/cl/
4762045
Brad Fitzpatrick [Mon, 18 Jul 2011 14:23:52 +0000 (07:23 -0700)]
cgo: add missing semicolon in generated struct
This affected certain signatures needing padding
like:
//export Foo
func Foo() (int, C.long) { ... }
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
4745047
Dave Cheney [Mon, 18 Jul 2011 11:09:28 +0000 (21:09 +1000)]
gc: fix silent sign truncation in pgen.c
Fixes #2076.
R=golang-dev, r, r, dsymonds, lucio.dere
CC=golang-dev
https://golang.org/cl/
4744047
Rob Pike [Mon, 18 Jul 2011 07:34:42 +0000 (17:34 +1000)]
exp/template: dig into empty interfaces so a struct (say) stored in an empty
interface field can be unpacked. We don't have type assertions here so we
must be forthright.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
4757047
Andrew Gerrand [Mon, 18 Jul 2011 07:30:00 +0000 (17:30 +1000)]
doc: fix padding on h1 tags
See /doc/codewalk/sharemem/ for an example of how it's broken.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
4742044
Alex Brainman [Mon, 18 Jul 2011 07:08:12 +0000 (17:08 +1000)]
path/filepath: fixes for windows paths
- Clean and IsAbs to handle paths with drive letter properly.
- Clean to replace / with \.
R=golang-dev, adg
CC=golang-dev, mattn.jp
https://golang.org/cl/
4758051
Nigel Tao [Mon, 18 Jul 2011 05:54:11 +0000 (15:54 +1000)]
runtime: fix panic for make(chan [0]byte).
I suspect that this was introduced by
http://code.google.com/p/go/source/detail?r=
6e4ee32fffd1
R=r
CC=golang-dev
https://golang.org/cl/
4764045
David Symonds [Mon, 18 Jul 2011 02:59:16 +0000 (12:59 +1000)]
http: drain the pipe output in TestHandlerPanic to avoid logging deadlock.
R=r
CC=golang-dev
https://golang.org/cl/
4756047
Rob Pike [Mon, 18 Jul 2011 01:44:27 +0000 (11:44 +1000)]
fmt: fix a couple of documentation glitches.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
4758050
Rob Pike [Mon, 18 Jul 2011 01:34:13 +0000 (11:34 +1000)]
reflect: panic if Method index is out of range for a type.
Makes the code agree with the documentation.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
4759050
Rob Pike [Mon, 18 Jul 2011 01:08:55 +0000 (11:08 +1000)]
5c: attempt to fix build by silencing warnings about unused variables.
The story is more complicated; this is just a bandaid.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
4755047
Quan Yong Zhai [Mon, 18 Jul 2011 00:48:31 +0000 (10:48 +1000)]
gob: minor cleanup
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
4754050
Rob Pike [Mon, 18 Jul 2011 00:05:35 +0000 (10:05 +1000)]
fmt: Scan(&int) was mishandling a lone zero.
It took it as an octal base prefix but assumed more digits were coming.
Fixes #2077.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
4764044
Lucio De Re [Sun, 17 Jul 2011 22:46:47 +0000 (08:46 +1000)]
cmd/5l/Makefile: directory prefix nit, "../5l/" is not needed.
R=golang-dev, r
CC=golang-dev, rsc
https://golang.org/cl/
4755046
Brad Fitzpatrick [Sun, 17 Jul 2011 22:46:10 +0000 (15:46 -0700)]
http: make tests quiet, fixing a test race
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
4754044
Brad Fitzpatrick [Sun, 17 Jul 2011 22:46:00 +0000 (15:46 -0700)]
log: more locking
This didn't actually cause a bug, but looks wrong.
There was a lock but there was more shared mutable state not
guarded by it.
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/
4760047
Rob Pike [Sun, 17 Jul 2011 03:31:59 +0000 (13:31 +1000)]
exp/templates: variable scope persists until "end".
The previous CL doicumented and diagnosed the old situation.
This one changes it to something more traditional: any action
may declare a variable, and the block structure of scopes
applies only to control seequences.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
4748047
Rob Pike [Sun, 17 Jul 2011 02:32:00 +0000 (12:32 +1000)]
exp/template: allow declaration of variables only inside control structures.
In simple pipelines the declaration has no scope.
Also document the scope.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
4761044
Russ Cox [Fri, 15 Jul 2011 16:07:37 +0000 (12:07 -0400)]
http: fixes for sniffing
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
4753044
Lucio De Re [Fri, 15 Jul 2011 15:58:39 +0000 (11:58 -0400)]
6a, 6c, 6l: fix for Plan 9 build
6a/a.h:
. Dropped <u.h> and <libc.h>.
. Made definition of EOF conditional.
6a/a.y:
. Added <u.h> and <libc.h>.
6a/lex.c:
. Added <u.h> and <libc.h>.
. Dropped <ctype.h> (now in <u.h>).
6c/gc.h:
. Added varargck pragma for "lD".
6c/swt.c:
. Dropped unused "thestring" argument in Bprint() calls.
6l/Makefile:
. Dropped unneeded directory prefix.
6l/l.h:
. Dropped unneeded directory prefix.
. Added varargck pragma for "I" and "i".
6l/obj.c:
. Dropped unneeded assignment.
. Dropped unreachable goto statement.
6l/pass.c:
. Dropped assignments flagged as unused.
6l/prof.c:
. Replaced "#if 0" with "#ifdef NOTDEF".
6l/span.c:
. Dropped unused incrementation.
. Added USED() as required.
. Dropped unreachable "return" statement.
R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/
4747044
Lucio De Re [Fri, 15 Jul 2011 15:58:28 +0000 (11:58 -0400)]
5a, 5c, 5l: fix for Plan 9 build
5a/a.h:
. Removed <u.h> and <lib.h>.
. Made definition of EOF conditional.
5a/a.y:
. Added <u.h> and <lib.h>.
5a/lex.c:
. Added <u.h> and <lib.h>.
. Dropped <ctype.h> (now in <u.h>).
5c/peep.c:
. Removed unnecessary "return 0" statement.
5c/reg.c:
. Added compilation condition around unused code.
5c/swt.c:
. Removed unused "thestring" argument from Bprint() calls.
5l/asm.c:
. Added USED() statements as required.
. Adjusted a few format specifications.
. Added compilation condition around unused code.
5l/l.h:
. Dropped directory prefix from <../5l/5.out.h>.
. Added varargck pragma for "I" and "i".
5l/obj.c:
. Cascaded consecutive "if" statements.
. Dropped unnecessary incrementation and assignments.
5l/pass.c:
. Dropped unnecessary assignment.
5l/prof.c:
. #if 0 converted to #ifdef NOTDEF.
5l/span.c:
. Dropped unnecessary incrementation and assignments.
R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/
4752041
Lucio De Re [Fri, 15 Jul 2011 15:51:59 +0000 (11:51 -0400)]
8l: nits
8l/Makefile:
. Dropped unnecessary prefix from "../8l/8.out.h"
8l/l.h:
. Dropped unnecessary prefix from "../8l/8.out.h"
. Dropped unused and inconsistent "I" vararg pragma.
R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/
4754041
Dmitriy Vyukov [Fri, 15 Jul 2011 15:27:16 +0000 (11:27 -0400)]
runtime: native xadd for 386/amd64
benchmark old ns/op new ns/op delta
BenchmarkSemaUncontended 37.40 34.10 -8.82%
BenchmarkSemaUncontended-2 18.90 17.70 -6.35%
BenchmarkSemaUncontended-4 11.90 10.90 -8.40%
BenchmarkSemaUncontended-8 6.26 5.19 -17.09%
BenchmarkSemaUncontended-16 4.39 3.91 -10.93%
BenchmarkSemaSyntNonblock 38.00 35.30 -7.11%
BenchmarkSemaSyntNonblock-2 83.00 46.70 -43.73%
BenchmarkSemaSyntNonblock-4 124.00 101.00 -18.55%
BenchmarkSemaSyntNonblock-8 124.00 116.00 -6.45%
BenchmarkSemaSyntNonblock-16 148.00 114.00 -22.97%
(on HP Z600 2 x Xeon E5620, 8 HT cores, 2.40GHz)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
4755041
Luuk van Dijk [Fri, 15 Jul 2011 14:00:05 +0000 (16:00 +0200)]
gc: some enhancements to printing debug info.
R=rsc
CC=golang-dev
https://golang.org/cl/
4710046
Russ Cox [Fri, 15 Jul 2011 05:01:49 +0000 (01:01 -0400)]
http: sniffing placeholder
R=dsymonds
CC=golang-dev
https://golang.org/cl/
4746041
Andrew Gerrand [Fri, 15 Jul 2011 03:45:22 +0000 (13:45 +1000)]
go/build: less aggressive failure when GOROOT not found
R=golang-dev, rsc, dsymonds
CC=golang-dev
https://golang.org/cl/
4743041
Russ Cox [Fri, 15 Jul 2011 03:43:03 +0000 (23:43 -0400)]
runtime: make TestSideEffectOrder work twice
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
4714045
Brad Fitzpatrick [Fri, 15 Jul 2011 00:00:14 +0000 (17:00 -0700)]
cgi: make test less flaky
Previously, during the anti-zombie test, a
CGI process had to finish within ~625ms.
Now it gets ~5.6 seconds.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
4741041
Robert Griesemer [Thu, 14 Jul 2011 23:09:15 +0000 (16:09 -0700)]
go/printer: simplify internal state
No formatting changes.
R=rsc
CC=golang-dev
https://golang.org/cl/
4735042
Robert Griesemer [Thu, 14 Jul 2011 22:58:37 +0000 (15:58 -0700)]
go spec: (up-)date
R=rsc, bradfitz, r
CC=golang-dev
https://golang.org/cl/
4738042
Robert Griesemer [Thu, 14 Jul 2011 21:39:40 +0000 (14:39 -0700)]
go/printer: changed max. number of newlines from 3 to 2
manual changes in src/pkg/go/printer, src/cmd/gofix/signal_test.go
(cd src/cmd/gofix/testdata; gofmt -w *.in *.out)
(cd src/pkg/go/printer; gotest -update)
gofmt -w misc src
runs all tests
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
4715041
Russ Cox [Thu, 14 Jul 2011 21:15:52 +0000 (17:15 -0400)]
go: require { } around else block
R=gri, ken, r
CC=golang-dev
https://golang.org/cl/
4721044
Brad Fitzpatrick [Thu, 14 Jul 2011 18:54:55 +0000 (11:54 -0700)]
json: add omitempty struct tag option
Fixes #2032
R=rsc, dsymonds, r, r
CC=golang-dev
https://golang.org/cl/
4709044
Robert Griesemer [Thu, 14 Jul 2011 18:48:23 +0000 (11:48 -0700)]
godoc: fix build (add Makefile change)
R=bradfitz
CC=golang-dev
https://golang.org/cl/
4733041
Robert Griesemer [Thu, 14 Jul 2011 18:34:53 +0000 (11:34 -0700)]
godoc: support for file systems stored in .zip files
Instead of serving files of the underlying OS file system,
a .zip file may be provided to godoc containing the files
to serve; for instance:
godoc -http=:6060 -zip=go.zip
using a .zip file created from a clean tree as follows:
zip -r go.zip $GOROOT
R=rsc
CC=golang-dev
https://golang.org/cl/
4670053
Luuk van Dijk [Thu, 14 Jul 2011 16:13:39 +0000 (18:13 +0200)]
gc: fix closure bug
Fixes #2056.
R=rsc
CC=golang-dev
https://golang.org/cl/
4709042
David Symonds [Thu, 14 Jul 2011 03:30:08 +0000 (13:30 +1000)]
json: escape < and > in any JSON string.
Angle brackets can trigger some browser sniffers, causing
some forms of JSON output to be interpreted as HTML.
Escaping angle brackets closes that security hole.
R=rsc
CC=golang-dev
https://golang.org/cl/
4701047
Rob Pike [Thu, 14 Jul 2011 03:15:55 +0000 (13:15 +1000)]
exp/template: allow range actions to declare a key and element variable.
{{range $key, $element := pipeline}}
This CL is smaller than it looks due to some rearrangement and renaming.
R=rsc, r
CC=golang-dev
https://golang.org/cl/
4709047
Russ Cox [Thu, 14 Jul 2011 03:04:12 +0000 (20:04 -0700)]
mime: fix build
R=bradfitz
CC=golang-dev
https://golang.org/cl/
4695060
David Symonds [Thu, 14 Jul 2011 02:02:58 +0000 (12:02 +1000)]
exp/template: escape < and > in JS escaper.
Angle brackets can trigger some browser sniffers,
causing some output to be interpreted as HTML.
Escaping angle brackets closes that security hole.
R=r
CC=golang-dev
https://golang.org/cl/
4714044
Rob Pike [Thu, 14 Jul 2011 01:32:06 +0000 (11:32 +1000)]
exp/template: include function name in error returned by function or method call.
R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/
4711049
Rob Pike [Thu, 14 Jul 2011 01:00:23 +0000 (11:00 +1000)]
exp/template: simplify method and function calls by using the value's Method
rather than the type's, so a method's invocation works the same as a function's.
R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/
4704049
Mikio Hara [Thu, 14 Jul 2011 00:41:33 +0000 (17:41 -0700)]
json: allow using '$' and '-' as the struct field's tag
R=adg, rsc, bradfitz, mattn.jp, gustavo
CC=golang-dev
https://golang.org/cl/
4625081
Rob Pike [Thu, 14 Jul 2011 00:38:15 +0000 (10:38 +1000)]
reflect: trivial addition: Value.NumMethod.
Just an oversight it was missing.
R=rsc, dsymonds, bradfitz, r
CC=golang-dev
https://golang.org/cl/
4695059
Yuval Pavel Zholkover [Wed, 13 Jul 2011 23:29:37 +0000 (16:29 -0700)]
os: Plan 9: add Process.Signal as a way to send notes.
Move the Signal interface from exec_posix.go to exec.go.
Remove some unsused code from file_plan9.go.
R=fshahriar, rsc
CC=golang-dev
https://golang.org/cl/
4683044
Alex Brainman [Wed, 13 Jul 2011 23:13:39 +0000 (09:13 +1000)]
runtime: correct FixedStack value (fixes windows build)
Fixes #2068.
R=rsc
CC=golang-dev
https://golang.org/cl/
4705046
Lucio De Re [Wed, 13 Jul 2011 23:01:29 +0000 (16:01 -0700)]
cc: fixes for Plan 9 build
<ctype.h> has been moved into <u.h>, specifically to be able to
drop it from these modules.
Will someone check platforms other than UBUNTU/386, please?
R=bsiegert, rsc
CC=golang-dev
https://golang.org/cl/
4648078
Brad Fitzpatrick [Wed, 13 Jul 2011 22:48:57 +0000 (15:48 -0700)]
fix build from
e904b6784768 breakage
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
4696047
Russ Cox [Wed, 13 Jul 2011 22:34:36 +0000 (15:34 -0700)]
syscall: add Flock on Linux
Fixes #2069.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
4703048
Russ Cox [Wed, 13 Jul 2011 22:34:21 +0000 (15:34 -0700)]
syscall: change missing from windows net fixes
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
4701045
Robert Griesemer [Wed, 13 Jul 2011 22:10:50 +0000 (15:10 -0700)]
filepath/path: fix a comment
R=bradfitz
CC=golang-dev
https://golang.org/cl/
4704047
Rob Pike [Wed, 13 Jul 2011 21:59:04 +0000 (07:59 +1000)]
exp/template: tweak behavior of booleans.
Russ suggested this technique, making the "and" and "or" functions handier.
But it's hacky, and I can be talked out of it.
R=dsymonds, rsc
CC=golang-dev
https://golang.org/cl/
4698044
Rob Pike [Wed, 13 Jul 2011 21:52:07 +0000 (07:52 +1000)]
exp/template: allow niladic methods inside chained field references.
Also really fix the bug about dot vs. receivers.
R=rsc, r
CC=golang-dev
https://golang.org/cl/
4705047
Yasuhiro Matsumoto [Wed, 13 Jul 2011 21:39:33 +0000 (14:39 -0700)]
http: fix Content-Type of file extension.
ServeFile() pass empty string to serveFile(). serveFile() should get
file extension via joining root and filename.
R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/
4654089
Wei Guangjing [Wed, 13 Jul 2011 19:44:21 +0000 (12:44 -0700)]
net: windows/amd64 port
R=rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/
3790044
Matthew Horsnell [Wed, 13 Jul 2011 19:34:29 +0000 (12:34 -0700)]
debug/elf: Read ELF Program headers.
NewFile has been fixed to read ELF Program headers into the structs.
Added test coverage.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
4628062
Russ Cox [Wed, 13 Jul 2011 19:33:03 +0000 (12:33 -0700)]
A+C: Matthew Horsnell (individual CLA)
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
4700044
Wei Guangjing [Wed, 13 Jul 2011 18:44:44 +0000 (11:44 -0700)]
runtime: stdcall_raw stack 16byte align for Win64
R=alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/
4681049
Dmitriy Vyukov [Wed, 13 Jul 2011 18:22:41 +0000 (11:22 -0700)]
runtime: fix data race during Itab hash update/lookup
The data race is on newly published Itab nodes, which are
both unsafely published and unsafely acquired. It can
break on IA-32/Intel64 due to compiler optimizations
(most likely not an issue as of now) and on ARM due to
hardware memory access reorderings.
R=rsc
CC=golang-dev
https://golang.org/cl/
4673055
Brad Fitzpatrick [Wed, 13 Jul 2011 17:54:51 +0000 (10:54 -0700)]
docs: fix wrong it's -> its
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
4702046
Sam Thorogood [Wed, 13 Jul 2011 17:15:00 +0000 (10:15 -0700)]
exp/regexp/syntax: add Prog.NumCap
R=rsc, r
CC=golang-dev
https://golang.org/cl/
4662083
Robert Griesemer [Wed, 13 Jul 2011 16:40:53 +0000 (09:40 -0700)]
exp/eval, exp/ogle: remove packages eval and ogle
An externally maintained version of exp/eval can
be found at: https://bitbucket.org/binet/go-eval/ .
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/
4695047
Bobby Powers [Wed, 13 Jul 2011 07:12:17 +0000 (17:12 +1000)]
gob: register more slice types
Without explicitly registering slice types, gob fails to encode
map[string]interface{} instances where the value is a slice,
failing with a message such as:
gob: type not registered for interface: []string
Fixes #2065.
R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/
4672056
Nigel Tao [Wed, 13 Jul 2011 06:53:02 +0000 (16:53 +1000)]
html: update section references in comments to the latest HTML5 spec.
R=r
CC=golang-dev
https://golang.org/cl/
4699048
Rob Pike [Wed, 13 Jul 2011 06:10:12 +0000 (16:10 +1000)]
C+A: Bobby Powers <bobbypowers@gmail.com>
R=golang-dev, dsymonds
CC=bobbypowers, golang-dev
https://golang.org/cl/
4695050
Rob Pike [Wed, 13 Jul 2011 05:58:31 +0000 (15:58 +1000)]
exp/template: doc and API changes suggested by rsc.
- template invocation is by string constant only.
- NewSet is gone.
- no global Funcs
- writer is now first arg to Execute
R=rsc, r
CC=golang-dev
https://golang.org/cl/
4700043
Rob Pike [Wed, 13 Jul 2011 03:50:05 +0000 (13:50 +1000)]
exp/template: add Set.AddSet and Set.Union.
Document and test that Set.Parse can be called multiple times.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
4703044
Rob Pike [Wed, 13 Jul 2011 03:21:18 +0000 (13:21 +1000)]
exp/template: allow variables as template names.
Just an oversight it wasn't already there.
Thanks to islandberry@live.com for pointing out the omission.
R=golang-dev, dsymonds
CC=golang-dev, islandberry
https://golang.org/cl/
4703043
Rob Pike [Wed, 13 Jul 2011 03:20:05 +0000 (13:20 +1000)]
go_tutorial: change the way it's generated.
No longer do we generate HTML from it; instead the input
file is already in HTML but has template invocations to
extract programs from other files.
Delete htmlgen, which is no longer needed.
Add tmpltohtml, which runs the templating code.
R=golang-dev, dsymonds, adg
CC=golang-dev
https://golang.org/cl/
4699041
David Anderson [Wed, 13 Jul 2011 00:49:55 +0000 (17:49 -0700)]
5l, 6l, 8l: Add a PT_LOAD PHDR entry for the PHDR.
Per the TIS ELF spec, if a PHDR entry is present in the
program header table, it must be part of the memory image of
the program. Failure to do this makes elflint complain, and
causes some tools that manipulate ELF to crash.
R=iant, rsc
CC=dave, golang-dev
https://golang.org/cl/
4650067
Robert Griesemer [Wed, 13 Jul 2011 00:45:29 +0000 (17:45 -0700)]
csv: fix spelling errors in comments
Fixes #2066.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
4699045
Russ Cox [Wed, 13 Jul 2011 00:44:59 +0000 (17:44 -0700)]
tag release.r58.1: adds OS X Lion support
R=adg, dsymonds
CC=golang-dev
https://golang.org/cl/
4702043
Quan Yong Zhai [Wed, 13 Jul 2011 00:30:40 +0000 (17:30 -0700)]
runtime: replace runtime.mcpy with runtime.memmove
faster string operations, and more
tested on linux/386
runtime_test.BenchmarkSliceToString 642 532 -17.13%
runtime_test.BenchmarkStringToSlice 636 528 -16.98%
runtime_test.BenchmarkConcatString 1109 897 -19.12%
R=r, iant, rsc
CC=golang-dev
https://golang.org/cl/
4674042