1
0
mirror of https://github.com/golang/go synced 2024-10-04 13:21:22 -06:00
Commit Graph

3635 Commits

Author SHA1 Message Date
Russ Cox
25733a94fd reflect: support for struct tag use by multiple packages
Each package using struct field tags assumes that
it is the only package storing data in the tag.
This CL adds support in package reflect for sharing
tags between multiple packages.  In this scheme, the
tags must be of the form

        key:"value" key2:"value2"

(raw strings help when writing that tag in Go source).

reflect.StructField's Tag field now has type StructTag
(a string type), which has method Get(key string) string
that returns the associated value.

Clients of json and xml will need to be updated.
Code that says

        type T struct {
                X int "name"
        }

should become

        type T struct {
                X int `json:"name"`  // or `xml:"name"`
        }

Use govet to identify struct tags that need to be changed
to use the new syntax.

R=r, r, dsymonds, bradfitz, kevlar, fvbommel, n13m3y3r
CC=golang-dev
https://golang.org/cl/4645069
2011-06-29 09:52:34 -04:00
Wei Guangjing
f83609f642 runtime: windows/amd64 port
R=rsc, alex.brainman, hectorchu, r
CC=golang-dev
https://golang.org/cl/3759042
2011-06-29 17:37:56 +10:00
Rob Pike
d6f80e1a4c regexp: document that Regexp is thread-safe.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4667047
2011-06-29 15:41:09 +10:00
Rob Pike
c756a1954c exp/template: boolean constants
R=rsc
CC=golang-dev
https://golang.org/cl/4628073
2011-06-29 15:02:04 +10:00
Russ Cox
7e1a3e9f20 exp/regexp/syntax: incremental concat, alternate
Also reuse of *Regexp nodes.

I believe this is the end of the parser.
The only non-execution code that remains is
the code to expand x{3,5} into simpler operations.

R=sam.thorogood, r
CC=golang-dev
https://golang.org/cl/4629078
2011-06-29 00:55:37 -04:00
Rob Pike
3a52cf56f8 gob: delete some unused bits from the GobEncoder/GobDecoder code.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4631076
2011-06-29 13:57:59 +10:00
Rob Pike
c2e0d604ee exp/template: fix build
wrong path in Makefile. why didn't my all.bash fail?
TBR=dsymonds

R=dsymonds
CC=golang-dev
https://golang.org/cl/4630075
2011-06-29 13:55:49 +10:00
Rob Pike
a733f0bcd1 exp/template: use MethodByName, add to build.
R=rsc, adg, r
CC=golang-dev
https://golang.org/cl/4641081
2011-06-29 13:44:13 +10:00
Rob Pike
22484e2262 reflect: MethodByName
It's more common to ask for methods by name than by index, so might
as well make it easy to do so.

R=rsc
CC=golang-dev
https://golang.org/cl/4639083
2011-06-29 13:11:49 +10:00
Mikio Hara
161deaa85c runtime/cgo: fix build
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4629082
2011-06-28 22:26:31 -04:00
Dmitriy Vyukov
997c00f991 runtime: replace Semacquire/Semrelease implementation
1. The implementation uses distributed hash table of waitlists instead of a centralized one.
  It significantly improves scalability for uncontended semaphores.
2. The implementation provides wait-free fast-path for signalers.
3. The implementation uses less locks (1 lock/unlock instead of 5 for Semacquire).
4. runtime·ready() call is moved out of critical section.
5. Semacquire() does not call semwake().
Benchmark results on HP Z600 (2 x Xeon E5620, 8 HT cores, 2.40GHz)
are as follows:
benchmark                                        old ns/op    new ns/op    delta
runtime_test.BenchmarkSemaUncontended                58.20        36.30  -37.63%
runtime_test.BenchmarkSemaUncontended-2             199.00        18.30  -90.80%
runtime_test.BenchmarkSemaUncontended-4             327.00         9.20  -97.19%
runtime_test.BenchmarkSemaUncontended-8             491.00         5.32  -98.92%
runtime_test.BenchmarkSemaUncontended-16            946.00         4.18  -99.56%

runtime_test.BenchmarkSemaSyntNonblock               59.00        36.80  -37.63%
runtime_test.BenchmarkSemaSyntNonblock-2            167.00       138.00  -17.37%
runtime_test.BenchmarkSemaSyntNonblock-4            333.00       129.00  -61.26%
runtime_test.BenchmarkSemaSyntNonblock-8            464.00       130.00  -71.98%
runtime_test.BenchmarkSemaSyntNonblock-16          1015.00       136.00  -86.60%

runtime_test.BenchmarkSemaSyntBlock                  58.80        36.70  -37.59%
runtime_test.BenchmarkSemaSyntBlock-2               294.00       149.00  -49.32%
runtime_test.BenchmarkSemaSyntBlock-4               333.00       177.00  -46.85%
runtime_test.BenchmarkSemaSyntBlock-8               471.00       221.00  -53.08%
runtime_test.BenchmarkSemaSyntBlock-16              990.00       227.00  -77.07%

runtime_test.BenchmarkSemaWorkNonblock              829.00       832.00   +0.36%
runtime_test.BenchmarkSemaWorkNonblock-2            425.00       419.00   -1.41%
runtime_test.BenchmarkSemaWorkNonblock-4            308.00       220.00  -28.57%
runtime_test.BenchmarkSemaWorkNonblock-8            394.00       147.00  -62.69%
runtime_test.BenchmarkSemaWorkNonblock-16          1510.00       149.00  -90.13%

runtime_test.BenchmarkSemaWorkBlock                 828.00       813.00   -1.81%
runtime_test.BenchmarkSemaWorkBlock-2               428.00       436.00   +1.87%
runtime_test.BenchmarkSemaWorkBlock-4               232.00       219.00   -5.60%
runtime_test.BenchmarkSemaWorkBlock-8               392.00       251.00  -35.97%
runtime_test.BenchmarkSemaWorkBlock-16             1524.00       298.00  -80.45%

sync_test.BenchmarkMutexUncontended                  24.10        24.00   -0.41%
sync_test.BenchmarkMutexUncontended-2                12.00        12.00   +0.00%
sync_test.BenchmarkMutexUncontended-4                 6.25         6.17   -1.28%
sync_test.BenchmarkMutexUncontended-8                 3.43         3.34   -2.62%
sync_test.BenchmarkMutexUncontended-16                2.34         2.32   -0.85%

sync_test.BenchmarkMutex                             24.70        24.70   +0.00%
sync_test.BenchmarkMutex-2                          208.00        99.50  -52.16%
sync_test.BenchmarkMutex-4                         2744.00       256.00  -90.67%
sync_test.BenchmarkMutex-8                         5137.00       556.00  -89.18%
sync_test.BenchmarkMutex-16                        5368.00      1284.00  -76.08%

sync_test.BenchmarkMutexSlack                        24.70        25.00   +1.21%
sync_test.BenchmarkMutexSlack-2                    1094.00       186.00  -83.00%
sync_test.BenchmarkMutexSlack-4                    3430.00       402.00  -88.28%
sync_test.BenchmarkMutexSlack-8                    5051.00      1066.00  -78.90%
sync_test.BenchmarkMutexSlack-16                   6806.00      1363.00  -79.97%

sync_test.BenchmarkMutexWork                        793.00       792.00   -0.13%
sync_test.BenchmarkMutexWork-2                      398.00       398.00   +0.00%
sync_test.BenchmarkMutexWork-4                     1441.00       308.00  -78.63%
sync_test.BenchmarkMutexWork-8                     8532.00       847.00  -90.07%
sync_test.BenchmarkMutexWork-16                    8225.00      2760.00  -66.44%

sync_test.BenchmarkMutexWorkSlack                   793.00       793.00   +0.00%
sync_test.BenchmarkMutexWorkSlack-2                 418.00       414.00   -0.96%
sync_test.BenchmarkMutexWorkSlack-4                4481.00       480.00  -89.29%
sync_test.BenchmarkMutexWorkSlack-8                6317.00      1598.00  -74.70%
sync_test.BenchmarkMutexWorkSlack-16               9111.00      3038.00  -66.66%

R=rsc
CC=golang-dev
https://golang.org/cl/4631059
2011-06-28 15:09:53 -04:00
Brad Fitzpatrick
39acba55ee fmt: rename errno and error to err for doc consistency
The public godoc looked confused. I imagine these were
written before current conventions were established.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4662060
2011-06-28 11:00:31 -07:00
Albert Strasheim
a026d0fc76 runtime/cgo: check for errors from pthread_create
R=rsc, iant, dvyukov
CC=golang-dev
https://golang.org/cl/4643057
2011-06-28 12:04:50 -04:00
Dmitriy Vyukov
660b22988b runtime: add Semacquire/Semrelease benchmarks
R=rsc
CC=golang-dev
https://golang.org/cl/4625065
2011-06-28 11:15:24 -04:00
Dmitriy Vyukov
93dde6b0e6 sync: add fast path to Once
The implementation does not grab the lock,
if Once is already initalized.
Benchmark results on HP Z600 (2 x Xeon E5620, 8 HT cores, 2.40GHz)
are as follows:
benchmark                                        old ns/op    new ns/op    delta
sync_test.BenchmarkOnce                             187.00        14.00  -92.51%
sync_test.BenchmarkOnce-2                           909.00        21.40  -97.65%
sync_test.BenchmarkOnce-4                          3684.00        20.90  -99.43%
sync_test.BenchmarkOnce-8                          5987.00        23.00  -99.62%
sync_test.BenchmarkOnce-16                         5051.00        21.60  -99.57%

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4641066
2011-06-28 09:43:01 -04:00
Rob Pike
81592c298b Add the beginnings of the template execution code. Lots still to do,
including evaluation up the data tree (in this code all fields must be
in dot itself), plus more control structure, but the basics are in place.

R=rsc, r
CC=golang-dev
https://golang.org/cl/4665041
2011-06-28 23:04:08 +10:00
Dmitriy Vyukov
5c15f8710c sync: replace Mutex benchmarks
For both contended and uncontended case:
 - support arbitrary number of cpus (not just 2)
 - dynamic load balancing (improves stability)
 - periodic execution of Gosched() to work around non-preemptiviness
For uncontended case eliminates possible false-sharing.
For contended case includes additional variation with some
amount of local work between mutex operations.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4634093
2011-06-28 08:14:54 -04:00
Evan Shaw
cf3eeb2984 io.WriteString: if the object has a WriteString method, use it
This avoids allocation when writing to bytes.Buffers and bufio.Writers, for
example.

R=golang-dev, rsc, r, consalus, r
CC=golang-dev
https://golang.org/cl/4625068
2011-06-28 16:10:39 +10:00
Brad Fitzpatrick
6282292f8d mime/multipart: parse LF-delimited messages, not just CRLF
Against the spec, but appear in the wild.

Fixes #1966

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4662059
2011-06-27 21:59:51 -07:00
Russ Cox
52cd055f91 exp/regexp/syntax: case-folding in character classes
Also fix \x{123} parsing.

R=r
CC=golang-dev
https://golang.org/cl/4632052
2011-06-27 23:23:51 -04:00
Alex Brainman
6b648cafde runtime: another attempt to allow stdcall to be used from both 386 and amd64 arch
R=rsc
CC=golang-dev, vcc.163
https://golang.org/cl/4627071
2011-06-28 12:46:16 +10:00
Rob Pike
f71153278a os: simplify WriteString
It was working too hard.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4639081
2011-06-28 11:09:21 +10:00
Russ Cox
46e7466080 exp/regexp/syntax: compiled form
R=r, sam.thorogood, kevlar
CC=golang-dev, rsc
https://golang.org/cl/4636046
2011-06-27 19:52:59 -04:00
Rob Pike
ebb1566a46 strings.Split: make the default to split all.
Change the signature of Split to have no count,
assuming a full split, and rename the existing
Split with a count to SplitN.
Do the same to package bytes.
Add a gofix module.

R=adg, dsymonds, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/4661051
2011-06-28 09:43:14 +10:00
Ken Rockot
82a8afdf14 syscall: support for tty options in StartProcess
These are the relevant changes to exec_unix.go now that
mkerrors.sh outputs have been updated.

R=rsc
CC=golang-dev
https://golang.org/cl/4648064
2011-06-27 19:07:49 -04:00
Kyle Lemons
abd50de296 xml: add Marshal and MarshalIndent
I have written up a Marshal and MarshalIndent pair that should
closely reflect the way that Unmarshal works.  I would love feedback
on making this code more accessible and efficient... I haven't used
reflecton on this scale before, so there is probably a lot of work
that can be done on that.

Some potentially controversial things:
- All tag names are lower-cased by default.
- Zero-valued struct values are skipped.
- No namespace prefix (o:tag, etc) mechanism is supplied.
- You are allowed to marshal non-struct values (even though unmarshal
  cannot handle them).
- A tag for a non-XMLName struct field that isn't "attr", "chardata",
  or "innerxml" is used as the name of the tag.  This could wreak
  havoc if you try to marshal a protobuf struct.
- The "innerxml" and "chardata" are inserted verbatim.  If you try to
  marshal something straight from unmarshal, the results could be
  unexpected (remove "innerxml" support from Marshal would be one
  possible solution).

R=rsc
CC=golang-dev
https://golang.org/cl/4539082
2011-06-27 19:07:28 -04:00
Brad Fitzpatrick
ac213ab834 http: respect Handlers setting Connection: close in their response
Fixes #2011

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4667043
2011-06-27 15:53:48 -07:00
Russ Cox
8475832f0d testing: scale benchmark precision to 0.01ns if needed
R=dvyukov, r
CC=golang-dev
https://golang.org/cl/4657053
2011-06-27 18:50:27 -04:00
Brad Fitzpatrick
19f795042a http: add FileSystem interface, make FileServer use it
Permits serving from virtual filesystems, such as files linked
into a binary, or from a zip file.

Also adds a gofix for:

http.FileServer(root, prefix) -> http.StripPrefix(prefix, http.FileServer(http.Dir(root)))

R=r, rsc, gri, adg, dsymonds, r, gri
CC=golang-dev
https://golang.org/cl/4629047
2011-06-27 15:26:36 -07:00
Graham Miller
f795bdb979 bufio: do not cache Read errors
Reader previously had cached an error from the underlying reader
and would return it on every subsequent call to Read.  The Reader
will now return the error only once, and subsequent calls will result
in a new Read call to the underlying Reader.

Fixes #1934.

R=bradfitz, rogpeppe, rsc
CC=golang-dev
https://golang.org/cl/4528133
2011-06-27 16:12:04 -04:00
Dmitriy Vyukov
3a4a581c49 sync: add benchmark for Once.
R=r, rsc
CC=golang-dev
https://golang.org/cl/4650054
2011-06-27 16:02:13 -04:00
Brad Fitzpatrick
6c6c232072 http: add StripPrefix handler wrapper
R=rsc
CC=golang-dev
https://golang.org/cl/4626067
2011-06-27 11:03:43 -07:00
Brad Fitzpatrick
7e29f1add8 http: do TLS handshake explicitly before copying TLS state
Previously we were snapshotting the TLS state into *Request
before we did the HTTP ReadRequest, the first Read of which
triggered the TLS handshake implicitly.

Fixes #1956

R=golang-dev, rsc
CC=agl, golang-dev
https://golang.org/cl/4630072
2011-06-27 10:37:33 -07:00
Dmitriy Vyukov
9843ca5e2b gotest: add -test.benchtime and -test.cpu flags.
-test.benchtime allows to specify benchmark execution time.
-test.cpu allows to execute tests/benchmarks for several
values of GOMAXPROCS.

R=r, r, rsc
CC=golang-dev
https://golang.org/cl/4662046
2011-06-27 13:31:40 -04:00
Russ Cox
dfacfd6431 syscall: regenerate zerrors for darwin/linux/freebsd
did darwin on mac with older, not broken xcode.
did linux arm by copying diffs from linux 386.
did freebsd amd64 by copying diffs from freebsd 386.

R=golang-dev, r, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/4629067
2011-06-27 11:02:32 -04:00
Dmitry Chestnykh
d1dbfe5827 crypto: replace "crypto/block" with "crypto/cipher" in comments
Documentation mentioned the obsolete package "crypto/block",
which has been replaced with "crypto/cipher".

R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/4654064
2011-06-27 09:16:42 -04:00
Michael T. Jones
d94e350f48 fmt: Added SkipSpace() function to fmt's ScanState interface.
Users of the Scan() infrastructure that employ ReadRune() rather than
Token() need a way to skip leading spaces and newlines as set by the
the parent, Fscan(), Fscanln, or Fscanf(). As the internal methods and
boolean flags are not exported, this new function was added here and
in the Int and Nat Scan() functions of the big package. (fmt.Rat did
not need change since it uses Token()) Also added Printf style format
code support to int types and tests for same to int_test.go

R=r, r, gri, mtj
CC=golang-dev
https://golang.org/cl/4634074
2011-06-24 17:26:45 -07:00
Brad Fitzpatrick
5d4eea6a2f http: better handling of 0-length Request.Body
As rsc suggested after change 58a6bdac3d12 was committed, we
now read the first byte of Request.Body when the
Request.ContentLength is 0 to disambiguate between a truly
zero-length body and a body of unknown length where the user
didn't set the ContentLength field.

This was also causing the reverse proxy problem where incoming
requests (which always have a body, of private type http.body,
even for 0-lengthed requests) were being relayed to the http
Transport for fetching, which was serializing the request as a
chunked request (since ContentLength was 0 and Body was
non-nil)

Fixes #1999

R=golang-dev, kevlar
CC=golang-dev
https://golang.org/cl/4628063
2011-06-24 16:46:14 -07:00
Brad Fitzpatrick
e16b74075f http: assume ContentLength 0 on GET requests
Incremental step in fix for issue 1999

R=golang-dev, kevlar
CC=golang-dev
https://golang.org/cl/4667041
2011-06-24 13:48:12 -07:00
Pascal S. de Kloe
e0e28d2b93 mime: lower-case media type parameters
RFC 1521 section 4 states "The type, subtype, and parameter names are not case sensitive.".

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4648047
2011-06-24 11:32:06 -07:00
Robert Hencke
7a471eadcc os: remove duplicate package description
file.go contains a more complete package description.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4645058
2011-06-24 11:23:49 -07:00
Alex Brainman
a39ead7ed2 path/filepath: enable TestWalk to run on windows
R=golang-dev
CC=golang-dev
https://golang.org/cl/4630066
2011-06-24 19:18:59 +10:00
Yasuhiro Matsumoto
8ab2c98972 os: fixed PathListSeparator to ';' for windows.
Fixed issue 1992

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/4661047
2011-06-24 15:00:59 +10:00
Brad Fitzpatrick
89873e60e2 http: buffer Request.Write
Fixes #1996

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4639068
2011-06-23 21:10:51 -07:00
Gustavo Niemeyer
65b036c381 runtime: don't use twice the memory with grsec-like kernels
grsec needs the FIXED flag to be provided to mmap, which
works now.  That said, when the allocation fails to be made
in the specific address, we're still given back a writable
page.  This change will unmap that page to avoid using
twice the amount of memory needed.

It'd also be pretty easy to avoid the extra system calls
once we detected that the flag is needed, but I'm not sure
if that edge case is worth the effort.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4634086
2011-06-24 00:29:59 -03:00
Yasuhiro Matsumoto
73d741fd5b mime/multipart: remove newline at top of the multipart.
R=golang-dev, bradfitz, arctanofyourface
CC=golang-dev
https://golang.org/cl/4635063
2011-06-23 10:11:33 -07:00
Russ Cox
c475c3071a 5c: do not use R9 and R10
This program used to use R9 and R10.
Now it fails to compile (out of registers).
I used to know a simpler test but can't remember it.

Learned something new: Rietveld refuses change
list descriptions bigger than 10 kB.

int sum(int x, int y, int z, int w) {
        return
        (((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))))*
        ((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))))*
        (((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))))*
        ((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))))
        ;
}

R=ken2
CC=golang-dev
https://golang.org/cl/4650053
2011-06-22 23:22:36 -04:00
Alex Brainman
5d53aab4a2 exec: LookPath should not search %PATH% for files like c:cmd.exe
R=golang-dev
CC=golang-dev
https://golang.org/cl/4632055
2011-06-23 10:56:53 +10:00
Rob Pike
96731619ce exp/template: make -0 be an unsigned int.
Fix (inconsequential) type error in list initializer.

R=rsc
CC=golang-dev
https://golang.org/cl/4638058
2011-06-23 10:19:29 +10:00
Andrew Gerrand
d7df79a7e5 go/build: include Import objects in Script Inputs
This has the effect of making goinstall rebuild a package's
dependencies when they are newer than the current package object.

R=rsc
CC=golang-dev
https://golang.org/cl/4627051
2011-06-23 10:15:46 +10:00
Yasuhiro Matsumoto
88442358a9 net, syscall: interface for windows
R=mikioh.mikioh, alex.brainman, rsc, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4590050
2011-06-23 09:54:57 +10:00
Russ Cox
36b5e1d698 io: clarify Read, ReadAt, Copy, Copyn EOF behavior
R=golang-dev, bradfitz, iant, dsymonds, nigeltao, r
CC=golang-dev
https://golang.org/cl/4629062
2011-06-22 19:33:07 -04:00
Rob Pike
cd7826e5f6 First cut at the parser for the new template package.
This is not a full grammar, but the pieces are there to implement whatever we converge on.

R=rsc
CC=golang-dev
https://golang.org/cl/4629053
2011-06-23 09:27:28 +10:00
Alex Brainman
123549acb1 exec: better error message for windows LookPath
Fixes #1991.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4648049
2011-06-23 09:16:20 +10:00
Nigel Tao
6b4fb9f85a image: basic test for the 16-bits-per-color-channel types.
R=r
CC=golang-dev
https://golang.org/cl/4635059
2011-06-23 08:39:00 +10:00
Ken Rockot
c8443d7242 syscall: add tty support to StartProcess
These changes add a Ctty int field to the Unix syscall.ProcAttr which,
if set >= 0 in conjuction with Setsid=true, will be used by
forkAndExecInChild as the file descriptor for the new child's
controlling terminal.

Necessary changes have been made to mkerrors.sh to generate defs for
TIOC*, though changes to its output files are not included here.
The changes made should support Linux, FreeBSD and Darwin, at least.

R=iant, bradfitz, r, rsc, borman
CC=golang-dev
https://golang.org/cl/4532075
2011-06-22 18:07:20 -04:00
Dmitriy Vyukov
8cab7f5703 sync: restore GOMAXPROCS during benchmarks
R=golang-dev
CC=dvyukov, golang-dev
https://golang.org/cl/4631060
2011-06-22 16:20:37 -04:00
Brad Fitzpatrick
5dfdccf2b0 Fix Windows build; ErrorString->NewError
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4634080
2011-06-22 11:33:30 -07:00
Robert Griesemer
712fb6dcd3 os.Error API: don't export os.ErrorString, use os.NewError consistently
This is a core API change.

1) gofix misc src
2) Manual adjustments to the following files under src/pkg:
   gob/decode.go
   rpc/client.go
   os/error.go
   io/io.go
   bufio/bufio.go
   http/request.go
   websocket/client.go
as well as:
   src/cmd/gofix/testdata/*.go.in (reverted)
   test/fixedbugs/bug243.go
3) Implemented gofix patch (oserrorstring.go) and test case (oserrorstring_test.go)

Compiles and runs all tests.

R=r, rsc, gri
CC=golang-dev
https://golang.org/cl/4607052
2011-06-22 10:52:47 -07:00
Adam Langley
f2e94de6d6 crypto/openpgp: add ElGamal support.
R=bradfitz, r
CC=golang-dev
https://golang.org/cl/4639049
2011-06-21 21:00:49 -04:00
Robert Hencke
b88e669a8f nacl, tiny: remove vestiges
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/4635053
2011-06-21 12:02:40 -04:00
Mikio Hara
5d6f118f23 syscall: add socket control message support for darwin, freebsd, linux
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4528113
2011-06-20 18:40:20 -04:00
Rob Pike
97a929aac9 fmt: catch panics from calls to String etc.
This change causes Print et al. to catch panics generated by
calls to String, GoString, and Format.  The panic is formatted
into the output stream as an error, but the program continues.
As a special case, if the argument was a nil pointer, the
result is just "<nil>", because that's almost certainly enough
information and handles the very common case of String
methods that don't guard against nil.

Scan does not want this change. Input must work; output can
be for debugging and it's nice to get output even when you
make a mistake.

R=dsymonds, r, adg, gri, rsc, gri
CC=golang-dev
https://golang.org/cl/4640043
2011-06-21 08:31:02 +10:00
Brad Fitzpatrick
9ee83f546f http: write Header keys with empty values
R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/4630052
2011-06-20 14:36:03 -07:00
Brad Fitzpatrick
922ceaddd2 http: permit handlers to explicitly remove the Date header
We'll do the right thing by default, but people wanting minimal
response sizes can explicitly remove the Date header.
(empty fields aren't written out)

R=rsc
CC=golang-dev
https://golang.org/cl/4634048
2011-06-20 13:39:03 -07:00
Graham Miller
cf201ed6a0 os: change Waitmsg String method to use pointer receiver
Fixes #1851.

R=rsc
CC=golang-dev
https://golang.org/cl/4628045
2011-06-20 15:42:17 -04:00
Brad Fitzpatrick
c2784340a7 http: add Server.ListenAndServeTLS
Fixes #1964

R=rsc
CC=golang-dev
https://golang.org/cl/4630045
2011-06-20 12:19:26 -07:00
Mikio Hara
10f1436bad syscall: add LSF support for linux
R=rsc
CC=golang-dev
https://golang.org/cl/4626041
2011-06-20 14:51:34 -04:00
Brad Fitzpatrick
da7b96f714 http: fix req.Cookie(name) with cookies in one header
Fixes #1974

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4654042
2011-06-20 10:33:07 -07:00
Pascal S. de Kloe
67ec47d1c0 mime: fix RFC references
R=golang-dev, bradfitz
CC=brad fitzpatrick <bradfitz, golang-dev
https://golang.org/cl/4634063
2011-06-20 07:41:18 -07:00
Anthony Martin
f7d754fcce build: exclude packages that fail on Plan 9 (for now)
All but two packages depend on net:
        debug/proc
        os/signal

With this change, we can produce
a working build with GOOS=plan9.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4639053
2011-06-20 22:23:43 +10:00
Anthony Martin
20943baed3 exec: add support for Plan 9
R=paulzhol, mirtchovski, fshahriar, alex.brainman, r
CC=golang-dev
https://golang.org/cl/4386041
2011-06-20 13:34:10 +10:00
Anthony Martin
d119e3bc0f time: add support for Plan 9
R=paulzhol, mirtchovski, r, r, rsc
CC=golang-dev
https://golang.org/cl/4362041
2011-06-19 16:36:33 +10:00
Scott Lawrence
3c06518405 http: fix documentation typo
(Variable is referred to alternately as 'r' and 'req')

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4648042
2011-06-18 21:53:18 +10:00
Russ Cox
61f4ec132b syscall: fix build for Sizeof change
R=ken2
CC=golang-dev
https://golang.org/cl/4635051
2011-06-17 17:07:21 -04:00
Russ Cox
cf9f380499 gc: unsafe.Alignof, unsafe.Offsetof, unsafe.Sizeof now return uintptr
R=ken2
CC=golang-dev
https://golang.org/cl/4640045
2011-06-17 16:12:14 -04:00
Russ Cox
e852202f37 gc: descriptive panic for nil pointer -> value method call
R=ken2
CC=golang-dev
https://golang.org/cl/4646042
2011-06-17 15:23:27 -04:00
Russ Cox
21e75da486 respect goto restrictions
R=gri
CC=golang-dev
https://golang.org/cl/4625044
2011-06-17 06:07:13 -04:00
Alex Brainman
8155ff5452 go/build: use back quotes for regular expression
R=adg
CC=golang-dev
https://golang.org/cl/4643045
2011-06-17 16:41:59 +10:00
Andrew Gerrand
4340b57d88 goinstall, go/build: support building cgo packages
Fixes #1962.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4636044
2011-06-17 11:15:54 +10:00
Nigel Tao
278952c393 regexp: add a package prefix to error strings.
R=r, r
CC=golang-dev
https://golang.org/cl/4630041
2011-06-17 10:50:38 +10:00
Brad Fitzpatrick
380e5a3709 http: document http client/transport thread safety
Fixes #1961

R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/4633045
2011-06-16 15:02:47 -07:00
Russ Cox
fc77e82617 unicode: add case folding tables
R=r, r
CC=golang-dev
https://golang.org/cl/4571074
2011-06-16 17:56:25 -04:00
Brad Fitzpatrick
6e9b1a78ff http: make Headers be source of truth
Previously Request and Response had redundant fields for
Referer, UserAgent, and cookies which caused confusion and
bugs.  It also didn't allow us to expand the package over
time, since the way to access fields would be in the Headers
one day and promoted to a field the next day.  That would be
hard to gofix, especially with code ranging over Headers.

After a discussion on the mail package's design with a similar
problem, we've designed to make the Headers be the source of
truth and add accessors instead.

Request:
change: Referer -> Referer()
change: UserAgent -> UserAgent()
change: Cookie -> Cookies()
new: Cookie(name) *Cookie
new: AddCookie(*Cookie)

Response:
change: Cookie -> Cookies()

Cookie:
new: String() string

R=rsc
CC=golang-dev
https://golang.org/cl/4620049
2011-06-16 13:02:28 -07:00
Volker Dobler
7f3e109d2f xml: allow attributes without value in non-strict mode.
Attributes without value are commen in html and the xml
parser will accept them in non-strict mode and use the
attribute name as value. Thus parsing <p nowrap> as
<p norwar="nowrap">.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4601053
2011-06-16 12:56:49 -04:00
Brad Fitzpatrick
98f95b8048 mime/multipart: convert Reader from interface to struct
It was always a weird interface but I didn't know what I
was doing at the time.  rsc questioned me about it then
but didn't press on it during review.  Then adg bugged me
about it too recently.

So clean it up. It parallels the Writer struct too.

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/4602063
2011-06-16 08:55:53 -07:00
Russ Cox
95963e6294 runtime/cgo: fix for OS X 10.7
Correct a few error messages (libcgo -> runtime/cgo)
and delete old nacl_386.c file too.

Fixes #1657.

R=iant
CC=golang-dev
https://golang.org/cl/4603057
2011-06-16 11:10:31 -04:00
Rob Pike
2b08e952bb sort: change the name of Float64Array to Float64Slice.
I missed this before because I used the wrong regexp. What a moron.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4639041
2011-06-16 17:48:02 +10:00
Robert Griesemer
333167ff35 go/printer, gofmt: print "select {}" on one line
No impact on existing sources under src, misc.

Fixes #1959.

R=r, rsc, r
CC=golang-dev
https://golang.org/cl/4589056
2011-06-15 21:47:29 -07:00
Russ Cox
f011bd378f build: use awk instead of giant egrep regexp
Avoids buggy version of egrep on some Macs.

R=r, dsymonds
CC=golang-dev
https://golang.org/cl/4603056
2011-06-16 00:04:24 -04:00
Dave Cheney
832e87500e go/build: support building cgo packages on non intel platforms
See https://golang.org/cl/4572045/

R=adg, rsc
CC=golang-dev
https://golang.org/cl/4627041
2011-06-16 13:35:27 +10:00
Nigel Tao
9555ea7a5b image/draw: add an Op argument to Draw.
R=r
CC=golang-dev
https://golang.org/cl/4622041
2011-06-16 11:45:16 +10:00
Yasuhiro Matsumoto
7fd51f2fb4 syscall: use strict in perl scripts
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4609047
2011-06-15 17:41:07 -07:00
Russ Cox
0193139bec undo CL 4557047 / 8818ac606e92
I don't think we've discussed this API enough.

««« original CL description
bike/shed: new package.

It comes up often enough that it's time to provide
the utility of a standard package.

R=r, mirtchovski, adg, rsc, n13m3y3r, ality, go.peter.90, lstoakes, iant, jan.mercl, bsiegert, robert.hencke, rogpeppe, befelemepeseveze, kevlar
CC=golang-dev
https://golang.org/cl/4557047
»»»

R=dsymonds, bradfitz, gri
CC=golang-dev
https://golang.org/cl/4576065
2011-06-15 19:47:52 -04:00
Rob Pike
d6653fed98 http: use runtime/debug.Stack() to dump stack trace on panic.
Test output now looks like this:

2011/06/15 21:10:41 http: panic serving 127.0.0.1:59729: intentional death for testing
$GOROOT/src/pkg/http/server.go:495 (0x3f9f8)
        _func_004: buf.Write(debug.Stack())
$GOROOT/src/pkg/runtime/proc.c:1041 (0x12367)
        panic: reflect·call(d->fn, d->args, d->siz);
$GOROOT/src/pkg/http/serve_test.go:775 (0x5831b)
        _func_029: panic("intentional death for testing")
$GOROOT/src/pkg/http/server.go:575 (0x26366)
        HandlerFunc.ServeHTTP: f(w, r)
$GOROOT/src/pkg/http/server.go:541 (0x261a9)
        *conn.serve: c.handler.ServeHTTP(w, w.req)
$GOROOT/src/pkg/runtime/proc.c:178 (0x10a83)
        goexit: runtime·goexit(void)

with $GOROOT expanded, of course.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4607051
2011-06-16 00:12:50 +10:00
Andrew Gerrand
39208939c6 go/build: better, self-contained tests
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4576063
2011-06-15 21:35:34 +10:00
Dave Cheney
c357ca663f go/build: remove crud in cgotest/_obj
R=adg
CC=golang-dev
https://golang.org/cl/4584060
2011-06-15 16:39:17 +10:00
Andrew Gerrand
7c248ae077 go/build: fix build and clean ups
R=rsc
CC=golang-dev
https://golang.org/cl/4620045
2011-06-15 14:56:12 +10:00
Andrew Gerrand
4a8de67058 go/build: record all cgo intermediate files (fix build)
R=rsc
CC=golang-dev
https://golang.org/cl/4613045
2011-06-15 14:29:26 +10:00
Andrew Gerrand
db5a4ffc2a goinstall: use go/make package to scan and build packages
R=rsc, n13m3y3r, kevlar
CC=golang-dev
https://golang.org/cl/4515180
2011-06-15 13:28:35 +10:00
Yasuhiro Matsumoto
414da2e4a3 syscall: mksyscall_windows.pl should output unix newline.
R=golang-dev, bradfitz, alex.brainman
CC=golang-dev
https://golang.org/cl/4601058
2011-06-15 11:50:21 +10:00
David Symonds
812b2b6405 mail: cosmetic fixes.
R=rsc, gri
CC=golang-dev
https://golang.org/cl/4602062
2011-06-15 09:10:59 +10:00
Russ Cox
1a4681ed74 exp/regexp/syntax: more escapes, character classes
Still TODO: parsing optimizations

make_perl_groups.pl is copied with minimal modifications
(just to generate Go syntax instead of C++) from RE2.
Google Inc is "The RE2 Author" of that file and is one of
the Go Authors, so copyright changed to the Go Authors instead.

R=sam.thorogood, r, fvbommel, robert.hencke
CC=golang-dev
https://golang.org/cl/4612041
2011-06-14 14:30:10 -04:00
Gustavo Niemeyer
a5c1fa7f02 debug/elf: rename test .o files to .obj
.o files are commonly found in default ignore lists by
source management tools, including dpkg-source, bzr, etc.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4568078
2011-06-14 15:06:39 -03:00
Mikio Hara
c4dfc55be9 net: export all fields in Interface
Fixes #1942.

R=fullung, rsc
CC=golang-dev
https://golang.org/cl/4602044
2011-06-14 13:32:52 -04:00
Jeff Hodges
0ce57a73c5 syscall: add ptrace on darwin
The ptrace syscall remains gutted on darwin, but usable.  This
also makes the syscall addition process reproducible on darwin
instead of relying on a file path in rsc's home directory.
I've also removed an override of $PATH in env.bash that made
tooling harder.

R=rsc, dave, r
CC=golang-dev
https://golang.org/cl/4517147
2011-06-14 12:56:46 -04:00
Maxim Ushakov
5f77bf8b20 xml: handle non-string attribute fields
R=kevlar, rsc
CC=golang-dev
https://golang.org/cl/4528114
2011-06-14 11:51:03 -04:00
Alex Brainman
c195cc8d82 exec: make LookPath work even when PATHEXT env variable is not set on Windows
R=golang-dev, mattn.jp
CC=golang-dev
https://golang.org/cl/4559062
2011-06-14 11:46:05 -04:00
William Chan
5af8e53a14 http/spdy: improve error handling.
Create a new spdy.Error type that includes the enumerated error type and
the associated stream id (0 if not associated with a specific stream).
This will let users handle errors differently (RST_STREAM vs GOAWAY).

R=bradfitz, rsc, rogpeppe
CC=golang-dev
https://golang.org/cl/4532131
2011-06-14 11:31:18 -04:00
Yuval Pavel Zholkover
400d825ea0 syscall: fix Plan 9 build.
Move mmapper from syscall.go to syscall_unix.go.
Remove Sendfile from syscall_plan9.go.

R=rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/4368060
2011-06-14 11:29:51 -04:00
Mikio Hara
b100a29bc4 syscall: update BPF support for BSD variants
R=dave, rsc
CC=golang-dev
https://golang.org/cl/4589044
2011-06-14 11:28:36 -04:00
Yuval Pavel Zholkover
18112437d9 os: Plan 9, fix OpenFile & Chmod. Update tests.
Add Process.Kill.

R=rsc
CC=golang-dev
https://golang.org/cl/4571049
2011-06-14 11:20:34 -04:00
Russ Cox
4d0f2e9195 syscall, os, exec: introduce *syscall.SysProcAttr field in os.ProcAttr and exec.Cmd
R=r, bradfitz, alex.brainman, borman, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4607046
2011-06-14 10:49:34 -04:00
David Symonds
371aa14e06 mail: decode RFC 2047 "B" encoding.
R=rsc, r
CC=golang-dev
https://golang.org/cl/4584056
2011-06-14 17:32:47 +10:00
Rob Pike
34e0725dec os: be explicit in the package comment that this package is for portable features only.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4602058
2011-06-14 11:49:33 +10:00
Russ Cox
9968090ddd cgo: handle new Apple LLVM-based gcc from Xcode 4.2
That gcc does not include enumerator names and values
in its DWARF debug output.  Create a data block from which
we can read the values instead.

Fixes #1881.

R=iant
CC=golang-dev
https://golang.org/cl/4607045
2011-06-13 14:43:54 -04:00
Adam Langley
8834bb0bfa crypto/openpgp: flesh out Encrypt by adding support for signing.
R=bradfitz
CC=golang-dev
https://golang.org/cl/4572059
2011-06-13 13:04:59 -04:00
Russ Cox
b96c3477f8 exp/regexp/syntax: syntax data structures, parser
Parser is a work in progress but can populate most of the
interesting parts of the data structure, so a good checkpoint.
All the complicated Perl syntax is missing, as are various
important optimizations made during parsing to the
syntax tree.

The plan is that exp/regexp's API will mimic regexp,
and exp/regexp/syntax provides the parser directly
for programs that need it (and for implementing exp/regexp).

Once finished, exp/regexp will replace regexp.

R=r, sam.thorogood, kevlar, edsrzf
CC=golang-dev
https://golang.org/cl/4538123
2011-06-13 09:20:23 -04:00
Rob Pike
7bc8e90e36 exp/template: lexical scanner for new template package.
An unusual design using slice and a goroutine makes for a
compact scanner with very little allocation.

R=rsc, r
CC=golang-dev, kevlar
https://golang.org/cl/4610041
2011-06-13 16:08:35 +10:00
Alex Brainman
9ded954a3b net: rearrange source files so we could run more tests on windows
R=rsc
CC=golang-dev
https://golang.org/cl/4603043
2011-06-13 10:22:31 +10:00
Alex Brainman
27cbf06d50 mime/multipart: allow for temp files to be removed after tests are finished on Windows
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4605044
2011-06-11 16:23:44 +10:00
Yasuhiro Matsumoto
1374097381 net: Sendfile for win32.
implement using TransmitFile().

R=bsiegert, bradfitz, alex.brainman, rsc, go.peter.90
CC=golang-dev
https://golang.org/cl/4536076
2011-06-11 13:24:48 +10:00
Robert Griesemer
968afa0e8c go/scanner: partially revert CL4538096 now that we have %#U for runes
R=r, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4572049
2011-06-10 17:19:01 -07:00
Robert Griesemer
c8ee1b8ebc io/ioutil: fix typo in comment
R=r, r
CC=golang-dev
https://golang.org/cl/4592052
2011-06-10 17:07:22 -07:00
Rob Pike
d152fe74e1 fmt: debugging formats for characters: %+q %#U
%+q uses strconv.Quote[Rune]ToASCII, guaranteeing ASCII-only output.
%#U a quoted character if the rune is printable: 'x'=U+0078; otherwise
it's as before: U+000A.

R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/4589047
2011-06-11 00:03:02 +00:00
Rob Pike
4b1170d2b1 sort: change IntArray etc. to IntSlice for better name hygiene.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4602054
2011-06-11 09:25:18 +10:00
Adam Langley
531c01d990 crypto/openpgp: build fix (unreviewed)
R=agl
CC=golang-dev
https://golang.org/cl/4572057
2011-06-10 13:32:20 -04:00
Adam Langley
f0d21a773f crypto/openpgp: add ability to encrypt messages.
R=bradfitz, r
CC=golang-dev
https://golang.org/cl/4581051
2011-06-10 12:58:14 -04:00
David Symonds
b5071e92b4 bike/shed: new package.
It comes up often enough that it's time to provide
the utility of a standard package.

R=r, mirtchovski, adg, rsc, n13m3y3r, ality, go.peter.90, lstoakes, iant, jan.mercl, bsiegert, robert.hencke, rogpeppe, befelemepeseveze, kevlar
CC=golang-dev
https://golang.org/cl/4557047
2011-06-10 22:32:45 +10:00
Yuval Pavel Zholkover
0924185840 runtime: fix Plan 9 "lingering goroutines bug".
R=rsc, r
CC=golang-dev
https://golang.org/cl/4589042
2011-06-10 17:23:54 +10:00
Nigel Tao
c0c824cd7b image: add Paletted.Set, and a basic test of the concrete image types.
R=r
CC=golang-dev
https://golang.org/cl/4589045
2011-06-10 14:07:29 +10:00
Andrew Gerrand
d44c4c351d sync/atomic: fix arm check64 bug
R=r, rsc
CC=golang-dev
https://golang.org/cl/4571059
2011-06-10 13:50:19 +10:00
Brad Fitzpatrick
5e8b9c614b http: fix regression permitting io.Copy on HEAD response
With the ReadFrom change in the sendfile CL, it became
possible to illegally send a response to a HEAD request if you
did it via io.Copy.

Fixes #1939

R=rsc
CC=golang-dev
https://golang.org/cl/4584049
2011-06-09 18:10:21 -07:00
David Symonds
63639dd237 mail: decode RFC 2047-encoded words, not phrases.
R=rsc, r, bradfitz
CC=golang-dev
https://golang.org/cl/4590047
2011-06-10 08:47:27 +10:00
Russ Cox
1fddbab736 5l: fix softfloat nits
Need to load math.a so that sqrtGoC is available.
Also was missing prototype.

R=ken2
CC=golang-dev
https://golang.org/cl/4517148
2011-06-09 18:38:25 -04:00
Fan Hongjian
fc41e621e8 math: add sqrt_arm.s and sqrtGoC.go as fallback to soft fp emulation
5a: add SQRTF and SQRTD
5l: add ASQRTF and ASQRTD

Use ARMv7 VFP VSQRT instruction to speed up math.Sqrt

R=rsc, dave, m
CC=golang-dev
https://golang.org/cl/4551082
2011-06-09 17:19:08 -04:00
Quan Yong Zhai
439694125f runtime: improve memmove
check memory overlap

R=rsc, r, ken, edsrzf
CC=golang-dev
https://golang.org/cl/4602047
2011-06-09 16:49:47 -04:00
Alex Brainman
c3be760889 runtime: increase maximum number of windows callbacks
Fixes #1912.

R=rsc
CC=golang-dev
https://golang.org/cl/4591047
2011-06-09 10:29:25 +10:00
David Symonds
ffd01f2a47 mail: decode "Q"-encoded mail addresses.
Supports ISO-8859-1 and UTF-8.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/4568064
2011-06-09 10:18:36 +10:00
Nigel Tao
833529fd6f compress/lzw: reduce decoder buffer size from 3*4096 to 2*4096.
This happens to speed up the decoder benchmarks by 50% on my computer
(GOARCH=amd64 GOOS=linux), but I don't have a good intuition as to why.
For example, just adding an unused [4096]byte field to the decoder
struct doesn't significantly change the numbers.

Before:

lzw.BenchmarkDecoder1e4	    5000	    488057 ns/op	  20.49 MB/s
lzw.BenchmarkDecoder1e5	     500	   4613638 ns/op	  21.67 MB/s
lzw.BenchmarkDecoder1e6	      50	  45672260 ns/op	  21.90 MB/s
lzw.BenchmarkEncoder1e4	    5000	    353563 ns/op	  28.28 MB/s
lzw.BenchmarkEncoder1e5	     500	   3431618 ns/op	  29.14 MB/s
lzw.BenchmarkEncoder1e6	      50	  34009640 ns/op	  29.40 MB/s

After:

lzw.BenchmarkDecoder1e4	    5000	    339725 ns/op	  29.44 MB/s
lzw.BenchmarkDecoder1e5	     500	   3166894 ns/op	  31.58 MB/s
lzw.BenchmarkDecoder1e6	      50	  31317260 ns/op	  31.93 MB/s
lzw.BenchmarkEncoder1e4	    5000	    354909 ns/op	  28.18 MB/s
lzw.BenchmarkEncoder1e5	     500	   3432710 ns/op	  29.13 MB/s
lzw.BenchmarkEncoder1e6	      50	  34010500 ns/op	  29.40 MB/s

R=rsc, r
CC=golang-dev
https://golang.org/cl/4535123
2011-06-09 09:50:38 +10:00
Brad Fitzpatrick
9c436ab7dc http: fix handling of 0-lengthed http requests
Via Russ Ross' bug report on golang-nuts, it was not possible
to send an HTTP request with a zero length body with either a
Content-Length (it was stripped) or chunking (it wasn't set).

This means Go couldn't upload 0-length objects to Amazon S3.
(which aren't as silly as they might sound, as S3 objects can
have key/values associated with them, set in the headers)

Amazon further doesn't supported chunked uploads. (not Go's
problem, but we should be able to let users set an explicit
Content-Length, even if it's zero.)

To fix the ambiguity of an explicit zero Content-Length and
the Request struct's default zero value, users need to
explicit set TransferEncoding to []string{"identity"} to force
the Request.Write to include a Content-Length: 0.  identity is
in RFC 2616 but is ignored pretty much everywhere.  We don't
even then serialize it on the wire, since it's kinda useless,
except as an internal sentinel value.

The "identity" value is then documented, but most users can
ignore that because NewRequest now sets that.

And adds more tests.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4603041
2011-06-08 15:59:23 -07:00
Brad Fitzpatrick
6a876283c8 http: change most map[string][]string types to new Values type
This replaces most the map[string][]string usage with
a new Values type name, with the usual methods.

It also changes client.PostForm to take a Values, rather
than a map[string]string, closing a TODO in the code.

R=rsc
CC=golang-dev
https://golang.org/cl/4532123
2011-06-08 13:38:20 -07:00
Robert Griesemer
2de06655f1 big: removed some gratuitous +/-1's
R=mtj, bradfitz
CC=golang-dev
https://golang.org/cl/4584046
2011-06-08 11:24:24 -07:00
Robert Griesemer
a609a6bb63 ebnf: follow EBNF for EBNF faithfully
Apply analogous changes in godoc/spec.go.

Fixes #1829.

R=nmessenger, r
CC=golang-dev
https://golang.org/cl/4528127
2011-06-08 09:10:30 -07:00
Robert Griesemer
21032ebebd big: gobs for big rats
Fixes #1926.

R=r
CC=golang-dev
https://golang.org/cl/4550122
2011-06-08 09:10:01 -07:00
Yuval Pavel Zholkover
6c746328f7 os: fix Getenv for Plan 9. Truncate the rightmost char if it is '\0'.
R=mirtchovski, ality, taruti, rsc
CC=golang-dev
https://golang.org/cl/4386046
2011-06-08 09:44:03 -04:00
Jonathan Mark
ddde52ae56 runtime: SysMap uses MAP_FIXED if needed on 64-bit Linux
This change was adapted from gccgo's libgo/runtime/mem.c at
Ian Taylor's suggestion.  It fixes all.bash failing with
"address space conflict: map() =" on amd64 Linux with kernel
version 2.6.32.8-grsec-2.1.14-modsign-xeon-64.
With this change, SysMap will use MAP_FIXED to allocate its desired
address space, after first calling mincore to check that there is
nothing else mapped there.

R=iant, dave, n13m3y3r, rsc
CC=golang-dev
https://golang.org/cl/4438091
2011-06-07 21:50:10 -07:00
David Symonds
5c32c96f5c mail: format addresseses correctly.
Also remove an obsolete TODO while I'm here.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4588041
2011-06-08 13:32:47 +10:00
Michael T. Jones
d5c45c541d big.nat: Improved speed of nat-to-string conversion
Three optimizations: First, special-case power of two bases
that partion a Word(), bases 2, 4, 16, and 256. These can
be moved directly from internal Word() storage to the output
without multiprecision operations. Next, same approach for
the other power-of-two bases, 8, 32, 64, and 128. These
don't fill a Word() evenly, so special handling is needed
for those cases where input spans the high-bits of one Word
and the low bis of the next one.  Finally, implement the
general case for others bases in 2 <= base <= 256 using
superbases, the largest power of base representable in a
Word(). For base ten, this is 9 digits and a superbase of
10^9 for 32-bit Words and 19 digits and 10^19 for 64-bit
compiles. This way we do just 1/9th or 1/19th of the expensive
multiprecision divisions, unpacking superdigits using fast
native machine arithmetic. The resulting code runs 7x to
800x the speed of the previous approach, depending on the
length of the number to be converted--longer is relatively
faster.

Also, extended the tests and benchmarks for string to nat
(scan()) and nat to string (string()) functions. A further
enhancement awaits the next CL to make general cases about
7x faster for long cases.

R=gri
CC=golang-dev
https://golang.org/cl/4595041
2011-06-07 16:02:34 -07:00
Brad Fitzpatrick
29e4775cd5 exec: export the underlying *os.Process in Cmd
R=rsc
CC=golang-dev
https://golang.org/cl/4579044
2011-06-07 13:17:34 -07:00
Mikio Hara
a8fd374187 net: fix bug in net.Interfaces: handle elastic sdl_data size correctly
Fixes #1921.

R=golang-dev, jeff
CC=golang-dev
https://golang.org/cl/4535120
2011-06-07 16:06:36 -04:00
Russ Cox
63dae3c3be compress/lzw: do not use background goroutines
Programs expect that Read and Write are synchronous.
The background goroutines make the implementation
a little easier, but they introduce asynchrony that
trips up calling code.  Remove them.

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/4548080
2011-06-07 14:37:06 -04:00
Robert Hencke
8cd7aac223 godefs: do not assume forward type references are enums
Fixes #1466.

R=mikioh.mikioh, rsc
CC=golang-dev
https://golang.org/cl/4564043
2011-06-07 14:28:10 -04:00
Rob Pike
f2f3b8fa99 strconv: change Quote to be Unicode-friendly,
add QuoteToASCII.
The Quote and QuoteRune functions now let printable
runes (as defined by unicode.IsPrint) through.  When
true 7-bit clean stuff is necessary, there are now two
new functions: QuoteToASCII and QuoteRuneToASCII.

Printf("%q") uses Quote. To get the old behavior, it
will now be necessary to say
        Printf("%s", strconv.QuoteToASCII(s))
but that should rarely be necessary.

R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/4561061
2011-06-07 12:23:08 +00:00
Rob Pike
05348ab0c8 image/gif: fix buglet in graphics extension.
need to ReadFull, not Read, to get extension data.

R=nigeltao
CC=golang-dev
https://golang.org/cl/4576043
2011-06-07 12:19:36 +00:00
Brad Fitzpatrick
5e03143c1a html: improve attribute parsing, note package status
Fixes #1890

R=nigeltao
CC=golang-dev
https://golang.org/cl/4528102
2011-06-06 15:56:15 -07:00
Rob Pike
9e857dbdcc template: rearrange the code into separate files.
The single file was getting unwieldy.
Also remove use of vector; a slice works fine - although
it's an unusual one.

R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/4576042
2011-06-06 21:33:02 +00:00
Graham Miller
f35a3df80c big: Rat always outputs the requested precision from FloatString
Fixes #1922.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4551098
2011-06-06 12:59:58 -07:00
Adam Langley
c281ddf1eb crypto: reorg, cleanup and add function for generating CRLs.
This change moves a number of common PKIX structures into
crypto/x509/pkix, from where x509, and ocsp can reference
them, saving duplication. It also removes x509/crl and merges it into
x509 and x509/pkix.

x509 is changed to take advantage of the big.Int support that now
exists in asn1. Because of this, the public/private key pair in
http/httptest/server.go had to be updated because it was serialised
with an old version of the code that didn't zero pad ASN.1 INTEGERs.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4532115
2011-06-06 10:35:46 -04:00
Evan Shaw
94b974a22d os: add Process.Kill and Process.Signal
R=alex.brainman, r, rsc, krasin, iant, rsc, r
CC=golang-dev
https://golang.org/cl/4437091
2011-06-06 19:53:30 +10:00
David Jakob Fritz
ce877acf31 netchan: added drain method to importer.
Fixes #1868.

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/4550093
2011-06-06 06:55:32 +00:00
David Symonds
ff0198b72f mail: address list parsing.
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/4547084
2011-06-06 16:46:14 +10:00
Andrew Gerrand
a028a02395 crypto/twofish: fix Reset index overflow bug.
Fixes #1919.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4530110
2011-06-06 14:30:48 +10:00
Benny Siegert
d01b260e78 image/tiff: support for bit depths other than 8.
At the moment, 16-bit samples are reduced to 8 bits, this will
be changed in a separate CL.

R=nigeltao
CC=golang-dev
https://golang.org/cl/4552057
2011-06-06 14:11:29 +10:00
Alex Brainman
4c2123e534 go/build: fix windows build by commenting out references to stdout and stderr in cgotest
R=golang-dev, r, adg
CC=golang-dev
https://golang.org/cl/4561062
2011-06-06 10:11:41 +10:00
Andrew Gerrand
eb72403bb6 go/build: exclude cgo test from arm
go/build: include command output in error values
go/build: add syslist.go to .hgignore

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4550118
2011-06-06 09:25:30 +10:00
Nigel Tao
b47a38dedb image/draw: move exp/draw to image/draw and exp/gui.
R=r
CC=golang-dev
https://golang.org/cl/4515191
2011-06-05 14:27:38 +10:00
Andrew Gerrand
c2cea4418a go/build: new package for building go programs
R=rsc
CC=golang-dev
https://golang.org/cl/4433047
2011-06-04 12:45:09 +10:00
Rob Pike
7a92287a48 unicode: for consistency with MaxRune, s/Latin1Max/MaxLatin1/ and
s/ASCIIMax/MaxASCII/

R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/4539109
2011-06-04 09:28:27 +10:00
Rob Pike
8d64e73f94 unicode: add the first few property tests for printing.
The long-term goal is that %q will use IsPrint to decide
what to show natively vs. as hexadecimal.

R=rsc, r
CC=golang-dev
https://golang.org/cl/4526095
2011-06-04 07:46:22 +10:00
Robert Griesemer
86b3577a59 ebnf: update comment
(pointed out by jan.mercl@nic.cz)

R=iant, jan.mercl, rsc
CC=golang-dev
https://golang.org/cl/4515189
2011-06-03 13:02:35 -07:00
Brad Fitzpatrick
2655757900 http: don't fail on accept hitting EMFILE
Fixes #1891

R=rsc
CC=golang-dev
https://golang.org/cl/4550112
2011-06-03 12:23:50 -07:00
Mikio Hara
0015e8eb5e net: fix windows build
R=rsc
CC=golang-dev
https://golang.org/cl/4539108
2011-06-03 15:16:05 -04:00
Mikio Hara
518331dfea net: add network interface identification API
This CL introduces new API into package net to identify the network
interface.  A functionality of new API is very similar to RFC3493 -
"Interface Identification".

R=r, gri, bradfitz, robert.hencke, fullung, rsc
CC=golang-dev
https://golang.org/cl/4437087
2011-06-03 14:35:42 -04:00
Dmitriy Vyukov
79b397b27e testing: check that tests and benchmarks do not affect GOMAXPROCS
Plus fix spoiling of GOMAXPROCS in 2 existing rwmutex tests.
Plus fix benchmark output to stdout (now it outputs to stderr like all other output).

R=rsc
CC=golang-dev
https://golang.org/cl/4529111
2011-06-03 13:50:44 -04:00
Nigel Tao
f531ef3279 image: rename Contains and ContainsRectangle to In.
R=r
CC=golang-dev
https://golang.org/cl/4539104
2011-06-03 13:18:15 +10:00
Luuk van Dijk
56668283f1 gc: allow tags on parameters in export section of object files.
This is in preparation of escape analysis; function parameters
can now be tagged with interesting bits by the compiler by
assigning to n->note.

tested by having typecheck put a fake tag on all parameters of
pointer type and compiling the tree.

R=rsc
CC=golang-dev
https://golang.org/cl/4524092
2011-06-03 03:54:56 +02:00
Nigel Tao
ae5a972d9e exp/draw: fix clipping bug where sp/mp were not shifted when r.Min was.
image: add Rectangle.ContainsRectangle method.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4517130
2011-06-03 11:43:54 +10:00
Rob Pike
ce5c1cf036 fmt: fix bug in UnreadRune: must clear memory of previous
rune if input implements UnreadRune; otherwise the lookahead
will lie.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4548082
2011-06-03 07:53:50 +10:00
Rob Pike
4e9e925002 exec: change exec.PathError to exec.Error
There were two issues:
1) It might not be a path error, it might be 'permission denied'.
2) The concept of $PATH is Unix-specific.

R=alex.brainman, rsc, r, mattn.jp
CC=golang-dev
https://golang.org/cl/4530096
2011-06-03 07:48:06 +10:00
Brad Fitzpatrick
31c79c4eff http: ServeFile shouldn't send Content-Length when Content-Encoding is set
Fixes #1905

R=rsc
CC=golang-dev
https://golang.org/cl/4538111
2011-06-02 13:36:52 -07:00
Robert Griesemer
5bf57c1b41 big: remove some unnecessary conversions
R=rsc
CC=golang-dev
https://golang.org/cl/4529110
2011-06-02 12:58:26 -07:00
Brad Fitzpatrick
2a8ea0d1b5 http: catch panics
R=rsc
CC=golang-dev
https://golang.org/cl/4559067
2011-06-02 12:00:26 -07:00
Robert Griesemer
191a6bfc5e big: do not modify divisor
Fixes #1907.

R=rsc
CC=golang-dev
https://golang.org/cl/4527096
2011-06-02 11:07:41 -07:00
Brad Fitzpatrick
4d15577783 exec: add Cmd methods StdinPipe, StdoutPipe, StderrPipe
It gets annoying to do this in caller code otherwise,
especially having to remember to Close one side.

R=rsc
CC=golang-dev
https://golang.org/cl/4517134
2011-06-02 10:26:09 -07:00
Russ Cox
69cb8fef43 sync/atomic: fix check64
The LDREXD and STREXD instructions require
aligned addresses, and the ARM stack is not
guaranteed to be aligned during the check.
This may cause other problems later (on the ARM
not all 64-bit pointers may be 64-bit aligned)
but at least the check is correct now.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4564053
2011-06-02 13:13:51 -04:00
Brad Fitzpatrick
f3c351982f exec: missing docs, errors
R=rsc
CC=golang-dev
https://golang.org/cl/4550111
2011-06-02 09:57:24 -07:00
Russ Cox
ef2d5f68d0 path/filepath: skip permission test in all.bash
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4517132
2011-06-02 12:26:43 -04:00
Dmitriy Vyukov
2653b4fbcc testing: fix MB/s computation, documentation
R=rsc
CC=golang-dev
https://golang.org/cl/4529100
2011-06-02 10:52:46 -04:00
Mikio Hara
d1bdff5448 net, syscall: update IP multicast socket options for darwin, freebsd, linux
Add IPv6Mreq and Inet6Pktinfo for specifying the network interface.
Rename IpMreq to IPMreq, SetsockoptIpMreq to SetsockoptIPMreq.

R=rsc, dave, robert.hencke
CC=golang-dev
https://golang.org/cl/4532098
2011-06-02 10:10:17 -04:00
Rob Pike
9995d216eb template: explain that fields must be exported.
Fixes #1792.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4548083
2011-06-03 00:09:42 +10:00
Russ Cox
07acc02a29 compress/flate: do not use background goroutines
Programs expect that Read and Write are synchronous.
The background goroutines make the implementation
a little easier, but they introduce asynchrony that
trips up calling code.  Remove them.

R=golang-dev, krasin
CC=golang-dev
https://golang.org/cl/4548079
2011-06-02 09:32:38 -04:00
Nigel Tao
422abf3b8e image: add a SubImage method.
R=r
CC=golang-dev
https://golang.org/cl/4515179
2011-06-02 18:51:41 +10:00
Alex Brainman
b873701dbd runtime: do not garbage collect windows callbacks
Fixes #1883.
Fixes #1702.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4532103
2011-06-02 17:08:56 +10:00
Rob Pike
60dddc6db1 fmt: return EOF when out of input in Scan*.
Fixes #1840.

R=rsc
CC=golang-dev
https://golang.org/cl/4548077
2011-06-02 10:51:31 +10:00
William Chan
bc3a72fa28 http/spdy: reorganize package.
R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4524087
2011-06-01 17:30:49 -07:00
Gustavo Niemeyer
17bfa32fde sync: always wake up previously sleeping goroutines on Cond.Signal
This changes the internal implementation of Cond so that
it uses two generations of waiters.  This enables Signal
to guarantee that it will only wake up waiters that are
currently sleeping at the call time.

Fixes #1648.

R=dvyukov, gustavo, rsc
CC=golang-dev
https://golang.org/cl/4524083
2011-06-01 20:30:42 -03:00
Robert Griesemer
158b427ea5 big: fix broken overflow test
- tested with GOARCH=386
- tested with GOARCH=amd64

R=iant
CC=golang-dev
https://golang.org/cl/4526100
2011-06-01 16:28:17 -07:00
Brad Fitzpatrick
f259f6ba0a exec: new API, replace Run with Command
This removes exec.Run and replaces exec.Cmd with a
new implementation. The new exec.Cmd represents
both a currently-running command and also a command
being prepared. It has a good zero value.

You can Start + Wait on a Cmd, or simply Run it.
Start (and Run) deal with copying stdout, stdin,
and stderr between the Cmd's io.Readers and
io.Writers.

There are convenience methods to capture a command's
stdout and/or stderr.

R=r, n13m3y3r, rsc, gustavo, alex.brainman, dsymonds, r, adg, duzy.chan, mike.rosset, kevlar
CC=golang-dev
https://golang.org/cl/4552052
2011-06-01 15:26:53 -07:00
Robert Griesemer
2132a7f575 fix build: remove non-portable test case
On a 32bit machine, the big.Words are only 32bit.

R=rsc
CC=golang-dev
https://golang.org/cl/4561055
2011-06-01 15:19:34 -07:00