]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agoimage: change Pix from []FooColor to []uint8.
Nigel Tao [Tue, 12 Jul 2011 06:39:38 +0000 (16:39 +1000)]
image: change Pix from []FooColor to []uint8.

Some benchmark numbers below. The image/draw fast-paths show dramatic
improvement, the generic slow-paths show a smaller slow-down.

BEFORE
png.BenchmarkEncodePaletted      200       8203800 ns/op      37.45 MB/s
png.BenchmarkEncodeRGBOpaque         100      26940440 ns/op      45.61 MB/s
png.BenchmarkEncodeRGBA       20      73821000 ns/op      16.65 MB/s
jpeg.BenchmarkEncodeRGBOpaque         50      35598640 ns/op      34.52 MB/s
draw.BenchmarkFillOver      500    4024226 ns/op
draw.BenchmarkFillSrc    10000     152736 ns/op
draw.BenchmarkCopyOver      500    3452824 ns/op
draw.BenchmarkCopySrc    50000      73218 ns/op
draw.BenchmarkNRGBAOver      500    3941234 ns/op
draw.BenchmarkNRGBASrc     1000    2484400 ns/op
draw.BenchmarkYCbCr     1000    2609005 ns/op
draw.BenchmarkGlyphOver     2000    1169575 ns/op
draw.BenchmarkRGBA      200    9031390 ns/op
draw.BenchmarkGenericOver       50   34636620 ns/op
draw.BenchmarkGenericMaskOver      100   16561150 ns/op
draw.BenchmarkGenericSrc      100   13873760 ns/op
draw.BenchmarkGenericMaskSrc      100   25198860 ns/op

AFTER
png.BenchmarkEncodePaletted      200       8206600 ns/op      37.43 MB/s
png.BenchmarkEncodeRGBOpaque         100      26129530 ns/op      47.03 MB/s
png.BenchmarkEncodeRGBA       20      75776750 ns/op      16.22 MB/s
jpeg.BenchmarkEncodeRGBOpaque         50      37192940 ns/op      33.04 MB/s
draw.BenchmarkFillOver      500    3008134 ns/op
draw.BenchmarkFillSrc    10000     154214 ns/op
draw.BenchmarkCopyOver     1000    2169988 ns/op
draw.BenchmarkCopySrc    50000      73095 ns/op
draw.BenchmarkNRGBAOver     1000    2491079 ns/op
draw.BenchmarkNRGBASrc     2000    1361244 ns/op
draw.BenchmarkYCbCr     1000    2554269 ns/op
draw.BenchmarkGlyphOver     2000    1042225 ns/op
draw.BenchmarkRGBA      100   10233340 ns/op
draw.BenchmarkGenericOver       50   38421560 ns/op
draw.BenchmarkGenericMaskOver      100   17521190 ns/op
draw.BenchmarkGenericSrc      100   16351200 ns/op
draw.BenchmarkGenericMaskSrc      100   26538190 ns/op

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

13 years agoimage/draw: add benchmarks.
Nigel Tao [Tue, 12 Jul 2011 06:17:02 +0000 (16:17 +1000)]
image/draw: add benchmarks.

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

13 years agodoc: document r58.1
Russ Cox [Tue, 12 Jul 2011 05:39:09 +0000 (01:39 -0400)]
doc: document r58.1

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

13 years agoruntime: eliminate false sharing on runtime.goidgen
Dmitriy Vyukov [Tue, 12 Jul 2011 05:25:14 +0000 (01:25 -0400)]
runtime: eliminate false sharing on runtime.goidgen
runtime.goidgen can be quite frequently modified and
shares cache line with the following variables,
it leads to false sharing.
50c6b0 b nfname
50c6b4 b nfunc
50c6b8 b nfunc$17
50c6bc b nhist$17
50c6c0 B runtime.checking
50c6c4 B runtime.gcwaiting
50c6c8 B runtime.goidgen
50c6cc B runtime.gomaxprocs
50c6d0 B runtime.panicking
50c6d4 B strconv.IntSize
50c6d8 B src/pkg/runtime/_xtest_.ss
50c6e0 B src/pkg/runtime/_xtest_.stop
50c6e8 b addrfree
50c6f0 b addrmem
50c6f8 b argv

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

13 years agoruntime: eliminate false sharing on random number generators
Dmitriy Vyukov [Tue, 12 Jul 2011 05:23:58 +0000 (01:23 -0400)]
runtime: eliminate false sharing on random number generators
Use machine-local random number generator instead of
racy global ones.

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

13 years agoruntime: fix data race on runtime·maxstring
Dmitriy Vyukov [Tue, 12 Jul 2011 05:21:06 +0000 (01:21 -0400)]
runtime: fix data race on runtime·maxstring
The data race can lead to erroneous output of
"[invalid string]" instead of a string.

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

13 years ago6l: change default output name to 6.out.exe on windows
Alex Brainman [Tue, 12 Jul 2011 04:22:48 +0000 (14:22 +1000)]
6l: change default output name to 6.out.exe on windows

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

13 years agohttp: support for periodic flushing in ReverseProxy
Brad Fitzpatrick [Tue, 12 Jul 2011 03:56:21 +0000 (20:56 -0700)]
http: support for periodic flushing in ReverseProxy

Fixes #2012

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

13 years agoexp/template: make numbers adhere to Go's rules for ideal constants.
Rob Pike [Tue, 12 Jul 2011 03:15:26 +0000 (13:15 +1000)]
exp/template: make numbers adhere to Go's rules for ideal constants.
Without further type informatnion, 1.0 is a float and an integer
must fit in an int.

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

13 years agogo/build: make Nuke comment say what it does
Alex Brainman [Tue, 12 Jul 2011 03:08:22 +0000 (13:08 +1000)]
go/build: make Nuke comment say what it does

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

13 years agocodereview: fix for Mercurial 1.9
Andrew Gerrand [Tue, 12 Jul 2011 02:58:40 +0000 (22:58 -0400)]
codereview: fix for Mercurial 1.9

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

13 years agodoc: don't specify make target for working on windwos.
Yasuhiro Matsumoto [Tue, 12 Jul 2011 00:02:32 +0000 (20:02 -0400)]
doc: don't specify make target for working on windwos.
makehtml does not work on windows.

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

13 years agoundo CL 4675045 / 0e11e08951f7
Andrew Gerrand [Mon, 11 Jul 2011 23:57:39 +0000 (09:57 +1000)]
undo CL 4675045 / 0e11e08951f7

Breaks Mercurial 1.8.3.

««« original CL description
codereview: fix for Mercurial 1.9

Fixes #2038.

R=rsc, bobbypowers
CC=golang-dev
https://golang.org/cl/4675045
»»»

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

13 years agocodereview: fix for Mercurial 1.9
Andrew Gerrand [Mon, 11 Jul 2011 23:36:46 +0000 (09:36 +1000)]
codereview: fix for Mercurial 1.9

Fixes #2038.

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

13 years agocgi: close stdout reader pipe when finished
Brad Fitzpatrick [Mon, 11 Jul 2011 22:59:27 +0000 (15:59 -0700)]
cgi: close stdout reader pipe when finished

This causes the child, if still writing, to get an error or
SIGPIPE and most likely exit so our subsequent wait can
finish.

A more guaranteed fix would be putting a time limit on the
child's overall execution, but this fixes the problem
I was having.

Fixes #2059

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

13 years agoos: don't permit Process.Signal after a successful Wait
Brad Fitzpatrick [Mon, 11 Jul 2011 22:47:42 +0000 (15:47 -0700)]
os: don't permit Process.Signal after a successful Wait

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

13 years agoexec: closeAfterWait append bug
Brad Fitzpatrick [Mon, 11 Jul 2011 21:46:46 +0000 (14:46 -0700)]
exec: closeAfterWait append bug

Wasn't actually eager closing the fds as a result of the
copy/paste bug. (GC was doing it instead)

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

13 years agojson: encode \r and \n in strings as e.g. "\n", not "\u000A"
Evan Martin [Mon, 11 Jul 2011 14:31:08 +0000 (07:31 -0700)]
json: encode \r and \n in strings as e.g. "\n", not "\u000A"

This is allowed by the JSON spec and is shorter/easier to read.

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

13 years agostrconv: handle [-+]Infinity in atof
Brad Fitzpatrick [Mon, 11 Jul 2011 14:25:45 +0000 (07:25 -0700)]
strconv: handle [-+]Infinity in atof

This is the form as returned by Postgres, as well
as JavaScript.

I've tried and failed to find authorative docs online
about the proper string serialization, if any.

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

13 years agoexp/template: fix bug in argument evaluation.
Rob Pike [Mon, 11 Jul 2011 08:06:24 +0000 (18:06 +1000)]
exp/template: fix bug in argument evaluation.
Must keep dot and the receiver separate - variables broke that symmetry.
Also clean up function invocation and rename "data" to "dot" for clarity.

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

13 years agogo/build: use os.MkdirAll to create directories
Alex Brainman [Mon, 11 Jul 2011 05:40:41 +0000 (15:40 +1000)]
go/build: use os.MkdirAll to create directories

Replaces "mkdir -p ..." command, as Windows mkdir command
does not support -p flag. Also, is simpler and faster then
launching new process.

R=golang-dev, mattn.jp, adg, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4626087

13 years agoexp/template: fields and methods on variables.
Rob Pike [Mon, 11 Jul 2011 05:23:38 +0000 (15:23 +1000)]
exp/template: fields and methods on variables.
Not strictly necessary (you could achieve the same, clumsily,
via with blocks) but great to have: $x.Field, $y.Method.

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

13 years agoexp/template: documentation glitches and typos.
Rob Pike [Mon, 11 Jul 2011 04:43:21 +0000 (14:43 +1000)]
exp/template: documentation glitches and typos.
Also explain that len(v)==0 makes v a 'zero value'
in template execution.

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

13 years agoexp/template: simpler parse of char constants.
Rob Pike [Mon, 11 Jul 2011 02:36:10 +0000 (12:36 +1000)]
exp/template: simpler parse of char constants.
We can avoid the check against empty constants (''),
which UnquoteChar doesn't handle well, by leaving on
the trailing quote and seeing that's all we have left at the end.

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

13 years agoexp/template: character constants.
Rob Pike [Mon, 11 Jul 2011 01:46:22 +0000 (11:46 +1000)]
exp/template: character constants.
Easier to implement than to justify leaving them out.

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

13 years agoexp/template: static check for defined variables.
Rob Pike [Mon, 11 Jul 2011 00:01:15 +0000 (10:01 +1000)]
exp/template: static check for defined variables.
Worth catching at parse time rather than execution. Plus it's really easy.

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

13 years agoexp/eval: delete binary
Rob Pike [Sun, 10 Jul 2011 23:36:17 +0000 (09:36 +1000)]
exp/eval: delete binary
Mistakenly checked in.
Fixes #2058.

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

13 years agoflag: make -help nicer.
Rob Pike [Sun, 10 Jul 2011 23:35:50 +0000 (09:35 +1000)]
flag: make -help nicer.
- suppress the print that -help is not defined.
- return a special error code if -help is set
- do not change behavior if an explict "help" flag is defined.

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

13 years agoexp/template: add functions print and println.
Rob Pike [Sun, 10 Jul 2011 23:19:18 +0000 (09:19 +1000)]
exp/template: add functions print and println.

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

13 years agoexp/template: package documentation
Rob Pike [Sun, 10 Jul 2011 10:56:26 +0000 (20:56 +1000)]
exp/template: package documentation

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

13 years agoimage: change Pix[0] to mean top-left corner of an image's Rect instead
Nigel Tao [Sun, 10 Jul 2011 04:29:47 +0000 (14:29 +1000)]
image: change Pix[0] to mean top-left corner of an image's Rect instead
of the origin.

image/png and image/jpeg benchmarks show no significant changes.

The image/draw changes suggest to me that making a gofix for this is not
feasible. People are just going to have to make manual fixes.

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

13 years agoarchive/zip: add Writer
Andrew Gerrand [Sun, 10 Jul 2011 01:30:16 +0000 (11:30 +1000)]
archive/zip: add Writer

R=bradfitz, dchest, r, rsc
CC=golang-dev
https://golang.org/cl/4523077

13 years agomultipart: use textproto to handle multiline header
Evan Martin [Sat, 9 Jul 2011 22:18:31 +0000 (15:18 -0700)]
multipart: use textproto to handle multiline header

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

13 years agoCONTRIBUTORS: add Evan Martin (Google CLA)
Brad Fitzpatrick [Sat, 9 Jul 2011 22:18:18 +0000 (15:18 -0700)]
CONTRIBUTORS: add Evan Martin (Google CLA)

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

13 years agohttp: update triv.go with gofix
Andrew Balholm [Sat, 9 Jul 2011 22:10:39 +0000 (15:10 -0700)]
http: update triv.go with gofix

Sample code in triv.go wouldn't compile because it didn't use the new
FileSystem interface.
This was discussed on golang-nuts on July 7.
https://groups.google.com/forum/#!topic/golang-nuts/NMhZk3Ft_Vc

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

13 years agoexp/template: better template invocation
Rob Pike [Sat, 9 Jul 2011 21:32:01 +0000 (07:32 +1000)]
exp/template: better template invocation
1) Make the value optional ({{template "foo"}})
2) Allow the template identifier to be a thing of type *Template.
The second makes it easy to drop templates in to a set dynamically
during invocation.

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

13 years agotutorial: remove all line numbers and references to them.
Rob Pike [Sat, 9 Jul 2011 13:17:38 +0000 (23:17 +1000)]
tutorial: remove all line numbers and references to them.

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

13 years agodoc/progs: gofmt -w
Mikio Hara [Sat, 9 Jul 2011 10:16:45 +0000 (20:16 +1000)]
doc/progs: gofmt -w

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

13 years agoexp/template: vars as arguments to functions and methods.
Rob Pike [Sat, 9 Jul 2011 07:11:35 +0000 (17:11 +1000)]
exp/template: vars as arguments to functions and methods.
That should be it, bugs aside.

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

13 years agoexp/template: variable evaluation.
Rob Pike [Sat, 9 Jul 2011 02:05:39 +0000 (12:05 +1000)]
exp/template: variable evaluation.
Still need to do static checking of declarations during parse.

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

13 years agoexp/template: delete upward evaluation.
Rob Pike [Fri, 8 Jul 2011 22:59:56 +0000 (08:59 +1000)]
exp/template: delete upward evaluation.
It was an ill-advised carryover from the previous template package.
Also clean up function evaluation.
Also add a Name method to Template.

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

13 years agoexp/template: forgot to allow . as a function argument
Rob Pike [Fri, 8 Jul 2011 08:25:46 +0000 (18:25 +1000)]
exp/template: forgot to allow . as a function argument

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

13 years agoexp/template: parse variables and declarations
Rob Pike [Fri, 8 Jul 2011 07:54:16 +0000 (17:54 +1000)]
exp/template: parse variables and declarations

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

13 years agoexp/template: lex variables
Rob Pike [Fri, 8 Jul 2011 07:53:55 +0000 (17:53 +1000)]
exp/template: lex variables
Variables start with'$' and are declared with ':='.

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

13 years agoexp/template: add a tree-walking example to the test.
Rob Pike [Fri, 8 Jul 2011 06:49:06 +0000 (16:49 +1000)]
exp/template: add a tree-walking example to the test.
Also fix a comment formatting glitch.

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

13 years agoexp/template: the must-have MustParse functions
Andrew Gerrand [Fri, 8 Jul 2011 06:01:32 +0000 (16:01 +1000)]
exp/template: the must-have MustParse functions

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

13 years agoexp/template: allow fields and methods to be found in parent structs.
Rob Pike [Fri, 8 Jul 2011 05:22:05 +0000 (15:22 +1000)]
exp/template: allow fields and methods to be found in parent structs.

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

13 years agotag weekly.2011-07-07
Andrew Gerrand [Fri, 8 Jul 2011 03:30:49 +0000 (13:30 +1000)]
tag weekly.2011-07-07

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

13 years agoweekly.2011-07-07 weekly.2011-07-07
Andrew Gerrand [Fri, 8 Jul 2011 03:13:38 +0000 (13:13 +1000)]
weekly.2011-07-07

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

13 years agosort: rename helpers: s/Sort// in sort.Sort[Float64s|Ints|Strings]
Andrew Gerrand [Fri, 8 Jul 2011 00:52:50 +0000 (10:52 +1000)]
sort: rename helpers: s/Sort// in sort.Sort[Float64s|Ints|Strings]

Includes 'sorthelpers' gofix and updates to tree.

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

13 years agogob: export fields in structs in the package documentation.
David Symonds [Fri, 8 Jul 2011 00:51:56 +0000 (10:51 +1000)]
gob: export fields in structs in the package documentation.

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

13 years agocgi: don't depend on CGI.pm for tests
Brad Fitzpatrick [Fri, 8 Jul 2011 00:45:28 +0000 (17:45 -0700)]
cgi: don't depend on CGI.pm for tests

CGI.pm used to be part of the Perl core,
but some distros now bundle perl-core
and perl-modules separately.

It's not worth depending on.

R=golang-dev, mattn.jp
CC=golang-dev
https://golang.org/cl/4675063

13 years agoimage/draw: add draw tests where the destination image doesn't start
Nigel Tao [Thu, 7 Jul 2011 23:54:21 +0000 (09:54 +1000)]
image/draw: add draw tests where the destination image doesn't start
at (0, 0).

Also refactor the test to use the SubImage method rather than monkeying
with an image's Pix and Rect fields.

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

13 years agocrypto/x509: prevent chain cycles in Verify
Adam Langley [Thu, 7 Jul 2011 22:06:50 +0000 (18:06 -0400)]
crypto/x509: prevent chain cycles in Verify

It's possible to include a self-signed root certificate as an
intermediate and push Verify into a loop.

I already had a test for this so I thought that it was ok, but it
turns out that the test was void because the Verisign root certificate
doesn't contain the "IsCA" flag and so it wasn't an acceptable
intermediate certificate for that reason.

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

13 years agodoc: remove ed from apt-get package list
Brad Fitzpatrick [Thu, 7 Jul 2011 20:45:13 +0000 (13:45 -0700)]
doc: remove ed from apt-get package list

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

13 years agoimage: tighten Paletted.Opaque to check only those palette entries
Nigel Tao [Thu, 7 Jul 2011 06:32:19 +0000 (16:32 +1000)]
image: tighten Paletted.Opaque to check only those palette entries
in the image, not all palette entries.

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

13 years agoos: fix documentation for FileInfo.Name.
Rob Pike [Thu, 7 Jul 2011 06:05:38 +0000 (16:05 +1000)]
os: fix documentation for FileInfo.Name.
It's the base name, not the full name.
Fixes #2047.

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

13 years agoexp/template: handle pointers and values in empty interfaces.
Rob Pike [Thu, 7 Jul 2011 04:51:35 +0000 (14:51 +1000)]
exp/template: handle pointers and values in empty interfaces.

R=golang-dev, r, mattn.jp
CC=golang-dev
https://golang.org/cl/4664064

13 years agoexp/template: change the name from 'metacharacter' to 'delimiter',
Rob Pike [Thu, 7 Jul 2011 00:56:33 +0000 (10:56 +1000)]
exp/template: change the name from 'metacharacter' to 'delimiter',
because that's what they are.
No semantic change.

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

13 years agocrypto/openpgp: fixed dangerous use of for loop variable
Gideon Jan-Wessel Redelinghuys [Thu, 7 Jul 2011 00:49:03 +0000 (10:49 +1000)]
crypto/openpgp: fixed dangerous use of for loop variable

In function readSignedMessage a pointer to for loop variable 'key' was incorrectly being assigned
to md.SignedBy. Changed so that md.SignedBy is pointing to the 'more correct' memory position.

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

13 years agoC+A: Gideon Jan-Wessel Redelinghuys
Rob Pike [Thu, 7 Jul 2011 00:46:54 +0000 (10:46 +1000)]
C+A: Gideon Jan-Wessel Redelinghuys

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

13 years agosyscall: rearrange windows code so 386 and amd64 can share files
Alex Brainman [Thu, 7 Jul 2011 00:40:45 +0000 (10:40 +1000)]
syscall: rearrange windows code so 386 and amd64 can share files

R=golang-dev, r
CC=golang-dev, vcc.163
https://golang.org/cl/4641093

13 years agoCONTRIBUTORS: add Google contributor mpvl@golang.org
Rob Pike [Thu, 7 Jul 2011 00:35:37 +0000 (10:35 +1000)]
CONTRIBUTORS: add Google contributor mpvl@golang.org

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

13 years agoexp/template: index: forgot the always last-to-arrive uintptr.
Rob Pike [Wed, 6 Jul 2011 21:00:48 +0000 (07:00 +1000)]
exp/template: index: forgot the always last-to-arrive uintptr.

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

13 years agoasn1: support T61 and UTF8 string.
Adam Langley [Wed, 6 Jul 2011 20:25:44 +0000 (16:25 -0400)]
asn1: support T61 and UTF8 string.

There is no end to the kitchen sink of string types in ASN.1.

Fixes #1953.

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

13 years agocrypto/tls: fix generate_cert.go
Adam Langley [Wed, 6 Jul 2011 20:22:21 +0000 (16:22 -0400)]
crypto/tls: fix generate_cert.go

Fixes #2030.

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

13 years agojson: fix test if rand returns 0.
Ian Lance Taylor [Wed, 6 Jul 2011 20:00:54 +0000 (13:00 -0700)]
json: fix test if rand returns 0.

Fixes test when run with gccgo using optimization, which
changes the order of the calls to rand.

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

13 years agoexp/template: index function for arrays, slices, and maps.
Rob Pike [Wed, 6 Jul 2011 12:27:06 +0000 (22:27 +1000)]
exp/template: index function for arrays, slices, and maps.

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

13 years agoexp/template: silence test noise (but add a flag to put it back)
Rob Pike [Wed, 6 Jul 2011 07:46:36 +0000 (17:46 +1000)]
exp/template: silence test noise (but add a flag to put it back)
Also delete a TODO and clean up a little evaluation code.

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

13 years agoexp/template: add a JavaScript escaper.
David Symonds [Wed, 6 Jul 2011 06:51:49 +0000 (16:51 +1000)]
exp/template: add a JavaScript escaper.

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

13 years agoexp/template: allow an empty interface value to be the target of range, etc.
Rob Pike [Wed, 6 Jul 2011 06:40:46 +0000 (16:40 +1000)]
exp/template: allow an empty interface value to be the target of range, etc.
We extract the concrete value inside.

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

13 years agoexp/template: improve error message for non-exported field.
Rob Pike [Wed, 6 Jul 2011 05:56:39 +0000 (15:56 +1000)]
exp/template: improve error message for non-exported field.

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

13 years agomaketables: update debugging data.
Rob Pike [Wed, 6 Jul 2011 05:35:23 +0000 (15:35 +1000)]
maketables: update debugging data.
This is unused in the generation of the tables, but was incorrect if we ever needed it.
Also update the reference to the document.

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

13 years agoexp/template: add missing dotNode case.
David Symonds [Wed, 6 Jul 2011 05:14:10 +0000 (15:14 +1000)]
exp/template: add missing dotNode case.

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

13 years agoexp/template: fixes and updates.
Rob Pike [Wed, 6 Jul 2011 04:46:41 +0000 (14:46 +1000)]
exp/template: fixes and updates.
- fix line numbers - forgot to update state.line during execution
- add a comment convention {{/* comment */}}
- set.Template returns the named template in the set
- set.Execute executes the named template in the set
- use a local methodByName so this package can be used with earlier release of reflect.
- use initial cap to detect exported names

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

13 years agoexp/template: remove debugging dreg.
David Symonds [Wed, 6 Jul 2011 04:18:46 +0000 (14:18 +1000)]
exp/template: remove debugging dreg.

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

13 years agohtml: parse start tags that aren't explicitly otherwise dealt with.
Yasuhiro Matsumoto [Wed, 6 Jul 2011 03:08:52 +0000 (13:08 +1000)]
html: parse start tags that aren't explicitly otherwise dealt with.

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

13 years agoexp/template: remove the need for a goroutine.
Rob Pike [Wed, 6 Jul 2011 01:02:53 +0000 (11:02 +1000)]
exp/template: remove the need for a goroutine.

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

13 years agoexp/template: remove the visibility of the token channel from the parser.
Rob Pike [Wed, 6 Jul 2011 00:13:53 +0000 (10:13 +1000)]
exp/template: remove the visibility of the token channel from the parser.

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

13 years agogc: fix %N for OGOTO nodes.
Luuk van Dijk [Tue, 5 Jul 2011 22:02:03 +0000 (00:02 +0200)]
gc: fix %N for OGOTO nodes.

6g -W crashed on any source with a goto. this fixes that.

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

13 years agoexp/template: add templates to sets; boolean logic.
Rob Pike [Tue, 5 Jul 2011 07:05:15 +0000 (17:05 +1000)]
exp/template: add templates to sets; boolean logic.

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

13 years agogodoc: ignore directories that begin with '.'
Andrew Gerrand [Tue, 5 Jul 2011 07:00:18 +0000 (17:00 +1000)]
godoc: ignore directories that begin with '.'

Fixes #2017.

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

13 years agoexp/template: statically check that functions names have been defined.
Rob Pike [Tue, 5 Jul 2011 06:02:34 +0000 (16:02 +1000)]
exp/template: statically check that functions names have been defined.

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

13 years agoos: fix build for Plan 9
Fazlul Shahriar [Tue, 5 Jul 2011 06:01:29 +0000 (16:01 +1000)]
os: fix build for Plan 9

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/4657074

13 years agoexp/template: add an html escaping function.
Rob Pike [Tue, 5 Jul 2011 05:58:54 +0000 (15:58 +1000)]
exp/template: add an html escaping function.

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

13 years agoimage: add a test for filling sub-images.
Nigel Tao [Tue, 5 Jul 2011 04:42:31 +0000 (14:42 +1000)]
image: add a test for filling sub-images.

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

13 years agoexp/template: functions
Rob Pike [Tue, 5 Jul 2011 04:23:51 +0000 (14:23 +1000)]
exp/template: functions
Add the ability to attach functions to template and template sets.
Make variadic functions and methods work.
Still to come: static checking of function names during parse.

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

13 years agodocs: fold the prog.sh scripting from makehtml into htmlgen itself.
Rob Pike [Mon, 4 Jul 2011 06:15:14 +0000 (16:15 +1000)]
docs: fold the prog.sh scripting from makehtml into htmlgen itself.
This allows us to drop some crufty scripting and provides a firmer
footing for building better tools for preparing documents with source
code inside.

Also eliminate line numbers from the examples and text.

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

13 years agogoinstall: only report successfully-installed packages to the dashboard
Andrew Gerrand [Mon, 4 Jul 2011 06:05:11 +0000 (16:05 +1000)]
goinstall: only report successfully-installed packages to the dashboard

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

13 years agoexp/template: add template sets, allowing templates to reference one another
Rob Pike [Mon, 4 Jul 2011 05:15:47 +0000 (15:15 +1000)]
exp/template: add template sets, allowing templates to reference one another

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

13 years agoexp/template: allow complex numbers, add 'with', 'define', and 'template' keywords.
Rob Pike [Mon, 4 Jul 2011 01:50:35 +0000 (11:50 +1000)]
exp/template: allow complex numbers, add 'with', 'define', and 'template' keywords.
Also simplify the handling of keywords.

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

13 years agoreflect: allow Len on String values.
Rob Pike [Mon, 4 Jul 2011 01:45:31 +0000 (11:45 +1000)]
reflect: allow Len on String values.
It's probably just an oversight that it doesn't work,
perhaps caused by analogy with Cap.

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

13 years agogo/build: evaluate symlinks before comparing path to GOPATH
Andrew Gerrand [Mon, 4 Jul 2011 00:26:03 +0000 (10:26 +1000)]
go/build: evaluate symlinks before comparing path to GOPATH

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

13 years agogodoc: search GOPATH for documentation
Andrew Gerrand [Sat, 2 Jul 2011 04:07:06 +0000 (14:07 +1000)]
godoc: search GOPATH for documentation

R=rsc, mattn.jp
CC=golang-dev
https://golang.org/cl/4627065

13 years agogoinstall: documentation for new remote repository behavior and tweaks
Andrew Gerrand [Sat, 2 Jul 2011 04:05:43 +0000 (14:05 +1000)]
goinstall: documentation for new remote repository behavior and tweaks

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

13 years agodashboard: show build state and package comments on dashboard
Andrew Gerrand [Sat, 2 Jul 2011 04:02:42 +0000 (14:02 +1000)]
dashboard: show build state and package comments on dashboard

This permits full URLs to be shown on the dashboard,
not just the repository roots.

This has been tested.

R=rsc, mattn.jp
CC=golang-dev
https://golang.org/cl/4627081

13 years agocrypto/openpgp: add ability to reserialize keys.
Adam Langley [Fri, 1 Jul 2011 17:53:12 +0000 (13:53 -0400)]
crypto/openpgp: add ability to reserialize keys.

This changes Signature so that parsed signatures can be reserialized
exactly. With this ability we can add Serialize to Entity and also the
ability to sign other public keys.

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

13 years agocsv: new package
Paul Borman [Fri, 1 Jul 2011 16:16:56 +0000 (12:16 -0400)]
csv: new package

csv reader/writer based on RFC 4180

R=rsc, mattn.jp, r, dchest
CC=golang-dev
https://golang.org/cl/4629085

13 years agoCONTRIBUTORS: add Paul Borman (Google CLA)
Russ Cox [Fri, 1 Jul 2011 16:09:53 +0000 (12:09 -0400)]
CONTRIBUTORS: add Paul Borman (Google CLA)

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

13 years ago5c, 6c: fix build
Russ Cox [Fri, 1 Jul 2011 15:13:38 +0000 (11:13 -0400)]
5c, 6c: fix build

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