]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
12 years ago[release-branch.r60] doc: update release.r60.1 notes release.r60.1
Andrew Gerrand [Mon, 19 Sep 2011 02:32:07 +0000 (12:32 +1000)]
[release-branch.r60] doc: update release.r60.1 notes

««« CL 5045045 / d101b482f64e
doc: update release.r60.1 notes

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

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

12 years ago[release-branch.r60] json: add struct tag option to wrap literals in strings
Andrew Gerrand [Mon, 19 Sep 2011 01:59:19 +0000 (11:59 +1000)]
[release-branch.r60] json: add struct tag option to wrap literals in strings

««« CL 4918051 / ba6daf799367
json: add struct tag option to wrap literals in strings

Since JavaScript doesn't have [u]int64 types, some JSON APIs
encode such types as strings to avoid losing precision.

This adds a new struct tag option ",string" to cause
fields to be wrapped in JSON strings on encoding
and unwrapped from strings when decoding.

R=rsc, gustavo
CC=golang-dev
https://golang.org/cl/4918051
»»»

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

12 years ago[release-branch.r60] json: fix decode bug with struct tag names with ,opts being...
Andrew Gerrand [Mon, 19 Sep 2011 01:54:29 +0000 (11:54 +1000)]
[release-branch.r60] json: fix decode bug with struct tag names with ,opts being ignored

««« CL 4965049 / f8e4df3c4048
json: fix decode bug with struct tag names with ,opts being ignored

When the encoder was updated to respect the ",omitempty"
struct tag options, the decoder half was never updated to know
about the new struct tag format. (the format is now an optional
name, followed by zero or more ",option" strings)

This only affected people who used ",omitempty" along with
a field name. In that case, the serialized JSON wouldn't
decode to the original value.

R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/4965049
»»»

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

12 years ago[release-branch.r60] doc: release.r60.1
Andrew Gerrand [Thu, 15 Sep 2011 11:32:34 +0000 (21:32 +1000)]
[release-branch.r60] doc: release.r60.1

««« CL 5002041 / d21944c38c39
doc: release.r60.1

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

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

12 years ago[release-branch.r60] doc: link to notable blog posts
Andrew Gerrand [Tue, 13 Sep 2011 04:52:58 +0000 (14:52 +1000)]
[release-branch.r60] doc: link to notable blog posts

««« CL 4996041 / f6fdb6a54203
doc: link to notable blog posts

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

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

12 years ago[release-branch.r60] misc/goplay: another template fix
Andrew Gerrand [Tue, 13 Sep 2011 04:45:37 +0000 (14:45 +1000)]
[release-branch.r60] misc/goplay: another template fix

««« CL 4950063 / 775543b0795c
misc/goplay: another template fix

Fixes #2219.

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

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

12 years ago[release-branch.r60] misc/goplay: Fix template output
Andrew Gerrand [Tue, 13 Sep 2011 04:43:18 +0000 (14:43 +1000)]
[release-branch.r60] misc/goplay: Fix template output

««« CL 4960052 / da491846e511
misc/goplay: Fix template output

Fixes #2219.

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

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

12 years ago[release-branch.r60] ld: grow dwarf includestack on demand.
Andrew Gerrand [Mon, 12 Sep 2011 00:20:04 +0000 (10:20 +1000)]
[release-branch.r60] ld: grow dwarf includestack on demand.

««« CL 4988048 / c0abe3f34cec
ld: grow dwarf includestack on demand.

Fixes #2241
while not breaking issue 1878 again.

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

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

12 years ago[release-branch.r60] doc: release.r60 release.r60
Andrew Gerrand [Thu, 8 Sep 2011 02:16:42 +0000 (12:16 +1000)]
[release-branch.r60] doc: release.r60

««« CL 4981047 / c0fea223bc90
doc: release.r60

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

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

12 years ago[release-branch.r60] template: indirect or dereference function arguments if necessar...
Andrew Gerrand [Thu, 8 Sep 2011 01:15:38 +0000 (11:15 +1000)]
[release-branch.r60] template: indirect or dereference function arguments if necessary to match the type of the formal.

««« CL 4967056 / a163a464ef59
template: indirect or dereference function arguments if necessary to match the type of the formal.
Fixes #2235

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

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

12 years ago[release-branch.r60] template: fix deadlock.
Andrew Gerrand [Thu, 8 Sep 2011 01:12:11 +0000 (11:12 +1000)]
[release-branch.r60] template: fix deadlock.

««« CL 4963054 / c581abafc917
template: fix deadlock.
No need for lexInsideAction to loop.
Fixes #2217.

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

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

12 years ago[release-branch.r60] template: range over channel
Andrew Gerrand [Thu, 8 Sep 2011 01:06:22 +0000 (11:06 +1000)]
[release-branch.r60] template: range over channel

««« CL 4951046 / 379452c085ab
template: range over channel

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

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

12 years ago[release-branch.r60] template: Grammar fix for template documentation.
Andrew Gerrand [Thu, 8 Sep 2011 01:02:39 +0000 (11:02 +1000)]
[release-branch.r60] template: Grammar fix for template documentation.

««« CL 4944043 / 6577cd4b870f
template: Grammar fix for template documentation.

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

»»»

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

12 years ago[release-branch.r60] exp/template: remove else and end nodes from public view.
Andrew Gerrand [Thu, 8 Sep 2011 00:59:11 +0000 (10:59 +1000)]
[release-branch.r60] exp/template: remove else and end nodes from public view.

««« CL 4905052 / 508513bbf607
exp/template: remove else and end nodes from public view.
They are used internally and do not appear in the final parse tree.

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

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

12 years ago[release-branch.r60] gc: fix pc/line table
Andrew Gerrand [Thu, 8 Sep 2011 00:55:54 +0000 (10:55 +1000)]
[release-branch.r60] gc: fix pc/line table

««« CL 4938042 / 5671737303a0
gc: fix pc/line table

When a line directive was encountered we would push a new 'z' entry into
the history to indicate the start of new file attributation, and a 'Z'
entry to change line numbering.  However we didn't pop the 'z' entry, so
we were actually corrupting the history stack.  The most obvious
occurance of this was in the code that build the symbol tables for the
DWARF information - where an internal stack in the linker would overflow
when more than a few line directives were encountered in a single stack
(Issue 1878).  So now we pop the 'z' entry when we encounter the end of
the file that the directive was in, which maintains the history stack
integrity.

Also, although new 'z' entries for new files had relative paths
expanded, the same was not done for line directives.  Now we do it for
line directives also - so that the now correct DWARF information has the
full path available.

Fixes #1878.

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

»»»

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

12 years ago[release-branch.r60] gofix: do not convert url in field names
Andrew Gerrand [Thu, 8 Sep 2011 00:52:28 +0000 (10:52 +1000)]
[release-branch.r60] gofix: do not convert url in field names

««« CL 4972052 / 0f7a647510f9
gofix: do not convert url in field names

There's some ambiguity in the U{url: url} case as it could be
both a map or a struct literal, but given context it's more
likely a struct, so U{url: url_} rather than U{url_: url_}.
At least that was the case for me.

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

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

12 years ago[release-branch.r60] gofix: forgot to rename the URL type
Andrew Gerrand [Thu, 8 Sep 2011 00:51:09 +0000 (10:51 +1000)]
[release-branch.r60] gofix: forgot to rename the URL type

««« CL 4952041 / c51a2f3f897a
gofix: forgot to rename the URL type
Fixes #2182

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

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

12 years ago[release-branch.r60] gofix: osopen: fixed=true when changing O_CREAT
Andrew Gerrand [Thu, 8 Sep 2011 00:49:40 +0000 (10:49 +1000)]
[release-branch.r60] gofix: osopen: fixed=true when changing O_CREAT

««« CL 4921047 / 15cefddbe963
gofix: osopen: fixed=true when changing O_CREAT

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

»»»

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

12 years ago[release-branch.r60] goinstall: select the tag that is closest to runtime.Version
Andrew Gerrand [Thu, 8 Sep 2011 00:48:19 +0000 (10:48 +1000)]
[release-branch.r60] goinstall: select the tag that is closest to runtime.Version

««« CL 4873057 / db63f3a1f992
goinstall: select the tag that is closest to runtime.Version

release.r50 looks for newest tag <= go.r50
weekly.2010-10-10 looks for newest tag <= go.2010-10-10

Implements behavior for hg, git, and bzr.

R=dsymonds, rsc, n13m3y3r
CC=golang-dev
https://golang.org/cl/4873057
»»»

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

12 years ago[release-branch.r60] goinstall: report lack of $GOPATH on errors
Andrew Gerrand [Thu, 8 Sep 2011 00:45:04 +0000 (10:45 +1000)]
[release-branch.r60] goinstall: report lack of $GOPATH on errors

««« CL 4929047 / 7bfbbfb1ad42
goinstall: report lack of $GOPATH on errors

Fixes #2175.

R=alex.brainman, rsc, gustavo, adg
CC=golang-dev
https://golang.org/cl/4929047
»»»

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

12 years ago[release-branch.r60] goinstall: error out with paths that end with '/'
Andrew Gerrand [Thu, 8 Sep 2011 00:43:40 +0000 (10:43 +1000)]
[release-branch.r60] goinstall: error out with paths that end with '/'

««« CL 4807048 / ae3b2b092cf7
goinstall: error out with paths that end with '/'

R=adg, rsc, tarmigan+golang
CC=golang-dev
https://golang.org/cl/4807048

»»»

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

12 years agocreate release-branch.r60
Andrew Gerrand [Thu, 8 Sep 2011 00:39:39 +0000 (10:39 +1000)]
create release-branch.r60

12 years agoweekly.2011-08-17 weekly.2011-08-17
Andrew Gerrand [Thu, 18 Aug 2011 04:27:08 +0000 (14:27 +1000)]
weekly.2011-08-17

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

12 years agogofix: walk names in ValueSpecs
Rob Pike [Thu, 18 Aug 2011 03:48:44 +0000 (13:48 +1000)]
gofix: walk names in ValueSpecs

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

12 years agotest/chan/select5.go: change "with" to "if" in templatea
Rob Pike [Thu, 18 Aug 2011 03:27:18 +0000 (13:27 +1000)]
test/chan/select5.go: change "with" to "if" in templatea

I converted this program yesterday and the output is the
same as it used to be, ignoring space, but the result is
not the best expression of the algorithm.  The old {.section
Maybe} pieces are now {{with .Maybe}}, as a direct translation,
but I they should be {{if .Maybe}} as the output is just a
bool and there is no cascading.

I have verified that the output of the program is unaffected.

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

12 years agomisc/vim: command complete using autoload helper function.
Yasuhiro Matsumoto [Thu, 18 Aug 2011 01:50:55 +0000 (11:50 +1000)]
misc/vim: command complete using autoload helper function.

R=golang-dev, dsymonds, jnwhiteh, n13m3y3r, gustavo
CC=golang-dev
https://golang.org/cl/4837051

12 years agohttp: remove a TODO due to new behavior of nil maps
Rob Pike [Thu, 18 Aug 2011 01:01:43 +0000 (11:01 +1000)]
http: remove a TODO due to new behavior of nil maps

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

12 years agoexp/template/html: defines a parse context for a subset of HTML.
Mike Samuel [Thu, 18 Aug 2011 00:40:29 +0000 (10:40 +1000)]
exp/template/html: defines a parse context for a subset of HTML.

This defines just enough context to distinguish HTML URI attributes
from parsed character data.

It does not affect any public module API as I thought I would get
early comment on style for defining enumerations and tables.

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

12 years agodoc/codelab: use new template package
Andrew Gerrand [Thu, 18 Aug 2011 00:38:08 +0000 (10:38 +1000)]
doc/codelab: use new template package

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

12 years agogodoc: template cleanup
Robert Griesemer [Wed, 17 Aug 2011 23:38:58 +0000 (16:38 -0700)]
godoc: template cleanup

Use naming convention for template variables
to indicate "escaped-ness" for easier reviewing.
(per suggestion from bradfitz)

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

12 years agotest: new nil semantics
Russ Cox [Wed, 17 Aug 2011 19:55:06 +0000 (15:55 -0400)]
test: new nil semantics

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

12 years agogc: implement nil chan support
Russ Cox [Wed, 17 Aug 2011 19:54:17 +0000 (15:54 -0400)]
gc: implement nil chan support

The spec has defined nil chans this way for months.
I'm behind.

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

12 years agogc: implement nil map support
Russ Cox [Wed, 17 Aug 2011 18:56:27 +0000 (14:56 -0400)]
gc: implement nil map support

The spec has defined nil maps this way for months.
I'm behind.

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

12 years agogc: fix mkbuiltin
Russ Cox [Wed, 17 Aug 2011 18:54:51 +0000 (14:54 -0400)]
gc: fix mkbuiltin

Broken by Plan 9 changes.

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

12 years agogo/parser: disallow for statements w/ illegal range clauses
Robert Griesemer [Wed, 17 Aug 2011 17:45:30 +0000 (10:45 -0700)]
go/parser: disallow for statements w/ illegal range clauses

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

12 years agonet: Plan 9 support
Fazlul Shahriar [Wed, 17 Aug 2011 17:28:29 +0000 (13:28 -0400)]
net: Plan 9 support

All tests enabled by default passes except those in timeout_test.go.

For TestLookupPort, add an entry for "bootps" in /lib/ndb/common
(Plan 9 calls it "bootp"). I've sent out a patch to fix this.

R=paulzhol, rsc, mikioh.mikioh
CC=ality, golang-dev
https://golang.org/cl/4779041

12 years agogo/parser: do not accept type literals where not permitted in general
Robert Griesemer [Wed, 17 Aug 2011 17:27:32 +0000 (10:27 -0700)]
go/parser: do not accept type literals where not permitted in general

- Resolves a long-standing TODO.
- Replacement for CL 4908042 by befelemepeseveze@gmail.com

Fixes #2155.

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

12 years agoxml: escape string chardata in xml.Marshal
Kyle Lemons [Wed, 17 Aug 2011 16:12:08 +0000 (12:12 -0400)]
xml: escape string chardata in xml.Marshal

Fixes #2150.

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

12 years agoasn1: add support for unmarshalling structs with int32 members
Dave Cheney [Wed, 17 Aug 2011 16:12:01 +0000 (12:12 -0400)]
asn1: add support for unmarshalling structs with int32 members

Also improve error message for unsupported integer types

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

12 years agoexp/norm: implementation of decomposition and composing functionality.
Marcel van Lohuizen [Wed, 17 Aug 2011 08:12:39 +0000 (18:12 +1000)]
exp/norm: implementation of decomposition and composing functionality.
forminfo.go:
- Wrappers for table data.
- Per Form dispatch table.
composition.go:
- reorderBuffer type.  Implements decomposition, reordering, and composition.
- Note: decompose and decomposeString fields in formInfo could be replaced by
  a pointer to the trie for the respective form.  The proposed design makes
  testing easier, though.
normalization.go:
- Temporarily added panic("not implemented") methods to make the tests run.
  These will be removed again with the next CL, which will introduce the
  implementation.

R=r, rogpeppe, mpvl, rsc
CC=golang-dev
https://golang.org/cl/4875043

12 years agotest/chan/select5.go: update to new templates
Rob Pike [Wed, 17 Aug 2011 06:51:04 +0000 (16:51 +1000)]
test/chan/select5.go: update to new templates

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

12 years agoexp/template/html: rework Reverse(*Template) to do naive autoescaping
Mike Samuel [Wed, 17 Aug 2011 06:00:02 +0000 (16:00 +1000)]
exp/template/html: rework Reverse(*Template) to do naive autoescaping

Replaces the toy func Reverse(*Template) with one that implements
naive autoescaping.

Now Escape(*Template) walks a template parse tree to find all
template actions and adds the |html command to them if it is not
already present.

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

12 years agodoc/codewalk: new Markov chain codewalk
Andrew Gerrand [Wed, 17 Aug 2011 05:53:17 +0000 (15:53 +1000)]
doc/codewalk: new Markov chain codewalk

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

12 years agotemplate: move exp/template into template.
Rob Pike [Wed, 17 Aug 2011 04:55:57 +0000 (14:55 +1000)]
template: move exp/template into template.
(Leave exp/template/html where it is for now.)

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

12 years agotemplate: delete old template code.
Rob Pike [Wed, 17 Aug 2011 04:34:48 +0000 (14:34 +1000)]
template: delete old template code.
It's already in old/template; make that build.
Update a couple of references to point to the old template.
They can be updated later.
Update goplay to use exp/template.

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

12 years agomisc: fix a couple of template uses preparatory to the big switch.
Rob Pike [Wed, 17 Aug 2011 03:57:06 +0000 (13:57 +1000)]
misc: fix a couple of template uses preparatory to the big switch.

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

12 years agourl: new package
Rob Pike [Wed, 17 Aug 2011 03:36:02 +0000 (13:36 +1000)]
url: new package
This is just moving the URL code from package http into its own package,
which has been planned for a while.
Besides clarity, this also breaks a nascent dependency cycle the new template
package was about to introduce.

Add a gofix module, url, and use it to generate changes outside http and url.

Sadness about the churn, gladness about some of the naming improvements.

R=dsymonds, bradfitz, rsc, gustavo, r
CC=golang-dev
https://golang.org/cl/4893043

12 years agonet: Added function SetTimeout() to interface Listener.
Aleksandar Dezelin [Tue, 16 Aug 2011 22:36:51 +0000 (18:36 -0400)]
net: Added function SetTimeout() to interface Listener.
Fixes #2148.

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

12 years agogo/parser: use correct precedence when parsing range clauses
Robert Griesemer [Tue, 16 Aug 2011 22:19:23 +0000 (15:19 -0700)]
go/parser: use correct precedence when parsing range clauses

Fixes #2156.

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

12 years agoA+C: Aleksandar Dezelin (individual CLA)
Russ Cox [Tue, 16 Aug 2011 22:15:36 +0000 (18:15 -0400)]
A+C: Aleksandar Dezelin (individual CLA)

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

12 years agonet: add multicast stubs for openbsd
Joel Sing [Tue, 16 Aug 2011 21:28:16 +0000 (17:28 -0400)]
net: add multicast stubs for openbsd

Add multicast stubs and sync with recent changes.

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

12 years agonet, syscall: move multicast address handling
Joel Sing [Tue, 16 Aug 2011 21:26:51 +0000 (17:26 -0400)]
net, syscall: move multicast address handling

Multicast address handling is not consistent across all BSDs. Move
the multicast address handling code into OS dependent files. This
will be needed for OpenBSD support.

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

12 years agonet: return correct local address for an accepted TCP connection
Mikio Hara [Tue, 16 Aug 2011 20:53:09 +0000 (16:53 -0400)]
net: return correct local address for an accepted TCP connection

Fixes #2127.

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

12 years agoruntime: fix GC bitmap corruption
Dmitriy Vyukov [Tue, 16 Aug 2011 20:53:02 +0000 (16:53 -0400)]
runtime: fix GC bitmap corruption
The corruption can occur when GOMAXPROCS
is changed from >1 to 1, since GOMAXPROCS=1
does not imply there is only 1 goroutine running,
other goroutines can still be not parked after
the change.

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

12 years agocgo: omit duplicate symbols in writeDefs
Julian Phillips [Tue, 16 Aug 2011 18:56:23 +0000 (14:56 -0400)]
cgo: omit duplicate symbols in writeDefs

When the C API being used includes multiple names for the same
underlying symbol (e.g. multiple #define's for the same variable), then
cgo will generate the same placeholder variables for each name.  This
then prevents the code from compiling due to multiple declarations of
the same variable - so change cgo to only create one instance of the
variable for the underlying symbol.

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

12 years ago5l, 6l, 8l: add varargck for %Z
Lucio De Re [Tue, 16 Aug 2011 18:22:12 +0000 (14:22 -0400)]
5l, 6l, 8l: add varargck for %Z

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

12 years ago5c, 6c, 6l: fix Plan 9 build warnings
Lucio De Re [Tue, 16 Aug 2011 18:22:08 +0000 (14:22 -0400)]
5c, 6c, 6l: fix Plan 9 build warnings

src/cmd/5c/reg.c:
. Added USED() attribute.

src/cmd/6c/cgen.c:
. Revised code around "REGARG" to resemble use in "8c" and
  consequently remove a warning.

src/cmd/6l/asm.c:
. Added USED() attributes.
. Removed an unnecessary assignment.

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

12 years agold: make addaddrplus4 static
Lucio De Re [Tue, 16 Aug 2011 18:22:02 +0000 (14:22 -0400)]
ld: make addaddrplus4 static

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

12 years agoerrchk: allow multiple patterns
Russ Cox [Tue, 16 Aug 2011 15:14:26 +0000 (11:14 -0400)]
errchk: allow multiple patterns

// ERROR "pattern1" "pattern2"

means that there has to be one or more
lines matching pattern1 and then excluding
those, there have to be one or more lines
matching pattern2.  So if you expect two
different error messages from a particular
line, writing two separate patterns checks
that both errors are produced.

Also, errchk now flags lines that produce
more errors than expected.  Before, as long as
at least one error matched the pattern, all the
others were ignored.

Revise tests to expect or silence these
additional errors.

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

12 years agorpc: make Server.Mutex unexported
Dmitriy Vyukov [Tue, 16 Aug 2011 08:34:56 +0000 (18:34 +1000)]
rpc: make Server.Mutex unexported
Currently it's possible to write:
var s rpc.Server
...
// reuse for my own purposes
s.Lock()
...
s.Unlock()
which is seemingly not intended.

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

12 years agosyscall: make LazyDLL/LazyProc.Mutex unexported
Dmitriy Vyukov [Tue, 16 Aug 2011 08:33:48 +0000 (18:33 +1000)]
syscall: make LazyDLL/LazyProc.Mutex unexported
They are seemingly not intended to be a part
of the public interface.

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

12 years agobuiltin: correct description of a closed channel.
Rob Pike [Tue, 16 Aug 2011 06:03:30 +0000 (16:03 +1000)]
builtin: correct description of a closed channel.

R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/4896046

12 years agobuiltin: tweak a couple of descriptions.
Rob Pike [Tue, 16 Aug 2011 05:24:00 +0000 (15:24 +1000)]
builtin: tweak a couple of descriptions.

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

12 years agogodoc: show all top-level decls for (fake) package builtin
Robert Griesemer [Tue, 16 Aug 2011 02:05:52 +0000 (19:05 -0700)]
godoc: show all top-level decls for (fake) package builtin

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

12 years agogodoc: fix lib/godoc/package.txt template
Robert Griesemer [Mon, 15 Aug 2011 22:42:27 +0000 (15:42 -0700)]
godoc: fix lib/godoc/package.txt template

- show documentation in text mode; e.g.:
http://localhost:7777/cmd/godoc/?f=text

- simplify template by using $ variable

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

12 years agogodoc: fix escaping in templates
Robert Griesemer [Mon, 15 Aug 2011 22:15:54 +0000 (15:15 -0700)]
godoc: fix escaping in templates

- HTML-escape URL paths
- URL-escape URL parameters

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

12 years agorpc: implement ServeRequest to synchronously serve a single request.
Sugu Sougoumarane [Mon, 15 Aug 2011 22:06:22 +0000 (08:06 +1000)]
rpc: implement ServeRequest to synchronously serve a single request.

This is useful for applications that want to micromanage the rpc service.
Moved part of ServeCodec into a new readRequest function.
Renamed existing readRequest to readRequestHeader, and reordered
its parameters to align with the new readRequest and service.call.

R=golang-dev, r, rsc, sougou
CC=golang-dev, msolomon
https://golang.org/cl/4889043

12 years agobuiltin: add documentation for builtins
Rob Pike [Mon, 15 Aug 2011 21:51:44 +0000 (07:51 +1000)]
builtin: add documentation for builtins
Do this by adding a fake package called builtin. At the moment, godoc will
not present this documentation because the function names are all lower case,
but there are plans to address this.
The print and println functions are undocumented here. I could be talked
into doing them but I'd rather not promote their use.

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

12 years agobuild: don't print anything on version.bash -save
Gustavo Niemeyer [Mon, 15 Aug 2011 17:25:54 +0000 (14:25 -0300)]
build: don't print anything on version.bash -save

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

12 years agobuild: support versioning without hg
Gustavo Niemeyer [Mon, 15 Aug 2011 17:19:30 +0000 (14:19 -0300)]
build: support versioning without hg

CL 4873048 introduced the ability to build without hg and
getting an "unknown" version.  While this approach works
to avoid the hg dependency, it also means that every
exported tree that is built without hg or .hg will have not
only missing information, but will also be compatible to
one another.  Considering that it is a common practice to
remove the VCS data in distributions, I suggest we don't
take this approach to avoid its consequences.

This CL fixes the same problem in a different way: if a
VERSION file at the top of the tree exists, use it at
all times.  If it doesn't, fall back to using information
from hg necessarily, and fail if that's not possible.  The
error message when VERSION and hg are not available
instructs users to handle it properly.

The VERSION file can be generated with
"src/version.bash -save" while hg is still around.

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

12 years agoreflect: panic on Invalid Interface call
Gustavo Niemeyer [Mon, 15 Aug 2011 17:14:15 +0000 (14:14 -0300)]
reflect: panic on Invalid Interface call

This was initially pushed as part of CL 4876046, found
when logic in exp/template was using the method on
an Invalid value.

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

12 years agobuild: don't require hg for build
Andrew Gerrand [Mon, 15 Aug 2011 11:19:07 +0000 (21:19 +1000)]
build: don't require hg for build

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

12 years agoruntime: fix pseudo-randomness on some selects
Gustavo Niemeyer [Mon, 15 Aug 2011 06:51:51 +0000 (03:51 -0300)]
runtime: fix pseudo-randomness on some selects

Fixes #2152.

R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/4888044

12 years agoold/template: copy code from template
Rob Pike [Mon, 15 Aug 2011 05:16:57 +0000 (15:16 +1000)]
old/template: copy code from template
First step of moving exp/template into template: save the old code.
Code is unedited except for target name in Makefile.

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

12 years agoexp/template: support field syntax on maps
Gustavo Niemeyer [Mon, 15 Aug 2011 03:56:01 +0000 (00:56 -0300)]
exp/template: support field syntax on maps

While using exp/template in practice, the syntax for
indexing values using the "index" action was found to be
very inconvenient for frequent use when handling dynamic
data from maps such as the ones used with json and yaml,
that use a type like map[string]interface{}.

For these kinds of maps, the default handling of fields as
{{.Field}} makes the task of handling the several references
significantly more pleasant and elegant, and is equivalent
to what's currently done in the "template" package and in
other external packages (e.g. mustache).

Even with this change, the index action is still relevant
as it allows indexing maps in other scenarios where keys
wouldn't be valid field names.

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

12 years agoexp/template: don't panic on range of nil interface
Gustavo Niemeyer [Mon, 15 Aug 2011 03:22:28 +0000 (00:22 -0300)]
exp/template: don't panic on range of nil interface

This avoids a non-obvious panic when range is used on a
nil interface, and fixes it by behaving as if the range
was empty.

The new behavior is equivalent to the outcome of iterating
on a nil map or slice, and is useful because it allows
generic structures such as used in json (map[string]interface{})
to behave correctly if a key generally set to a list or map
isn't present.

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

12 years agoexp/norm: fix incorrect prints found by govet.
Robert Hencke [Sun, 14 Aug 2011 04:02:48 +0000 (14:02 +1000)]
exp/norm: fix incorrect prints found by govet.

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

12 years agogoinstall: report all newly-installed public packages
Andrew Gerrand [Sun, 14 Aug 2011 00:52:20 +0000 (10:52 +1000)]
goinstall: report all newly-installed public packages

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

12 years agoC: add Sugu Sougoumarane, Googler.
Rob Pike [Sat, 13 Aug 2011 23:35:01 +0000 (09:35 +1000)]
C: add Sugu Sougoumarane, Googler.

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

12 years agogodoc: fix godoc.html template bug: correctly display package roots
Andrew Gerrand [Sat, 13 Aug 2011 22:56:47 +0000 (08:56 +1000)]
godoc: fix godoc.html template bug: correctly display package roots

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

12 years agoexp/template: rename filter: url -> urlquery.
David Symonds [Sat, 13 Aug 2011 04:00:16 +0000 (14:00 +1000)]
exp/template: rename filter: url -> urlquery.

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

12 years agogodoc: position URLs (containing file names) must be quoted and URL escaped
Robert Griesemer [Fri, 12 Aug 2011 23:28:55 +0000 (16:28 -0700)]
godoc: position URLs (containing file names) must be quoted and URL escaped

Since the posLink_url also adds a non-URL attribute, the quoting and  URL-escaping
must happen inside posLink_url (otherwise the non-URL attribute becomes part or the
URL portion of the tag.

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

12 years agogodoc: remove last vestiges of old template system
Robert Griesemer [Fri, 12 Aug 2011 22:43:10 +0000 (15:43 -0700)]
godoc: remove last vestiges of old template system

- rename template funcs for better consistency and
  sort them into groups of related functionality
- try to be more consistent with html vs url escaping

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

12 years agogodoc: first round of template cleanups
Robert Griesemer [Fri, 12 Aug 2011 17:06:32 +0000 (10:06 -0700)]
godoc: first round of template cleanups

- simplified pipelines
- simplified templates by using template variables
- converted most old-style formatters into new-style funcs
- fixed some escaping bugs (use of url escaping where it was missing)

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

12 years agoexp/norm: generate trie struct in triegen.go for better encapsulation.
Marcel van Lohuizen [Fri, 12 Aug 2011 16:00:31 +0000 (18:00 +0200)]
exp/norm: generate trie struct in triegen.go for better encapsulation.

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

12 years agoexp/norm: generate trie struct in triegen.go for better encapsulation.
Marcel van Lohuizen [Fri, 12 Aug 2011 15:44:14 +0000 (17:44 +0200)]
exp/norm: generate trie struct in triegen.go for better encapsulation.

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

12 years agolib/godoc: fix typo
Mikio Hara [Fri, 12 Aug 2011 12:42:42 +0000 (22:42 +1000)]
lib/godoc: fix typo

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

12 years agocrypto, exec, path, time: add support for OpenBSD
Joel Sing [Fri, 12 Aug 2011 04:44:16 +0000 (14:44 +1000)]
crypto, exec, path, time: add support for OpenBSD

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

12 years agoexp/template/html: New package with a toy template transformation.
Mike Samuel [Fri, 12 Aug 2011 04:34:29 +0000 (14:34 +1000)]
exp/template/html: New package with a toy template transformation.

func Reverse(*Template) *Template
returns a template that produces the reverse of the original
for any input.

Changes outside exp/template/html include:
- Adding a getter for a template's FuncMap so that derived templates
  can inherit function definitions.
- Exported one node factory function, newIdentifier.
  Deriving tempaltes requires constructing new nodes, but I didn't
  export all of them because I think shallow copy functions might
  be more useful for this kind of work.
- Bugfix: Template's Name() method ignores the name field so
  template.New("foo") is a nil dereference instead of "foo".

Caveats: Reverse is a toy.  It is not UTF-8 safe, and does not
preserve order of calls to funcs in FuncMap.

For context, see http://groups.google.com/group/golang-nuts/browse_thread/thread/e8bc7c771aae3f20/b1ac41dc6f609b6e?lnk=gst

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

12 years agoCLA: Add Mike Samuel, Googler.
Rob Pike [Fri, 12 Aug 2011 04:31:12 +0000 (14:31 +1000)]
CLA: Add Mike Samuel, Googler.

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

12 years agoexp/template: fix implementation of printValue.
David Symonds [Fri, 12 Aug 2011 03:29:56 +0000 (13:29 +1000)]
exp/template: fix implementation of printValue.

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

12 years agoutf8: rename some internal constants to remove leading underscores.
Rob Pike [Fri, 12 Aug 2011 01:50:46 +0000 (11:50 +1000)]
utf8: rename some internal constants to remove leading underscores.
How quaint.

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

12 years agoexp/template: add builtin len function
Rob Pike [Fri, 12 Aug 2011 01:47:44 +0000 (11:47 +1000)]
exp/template: add builtin len function

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

12 years agogodoc: moving to new template package
Robert Griesemer [Thu, 11 Aug 2011 20:24:13 +0000 (13:24 -0700)]
godoc: moving to new template package

- first step; rough conversion of all template files
- there is plenty of opportunity for cleanups/simplifications (next CLs)
- html and text output as before

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

12 years agohtml: parse more malformed tags.
Nigel Tao [Thu, 11 Aug 2011 08:49:09 +0000 (18:49 +1000)]
html: parse more malformed tags.

This continues the work in revision 914a659b44ff, now passing more test
cases. As before, the new tokenization tests match html5lib's behavior.

Fixes #2124.

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

12 years agoexp/template: find the String method by taking the address if we need to.
Rob Pike [Thu, 11 Aug 2011 04:36:51 +0000 (14:36 +1000)]
exp/template: find the String method by taking the address if we need to.
Also simplify nil handling in printing.

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

12 years agoexp/template: rename Parse*File and Parse*Files for clarity
Gustavo Niemeyer [Thu, 11 Aug 2011 04:28:48 +0000 (23:28 -0500)]
exp/template: rename Parse*File and Parse*Files for clarity

IMPORTANT: Previous usage of *Files will continue to compile
fine but misbehave since the interface is compatible.

The following functions have been renamed:

    ParseFiles => ParseGlob
    ParseFile => ParseFiles
    ParseSetFiles => ParseSetGlob
    ParseSetFile => ParseSetFiles
    ParseTemplateFiles => ParseTemplateGlob
    ParseTemplateFile => ParseTemplateFiles

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

12 years agoruntime: better checks for syscall.NewCallback parameter
Alex Brainman [Thu, 11 Aug 2011 02:23:55 +0000 (12:23 +1000)]
runtime: better checks for syscall.NewCallback parameter

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

12 years agocodereview: set status while committing CL
Russ Cox [Thu, 11 Aug 2011 01:36:59 +0000 (21:36 -0400)]
codereview: set status while committing CL

Not sure how to detect read-only but at least
this pins the blame on the hg server.

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

12 years agobuild: allow builds without cgo
Russ Cox [Thu, 11 Aug 2011 01:36:48 +0000 (21:36 -0400)]
build: allow builds without cgo

R=bradfitz, dsymonds, fshahriar
CC=golang-dev
https://golang.org/cl/4859043