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

3334 Commits

Author SHA1 Message Date
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
Robert Griesemer
ce2701b2b0 big: ~8x faster number scanning
- better number scanning algorithm
- fixed a couple of bugs related to base interpretation
- added scan benchmark
- added more test cases and made tests more precise
- introduced Int.scan method matching nat.scan
- refactored Int.Scan; now uses int.scan
- refactored Int.SetString; now uses int.scan

There is more potential, this was a fairly simple change.

gotest -test.bench="ScanPi" before/after (best of 3 runs):
big.BenchmarkScanPi	   1000	    2024900 ns/op
big.BenchmarkScanPi       10000      257540 ns/op

R=chickencha
CC=golang-dev, rsc
https://golang.org/cl/4527089
2011-06-01 14:17:00 -07:00