1
0
mirror of https://github.com/golang/go synced 2024-10-02 12:18:33 -06:00
Commit Graph

11846 Commits

Author SHA1 Message Date
Adam Langley
cdd7e02583 crypto/...: more fixes for bug 2841
1) Remove the Reset() member in crypto/aes and crypto/des (and
   document the change).
2) Turn several empty error structures into vars. Any remaining error
   structures are either non-empty, or will probably become so in the
   future.
3) Implement SetWriteDeadline for TLS sockets. At the moment, the TLS
   status cannot be reused after a Write error, which is probably fine
   for most uses.
4) Make crypto/aes and crypto/des return a cipher.Block.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5625045
2012-02-13 12:38:45 -05:00
Marcel van Lohuizen
a52fb458df exp/norm: merged charinfo and decomposition tables. As a result only
one trie lookup per rune is needed. See forminfo.go for a description
of the new format.  Also included leading and trailing canonical
combining class in decomposition information.  This will often avoid
additional trie lookups.

R=r, r
CC=golang-dev
https://golang.org/cl/5616071
2012-02-13 14:54:46 +01:00
Rob Pike
7bd6ebb104 spec: strings are more slices than arrays
Thanks to Aaron Kemp for noticing.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5645097
2012-02-13 23:39:56 +11:00
Andrew Gerrand
d84de09e1d godoc: new design
This is not the finished product,
but a good checkpoint from which to
proceed with further development.

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5571061
2012-02-13 21:22:36 +11:00
Andrew Gerrand
159ee8a42f misc/dist: add binary distribution packaging script for linux
R=golang-dev, bradfitz, iant
CC=golang-dev
https://golang.org/cl/5639064
2012-02-13 21:18:16 +11:00
Anthony Martin
dbec42104f gc, 8g, 8l: fix a handful of warnings
8g/cgen.c
        print format type mismatch

8l/asm.c
        resoff set and not used

gc/pgen.c
        misleading comparison INT > 0x80000000

gc/reflect.c
        dalgsym must be static to match forward declaration

gc/subr.c
        assumed_equal set and not used
        hashmem's second argument is not used

gc/walk.c
        duplicated (unreachable) code

R=rsc
CC=golang-dev
https://golang.org/cl/5651079
2012-02-12 23:07:31 -08:00
Ian Lance Taylor
c53b73455b sync/atomic: disable hammer pointer tests on wrong size system
hammerCompareAndSwapPointer64 was only passing on
little-endian systems.  hammerCompareAndSwapPointer32 was
writing 8 bytes to a uint32 value on the heap.

R=rsc, dvyukov
CC=golang-dev
https://golang.org/cl/5654065
2012-02-12 21:53:33 -08:00
Russ Cox
b440a65033 strconv: disable issue 2917 test
It did in fact break on the darwin/386 builder.
Will investigate later; reopened issue 2917.

R=golang-dev
CC=golang-dev
https://golang.org/cl/5654070
2012-02-13 00:19:18 -05:00
Russ Cox
65ba8ee07e syscall: make linux Dup2 match other systems
You could argue for changing all the others, but
Linux is outvoted, and the only time it matters
is when newfd==-1, in which case you can call Dup.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5650073
2012-02-13 00:11:36 -05:00
Russ Cox
878153682e cmd/fix: warn about exp, old, deleted packages
Fixes #2776.

There was a previous attempt at CL 5592043 but that
seems to have stalled.  This one is simpler, and more up to date
(correct handling of spdy, for example).

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5645091
2012-02-12 23:55:33 -05:00
Hong Ruiqi
c58b6ad022 net/http: use mtime < t+1s to check for unmodified
The Date-Modified header truncates sub-second precision, so
use mtime < t+1s instead of mtime <= t to check for unmodified.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5655052
2012-02-12 23:45:19 -05:00
Hong Ruiqi
3760213e6e A+C: Hong Ruiqi (individual CLA)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5652078
2012-02-12 23:42:34 -05:00
Russ Cox
8bcfad269e testing: use runtime/debug to format panics
Sorry, Mercurial failed me.

TBR=r, dsymonds
CC=golang-dev
https://golang.org/cl/5649080
2012-02-12 23:41:07 -05:00
Russ Cox
f735d2d9d3 testing: use runtime/debug to format panics
Among other things, this avoids putting a testing.go:nnn:
prefix on every line of the stack trace.

R=golang-dev, r, dsymonds, r
CC=golang-dev
https://golang.org/cl/5651081
2012-02-12 23:39:40 -05:00
Russ Cox
6a75ece01c runtime: delete Type and implementations (use reflect instead)
unsafe: delete Typeof, Reflect, Unreflect, New, NewArray

Part of issue 2955 and issue 2968.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5650069
2012-02-12 23:26:20 -05:00
Russ Cox
cbe7d8db24 net: avoid TCP self-connect
Fixes #2690.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5650071
2012-02-12 23:25:55 -05:00
Russ Cox
f7a3683928 strconv: add tests for issue 2917
Cannot reproduce the failure locally,
but add explicit test in case some other
machine can.

Fixes #2917 (for now).

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5651071
2012-02-12 23:24:54 -05:00
Rob Pike
daa7bd8ec6 net/http/pprof: link to blog post
Fixes #2943.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5649079
2012-02-13 15:24:06 +11:00
Russ Cox
fb2caa3244 net/http: fix http_proxy parsing
Fixes #2919.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5645089
2012-02-12 23:19:50 -05:00
Russ Cox
d318ab2264 cmd/go: respect test -timeout flag
I thought that -timeout was per-test, but it is for the
whole program execution, so cmd/go can adjust its timer
(also for whole program execution) accordingly.

Fixes #2993.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5650070
2012-02-12 23:19:24 -05:00
Russ Cox
aa87d78cf6 cmd/dist: encoding/gob is no longer required for cmd/go
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5650068
2012-02-12 23:15:07 -05:00
Russ Cox
d9da346078 net/http: document use of DetectContentType
Fixes #2365.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5653070
2012-02-12 23:14:48 -05:00
Russ Cox
b5d81e5ed5 build: reject make.bash on Windows
Also, echo cmd/dist during bootstrap build
Makes that phase look like all the others.

Fixes #2908.

R=golang-dev, alex.brainman, bradfitz
CC=golang-dev
https://golang.org/cl/5655065
2012-02-12 23:14:37 -05:00
Robert Griesemer
b1d9ae9406 go spec: method names must be unique
Fixes #2916.

R=golang-dev, remyoudompheng, r, rsc
CC=golang-dev
https://golang.org/cl/5652064
2012-02-12 20:03:30 -08:00
Mikio Hara
6fa2296e83 net: disable wild use of SO_REUSEPORT on BSD variants
Fixes #2830 (again).

R=rsc
CC=golang-dev
https://golang.org/cl/5651083
2012-02-13 12:45:59 +09:00
Rob Pike
8040f9bb86 spec: typographical adjustment for ellipsis
The paragraph describing the ellipses presents the horizontal ellipsis
in two different fonts and at least on my screen they look too different.
Switch to a consistent rendering.

Of small steps are great journeys undertaken.

R=golang-dev, rsc, dsymonds, gri
CC=golang-dev
https://golang.org/cl/5650055
2012-02-13 14:38:31 +11:00
Rob Pike
80e2472f87 godoc: static ids should be #lowercase
so they don't collide with names like #Index.
Fixes #2970.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5655066
2012-02-13 14:34:30 +11:00
Alex Brainman
97235a769f builder: really set $GOBUILDEXIT for Windows
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5649074
2012-02-13 14:32:45 +11:00
Gustavo Niemeyer
62fe6914cb os: clarify docs for link functions
R=golang-dev, bsiegert, r
CC=golang-dev
https://golang.org/cl/5643068
2012-02-13 01:21:39 -02:00
Brad Fitzpatrick
71c8b82dd1 strings: more examples
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5645092
2012-02-13 14:05:57 +11:00
Rob Pike
aee1c38cda go1: fix old reference to Sys method
The example was fixed; the simplifying rewrite was missed.

R=golang-dev
CC=golang-dev
https://golang.org/cl/5651080
2012-02-13 08:05:53 +11:00
Yves Junqueira
7531e8cb39 pprof: fix import path in the documentation
R=golang-dev, n13m3y3r
CC=golang-dev
https://golang.org/cl/5649072
2012-02-12 12:38:51 -02:00
Mikio Hara
9387d11aa6 net: fix windows build
R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/5653066
2012-02-12 15:59:21 +09:00
Anthony Martin
8bd0109dd0 build: get rid of deps.bash
It doesn't work anymore and it's not used.

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5652073
2012-02-11 20:02:50 -08:00
Bjorn Tipling
5b663057b7 html/template: Added more explicit wording about examples and documentation.
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5654062
2012-02-12 12:18:00 +11:00
Rob Pike
46dc76f5da go1: update recipe for recovering Stat_t
Fixes #2983.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5654063
2012-02-12 09:17:57 +11:00
Rob Pike
14efdea359 effective_go: use new map deletion syntax
Fixes #2984.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5652071
2012-02-12 09:11:44 +11:00
Rob Pike
d26c607fe6 unsafe: Alignof and Offsetof now use the same style
The easy part of issue 2968.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5655059
2012-02-12 09:10:47 +11:00
Russ Cox
7dd90621f8 gc: diagnose field+method of same name
Fixes #2828.

R=ken2
CC=golang-dev
https://golang.org/cl/5653065
2012-02-11 01:21:12 -05:00
Russ Cox
2aafad25b4 gc: print detail for typechecking loop error
R=ken2
CC=golang-dev
https://golang.org/cl/5654060
2012-02-11 01:04:33 -05:00
Russ Cox
2f3d695a61 gc: fix bug introduced earlier
Apparently l and $1 were the same register on Linux.
On the other systems, the compiler caught it.

R=ken2
CC=golang-dev
https://golang.org/cl/5654061
2012-02-11 01:04:24 -05:00
Russ Cox
337547d1c9 gc: make constant arith errors a little more friendly
Fixes #2804.

R=ken2
CC=golang-dev
https://golang.org/cl/5652067
2012-02-11 00:50:56 -05:00
Robert Griesemer
2233942e3c gofmt: fix error message in test
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5652066
2012-02-10 21:47:18 -08:00
Russ Cox
77aaa3555d gc: fix import of struct type in struct literal
Fixes #2716.

R=ken2
CC=golang-dev
https://golang.org/cl/5652065
2012-02-11 00:34:01 -05:00
Ian Lance Taylor
53e139c7a0 runtime: put lockorder before pollorder in Select memory block.
Otherwise lockorder may be misaligned, since lockorder is a
list of pointers and pollorder is a list of uint16.
Discovered running gccgo (which uses a modified copy of this
code) on SPARC.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5655054
2012-02-10 21:24:14 -08:00
Russ Cox
f91cc3bdbb gc: optimize interface ==, !=
If the values being compared have different concrete types,
then they're clearly unequal without needing to invoke the
actual interface compare routine.  This speeds tests for
specific values, like if err == io.EOF, by about 3x.

benchmark                  old ns/op    new ns/op    delta
BenchmarkIfaceCmp100             843          287  -65.95%
BenchmarkIfaceCmpNil100          184          182   -1.09%

Fixes #2591.

R=ken2
CC=golang-dev
https://golang.org/cl/5651073
2012-02-11 00:19:24 -05:00
Russ Cox
a7b83f2287 5g: fix out of registers bug
Same fix as 6g, tripped by the 6g test case.

R=ken2
CC=golang-dev
https://golang.org/cl/5651074
2012-02-11 00:04:37 -05:00
Mikio Hara
f842dc160b cmd/dist: clear execute bit from source file
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5651072
2012-02-11 13:23:44 +09:00
Russ Cox
12fab9d122 gc: add test case for issue 1743
Fixes #1743.
(Actually was fixed earlier, but now we have proof.)

R=ken2
CC=golang-dev
https://golang.org/cl/5649064
2012-02-10 23:20:00 -05:00
Russ Cox
896f0c61c8 gc: diagnose init loop involving func
Fixes #2295.

R=ken2
CC=golang-dev
https://golang.org/cl/5655057
2012-02-10 23:10:45 -05:00