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

1894 Commits

Author SHA1 Message Date
Andrew Gerrand
55986c1329 path: fix typo in path.Visitor
Fixes #1088.

R=gri, iant
CC=golang-dev
https://golang.org/cl/2157043
2010-09-09 09:24:27 +10:00
Jukka-Pekka Kekkonen
f7a71c6505 http: do not cache CanonicalHeaderKey
Fixes #1080.

R=rsc
CC=golang-dev
https://golang.org/cl/2158043
2010-09-08 10:20:21 -04:00
Russ Cox
e50611d235 os, exec: rename argv0 to name
R=r, gri1
CC=golang-dev
https://golang.org/cl/2119044
2010-09-07 16:29:07 -04:00
Russ Cox
636342292c runtime: fix linux/amd64 build: wrong name for munmap
TBR=r
CC=golang-dev
https://golang.org/cl/2140043
2010-09-07 13:17:10 -04:00
Russ Cox
d4cc557b0d runtime: use manual stack for garbage collection
Old code was using recursion to traverse object graph.
New code uses an explicit stack, cutting the per-pointer
footprint to two words during the recursion and avoiding
the standard allocator and stack splitting code.

in test/garbage:

Reduces parser runtime by 2-3%
Reduces Peano runtime by 40%
Increases tree runtime by 4-5%

R=r
CC=golang-dev
https://golang.org/cl/2150042
2010-09-07 09:57:22 -04:00
Nigel Tao
fa92b113b1 exp/draw: reintroduce the MouseEvent.Nsec timestamp.
R=rsc
CC=golang-dev
https://golang.org/cl/2166042
2010-09-07 23:42:01 +10:00
Brad Fitzpatrick
34c312e11e arm: use the correct stat syscalls
We were using the 64-bit struct with the old 32-bit
system calls.

http://code.google.com/p/go/issues/detail?id=1083

This also fixes up mksyscall.sh to generate
gofmt-compliant code.

R=rsc
CC=golang-dev, kaib
https://golang.org/cl/2148042
2010-09-07 09:23:49 -04:00
Nigel Tao
832ed355fe image: change a ColorImage's minimum point from (0, 0) to (-1e9, -1e9).
R=r
CC=golang-dev
https://golang.org/cl/2138045
2010-09-07 19:16:59 +10:00
Nigel Tao
c849b23ce9 exp/draw: unify a draw.Context's keyboard, mouse, etc. channels into a
single event channel.

A quit event is now represented by closing that channel.

R=r, rsc, nigeltao
CC=golang-dev
https://golang.org/cl/2114042
2010-09-06 19:22:49 +10:00
Anthony Martin
68cce4ab20 fmt.Scan: fix integer overflow on 32-bit machines
R=r, rsc
CC=golang-dev
https://golang.org/cl/2144043
2010-09-06 08:04:53 +10:00
Rob Pike
d54b921c9b netchan: use acknowledgements on export send.
Also add exporter.Drain() to wait for completion.
This makes it possible for an Exporter to fire off a message
and wait (by calling Drain) for the message to be received,
even if a client has yet to call to retrieve it.

Once this design is settled, I'll do the same for import send.

Testing strategies welcome.  I have some working stand-alone
tests.

R=rsc
CC=golang-dev
https://golang.org/cl/2137041
2010-09-04 23:41:54 +10:00
Rob Pike
6405ab0fae fmt: delete erroneous sentence about return value for Sprint*.
R=rsc
CC=golang-dev
https://golang.org/cl/2160041
2010-09-04 22:29:10 +10:00
Nigel Tao
2b4218f321 image: introduce Config type and DecodeConfig function, to decode an
image's color model and dimensions without allocating and decoding its
actual pixels.

Fixes #695.

R=r
CC=golang-dev
https://golang.org/cl/2151042
2010-09-03 18:03:08 +10:00
Rob Pike
d94fedabb4 list: update comment to state that the zero value is ready to use.
R=gri
CC=golang-dev
https://golang.org/cl/2147042
2010-09-03 17:11:56 +10:00
Robert Griesemer
a37e3697da exp/iterables: fix typo
Fixes #1069.

R=rsc
CC=golang-dev
https://golang.org/cl/2143041
2010-09-02 11:31:00 -07:00
Russ Cox
f699811c14 time: do not crash in String on nil Time
R=r
CC=golang-dev
https://golang.org/cl/2052041
2010-09-02 14:21:40 -04:00
Russ Cox
8d7ae528bf http: add Date to server, Last-Modified and If-Modified-Since to file server
R=r
CC=golang-dev
https://golang.org/cl/2051041
2010-09-02 14:21:11 -04:00
Russ Cox
4e64555894 runtime: add GOOS, GOARCH; fix FuncLine
Changes to FuncLine sync it with symtab.c's funcline.

R=r
CC=girard.m1, golang-dev
https://golang.org/cl/2083041
2010-09-02 14:19:12 -04:00
Andrew Gerrand
2fe0f8da52 http: add PostForm function to post url-encoded key/value data.
This is a common task, so it makes sense to have a helper to do it.

(App Engine doesn't like "Transfer-Encoding: chunked" for POST
bodies, which is the default for regular Post.)

R=rsc
CC=golang-dev
https://golang.org/cl/2113041
2010-09-02 10:01:34 +10:00
Kyle Consalus
f8a67d79d1 Fix incorrect reporting of error in Scanner.next() when Read reads > 0 bytes but returns os.EOF.
R=golang-dev, gri1, gri
CC=golang-dev
https://golang.org/cl/2083042
2010-09-01 15:15:37 -07:00
Rob Pike
3d76135ee5 netchan: rather than 0, make -1 mean infinite, by analogy with strings.Split etc.
It's unlikely to affect any extant code, but I wanted to make this API change
before digging in for a rewrite.

R=rsc
CC=golang-dev
https://golang.org/cl/2112041
2010-09-02 08:10:53 +10:00
Rob Pike
49b19e1b39 fmt: fix typo in package comment.
No semantic change.

R=rsc
CC=golang-dev
https://golang.org/cl/2121041
2010-09-01 22:59:20 +10:00
Scott Lawrence
825e0deece template: fixed documentation formatting
What was meant to be a list appeared as a paragraph with dashes.

R=golang-dev, gri1, gri
CC=golang-dev
https://golang.org/cl/2100041
2010-08-31 19:07:40 -07:00
Robert Griesemer
9f46962c3b big: added RatString, some simplifications
R=rsc
CC=golang-dev
https://golang.org/cl/2095041
2010-08-31 15:18:46 -07:00
Robert Griesemer
3ad995ea88 strconv: fix comment for godoc
R=rsc
CC=golang-dev
https://golang.org/cl/2029042
2010-08-31 14:18:20 -07:00
Ian Lance Taylor
7a2daa7d3a proc, eval: Don't assign address of an array to a slice.
R=rsc
CC=golang-dev
https://golang.org/cl/2084041
2010-08-30 13:47:40 -07:00
Christian Himpel
5c603dbb75 build: remove unnecessary references to GOBIN and GOROOT
All scripts and makefiles assume that GOBIN is correctly set
in PATH.

R=rsc
CC=golang-dev
https://golang.org/cl/2043041
2010-08-30 15:40:56 -04:00
Rob Pike
ca3b5222eb regexp: interpret all Go characer escapes \a \b \f \n \r \t \v
R=rsc
CC=golang-dev
https://golang.org/cl/2042044
2010-08-30 14:06:59 +10:00
Evan Shaw
3972908ead crypto/tls: Fix doc typo
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/2073041
2010-08-30 09:59:59 +10:00
Rob Pike
64cb9b6f45 rpc: fix bug that caused private methods to attempt to be registered.
Fixes #1056.

R=golang-dev, adg1
CC=golang-dev
https://golang.org/cl/2033043
2010-08-30 08:03:06 +10:00
Rob Pike
b5664ee320 template: finally fix space handling around actions.
Rewrite the code to express the intention more clearly.

Fixes #1042.

R=rsc
CC=golang-dev
https://golang.org/cl/2011046
2010-08-28 07:52:55 +10:00
Robert Griesemer
8935c8489a gofmt: permit omission of first index in slice expression
R=rsc
CC=golang-dev, r
https://golang.org/cl/2053041
2010-08-27 14:49:49 -07:00
Scott Lawrence
1a0b62a16a go/printer: align ImportPaths in ImportDecls if PackageName is given.
Fixes #1044.

R=gri
CC=golang-dev
https://golang.org/cl/1958047
2010-08-26 22:08:02 -07:00
Charles L. Dorian
bead166a7c math: amd64 version of Sincos
R=rsc
CC=golang-dev
https://golang.org/cl/1939042
2010-08-26 19:03:58 -04:00
Ian Lance Taylor
b279c048e3 netchan: Fix race condition in test.
Two tests start a goroutine which runs exportSend, and then
the tests run importReceive.  exportSend creates an export
channel.  importReceive asks to receive values on that
channel.  Because exportSend runs in a separate goroutine,
it's possible for the export client to receive the request for
values on the channel, from importReceive, before the
goroutine actually creates the export channel.  That causes an
error: "export: no such channel: exportedSend".  This patch
avoids the race by creating the export channel before starting
the goroutine.

There does not seem to be a similar race condition in the
tests which send data in the other direction.

R=r
CC=golang-dev
https://golang.org/cl/2026045
2010-08-26 15:42:18 -07:00
Robert Griesemer
c606b964a0 go/typechecker: 2nd step towards augmenting AST with full type information.
- refine/define Scope, Object, and Type structures
  (note: scope.go has the addition of types, the rest is only re-organized
  for better readability)
- implemented top-level of type checker:
  resolve global type declarations (deal with double decls, cycles, etc.)
- temporary hooks for checking of const/var declarations, function/method bodies
- test harness for fine-grained testing (exact error locations)
  with initial set of tests

This is a subset of the code for easier review.

R=rsc
CC=golang-dev
https://golang.org/cl/1967049
2010-08-26 14:36:13 -07:00
Corey Thomasson
ec72f9bf18 net: add LookupMX
R=rsc
CC=golang-dev
https://golang.org/cl/1976049
2010-08-26 13:32:45 -04:00
Kyle Consalus
4d903504b3 runtime: special case copy, equal for one-word interface values
Based on the observation that a great number of the types that
are copied or compared in interfaces, maps, and channels are
word-sized, this uses specialized copy and equality functions
for them that use a word instead of 4 or 8 bytes. Seems to yield
0-6% improvements in performance in the benchmarks I've run.
For example, with the regexp benchmarks:

Before:
regexp.BenchmarkLiteral   500000       3.26 µs/op
regexp.BenchmarkNotLiteral    100000      13.67 µs/op
regexp.BenchmarkMatchClass    100000      18.72 µs/op
regexp.BenchmarkMatchClass_InRange    100000      20.04 µs/op
regexp.BenchmarkReplaceAll    100000      27.85 µs/op

After:
regexp.BenchmarkLiteral   500000       3.11 µs/op
regexp.BenchmarkNotLiteral    200000      13.29 µs/op
regexp.BenchmarkMatchClass    100000      17.65 µs/op
regexp.BenchmarkMatchClass_InRange    100000      18.49 µs/op
regexp.BenchmarkReplaceAll    100000      26.34 µs/op

R=rsc
CC=golang-dev
https://golang.org/cl/1967047
2010-08-26 13:32:40 -04:00
Jukka-Pekka Kekkonen
ba5b09f786 crypto/hmac: make Sum idempotent
Fixes #978.

R=rsc
CC=golang-dev
https://golang.org/cl/1967045
2010-08-26 13:32:29 -04:00
Evan Shaw
33cb46903e net/textproto: Handle multi-line responses
This is required for FTP and SMTP; maybe others.

R=rsc
CC=golang-dev
https://golang.org/cl/1892052
2010-08-26 13:32:23 -04:00
Scott Lawrence
6752ce9331 http: obscure passwords in return value of URL.String
Fixes #974.

R=rsc
CC=golang-dev
https://golang.org/cl/1742057
2010-08-26 13:32:16 -04:00
Ian Lance Taylor
bbaef5f4dc runtime: Correct commonType.kind values to match compiler.
The copy of these values in the reflect package is already
correct.

R=rsc
CC=golang-dev
https://golang.org/cl/2009044
2010-08-26 08:08:57 -07:00
Russ Cox
15f336b675 build: let pkg/Makefile coordinate building of Go commands
Commands written in Go depend on Go packages, so they
cannot be built by src/cmd/make.bash.  They have been
built by src/make.bash after all the packages are done, but
we want to be able to use cgo (written in Go) during the build
of package net.  To make this possible, build the commands
from src/pkg/Makefile instead of src/make.bash, so that they
are included in the package dependency analysis.

R=r
CC=golang-dev
https://golang.org/cl/1972046
2010-08-25 17:54:10 -04:00
Jukka-Pekka Kekkonen
9401e3d1e4 websocket: fix missing Sec-WebSocket-Protocol on server response.
Due to header key normalization/typo, the server never responds with
the protocol header in place. This breaks all (draft76) applications
that are using the protocol-header.

R=ukai, rsc
CC=golang-dev
https://golang.org/cl/1969046
2010-08-25 12:52:04 -04:00
Martin Neubauer
9a04cba807 src/pkg/Makefile: delete use of QUOTED_GOBIN
R=rsc
CC=golang-dev
https://golang.org/cl/1997044
2010-08-25 12:44:13 -04:00
Russ Cox
b0729cdfe5 go/doc: use correct escaper for URL
Despite the name, URL escaping is for a small subpiece of the URL only.
This particular URL is being emitted in an <a href=""> tag and in that
context it should be HTML escaped, not URL escaped.

In addition to fixing a bug, this change cuts a dependency chain
from go/doc to net, clearing the way for use of cgo
(which imports go/doc) during the compilation of package net.

R=gri
CC=golang-dev
https://golang.org/cl/1960050
2010-08-25 11:00:38 -04:00
Russ Cox
218afb8fbd syscall: change BUG(brainman) to NOTE(brainman)
Avoids the comment appearing in godoc syscall BUGS section.

R=brainman
CC=golang-dev
https://golang.org/cl/1966048
2010-08-25 01:26:35 -04:00
Rob Pike
d7736413a6 scanner: change package comment to be clearer about its functionality.
No semantic changes.

R=gri, rsc1
CC=golang-dev
https://golang.org/cl/1998045
2010-08-25 13:07:08 +10:00
Ian Lance Taylor
2b73ad592c time: Remove unused zoneinfo.go (replaced by zoneinfo_unix.go).
R=r, rsc
CC=brainman, golang-dev
https://golang.org/cl/2020043
2010-08-24 17:24:40 -07:00
Jan H. Hosang
2100f57e0f time.Parse should not require minutes for time zone
Fixes #1026.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1962048
2010-08-25 07:41:26 +10:00