]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agotest: test of goto restrictions
Russ Cox [Mon, 20 Jun 2011 18:06:00 +0000 (14:06 -0400)]
test: test of goto restrictions

R=gri, iant, bradfitz, fvbommel, r
CC=golang-dev
https://golang.org/cl/4652041

13 years agohttp: fix req.Cookie(name) with cookies in one header
Brad Fitzpatrick [Mon, 20 Jun 2011 17:33:07 +0000 (10:33 -0700)]
http: fix req.Cookie(name) with cookies in one header

Fixes #1974

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

13 years agomime: fix RFC references
Pascal S. de Kloe [Mon, 20 Jun 2011 14:41:18 +0000 (07:41 -0700)]
mime: fix RFC references

R=golang-dev, bradfitz
CC=brad fitzpatrick <bradfitz, golang-dev
https://golang.org/cl/4634063

13 years agobuild: exclude packages that fail on Plan 9 (for now)
Anthony Martin [Mon, 20 Jun 2011 12:23:43 +0000 (22:23 +1000)]
build: exclude packages that fail on Plan 9 (for now)

All but two packages depend on net:
        debug/proc
        os/signal

With this change, we can produce
a working build with GOOS=plan9.

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

13 years agogoinstall: update doc.go
Andrew Gerrand [Mon, 20 Jun 2011 06:39:16 +0000 (16:39 +1000)]
goinstall: update doc.go

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

13 years agomisc/godashboard: Accept sub-directories for goinstall's report.
Yasuhiro Matsumoto [Mon, 20 Jun 2011 04:46:32 +0000 (14:46 +1000)]
misc/godashboard: Accept sub-directories for goinstall's report.
Fixed issue 1155.

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

13 years agogoinstall: s/vlogf/printf/
Andrew Gerrand [Mon, 20 Jun 2011 04:44:14 +0000 (14:44 +1000)]
goinstall: s/vlogf/printf/

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

13 years agogoinstall: wait for all commands to finish instead of timeout
Andrew Gerrand [Mon, 20 Jun 2011 04:12:23 +0000 (14:12 +1000)]
goinstall: wait for all commands to finish instead of timeout
goinstall: make ".git" repo suffix optional

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

13 years agoexec: add support for Plan 9
Anthony Martin [Mon, 20 Jun 2011 03:34:10 +0000 (13:34 +1000)]
exec: add support for Plan 9

R=paulzhol, mirtchovski, fshahriar, alex.brainman, r
CC=golang-dev
https://golang.org/cl/4386041

13 years agogoinstall: Add support for arbitary code repositories
Julian Phillips [Mon, 20 Jun 2011 03:00:43 +0000 (13:00 +1000)]
goinstall: Add support for arbitary code repositories

Extend goinstall to support downloading from any hg/git/svn/bzr hosting
site, not just the standard ones.  The type of hosting is automatically
checked by trying all the tools, so the import statement looks like:

  import "example.com/mything"

Which will work for Mercurial (http), Subversion (http, svn), Git (http,
git) and Bazaar (http, bzr) hosting.

All the existing package imports will work through this new mechanism,
but the existing hard-coded host support is left in place to ensure
there is no change in behaviour.

R=golang-dev, bradfitz, fvbommel, go.peter.90, n13m3y3r, adg, duperray.olivier
CC=golang-dev
https://golang.org/cl/4650043

13 years agodoc/GoCourseDay1: shrink the PDF by rewriting it using ps2pdf.
Rob Pike [Mon, 20 Jun 2011 02:36:14 +0000 (12:36 +1000)]
doc/GoCourseDay1: shrink the PDF by rewriting it using ps2pdf.
No difference in content or appearance.
Forgot to do this when I updated this file a few days ago.

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

13 years agogodefs: rudimentary tests
Robert Hencke [Mon, 20 Jun 2011 01:54:07 +0000 (11:54 +1000)]
godefs: rudimentary tests

currently only defined for darwin

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

13 years ago8a: delete dreg l.s
Rob Pike [Mon, 20 Jun 2011 01:53:41 +0000 (11:53 +1000)]
8a: delete dreg l.s

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

13 years agotime: add support for Plan 9
Anthony Martin [Sun, 19 Jun 2011 06:36:33 +0000 (16:36 +1000)]
time: add support for Plan 9

R=paulzhol, mirtchovski, r, r, rsc
CC=golang-dev
https://golang.org/cl/4362041

13 years agoA+C: add Julian Phillips
Andrew Gerrand [Sun, 19 Jun 2011 06:09:28 +0000 (16:09 +1000)]
A+C: add Julian Phillips

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

13 years agoMake.ccmd: another build fix.
Rob Pike [Sun, 19 Jun 2011 05:30:54 +0000 (15:30 +1000)]
Make.ccmd: another build fix.
It's sad to think there are environments where compiling against a library
isn't enough information for the the linker to decide that you need that
library.
TBR=jdpoirier

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

13 years agoMake.ccmd: fix build - libraries in wrong order.
Rob Pike [Sun, 19 Jun 2011 04:56:25 +0000 (14:56 +1000)]
Make.ccmd: fix build - libraries in wrong order.
TBR=jdpoirier

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

13 years agocc: nit: silence comment warnings
Dave Cheney [Sun, 19 Jun 2011 03:58:08 +0000 (13:58 +1000)]
cc: nit: silence comment warnings

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

13 years agoMake.ccmd: link with mach lib,
Joe Poirier [Sun, 19 Jun 2011 03:57:22 +0000 (13:57 +1000)]
Make.ccmd: link with mach lib,
remove explicit linking in make files

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

13 years agodoc/faq: remove misleading FAQ entry
Andrew Gerrand [Sun, 19 Jun 2011 03:53:07 +0000 (13:53 +1000)]
doc/faq: remove misleading FAQ entry

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

13 years agogoinstall: always rebuild a package after its dependencies are built
Andrew Gerrand [Sat, 18 Jun 2011 23:36:45 +0000 (09:36 +1000)]
goinstall: always rebuild a package after its dependencies are built

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

13 years agohttp: fix documentation typo
Scott Lawrence [Sat, 18 Jun 2011 11:53:18 +0000 (21:53 +1000)]
http: fix documentation typo
(Variable is referred to alternately as 'r' and 'req')

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

13 years agodoc/faq: add question about converting from []T to []interface{}
Andrew Gerrand [Sat, 18 Jun 2011 10:31:38 +0000 (20:31 +1000)]
doc/faq: add question about converting from []T to []interface{}

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

13 years agosyscall: fix build for Sizeof change
Russ Cox [Fri, 17 Jun 2011 21:07:21 +0000 (17:07 -0400)]
syscall: fix build for Sizeof change

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

13 years agogc: unsafe.Alignof, unsafe.Offsetof, unsafe.Sizeof now return uintptr
Russ Cox [Fri, 17 Jun 2011 20:12:14 +0000 (16:12 -0400)]
gc: unsafe.Alignof, unsafe.Offsetof, unsafe.Sizeof now return uintptr

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

13 years ago5g, 8g: fix build
Russ Cox [Fri, 17 Jun 2011 20:05:00 +0000 (16:05 -0400)]
5g, 8g: fix build

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

13 years agogc: implement goto restriction
Russ Cox [Fri, 17 Jun 2011 19:25:05 +0000 (15:25 -0400)]
gc: implement goto restriction

Remove now-unnecessary zeroing of stack frames.

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

13 years agogc: descriptive panic for nil pointer -> value method call
Russ Cox [Fri, 17 Jun 2011 19:23:27 +0000 (15:23 -0400)]
gc: descriptive panic for nil pointer -> value method call

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

13 years agospec: disallow goto into blocks
Russ Cox [Fri, 17 Jun 2011 16:49:04 +0000 (12:49 -0400)]
spec: disallow goto into blocks

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

13 years agorespect goto restrictions
Russ Cox [Fri, 17 Jun 2011 10:07:13 +0000 (06:07 -0400)]
respect goto restrictions

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

13 years agogo/build: use back quotes for regular expression
Alex Brainman [Fri, 17 Jun 2011 06:41:59 +0000 (16:41 +1000)]
go/build: use back quotes for regular expression

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

13 years ago8l: minor fix discovered by lucio
Alex Brainman [Fri, 17 Jun 2011 05:55:54 +0000 (15:55 +1000)]
8l: minor fix discovered by lucio

R=lucio.dere, vcc.163, bradfitz
CC=golang-dev
https://golang.org/cl/4645044

13 years agotag weekly.2011-06-16
Andrew Gerrand [Fri, 17 Jun 2011 01:35:57 +0000 (11:35 +1000)]
tag weekly.2011-06-16

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

13 years agoweekly.2011-06-16 weekly.2011-06-16
Andrew Gerrand [Fri, 17 Jun 2011 01:31:40 +0000 (11:31 +1000)]
weekly.2011-06-16

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

13 years agogoinstall, go/build: support building cgo packages
Andrew Gerrand [Fri, 17 Jun 2011 01:15:54 +0000 (11:15 +1000)]
goinstall, go/build: support building cgo packages

Fixes #1962.

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

13 years agodoc/effective_go: add a note about prefixing error strings with their
Nigel Tao [Fri, 17 Jun 2011 00:51:10 +0000 (10:51 +1000)]
doc/effective_go: add a note about prefixing error strings with their
package name.

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

13 years agoregexp: add a package prefix to error strings.
Nigel Tao [Fri, 17 Jun 2011 00:50:38 +0000 (10:50 +1000)]
regexp: add a package prefix to error strings.

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

13 years agocgo: make file path work for windows
Alex Brainman [Fri, 17 Jun 2011 00:17:33 +0000 (10:17 +1000)]
cgo: make file path work for windows

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

13 years agohttp: document http client/transport thread safety
Brad Fitzpatrick [Thu, 16 Jun 2011 22:02:47 +0000 (15:02 -0700)]
http: document http client/transport thread safety

Fixes #1961

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

13 years agounicode: add case folding tables
Russ Cox [Thu, 16 Jun 2011 21:56:25 +0000 (17:56 -0400)]
unicode: add case folding tables

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

13 years agohttp: make Headers be source of truth
Brad Fitzpatrick [Thu, 16 Jun 2011 20:02:28 +0000 (13:02 -0700)]
http: make Headers be source of truth

Previously Request and Response had redundant fields for
Referer, UserAgent, and cookies which caused confusion and
bugs.  It also didn't allow us to expand the package over
time, since the way to access fields would be in the Headers
one day and promoted to a field the next day.  That would be
hard to gofix, especially with code ranging over Headers.

After a discussion on the mail package's design with a similar
problem, we've designed to make the Headers be the source of
truth and add accessors instead.

Request:
change: Referer -> Referer()
change: UserAgent -> UserAgent()
change: Cookie -> Cookies()
new: Cookie(name) *Cookie
new: AddCookie(*Cookie)

Response:
change: Cookie -> Cookies()

Cookie:
new: String() string

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

13 years agoxml: allow attributes without value in non-strict mode.
Volker Dobler [Thu, 16 Jun 2011 16:56:49 +0000 (12:56 -0400)]
xml: allow attributes without value in non-strict mode.

Attributes without value are commen in html and the xml
parser will accept them in non-strict mode and use the
attribute name as value. Thus parsing <p nowrap> as
<p norwar="nowrap">.

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

13 years agoA+C: Volker Dobler (individual CLA)
Russ Cox [Thu, 16 Jun 2011 16:56:39 +0000 (12:56 -0400)]
A+C: Volker Dobler (individual CLA)

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

13 years agomime/multipart: convert Reader from interface to struct
Brad Fitzpatrick [Thu, 16 Jun 2011 15:55:53 +0000 (08:55 -0700)]
mime/multipart: convert Reader from interface to struct

It was always a weird interface but I didn't know what I
was doing at the time.  rsc questioned me about it then
but didn't press on it during review.  Then adg bugged me
about it too recently.

So clean it up. It parallels the Writer struct too.

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

13 years agoruntime/cgo: fix for OS X 10.7
Russ Cox [Thu, 16 Jun 2011 15:10:31 +0000 (11:10 -0400)]
runtime/cgo: fix for OS X 10.7

Correct a few error messages (libcgo -> runtime/cgo)
and delete old nacl_386.c file too.

Fixes #1657.

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

13 years agosort: change the name of Float64Array to Float64Slice.
Rob Pike [Thu, 16 Jun 2011 07:48:02 +0000 (17:48 +1000)]
sort: change the name of Float64Array to Float64Slice.
I missed this before because I used the wrong regexp. What a moron.

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

13 years agotag release = release.r57.2
Russ Cox [Thu, 16 Jun 2011 06:09:48 +0000 (02:09 -0400)]
tag release = release.r57.2

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

13 years agotag release.r57.2
Russ Cox [Thu, 16 Jun 2011 06:06:27 +0000 (02:06 -0400)]
tag release.r57.2

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

13 years agodocs/GoCourseDay1.pdf: fix error in operator table.
Rob Pike [Thu, 16 Jun 2011 06:03:24 +0000 (16:03 +1000)]
docs/GoCourseDay1.pdf: fix error in operator table.
Communications op was listed as a binary; it isn't any more.

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

13 years agodoc: document r57.2
Russ Cox [Thu, 16 Jun 2011 05:46:14 +0000 (01:46 -0400)]
doc: document r57.2

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

13 years ago6g, 8g: fix goto fix
Russ Cox [Thu, 16 Jun 2011 05:25:49 +0000 (01:25 -0400)]
6g, 8g: fix goto fix

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

13 years agogo/printer, gofmt: print "select {}" on one line
Robert Griesemer [Thu, 16 Jun 2011 04:47:29 +0000 (21:47 -0700)]
go/printer, gofmt: print "select {}" on one line

No impact on existing sources under src, misc.

Fixes #1959.

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

13 years agogc: work around goto bug
Russ Cox [Thu, 16 Jun 2011 04:18:43 +0000 (00:18 -0400)]
gc: work around goto bug

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

13 years agobuild: use awk instead of giant egrep regexp
Russ Cox [Thu, 16 Jun 2011 04:04:24 +0000 (00:04 -0400)]
build: use awk instead of giant egrep regexp

Avoids buggy version of egrep on some Macs.

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

13 years agogo/build: support building cgo packages on non intel platforms
Dave Cheney [Thu, 16 Jun 2011 03:35:27 +0000 (13:35 +1000)]
go/build: support building cgo packages on non intel platforms

See https://golang.org/cl/4572045/

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

13 years agoimage/draw: add an Op argument to Draw.
Nigel Tao [Thu, 16 Jun 2011 01:45:16 +0000 (11:45 +1000)]
image/draw: add an Op argument to Draw.

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

13 years agosyscall: use strict in perl scripts
Yasuhiro Matsumoto [Thu, 16 Jun 2011 00:41:07 +0000 (17:41 -0700)]
syscall: use strict in perl scripts

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

13 years agoundo CL 4557047 / 8818ac606e92
Russ Cox [Wed, 15 Jun 2011 23:47:52 +0000 (19:47 -0400)]
undo CL 4557047 / 8818ac606e92

I don't think we've discussed this API enough.

««« original CL description
bike/shed: new package.

It comes up often enough that it's time to provide
the utility of a standard package.

R=r, mirtchovski, adg, rsc, n13m3y3r, ality, go.peter.90, lstoakes, iant, jan.mercl, bsiegert, robert.hencke, rogpeppe, befelemepeseveze, kevlar
CC=golang-dev
https://golang.org/cl/4557047
»»»

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

13 years agogodoc: replace direct OS file system accesses in favor
Robert Griesemer [Wed, 15 Jun 2011 21:06:35 +0000 (14:06 -0700)]
godoc: replace direct OS file system accesses in favor
       of accesses via a FileSystem interface.

Preparation for appengine version which gets its files
via a snapshot or zip file and uses a corresponding
FileSystem implementation.

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

13 years agodoc/effective_go.html: replace tab with spaces.
Rob Pike [Wed, 15 Jun 2011 14:13:18 +0000 (00:13 +1000)]
doc/effective_go.html: replace tab with spaces.

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

13 years agohttp: use runtime/debug.Stack() to dump stack trace on panic.
Rob Pike [Wed, 15 Jun 2011 14:12:50 +0000 (00:12 +1000)]
http: use runtime/debug.Stack() to dump stack trace on panic.
Test output now looks like this:

2011/06/15 21:10:41 http: panic serving 127.0.0.1:59729: intentional death for testing
$GOROOT/src/pkg/http/server.go:495 (0x3f9f8)
        _func_004: buf.Write(debug.Stack())
$GOROOT/src/pkg/runtime/proc.c:1041 (0x12367)
        panic: reflect·call(d->fn, d->args, d->siz);
$GOROOT/src/pkg/http/serve_test.go:775 (0x5831b)
        _func_029: panic("intentional death for testing")
$GOROOT/src/pkg/http/server.go:575 (0x26366)
        HandlerFunc.ServeHTTP: f(w, r)
$GOROOT/src/pkg/http/server.go:541 (0x261a9)
        *conn.serve: c.handler.ServeHTTP(w, w.req)
$GOROOT/src/pkg/runtime/proc.c:178 (0x10a83)
        goexit: runtime·goexit(void)

with $GOROOT expanded, of course.

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

13 years agogo/build: better, self-contained tests
Andrew Gerrand [Wed, 15 Jun 2011 11:35:34 +0000 (21:35 +1000)]
go/build: better, self-contained tests

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

13 years agogofix: Fix inconsistent indentation in help output
Scott Lawrence [Wed, 15 Jun 2011 11:07:21 +0000 (21:07 +1000)]
gofix: Fix inconsistent indentation in help output

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

13 years agogo/build: remove crud in cgotest/_obj
Dave Cheney [Wed, 15 Jun 2011 06:39:17 +0000 (16:39 +1000)]
go/build: remove crud in cgotest/_obj

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

13 years agogo/build: fix build and clean ups
Andrew Gerrand [Wed, 15 Jun 2011 04:56:12 +0000 (14:56 +1000)]
go/build: fix build and clean ups

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

13 years agogo/build: record all cgo intermediate files (fix build)
Andrew Gerrand [Wed, 15 Jun 2011 04:29:26 +0000 (14:29 +1000)]
go/build: record all cgo intermediate files (fix build)

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

13 years agogoinstall: use go/make package to scan and build packages
Andrew Gerrand [Wed, 15 Jun 2011 03:28:35 +0000 (13:28 +1000)]
goinstall: use go/make package to scan and build packages

R=rsc, n13m3y3r, kevlar
CC=golang-dev
https://golang.org/cl/4515180

13 years agosyscall: mksyscall_windows.pl should output unix newline.
Yasuhiro Matsumoto [Wed, 15 Jun 2011 01:50:21 +0000 (11:50 +1000)]
syscall: mksyscall_windows.pl should output unix newline.

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

13 years agomail: cosmetic fixes.
David Symonds [Tue, 14 Jun 2011 23:10:59 +0000 (09:10 +1000)]
mail: cosmetic fixes.

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

13 years agoexp/regexp/syntax: more escapes, character classes
Russ Cox [Tue, 14 Jun 2011 18:30:10 +0000 (14:30 -0400)]
exp/regexp/syntax: more escapes, character classes

Still TODO: parsing optimizations

make_perl_groups.pl is copied with minimal modifications
(just to generate Go syntax instead of C++) from RE2.
Google Inc is "The RE2 Author" of that file and is one of
the Go Authors, so copyright changed to the Go Authors instead.

R=sam.thorogood, r, fvbommel, robert.hencke
CC=golang-dev
https://golang.org/cl/4612041

13 years agobuild: fix header files for Plan 9
Lucio De Re [Tue, 14 Jun 2011 18:14:11 +0000 (14:14 -0400)]
build: fix header files for Plan 9

The "elf.h" header changes involve only comments, the released
Plan 9 C preprocessing function does not cope with multiline
comments following the #define keyword.  All multiline comments
have been moved to the line above the associated definition.
Sigh!  Fixing the Plan 9 compiler is not an option.

<time.h> does not exist in the Plan 9 Native library.  I have
moved it from src/cmd/ld/pe.h to include/u.h. RSC correctly points
out that this copy of <u.h> is not the one used to compile the
Go release on Plan 9 platforms.

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

13 years agold: make .rodata section read-only
Gustavo Niemeyer [Tue, 14 Jun 2011 18:13:54 +0000 (15:13 -0300)]
ld: make .rodata section read-only

Fixes the respective warning from elflint.

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

13 years agodebug/elf: rename test .o files to .obj
Gustavo Niemeyer [Tue, 14 Jun 2011 18:06:39 +0000 (15:06 -0300)]
debug/elf: rename test .o files to .obj

.o files are commonly found in default ignore lists by
source management tools, including dpkg-source, bzr, etc.

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

13 years agonet: export all fields in Interface
Mikio Hara [Tue, 14 Jun 2011 17:32:52 +0000 (13:32 -0400)]
net: export all fields in Interface

Fixes #1942.

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

13 years agosyscall: add ptrace on darwin
Jeff Hodges [Tue, 14 Jun 2011 16:56:46 +0000 (12:56 -0400)]
syscall: add ptrace on darwin

The ptrace syscall remains gutted on darwin, but usable.  This
also makes the syscall addition process reproducible on darwin
instead of relying on a file path in rsc's home directory.
I've also removed an override of $PATH in env.bash that made
tooling harder.

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

13 years agoxml: handle non-string attribute fields
Maxim Ushakov [Tue, 14 Jun 2011 15:51:03 +0000 (11:51 -0400)]
xml: handle non-string attribute fields

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

13 years agoexec: make LookPath work even when PATHEXT env variable is not set on Windows
Alex Brainman [Tue, 14 Jun 2011 15:46:05 +0000 (11:46 -0400)]
exec: make LookPath work even when PATHEXT env variable is not set on Windows

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

13 years agohttp/spdy: improve error handling.
William Chan [Tue, 14 Jun 2011 15:31:18 +0000 (11:31 -0400)]
http/spdy: improve error handling.

Create a new spdy.Error type that includes the enumerated error type and
the associated stream id (0 if not associated with a specific stream).
This will let users handle errors differently (RST_STREAM vs GOAWAY).

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

13 years agosyscall: fix Plan 9 build.
Yuval Pavel Zholkover [Tue, 14 Jun 2011 15:29:51 +0000 (11:29 -0400)]
syscall: fix Plan 9 build.
Move mmapper from syscall.go to syscall_unix.go.
Remove Sendfile from syscall_plan9.go.

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

13 years agosyscall: update BPF support for BSD variants
Mikio Hara [Tue, 14 Jun 2011 15:28:36 +0000 (11:28 -0400)]
syscall: update BPF support for BSD variants

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

13 years agoos: Plan 9, fix OpenFile & Chmod. Update tests.
Yuval Pavel Zholkover [Tue, 14 Jun 2011 15:20:34 +0000 (11:20 -0400)]
os: Plan 9, fix OpenFile & Chmod. Update tests.
Add Process.Kill.

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

13 years agold: fix link Windows PE __declspec(dllimport) symbol
Wei Guangjing [Tue, 14 Jun 2011 15:05:59 +0000 (11:05 -0400)]
ld:  fix link Windows PE __declspec(dllimport) symbol

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

13 years agogc: frame compaction for arm.
Luuk van Dijk [Tue, 14 Jun 2011 15:03:37 +0000 (17:03 +0200)]
gc: frame compaction for arm.

Required moving some parts of gc/pgen.c to ?g/ggen.c

on linux tests pass for all 3 architectures, and
frames are actually compacted (diagnostic code for
that has been removed from the CL).

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

13 years agosyscall, os, exec: introduce *syscall.SysProcAttr field in os.ProcAttr and exec.Cmd
Russ Cox [Tue, 14 Jun 2011 14:49:34 +0000 (10:49 -0400)]
syscall, os, exec: introduce *syscall.SysProcAttr field in os.ProcAttr and exec.Cmd

R=r, bradfitz, alex.brainman, borman, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4607046

13 years agomail: decode RFC 2047 "B" encoding.
David Symonds [Tue, 14 Jun 2011 07:32:47 +0000 (17:32 +1000)]
mail: decode RFC 2047 "B" encoding.

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

13 years agodoc/gopher: add a small gif to use as an app engine logo on GAE pages.
Rob Pike [Tue, 14 Jun 2011 07:25:57 +0000 (17:25 +1000)]
doc/gopher: add a small gif to use as an app engine logo on GAE pages.

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

13 years agodoc/gopher: add jpgs of the goggled gopher logo for App Engine.
Rob Pike [Tue, 14 Jun 2011 06:42:52 +0000 (16:42 +1000)]
doc/gopher: add jpgs of the goggled gopher logo for App Engine.

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

13 years agoos: be explicit in the package comment that this package is for portable features...
Rob Pike [Tue, 14 Jun 2011 01:49:33 +0000 (11:49 +1000)]
os: be explicit in the package comment that this package is for portable features only.

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

13 years agogo spec: specify constant conversions
Robert Griesemer [Mon, 13 Jun 2011 23:47:33 +0000 (16:47 -0700)]
go spec: specify constant conversions

This is not a language change.

Added paragraphs specifying which conversions
yield results that are constants.

R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/4515176

13 years agogo spec: unsafe.Alignof/Offsetof/Sizeof return uintptr
Robert Griesemer [Mon, 13 Jun 2011 23:46:42 +0000 (16:46 -0700)]
go spec: unsafe.Alignof/Offsetof/Sizeof return uintptr

This is (indirectly) a language change. Per e-mail discussion
on golang-dev.

Fixes #1943.

R=rsc, iant, r, ken
CC=golang-dev
https://golang.org/cl/4581058

13 years agobuild: stop early if commands are missing
Russ Cox [Mon, 13 Jun 2011 19:28:54 +0000 (15:28 -0400)]
build: stop early if commands are missing

If we fail due to a missing command (always bison)
during the build, it is running many things in parallel
and the error message gets lost in the noise.
Also diagnose bison++.

$ ./make.bash
Your system's bison is bison++, a buggy copy of the original bison.
Go needs the original bison instead.
See http://golang.org/doc/install.html#ctools
$ sudo apt-get remove bison++
... ridiculous amount of output ...
$ ./make.bash
Cannot find 'bison' on search path.
See http://golang.org/doc/install.html#ctools
$ sudo apt-get install bison
... ridiculous amount of output ...
$ ./make.bash
... works

Fixes #1938.
Fixes #1946.

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

13 years agocgo: handle new Apple LLVM-based gcc from Xcode 4.2
Russ Cox [Mon, 13 Jun 2011 18:43:54 +0000 (14:43 -0400)]
cgo: handle new Apple LLVM-based gcc from Xcode 4.2

That gcc does not include enumerator names and values
in its DWARF debug output.  Create a data block from which
we can read the values instead.

Fixes #1881.

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

13 years agocrypto/openpgp: flesh out Encrypt by adding support for signing.
Adam Langley [Mon, 13 Jun 2011 17:04:59 +0000 (13:04 -0400)]
crypto/openpgp: flesh out Encrypt by adding support for signing.

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

13 years agold: dwarf emit filenames in debug_line header instead of as extended opcodes.
Luuk van Dijk [Mon, 13 Jun 2011 14:56:43 +0000 (16:56 +0200)]
ld: dwarf emit filenames in debug_line header instead of as extended opcodes.

Makes it possible for older tools like objdump to find the filenames,
fixes  objdump -d -l --start-address=0x400c00 --stop-address=0x400c36 6.out
fixes #1950

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

13 years agoexp/regexp/syntax: syntax data structures, parser
Russ Cox [Mon, 13 Jun 2011 13:20:23 +0000 (09:20 -0400)]
exp/regexp/syntax: syntax data structures, parser

Parser is a work in progress but can populate most of the
interesting parts of the data structure, so a good checkpoint.
All the complicated Perl syntax is missing, as are various
important optimizations made during parsing to the
syntax tree.

The plan is that exp/regexp's API will mimic regexp,
and exp/regexp/syntax provides the parser directly
for programs that need it (and for implementing exp/regexp).

Once finished, exp/regexp will replace regexp.

R=r, sam.thorogood, kevlar, edsrzf
CC=golang-dev
https://golang.org/cl/4538123

13 years agogc: handle go print() and go println()
Stephen Ma [Mon, 13 Jun 2011 12:50:51 +0000 (22:50 +1000)]
gc: handle go print() and go println()

Fixes #1952.

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

13 years agoexp/template: lexical scanner for new template package.
Rob Pike [Mon, 13 Jun 2011 06:08:35 +0000 (16:08 +1000)]
exp/template: lexical scanner for new template package.
An unusual design using slice and a goroutine makes for a
compact scanner with very little allocation.

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

13 years agonet: rearrange source files so we could run more tests on windows
Alex Brainman [Mon, 13 Jun 2011 00:22:31 +0000 (10:22 +1000)]
net: rearrange source files so we could run more tests on windows

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

13 years agogo spec: clarify rules for append, scope rules for :=
Robert Griesemer [Sun, 12 Jun 2011 19:09:50 +0000 (12:09 -0700)]
go spec: clarify rules for append, scope rules for :=

Fixes #1936.
Fixes #1940.

R=rsc, r, iant, ken, iant
CC=golang-dev
https://golang.org/cl/4585049

13 years agomime/multipart: allow for temp files to be removed after tests are finished on Windows
Alex Brainman [Sat, 11 Jun 2011 06:23:44 +0000 (16:23 +1000)]
mime/multipart: allow for temp files to be removed after tests are finished on Windows

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