]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agosyscall: do not use NULL for zero-length read, write
Russ Cox [Wed, 9 Feb 2011 19:28:47 +0000 (14:28 -0500)]
syscall: do not use NULL for zero-length read, write

Avoids problems running Linux binaries under QEMU.

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

14 years agorpc: make more tolerant of errors.
Roger Peppe [Wed, 9 Feb 2011 18:57:59 +0000 (10:57 -0800)]
rpc: make more tolerant of errors.
Add Error type to enable clients to distinguish
between local and remote errors.
Also return "connection shut down error" after
the first error return rather than returning the
same error each time.

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

14 years agogo/printer: remove notion of "Styler", remove HTML mode
Robert Griesemer [Wed, 9 Feb 2011 17:52:32 +0000 (09:52 -0800)]
go/printer: remove notion of "Styler", remove HTML mode

Neither gofmt nor godoc are making use of a Styler (for
token-specific formatting) anymore. Stylers interacted in complicated
ways with HTML-escaping which was why the printer needed an HTML mode
in the first place.

godoc now uses a more powerful and general text formatting
function that does HTML escaping, text selection, and can
handle token-specific formatting if so desired (currently
used only for comments).

As a consequence, cleaned up uses of go/printer in godoc;
simplified the various write utility functions, and also
removed the need for the "html" template format (in favor of
html-esc which now does the same and is used more pervasively).

Applied gofmt -w src misc to verify no changes occured,
and tested godoc manually.

There should be no visible changes except that (type) code
snippets presented for godoc package documentation now
uses the same formatting as for general source code and
thus comments get the comment-specific color here as well
(not the case at the moment).

(TODO: godoc needs a good automatic test suite).

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

14 years agocrypto/x509: add name constraints support.
Adam Langley [Wed, 9 Feb 2011 13:39:31 +0000 (08:39 -0500)]
crypto/x509: add name constraints support.

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

14 years agomisc/dashboard: hide benchmarks link temporarily
Andrew Gerrand [Wed, 9 Feb 2011 05:03:08 +0000 (00:03 -0500)]
misc/dashboard: hide benchmarks link temporarily

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

14 years agobuild: Drop syslog on DISABLE_NET_TESTS=1
Gustavo Niemeyer [Wed, 9 Feb 2011 04:50:23 +0000 (23:50 -0500)]
build: Drop syslog on DISABLE_NET_TESTS=1

Even if local, it requires communication with a daemon
which may not be available.  This is creating problems
for getting an Ubuntu package going in Launchpad's PPA.

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

14 years agocgo: fix handling of signed enumerations
Gustavo Niemeyer [Wed, 9 Feb 2011 04:50:14 +0000 (23:50 -0500)]
cgo: fix handling of signed enumerations

Structs defined in C as containing a field with
an enum type are currently translated to Go as
a struct with an unsigned integer field, even if
some of the values contained in the enum are
negative.

This modification takes in consideration the values
defined in the enum, and conditionally defines the
Go type as signed if necessary.

The logic introduced was tested with gcc, which
will increase the type size if it contains both
negative numbers and values greater than 2^b/2-1,
and refuses to compile values which would be
problematic (2^64-1, but in fact the ISO C
restricts the range to the size of int).

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

14 years agohttp: handle unchunked, un-lengthed HTTP/1.1 responses
Brad Fitzpatrick [Wed, 9 Feb 2011 04:35:02 +0000 (20:35 -0800)]
http: handle unchunked, un-lengthed HTTP/1.1 responses

Fixes #716

This CL simply resumes the previous CL in-flight at
https://golang.org/cl/906042/

R=rsc, petar-m, dsymonds
CC=golang-dev
https://golang.org/cl/4157042

14 years ago container/ring: Replace Iter() with Do().
Kyle Consalus [Wed, 9 Feb 2011 04:07:05 +0000 (20:07 -0800)]
container/ring: Replace Iter() with Do().

Faster in most cases, and not prone to memory leaks. Named "Do" to match with similarly named method on Vector.

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

14 years agosyscall: implement windows version of Fsync
Alex Brainman [Wed, 9 Feb 2011 03:54:54 +0000 (14:54 +1100)]
syscall: implement windows version of Fsync

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

14 years agofix build clean.bash
Russ Cox [Wed, 9 Feb 2011 03:39:39 +0000 (22:39 -0500)]
fix build clean.bash

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

14 years agocodereview: use cmd.communicate.
Yasuhiro Matsumoto [Wed, 9 Feb 2011 03:30:06 +0000 (22:30 -0500)]
codereview: use cmd.communicate.

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

14 years agosrc/run.bash: get rid of long windows expression
Alex Brainman [Wed, 9 Feb 2011 01:37:08 +0000 (12:37 +1100)]
src/run.bash: get rid of long windows expression

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

14 years ago.hgignore: ignore src/pkg/runtime/version_*.go
Alex Brainman [Wed, 9 Feb 2011 01:34:50 +0000 (12:34 +1100)]
.hgignore: ignore src/pkg/runtime/version_*.go

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

14 years agocgen64: dont use MVN instruction
Ken Thompson [Wed, 9 Feb 2011 01:30:23 +0000 (17:30 -0800)]
cgen64: dont use MVN instruction

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

14 years agopeep: more optimization
Ken Thompson [Wed, 9 Feb 2011 00:55:59 +0000 (16:55 -0800)]
peep: more optimization

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

14 years agogo spec: fix a few typos
Anthony Martin [Tue, 8 Feb 2011 22:51:15 +0000 (14:51 -0800)]
go spec: fix a few typos

The spec can now be parsed with an
xml.Parser using the HTML settings.

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

14 years agogo spec: clarification re: method sets of newly declared pointer types
Robert Griesemer [Tue, 8 Feb 2011 21:31:01 +0000 (13:31 -0800)]
go spec: clarification re: method sets of newly declared pointer types

- added an example to Type declarations section clarifying the
  situation brought up with issue 1324
- slightly re-ordered paragraphs in Types section
- added separate heading for method set section and refer to it
  from elsewhere in the spec
- no language changes

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

14 years agowindows: replace remaining __MINGW32__ instances with _WIN32
Joe Poirier [Tue, 8 Feb 2011 20:42:52 +0000 (15:42 -0500)]
windows: replace remaining __MINGW32__ instances with _WIN32

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

14 years agonetchan: graceful handling of closed connection
Graham Miller [Tue, 8 Feb 2011 20:42:31 +0000 (12:42 -0800)]
netchan: graceful handling of closed connection
Currently, when an importer closes the connection, the exporter gives an
error message 'netchan export: error decoding client header:EOF'.  This
change causes the exporter to look for an EOF during the parse of the
header, and silences the log message in that case.

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

14 years agocgo: don't run cgo when not compiling
Gustavo Niemeyer [Tue, 8 Feb 2011 20:40:11 +0000 (15:40 -0500)]
cgo: don't run cgo when not compiling

The logic introduced to avoid running cgo when
introducing _cgo_flags is faulty.  My goal was
to handle it with the following statement:

    -include _cgo_flags

The dash tells make to ignore errors if it can't
include the file.

What I missed, though, was the fact that it
*will* attempt to build the file if it knows
how.

This change will introduce the originally
intended semantics of not attempting to build
the file before necessary.

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

14 years agocrypto/openpgp/packet: add UserId packet type
Adam Langley [Tue, 8 Feb 2011 02:40:33 +0000 (21:40 -0500)]
crypto/openpgp/packet: add UserId packet type

This was split from CL 4124054

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

14 years agopeep: fix optimization bug
Ken Thompson [Tue, 8 Feb 2011 01:21:04 +0000 (17:21 -0800)]
peep: fix optimization bug

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

14 years agopeep: fix bug in peep optimizer.
Ken Thompson [Mon, 7 Feb 2011 23:00:30 +0000 (15:00 -0800)]
peep: fix bug in peep optimizer.
reg: enable peep optimizer.
cgen64: better int64 code.

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

14 years agosyscall: fix arm build
Russ Cox [Mon, 7 Feb 2011 22:49:45 +0000 (17:49 -0500)]
syscall: fix arm build

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

14 years agold: fix build (uvlong vs uint64 conflict on freebsd)
Rob Pike [Mon, 7 Feb 2011 22:40:36 +0000 (14:40 -0800)]
ld: fix build (uvlong vs uint64 conflict on freebsd)

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

14 years agoloader: move the XputY routines into the ld directory.
Rob Pike [Mon, 7 Feb 2011 22:34:21 +0000 (14:34 -0800)]
loader: move the XputY routines into the ld directory.
Fixes the build for 5l, and also removes an inconsequential bug in 8l.

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

14 years agoCodelab/wiki: fix typo
Andrey Mirtchovski [Mon, 7 Feb 2011 19:51:17 +0000 (11:51 -0800)]
Codelab/wiki: fix typo

Missing closing bracket renders the next code snippet unreadable.

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

14 years agoCodelab: correct function definitions for handlers before closures are introduced.
Andrey Mirtchovski [Mon, 7 Feb 2011 08:23:18 +0000 (09:23 +0100)]
Codelab: correct function definitions for handlers before closures are introduced.

A couple of post-closure function definitions were introduced too early, making the resulting
code fail compilation.

Also, the TitleValidator regexp was missing.

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

14 years agocrypto/tls: select best ciphersuite, not worst.
Adam Langley [Sat, 5 Feb 2011 18:56:36 +0000 (13:56 -0500)]
crypto/tls: select best ciphersuite, not worst.

Previously, the outer loop would continue until we selected the
client's least preferable ciphersuite.

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

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