1
0
mirror of https://github.com/golang/go synced 2024-10-03 09:31:23 -06:00
Commit Graph

12961 Commits

Author SHA1 Message Date
Marcel van Lohuizen
52f0afe0db exp/locale/collate: Added skeleton for the higher-level types to provide
context for change lists of lower-level types. The public APIs are defined
in builder.go and collate.go. Type table is the glue between the lower and
higher level code and might be a good starting point for understanding the
collation code.

R=r, r
CC=golang-dev
https://golang.org/cl/5999053
2012-04-25 13:19:00 +02:00
Marcel van Lohuizen
bcf48c7971 exp/locale/collate: added trie for associating colElems to runes.
The trie code looks a lot like the trie in exp/norm. It uses different
types, however.  Also, there is only a lookup for []byte and the unsafe
lookup methods have been dropped, as well as sparse mode.
There is now a method for generating a trie. To output Go code, one now needs
to first generate a trie and then call print() on it.

R=r, r, mpvl
CC=golang-dev
https://golang.org/cl/5966064
2012-04-25 13:16:57 +02:00
Marcel van Lohuizen
bb3f3c9775 exp/locale/collate: added representation for collation elements
(see http://www.unicode.org/reports/tr10/).

R=r, r
CC=golang-dev
https://golang.org/cl/5981048
2012-04-25 13:16:24 +02:00
Marcel van Lohuizen
e456d015fb exp/locale/collate: implementation of trie that is used for detecting contractions.
(See http://www.unicode.org/reports/tr10/#Contractions.)  Each rune that is at the
start of any contraction is associated a trie. This trie, in turn, may be shared
by other runes that have the same set of suffixes.

R=r, r
CC=golang-dev
https://golang.org/cl/5970066
2012-04-25 13:15:48 +02:00
Gustavo Niemeyer
733b51d996 net/http: revert 97d027b3aa68
Revert the following change set:

        changeset:   13018:97d027b3aa68
        user:        Gustavo Niemeyer <gustavo@niemeyer.net>
        date:        Mon Apr 23 22:00:16 2012 -0300
        summary:     net/http: allow clients to disable keep-alive

This broke a test on Windows 64 and somebody else
will have to check.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6112054
2012-04-25 02:32:51 -03:00
Ian Lance Taylor
990f3af72b crypto/rand: use io.ReadFull in test
On Solaris versions before Solaris 11, the kernel will not
return more than 1040 on a single read from /dev/urandom.

R=golang-dev, agl, bradfitz, rsc, iant, dchest
CC=golang-dev
https://golang.org/cl/6113046
2012-04-24 21:36:42 -07:00
Bobby Powers
52f122d72e encoding/json: allow punctuation in tag names
everything except backslash and the quote chars is fair game.

Fixes #3546.

R=rsc, r
CC=golang-dev
https://golang.org/cl/6048047
2012-04-25 14:33:33 +10:00
Mikio Hara
b252fe7002 net: fix crash of Listen with "" or nil laddr
Fixes #3584.

R=dave, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/6119043
2012-04-25 12:29:14 +09:00
Dave Cheney
0681b13437 bytes: add assembly version of IndexByte for ARM
benchmark                        old ns/op    new ns/op    delta
BenchmarkIndexByte32                   459          126  -72.55%
BenchmarkIndexByte4K                 52404        10939  -79.13%
BenchmarkIndexByte4M              54470800     11177370  -79.48%
BenchmarkIndexByte64M           1010803000    178860500  -82.31%

benchmark                         old MB/s     new MB/s  speedup
BenchmarkIndexByte32                 69.58       252.63    3.63x
BenchmarkIndexByte4K                 78.16       374.42    4.79x
BenchmarkIndexByte4M                 77.00       375.25    4.87x
BenchmarkIndexByte64M                66.39       375.20    5.65x

R=rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6106044
2012-04-25 13:18:31 +10:00
Rob Pike
97a7defed4 vet: check values for named constants as well as literals.
As in:
        const format = "%s"
        fmt.Printf(format, "hi")
Also fix a couple of bugs by rewriting the routine.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6099057
2012-04-25 12:14:38 +10:00
Rob Pike
459837c86e all: fix errors found by go vet
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6125044
2012-04-25 11:33:27 +10:00
Andrew Balholm
dde8358a1c exp/html: adjust inTableIM to match spec
Don't foster-parent text nodes that consist only of whitespace.
(I implemented this entirely in inTableIM instead of creating an
inTableTextIM, because the sole purpose of inTableTextIM seems to be
to combine character tokens into a string, which our tokenizer does
already.)

Use parseImpliedToken to clarify a couple of cases.

Handle <style>, <script>, <input>, and <form>.

Ignore doctype tokens.

Pass 20 additional tests.

R=nigeltao
CC=golang-dev
https://golang.org/cl/6117048
2012-04-25 10:49:27 +10:00
Ian Lance Taylor
76490cffaf test: add test for order of evaluation of map index on left of =
Gccgo used to get this wrong.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6121044
2012-04-24 10:17:26 -07:00
Mikkel Krautz
78e4d1752e misc/dist: more gophers for OS X installer
Replaces the default OS X installer background
with a more fitting image.

R=golang-dev
CC=golang-dev
https://golang.org/cl/6116043
2012-04-24 09:24:19 -07:00
Shenghou Ma
0f80050542 runtime: fix runtime.Breakpoint for ARM
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6100053
2012-04-24 23:19:44 +08:00
Shenghou Ma
dee62a440c cmd/5g: fix URL typo
R=golang-dev, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5919054
2012-04-24 23:17:16 +08:00
Andrew Balholm
b885633d62 exp/html: make inBodyIM match spec
This CL corrects the remaining differences that I could find between the
implementation of inBodyIM and the spec:

Handle <rp> and <rt>.

Adjust SVG and MathML attributes.

Reconstruct active formatting elements in the "any other start tag" case.

Pass 7 additional tests.

R=nigeltao
CC=golang-dev
https://golang.org/cl/6101055
2012-04-24 15:27:48 +10:00
Brad Fitzpatrick
87eaa4cd0c mime/multipart: report io.EOF correctly on part ending without newlines
If a part ends with "--boundary--", without a final "\r\n",
that's also a graceful EOF, and we should return io.EOF instead
of the fmt-wrapped io.EOF from bufio.Reader.ReadSlice.

I found this bug parsing an image attachment from gmail.
Minimal test case stripped down from the original
gmail-generated attachment included.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6118043
2012-04-23 22:26:48 -07:00
Rob Pike
5fc2af1f77 path: document that Clean deletes trailing slashes.
Fixes #3492.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6112044
2012-04-24 13:17:05 +10:00
Rob Pike
11820899a5 text/template: improve the error reporting for unexported fields.
Changes suggested by rsc after last CL.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6117044
2012-04-24 13:11:59 +10:00
Gustavo Niemeyer
cc5cbee1b6 net/http: allow clients to disable keep-alive
Fixes #3540.

R=golang-dev, bradfitz, gustavo
CC=golang-dev
https://golang.org/cl/5996044
2012-04-23 22:00:16 -03:00
Rémy Oudompheng
d1ab10b4ff net: fix typo in Listener.File() documentation
R=golang-dev, dave, rsc
CC=golang-dev, remy
https://golang.org/cl/6097044
2012-04-24 01:27:19 +02:00
Ian Lance Taylor
f14a5347e6 test: test handling of negative float constants
This used to panic when compiled by gccgo.

Updates #2876.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6100055
2012-04-23 15:47:34 -07:00
Ian Lance Taylor
426bf36131 time: change float expression to ensure it is an integer
When I increased the number of bits that gccgo uses for
untyped floats, the expression 0.52*1e9 was no longer
integral.  This patch fixes that.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6113043
2012-04-23 15:46:54 -07:00
Mikkel Krautz
c17d09a657 misc/dist: require 10.6 or later for OS X .pkgs
This changes the misc/dist program to generate OS X
packages using pkgbuild and productbuild.

The productbuild utility makes it easy to generate
packages with a custom Distribution file.  This allows
us to add an installcheck script that presents a
friendly message to users who are running on an old
version of Mac OS X.

The change also fixes a few issues with the
postinstall script:

 - In-repo version of the script has been made
   executable. Installers generated using the new
   tools couldn't execute it otherwise.

 - It now uses -d for checking for the existence
   of the Xcode specs directory.

 - The call to sudo.bash has been dropped since cov
   and prof aren't bundled with the binary
   distributions.

Fixes #3455.

Tested on 10.5.8, 10.6.0, 10.6.8 and 10.7.3.

R=adg, golang-dev
CC=golang-dev
https://golang.org/cl/5987044
2012-04-23 14:56:03 -07:00
Luuk van Dijk
5583060c4c cmd/gc: fix addresses escaping through closures called in-place.
Fixes #3545.

R=rsc
CC=golang-dev
https://golang.org/cl/6061043
2012-04-23 15:39:01 -04:00
Pascal S. de Kloe
b678c19785 net/http: lex cleanup
R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/6099043
2012-04-23 10:26:10 -07:00
Shenghou Ma
e7e7b1c55c math: ARM assembly implementation for Abs
Obtained on 700MHz OMAP4460:
benchmark       old ns/op    new ns/op    delta
BenchmarkAbs           61           23  -61.63%

R=dave, remyoudompheng, mtj, rsc
CC=golang-dev
https://golang.org/cl/6094047
2012-04-23 23:47:36 +08:00
Rob Pike
a8098cbcfd text/template: detect unexported fields better
Moves the error detection back into execution, where it used to be,
and improves the error message.
Rolls back most of 6009048, which broke lower-case keys in maps.
If it weren't for maps we could detect this at compile time rather than
execution time.

Fixes #3542.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6098051
2012-04-23 15:39:02 +10:00
Rob Pike
53372903c7 reflect: document and test TypeOf(nil)
Fixes #3549.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6107047
2012-04-23 12:07:02 +10:00
Andrew Balholm
0cc8ee9808 exp/html: add more cases to inBodyIM
Don't set framesetOK to false for hidden input elements.

Handle <param>, <source>, <track>, <textarea>, <iframe>, <noembed>,
and <noscript>

Pass 7 additional tests.

R=nigeltao
CC=golang-dev
https://golang.org/cl/6094045
2012-04-22 16:19:21 +10:00
Rémy Oudompheng
cad480440d strconv: 2x-4x speed improvement for atof64.
benchmark                      old ns/op    new ns/op    delta
BenchmarkAtof64Decimal               344           71  -79.22%
BenchmarkAtof64Float                 397           90  -77.15%
BenchmarkAtof64FloatExp              445          241  -45.84%
BenchmarkAtof64Big                   731          324  -55.68%
BenchmarkAtof64RandomBits            761          453  -40.47%
BenchmarkAtof64RandomFloats          690          314  -54.49%

R=dave, rsc
CC=golang-dev, remy
https://golang.org/cl/5988053
2012-04-21 13:56:51 +02:00
Quan Yong Zhai
dd963ddf05 compress/zlib: minor fixes
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/6058043
2012-04-21 14:34:42 +10:00
Michael Chaten
32c3a626da runtime: add benchmark for complex128 division
R=golang-dev, dave, rsc
CC=golang-dev, minux.ma
https://golang.org/cl/6070043
2012-04-21 13:24:41 +10:00
Dave Cheney
1f14d45e7d net: fix race between Close and Read
Fixes #3507.

Applied the suggested fix from rsc. If the connection
is in closing state then errClosing will bubble up to
the caller.

The fix has been applied to udp, ip and unix as well as
their code path include nil'ing c.fd on close. Func
tests are available in the linked issue that verified
the bug existed there as well.

R=rsc, fullung, alex.brainman, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/6002053
2012-04-21 10:01:32 +10:00
Andrew Balholm
904c7c8e99 exp/html: more work on inBodyIM
Reorder some cases.
Handle <pre>, <listing>, </form>, </li>, </dd>, </dt>, </h1>, </h2>,
</h3>, </h4>, </h5>, and </h6> tags.

Pass 6 additional tests.

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/6089043
2012-04-21 09:20:38 +10:00
Ian Lance Taylor
244706bd0f runtime: disable memory profiler in gc_test
This lets the test pass on PPC64 GNU/Linux, which uses a much
larger page size and thus uses more memory to hold blocks
allocated for memory profiling.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6048054
2012-04-20 11:36:06 -07:00
Colby Ranger
a6d4471b2b net/http/httputil: Made reverseproxy test less flaky.
The reverseproxy test depended on the behavior of
runtime.NumGoroutines(), which makes no guarantee when
goroutines are reaped. Instead, modify the flushLoop()
to invoke a callback when it returns, so the exit
from the loop can be tested, instead of the number
of gorountines running.

R=bradfitz
CC=golang-dev
https://golang.org/cl/6068046
2012-04-20 09:31:23 -07:00
Shenghou Ma
dda6d6aa70 test: use testlib in a few more cases (part 2)
Introduced "runoutput" cmd for running generated program

R=golang-dev, iant, bradfitz, remyoudompheng
CC=golang-dev
https://golang.org/cl/5869049
2012-04-20 23:45:43 +08:00
Andrew Gerrand
f8dde60e2b doc: don't wrap package names in directory listing
Fixes #3522.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6063054
2012-04-20 10:04:13 -04:00
Andrew Balholm
eea5a432cb exp/html: start making inBodyIM match the spec
Reorder some start tags.

Improve handling of </body>.
Handle </html>.

Pass 2 additional tests (by handling </html>).

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/6082043
2012-04-20 15:48:13 +10:00
Andrew Balholm
6791057296 exp/html: ignore null bytes in text
pass one additional test

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/6048051
2012-04-20 14:25:42 +10:00
Andrew Balholm
7d63ff09a5 exp/html: improve afterHeadIM
Clean up the flow of control.
Fix the TODO for handling <html> tags.
Add a case to ignore doctype declarations.

Pass one additional test.

R=nigeltao
CC=golang-dev
https://golang.org/cl/6072047
2012-04-20 10:48:10 +10:00
Akshat Kumar
49a7da2dd9 syscall: cleanly exit all Go procs on Plan 9
syscall.Exit would originally kill only the calling
Go proc, leaving behind other procs in the
same group. This change makes syscall.Exit call
runtime·exit, which due to CL
https://golang.org/cl/5617048
will cleanly exit all the Go procs in the group.

R=golang-dev, rsc, rminnich, remyoudompheng, ality, john
CC=golang-dev, mirtchovski
https://golang.org/cl/6036051
2012-04-19 16:31:26 -07:00
Andrew Balholm
fca32f02e9 exp/html: improve InHeadIM
Clean up the flow of control, and add a case for doctype tokens (to
ignore them).

R=nigeltao
CC=golang-dev
https://golang.org/cl/6069045
2012-04-20 09:08:58 +10:00
Shenghou Ma
acb550504f net/http: add example for FileServer to mention StripPrefix
Fixes #3530.

R=golang-dev, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/6032052
2012-04-20 00:41:10 +08:00
Brad Fitzpatrick
a682540547 A+C: add Bjorn Tillenius (Individual CLA)
R=golang-dev, kevlar
CC=golang-dev
https://golang.org/cl/6075045
2012-04-19 09:23:48 -07:00
Brad Fitzpatrick
3af088dbaf A+C: Add Michael Chaten (Individual CLA)
R=golang-dev, kevlar
CC=golang-dev
https://golang.org/cl/6075044
2012-04-19 09:18:49 -07:00
Andrew Balholm
c88ca5906c exp/html: add parseImpliedToken method to parser
This method will allow us to be explicit about what we're doing when
we insert an implied token, and avoid repeating the logic involved in
multiple places.

R=nigeltao
CC=golang-dev
https://golang.org/cl/6060048
2012-04-19 11:48:17 +10:00
Benny Siegert
e03dd509d4 doc/articles/image_draw.html: Change ColorImage to Uniform
Fixes #3474.

R=nigeltao
CC=golang-dev
https://golang.org/cl/6048050
2012-04-19 11:04:42 +10:00