]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
13 years agorelease.2011-02-15 weekly.2011-02-15
Andrew Gerrand [Tue, 15 Feb 2011 15:58:08 +0000 (02:58 +1100)]
release.2011-02-15

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

13 years agoencoding/line: fix line returned after EOF
Adam Langley [Tue, 15 Feb 2011 14:52:20 +0000 (09:52 -0500)]
encoding/line: fix line returned after EOF

Fixes #1509.

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

13 years agogodoc: don't hide package lookup error if there's no command with the same name
Robert Griesemer [Tue, 15 Feb 2011 01:41:47 +0000 (17:41 -0800)]
godoc: don't hide package lookup error if there's no command with the same name

Fixes #1514.

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

13 years agorpc: properly discard values.
Roger Peppe [Mon, 14 Feb 2011 22:51:08 +0000 (14:51 -0800)]
rpc: properly discard values.

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

13 years agoruntime: detect failed thread creation on Windows
Alex Brainman [Mon, 14 Feb 2011 22:42:25 +0000 (09:42 +1100)]
runtime: detect failed thread creation on Windows

Fixes #1495.

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

13 years agomakehtml: use append
Rob Pike [Mon, 14 Feb 2011 19:47:19 +0000 (11:47 -0800)]
makehtml: use append
The program is old and missed its opportunity.

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

13 years agotutorial: rework the introduction to give "Effective Go"
Rob Pike [Mon, 14 Feb 2011 19:25:00 +0000 (11:25 -0800)]
tutorial: rework the introduction to give "Effective Go"
prominence and downplay the course notes.

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

13 years agoarchive/zip: handle files with data descriptors
Andrew Gerrand [Mon, 14 Feb 2011 18:42:16 +0000 (05:42 +1100)]
archive/zip: handle files with data descriptors

Fixes #1471.

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

13 years agogob: decode into nil, this time for sure.
Rob Pike [Mon, 14 Feb 2011 18:17:30 +0000 (10:17 -0800)]
gob: decode into nil, this time for sure.

Yesterday's change was too simple-minded and failed if an
interface value was being discarded.  We need to parse the
data stream and remember any type information that arrives.

Also fix a minor bug when ignoring an interface: toss only what
we know about, not everything.

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

13 years agowindows: runtime: implemented console ctrl handler (SIGINT).
Hector Chu [Mon, 14 Feb 2011 17:15:13 +0000 (12:15 -0500)]
windows: runtime: implemented console ctrl handler (SIGINT).

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

13 years agobuild: run test/ directory first
Russ Cox [Mon, 14 Feb 2011 14:27:02 +0000 (09:27 -0500)]
build: run test/ directory first

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

13 years agogo/printer: line comments must always end in a newline
Robert Griesemer [Mon, 14 Feb 2011 03:27:02 +0000 (19:27 -0800)]
go/printer: line comments must always end in a newline

Fixes #1503.

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

13 years agogob: allow Decode(nil) and have it just discard the next value.
Rob Pike [Sun, 13 Feb 2011 02:03:54 +0000 (18:03 -0800)]
gob: allow Decode(nil) and have it just discard the next value.
Fixes #1489.

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

13 years agocode.html: update to reflect that package names need not be unique
Rob Pike [Sun, 13 Feb 2011 02:03:16 +0000 (18:03 -0800)]
code.html: update to reflect that package names need not be unique

Fixes #1507.

R=golang-dev, ehog.hedge, rsc
CC=golang-dev
https://golang.org/cl/4160049

13 years ago5ld: part of 64bit eor - forgot to check in.
Ken Thompson [Sat, 12 Feb 2011 04:13:57 +0000 (20:13 -0800)]
5ld: part of 64bit eor - forgot to check in.

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

13 years agogofmt: exclude testcase with incorrect syntax
Robert Griesemer [Sat, 12 Feb 2011 00:24:35 +0000 (16:24 -0800)]
gofmt: exclude testcase with incorrect syntax

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

13 years agostrconv/ftoa: avoid a double shift. (shifts by variables are expensive.)
Rob Pike [Sat, 12 Feb 2011 00:06:04 +0000 (16:06 -0800)]
strconv/ftoa: avoid a double shift. (shifts by variables are expensive.)

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

13 years agotesting: include elapsed time in output
Russ Cox [Fri, 11 Feb 2011 23:00:58 +0000 (18:00 -0500)]
testing: include elapsed time in output

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

13 years agogc: correct receiver in method missing error
Lorenzo Stoakes [Fri, 11 Feb 2011 22:47:58 +0000 (17:47 -0500)]
gc: correct receiver in method missing error

Fixes #1324.

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

13 years agosync: check Unlock of unlocked Mutex
Russ Cox [Fri, 11 Feb 2011 22:47:17 +0000 (17:47 -0500)]
sync: check Unlock of unlocked Mutex

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

13 years ago5ld: stoped generating 64-bit eor
Ken Thompson [Fri, 11 Feb 2011 21:22:35 +0000 (13:22 -0800)]
5ld: stoped generating 64-bit eor

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

13 years agosyscall: remove obsolete socket IO control
Mikio Hara [Fri, 11 Feb 2011 21:20:31 +0000 (16:20 -0500)]
syscall: remove obsolete socket IO control

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

13 years agohttp: add pipelining to ClientConn, ServerConn
Petar Maymounkov [Fri, 11 Feb 2011 20:05:47 +0000 (15:05 -0500)]
http: add pipelining to ClientConn, ServerConn

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

13 years agosyscall: add sockaddr_dl, sysctl with routing message support for darwin, freebsd
Mikio Hara [Fri, 11 Feb 2011 19:34:00 +0000 (14:34 -0500)]
syscall: add sockaddr_dl, sysctl with routing message support for darwin, freebsd

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

13 years agoruntime: check that SysReserve returns aligned memory
Russ Cox [Fri, 11 Feb 2011 19:32:34 +0000 (14:32 -0500)]
runtime: check that SysReserve returns aligned memory

R=iant, iant2
CC=golang-dev
https://golang.org/cl/4180043

13 years ago8l, runtime: place G and M pointers relative to _tos on Plan 9, instead of hardcoded...
Yuval Pavel Zholkover [Fri, 11 Feb 2011 18:39:05 +0000 (13:39 -0500)]
8l, runtime: place G and M pointers relative to _tos on Plan 9, instead of hardcoded values for USTKTOP.

This should allow executing both on native Plan 9 and inside 9vx.

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

13 years agobytes: fix bugs in buffer.ReadBytes
Evan Shaw [Fri, 11 Feb 2011 17:39:18 +0000 (12:39 -0500)]
bytes: fix bugs in buffer.ReadBytes

Fixes #1498.

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

13 years agocrypto/openpgp: minor updates to subpackages
Adam Langley [Fri, 11 Feb 2011 13:34:19 +0000 (08:34 -0500)]
crypto/openpgp: minor updates to subpackages

Now that packet/ is checked in, we can add its Makefile. Also, a couple
of updates to error/ and s2k/ for bugfixes and to use the new crypto
package.

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

13 years agofix example in inotify
Mathieu Lonjaret [Fri, 11 Feb 2011 13:30:34 +0000 (08:30 -0500)]
fix example in inotify

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

13 years agoflag: allow hexadecimal and octal input for integer flags.
Luuk van Dijk [Fri, 11 Feb 2011 11:23:54 +0000 (12:23 +0100)]
flag: allow hexadecimal and octal input for integer flags.

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

13 years agocrypto/openpgp/packet: add remainder of packet types.
Adam Langley [Fri, 11 Feb 2011 00:59:12 +0000 (19:59 -0500)]
crypto/openpgp/packet: add remainder of packet types.

(The unittest for Signature may seem a little small, but it's tested by
the higher level code.)

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

13 years agogodoc: godoc: Use IsAbs to test for absolute paths (fix for win32).
Robert Griesemer [Fri, 11 Feb 2011 00:32:51 +0000 (16:32 -0800)]
godoc: godoc: Use IsAbs to test for absolute paths (fix for win32).

One more case.

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

13 years agogodoc: Use IsAbs to test for absolute paths (fix for win32).
Yasuhiro Matsumoto [Fri, 11 Feb 2011 00:00:24 +0000 (16:00 -0800)]
godoc: Use IsAbs to test for absolute paths (fix for win32).

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

13 years agosyscall: change windows apis with bool return value to return errno instead
Alex Brainman [Thu, 10 Feb 2011 23:15:51 +0000 (10:15 +1100)]
syscall: change windows apis with bool return value to return errno instead

This change is to make these apis similar to their unix counterparts.

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

13 years agohttp: add Server type supporting timeouts
Brad Fitzpatrick [Thu, 10 Feb 2011 22:36:22 +0000 (14:36 -0800)]
http: add Server type supporting timeouts

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

13 years agoruntime: complete windows SysReserve
Russ Cox [Thu, 10 Feb 2011 20:39:08 +0000 (15:39 -0500)]
runtime: complete windows SysReserve

Should fix windows/386 build.

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

13 years agoencoding/binary: update package doc string to be more comprehensive
Andrew Gerrand [Thu, 10 Feb 2011 19:56:31 +0000 (06:56 +1100)]
encoding/binary: update package doc string to be more comprehensive

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

13 years agofmt: fix minor typo
Roger Peppe [Thu, 10 Feb 2011 19:01:05 +0000 (11:01 -0800)]
fmt: fix minor typo

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

13 years agojson: correct Marshal documentation
Andrew Gerrand [Thu, 10 Feb 2011 18:48:14 +0000 (13:48 -0500)]
json: correct Marshal documentation

Fixes #1488.

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

13 years agodebug/pe: ImportedSymbols fixes
Wei Guangjing [Thu, 10 Feb 2011 15:22:32 +0000 (10:22 -0500)]
debug/pe: ImportedSymbols fixes

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

13 years agocrypto/openpgp/packet: four more packet types.
Adam Langley [Thu, 10 Feb 2011 12:56:30 +0000 (07:56 -0500)]
crypto/openpgp/packet: four more packet types.

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

13 years agoruntime: take the callback return value from the stack
Hector Chu [Thu, 10 Feb 2011 12:02:27 +0000 (23:02 +1100)]
runtime: take the callback return value from the stack

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

13 years agosrc/*: fix incorrect prints found by govet
Rob Pike [Thu, 10 Feb 2011 01:11:01 +0000 (17:11 -0800)]
src/*: fix incorrect prints found by govet

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

13 years agopeep: more bugs
Ken Thompson [Thu, 10 Feb 2011 00:03:02 +0000 (16:03 -0800)]
peep: more bugs

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

13 years agobuffer.go: minor optimization, expanded comment
Robert Griesemer [Wed, 9 Feb 2011 23:09:08 +0000 (15:09 -0800)]
buffer.go: minor optimization, expanded comment

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

13 years agogodoc: optimizations: don't call Write for 0-length data
Robert Griesemer [Wed, 9 Feb 2011 23:06:05 +0000 (15:06 -0800)]
godoc: optimizations: don't call Write for 0-length data

- guard some calls to Write that frequently may have 0-length data
- fix an invariant

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

13 years agotemplate: reverse order of arguments to Execute
Rob Pike [Wed, 9 Feb 2011 22:23:01 +0000 (14:23 -0800)]
template: reverse order of arguments to Execute

In line with other functions such as Fprintf, put the
thing to be written first.

Apologies for the breakages this is sure to cause.

R=rsc, gri, adg, eds, r2, aam
CC=golang-dev
https://golang.org/cl/4169042

13 years agosrcextract: HTML-escape output if so desired
Robert Griesemer [Wed, 9 Feb 2011 22:08:19 +0000 (14:08 -0800)]
srcextract: HTML-escape output if so desired

This functionality was removed with CL 4169041.

Minor simplifications.

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

13 years agopeep: bug fix
Ken Thompson [Wed, 9 Feb 2011 21:13:17 +0000 (13:13 -0800)]
peep: bug fix

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

13 years agorun.bash: must make codelab before we can test it.
Rob Pike [Wed, 9 Feb 2011 20:46:49 +0000 (12:46 -0800)]
run.bash: must make codelab before we can test it.
this will break the build, but it's already silently broken.

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

13 years agocodelab: update due to recent changes in go/printer
Rob Pike [Wed, 9 Feb 2011 20:46:34 +0000 (12:46 -0800)]
codelab: update due to recent changes in go/printer

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

13 years agoruntime: fix memory allocation on 386
Russ Cox [Wed, 9 Feb 2011 20:08:30 +0000 (15:08 -0500)]
runtime: fix memory allocation on 386

BSD and Darwin require an extra page between
end and the first mapping, and Windows has various
memory in the way too.

Fixes #1464.

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

13 years agoruntime: new allocation strategy for amd64
Russ Cox [Wed, 9 Feb 2011 19:38:33 +0000 (14:38 -0500)]
runtime: new allocation strategy for amd64

Do not reserve virtual address space.
Instead, assume it will be there when we need it,
and crash loudly if that assumption is violated.
Reserving the address space gets charged to
ulimit -v, which exceeds commonly set limits.

http://groups.google.com/group/golang-dev/msg/7c477af5f5a8dd2c

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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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