]>
Cypherpunks repositories - gostls13.git/log
Russ Cox [Wed, 13 Jun 2012 20:44:19 +0000 (16:44 -0400)]
syscall: fix windows copyFindData
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
6301076
Robert Griesemer [Wed, 13 Jun 2012 20:32:59 +0000 (13:32 -0700)]
godoc: show comments in various filtered views
Fixes #3454.
R=rsc
CC=golang-dev
https://golang.org/cl/
6305069
Robert Griesemer [Wed, 13 Jun 2012 20:32:29 +0000 (13:32 -0700)]
go/ast: comment map implementation
A comment map associates comments with AST nodes
and permits correct updating of the AST's comment
list when the AST is manipulated.
R=rsc
CC=golang-dev
https://golang.org/cl/
6281044
Russ Cox [Wed, 13 Jun 2012 20:24:56 +0000 (16:24 -0400)]
go/build: fix boolean negation
!(linux&cgo | darwin&cgo)
= (!linux|!cgo) & (!darwin|!cgo)
= (!linux&!darwin) | !cgo // new comment
≠ !linux | !darwin | !cgo // old comment
Fixes #3726.
R=golang-dev, bsiegert
CC=golang-dev
https://golang.org/cl/
6306076
Jan Ziak [Wed, 13 Jun 2012 19:52:32 +0000 (15:52 -0400)]
runtime: improved continuity in hash computation
Fixes #3695.
R=r, dave, rsc
CC=golang-dev
https://golang.org/cl/
6304062
Robert Griesemer [Wed, 13 Jun 2012 17:29:06 +0000 (10:29 -0700)]
math/big: fix binaryGCD
R=rsc
CC=golang-dev
https://golang.org/cl/
6297085
Robert Griesemer [Wed, 13 Jun 2012 16:37:47 +0000 (09:37 -0700)]
math/big: various cleanups
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
6295072
Christopher Swenson [Wed, 13 Jun 2012 16:31:20 +0000 (09:31 -0700)]
math/big: Implemented binary GCD algorithm
benchmark old ns/op new ns/op delta
BenchmarkGCD10x10 4383 2126 -51.49%
BenchmarkGCD10x100 5612 2124 -62.15%
BenchmarkGCD10x1000 8843 2622 -70.35%
BenchmarkGCD10x10000 17025 6576 -61.37%
BenchmarkGCD10x100000 118985 48130 -59.55%
BenchmarkGCD100x100 45328 11683 -74.23%
BenchmarkGCD100x1000 50141 12678 -74.72%
BenchmarkGCD100x10000 110314 26719 -75.78%
BenchmarkGCD100x100000 630000 156041 -75.23%
BenchmarkGCD1000x1000 654809 137973 -78.93%
BenchmarkGCD1000x10000 985683 159951 -83.77%
BenchmarkGCD1000x100000
4920792 366399 -92.55%
BenchmarkGCD10000x10000
16848950 3732062 -77.85%
BenchmarkGCD10000x100000
55401500 4675876 -91.56%
BenchmarkGCD100000x100000
1126775000 258951800 -77.02%
R=gri, rsc, bradfitz, remyoudompheng, mtj
CC=golang-dev
https://golang.org/cl/
6305065
Jean-Marc Eurin [Wed, 13 Jun 2012 14:25:00 +0000 (10:25 -0400)]
misc/emacs: Fix a failure when /tmp/<file>.go exists.
R=sameer
CC=golang-dev
https://golang.org/cl/
6296060
Robert Griesemer [Wed, 13 Jun 2012 01:11:19 +0000 (18:11 -0700)]
CONTRIBUTORS: added Christopher Swenson (Google CLA)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
6302069
Andrew Gerrand [Wed, 13 Jun 2012 00:33:02 +0000 (10:33 +1000)]
doc/install: mention GOPATH and point to code.html
Fixes #3469.
R=golang-dev, kevlar, rsc, r
CC=golang-dev
https://golang.org/cl/
6304049
Nigel Tao [Wed, 13 Jun 2012 00:13:05 +0000 (10:13 +1000)]
exp/html: simplify some of the parser's internal methods.
benchmark old ns/op new ns/op delta
BenchmarkParser
4006888 3950604 -1.40%
R=r, andybalholm
CC=golang-dev
https://golang.org/cl/
6301070
Robert Griesemer [Tue, 12 Jun 2012 16:36:35 +0000 (09:36 -0700)]
math/big: optimize common case of Int.Bit(0)
R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/
6306069
Rob Pike [Tue, 12 Jun 2012 04:36:39 +0000 (00:36 -0400)]
encoding/gob: better handling of nil pointers
- better message for top-level nil
- nil inside interface yields error, not panic
Fixes #3704.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
6304064
Rob Pike [Mon, 11 Jun 2012 21:52:09 +0000 (17:52 -0400)]
fmt.Fscanf: don't read past newline
Makes interactive uses work line-by-line.
Fixes #3481.
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/
6297075
Robert Griesemer [Mon, 11 Jun 2012 18:06:27 +0000 (11:06 -0700)]
exp/types: testing resolution of qualified identifiers
Also: fix a bug with exp/types/GcImport.
R=rsc, r
CC=golang-dev
https://golang.org/cl/
6302060
Jean-Marc Eurin [Mon, 11 Jun 2012 17:12:28 +0000 (13:12 -0400)]
misc/emacs: Fix the automatic gofmt when creating a new file.
Patching the buffer with the output from gofmt -d only works if
the file already exists. If it doesn't, replace the content with
the output of gofmt.
R=sameer
CC=golang-dev
https://golang.org/cl/
6302063
Brad Fitzpatrick [Sun, 10 Jun 2012 01:30:44 +0000 (18:30 -0700)]
encoding/gob: fix doc typo
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
6300078
Dave Cheney [Fri, 8 Jun 2012 21:35:14 +0000 (17:35 -0400)]
runtime: use uintptr where possible in malloc stats
linux/arm OMAP4 pandaboard
benchmark old ns/op new ns/op delta
BenchmarkBinaryTree17
68723297000 37026214000 -46.12%
BenchmarkFannkuch11
34962402000 35958435000 +2.85%
BenchmarkGobDecode
137298600 124182150 -9.55%
BenchmarkGobEncode
60717160 60006700 -1.17%
BenchmarkGzip
5647156000 5550873000 -1.70%
BenchmarkGunzip
1196350000 1198670000 +0.19%
BenchmarkJSONEncode
863012800 782898000 -9.28%
BenchmarkJSONDecode
3312989000 2781800000 -16.03%
BenchmarkMandelbrot200
45727540 45703120 -0.05%
BenchmarkParse
74781800 59990840 -19.78%
BenchmarkRevcomp
140043650 139462300 -0.42%
BenchmarkTemplate
6467682000 5832153000 -9.83%
benchmark old MB/s new MB/s speedup
BenchmarkGobDecode 5.59 6.18 1.11x
BenchmarkGobEncode 12.64 12.79 1.01x
BenchmarkGzip 3.44 3.50 1.02x
BenchmarkGunzip 16.22 16.19 1.00x
BenchmarkJSONEncode 2.25 2.48 1.10x
BenchmarkJSONDecode 0.59 0.70 1.19x
BenchmarkParse 0.77 0.97 1.26x
BenchmarkRevcomp 18.15 18.23 1.00x
BenchmarkTemplate 0.30 0.33 1.10x
darwin/386 core duo
benchmark old ns/op new ns/op delta
BenchmarkBinaryTree17
10591616577 9678245733 -8.62%
BenchmarkFannkuch11
10758473315 10749303846 -0.09%
BenchmarkGobDecode
34379785 34121250 -0.75%
BenchmarkGobEncode
23523721 23475750 -0.20%
BenchmarkGzip
2486191492 2446539568 -1.59%
BenchmarkGunzip
444179328 444250293 +0.02%
BenchmarkJSONEncode
221138507 219757826 -0.62%
BenchmarkJSONDecode
1056034428 1048975133 -0.67%
BenchmarkMandelbrot200
19862516 19868346 +0.03%
BenchmarkRevcomp
3742610872 3724821662 -0.48%
BenchmarkTemplate
960283112 944791517 -1.61%
benchmark old MB/s new MB/s speedup
BenchmarkGobDecode 22.33 22.49 1.01x
BenchmarkGobEncode 32.63 32.69 1.00x
BenchmarkGzip 7.80 7.93 1.02x
BenchmarkGunzip 43.69 43.68 1.00x
BenchmarkJSONEncode 8.77 8.83 1.01x
BenchmarkJSONDecode 1.84 1.85 1.01x
BenchmarkRevcomp 67.91 68.24 1.00x
BenchmarkTemplate 2.02 2.05 1.01x
R=rsc, 0xe2.0x9a.0x9b, mirtchovski
CC=golang-dev, minux.ma
https://golang.org/cl/
6297047
Robert Griesemer [Fri, 8 Jun 2012 20:00:49 +0000 (13:00 -0700)]
math/big: added nat.trailingZeroBits, simplified some code
Will simplify implementation of binaryGCD.
R=rsc, cswenson
CC=golang-dev
https://golang.org/cl/
6299064
Russ Cox [Fri, 8 Jun 2012 18:28:29 +0000 (14:28 -0400)]
syscall: unexport GetCurrentProcessId on Windows
This slipped in with the implementation of Getpid in CL
5909043 .
I'd exclude that CL entirely but it is tangled up in the Win32finddata changes.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
6297065
Russ Cox [Fri, 8 Jun 2012 18:04:44 +0000 (14:04 -0400)]
syscall: fix windows build
TBR=bradfitz
CC=golang-dev
https://golang.org/cl/
6303061
Russ Cox [Fri, 8 Jun 2012 17:54:48 +0000 (13:54 -0400)]
syscall: revert API changes in Windows Win32finddata fix.
Preserve old API by using correct struct in system call
and then copying the results, as we did for SetsockoptLinger.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
6307065
Russ Cox [Fri, 8 Jun 2012 17:44:13 +0000 (13:44 -0400)]
cmd/api: handle empty API file, ignore -next in release
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
6298063
Russ Cox [Fri, 8 Jun 2012 17:05:01 +0000 (13:05 -0400)]
regexp/syntax: unexport ErrUnexpectedParen
This new error is the only API change in the current draft of
Go 1.0.2 CLs. I'd like to include the CL that introduced it,
because it replaces a mysterious 'internal error' with a
useful error message, but I don't want any API changes,
so unexport the error constant for now. It can be
re-exported for Go 1.1.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
6294055
Nigel Tao [Fri, 8 Jun 2012 03:55:15 +0000 (13:55 +1000)]
exp/html: check the context node for consistency when parsing fragments.
R=rsc
CC=golang-dev
https://golang.org/cl/
6303053
Dave Cheney [Fri, 8 Jun 2012 03:13:02 +0000 (13:13 +1000)]
cmd/5c, cmd/5g, cmd/5l: fix cross compilation failure on darwin
Fixes #3708.
The fix to allow 5{c,g,l} to compile under clang 3.1 broke cross
compilation on darwin using the Apple default compiler on 10.7.3.
This failure was introduced in
9b455eb64690 .
This has been tested by cross compiling on darwin/amd64 to linux/arm using
* gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
* clang version 3.1 (branches/release_31)
As well as on linux/arm using
* gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
* Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0)
* Debian clang version 3.1-4 (branches/release_31) (based on LLVM 3.1)
R=consalus, rsc
CC=golang-dev
https://golang.org/cl/
6307058
Shenghou Ma [Thu, 7 Jun 2012 18:56:23 +0000 (02:56 +0800)]
test/bench/shoutout: fix compliation
-lm must come after the source file, versions of gcc insist this strict order.
On standard compliant systems, we no longer need malloc.h for malloc.
Use pkg-config(1) to get correct glib cflags and libs.
Fix compiler warning in threadring.c and k-nucleotide.c.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6198076
Shenghou Ma [Thu, 7 Jun 2012 18:42:28 +0000 (02:42 +0800)]
cmd/5a, cmd/5l: add MULW{T,B} and MULAW{T,B} support for ARM
Supported in ARMv5TE and above.
Also corrected MULA disassembly listing.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6265045
Russ Cox [Thu, 7 Jun 2012 16:37:50 +0000 (12:37 -0400)]
cmd/cgo: make Go code order deterministic
The type declarations were being generated using
a range over a map, which meant that successive
runs produced different orders. This will make sure
successive runs produce the same files.
Fixes #3707.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
6300062
Russ Cox [Thu, 7 Jun 2012 16:05:34 +0000 (12:05 -0400)]
cmd/gc: limit data disassembly to -SS
This makes -S useful again.
R=ken2
CC=golang-dev
https://golang.org/cl/
6302054
Russ Cox [Thu, 7 Jun 2012 15:59:18 +0000 (11:59 -0400)]
cmd/gc: fix LEAQ $0, SI bug
Cannot take effective address of constant.
Fixes #3670.
R=ken2
CC=golang-dev
https://golang.org/cl/
6299055
Russ Cox [Thu, 7 Jun 2012 07:15:09 +0000 (03:15 -0400)]
cmd/gc: run escape analysis in call graph dependency order
If there are mutually recursive functions, there is a cycle in
the dependency graph, so the order is actually dependency order
among the strongly connected components: mutually recursive
functions get put into the same batch and analyzed together.
(Until now the entire package was put in one batch.)
The non-recursive case (single function, maybe with some
closures inside) will be able to be more precise about inputs
that escape only back to outputs, but that is not implemented yet.
R=ken2
CC=golang-dev, lvd
https://golang.org/cl/
6304050
Russ Cox [Thu, 7 Jun 2012 07:06:40 +0000 (03:06 -0400)]
cmd/gc: fix type checking loop
CL
4313064 fixed its test case but did not address a
general enough problem:
type T1 struct { F *T2 }
type T2 T1
type T3 T2
could still end up copying the definition of T1 for T2
before T1 was done being evaluated, or T3 before T2
was done.
In order to propagate the updates correctly,
record a copy of an incomplete type for re-execution
once the type is completed. Roll back CL
4313064 .
Fixes #3709.
R=ken2
CC=golang-dev, lstoakes
https://golang.org/cl/
6301059
Russ Cox [Thu, 7 Jun 2012 06:15:23 +0000 (02:15 -0400)]
cmd/gc: delete dead code
R=ken2
CC=golang-dev
https://golang.org/cl/
6307050
Russ Cox [Thu, 7 Jun 2012 06:05:08 +0000 (02:05 -0400)]
cmd/gc: do not crash on struct with _ field
Fixes #3607.
R=ken2
CC=golang-dev
https://golang.org/cl/
6296052
Russ Cox [Thu, 7 Jun 2012 05:54:07 +0000 (01:54 -0400)]
cmd/gc: preserve side effects during inlining of function with _ argument
Fixes #3593.
R=ken2
CC=golang-dev, lvd
https://golang.org/cl/
6305061
Russ Cox [Thu, 7 Jun 2012 05:48:55 +0000 (01:48 -0400)]
encoding/json: fix panic unmarshaling into non-nil interface value
Fixes #3614.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
6306051
Russ Cox [Thu, 7 Jun 2012 04:51:11 +0000 (00:51 -0400)]
cmd/gc: mark output of typename as type-checked
R=ken2
CC=golang-dev
https://golang.org/cl/
6302051
Nigel Tao [Thu, 7 Jun 2012 03:46:57 +0000 (13:46 +1000)]
exp/html: when parsing, compare atoms (ints) instead of strings.
This is the mechanical part of the 2-part change that started with
https://golang.org/cl/
6305053 /
R=rsc
CC=andybalholm, golang-dev, r
https://golang.org/cl/
6295055
Nigel Tao [Thu, 7 Jun 2012 03:05:35 +0000 (13:05 +1000)]
exp/html: make the tokenizer return atoms for tag tokens.
This is part 1 of a 2 part changelist. Part 2 contains the mechanical
change to parse.go to compare atoms (ints) instead of strings.
The overall effect of the two changes are:
benchmark old ns/op new ns/op delta
BenchmarkParser
4462274 4058254 -9.05%
BenchmarkRawLevelTokenizer 913202 912917 -0.03%
BenchmarkLowLevelTokenizer
1268626 1267836 -0.06%
BenchmarkHighLevelTokenizer
1947305 1968944 +1.11%
R=rsc
CC=andybalholm, golang-dev, r
https://golang.org/cl/
6305053
Dave Cheney [Thu, 7 Jun 2012 00:23:45 +0000 (10:23 +1000)]
test/bench/go1: add go/parser benchmark
As discussed in
https://groups.google.com/d/msg/golang-dev/Na9XE6mcQyY/zbeBI7R-vnoJ
Here is a static copy of the go/parser benchmark. I ended up using
fancy encodings because the original parser.go had a number of `s
scattered throughout which made it hard to embed the source directly.
Curiously on my laptop this benchmark always scores roughly 10% higher
than the standalone benchmark. This may be down to the generation of
the fasta data set triggering the cpu governor to raise the cpu speed.
However the benchmark is consistent with itself across multiple runs.
R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/
6305055
Alex Brainman [Wed, 6 Jun 2012 23:37:05 +0000 (09:37 +1000)]
runtime: include "typekind.h" to fix windows build
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
6305059
Nigel Tao [Wed, 6 Jun 2012 23:35:35 +0000 (09:35 +1000)]
exp/html/atom: add more atoms.
This completely covers the tags used by exp/html's parser.
Before:
295 atoms; 1406 string bytes + 2048 tables = 3454 total data
BenchmarkLookup 50000 59841 ns/op
After:
322 atoms; 1508 string bytes + 2048 tables = 3556 total data
BenchmarkLookup 50000 60159 ns/op
R=r
CC=golang-dev
https://golang.org/cl/
6296045
Andrew Gerrand [Wed, 6 Jun 2012 23:27:39 +0000 (09:27 +1000)]
misc/dashboard/app: fix build failure notifications
The datastore.Query methods once mutated the Query value, but now they return
a derivative query, so the Hash= and ParentHash= filters were not being
applied.
R=golang-dev, bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/
6300058
Fazlul Shahriar [Wed, 6 Jun 2012 22:38:56 +0000 (18:38 -0400)]
net: pass tests on Plan 9 again
R=golang-dev
CC=golang-dev
https://golang.org/cl/
6280045
Jan Ziak [Wed, 6 Jun 2012 21:20:02 +0000 (17:20 -0400)]
runtime: move type kinds into a separate file
R=rsc
CC=golang-dev
https://golang.org/cl/
6285047
Daniel Morsing [Wed, 6 Jun 2012 20:54:02 +0000 (16:54 -0400)]
fmt: fix doc typo
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6308046
Russ Cox [Wed, 6 Jun 2012 20:52:38 +0000 (16:52 -0400)]
A+C: Daniel Morsing (individual CLA)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
6307048
Markus Sonderegger [Wed, 6 Jun 2012 20:05:47 +0000 (16:05 -0400)]
crypto/rand: enable rand.Reader on plan9
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6297044
Russ Cox [Wed, 6 Jun 2012 20:05:27 +0000 (16:05 -0400)]
A+C: Markus Sonderegger (individual CLA)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
6303047
Russ Cox [Wed, 6 Jun 2012 19:08:00 +0000 (15:08 -0400)]
fmt: fix inadvertent change to %#v
The reordering speedup in CL
6245068 changed the semantics
of %#v by delaying the clearing of some flags. Restore the old
semantics and add a test.
Fixes #3706.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
6302048
Shenghou Ma [Wed, 6 Jun 2012 14:03:31 +0000 (22:03 +0800)]
net: fix cgoAddrInfoFlags() on FreeBSD
CL
6250075 removed AI_MASK mask on all BSD variants,
however FreeBSD's AI_MASK does not include AI_V4MAPPED
and AI_ALL, and its libc is strict about the ai_flags.
This will fix the FreeBSD builder.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6305054
Shenghou Ma [Wed, 6 Jun 2012 12:19:16 +0000 (20:19 +0800)]
build: restore PATH before "dist banner"
Fixes #3699.
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/
6272048
Joel Sing [Wed, 6 Jun 2012 10:39:27 +0000 (20:39 +1000)]
runtime: fix tv_sec handling for netbsd/386
On netbsd/386, tv_sec is a 64-bit integer for both timeval and timespec.
Fix the time handling code so that it works correctly.
R=golang-dev, rsc, m4dh4tt3r
CC=golang-dev
https://golang.org/cl/
6256056
Dave Cheney [Tue, 5 Jun 2012 22:18:55 +0000 (08:18 +1000)]
cmd/5c, cmd/5g, cmd/5l: fix array indexing warning under Clang 3.1
This should be the last of them.
R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/
6297043
Dave Cheney [Tue, 5 Jun 2012 21:49:58 +0000 (07:49 +1000)]
test/bench/go1: reduce fasta data size for linux/arm
As discussed on golang-dev, reduce the size of the fasta
dataset to make it possible to run the go1 benchmarks on
small ARM systems.
Also, remove the 25m suffix from fasta data and Revcomp.
linux/arm: pandaboard OMAP4
BenchmarkBinaryTree17 1
70892426000 ns/op
BenchmarkFannkuch11 1
35712066000 ns/op
BenchmarkGobDecode 10
137146000 ns/op 5.60 MB/s
BenchmarkGobEncode 50
64953000 ns/op 11.82 MB/s
BenchmarkGzip 1
5675690000 ns/op 3.42 MB/s
BenchmarkGunzip 1
1207001000 ns/op 16.08 MB/s
BenchmarkJSONEncode 5
860424800 ns/op 2.26 MB/s
BenchmarkJSONDecode 1
3321839000 ns/op 0.58 MB/s
BenchmarkMandelbrot200 50
45893560 ns/op
BenchmarkRevcomp 10
135220300 ns/op 18.80 MB/s
BenchmarkTemplate 1
6385681000 ns/op 0.30 MB/s
R=rsc, minux.ma, dsymonds
CC=golang-dev
https://golang.org/cl/
6278048
Russ Cox [Tue, 5 Jun 2012 20:24:37 +0000 (16:24 -0400)]
runtime: use OS X vsyscall for gettimeofday (amd64)
Thanks to Dave Cheney for the magic words "comm page".
benchmark old ns/op new ns/op delta
BenchmarkNow 197 33 -83.05%
This should make profiling a little better on OS X.
The raw time saved is unlikely to matter: what likely matters
more is that it seems like OS X sends profiling signals on the
way out of system calls more often than it should; avoiding
the system call should increase the accuracy of cpu profiles.
The 386 version would be similar but needs to do different
math for CPU speeds less than 1 GHz. (Apparently Apple has
never shipped a 64-bit CPU with such a slow clock.)
R=golang-dev, bradfitz, dave, minux.ma, r
CC=golang-dev
https://golang.org/cl/
6275056
Russ Cox [Tue, 5 Jun 2012 20:23:30 +0000 (16:23 -0400)]
runtime: use OS X vsyscall for gettimeofday (386)
amd64 was done in CL
6275056 .
We don't attempt to handle machines with clock speeds
less than 1 GHz. Those will fall back to the system call.
benchmark old ns/op new ns/op delta
BenchmarkNow 364 38 -89.53%
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
6307045
Dave Cheney [Tue, 5 Jun 2012 08:55:14 +0000 (18:55 +1000)]
runtime: use uintptr for block length in scanblock
Using an int64 for a block size doesn't make
sense on 32bit platforms but extracts a performance
penalty dealing with double word quantities on Arm.
linux/arm
benchmark old ns/op new ns/op delta
BenchmarkGobDecode
155401600 144589300 -6.96%
BenchmarkGobEncode
72772220 62460940 -14.17%
BenchmarkGzip
5822632 2604797 -55.26%
BenchmarkGunzip 326321 151721 -53.51%
benchmark old MB/s new MB/s speedup
BenchmarkGobDecode 4.94 5.31 1.07x
BenchmarkGobEncode 10.55 12.29 1.16x
R=golang-dev, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/
6272047
Rémy Oudompheng [Tue, 5 Jun 2012 04:43:15 +0000 (06:43 +0200)]
cmd/[568]g: correct freeing of allocated Regs.
R=golang-dev, rsc
CC=golang-dev, remy
https://golang.org/cl/
6281050
Nigel Tao [Tue, 5 Jun 2012 01:56:32 +0000 (11:56 +1000)]
gc: fix typo.
There already is a "Phase 6" a few lines above.
R=rsc
CC=golang-dev
https://golang.org/cl/
6270054
Rob Pike [Tue, 5 Jun 2012 01:37:31 +0000 (18:37 -0700)]
net/http/httputil: fix typo in comment.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
6272050
Rémy Oudompheng [Mon, 4 Jun 2012 21:31:31 +0000 (23:31 +0200)]
test: avoid interface conversion in rotate.go
It is not necessary for the test to be effective and uses a
lot of resources in the compiler. Memory usage is halved and
compilation around 8x faster.
R=golang-dev, r, rsc, r
CC=golang-dev
https://golang.org/cl/
6290044
Robert Griesemer [Mon, 4 Jun 2012 21:24:10 +0000 (14:24 -0700)]
go spec: clarify promotion rules for methods/fields of anonymous fields
Fixes #3635.
R=rsc, r, iant, kevlar, iant
CC=golang-dev
https://golang.org/cl/
6217045
Russ Cox [Mon, 4 Jun 2012 21:07:59 +0000 (17:07 -0400)]
cmd/gc: introduce hidden closure functions earlier
The original implementation of closures created the
underlying top-level function during walk, which is fairly
late in the compilation process and caused ordering-based
complications due to earlier stages that had to be repeated
any number of times.
Create the underlying function during typecheck, much
earlier, so that later stages can be run just once.
The result is a simpler compilation sequence.
R=ken2
CC=golang-dev
https://golang.org/cl/
6279049
Shenghou Ma [Mon, 4 Jun 2012 17:31:23 +0000 (01:31 +0800)]
lib9: fix memory leak in p9getwd()
although the comment says it uses libc's getenv, without NOPLAN9DEFINES
it actually uses p9getenv which strdups.
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/
6285046
Russ Cox [Mon, 4 Jun 2012 17:09:19 +0000 (13:09 -0400)]
time: accept .999 in Parse
The recent shuffle in parsing formats exposed probably unintentional
behavior in time.Parse, namely that it was mostly ignoring ".99999"
in the format, producing the following behavior:
fmt.Println(time.Parse("03:04:05.999 MST", "12:00:00.888 PDT")) // error (.888 unexpected)
fmt.Println(time.Parse("03:04:05.999", "12:00:00")) // error (input too short)
fmt.Println(time.Parse("03:04:05.999 MST", "12:00:00 PDT")) // ok (extra bytes on input make it ok)
http://play.golang.org/p/ESJ1UYXzq2
API CHANGE:
This CL makes all three examples valid: ".999" can match an
empty string or else a fractional second with at most nine digits.
Fixes #3701.
R=r, r
CC=golang-dev
https://golang.org/cl/
6267045
Robert Griesemer [Mon, 4 Jun 2012 16:48:27 +0000 (09:48 -0700)]
math/big: improved karatsuba calibration code, better mul benchmark
An attempt to profit from CL
6176043 (fix to superpolinomial
runtime of karatsuba multiplication) and determine a better
karatsuba threshold. The result indicates that 32 is still
a reasonable value. Left the threshold as is (== 32), but
made some minor changes to the calibrate code which are
worthwhile saving (use of existing benchmarking code for
better results, better use of package time).
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6260062
Marcel van Lohuizen [Mon, 4 Jun 2012 16:35:26 +0000 (18:35 +0200)]
exp/locale/collate: somehow an incorrect version of tables was checked in earlier.
Regenerated tables using maketables.
R=r, rsc
CC=golang-dev
https://golang.org/cl/
6248067
Shenghou Ma [Mon, 4 Jun 2012 16:14:39 +0000 (00:14 +0800)]
test/bench/go1: fix gzip test
We can't depend on init() order, and certainly we don't want to
register all future benchmarks that use jsonbytes or jsondata to init()
in json_test.go, so we use a more general solution: make generation of
jsonbytes and jsondata their own function so that the compiler will take
care of the order.
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/
6282046
Joel Sing [Mon, 4 Jun 2012 16:12:23 +0000 (02:12 +1000)]
net: fix botched cgo netbsd merge
Fix botched cgo_netbsd.go merge and remove redundant +build directive.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6282048
Joel Sing [Mon, 4 Jun 2012 15:43:04 +0000 (01:43 +1000)]
cgo: enable cgo on netbsd/386 and netbsd/amd64
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6261056
Joel Sing [Mon, 4 Jun 2012 15:38:55 +0000 (01:38 +1000)]
misc/cgo/stdio: split stdout/stderr into a separate file
Split stdout/stderr into a separate file so that can be handled
differently on some platforms. Both NetBSD and OpenBSD have defines
for stdout/stderr that require some coercion in order for cgo to
handle them correctly.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6247062
Benny Siegert [Mon, 4 Jun 2012 15:29:34 +0000 (01:29 +1000)]
syscall: use pipe instead of pipe2 on NetBSD
pipe2 is equivalent to pipe with flags set to 0.
However, pipe2 was only added recently. Using pipe
instead improves compatibility with NetBSD 5.
R=jsing
CC=golang-dev
https://golang.org/cl/
6268045
Brad Fitzpatrick [Mon, 4 Jun 2012 15:04:40 +0000 (08:04 -0700)]
net/http: add new Server benchmark
The new BenchmarkServer avoids profiling the client code
by running it in a child process.
R=rsc
CC=golang-dev
https://golang.org/cl/
6260053
Andrew Gerrand [Mon, 4 Jun 2012 14:55:45 +0000 (00:55 +1000)]
doc: mention 'hg update default' in contribution guidelines
Fixes #3634.
R=golang-dev, bsiegert, rsc
CC=golang-dev
https://golang.org/cl/
6270047
Russ Cox [Mon, 4 Jun 2012 14:41:30 +0000 (10:41 -0400)]
doc/install: we don't print 'The compiler is 6g' anymore
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
6273050
Ryan Barrett [Mon, 4 Jun 2012 14:36:24 +0000 (10:36 -0400)]
misc/emacs: make compilation-mode's next-error understand test failure output.
specifically, adds a go-test element to compilation-error-regexp-alist[-alist].
Fixes #3629.
R=golang-dev, rsc, sameer
CC=golang-dev, jba
https://golang.org/cl/
6197091
Brad Fitzpatrick [Mon, 4 Jun 2012 14:18:06 +0000 (07:18 -0700)]
net/textproto: add benchmark, cleanup, update comment
The cleanup also makes it ~5% faster, but that's
not the point of this CL.
Optimizations can come in future CLs.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6286043
Brad Fitzpatrick [Mon, 4 Jun 2012 14:06:05 +0000 (07:06 -0700)]
net/http: simplify ParseHTTPVersion
Removes code. No need for atoi helper.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
6285045
Nigel Tao [Mon, 4 Jun 2012 10:53:32 +0000 (20:53 +1000)]
cmd/gc: recognize u<<1 op u>>31 as a rotate when op is ^, not just |.
R=rsc
CC=golang-dev
https://golang.org/cl/
6249071
Shenghou Ma [Mon, 4 Jun 2012 07:21:58 +0000 (15:21 +0800)]
api: add Linux/ARM to go1 API
It's very unfortunate that the type of Data field of struct
RawSockaddr is [14]uint8 on Linux/ARM instead of [14]int8
on all the others.
btw, it should be [14]int8 according to my header files.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
6275050
Brad Fitzpatrick [Mon, 4 Jun 2012 05:40:16 +0000 (22:40 -0700)]
net/http: change a Del to delete
No need to fix case of "Host" string literal.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
6278049
Mikio Hara [Mon, 4 Jun 2012 00:57:03 +0000 (09:57 +0900)]
path/filepath: fix test
Make it possible to run test over symlinked GOROOT.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
6268046
Russ Cox [Sun, 3 Jun 2012 15:08:17 +0000 (11:08 -0400)]
time: make Format 2.7x faster
benchmark old ns/op new ns/op delta
BenchmarkFormat 2495 937 -62.44%
BenchmarkFormatNow 2308 889 -61.48%
Update #3679.
R=r
CC=golang-dev
https://golang.org/cl/
6278047
Joel Sing [Sun, 3 Jun 2012 13:54:14 +0000 (23:54 +1000)]
net: move cgo address info flags to per-platform files
Move address info flags to per-platform files. This is needed to
enable cgo on NetBSD (and later OpenBSD), as some of the currently
used AI_* defines do not exist on these platforms.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6250075
Alex Brainman [Sun, 3 Jun 2012 09:27:17 +0000 (19:27 +1000)]
syscall: correct Win32finddata definition
Fixes #3685.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6261053
Russ Cox [Sun, 3 Jun 2012 03:57:38 +0000 (23:57 -0400)]
cmd/5g: fix typo
TBR=lvd
CC=golang-dev
https://golang.org/cl/
6275048
Russ Cox [Sun, 3 Jun 2012 03:02:39 +0000 (23:02 -0400)]
api: add net.UnixConn's CloseRead and CloseWrite methods
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
6278045
Luuk van Dijk [Sun, 3 Jun 2012 02:50:57 +0000 (22:50 -0400)]
cmd/gc: inline slice[arr,str] in the frontend (mostly).
R=rsc, ality, rogpeppe, minux.ma, dave
CC=golang-dev
https://golang.org/cl/
5966075
Russ Cox [Sun, 3 Jun 2012 02:43:11 +0000 (22:43 -0400)]
exp/html/atom: faster Lookup with smaller tables
Use perfect cuckoo hash, to avoid binary search.
Define Atom bits as offset+len in long string instead
of enumeration, to avoid string headers.
Before: 1909 string bytes + 6060 tables = 7969 total data
After: 1406 string bytes + 2048 tables = 3454 total data
benchmark old ns/op new ns/op delta
BenchmarkLookup 83878 64681 -22.89%
R=nigeltao, r
CC=golang-dev
https://golang.org/cl/
6262051
Shenghou Ma [Sat, 2 Jun 2012 22:49:57 +0000 (06:49 +0800)]
syscall: fix 32-bit uid calls
16-bit uid calls are not always supported in newer kernels.
R=dave, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/
6279047
Shenghou Ma [Sat, 2 Jun 2012 20:03:09 +0000 (04:03 +0800)]
runtime: remove unnecessary macros in vlop_arm.s
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6270045
Shenghou Ma [Sat, 2 Jun 2012 19:08:49 +0000 (03:08 +0800)]
cmd/5a, cmd/5l, math: add CLZ instruction for ARM
Supported in ARMv5 and above.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
6284043
Jan Ziak [Sat, 2 Jun 2012 18:02:44 +0000 (14:02 -0400)]
runtime: add (unused for now) gc field to type information
R=rsc
CC=golang-dev
https://golang.org/cl/
6255074
Charles L. Dorian [Sat, 2 Jun 2012 17:06:12 +0000 (13:06 -0400)]
math: amd64 versions of Ceil, Floor and Trunc
Ceil to 4.81 from 20.6 ns/op
Floor to 4.37 from 13.5 ns/op
Trunc to 3.97 from 14.3 ns/op
Also changed three MOVSDs to MOVAPDs in log_amd64.s
R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/
6262048
Jan Mercl [Sat, 2 Jun 2012 17:00:09 +0000 (13:00 -0400)]
path/filepath: implement documented SkipDir behavior
Currently walk() doesn't check for err == SkipDir when iterating
a directory list, but such promise is made in the docs for WalkFunc.
Fixes #3486.
R=rsc, r
CC=golang-dev
https://golang.org/cl/
6257059
Shenghou Ma [Sat, 2 Jun 2012 16:54:28 +0000 (12:54 -0400)]
cmd/5c, cmd/5g, cmd/5l: enable use of R12, F8-F15
R=dave, rsc
CC=golang-dev
https://golang.org/cl/
6248070
Brad Fitzpatrick [Sat, 2 Jun 2012 01:42:36 +0000 (18:42 -0700)]
api: add FreeBSD to go1 API
Now that gri has made go/parser 15% faster, I offer this
change to slow back down cmd/api ~proportionately, adding
FreeBSD to the go1-checked set of platforms.
Really we should have done this earlier. This will prevent us
from breaking FreeBSD compatibility accidentally in the
future.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
6279044