1
0
mirror of https://github.com/golang/go synced 2024-09-24 19:30:12 -06:00
Commit Graph

13212 Commits

Author SHA1 Message Date
Joel Sing
2a47e0444c syscall: regenerate z* files for netbsd
Fix mkerrors.sh so that it works on NetBSD.

Remove directory mode bits from types - this already appears in errors.

Regenerate the z* files now that cgo is working.

R=golang-dev, m4dh4tt3r, r
CC=golang-dev
https://golang.org/cl/6201077
2012-05-14 10:40:13 -07:00
Michael Gehring
99142f5537 crypto/tls: fix decoding of certLen in certificateMsg.unmarshal
certLen was decoded incorrectly if length > 2^16-1.

R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/6197077
2012-05-14 12:26:29 -04:00
Adam Langley
02d2b4466f A+C: add Michael Gehring (individual CLA)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6188076
2012-05-14 11:28:55 -04:00
Dmitriy Vyukov
8c4c6c413f sync: use atomic.Store in Once.Do
No perf/semantic changes, merely improves code health.
There were several questions as to why Once.Do uses
atomic.CompareAndSwap to do a store.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6208057
2012-05-14 19:27:29 +04:00
David Symonds
58bcec62c0 misc/dashboard/codereview: set In-Reply-To header to properly thread mail.
R=adg
CC=golang-dev
https://golang.org/cl/6208051
2012-05-14 10:05:39 +10:00
David Symonds
be15a8f2dc A+C: Jan Ziak (individual CLA)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6120047
2012-05-13 21:20:39 +10:00
Dmitriy Vyukov
eb0bc8164a runtime: revert MaxGcproc from 16 to 4
The change accidentally come in with this revision:
https://code.google.com/p/go/source/detail?spec=svn345cbca96c5550f2e89bc727703301933802923c&r=14c38c23c819a17021b1808cf4a34ef3a1a17db5

R=golang-dev
CC=golang-dev
https://golang.org/cl/6195073
2012-05-11 13:30:34 +04:00
Dmitriy Vyukov
95643647ae runtime: add parallel for algorithm
This is factored out part of:
https://golang.org/cl/5279048/
(parallel GC)

R=bsiegert, mpimenov, rsc, minux.ma, r
CC=golang-dev
https://golang.org/cl/5986054
2012-05-11 10:50:03 +04:00
Shenghou Ma
aa45e52e74 runtime: fix complex division benchmarks
we can't add the division result to n during iteration, because it might
turn n into NaN or Inf.

R=golang-dev, rsc, iant, iant
CC=golang-dev
https://golang.org/cl/6197045
2012-05-11 03:09:14 +08:00
Joel Sing
5374ded1f3 runtime: fix syscalls for netbsd
Use correct syscall numbers and arguments for NetBSD.
Provide a trampoline for signal returns (using signal API 3).

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6209048
2012-05-11 03:48:43 +10:00
Joel Sing
38445ca089 runtime: fix netbsd sigaction struct
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6198063
2012-05-11 03:48:16 +10:00
Joel Sing
a1bf5207af syscall: repair netbsd z* files
Manually repair/update z* files for netbsd - this allows Go to
compile again on 386.

R=golang-dev, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6194064
2012-05-11 03:47:27 +10:00
Marcel van Lohuizen
0355a71751 exp/locale/collate: Add maketables tool and generated tables.
Also set maxContractLen automatically.
Note that the table size is much bigger than it needs to be.
Optimization is best done, though, when the language specific
tables are added.

R=r
CC=golang-dev
https://golang.org/cl/6167044
2012-05-09 12:03:55 +02:00
Francisco Souza
25a8a8dab8 cmd/go: fix remote help reference to "go help packages"
go help remote used to reference "go help importpath", which has
changed to "go help packages".

Fixes #3598.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6201065
2012-05-09 16:16:02 +10:00
Nigel Tao
c8332198f4 go: fix the import path "./..." not matching ".".
Tested manually.

Fixes #3554.

Before:
$ cd $GOROOT/src/pkg
$ go list io
io
$ go list io/...
io
io/ioutil
$ cd $GOROOT/src/pkg/io
$ go list .
io
$ go list ./...
io/ioutil

After:
$ cd $GOROOT/src/pkg
$ go list io
io
$ go list io/...
io
io/ioutil
$ cd $GOROOT/src/pkg/io
$ go list .
io
$ go list ./...
io
io/ioutil
$ go list ././...
io
io/ioutil
$ go list ././.././io/...
io
io/ioutil
$ go list ../image
image
$ go list ../image/...
image
image/color
image/draw
image/gif
image/jpeg
image/png
$ go list ../.../template
html/template
text/template
$ cd $GOROOT/src/pkg
$ go list ./io
io
$ go list ./io/...
io
io/ioutil
$ go list ./.../pprof
net/http/pprof
runtime/pprof
$ go list ./compress
can't load package: package compress: no Go source files in /home/nigeltao/go/src/pkg/compress
$ go list ./compress/...
compress/bzip2
compress/flate
compress/gzip
compress/lzw
compress/zlib
$ cd $GOROOT/src/pkg/code.google.com
$ go list ./p/leveldb-go/...
code.google.com/p/leveldb-go/leveldb
code.google.com/p/leveldb-go/leveldb/crc
code.google.com/p/leveldb-go/leveldb/db
code.google.com/p/leveldb-go/leveldb/memdb
code.google.com/p/leveldb-go/leveldb/memfs
code.google.com/p/leveldb-go/leveldb/record
code.google.com/p/leveldb-go/leveldb/table
code.google.com/p/leveldb-go/manualtest/filelock
$ go list ./p/.../truetype
code.google.com/p/freetype-go/example/truetype
code.google.com/p/freetype-go/freetype/truetype
$ go list ./p/.../example
warning: "./p/.../example" matched no packages
$ go list ./p/.../example/...
code.google.com/p/freetype-go/example/freetype
code.google.com/p/freetype-go/example/gamma
code.google.com/p/freetype-go/example/raster
code.google.com/p/freetype-go/example/round
code.google.com/p/freetype-go/example/truetype
code.google.com/p/x-go-binding/example/imgview
code.google.com/p/x-go-binding/example/xgb

R=rsc
CC=golang-dev
https://golang.org/cl/6194056
2012-05-09 10:43:15 +10:00
Nigel Tao
738e77aa4f compress/testdata: change {e,pi}.txt from 10k to 100k digits.
These files change from exactly 10003 bytes long to 100003: a digit,
a '.', 100k digits, and a '\n'.

The magic constants in compress/flate/deflate_test.go change since
deflateInflateStringTests checks that the compressed form of e.txt
is not 'too large'. I'm not exactly sure how these numbers were
originally calculated (they were introduced in codereview 5554066
"make lazy matching work"); perhaps krasin@golang.org can comment.
My change was to increase the first one (no compression) to a tight
bound, and multiply all the others by 10.

Benchcmp numbers for compress/flate and compress/lzw below. LZW's
window size of 4096 is less than 10k, so shows no significant change.
Flate's window size is 32768, between 10k and 100k, and so the .*1e5
and .*1e6 benchmarks show a dramatic drop, since the compressed forms
are no longer a trivial forward copy of 10k digits repeated over and
over, but should now be more representative of real world usage.

compress/flate:
benchmark                            old MB/s     new MB/s  speedup
BenchmarkDecodeDigitsSpeed1e4           16.58        16.52    1.00x
BenchmarkDecodeDigitsSpeed1e5           68.09        18.10    0.27x
BenchmarkDecodeDigitsSpeed1e6          124.63        18.35    0.15x
BenchmarkDecodeDigitsDefault1e4         17.21        17.12    0.99x
BenchmarkDecodeDigitsDefault1e5        118.28        19.19    0.16x
BenchmarkDecodeDigitsDefault1e6        295.62        20.52    0.07x
BenchmarkDecodeDigitsCompress1e4        17.22        17.17    1.00x
BenchmarkDecodeDigitsCompress1e5       118.19        19.21    0.16x
BenchmarkDecodeDigitsCompress1e6       295.59        20.55    0.07x
BenchmarkEncodeDigitsSpeed1e4            8.18         8.19    1.00x
BenchmarkEncodeDigitsSpeed1e5           43.22        12.84    0.30x
BenchmarkEncodeDigitsSpeed1e6           80.76        13.48    0.17x
BenchmarkEncodeDigitsDefault1e4          6.29         6.19    0.98x
BenchmarkEncodeDigitsDefault1e5         31.63         3.60    0.11x
BenchmarkEncodeDigitsDefault1e6         52.97         3.24    0.06x
BenchmarkEncodeDigitsCompress1e4         6.20         6.19    1.00x
BenchmarkEncodeDigitsCompress1e5        31.59         3.59    0.11x
BenchmarkEncodeDigitsCompress1e6        53.18         3.25    0.06x

compress/lzw:
benchmark               old MB/s     new MB/s  speedup
BenchmarkDecoder1e4        21.99        22.09    1.00x
BenchmarkDecoder1e5        22.77        22.71    1.00x
BenchmarkDecoder1e6        22.90        22.90    1.00x
BenchmarkEncoder1e4        21.04        21.19    1.01x
BenchmarkEncoder1e5        22.06        22.06    1.00x
BenchmarkEncoder1e6        22.16        22.28    1.01x

R=rsc
CC=golang-dev, krasin
https://golang.org/cl/6207043
2012-05-09 10:02:28 +10:00
Nigel Tao
ffd0d02d09 compress/flate: benchmark some English text, not just the digits of e.
The testdata/e.txt input is repeated on the longer benchmarks, but the
length of that data is less than flate's window size, so the numbers are
essentially measuring the performance of a trivial compression. A follow-up
CL will add more data to testdata/e.txt.

Sample output on my laptop (linux, amd64):

BenchmarkDecodeDigitsSpeed1e4	    5000	    603153 ns/op	  16.58 MB/s
BenchmarkDecodeDigitsSpeed1e5	    1000	   1465602 ns/op	  68.23 MB/s
BenchmarkDecodeDigitsSpeed1e6	     200	   8036050 ns/op	 124.44 MB/s
BenchmarkDecodeDigitsDefault1e4	    5000	    581796 ns/op	  17.19 MB/s
BenchmarkDecodeDigitsDefault1e5	    2000	    846653 ns/op	 118.11 MB/s
BenchmarkDecodeDigitsDefault1e6	     500	   3385782 ns/op	 295.35 MB/s
BenchmarkDecodeDigitsCompress1e4	    5000	    581180 ns/op	  17.21 MB/s
BenchmarkDecodeDigitsCompress1e5	    2000	    846209 ns/op	 118.17 MB/s
BenchmarkDecodeDigitsCompress1e6	     500	   3386174 ns/op	 295.32 MB/s
BenchmarkDecodeTwainSpeed1e4	    5000	    643563 ns/op	  15.54 MB/s
BenchmarkDecodeTwainSpeed1e5	     500	   5418408 ns/op	  18.46 MB/s
BenchmarkDecodeTwainSpeed1e6	      50	  52277520 ns/op	  19.13 MB/s
BenchmarkDecodeTwainDefault1e4	    5000	    583551 ns/op	  17.14 MB/s
BenchmarkDecodeTwainDefault1e5	     500	   4443428 ns/op	  22.51 MB/s
BenchmarkDecodeTwainDefault1e6	      50	  41862080 ns/op	  23.89 MB/s
BenchmarkDecodeTwainCompress1e4	    5000	    583490 ns/op	  17.14 MB/s
BenchmarkDecodeTwainCompress1e5	     500	   4426356 ns/op	  22.59 MB/s
BenchmarkDecodeTwainCompress1e6	      50	  41657940 ns/op	  24.01 MB/s
BenchmarkEncodeDigitsSpeed1e4	    2000	   1230907 ns/op	   8.12 MB/s
BenchmarkEncodeDigitsSpeed1e5	    1000	   2319129 ns/op	  43.12 MB/s
BenchmarkEncodeDigitsSpeed1e6	     100	  12378950 ns/op	  80.78 MB/s
BenchmarkEncodeDigitsDefault1e4	    1000	   1597865 ns/op	   6.26 MB/s
BenchmarkEncodeDigitsDefault1e5	     500	   3163458 ns/op	  31.61 MB/s
BenchmarkEncodeDigitsDefault1e6	     100	  18770240 ns/op	  53.28 MB/s
BenchmarkEncodeDigitsCompress1e4	    1000	   1603461 ns/op	   6.24 MB/s
BenchmarkEncodeDigitsCompress1e5	     500	   3168766 ns/op	  31.56 MB/s
BenchmarkEncodeDigitsCompress1e6	     100	  18855830 ns/op	  53.03 MB/s
BenchmarkEncodeTwainSpeed1e4	    1000	   1338049 ns/op	   7.47 MB/s
BenchmarkEncodeTwainSpeed1e5	     500	   7341622 ns/op	  13.62 MB/s
BenchmarkEncodeTwainSpeed1e6	      50	  67484600 ns/op	  14.82 MB/s
BenchmarkEncodeTwainDefault1e4	    1000	   1778399 ns/op	   5.62 MB/s
BenchmarkEncodeTwainDefault1e5	     100	  23261810 ns/op	   4.30 MB/s
BenchmarkEncodeTwainDefault1e6	      10	 243533600 ns/op	   4.11 MB/s
BenchmarkEncodeTwainCompress1e4	    1000	   1795469 ns/op	   5.57 MB/s
BenchmarkEncodeTwainCompress1e5	      50	  29447140 ns/op	   3.40 MB/s
BenchmarkEncodeTwainCompress1e6	       5	 321686800 ns/op	   3.11 MB/s
ok  	compress/flate	89.246s

R=rsc, r
CC=golang-dev
https://golang.org/cl/6195055
2012-05-09 08:57:54 +10:00
Nigel Tao
32b85baae3 compress/testdata: remove Byte Order Mark from the Tom Sawyer data.
I'm not sure where the BOM came from, originally.
http://www.gutenberg.org/files/74/74.txt doesn't have it, although
a fresh download of that URL gives me "\r\n"s instead of plain "\n"s,
and the extra line "Character set encoding: ASCII". Maybe Project
Gutenberg has changed their server configuration since we added that
file to the Go repo.

Anyway, this change is just manually excising the BOM from the start
of the file, leaving pure ASCII.

R=r, bradfitz
CC=golang-dev, krasin, rsc
https://golang.org/cl/6197061
2012-05-08 10:41:45 +10:00
Russ Cox
36675daa0f crypto/aes: fix comment
Fixes #3589.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/6190044
2012-05-07 16:45:34 -04:00
Ian Lance Taylor
dc6ec74f07 test/bench/shootout: fix gccgo binary-list-freelist test
R=r
CC=golang-dev
https://golang.org/cl/6202046
2012-05-07 10:14:50 -07:00
Jean-Marc Eurin
9d063816ef misc/emacs: Restore the window position after a successful gofmt.
This adds restoring the window position so that the buffer doesn't jump around after the erase/copy.

R=sameer
CC=golang-dev
https://golang.org/cl/5981055
2012-05-07 11:46:01 -04:00
Sameer Ajmani
a96a983606 C: correct entry: jmeurin, not jme.
R=golang-dev, rsc
CC=golang-dev, jme, jmeurin
https://golang.org/cl/6192057
2012-05-07 11:40:43 -04:00
Sameer Ajmani
80790ab740 C: Jeremy Ellington (Google CLA)
R=golang-dev, rsc
CC=golang-dev, jme
https://golang.org/cl/6197058
2012-05-07 10:47:58 -04:00
Marcel van Lohuizen
56a76c88f8 exp/locale/collate: from the regression test we derive that the spec
dictates a CJK rune is only part of a certain specified range if it
is explicitly defined in the Unicode Codepoint Database.
Fixed the code and some of the tests accordingly.

R=r
CC=golang-dev
https://golang.org/cl/6160044
2012-05-07 11:51:40 +02:00
Marcel van Lohuizen
18aded7ab9 exp/norm: It is important that the unicode versions of the various packages align.
Replace hard-coded version strings with unicode.Version.

R=r, r
CC=golang-dev
https://golang.org/cl/6163045
2012-05-07 11:41:40 +02:00
Ian Lance Taylor
6c8447d429 test: add bug438, a valid test case that gccgo used to fail to compile
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6196047
2012-05-04 13:14:09 -07:00
Shenghou Ma
4d724f4c5b sync/atomic: fix 64-bit atomic cas for Linux/ARM
This is a follow-up to CL 5978051.
    Use kernel cas64 helper if we can, fallback to LDREXD/STREXD if
    we are on ARMv6 or higher, and to lock-emulated cas64 if on ARMv5.
    A future CL will fix {Add,Load,Store}{Int,Uint}64 and issue 3331.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/6034048
2012-05-05 02:02:36 +08:00
Shenghou Ma
a642ca4930 runtime: get per-process random number from auxv for hash table
Decode AT_RANDOM, AT_HWCAP, and AT_PLATFORM.
This CL only make use of AT_RANDOM, but future CLs will make use of the others.

R=dave, rsc
CC=golang-dev
https://golang.org/cl/5978051
2012-05-05 01:59:14 +08:00
Shenghou Ma
dac4c3eee9 cmd/cgo, cmd/cc, cmd/ld: detect dynamic linker automatically
Some newer Linux distributions (Ubuntu ARM at least) use a new multiarch
directory organization, where dynamic linker is no longer in the hardcoded
path in our linker.
For example, Ubuntu 12.04 ARM hardfloat places its dynamic linker at
/lib/arm-linux-gnueabihf/ld-linux.so.3

Ref: http://lackof.org/taggart/hacking/multiarch/

Also, to support Debian GNU/kFreeBSD as a FreeBSD variant, we need this capability, so it's part of issue 3533.

This CL add a new pragma (#pragma dynlinker "path") to cc.

R=iant, rsc
CC=golang-dev
https://golang.org/cl/6086043
2012-05-05 01:54:16 +08:00
Shenghou Ma
a29304bfb8 runtime: fix c compiler warning
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6185047
2012-05-05 01:39:09 +08:00
Shenghou Ma
018bcc3535 runtime, misc/cgo/test: fix build for Linux/ARM
1. In CL 5989057, I made a mistake in the last minute change.
"MOVW.W R4, -4(SP)" should really be "MOVW.W R4, -4(R13)",
as 5l will rewrite offset for SP.
2. misc/cgo/test/issue1560.go tests for parallel sleep of 1s,
but on ARM, the deadline is frequently missed, so change sleep
time to 2s on ARM.

R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/6202043
2012-05-05 01:35:13 +08:00
Rémy Oudompheng
018c60bd8f math/big: fix superpolynomial complexity in Karatsuba algorithm.
benchmark                     old ns/op    new ns/op    delta
BenchmarkExp3Power0x10              732          734   +0.27%
BenchmarkExp3Power0x40              834          836   +0.24%
BenchmarkExp3Power0x100            1600         1579   -1.31%
BenchmarkExp3Power0x400            3478         3417   -1.75%
BenchmarkExp3Power0x1000          19388        19229   -0.82%
BenchmarkExp3Power0x4000         160274       156881   -2.12%
BenchmarkExp3Power0x10000       1552050      1372058  -11.60%
BenchmarkExp3Power0x40000      27328710     15216920  -44.32%
BenchmarkExp3Power0x100000    612349000    131407100  -78.54%
BenchmarkExp3Power0x400000  44073524000   1122195000  -97.45%

R=golang-dev, mtj, gri, rsc
CC=golang-dev, remy
https://golang.org/cl/6176043
2012-05-04 19:05:26 +02:00
Akshat Kumar
ccdca2cd6b pkg/runtime: Plan 9 signal handling in Go
This adds proper note handling for Plan 9,
and fixes the issue of properly killing go procs.
Without this change, the first go proc that dies
(using runtime·exit()) would kill all the running
go procs. Proper signal handling is needed.

R=golang-dev, ality, rminnich, rsc
CC=golang-dev, john, mirtchovski
https://golang.org/cl/5617048
2012-05-04 03:48:34 -07:00
Anthony Martin
fe5005f721 syscall: remove the Signal type on Plan 9
Instead use a new type, "Note", whose underlying
type is just a string.  This change allows us to
remove the exported os.Plan9Note type.

R=bradfitz, seed, rsc
CC=golang-dev
https://golang.org/cl/6015046
2012-05-04 03:44:41 -07:00
Shenghou Ma
2bed8a7e95 go/build: cgo is supported on Linux/ARM
Last Part of CL 5601044 (cgo: Linux/ARM support)
        Fixes #1880.

R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/5988057
2012-05-04 18:34:04 +08:00
Shenghou Ma
e7a0a7595a cmd/go: cgo for Linux/ARM
Part 4 of CL 5601044 (cgo: Linux/ARM support)

R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/5989058
2012-05-04 18:29:40 +08:00
Shenghou Ma
9602dd5e87 cmd/cgo: support Linux/ARM
Part 3 of CL 5601044 (cgo: Linux/ARM support)

R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/5991066
2012-05-04 18:26:16 +08:00
Shenghou Ma
5cffce611a runtime: cgo support for Linux/ARM
Part 2 of CL 5601044 (cgo: Linux/ARM support)

R=dave, rsc
CC=golang-dev
https://golang.org/cl/5989057
2012-05-04 18:20:09 +08:00
Shenghou Ma
452a9e452b cmd/5l, cmd/ld: dynamic linking library support
Part 1 of CL 5601044 (cgo: Linux/ARM support)
        Limitation: doesn't support thumb library yet.

R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/5991065
2012-05-04 18:14:26 +08:00
David Symonds
c44a22cc49 misc/dashboard/codereview: remove transitional code.
All current CLs have subject lines, so we don't need to check any more.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6196044
2012-05-04 16:40:24 +10:00
Michael Chaten
3fab2a97e4 encoding/json: Fix panic when trying to unmarshal the empty string into an integer
Fixes #3450.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/6035050
2012-05-03 17:35:44 -04:00
Francisco Souza
61060acdc1 syscall: add Termios support on darwin
Update #3316.

R=dave, kevlar, devon.odell, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6063053
2012-05-03 17:33:19 -04:00
Ian Lance Taylor
890be5ced0 test: add bug437, a test that used to fail with gccgo at link time
Updates #3391.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6177045
2012-05-03 14:25:11 -07:00
Adam Langley
c8e1946f33 crypto/x509: fix panic when using unavailable hash function.
crypto.Hash.New() changed to panicking when the hash function isn't
linked in, but crypto/x509 still expects it to return nil.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6175047
2012-05-03 16:39:57 -04:00
Shenghou Ma
278d4a583d cmd/5c, cmd/5a, cmd/5l: ARM support for PREFETCH built-in
R=rsc
CC=golang-dev
https://golang.org/cl/6174049
2012-05-04 03:24:14 +08:00
Ian Lance Taylor
df64448932 test: add bug436, valid code that crashed gccgo
R=golang-dev, bsiegert, rsc
CC=golang-dev
https://golang.org/cl/6158046
2012-05-03 10:33:10 -07:00
Shenghou Ma
52ec4aa24a cmd/dist: remove stray src/pkg/runtime/z* when cleaning
R=golang-dev, bradfitz, dave, rsc, lstoakes, rsc
CC=golang-dev
https://golang.org/cl/6180044
2012-05-04 00:58:48 +08:00
Andrew Gerrand
7a77645aa8 misc/dashboard/codereview: add copyright notices to Go files
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6177043
2012-05-03 09:22:45 +10:00
Russ Cox
d42495aa80 cmd/cc: add PREFETCH built-in (like SET, USED)
This makes it possible to inline the prefetch of upcoming
memory addresses during garbage collection, instead of
needing to flush registers, make a function call, and
reload registers.  On garbage collection-heavy workloads,
this results in a 5% speedup.

Fixes #3493.

R=dvyukov, ken, r, dave
CC=golang-dev
https://golang.org/cl/5990066
2012-05-02 16:22:56 -04:00
Marcel van Lohuizen
10838165d8 exp/locale/collate: fixed two bugs uncovered by regression tests.
The first bug was that tertiary ignorables had the same colElem as
implicit colElems, yielding unexpected results. The current encoding
ensures that a non-implicit colElem is never 0.  This fix uncovered
another bug of the trie that indexed incorrectly into the null block.
This was caused by an unfinished optimization that would avoid the
need to max out the most-significant bits of continuation bytes.
This bug was also present in the trie used in exp/norm and has been
fixed there as well. The appearence of the bug was rare, as the lower
blocks happened to be nearly nil.

R=r
CC=golang-dev
https://golang.org/cl/6127070
2012-05-02 17:01:41 +02:00