]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agorelease.2010-11-23 weekly.2010-11-23
Andrew Gerrand [Tue, 23 Nov 2010 23:47:59 +0000 (10:47 +1100)]
release.2010-11-23

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

14 years agodoc: add link to codewalks.
Yves Junqueira [Mon, 22 Nov 2010 23:43:16 +0000 (10:43 +1100)]
doc: add link to codewalks.

Fixes #1281.

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

14 years agoDocumentation: how to write Makefiles for commands.
Yves Junqueira [Mon, 22 Nov 2010 23:42:04 +0000 (10:42 +1100)]
Documentation: how to write Makefiles for commands.

Fixes #1282.

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

14 years agonet: add ReadFrom and WriteTo windows version.
Wei Guangjing [Mon, 22 Nov 2010 16:01:30 +0000 (11:01 -0500)]
net: add ReadFrom and WriteTo windows version.

Fixes #1275.

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

14 years agogc: better error message for bad type in channel send
Anthony Martin [Mon, 22 Nov 2010 15:59:51 +0000 (10:59 -0500)]
gc: better error message for bad type in channel send

# test program
1 package main
2
3 type C chan int
4
5 func F(c C) {
6  c <- true
7 }

# old error
test.go:6: cannot use true (type bool) as type int in function argument

# new error
test.go:6: cannot use true (type bool) as type int in channel send

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

14 years agoposition.go: more flexible AddFile method
Robert Griesemer [Sun, 21 Nov 2010 05:30:36 +0000 (21:30 -0800)]
position.go: more flexible AddFile method

This will make it easier to use Pos values
together with suffix arrays by slightly de-
coupling the mapping of Pos values to global
offsets.

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

14 years agomore on dynamic hash in compound literals.
Ken Thompson [Sat, 20 Nov 2010 23:58:28 +0000 (15:58 -0800)]
more on dynamic hash in compound literals.
thanks to vskrap, andrey mirtchovski,
and Eoghan Sherry.

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

14 years agogodoc: use correct time stamp to indicate accuracy of search result
Robert Griesemer [Fri, 19 Nov 2010 22:05:12 +0000 (14:05 -0800)]
godoc: use correct time stamp to indicate accuracy of search result

- compare against fsModified to check if index is out of date
- don't change fsModified if there are no user-mapped file systems

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

14 years ago crypto/cipher: add CFB and OCFB mode.
Adam Langley [Fri, 19 Nov 2010 21:17:58 +0000 (16:17 -0500)]
crypto/cipher: add CFB and OCFB mode.

        (Files which I left out of the initial commit to keep it small.)

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

14 years agoindex/suffixarray: use sort.Search
Russ Cox [Fri, 19 Nov 2010 21:04:25 +0000 (16:04 -0500)]
index/suffixarray: use sort.Search

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

14 years agocrypto/cipher: add package
Adam Langley [Fri, 19 Nov 2010 19:12:07 +0000 (14:12 -0500)]
crypto/cipher: add package

cipher is intended to replace crypto/block over time. This
change only adds basic parts: CBC and CTR mode and doesn't add
the package to the top-level Makefile.

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

14 years agogodoc: compute search index for all file systems under godoc's observation
Robert Griesemer [Fri, 19 Nov 2010 03:55:38 +0000 (19:55 -0800)]
godoc: compute search index for all file systems under godoc's observation

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

14 years agoadjustable hash code in
Ken Thompson [Thu, 18 Nov 2010 21:07:34 +0000 (13:07 -0800)]
adjustable hash code in
typecheck of composit literals
to get rid of n^2 behavior.

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

14 years agoMakefiles: Don't define _64BIT now that 6c does it by default.
Ian Lance Taylor [Thu, 18 Nov 2010 20:34:47 +0000 (12:34 -0800)]
Makefiles: Don't define _64BIT now that 6c does it by default.

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

14 years agocgo: Print required space after parameter name in wrapper function.
Ian Lance Taylor [Thu, 18 Nov 2010 20:34:04 +0000 (12:34 -0800)]
cgo: Print required space after parameter name in wrapper function.

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

14 years ago6c: automatically #define _64BIT.
Ian Lance Taylor [Thu, 18 Nov 2010 18:26:41 +0000 (10:26 -0800)]
6c: automatically #define _64BIT.

This makes it much easier to use a tool like Swig which needs
to run either 8c or 6c on generated code which #include's
"runtime.h".

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

14 years agosort: invert meaning of f in Search
Russ Cox [Thu, 18 Nov 2010 16:46:07 +0000 (11:46 -0500)]
sort: invert meaning of f in Search

Backwards incompatible change, but makes
it easier to reason about non-idiomatic searches:
now f specifies what is sought.

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

14 years agosort: edit doc comment for Search
Russ Cox [Thu, 18 Nov 2010 12:16:09 +0000 (07:16 -0500)]
sort: edit doc comment for Search

Change comment to be more generic,
with indexed data structure search as
one common use case.

Fix typo []data.

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

14 years agorpc: add RegisterName to allow override of default type name
Andrew Gerrand [Thu, 18 Nov 2010 03:14:42 +0000 (14:14 +1100)]
rpc: add RegisterName to allow override of default type name

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

14 years agogo/token position: code improvements per rsc's suggestion
Robert Griesemer [Thu, 18 Nov 2010 01:00:25 +0000 (17:00 -0800)]
go/token position: code improvements per rsc's suggestion

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

14 years agoposition.go: test cases for token.Pos
Robert Griesemer [Wed, 17 Nov 2010 20:17:40 +0000 (12:17 -0800)]
position.go: test cases for token.Pos

- adjustments to position.go due to changed sort.Search semantics
- various minor fixes

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

14 years agogodoc: bug fix in relativePath
Robert Griesemer [Wed, 17 Nov 2010 19:03:33 +0000 (11:03 -0800)]
godoc: bug fix in relativePath

This fixes a problem with relativePath, where
a prefix was not recognized because it ended
in "//" as opposed to just "/".

Also: Minor unrelated cleanup of a declaration.

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

14 years agotoken/position: implemented Pos
Robert Griesemer [Sat, 13 Nov 2010 00:39:33 +0000 (16:39 -0800)]
token/position: implemented Pos

A pos value represents a file-set specific, accurate
source position value. It is 8x smaller in size than
the corresponding Position value (4 bytes vs 32 bytes).

Using Pos values instead of Position values in AST
saves approx. 25MBytes of memory when running godoc
on the current repository.

This CL introduces the Pos, File, and FileSet data
types; it does not affect existing code. Another
(pending CL) will make the change to all dependent
source files.

Missing: tests

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

14 years agoexec: enable tests on windows
Alex Brainman [Sat, 13 Nov 2010 00:15:09 +0000 (11:15 +1100)]
exec: enable tests on windows

Fixes #1104.

R=golang-dev, mattn, r
CC=Joe Poirier, golang-dev
https://golang.org/cl/3051041

14 years agosort.Search: slightly more precise wording in comment
Robert Griesemer [Sat, 13 Nov 2010 00:08:56 +0000 (16:08 -0800)]
sort.Search: slightly more precise wording in comment

(+ some cosmetic changes)

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

14 years agosort: simplify semantics of Search.
Roger Peppe [Fri, 12 Nov 2010 23:57:33 +0000 (15:57 -0800)]
sort: simplify semantics of Search.
As discussed earlier.

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

14 years ago Remove unnecessary casts in Get() methods.
Kyle Consalus [Fri, 12 Nov 2010 23:25:25 +0000 (15:25 -0800)]
Remove unnecessary casts in Get() methods.
    Cleaner, but also results in a 25%+ performance improvement for Get()/SetValue() on my machine.

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

14 years agoarm is not little-endian
Ken Thompson [Fri, 12 Nov 2010 22:27:55 +0000 (14:27 -0800)]
arm is not little-endian

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

14 years agostrings: add LastIndexAny
Benny Siegert [Fri, 12 Nov 2010 20:47:50 +0000 (12:47 -0800)]
strings: add LastIndexAny

The need for a LastIndexAny function has come up in the discussion
for https://golang.org/cl/3008041/. This function is
implemented analogously to lastIndexFunc, using functions from
the utf8 package.

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

14 years agogc: fix arm build
Rob Pike [Fri, 12 Nov 2010 20:46:46 +0000 (12:46 -0800)]
gc: fix arm build

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

14 years agocrypto/elliptic: add package
Adam Langley [Fri, 12 Nov 2010 19:55:32 +0000 (14:55 -0500)]
crypto/elliptic: add package

elliptic implements several standard elliptic curves over prime fields.

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

14 years agoFixed recover() documentation.
Anschel Schaffer-Cohen [Fri, 12 Nov 2010 17:57:46 +0000 (09:57 -0800)]
Fixed recover() documentation.

Added a "return" to the end of an example which previously threw a compile error if used.

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

14 years agolast of the arm conversions
Ken Thompson [Fri, 12 Nov 2010 03:54:35 +0000 (19:54 -0800)]
last of the arm conversions

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

14 years agosort.Search: added extra test to verify efficiency
Robert Griesemer [Thu, 11 Nov 2010 22:52:37 +0000 (14:52 -0800)]
sort.Search: added extra test to verify efficiency

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

14 years agosort.Search: more typos
Robert Griesemer [Thu, 11 Nov 2010 21:52:49 +0000 (13:52 -0800)]
sort.Search: more typos

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

14 years ago crypto/x509: policy OID support and fixes.
Adam Langley [Thu, 11 Nov 2010 20:50:40 +0000 (15:50 -0500)]
crypto/x509: policy OID support and fixes.

        * Add support for certificate policy identifiers
        * Fix the version number of generated certificates
        * Fix the parsing of version numbers
        * Fix the case of multiple name entries (it should have been a list of
          tagged values, not a tagged list of values).

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

14 years agosort.Search: fix typo in documentation
Robert Griesemer [Thu, 11 Nov 2010 18:51:59 +0000 (10:51 -0800)]
sort.Search: fix typo in documentation

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

14 years agoruntime: free memory allocated by windows CommandLineToArgv
Alex Brainman [Wed, 10 Nov 2010 23:38:45 +0000 (10:38 +1100)]
runtime: free memory allocated by windows CommandLineToArgv

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

14 years agoruntime: omit runtime· prefix from static functions (in ARM code).
Ian Lance Taylor [Wed, 10 Nov 2010 23:23:20 +0000 (15:23 -0800)]
runtime: omit runtime· prefix from static functions (in ARM code).

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

14 years agoruntime: Add some missing runtime· prefixes to ARM asm code.
Ian Lance Taylor [Wed, 10 Nov 2010 23:10:19 +0000 (15:10 -0800)]
runtime: Add some missing runtime· prefixes to ARM asm code.

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

14 years agorelease part 2
Rob Pike [Wed, 10 Nov 2010 22:24:16 +0000 (14:24 -0800)]
release part 2

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

14 years agorelease step 1 weekly.2010-11-10
Rob Pike [Wed, 10 Nov 2010 22:22:40 +0000 (14:22 -0800)]
release step 1

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

14 years agopath: Fix Glob when it finds a file in directory position.
Ian Lance Taylor [Wed, 10 Nov 2010 21:25:49 +0000 (13:25 -0800)]
path: Fix Glob when it finds a file in directory position.

When searching a list of directories, the files which match
the pattern are accumulated in a slice.  If the glob has a
wildcard for the directory, and the wildcard matches a file
rather than a directory, then the files found so far are
discarded.  E.g., path.Glob("*/x") in a directory which
contains both files and subdirectories.  This patch avoids
discarding matches found so far when a file is found.

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

14 years agosort: binary search for sorted slices
Robert Griesemer [Wed, 10 Nov 2010 21:19:28 +0000 (13:19 -0800)]
sort: binary search for sorted slices

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

14 years agotesting: delete redundant name argument to Benchmark().
Roger Peppe [Wed, 10 Nov 2010 17:39:26 +0000 (09:39 -0800)]
testing: delete redundant name argument to Benchmark().
[it was a carry over from the previous iteration]

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

14 years agofix error converting result of complex
Ken Thompson [Wed, 10 Nov 2010 01:39:36 +0000 (17:39 -0800)]
fix error converting result of complex
division. resolves issue 1261.

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

14 years agogo/ast: change embedded token.Position fields to named fields
Robert Griesemer [Tue, 9 Nov 2010 19:26:54 +0000 (11:26 -0800)]
go/ast: change embedded token.Position fields to named fields

This is in preparation for a different position representation.
It also resolves situations where a node would be printed as
it's node position simply because the embedded token.Position
has a String method.

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

14 years agodoc: fix go_spec spelling errors
Peter Mundy [Tue, 9 Nov 2010 18:10:57 +0000 (10:10 -0800)]
doc: fix go_spec spelling errors

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

14 years agocontainer/list: make Remove return Value of removed element.
Roger Peppe [Tue, 9 Nov 2010 16:58:23 +0000 (08:58 -0800)]
container/list: make Remove return Value of removed element.
When it is known that there is already at least one element in the
list, it is awkwardly verbose to use three lines and an extra
variable declaration to remove the first or last item (a common
case), rather than use a simple expression.

a stack:
stk.PushFront(x)
x = stk.Front().Remove().(T)

vs.
stk.PushFront(x)
e := stk.Front()
e.Remove()
x = e.Value.(T)
[An alternative CL might be to add PopFront and PopBack methods].

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

14 years agodoc: fix go_spec spelling error
Peter Mundy [Tue, 9 Nov 2010 16:46:13 +0000 (08:46 -0800)]
doc: fix go_spec spelling error

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

14 years agobytes: SSE for bytes.IndexByte on amd64
Evan Shaw [Tue, 9 Nov 2010 01:33:53 +0000 (17:33 -0800)]
bytes: SSE for bytes.IndexByte on amd64

Performance on 2.8 GHz Intel Core i7:

Before:
BenchmarkIndexByte4K  1000000              2997 ns/op        1366.70 MB/s
BenchmarkIndexByte4M      500           3049772 ns/op        1375.28 MB/s
BenchmarkIndexByte64M      50          49582280 ns/op        1353.48 MB/s

After:
BenchmarkIndexByte4K 10000000               298 ns/op       13744.97 MB/s
BenchmarkIndexByte4M    10000            285993 ns/op       14665.76 MB/s
BenchmarkIndexByte64M     500           4618172 ns/op       14531.48 MB/s

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

14 years agojson: don't indirect before testing for custom unmarshaler
Rob Pike [Mon, 8 Nov 2010 23:33:00 +0000 (15:33 -0800)]
json: don't indirect before testing for custom unmarshaler
Fixes #1260.

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

14 years agoos.Expand: don't call append for each non-variable char
Robert Griesemer [Mon, 8 Nov 2010 23:13:35 +0000 (15:13 -0800)]
os.Expand: don't call append for each non-variable char

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

14 years agostrconv: quote erroneous string in errors
Rob Pike [Mon, 8 Nov 2010 23:08:41 +0000 (15:08 -0800)]
strconv: quote erroneous string in errors
Fixes #1253.

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

14 years agoos: add Expand function to evaluate environment variables.
Rob Pike [Mon, 8 Nov 2010 21:25:01 +0000 (13:25 -0800)]
os: add Expand function to evaluate environment variables.

Fixes #1258.

R=gri, msolo, bradfitzpatrick, r2
CC=golang-dev
https://golang.org/cl/2988041

14 years ago6l/8l: generate dwarf variable names with disambiguating suffix.
Luuk van Dijk [Mon, 8 Nov 2010 18:48:21 +0000 (19:48 +0100)]
6l/8l: generate dwarf variable names with disambiguating suffix.

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

14 years agodoc/codewalk: update for changes in log package
Andrey Mirtchovski [Mon, 8 Nov 2010 17:58:57 +0000 (09:58 -0800)]
doc/codewalk: update for changes in log package

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

14 years agonet: fix windows build
Wei Guangjing [Sat, 6 Nov 2010 03:08:18 +0000 (23:08 -0400)]
net: fix windows build

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

14 years agotesting: rename type Test to InternalTest
Peter Mundy [Sat, 6 Nov 2010 03:05:53 +0000 (23:05 -0400)]
testing: rename type Test to InternalTest

type Benchmark has been renamed to InternalBenchmark

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

14 years agoenv.bash: more quoting in case of spaces
Russ Cox [Sat, 6 Nov 2010 03:04:08 +0000 (23:04 -0400)]
env.bash: more quoting in case of spaces

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

14 years agolibmach: detail for darwin errors
Russ Cox [Sat, 6 Nov 2010 03:03:53 +0000 (23:03 -0400)]
libmach: detail for darwin errors

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

14 years agosyscall: use 64-bit file size for truncation on Linux
Peter Mundy [Fri, 5 Nov 2010 20:41:23 +0000 (16:41 -0400)]
syscall: use 64-bit file size for truncation on Linux

Truncate and Ftruncate for 32-bit Linux should use 64-bit
offset system calls.

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

14 years agoio: use SetFinalizer more elegantly in Pipe
Christopher Wedgwood [Fri, 5 Nov 2010 19:05:39 +0000 (15:05 -0400)]
io: use SetFinalizer more elegantly in Pipe

(this works now that issue 751 is resolved)

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

14 years agogob: don't add "." if package path is empty when registering a type.
Rob Pike [Fri, 5 Nov 2010 18:22:28 +0000 (11:22 -0700)]
gob: don't add "." if package path is empty when registering a type.

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

14 years agogc: doc nit
Eric Clark [Fri, 5 Nov 2010 18:21:54 +0000 (11:21 -0700)]
gc: doc nit

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

14 years agonet: provide public access to file descriptors
Keith Rarick [Fri, 5 Nov 2010 18:02:03 +0000 (14:02 -0400)]
net: provide public access to file descriptors

Fixes #918.

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

14 years agoA+C: Keith Rarick (individual CLA)
Russ Cox [Fri, 5 Nov 2010 18:01:52 +0000 (14:01 -0400)]
A+C: Keith Rarick (individual CLA)

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

14 years agoruntime: explain nacl closure failure
Russ Cox [Fri, 5 Nov 2010 18:00:46 +0000 (14:00 -0400)]
runtime: explain nacl closure failure

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

14 years ago6l: More SSE instruction fixes
Evan Shaw [Fri, 5 Nov 2010 17:59:53 +0000 (13:59 -0400)]
6l: More SSE instruction fixes

PSADBW and PSHUFL had the wrong prefixes.

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

14 years agopath: add Glob
Benny Siegert [Fri, 5 Nov 2010 17:47:56 +0000 (10:47 -0700)]
path: add Glob

As discussed in http://groups.google.com/group/golang-dev/browse_thread/thread/926b7d550d98ec9e,
add a simple "path expander" function, which returns all the
files matching the given pattern. This function is called Glob
after glob(3) in libc.

Also add a convenience function, hasMeta, that checks whether
a string contains one of the characters which are specially handled
by Match.

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

14 years agoCLA: Benny Siegert <bsiegert@gmail.com>
Rob Pike [Fri, 5 Nov 2010 17:47:35 +0000 (10:47 -0700)]
CLA: Benny Siegert <bsiegert@gmail.com>

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

14 years agogob: when sending an interface value, indirect down to the
Rob Pike [Fri, 5 Nov 2010 17:36:27 +0000 (10:36 -0700)]
gob: when sending an interface value, indirect down to the
underlying type; otherwise encoding fails when sending
a pointer value.

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

14 years agocrypto/tls: use pool building for certificate checking
Adam Langley [Fri, 5 Nov 2010 13:54:56 +0000 (09:54 -0400)]
crypto/tls: use pool building for certificate checking

Previously we checked the certificate chain from the leaf
upwards and expected to jump from the last cert in the chain to
a root certificate.

Although technically correct, there are a number of sites with
problems including out-of-order certs, superfluous certs and
missing certs.

The last of these requires AIA chasing, which is a lot of
complexity. However, we can address the more common cases by
using a pool building algorithm, as browsers do.

We build a pool of root certificates and a pool from the
server's chain. We then try to build a path to a root
certificate, using either of these pools.

This differs from the behaviour of, say, Firefox in that Firefox
will accumulate intermedite certificate in a persistent pool in
the hope that it can use them to fill in gaps in future chains.

We don't do that because it leads to confusing errors which only
occur based on the order to sites visited.

This change also enabled SNI for tls.Dial so that sites will return
the correct certificate chain.

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

14 years agoruntime: fix windows build
Alex Brainman [Fri, 5 Nov 2010 06:27:12 +0000 (17:27 +1100)]
runtime: fix windows build

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

14 years agodoc: make root.html's blog section less cluttered.
Nigel Tao [Fri, 5 Nov 2010 05:13:58 +0000 (16:13 +1100)]
doc: make root.html's blog section less cluttered.

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

14 years agogo spec: line comments may end in EOF
Robert Griesemer [Thu, 4 Nov 2010 20:48:32 +0000 (13:48 -0700)]
go spec: line comments may end in EOF

Consistency argument: A valid Go program should
remain valid after stripping leading and trailing
whitespace. This was not true so far if the last
text in the source was a line comment.

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

14 years agoSmall addition to previous optimization of memequal as discussed here: http://groups...
Graham Miller [Thu, 4 Nov 2010 20:45:18 +0000 (13:45 -0700)]
Small addition to previous optimization of memequal as discussed here: http://groups.google.com/group/golang-nuts/browse_thread/thread/f591ba36d83723c0/9aba02d344045f38

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

14 years agogo/scanner: line comments may end in EOF
Robert Griesemer [Thu, 4 Nov 2010 20:15:42 +0000 (13:15 -0700)]
go/scanner: line comments may end in EOF

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

14 years agogc: line comments may end in EOF
Russ Cox [Thu, 4 Nov 2010 20:04:04 +0000 (16:04 -0400)]
gc: line comments may end in EOF

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

14 years agoruntime: ,s/[a-zA-Z0-9_]+/runtime·&/g, almost
Russ Cox [Thu, 4 Nov 2010 18:00:19 +0000 (14:00 -0400)]
runtime: ,s/[a-zA-Z0-9_]+/runtime·&/g, almost

Prefix all external symbols in runtime by runtime·,
to avoid conflicts with possible symbols of the same
name in linked-in C libraries.  The obvious conflicts
are printf, malloc, and free, but hide everything to
avoid future pain.

The symbols left alone are:

** known to cgo **
_cgo_free
_cgo_malloc
libcgo_thread_start
initcgo
ncgocall

** known to linker **
_rt0_$GOARCH
_rt0_$GOARCH_$GOOS
text
etext
data
end
pclntab
epclntab
symtab
esymtab

** known to C compiler **
_divv
_modv
_div64by32
etc (arch specific)

Tested on darwin/386, darwin/amd64, linux/386, linux/amd64.

Built (but not tested) for freebsd/386, freebsd/amd64, linux/arm, windows/386.

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

14 years agocodereview: more utf-8 nonsense
Russ Cox [Thu, 4 Nov 2010 17:58:32 +0000 (13:58 -0400)]
codereview: more utf-8 nonsense

To annoy hg: Μπορώ να φάω σπασμένα γυαλιά χωρίς να πάθω τίποτα.

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

14 years agoUse future official DWARF language code for Go.
Ian Lance Taylor [Thu, 4 Nov 2010 15:45:25 +0000 (08:45 -0700)]
Use future official DWARF language code for Go.

http://dwarfstd.org/ShowIssue.php?issue=101014.1&type=open

Informally accepted for future DWARF 5.

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

14 years agonet: fix LookupSRV
Chris Jones [Thu, 4 Nov 2010 14:30:39 +0000 (10:30 -0400)]
net: fix LookupSRV

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

14 years agoA+C: add Chris Jones (individual CLA)
Russ Cox [Thu, 4 Nov 2010 14:30:13 +0000 (10:30 -0400)]
A+C: add Chris Jones (individual CLA)

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

14 years agoadd hardware floating point.
Ken Thompson [Thu, 4 Nov 2010 00:31:07 +0000 (17:31 -0700)]
add hardware floating point.
currently, softfloat does not work and
there are some unsigned-to-float conversion errors.

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

14 years agounits: fix compilation
Rob Pike [Wed, 3 Nov 2010 19:20:37 +0000 (12:20 -0700)]
units: fix compilation

R=ken2, ken3
CC=golang-dev
https://golang.org/cl/2865041

14 years agoEffective Go: correct error in recent edit: "..." is in call to Sprintln, not Output.
Rob Pike [Wed, 3 Nov 2010 18:09:43 +0000 (11:09 -0700)]
Effective Go: correct error in recent edit: "..." is in call to Sprintln, not Output.

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

14 years agocrypto: switch block ciphers to detination first.
Adam Langley [Wed, 3 Nov 2010 14:43:43 +0000 (10:43 -0400)]
crypto: switch block ciphers to detination first.

Previously all the functions took two arguments: src, dst. This is the
reverse of the usual Go style and worth changing sooner rather than
later.

Unfortunately, this is a change that the type system doesn't help
with. However, it's not a subtle change: any unittest worth the name
should catch this.

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

14 years agocrypto: add cast5
Adam Langley [Wed, 3 Nov 2010 14:39:15 +0000 (10:39 -0400)]
crypto: add cast5

CAST5 is the default OpenPGP cipher.

(This won't make Rob any happier about the size of crypto/, of course.)

It already has dst, src in that order but it doesn't have any users yet so I figure it's better than changing it later.

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

14 years agotag release.2010-11-02
Andrew Gerrand [Wed, 3 Nov 2010 00:50:52 +0000 (11:50 +1100)]
tag release.2010-11-02

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

14 years agorelease.2010-11-02 weekly.2010-11-02
Andrew Gerrand [Wed, 3 Nov 2010 00:49:22 +0000 (11:49 +1100)]
release.2010-11-02

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

14 years agosync: fix typo in documentation
Robert Griesemer [Tue, 2 Nov 2010 23:01:07 +0000 (16:01 -0700)]
sync: fix typo in documentation

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

14 years agoFix a deadlock bug in the rpc client. The panic will trigger
Kai Backman [Tue, 2 Nov 2010 21:04:56 +0000 (14:04 -0700)]
Fix a deadlock bug in the rpc client. The panic will trigger
regularly when client connections are flaky (probably another
issue).

(credits to jussi@tinkercad.com for finding the issue)

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

14 years agonetchan: fix locking bug.
Rob Pike [Tue, 2 Nov 2010 17:58:27 +0000 (10:58 -0700)]
netchan: fix locking bug.
There's no need to hold the client mutex when calling encode, since encode itself
uses a mutex to make the writes atomic.  However, we need to keep
the messages ordered, so add a mutex for that purpose alone.
Fixes #1244.

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

14 years agogo/scanner: removed scanner/internal-only uses of token.Position
Robert Griesemer [Tue, 2 Nov 2010 17:38:07 +0000 (10:38 -0700)]
go/scanner: removed scanner/internal-only uses of token.Position

First step towards a more light-weight implementation of token.Position:
- only use token.Position for reporting token and error position
- use offsets only for scanner control
- no interface changes yet

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

14 years agoEffective Go: append and a few words about ...
Rob Pike [Tue, 2 Nov 2010 04:46:04 +0000 (21:46 -0700)]
Effective Go: append and a few words about ...

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

14 years agotest/ken/convert.go: add conversion torture test
Rob Pike [Tue, 2 Nov 2010 00:49:06 +0000 (17:49 -0700)]
test/ken/convert.go: add conversion torture test
(written by ken)

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

14 years ago8l: pe generation fixes
Alex Brainman [Mon, 1 Nov 2010 23:56:56 +0000 (10:56 +1100)]
8l: pe generation fixes

Restore ability to have different file and
section alignment in generated pe file.

Stop generating .bss pe section, it is
part of .data now.

Some code refactoring.

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

14 years agofix build
Robert Griesemer [Mon, 1 Nov 2010 22:25:39 +0000 (15:25 -0700)]
fix build

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

14 years agoUse strings.Contains in src/cmd/...
Brad Fitzpatrick [Mon, 1 Nov 2010 22:21:35 +0000 (15:21 -0700)]
Use strings.Contains in src/cmd/...

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