]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agoasn1: marshal true as 255, not 1.
Adam Langley [Sat, 5 Feb 2011 18:55:37 +0000 (13:55 -0500)]
asn1: marshal true as 255, not 1.

OS X, at least, appears to test |byte == 255|, not |byte != 0| to
establish if a bool is true or false.

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

14 years agocrypto/tls: load a chain of certificates from a file.
Adam Langley [Sat, 5 Feb 2011 18:54:25 +0000 (13:54 -0500)]
crypto/tls: load a chain of certificates from a file.

Many recently issued certificates are chained: there's one or more
intermediate certificates between the host certificate and the root CA
certificate. This change causes the code to load any number of
certificates from the certificate file. This matches the behaviour of
common webservers, and the output of OpenSSL's command line tools.

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/4119057

14 years agocrypto/openpgp/packet: two more packet types.
Adam Langley [Sat, 5 Feb 2011 17:06:42 +0000 (12:06 -0500)]
crypto/openpgp/packet: two more packet types.

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

14 years agogo/printer, gofmt: smarter handling of multi-line raw strings
Robert Griesemer [Sat, 5 Feb 2011 01:34:16 +0000 (17:34 -0800)]
go/printer, gofmt: smarter handling of multi-line raw strings

If a multi-line raw string is the first token on a line, it
should not be indented because the following lines (belonging
to the raw string) are not indented either.

Adjusted src of ebnf/ebnf_test.go manually as it now is formatted
as expected.

gofmt -w src misc

Fixes #1072.

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

14 years agotemplate: Add simple formatter chaining.
Kyle Consalus [Sat, 5 Feb 2011 00:37:30 +0000 (16:37 -0800)]
template: Add simple formatter chaining.

Fixes #676.

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

14 years agogofmt: no need for lexical compare of src and res (optimization)
Robert Griesemer [Fri, 4 Feb 2011 23:36:32 +0000 (15:36 -0800)]
gofmt: no need for lexical compare of src and res (optimization)

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

14 years agotemplate: allow a leading '*' to indicate that evaulation should
Rob Pike [Fri, 4 Feb 2011 23:21:08 +0000 (15:21 -0800)]
template: allow a leading '*' to indicate that evaulation should
indirect through a pointer.

Fixes #1478.

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

14 years agoscan: permit base prefixes 0nnn and 0xnn when scanning
Rob Pike [Fri, 4 Feb 2011 21:14:38 +0000 (13:14 -0800)]
scan: permit base prefixes 0nnn and 0xnn when scanning
signed or unsigned integers using %v or the formatless scanner.
That is, Sscan("0x11", &i) or Sscanf("0x11", "%v", &i) will now
set i to 17.   If a format other than %v is presented, the behavior
is as before.

Fixes #1469.

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

14 years ago8l: fix crash writing Plan 9 binaries
Yuval Pavel Zholkover [Fri, 4 Feb 2011 19:33:21 +0000 (14:33 -0500)]
8l: fix crash writing Plan 9 binaries

Was crashing with GOOS=plan9 unless -s was passed.
Add symbols and line numbers to Plan 9 a.out.

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

14 years agobuild: allow clean.bash to work on fresh checkout
Russ Cox [Fri, 4 Feb 2011 19:33:08 +0000 (14:33 -0500)]
build: allow clean.bash to work on fresh checkout

Must be invoked as ./clean.bash --gomake make
(or --gomake gmake, depending on the name of
GNU make).

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

14 years agoruntime: fix asm.h on Windows
Russ Cox [Fri, 4 Feb 2011 19:32:59 +0000 (14:32 -0500)]
runtime: fix asm.h on Windows

Thanks to mhantsch@gmail.com.

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

14 years agospec: fix Typeof() return type
Gustavo Niemeyer [Fri, 4 Feb 2011 17:29:08 +0000 (09:29 -0800)]
spec: fix Typeof() return type

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

14 years agogo spec, effective go: cleanups
Robert Griesemer [Fri, 4 Feb 2011 16:43:21 +0000 (08:43 -0800)]
go spec, effective go: cleanups

Removed most of the detailed examples about handing panics
from the go spec since it's now covered by Effective Go.

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

14 years agocrypto/openpgp/packet: add public key support
Adam Langley [Fri, 4 Feb 2011 14:00:17 +0000 (09:00 -0500)]
crypto/openpgp/packet: add public key support

Note that DSA public key support is nascent and the verification
functions clearly don't support it yet. I'm intending to get RSA keys
working first.

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

14 years agoissue 1402: added test case
Robert Griesemer [Fri, 4 Feb 2011 04:35:14 +0000 (20:35 -0800)]
issue 1402: added test case

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

14 years agoos: implement new Process api
Alex Brainman [Fri, 4 Feb 2011 03:41:26 +0000 (14:41 +1100)]
os: implement new Process api

Fixes #1004.
Fixes #1460.

R=mattn, r, niemeyer, rog, rsc
CC=golang-dev
https://golang.org/cl/4029053

14 years agogopack: unused variable.
Yasuhiro Matsumoto [Fri, 4 Feb 2011 01:29:09 +0000 (17:29 -0800)]
gopack: unused variable.

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

14 years agogodoc: minor internal fix
Robert Griesemer [Fri, 4 Feb 2011 00:05:57 +0000 (16:05 -0800)]
godoc: minor internal fix

The value of the internal flag includeNonGoFile
really is the value of the fulltextIndex flag.

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

14 years agoregexp: add support for matching text read from things that implement
Rob Pike [Thu, 3 Feb 2011 21:58:40 +0000 (13:58 -0800)]
regexp: add support for matching text read from things that implement
ReadRune.  (If you have a Reader but not a RuneReader, use bufio.)

The matching code is a few percent slower but significantly cleaner.

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

14 years agosync: Proposal for barrier implementation
Gustavo Niemeyer [Thu, 3 Feb 2011 20:39:11 +0000 (12:39 -0800)]
sync: Proposal for barrier implementation

As discussed in the mailing list, this adds a simple barrier
implementation to the sync package which enables one or more
goroutines to wait for a counter to go down to zero.

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

14 years agogo spec: move to Unicode 6.0
Robert Griesemer [Thu, 3 Feb 2011 20:27:41 +0000 (12:27 -0800)]
go spec: move to Unicode 6.0

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

14 years agofmt: document %%
Rob Pike [Thu, 3 Feb 2011 19:55:33 +0000 (11:55 -0800)]
fmt: document %%

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

14 years agogotest: enable unit tests for cmd directories
Russ Cox [Thu, 3 Feb 2011 19:54:01 +0000 (14:54 -0500)]
gotest: enable unit tests for cmd directories

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

14 years agogc, ld: package name main no longer reserved
Russ Cox [Thu, 3 Feb 2011 19:17:20 +0000 (14:17 -0500)]
gc, ld: package name main no longer reserved

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

14 years agosyscall: add SetsockoptIpMreq
Dave Cheney [Thu, 3 Feb 2011 19:15:35 +0000 (14:15 -0500)]
syscall: add SetsockoptIpMreq

notes:
* due to Issue 1466 the Msghdr struct for
 src/pkg/syscall/ztypes_darwin_386.go
 src/pkg/syscall/ztypes_darwin_amd64.go
had to be edited after the godefs generation.
* ztypes_*.go files for linux, freebsd and darwin
have been prepared on the correct host OS and ARCH.
While the total increase is a dozen lines per file
the diff is larger due to a change to godefs,
 http://code.google.com/p/go/source/detail?r=c79e30afe9c8
while has altered the names of Pad members which
causes gofmt to realign the affected structs

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

14 years agoA+C: Dave Cheney (individual CLA)
Russ Cox [Thu, 3 Feb 2011 19:15:27 +0000 (14:15 -0500)]
A+C: Dave Cheney (individual CLA)

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

14 years agogo spec: adjust notion of Assignability
Robert Griesemer [Thu, 3 Feb 2011 18:53:31 +0000 (10:53 -0800)]
go spec: adjust notion of Assignability

This change makes it legal to pass a struct value as receiver
outside the package declaring the struct even if the respective
struct type has non-exported fields.

This is a backwards-compatible language change motivated by the
fact that it is already possible to circumvent the assignment
restriction when calling methods through interfaces (see issue
1402).

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

14 years agocgo: os/arch dependent #cgo directives
Gustavo Niemeyer [Thu, 3 Feb 2011 18:51:47 +0000 (13:51 -0500)]
cgo: os/arch dependent #cgo directives

This enables #cgo directives to contain a os/arch
specification which restricts the definition of
the given option to matching systems.

For example:

#cgo amd64 CFLAGS: -DAMD64=1
#cgo linux CFLAGS: -DLINUX=1
#cgo linux/amd64 CFLAGS: -DLINUX_ON_AMD64=1

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

14 years agogc, ld: detect stale or incompatible object files
Russ Cox [Thu, 3 Feb 2011 18:51:43 +0000 (13:51 -0500)]
gc, ld: detect stale or incompatible object files

The object files begin with a header that is

        $GOARCH

on a line by itself.  This CL changes that header to

        go object $GOOS $GOARCH release.2011-01-01 4567+

where the final two fields are the most recent release
tag and the current hg version number.

All objects imported into a Go compilation or linked into an
executable must have the same header line, and that header
line must match the compiler and linker versions.

The effect of this will be that if you update and run all.bash
and then try to link in objects compiled with an earlier version
of the compiler (or invoke the wrong version of the compiler),
you will get an error showing the different headers instead
of perhaps silent incompatibility.

Normal usage with all.bash should be unaffected, because
all.bash deletes all the object files in $GOROOT/pkg/$GOOS_$GOARCH
and cleans all intermediate object files before starting.

This change is intended to diagnose stale objects arising when
users maintaining alternate installation directories forget to
rebuild some of their files after updating.

It should help make the adoption of $GOPATH (CL 3780043)
less error-prone.

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

14 years agospec: allow imported packages named main
Russ Cox [Thu, 3 Feb 2011 18:40:51 +0000 (13:40 -0500)]
spec: allow imported packages named main

Prior to this CL, there were two requirements about the
package name main.

1. The package that sits at the root of the import graph
   (the one where program execution begins)
   must be named main.

2. No other package in the program can be named main.

This CL only removes requirement #2, which can be done
without changing any other Go documentation.

The new wording and formatting is such that removing
requirement #1 can be done by deleting a single line,
but making that change is explicitly outside the scope
of this CL, because it would require changes to other
documentation at the same time.

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

14 years agocrypto/openpgp/packet: add basic routines
Adam Langley [Thu, 3 Feb 2011 14:22:40 +0000 (09:22 -0500)]
crypto/openpgp/packet: add basic routines

Since nobody suggested major changes to the higher level API, I'm
splitting up the lower level code for review. This is the first of the
changes for the packet reading/writing code.

It deliberately doesn't include a Makefile because the package is
incomplete.

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

14 years agocrypto/openpgp/armor: bug fixes
Adam Langley [Thu, 3 Feb 2011 14:19:20 +0000 (09:19 -0500)]
crypto/openpgp/armor: bug fixes

* Don't require lines to be full.
* Don't forget to flush the line buffer.
* Update the test so that it doesn't happen to include only full lines
  in order to test the above.
* Always write the line after the header as GNUPG expects it.

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

14 years agocrypto/cipher: add resync open to OCFB mode.
Adam Langley [Thu, 3 Feb 2011 14:17:42 +0000 (09:17 -0500)]
crypto/cipher: add resync open to OCFB mode.

OpenPGP changed its OCFB mode for more modern packets (for example, the
MDC symmetrically encrypted packet). This change adds a bool to
determine which mode is used.

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

14 years agobuild: fix spaces in GOROOT
Christopher Nielsen [Thu, 3 Feb 2011 05:42:03 +0000 (00:42 -0500)]
build: fix spaces in GOROOT

Fixes #1413.

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

14 years agoA+C: add Christopher Nielsen (individual CLA)
Russ Cox [Thu, 3 Feb 2011 05:36:24 +0000 (00:36 -0500)]
A+C: add Christopher Nielsen (individual CLA)

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/3989061

14 years agoruntime: faster allocator, garbage collector
Russ Cox [Thu, 3 Feb 2011 04:03:47 +0000 (23:03 -0500)]
runtime: faster allocator, garbage collector

GC is still single-threaded.
Multiple threads will happen in another CL.

Garbage collection pauses are typically
about half as long as they were before this CL.

R=brainman, iant, r
CC=golang-dev
https://golang.org/cl/3975046

14 years agowindows: fix build?
Russ Cox [Thu, 3 Feb 2011 03:53:10 +0000 (22:53 -0500)]
windows: fix build?

Shot in the dark.

TBR=r
CC=golang-dev
https://golang.org/cl/4126054

14 years agocodereview: fix hgpatch on windows
Yasuhiro Matsumoto [Thu, 3 Feb 2011 03:43:40 +0000 (22:43 -0500)]
codereview: fix hgpatch on windows

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

14 years agocgo: fix _cgo_run timestamp file order
Gustavo Niemeyer [Thu, 3 Feb 2011 03:37:40 +0000 (22:37 -0500)]
cgo: fix _cgo_run timestamp file order

The timestamp file is being created before cgo
runs, which means errors will not prevent it
from being created and thus will cause the
build to break by rendering the rule up-to-date
when it isn't.

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

14 years agogc: correct rounding of denormal constants
Eoghan Sherry [Thu, 3 Feb 2011 03:36:54 +0000 (22:36 -0500)]
gc: correct rounding of denormal constants

Fixes #1463.

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

14 years agowindows: syscall: Make ForkExec acquire the ForkLock
Hector Chu [Thu, 3 Feb 2011 01:50:41 +0000 (12:50 +1100)]
windows: syscall: Make ForkExec acquire the ForkLock
so that spawned processes avoid inheriting pipes.

Implement CloseOnExec.
Make file and pipe handles inheritable.

R=rsc, brainman, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4126047

14 years agoGetting Started guide: update for new versions of Mercurial
Robert Griesemer [Wed, 2 Feb 2011 23:53:32 +0000 (15:53 -0800)]
Getting Started guide: update for new versions of Mercurial

Newer versions of Mercurial require the configuration
of Certification Authorities.

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

14 years agocgo: rename internal f to avoid conflict with possible C global named f
Russ Cox [Wed, 2 Feb 2011 23:53:03 +0000 (18:53 -0500)]
cgo: rename internal f to avoid conflict with possible C global named f

Fixes #1452.

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

14 years agogc: select receive bug fix
Russ Cox [Wed, 2 Feb 2011 23:34:09 +0000 (18:34 -0500)]
gc: select receive bug fix

Affects receive using := when new variable escapes to heap.

Fixes #1468.

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

14 years agofmt: rename internal interfaces
Robert Griesemer [Wed, 2 Feb 2011 23:00:14 +0000 (15:00 -0800)]
fmt: rename internal interfaces

readRuner -> runeReader
unreadRuner -> runeUnreader

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

14 years agoruntime: more detailed panic traces, line number work
Russ Cox [Wed, 2 Feb 2011 21:44:20 +0000 (16:44 -0500)]
runtime: more detailed panic traces, line number work

Follow morestack, so that crashes during a stack split
give complete traces.  Also mark stack segment boundaries
as an aid to debugging.

Correct various line number bugs with yet another attempt
at interpreting the pc/ln table.  This one has a chance at
being correct, because I based it on reading src/cmd/ld/lib.c
instead of on reading the documentation.

Fixes #1138.
Fixes #1430.
Fixes #1461.

throw: runtime: split stack overflow

runtime.throw+0x3e /home/rsc/g/go2/src/pkg/runtime/runtime.c:78
        runtime.throw(0x81880af, 0xf75c8b18)
runtime.newstack+0xad /home/rsc/g/go2/src/pkg/runtime/proc.c:728
        runtime.newstack()
runtime.morestack+0x4f /home/rsc/g/go2/src/pkg/runtime/386/asm.s:184
        runtime.morestack()
----- morestack called from stack: -----
runtime.new+0x1a /home/rsc/g/go2/src/pkg/runtime/malloc.c:288
        runtime.new(0x1, 0x0, 0x0)
gongo.makeBoard+0x33 /tmp/Gongo/gongo_robot_test.go:344
        gongo.makeBoard(0x809d238, 0x1, 0xf76092c8, 0x1)
----- stack segment boundary -----
gongo.checkEasyScore+0xcc /tmp/Gongo/gongo_robot_test.go:287
        gongo.checkEasyScore(0xf764b710, 0x0, 0x809d238, 0x1)
gongo.TestEasyScore+0x8c /tmp/Gongo/gongo_robot_test.go:255
        gongo.TestEasyScore(0xf764b710, 0x818a990)
testing.tRunner+0x2f /home/rsc/g/go2/src/pkg/testing/testing.go:132
        testing.tRunner(0xf764b710, 0xf763b5dc, 0x0)
runtime.goexit /home/rsc/g/go2/src/pkg/runtime/proc.c:149
        runtime.goexit()

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

14 years agoio: rename interfaces
Robert Griesemer [Wed, 2 Feb 2011 21:42:15 +0000 (13:42 -0800)]
io: rename interfaces

ReadByter -> ByteReader
ReadRuner -> RuneReader

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

14 years agocodereview: record repository, base revision
Russ Cox [Wed, 2 Feb 2011 21:39:31 +0000 (16:39 -0500)]
codereview: record repository, base revision

Include repository URL in initial mail.
Record repository and base revision in patch description.

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

14 years agofmt.Scan: scan binary-exponent floating format, 2.4p-3
Rob Pike [Wed, 2 Feb 2011 20:38:48 +0000 (12:38 -0800)]
fmt.Scan: scan binary-exponent floating format, 2.4p-3

R=rsc, rog, r2
CC=golang-dev
https://golang.org/cl/4128049

14 years agoruntime: correct runtime.GOOS, runtime.GOARCH
Russ Cox [Wed, 2 Feb 2011 20:35:54 +0000 (15:35 -0500)]
runtime: correct runtime.GOOS, runtime.GOARCH

If the same directory was used for multiple builds,
it was possible for a stale version.go to contain the
wrong definitions for $GOOS and $GOARCH, because
they can change even if the hg version does not.
Split into multiple files to fix.

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

14 years agoEffective Go: fix typo
Robert Griesemer [Wed, 2 Feb 2011 19:02:56 +0000 (11:02 -0800)]
Effective Go: fix typo

Fixes #1467.

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

14 years agosync: tidy a couple of comments.
Rob Pike [Wed, 2 Feb 2011 05:29:46 +0000 (21:29 -0800)]
sync: tidy a couple of comments.
no semantic change.

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

14 years agofmt: document %b for floating point
Rob Pike [Wed, 2 Feb 2011 05:10:16 +0000 (21:10 -0800)]
fmt: document %b for floating point

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

14 years agoio: add ReadRuner
Rob Pike [Wed, 2 Feb 2011 05:09:33 +0000 (21:09 -0800)]
io: add ReadRuner
Put it in the same package as ReadByter.
There is no implementation here for either interface.

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

14 years agoregexp tests: make some benchmarks more meaningful
Rob Pike [Wed, 2 Feb 2011 01:48:42 +0000 (17:48 -0800)]
regexp tests: make some benchmarks more meaningful
The first two "Literal" tests were silly.
Also fix a naming typo in a couple of tests.

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

14 years agotag release.2011-02-01.1
Andrew Gerrand [Wed, 2 Feb 2011 01:11:29 +0000 (12:11 +1100)]
tag release.2011-02-01.1

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

14 years agorelease.2011-02-01.1 weekly.2011-02-01.1
Andrew Gerrand [Wed, 2 Feb 2011 01:09:31 +0000 (12:09 +1100)]
release.2011-02-01.1

Re-issue to include go/ast fixes for godoc.

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

14 years agogo/ast: add missing handling of SendStmt to ast.Walk
Robert Griesemer [Wed, 2 Feb 2011 00:57:45 +0000 (16:57 -0800)]
go/ast: add missing handling of SendStmt to ast.Walk

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

14 years agotag release.2011-02-01
Andrew Gerrand [Wed, 2 Feb 2011 00:02:54 +0000 (11:02 +1100)]
tag release.2011-02-01

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

14 years agorelease.2011-02-01 weekly.2011-02-01
Andrew Gerrand [Tue, 1 Feb 2011 23:59:59 +0000 (10:59 +1100)]
release.2011-02-01

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

14 years ago5l, 8l: pass stack frame size to morestack when needed
Russ Cox [Tue, 1 Feb 2011 23:34:41 +0000 (18:34 -0500)]
5l, 8l: pass stack frame size to morestack when needed

Shame on me: I fixed the same bug in 6l in 8691fcc6a66e
(https://golang.org/cl/2609041) and neglected
to look at 5l and 8l to see if they were affected.

On the positive side, the check I added in that CL is the
one that detected this bug.

Fixes #1457.

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

14 years agoarm: disable peep for release
Rob Pike [Tue, 1 Feb 2011 23:02:07 +0000 (15:02 -0800)]
arm: disable peep for release

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

14 years agogo/ast: reflect communication operator changes accurately in ast
Robert Griesemer [Tue, 1 Feb 2011 21:47:51 +0000 (13:47 -0800)]
go/ast: reflect communication operator changes accurately in ast

- go/ast: introduce SendStmt; adjust SelectStmt
- go/parser: accept new communication syntax, minor
  unrelated cleanups
- go/printer: adjustments for new ast, fewer binary
  expression precedences
- go/token: remove one binary precedence

Adjusted dependent code. gofmt -w src -misc. Ran all tests.

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

14 years agogo spec: s/log.Crash/log.Panic/
Robert Griesemer [Tue, 1 Feb 2011 20:51:10 +0000 (12:51 -0800)]
go spec: s/log.Crash/log.Panic/

There is no log.Crash.

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

14 years agold: Add -I option to set ELF interpreter.
Ian Lance Taylor [Tue, 1 Feb 2011 20:49:56 +0000 (12:49 -0800)]
ld: Add -I option to set ELF interpreter.

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

14 years agolog: rename Exit* to Fatal*
Rob Pike [Tue, 1 Feb 2011 20:47:35 +0000 (12:47 -0800)]
log: rename Exit* to Fatal*
This aligns the naming scheme with the testing package and
also lets govet work on more logging calls.

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

14 years agogovet: add Panic to the list of functions
Rob Pike [Tue, 1 Feb 2011 20:47:09 +0000 (12:47 -0800)]
govet: add Panic to the list of functions

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

14 years agogo spec: follow-up cleanups after communication operator changes
Robert Griesemer [Tue, 1 Feb 2011 20:02:49 +0000 (12:02 -0800)]
go spec: follow-up cleanups after communication operator changes

These are syntactical changes to better reflect the communication
operator's new status in the language.

- sending to a channel is now done via a send statement
- there is no binary communication operation anymore which
  leads to a reduction of the number of precedence levels
  from 6 to 5 (yeah!)
- small semantic change: since a send operation is not part
  of the expression syntax anymore, a <- send operator is
  binding weaker than any other operator now
- receiving from a channel is done as before via the unary
  receive expression
- communication clauses in select statement now can contain
  send statements or receive expressions

R=rsc, r, iant, ken2, gri1
CC=golang-dev
https://golang.org/cl/3973051

14 years agocodereview: more ascii vs unicode nonsense
Russ Cox [Tue, 1 Feb 2011 19:17:41 +0000 (14:17 -0500)]
codereview: more ascii vs unicode nonsense

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

14 years agogc: handle invalid name in type switch
Russ Cox [Tue, 1 Feb 2011 19:00:36 +0000 (14:00 -0500)]
gc: handle invalid name in type switch

Fixes #1453.

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

14 years agohttp: add host patterns
Jose Luis Vázquez González [Tue, 1 Feb 2011 18:58:59 +0000 (13:58 -0500)]
http: add host patterns

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

14 years agoA+C: Jose Luis Vázquez González (individual CLA)
Russ Cox [Tue, 1 Feb 2011 18:31:28 +0000 (13:31 -0500)]
A+C: Jose Luis Vázquez González (individual CLA)

R=gri, josvazg, gri1
CC=golang-dev
https://golang.org/cl/4044047

14 years agostrconv: add test that trips up other implementations
Russ Cox [Tue, 1 Feb 2011 17:48:18 +0000 (12:48 -0500)]
strconv: add test that trips up other implementations

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

14 years agoexec: use custom error for LookPath
Gustavo Niemeyer [Tue, 1 Feb 2011 17:12:51 +0000 (12:12 -0500)]
exec: use custom error for LookPath

Make the error message and the needed action more obvious
when a command isn't found to obtain the source code
of a project.  Users seem to strugle with the existing
wording in practice.

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

14 years ago6g: fix registerization of temporaries
Eoghan Sherry [Tue, 1 Feb 2011 17:12:42 +0000 (12:12 -0500)]
6g: fix registerization of temporaries

Use correct range in allocated register test.

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

14 years ago6l: add comment to CMOV* relocation
Gustavo Niemeyer [Tue, 1 Feb 2011 16:49:33 +0000 (11:49 -0500)]
6l: add comment to CMOV* relocation

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

14 years agowindows: multiple improvements and cleanups
Hector Chu [Tue, 1 Feb 2011 16:49:24 +0000 (11:49 -0500)]
windows: multiple improvements and cleanups

The callback mechanism has been made more flexible.
Eliminated one round of argument copying in Syscall.
Faster Get/SetLastError implemented.
Added gettime for gc perf profiling.

R=rsc, brainman, mattn, rog
CC=golang-dev
https://golang.org/cl/4058046

14 years agocrypto: add package.
Adam Langley [Tue, 1 Feb 2011 16:02:48 +0000 (11:02 -0500)]
crypto: add package.

The crypto package is added as a common place to store identifiers for
hash functions. At the moment, the rsa package has an enumeration of
hash functions and knowledge of their digest lengths. This is an
unfortunate coupling and other high level crypto packages tend to need
to duplicate this enumeration and knowledge (i.e. openpgp).

crypto pulls this code out into a common location.

It would also make sense to add similar support for ciphers to crypto,
but the problem there isn't as acute that isn't done in this change.

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

14 years agosyscall: add network interface constants for freebsd/386, freebsd/amd64
Mikio Hara [Tue, 1 Feb 2011 13:46:21 +0000 (08:46 -0500)]
syscall: add network interface constants for freebsd/386, freebsd/amd64

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

14 years agocgo: define CGO_CFLAGS and CGO_LDFLAGS in Go files
Gustavo Niemeyer [Tue, 1 Feb 2011 13:44:18 +0000 (08:44 -0500)]
cgo: define CGO_CFLAGS and CGO_LDFLAGS in Go files

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

14 years agogc: fix send precedence
Russ Cox [Tue, 1 Feb 2011 13:29:21 +0000 (08:29 -0500)]
gc: fix send precedence

Test and fix case found by Robert.
Add receive inside send to tree too.

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

14 years agomisc/vim: Define import commands on buffer switch
Gustavo Niemeyer [Tue, 1 Feb 2011 00:12:57 +0000 (11:12 +1100)]
misc/vim: Define import commands on buffer switch

This change fixes the import plugin so that the
defined commands are available when opening a new
Go buffer from within Vim itself.

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

14 years agomisc/vim: Document better syntax sync parameter
Gustavo Niemeyer [Tue, 1 Feb 2011 00:12:45 +0000 (11:12 +1100)]
misc/vim: Document better syntax sync parameter

Forcing the synchronization of 500 lines is both slower and
less precise than searching for a known sync point.
Unfortunately, though, the way to synchronize correctly is
using the grouphere instruction, which has a bug.

I've already proposed the fix to Vim, so future releases
should have this working.  We can continue using the 500 lines
syncing for now.

This change just documents the proper way to sync.

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

14 years agogc: remove non-blocking send, receive syntax
Russ Cox [Mon, 31 Jan 2011 23:52:16 +0000 (18:52 -0500)]
gc: remove non-blocking send, receive syntax

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

14 years agoreplace non-blocking send, receive syntax with select
Russ Cox [Mon, 31 Jan 2011 23:36:28 +0000 (18:36 -0500)]
replace non-blocking send, receive syntax with select

R=golang-dev, nigeltao, niemeyer, r
CC=golang-dev
https://golang.org/cl/4079053

14 years agounicode: update to unicode 6.0.0
Rob Pike [Mon, 31 Jan 2011 23:20:44 +0000 (15:20 -0800)]
unicode: update to unicode 6.0.0

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

14 years agoebnflint: exit with non-zero status on error
Russ Cox [Mon, 31 Jan 2011 22:42:10 +0000 (17:42 -0500)]
ebnflint: exit with non-zero status on error

Tweak spec to avoid ebnflint complaints.

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

14 years agodoc/progs: make sure all programs compile and run
Rob Pike [Mon, 31 Jan 2011 22:41:36 +0000 (14:41 -0800)]
doc/progs: make sure all programs compile and run

Fixes #1455.

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

14 years ago.hgignore: Add some more files created by all.bash.
Ian Lance Taylor [Mon, 31 Jan 2011 21:21:44 +0000 (13:21 -0800)]
.hgignore: Add some more files created by all.bash.

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

14 years agosuffixarray: fix construction bug
Eric Eisner [Mon, 31 Jan 2011 21:13:02 +0000 (13:13 -0800)]
suffixarray: fix construction bug

Previously, group numbers were updated while being read,
sometimes leading to inconsistencies.

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

14 years agoeffective go: remove non-blocking ops in leaky bucket example
Rob Pike [Mon, 31 Jan 2011 20:46:38 +0000 (12:46 -0800)]
effective go: remove non-blocking ops in leaky bucket example

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

14 years agoos: add ETIMEDOUT
Albert Strasheim [Mon, 31 Jan 2011 19:54:58 +0000 (14:54 -0500)]
os: add ETIMEDOUT

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

14 years agocgo: improve error reporting slightly.
Roger Peppe [Mon, 31 Jan 2011 19:31:34 +0000 (14:31 -0500)]
cgo: improve error reporting slightly.
If there were warnings or errors in the user code,
cgo would print the first error from gcc and then stop,
which is not helpful.
This CL makes cgo ignore errors from user code
in the first pass - they will be shown later.
It also prints errors from user preamble code
with the correct line numbers.
(Also fixed misleading usage message).

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

14 years agosyscall: add network interface constants for darwin/386, darwin/amd64
Mikio Hara [Mon, 31 Jan 2011 17:50:50 +0000 (12:50 -0500)]
syscall: add network interface constants for darwin/386, darwin/amd64

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

14 years agolib9: update to Unicode 6.0.0
Russ Cox [Mon, 31 Jan 2011 17:38:54 +0000 (12:38 -0500)]
lib9: update to Unicode 6.0.0

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

14 years agounicode: build maketables during build, take 2
Russ Cox [Mon, 31 Jan 2011 16:50:04 +0000 (11:50 -0500)]
unicode: build maketables during build, take 2

The "all:" target is the default for running gomake
by hand, but it is not used during the build.
The build runs make install and make test.

Save the build of maketables for the test phase
so that the packages it needs will have been
installed already.

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

14 years agoruntime: generate Go defs for C types.
Luuk van Dijk [Mon, 31 Jan 2011 11:27:28 +0000 (12:27 +0100)]
runtime: generate Go defs for C types.

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

14 years agobufio: make Flush a no-op when the buffer is empty
Andrew Gerrand [Mon, 31 Jan 2011 07:54:25 +0000 (18:54 +1100)]
bufio: make Flush a no-op when the buffer is empty

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

14 years agorun.bash: disable doc/codelab/wiki test on windows
Alex Brainman [Mon, 31 Jan 2011 04:58:44 +0000 (15:58 +1100)]
run.bash: disable doc/codelab/wiki test on windows

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

14 years agoenable arm peep.
Ken Thompson [Sun, 30 Jan 2011 23:55:08 +0000 (15:55 -0800)]
enable arm peep.
one bug fixed,
probably more will be revealed

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