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

1135 Commits

Author SHA1 Message Date
Russ Cox
e4f06812c5 runtime: instrument malloc + garbage collector.
add simple garbage collection benchmark.

R=iant
CC=golang-dev
https://golang.org/cl/204053
2010-02-08 14:32:22 -08:00
Evan Shaw
abe6a5b0f7 testing: Fix comment typo
R=iant, rsc
CC=golang-dev
https://golang.org/cl/204068
2010-02-07 23:11:54 -08:00
Adam Langley
d5841cac45 encoding/pem: add marshalling support.
R=rsc
CC=golang-dev
https://golang.org/cl/203043
2010-02-07 15:22:36 -05:00
Russ Cox
87915b6565 runtime: introduce MemStatsType
R=ken2
CC=golang-dev
https://golang.org/cl/204061
2010-02-07 01:20:44 -08:00
Kai Backman
ebf32c5868 fix comment
R=rsc
CC=golang-dev
https://golang.org/cl/203053
2010-02-06 21:59:46 -08:00
Nigel Tao
48cdb63baa draw.Draw fast paths for a nil mask (and RGBA dst).
Averaged times (in microseconds) for drawing an 800x600 rectangle
are listed below. The summary is: around a 100x improvement.

draw.Draw call times were typically linear in the number of pixels
touched (i.e. drawing an 800x600 rectangle took 100x as much time as
drawing an 80x60 rectangle).

Before this change, there was only the general-but-slow code path.
When drawing any src with a 50%-opaque mask: 237300 us
When drawing any src with a nil mask: 50100 us

After this change, the 50%-opaque mask case is unchanged.
For an *image.RGBA dst and nil mask and...
...a uniform color (i.e. an image.ColorImage) src: 282 us
...another *image.RGBA src: 615 us.

For the curious, an intermediate implementation detected the special
cases but used simple nested for loops instead of the built-in copy
function. The respective times (compared to 282 and 615 for the
final implementation, or 50100 for the original) were 3110 and 3573.

Times were measured with 8g/8l on my laptop. I haven't tried gccgo
or other architectures.

R=r, rsc
CC=golang-dev
https://golang.org/cl/201048
2010-02-06 15:57:19 +11:00
Petar Maymounkov
4fdab85178 http: sort header keys when writing Response or Request to wire
R=rsc
CC=golang-dev
https://golang.org/cl/203050
2010-02-05 18:32:02 -08:00
Charles L. Dorian
072b560ee6 math: Atan2 special cases and tests; atan2_386
Added special cases, tests and benchmarks for Atan2;
added 386 FPU version of Atan2.

R=rsc
CC=golang-dev
https://golang.org/cl/201068
2010-02-05 14:55:19 -08:00
Adam Langley
95e08bde44 asn1: Fixes and additions to marshalling
Marshalling:
* Fixes several silly bugs.
* Support the RawContents type.
* Support the RawValue type.
* Recurse into nested interface{}.

Both directions:
* Better handling of SETs. You can now tag an element in a
  structure with "set" to get the correct tag for serialisation.
* For types that aren't in a structure, you can now name them
  with "SET" on the end.
* SETs are no longer implicitly treated as SEQUENCEs.

R=rsc
CC=golang-dev
https://golang.org/cl/201049
2010-02-05 05:42:02 -05:00
Adam Langley
5d827fac39 crypto/tls: typo fix
R=rsc
CC=golang-dev
https://golang.org/cl/201047
2010-02-05 05:39:49 -05:00
Stephen Weinberg
bc43cc3db0 path: make Join variadic
R=rsc, r
CC=golang-dev
https://golang.org/cl/198049
2010-02-05 02:39:33 -08:00
Charles L. Dorian
04217ee54e math: special cases for Modf, Frexp and Ldexp; added Modf_386
Also moved Modf from bits.go into modf.go and added timing tests.

R=rsc
CC=golang-dev
https://golang.org/cl/202042
2010-02-05 00:41:30 -08:00
Rob Pike
2d7dc0e70c handle nils safely in Printf.
add some tests for erroneous formats.

R=rsc
CC=golang-dev
https://golang.org/cl/201058
2010-02-05 11:23:25 +11:00
Joe Poirier
987e1198db Added mingw specific build stubs.
R=rsc
CC=golang-dev
https://golang.org/cl/198071
2010-02-04 13:09:09 -08:00
Christopher Wedgwood
1e66428d59 time: Sleep through interruptions
R=rsc
CC=golang-dev
https://golang.org/cl/202043
2010-02-04 13:09:02 -08:00
Christopher Wedgwood
b655fa8d1d FreeBSD: Kill only takes pid & signal
Cosmetic fix.  The FreeBSD system call only takes two
arguments.

http://fxr.watson.org/fxr/source/kern/kern_sig.c?im=bigexcerpts#L1678

R=dho, rsc
CC=golang-dev
https://golang.org/cl/202051
2010-02-04 13:08:54 -08:00
Andrew Gerrand
8ec9ffc742 6l: move mapped symbol table lower in memory
Allows binary to run on some Linux system.

Fix for issue 365.

R=rsc
CC=golang-dev
https://golang.org/cl/199096
2010-02-04 12:46:11 -08:00
Nigel Tao
4e2035bdc2 In draw.Draw, separate the source-point and mask-point.
This lets you draw text (i.e. with mask = a font image) with
sources that aren't uniform colors.

R=r, rsc
CC=golang-dev
https://golang.org/cl/193067
2010-02-04 21:21:32 +11:00
Russ Cox
f2317d3ec1 syscall: on freebsd, darwin, give Kill same signature as on linux
R=r, cw
CC=golang-dev
https://golang.org/cl/201043
2010-02-04 02:06:08 -08:00
Nigel Tao
ea344e123a Add named colors (e.g. image.Blue), suitable for exp/draw.
R=r, rsc
CC=golang-dev
https://golang.org/cl/198066
2010-02-04 20:25:37 +11:00
Petar Maymounkov
15da069a37 http: use ChunkWriter in Request.Write
R=rsc
CC=golang-dev
https://golang.org/cl/196079
2010-02-04 00:23:01 -08:00
Christopher Wedgwood
43d2e59a81 os/signal: send SIGCHLDs to Incoming
R=rsc
CC=golang-dev
https://golang.org/cl/199082
2010-02-03 23:24:28 -08:00
Rob Pike
2bcca5d951 Add RFC822 formats as named constants.
Make sure to print a time zone when formatting even if none is defined.
Add a comment introducing lookupTimezone (not lookupTimeZone).

Fixes isse 577.

R=rsc
CC=golang-dev
https://golang.org/cl/196090
2010-02-04 15:39:27 +11:00
Russ Cox
3a295ab704 debug/gosym: fix test for new 6l
TBR=r
CC=golang-dev
https://golang.org/cl/199091
2010-02-03 16:53:19 -08:00
Russ Cox
33e396a4a7 finalizers; merge package malloc into package runtime
R=r, cw
CC=golang-dev
https://golang.org/cl/198085
2010-02-03 16:31:34 -08:00
Andrey Mirtchovski
4a9a0056c1 sort: fix comment typo
R=rsc
CC=golang-dev
https://golang.org/cl/198084
2010-02-02 23:01:21 -08:00
Russ Cox
8b8c103b2b fix build - misc ... vs ...T fixes
TBR=r
CC=golang-dev
https://golang.org/cl/198081
2010-02-02 18:19:27 -08:00
Nigel Tao
a3372bd655 New image.A type, to represent anti-aliased font glyphs.
R=r, rsc
CC=golang-dev
https://golang.org/cl/199052
2010-02-02 18:38:04 +11:00
Russ Cox
b13b80e555 math: change Cosh test to close, not veryclose (needed on some x86 chips)
R=r
CC=Charlie Dorian, golang-dev
https://golang.org/cl/199054
2010-02-01 22:46:37 -08:00
Charles L. Dorian
a0690b69da math: add functions; update tests and special cases
Added special cases to comments for asin.go and fabs.go.
Added Trunc() to floor.go and floor_386.s.  Fixed formatting
error in hypot_386.s  Added new functions Acosh, Asinh,
Atanh, Copysign, Erf, Erfc, Expm1, and Log1p.  Added
386 FPU version of Fmod.  Added tests, benchmarks, and
precision to expected results in all_test.go.  Edited
makefile so it all compiles.

R=rsc
CC=golang-dev
https://golang.org/cl/195052
2010-02-01 22:21:40 -08:00
Robert Griesemer
75187e5ca3 update printer tests to use new syntax
R=rsc
CC=golang-dev
https://golang.org/cl/198048
2010-02-01 17:51:55 -08:00
Russ Cox
2a5d30fbe7 io: revised Pipe implementation
* renamed channels to say what gets sent
* use channel closed status instead of racy check of boolean

R=nigeltao_golang
CC=golang-dev
https://golang.org/cl/196065
2010-02-01 17:43:15 -08:00
Rob Pike
5db5f68d96 allow any scalar type in xml.Unmarshal.
Fixes #574.

R=rsc
CC=golang-dev
https://golang.org/cl/196056
2010-02-02 11:53:10 +11:00
Robert Griesemer
f7e2266ce6 Corrected broken assertion.
Fixes #571.

R=rsc
CC=golang-dev
https://golang.org/cl/198045
2010-02-01 16:14:22 -08:00
Rob Pike
d2fc5d68da Change type of Printf's args to ... interface{}
R=rsc
CC=golang-dev
https://golang.org/cl/197043
2010-02-02 10:53:37 +11:00
Russ Cox
1f11ece67f nacl: fix build, finally fixed 8l convergence bug
R=r
CC=golang-dev
https://golang.org/cl/199042
2010-02-01 15:20:19 -08:00
Petar Maymounkov
0d8797bf73 http: test for ReadReqeust
R=rsc, rsc1
CC=golang-dev
https://golang.org/cl/195068
2010-02-01 11:23:38 -08:00
Russ Cox
68796b0270 gc: add ... T, rework plain ...
No longer a distinct type; now a property of func types.

R=ken2
CC=golang-dev
https://golang.org/cl/197042
2010-02-01 00:25:59 -08:00
Nigel Tao
5647e604f7 Check gzip strings for NUL elements, since they are NUL-terminated
on the wire.

R=rsc
CC=golang-dev
https://golang.org/cl/194146
2010-01-30 12:21:51 +11:00
Nigel Tao
af7e0f1bdd Add a GZIP test for the empty payload.
R=rsc, r
CC=golang-dev
https://golang.org/cl/194131
2010-01-30 11:54:39 +11:00
Petar Maymounkov
84f9b70280 http: increase header line limit, let req.Host override req.URL.Host
Fixes #566.

R=rsc
CC=golang-dev
https://golang.org/cl/194074
2010-01-29 16:51:42 -08:00
Rob Pike
d6ee49a119 fix bug in tick
Fixes #576.

R=rsc, rog
CC=golang-dev
https://golang.org/cl/196061
2010-01-29 13:10:33 -08:00
Devon H. O'Dell
4ffbff14b3 math: Change veryclose to close for Sinh and Exp tests.
Fixes #550.

R=rsc
CC=eds, golang-dev, jtomaschke
https://golang.org/cl/196063
2010-01-29 12:54:05 -08:00
Rob Pike
16ddb6c538 move comment on StringHeader to fix godoc output.
R=rsc, ken2
CC=golang-dev
https://golang.org/cl/196055
2010-01-29 12:43:46 +11:00
Russ Cox
6039a414ae io: fix nil Write bug in Pipe
R=nigeltao_golang
CC=golang-dev
https://golang.org/cl/194132
2010-01-28 17:38:51 -08:00
Ken Thompson
d7a5ccf36e added StringHeader to reflect
R=rsc
CC=golang-dev
https://golang.org/cl/194133
2010-01-28 17:14:29 -08:00
Nigel Tao
c9150003a9 gzip deflater (i.e., writer).
Also, the unused Inflater.eof field was removed.
It has been unused since revision aaa0b24538.
"introduce os.EOF and io.ErrUnexpectedEOF. remove io.ErrEOF."
http://code.google.com/p/go/source/diff?spec=svnaaa0b24538ed1e3e54cbbfdd030a3c35785e74c5&r=aaa0b24538ed1e3e54cbbfdd030a3c35785e74c5&format=side&path=/src/pkg/compress/gzip/gunzip.go

R=rsc
CC=golang-dev
https://golang.org/cl/194122
2010-01-29 11:00:05 +11:00
Petar Maymounkov
dd77c63d3d http: add lexing functions
In particular, add field-value tokenizer which respects quoting rules.
The code is intended for use in tokenizing the Transfer-Encoding and Trailer fields.
The lexing function is not connected to the main parsing code yet (in the next CL).

R=rsc
CC=golang-dev
https://golang.org/cl/190085
2010-01-28 15:14:54 -08:00
Petar Maymounkov
a0e6f03add Cosmetic bug or compliance fixes in http.Response.
(1) http.Response must close resp.Body after writing.
(2) Case when resp.Body != nil and resp.ContentLength = 0 should not be
treated as an error in Response.Write, because this is what
ReadResponse often returns.
(3) Changed body.th to body.hdr for readability.

R=rsc
CC=golang-dev
https://golang.org/cl/194084
2010-01-28 15:13:26 -08:00
Rob Pike
d53b426fa0 An experimental implemenation of Ticker using two goroutines for all tickers.
Feel free to suggest other approaches.

R=rsc
CC=cw, golang-dev
https://golang.org/cl/193070
2010-01-29 08:34:40 +11:00