]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agoopenpgp: Fix improper := shadowing
Gustavo Niemeyer [Tue, 12 Apr 2011 14:48:05 +0000 (11:48 -0300)]
openpgp: Fix improper := shadowing

R=golang-dev, agl1, jnml
CC=golang-dev
https://golang.org/cl/4381058

14 years agoimage/ycbcr: new package.
Nigel Tao [Tue, 12 Apr 2011 12:32:03 +0000 (22:32 +1000)]
image/ycbcr: new package.

R=r, rsc, nigeltao_gnome
CC=golang-dev, raph
https://golang.org/cl/4374043

14 years agonet: fix laddr typo in test code.
Nigel Tao [Tue, 12 Apr 2011 00:36:41 +0000 (10:36 +1000)]
net: fix laddr typo in test code.

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

14 years agold: fix dwarf decoding of strings for struct's fieldnames
Luuk van Dijk [Mon, 11 Apr 2011 20:38:37 +0000 (16:38 -0400)]
ld: fix dwarf decoding of strings for struct's fieldnames

Moved Sym printing to Yconv.
Fixed warning in data.c

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

14 years agohttp: fix incorrect prints found by govet
Robert Hencke [Mon, 11 Apr 2011 20:05:08 +0000 (13:05 -0700)]
http: fix incorrect prints found by govet

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

14 years agosyscall: fix StartProcess in Plan 9
Fazlul Shahriar [Mon, 11 Apr 2011 19:39:53 +0000 (12:39 -0700)]
syscall: fix StartProcess in Plan 9

This makes os_test.TestStartProcess test from os package pass.

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

14 years agocrypto/x509: expose complete DER data
Mikkel Krautz [Mon, 11 Apr 2011 15:20:12 +0000 (11:20 -0400)]
crypto/x509: expose complete DER data

R=agl1
CC=golang-dev
https://golang.org/cl/4376049

14 years agoasn1: Implement correct marshalling of length octets
Luit van Drongelen [Mon, 11 Apr 2011 14:28:34 +0000 (10:28 -0400)]
asn1: Implement correct marshalling of length octets

Fixes #1683

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

14 years agoA+C: Luit van Drongelen (individual CLA)
Russ Cox [Mon, 11 Apr 2011 14:20:42 +0000 (10:20 -0400)]
A+C: Luit van Drongelen (individual CLA)

R=agl1
CC=golang-dev
https://golang.org/cl/4367051

14 years agonet: disable multicast tests by default.
Dave Cheney [Mon, 11 Apr 2011 00:39:21 +0000 (10:39 +1000)]
net: disable multicast tests by default.

Fixes #1649.

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

14 years agomisc/vim: update type highlighting for new reflect package
David Symonds [Sun, 10 Apr 2011 22:48:19 +0000 (08:48 +1000)]
misc/vim: update type highlighting for new reflect package

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

14 years agoarchive/zip: add new type ReadCloser, make OpenReader return it.
Dmitry Chestnykh [Sun, 10 Apr 2011 01:23:23 +0000 (11:23 +1000)]
archive/zip: add new type ReadCloser, make OpenReader return it.
Fixes #1678.

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

14 years agold: 25% faster
Russ Cox [Sat, 9 Apr 2011 13:44:20 +0000 (09:44 -0400)]
ld: 25% faster

The ld time was dominated by symbol table processing, so
  * increase hash table size
  * emit fewer symbols in gc (just 1 per string, 1 per type)
  * add read-only lookup to avoid creating spurious symbols
  * add linked list to speed whole-table traversals

Breaks dwarf generator (no idea why), so disable dwarf.

Reduces time for 6l to link godoc by 25%.

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

14 years agogo/printer, gofmt: use blank to separate import rename from import path
Robert Griesemer [Fri, 8 Apr 2011 22:47:21 +0000 (15:47 -0700)]
go/printer, gofmt: use blank to separate import rename from import path

Note that declarations.golden is not using spaces for alignment (so
that the alignment tabs are visible) which is why this change affects
the test cases significantly. gofmt uses spaces for alignment (by default)
and only tabs for indentation.

gofmt -w src misc (no changes)

Fixes #1673.

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

14 years agobig: don't crash when printing nil ints
Adam Langley [Fri, 8 Apr 2011 19:43:19 +0000 (15:43 -0400)]
big: don't crash when printing nil ints

"%#v" of a structure with *big.Int's tends to crash a lot otherwise.

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

14 years ago8g: optimize byte mov
Russ Cox [Fri, 8 Apr 2011 17:53:59 +0000 (13:53 -0400)]
8g: optimize byte mov

Rewrite MOVB with less expensive
instruction when possible.

Suggested by atomic symbol.

benchmark                                        old ns/op    new ns/op    delta
crc32.BenchmarkCrc32KB                               13066         3942  -69.83%
crc64.BenchmarkCrc64KB                                8780         5949  -32.24%
lzw.BenchmarkDecoder1e4                             771224       636538  -17.46%
lzw.BenchmarkDecoder1e5                            7101218      6096634  -14.15%
lzw.BenchmarkDecoder1e6                           69762020     60789400  -12.86%
lzw.BenchmarkEncoder1e4                             707968       638812   -9.77%
lzw.BenchmarkEncoder1e5                            6567122      5965552   -9.16%
lzw.BenchmarkEncoder1e6                           65006000     58911680   -9.38%
utf8_test.BenchmarkRuneCountTenASCIIChars              166          165   -0.60%
utf8_test.BenchmarkRuneCountTenJapaneseChars           246          258   +4.88%
utf8_test.BenchmarkEncodeASCIIRune                      13           10  -23.08%
utf8_test.BenchmarkEncodeJapaneseRune                   37           16  -56.76%
utf8_test.BenchmarkDecodeASCIIRune                      23           21   -8.70%
utf8_test.BenchmarkDecodeJapaneseRune                   58           32  -44.83%

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

14 years agogc: fix weird error message
Russ Cox [Fri, 8 Apr 2011 17:53:32 +0000 (13:53 -0400)]
gc: fix weird error message

Fixes #1670.

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

14 years agoio: fixes for Read with n > 0, os.EOF
Robert Hencke [Fri, 8 Apr 2011 17:45:56 +0000 (13:45 -0400)]
io: fixes for Read with n > 0, os.EOF

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

14 years agobug327: document what's being tested
Russ Cox [Fri, 8 Apr 2011 17:42:20 +0000 (13:42 -0400)]
bug327: document what's being tested

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

14 years agold: fix arm build
Russ Cox [Fri, 8 Apr 2011 17:42:11 +0000 (13:42 -0400)]
ld: fix arm build

R=ken2
CC=golang-dev, mikkel
https://golang.org/cl/4384048

14 years agohttp: do not listen on 0.0.0.0 during test
Russ Cox [Fri, 8 Apr 2011 17:04:29 +0000 (13:04 -0400)]
http: do not listen on 0.0.0.0 during test

Quiets the pop-up boxes on OS X.

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

14 years agocodereview: automatically port old diffs forward
Russ Cox [Fri, 8 Apr 2011 17:00:40 +0000 (13:00 -0400)]
codereview: automatically port old diffs forward

In the current codereview, if a patch was written against
a version of a file that had subsequently been edited,
hg clpatch would fail, even if the patch and the edits were
in different parts of the file.  In this situation the reviewer
typically wrote back saying "please hg sync and hg mail
to update the patch".

This change rewrites the patch automatically, using the
same transformation that hg sync + hg mail would.

If the interim changes (since the patch was created)
affect the same line ranges as the patch, clpatch will
still refuse to apply it.  But this CL should make
of the trivial conflicts we see just go away.

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

14 years agogotest: Fix fix for \r\n on windows.
Rob Pike [Fri, 8 Apr 2011 16:50:20 +0000 (09:50 -0700)]
gotest: Fix fix for \r\n on windows.

R=rsc, brainman, rh, r2
CC=golang-dev
https://golang.org/cl/4366045

14 years agoupdate go tree for reflect changes
Russ Cox [Fri, 8 Apr 2011 16:27:58 +0000 (12:27 -0400)]
update go tree for reflect changes

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

14 years agogofix: reflect changes
Russ Cox [Fri, 8 Apr 2011 16:27:24 +0000 (12:27 -0400)]
gofix: reflect changes

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

14 years agogofix: add -diff, various fixes and helpers
Russ Cox [Fri, 8 Apr 2011 16:27:08 +0000 (12:27 -0400)]
gofix: add -diff, various fixes and helpers

  * add -diff command line option
  * use scoping information in refersTo, isPkgDot, isPtrPkgDot.
  * add new scoping-based helpers countUses, rewriteUses, assignsTo, isTopName.
  * rename rewrite to walk, add walkBeforeAfter.
  * add toy typechecker, a placeholder for go/types

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

14 years agoreflect: new Type and Value definitions
Russ Cox [Fri, 8 Apr 2011 16:26:51 +0000 (12:26 -0400)]
reflect: new Type and Value definitions

Type is now an interface that implements all the possible type methods.
Instead of a type switch on a reflect.Type t, switch on t.Kind().
If a method is invoked on the wrong kind of type (for example,
calling t.Field(0) when t.Kind() != Struct), the call panics.

There is one method renaming: t.(*ChanType).Dir() is now t.ChanDir().

Value is now a struct value that implements all the possible value methods.
Instead of a type switch on a reflect.Value v, switch on v.Kind().
If a method is invoked on the wrong kind of value (for example,
calling t.Recv() when t.Kind() != Chan), the call panics.

Since Value is now a struct, not an interface, its zero value
cannot be compared to nil.  Instead of v != nil, use v.IsValid().
Instead of other uses of nil as a Value, use Value{}, the zero value.

Many methods have been renamed, most due to signature conflicts:

           OLD                          NEW

    v.(*ArrayValue).Elem             v.Index
    v.(*BoolValue).Get               v.Bool
    v.(*BoolValue).Set               v.SetBool
    v.(*ChanType).Dir                v.ChanDir
    v.(*ChanValue).Get               v.Pointer
    v.(*ComplexValue).Get            v.Complex
    v.(*ComplexValue).Overflow       v.OverflowComplex
    v.(*ComplexValue).Set            v.SetComplex
    v.(*FloatValue).Get              v.Float
    v.(*FloatValue).Overflow         v.OverflowFloat
    v.(*FloatValue).Set              v.SetFloat
    v.(*FuncValue).Get               v.Pointer
    v.(*InterfaceValue).Get          v.InterfaceData
    v.(*IntValue).Get                v.Int
    v.(*IntValue).Overflow           v.OverflowInt
    v.(*IntValue).Set                v.SetInt
    v.(*MapValue).Elem               v.MapIndex
    v.(*MapValue).Get                v.Pointer
    v.(*MapValue).Keys               v.MapKeys
    v.(*MapValue).SetElem            v.SetMapIndex
    v.(*PtrValue).Get                v.Pointer
    v.(*SliceValue).Elem             v.Index
    v.(*SliceValue).Get              v.Pointer
    v.(*StringValue).Get             v.String
    v.(*StringValue).Set             v.SetString
    v.(*UintValue).Get               v.Uint
    v.(*UintValue).Overflow          v.OverflowUint
    v.(*UintValue).Set               v.SetUint
    v.(*UnsafePointerValue).Get      v.Pointer
    v.(*UnsafePointerValue).Set      v.SetPointer

Part of the motivation for this change is to enable a more
efficient implementation of Value, one that does not allocate
memory during most operations.  To reduce the size of the CL,
this CL's implementation is a wrapper around the old API.
Later CLs will make the implementation more efficient without
changing the API.

Other CLs to be submitted at the same time as this one
add support for this change to gofix (4343047) and update
the Go source tree (4353043).

R=gri, iant, niemeyer, r, rog, gustavo, r2
CC=golang-dev
https://golang.org/cl/4281055

14 years agogofix: be more conservative about rewrite to os.Create
Russ Cox [Fri, 8 Apr 2011 14:59:25 +0000 (10:59 -0400)]
gofix: be more conservative about rewrite to os.Create

Rewrite only if we understood all the flags we saw.

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

14 years agogotest: handle \r\n returned by gomake on Windows (fixes build)
Alex Brainman [Fri, 8 Apr 2011 13:53:57 +0000 (23:53 +1000)]
gotest: handle \r\n returned by gomake on Windows (fixes build)

R=golang-dev, peterGo, rsc1
CC=Joe Poirier, golang-dev
https://golang.org/cl/4370048

14 years agogo/types: fix build: use the right compiler to compile test case
Robert Griesemer [Fri, 8 Apr 2011 05:10:39 +0000 (22:10 -0700)]
go/types: fix build: use the right compiler to compile test case

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

14 years agogotype: use go/types GcImporter
Robert Griesemer [Fri, 8 Apr 2011 04:42:30 +0000 (21:42 -0700)]
gotype: use go/types GcImporter

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

14 years agogo/types: New Go type hierarchy implementation for AST.
Robert Griesemer [Fri, 8 Apr 2011 04:40:37 +0000 (21:40 -0700)]
go/types: New Go type hierarchy implementation for AST.

This CL defines a new, more Go-like representation of
Go types (different structs for different types as
opposed to a single Type node). It also implements
an ast.Importer for object/archive files generated
by the gc compiler tool chain. Besides the individual
type structs, the main difference is the handling of
named types: In the old world, a named type had a
non-nil *Object pointer but otherwise looked no
different from other types. In this new model, named
types have their own representation types.Name. As
a result, resolving cycles is a bit simpler during
construction, at the cost of having to deal with
types.Name nodes explicitly later. It remains to be
seen if this is a good approach. Nevertheless, code
involving types reads more nicely and benefits from
full type checking. Also, the representation seems
to more closely match the spec wording.

Credits: The original version of the gc importer was
written by Evan Shaw (chickencha@gmail.com). The new
version in this CL is based largely on Evan's original
code but contains bug fixes, a few simplifications,
some restructuring, and was adjusted to use the
new type hierarchy. I have added a comprehensive test
that imports all packages found under $GOROOT/pkg (with
a 3s time-out to limit the run-time of the test). Run
gotest -v for details.

The original version of ExportData (exportdata.go) was
written by Russ Cox (rsc@golang.org). The current version
is returning the internal buffer positioned at the beginning
of the export data instead of printing the export data to
stdout.

With the new types package, the existing in-progress
typechecker package is deprecated. I will delete it
once all functionality has been brought over.

R=eds, rog, rsc
CC=golang-dev
https://golang.org/cl/4314054

14 years agoscanner: better TokenString output
Robert Griesemer [Fri, 8 Apr 2011 02:41:55 +0000 (19:41 -0700)]
scanner: better TokenString output

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

14 years agoA codewalk through a simple program that illustrates several aspects of Go functions...
John DeNero [Fri, 8 Apr 2011 01:05:15 +0000 (18:05 -0700)]
A codewalk through a simple program that illustrates several aspects of Go functions: function objects, higher-order functions, variadic functions, tail recursion, etc.  The example program simulates the game of Pig, a dice game with simple rules but a nontrivial solution.

R=adg, rsc, iant2, r
CC=golang-dev
https://golang.org/cl/4306045

14 years agotest/bench: enable build and test on Windows
Alex Brainman [Fri, 8 Apr 2011 00:43:25 +0000 (10:43 +1000)]
test/bench: enable build and test on Windows

R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4366043

14 years agomisc/cgo/life: enable build and test on Windows
Alex Brainman [Fri, 8 Apr 2011 00:35:35 +0000 (10:35 +1000)]
misc/cgo/life: enable build and test on Windows

R=golang-dev, rsc1
CC=golang-dev, vcc
https://golang.org/cl/4374044

14 years agosyscall: fix Windows Signalled
Alex Brainman [Fri, 8 Apr 2011 00:27:47 +0000 (10:27 +1000)]
syscall: fix Windows Signalled

Thanks to fhs.

R=golang-dev, r2
CC=ality, fhs, golang-dev
https://golang.org/cl/4375044

14 years agogc: bug327
Russ Cox [Thu, 7 Apr 2011 22:53:47 +0000 (18:53 -0400)]
gc: bug327

Fixes #1674.

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

14 years agosyscall: fix freebsd/386 again
Russ Cox [Thu, 7 Apr 2011 19:44:10 +0000 (15:44 -0400)]
syscall: fix freebsd/386 again

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

14 years agosyscall: freebsd/386 Syscall9 (fix build)
Russ Cox [Thu, 7 Apr 2011 19:35:04 +0000 (15:35 -0400)]
syscall: freebsd/386 Syscall9 (fix build)

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

14 years agosyscall: fix build
Mikio Hara [Thu, 7 Apr 2011 19:03:45 +0000 (12:03 -0700)]
syscall: fix build

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

14 years agold: fix Mach-O X86_64_RELOC_SIGNED relocations
Mikkel Krautz [Thu, 7 Apr 2011 18:20:42 +0000 (14:20 -0400)]
ld: fix Mach-O X86_64_RELOC_SIGNED relocations

Fixes #1658.

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

14 years agold: fix Mach-O bss bug
Mikkel Krautz [Thu, 7 Apr 2011 17:17:28 +0000 (13:17 -0400)]
ld: fix Mach-O bss bug

Fixes #1559.

R=rsc
CC=golang-dev, peterGo, rog
https://golang.org/cl/4356046

14 years agocodereview: fix clpatch
Russ Cox [Thu, 7 Apr 2011 17:06:02 +0000 (13:06 -0400)]
codereview: fix clpatch

I love Python.  Write once, crash anywhere.

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

14 years agocodereview: drop Author: line on self-clpatch
Russ Cox [Thu, 7 Apr 2011 17:03:06 +0000 (13:03 -0400)]
codereview: drop Author: line on self-clpatch

Right now if a Go developer makes a patch on one machine
and then clpatches it onto another machine, changes
subsequently made to the description are kept only
locally, under the assumption that you are running
clpatch because someone else wrote the CL, so you
don't have permission to update the web.

This change makes clpatch discard the "this was a
clpatch" information from the metadata when you
clpatch your own CLs from one machine to another.

This should eliminate some confusion (for example
in CL 4314054) but will no doubt introduce other
confusion.

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

14 years agosyscall: fix typo in mmap comment
Dave Cheney [Thu, 7 Apr 2011 03:07:32 +0000 (23:07 -0400)]
syscall: fix typo in mmap comment

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

14 years agocodereview: recognize code URL without trailing slash
Russ Cox [Thu, 7 Apr 2011 03:07:08 +0000 (23:07 -0400)]
codereview: recognize code URL without trailing slash

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

14 years agosyscall: add Mmap, Munmap on Linux, FreeBSD, OS X
Russ Cox [Wed, 6 Apr 2011 21:52:02 +0000 (17:52 -0400)]
syscall: add Mmap, Munmap on Linux, FreeBSD, OS X

* tweak mksyscall*.pl to be more gofmt-compatible.
* add mkall.sh -syscalls option.
* add sys/mman.h constants on OS X

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

14 years agosyscall: Add DT_* and MADV_* constants on Linux.
Albert Strasheim [Wed, 6 Apr 2011 20:19:22 +0000 (16:19 -0400)]
syscall: Add DT_* and MADV_* constants on Linux.

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

14 years agoos, syscall: refactor Unix directory parsing
Russ Cox [Wed, 6 Apr 2011 19:44:40 +0000 (15:44 -0400)]
os, syscall: refactor Unix directory parsing

Moved the details of how to read a directory
and how to parse the results behind the new
syscall functions ReadDirent and ParseDirent.

Now os needs just one copy of Readdirnames
for the three Unix variants, and it no longer
imports "unsafe".

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

14 years agoexec: add a little package commentary explaining its
Rob Pike [Wed, 6 Apr 2011 19:37:17 +0000 (12:37 -0700)]
exec: add a little package commentary explaining its
relationship to os.Process.

R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4384041

14 years agofix build (sorry)
Russ Cox [Wed, 6 Apr 2011 19:13:18 +0000 (15:13 -0400)]
fix build (sorry)

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

14 years agosrc/pkg/Makefile: trim per-directory make output except on failure
Russ Cox [Wed, 6 Apr 2011 19:06:28 +0000 (15:06 -0400)]
src/pkg/Makefile: trim per-directory make output except on failure

Not committed to this but it sure makes
the output easier to skim.  With this CL:

$ make
install runtime
install sync/atomic
install sync
install unicode
install utf16
install syscall
install os
...
install ../cmd/govet
install ../cmd/goyacc
install ../cmd/hgpatch
$ make test
test archive/tar
test archive/zip
test asn1
test big
test bufio
...
test path
test path/filepath
TEST FAIL reflect
gotest
rm -f _test/reflect.a
6g -o _gotest_.6 deepequal.go type.go value.go
rm -f _test/reflect.a
gopack grc _test/reflect.a _gotest_.6
all_test.go:210: invalid type assertion: reflect.NewValue(tt.i).(*StructValue) (non-interface type reflect.Value on left)
all_test.go:217: cannot type switch on non-interface value v (type reflect.Value)
all_test.go:218: undefined: IntValue
all_test.go:221: cannot use 132 (type int) as type reflect.Value in function argument
all_test.go:223: cannot use 8 (type int) as type reflect.Value in function argument
all_test.go:225: cannot use 16 (type int) as type reflect.Value in function argument
all_test.go:227: cannot use 32 (type int) as type reflect.Value in function argument
all_test.go:229: cannot use 64 (type int) as type reflect.Value in function argument
all_test.go:231: undefined: UintValue
all_test.go:234: cannot use 132 (type int) as type reflect.Value in function argument
all_test.go:234: too many errors
gotest: "/Users/rsc/g/go/bin/6g -I _test -o _xtest_.6 all_test.go tostring_test.go" failed: exit status 1
make[1]: *** [test] Error 2
make: *** [reflect.test] Error 1

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

14 years agolog: generalize getting and setting flags and prefix.
Rob Pike [Wed, 6 Apr 2011 18:48:03 +0000 (11:48 -0700)]
log: generalize getting and setting flags and prefix.
- used to be only for standard log, not for user-built.
- there were no getters.
Also rearrange the code a little so we can avoid allocating
a buffer on every call.  Logging is expensive but we should
avoid unnecessary cost.

This should have no effect on existing code.

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

14 years agocrypto/rsa: add 3-prime support.
Adam Langley [Wed, 6 Apr 2011 18:11:56 +0000 (14:11 -0400)]
crypto/rsa: add 3-prime support.

R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4365041

14 years agocrypto/rsa: flip the CRT code over so that it matches PKCS#1
Adam Langley [Wed, 6 Apr 2011 14:22:04 +0000 (10:22 -0400)]
crypto/rsa: flip the CRT code over so that it matches PKCS#1

The CRT is symmetrical in the case of two variables and I picked a
different form from PKCS#1.

R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4381041

14 years agopkg/path: enable tests on Windows
Alex Brainman [Wed, 6 Apr 2011 06:45:20 +0000 (16:45 +1000)]
pkg/path: enable tests on Windows

Fixes #1107.

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

14 years agohttp: allow override of Content-Type for ServeFile
Andrew Gerrand [Wed, 6 Apr 2011 04:52:42 +0000 (14:52 +1000)]
http: allow override of Content-Type for ServeFile

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

14 years agocrypto/rsa: add support for precomputing CRT values.
Adam Langley [Tue, 5 Apr 2011 22:07:01 +0000 (18:07 -0400)]
crypto/rsa: add support for precomputing CRT values.

This speeds up private key operations by 3.5x (for a 2048-bit
modulus).

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

14 years agocrypto/ecdsa, crypto/rsa: use io.ReadFull to read from random source.
Dmitry Chestnykh [Tue, 5 Apr 2011 21:11:31 +0000 (17:11 -0400)]
crypto/ecdsa, crypto/rsa: use io.ReadFull to read from random source.

R=golang-dev, agl1
CC=golang-dev
https://golang.org/cl/4316057

14 years agoA+C: Dmitry Chestnykh (individual CLA)
Russ Cox [Tue, 5 Apr 2011 21:07:56 +0000 (17:07 -0400)]
A+C: Dmitry Chestnykh (individual CLA)

R=agl1
CC=golang-dev
https://golang.org/cl/4346054

14 years agogotest: fix windows build.
Rob Pike [Tue, 5 Apr 2011 20:51:49 +0000 (13:51 -0700)]
gotest: fix windows build.

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

14 years agoroadmap: add sections on tools, packages.
Rob Pike [Tue, 5 Apr 2011 20:25:58 +0000 (13:25 -0700)]
roadmap: add sections on tools, packages.

R=golang-dev, rsc1, r2, bradfitzgo, gri
CC=golang-dev
https://golang.org/cl/4344068

14 years agogotest: fix a bug in error handling.
Rob Pike [Tue, 5 Apr 2011 19:51:10 +0000 (12:51 -0700)]
gotest: fix a bug in error handling.
If the command couldn't be found, argv[0] would be wiped.
Also, fix a print statement not to refer to make - it was a vestige of a prior form.

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

14 years agocrypto/des: cleanups
Adam Langley [Tue, 5 Apr 2011 19:40:48 +0000 (15:40 -0400)]
crypto/des: cleanups

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

14 years agocrypto/block: remove deprecated package.
Adam Langley [Tue, 5 Apr 2011 19:23:40 +0000 (15:23 -0400)]
crypto/block: remove deprecated package.

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

14 years agogotest: fixes for [^.]_test file pattern
Peter Mundy [Tue, 5 Apr 2011 18:49:44 +0000 (11:49 -0700)]
gotest: fixes for [^.]_test file pattern

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

14 years agospec: add parens missing from "protect" example.
Rob Pike [Tue, 5 Apr 2011 18:01:25 +0000 (11:01 -0700)]
spec: add parens missing from "protect" example.
Fixes #1665.

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

14 years agogofix: don't rewrite O_APPEND opens
Russ Cox [Tue, 5 Apr 2011 15:12:02 +0000 (11:12 -0400)]
gofix: don't rewrite O_APPEND opens

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

14 years agocrypto/des: new package providing implementations of DES and TDEA
Yasuhiro Matsumoto [Tue, 5 Apr 2011 14:59:10 +0000 (10:59 -0400)]
crypto/des: new package providing implementations of DES and TDEA
Original code by Chris Lennert <cale...@gmail.com>

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

14 years agoos: fix windows build
Rob Pike [Tue, 5 Apr 2011 06:57:08 +0000 (23:57 -0700)]
os: fix windows build

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

14 years agoos: New Open API.
Rob Pike [Tue, 5 Apr 2011 06:42:14 +0000 (23:42 -0700)]
os: New Open API.
We replace the current Open with:
OpenFile(name, flag, perm) // same as old Open
Open(name) // same as old Open(name, O_RDONLY, 0)
Create(name) // same as old Open(name, O_RDWR|O_TRUNC|O_CREAT, 0666)

This CL includes a gofix module and full code updates: all.bash passes.
(There may be a few comments I missed.)

The interesting packages are:
        gofix
        os
Everything else is automatically generated except for hand tweaks to:
        src/pkg/io/ioutil/ioutil.go
        src/pkg/io/ioutil/tempfile.go
        src/pkg/crypto/tls/generate_cert.go
        src/cmd/goyacc/goyacc.go
        src/cmd/goyacc/units.y

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

14 years agotag weekly.2011-04-04
Andrew Gerrand [Tue, 5 Apr 2011 02:56:39 +0000 (12:56 +1000)]
tag weekly.2011-04-04

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

14 years agoweekly.2011-04-04 weekly.2011-04-04
Andrew Gerrand [Tue, 5 Apr 2011 02:55:03 +0000 (12:55 +1000)]
weekly.2011-04-04

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

14 years agohttp: ignore Transfer-Encoding on HEAD responses
Brad Fitzpatrick [Tue, 5 Apr 2011 02:43:36 +0000 (19:43 -0700)]
http: ignore Transfer-Encoding on HEAD responses

Amazon S3 sends Transfer-Encoding "chunked"
on its 404 responses to HEAD requests for
missing objects.

We weren't ignoring the Transfer-Encoding
and were thus interpretting the subsequent
response headers as a chunk header from the
previous responses body (but a HEAD response
can't have a body)

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

14 years agohttp: fix Transport connection re-use race
Brad Fitzpatrick [Tue, 5 Apr 2011 02:22:47 +0000 (19:22 -0700)]
http: fix Transport connection re-use race

A connection shouldn't be made available
for re-use until its body has been consumed.

(except in the case of pipelining, which isn't
implemented yet)

This CL fixes some issues seen with heavy load
against Amazon S3.

Subtle implementation detail: to prevent a race
with the client requesting a new connection
before previous one is returned, we actually
have to call putIdleConnection _before_ we
return from the final Read/Close call on the
http.Response.Body.

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

14 years agonet: fix typo
Mikio Hara [Tue, 5 Apr 2011 01:35:16 +0000 (11:35 +1000)]
net: fix typo

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

14 years agofilepath: new Abs function
Gustavo Niemeyer [Tue, 5 Apr 2011 01:29:24 +0000 (18:29 -0700)]
filepath: new Abs function

R=golang-dev, rsc1, peterGo, bsiegert, r, mattn
CC=golang-dev
https://golang.org/cl/4271057

14 years agohttp: fix hanging bug with HEAD responses
Brad Fitzpatrick [Mon, 4 Apr 2011 23:58:11 +0000 (16:58 -0700)]
http: fix hanging bug with HEAD responses

The transport readLoop was waiting forever for the client to
read the non-existent body before proceeding to read the next
request.

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

14 years agoos: add Seek whence constants
Brad Fitzpatrick [Mon, 4 Apr 2011 20:53:52 +0000 (13:53 -0700)]
os: add Seek whence constants

R=r, r2, rsc1, rsc, jacek.masiulaniec
CC=golang-dev
https://golang.org/cl/4344062

14 years agogotest: fix build
Russ Cox [Mon, 4 Apr 2011 20:35:40 +0000 (16:35 -0400)]
gotest: fix build

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

14 years agopath/filepath.Glob: add an error return.
Rob Pike [Mon, 4 Apr 2011 20:09:34 +0000 (13:09 -0700)]
path/filepath.Glob: add an error return.
The error will only occur for invalid patterns, but without this
error path there is no way to know that Glob has failed due to
an invalid pattern.

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

14 years agobufio: Write and WriteString cleanup
Evan Shaw [Mon, 4 Apr 2011 19:57:10 +0000 (15:57 -0400)]
bufio: Write and WriteString cleanup

Write never writes less than the buffer size and WriteString takes advantage
of the copy built-in to improve write efficiency.

R=rsc, ality, rog
CC=golang-dev
https://golang.org/cl/4344060

14 years agohttp: use upper case hex in URL escaping
Matt Jones [Mon, 4 Apr 2011 19:49:49 +0000 (15:49 -0400)]
http: use upper case hex in URL escaping

According to RFC 3986: "For consistency, URI producers
and normalizers should use uppercase hexadecimal digits
for all percent-encodings."  Using lower case characters
makes it incompatible with Google APIs when signing OAuth requests.

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

14 years agoCONTRIBUTORS: add Matt Jones (Google CLA)
Russ Cox [Mon, 4 Apr 2011 19:48:43 +0000 (15:48 -0400)]
CONTRIBUTORS: add Matt Jones (Google CLA)

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

14 years agocodereview: only retry on HTTP 500 error
Russ Cox [Mon, 4 Apr 2011 19:47:32 +0000 (15:47 -0400)]
codereview: only retry on HTTP 500 error

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

14 years agoos: Fix MkdirAll("/thisdoesnotexist").
Albert Strasheim [Mon, 4 Apr 2011 19:45:03 +0000 (15:45 -0400)]
os: Fix MkdirAll("/thisdoesnotexist").

Fixes #1637.

R=rsc, rh, msolo
CC=golang-dev
https://golang.org/cl/4317049

14 years agosyscall: add BPF support for freebsd/386, freebsd/amd64
Mikio Hara [Mon, 4 Apr 2011 19:40:40 +0000 (15:40 -0400)]
syscall: add BPF support for freebsd/386, freebsd/amd64

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

14 years agohttptest: add NewTLSServer
Brad Fitzpatrick [Mon, 4 Apr 2011 15:32:59 +0000 (08:32 -0700)]
httptest: add NewTLSServer

Enables the use of https servers in tests.

R=agl, rsc, agl1
CC=golang-dev
https://golang.org/cl/4284063

14 years agohttp: make triv.go example compile again
Brad Fitzpatrick [Mon, 4 Apr 2011 15:10:26 +0000 (08:10 -0700)]
http: make triv.go example compile again

Ideally we'd compile all example files during
the build, though.

Fixes #1660

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

14 years agoversion.bash: strip changeset hash from 'hg tags' output
Andrew Gerrand [Mon, 4 Apr 2011 00:06:09 +0000 (10:06 +1000)]
version.bash: strip changeset hash from 'hg tags' output

Fixes #1651.

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

14 years agopath/filepath: add support for plan9
Andrey Mirtchovski [Sun, 3 Apr 2011 16:11:41 +0000 (09:11 -0700)]
path/filepath: add support for plan9

R=paulzhol, ality, r, fhs
CC=golang-dev
https://golang.org/cl/4316054

14 years agoos: add a few missing plan9 errors
Andrey Mirtchovski [Sun, 3 Apr 2011 15:52:43 +0000 (08:52 -0700)]
os: add a few missing plan9 errors

these were needed by packages in crypto/ and by io/ioutil

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

14 years agoMake.pkg: increase test timeout to 120 seconds.
Ian Lance Taylor [Sun, 3 Apr 2011 05:23:34 +0000 (22:23 -0700)]
Make.pkg: increase test timeout to 120 seconds.

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

14 years agoos: Plan 9 support.
Yuval Pavel Zholkover [Sat, 2 Apr 2011 21:28:58 +0000 (14:28 -0700)]
os: Plan 9 support.

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

14 years agoR=rsc, brainman, ality, r2, r
Yuval Pavel Zholkover [Sat, 2 Apr 2011 21:24:03 +0000 (14:24 -0700)]
R=rsc, brainman, ality, r2, r
CC=golang-dev
https://golang.org/cl/3816043

14 years agogo/parser: package name must not be the blank identifier
Robert Griesemer [Sat, 2 Apr 2011 03:51:55 +0000 (20:51 -0700)]
go/parser: package name must not be the blank identifier

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

14 years agosyscall: make Rawsyscall6 pass 6th arg on linux/386
Evan Shaw [Sat, 2 Apr 2011 02:26:57 +0000 (22:26 -0400)]
syscall: make Rawsyscall6 pass 6th arg on linux/386

Forgot this one in the previous CL

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

14 years agogc: avoid saying same error 3 times
Russ Cox [Sat, 2 Apr 2011 00:52:38 +0000 (20:52 -0400)]
gc: avoid saying same error 3 times

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

14 years agosyscall: make Syscall6 pass 6th arg on linux/386
Evan Shaw [Sat, 2 Apr 2011 00:46:01 +0000 (20:46 -0400)]
syscall: make Syscall6 pass 6th arg on linux/386

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