1
0
mirror of https://github.com/golang/go synced 2024-09-25 05:10:12 -06:00
Commit Graph

9613 Commits

Author SHA1 Message Date
Russ Cox
ec3dc34d12 A+C: Ziad Hatahet (individual CLA)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4964066
2011-09-07 13:53:05 -04:00
Dmitriy Vyukov
1fc676332f sync/atomic: add Store functions
R=rsc
CC=golang-dev
https://golang.org/cl/4950060
2011-09-07 21:50:51 +04:00
Russ Cox
299f524d90 image/png: check zlib checksum during Decode
R=nigeltao
CC=golang-dev
https://golang.org/cl/4987041
2011-09-07 13:23:16 -04:00
Luuk van Dijk
f2460a8c57 gc: treat DOTMETH like DOT in escape analysis.
Fixes #2225

R=rsc, nigeltao, dave
CC=bradfitz, golang-dev, mikioh.mikioh
https://golang.org/cl/4972056
2011-09-07 19:03:11 +02:00
David Symonds
e85fb2137b weekly.html: remove note about exp/template -> template move.
It actually occurred with the previous weekly snapshot.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4961066
2011-09-07 14:10:14 +10:00
Robert Griesemer
61650b21d6 cleanup: gofmt -s -w src misc
R=r
CC=golang-dev
https://golang.org/cl/4984052
2011-09-06 16:04:55 -07:00
Rob Pike
62b10ad0ba template: slightly simplify the test for assignability of arguments
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4951066
2011-09-06 15:59:21 -07:00
Rob Pike
d45e808c91 template: indirect or dereference function arguments if necessary to match the type of the formal.
Fixes #2235

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4967056
2011-09-06 15:34:38 -07:00
Robert Griesemer
0783dd9027 go/parser: accept corner cases of signature syntax
- func f(int,) is a legal signature
- func f(...int,) is a legal signature

Defer checking for correct use of "..." with last
paremeter type to type checker instead of parser.

R=rsc
CC=golang-dev
https://golang.org/cl/4973059
2011-09-06 11:48:05 -07:00
Robert Griesemer
c10679009a gofmt: indent multi-line signatures
There may be more fine-tuning down the line,
but this CL fixes the most pressing issue at
hand.

Also: gofmt -w src misc

Fixes #1524.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/4975053
2011-09-06 11:27:36 -07:00
Russ Cox
686181edfe url: handle ; in ParseQuery
Most web frameworks allow ; as a synonym for &,
following a recommendation in some versions of
the HTML specification.  Do the same.

Remove overuse of Split.

Move ParseQuery tests from package http to package url.

Fixes #2210.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4973062
2011-09-06 12:24:24 -04:00
Russ Cox
5ddf6255a1 gc: unify stack frame layout
allocparams + tempname + compactframe
all knew about how to place stack variables.

Now only compactframe, renamed to allocauto,
does the work.  Until the last minute, each PAUTO
variable is in its own space and has xoffset == 0.

This might break 5g.  I get failures in concurrent
code running under qemu and I can't tell whether
it's 5g's fault or qemu's.  We'll see what the real
ARM builders say.

R=ken2
CC=golang-dev
https://golang.org/cl/4973057
2011-09-06 10:24:21 -04:00
Alex Brainman
37f390aa20 os: use GetFileAttributesEx to implement Stat on windows
Fixes #2129.

R=rsc
CC=golang-dev
https://golang.org/cl/4934049
2011-09-06 09:59:08 +10:00
Russ Cox
919cb2ec7c gc: fix zero-length struct eval
Fixes #2232.

R=ken2
CC=golang-dev
https://golang.org/cl/4960054
2011-09-05 15:31:22 -04:00
Marcel van Lohuizen
d5e24b6975 exp/norm: performance improvements of quickSpan
- fixed performance bug that could lead to O(n^2) behavior
- performance improvement for ASCII case

R=r, r
CC=golang-dev
https://golang.org/cl/4956060
2011-09-05 19:09:20 +02:00
Joel Sing
c7f6f9f318 runtime: fix openbsd 386 raisesigpipe
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4950064
2011-09-05 13:05:57 -04:00
Mikio Hara
73d27dd5ba syscall: update routing message attributes handling, fix typo
R=fullung, golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4986041
2011-09-05 08:11:51 -04:00
Mike Rosset
8ddd66145e build: clear execute bit from Go files
R=golang-dev, rsc
CC=golang-dev, mike.rosset
https://golang.org/cl/4950062
2011-09-05 07:48:42 -04:00
Christopher Wedgwood
6cf61bb5b9 runtime: add test for multiple concurrent channel consumers
There was a time (in the past) when this wasn't robust.

R=rsc, dvyukov
CC=golang-dev
https://golang.org/cl/4965058
2011-09-05 07:40:50 -04:00
Andrew Gerrand
740805fdb1 misc/goplay: another template fix
Fixes #2219.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4950063
2011-09-05 15:03:41 +10:00
Andrew Gerrand
4e7250db12 gobuilder: ignore _test.go files when looking for docs, more logging
R=n13m3y3r
CC=golang-dev
https://golang.org/cl/4918050
2011-09-05 14:48:27 +10:00
Robert Hencke
1f523e2579 websocket: fix incorrect prints found by govet
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4963059
2011-09-05 10:56:39 +10:00
Andrew Gerrand
8ede0a67a2 misc/goplay: Fix template output
Fixes #2219.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4960052
2011-09-05 09:50:22 +10:00
Gustavo Niemeyer
c5670f1548 gofix: do not convert url in field names
There's some ambiguity in the U{url: url} case as it could be
both a map or a struct literal, but given context it's more
likely a struct, so U{url: url_} rather than U{url_: url_}.
At least that was the case for me.

R=golang-dev, rsc, adg
CC=golang-dev
https://golang.org/cl/4972052
2011-09-03 16:01:54 -03:00
Hector Chu
9b011500c0 runtime: implement exception handling on windows/amd64
Fixes #2194.

R=rsc, alex.brainman, vcc.163, jp
CC=golang-dev
https://golang.org/cl/4977044
2011-09-03 18:27:16 +10:00
Nigel Tao
2b6d3b498c exp/template/html: string replacement refactoring.
R=mikesamuel
CC=golang-dev
https://golang.org/cl/4968063
2011-09-03 10:30:05 +10:00
Russ Cox
9854fd2a0e gc: introduce temp = nod+tempname
R=ken2
CC=golang-dev
https://golang.org/cl/4967052
2011-09-02 15:35:16 -04:00
Russ Cox
c45c0c0c1d gc: zero stack-allocated slice backing arrays
Fixes Han-Wen's termite bug.

R=lvd
CC=golang-dev
https://golang.org/cl/4977052
2011-09-02 15:11:28 -04:00
Robert Griesemer
cd6f319a76 godoc: minor tweaks for app-engine use
- read search index files in groutine to avoid
  start-up failure on app engine because reading
  the files takes too long
- permit usage of search index files and indexer
- minor cosmetic cleanups

R=dsymonds
CC=golang-dev
https://golang.org/cl/4952050
2011-09-02 10:07:29 -07:00
Marcel van Lohuizen
2517143957 exp/norm: added Reader and Writer and bug fixes to support these.
Needed to ensure that finding the last boundary does not result in O(n^2)-like behavior.
Now prevents lookbacks beyond 31 characters across the board (starter + 30 non-starters).
composition.go:
- maxCombiningCharacters now means exactly that.
- Bug fix.
- Small performance improvement/ made code consistent with other code.
forminfo.go:
- Bug fix: ccc needs to be 0 for inert runes.
normalize.go:
- A few bug fixes.
- Limit the amount of combining characters considered in FirstBoundary.
- Ditto for LastBoundary.
- Changed semantics of LastBoundary to not consider trailing illegal runes a boundary
  as long as adding bytes might still make them legal.
trie.go:
- As utf8.UTFMax is 4, we should treat UTF-8 encodings of size 5 or greater as illegal.
  This has no impact on the normalization process, but it prevents buffer overflows
  where we expect at most UTFMax bytes.

R=r
CC=golang-dev
https://golang.org/cl/4963041
2011-09-02 12:39:35 +02:00
Rob Pike
b349cd2b0a fmt/fmt_test.go: count mallocs in a few more cases.
Interesting that Fprintf can do zero mallocs.
(Sprintf must allocate the returned string.)

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4977049
2011-09-02 11:47:15 +10:00
Rob Pike
2cf66c1d94 template: fix deadlock.
No need for lexInsideAction to loop.
Fixes #2217.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4963054
2011-09-02 11:00:46 +10:00
Mike Samuel
5edeef214d exp/template/html: non-semantics changing tweaks to js{,_test}.go
R=nigeltao
CC=golang-dev
https://golang.org/cl/4962049
2011-09-02 10:28:00 +10:00
Andrew Gerrand
3fa7226de7 goinstall: better usage message
Fixes #2185.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4967046
2011-09-02 10:07:47 +10:00
Dmitriy Vyukov
ea23ba3e2d sync/atomic: add LoadUintptr
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4985041
2011-09-01 15:17:25 -04:00
Russ Cox
60d47101aa gc: fix label recursion bugs
Was keeping a pointer to the labeled statement in n->right,
which meant that generic traversals of the tree visited it twice.
That combined with aggressive flattening of the block
structure when possible during parsing meant that
the kinds of label: code label: code label: code sequences
generated by yacc were giving the recursion 2ⁿ paths
through the program.

Fixes #2212.

R=lvd
CC=golang-dev
https://golang.org/cl/4960050
2011-09-01 13:44:46 -04:00
Dave Cheney
ae502c4e02 libmach: fix incorrect use of memset
Fixes #2213.

R=rsc
CC=golang-dev
https://golang.org/cl/4975047
2011-09-01 13:43:03 -04:00
Nigel Tao
b0bd77f8fb tag weekly.2011-09-01
R=r
CC=golang-dev
https://golang.org/cl/4968057
2011-09-01 17:30:41 +10:00
Mike Rosset
420934348d sudo.bash: print error/exit if problem with /usr/local/bin
When installing profiling tools on Mac OS X print
message if there is a problem with /usr/local/bin

Fixes #2209.

R=golang-dev, r, adg
CC=golang-dev, mike.rosset
https://golang.org/cl/4950057
2011-09-01 17:24:32 +10:00
Nigel Tao
ca64a37d9d weekly.2011-09-01
R=r, adg
CC=golang-dev
https://golang.org/cl/4975046
2011-09-01 17:08:53 +10:00
Mike Samuel
0253c688d0 exp/template/html: Implement grammar for JS.
This transitions into a JS state when entering any attribute whose
name starts with "on".

It does not yet enter a JS on entry into a <script> element as script
element handling is introduced in another CL.

R=nigeltao
CC=golang-dev
https://golang.org/cl/4968052
2011-09-01 12:03:40 +10:00
Robert Griesemer
ffe70eaa3c go spec: update section on Implementation Differences
R=rsc, r
CC=golang-dev
https://golang.org/cl/4977046
2011-08-31 15:16:51 -07:00
Mikio Hara
7c203b8bc1 unsafe: update doc
changeset: 8812:3fb3e88d5aa8
gc: unsafe.Alignof, unsafe.Offsetof, unsafe.Sizeof now return uintptr

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4951051
2011-08-31 17:59:35 -04:00
Russ Cox
2cc4a54dec flag: add Parsed, restore Usage
R=r
CC=golang-dev
https://golang.org/cl/4973050
2011-08-31 17:38:41 -04:00
Robert Griesemer
3f1269ff1e godoc: more index size reduction
- KindRuns don't need to repeat SpotKind,
  it is stored in each Spot
- removed extra indirection from FileRuns
  to KindRuns
- slight reduction of written index size
  (~500KB)

R=rsc
CC=golang-dev
https://golang.org/cl/4969052
2011-08-31 14:01:58 -07:00
Dmitriy Vyukov
a31f317a99 rpc: add benchmark for async rpc calls
Also makes sync benchmark concurrent.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4911043
2011-08-31 13:07:25 -04:00
Mikio Hara
0c6581cc25 syscall: handle routing entry in ParseRoutingSockaddr on BSD variants
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4972053
2011-08-31 13:05:49 -04:00
Russ Cox
0c9ea63b3b cgo: explain how to free something
R=golang-dev, n13m3y3r, r
CC=golang-dev
https://golang.org/cl/4958053
2011-08-31 08:17:01 -04:00
Russ Cox
335da67e00 gc: make static initialization more static
Does as much as possible in data layout instead
of during the init function.

Handles var x = y; var y = z as a special case too,
because it is so prevalent in package unicode
(var Greek = _Greek; var _Greek = []...).

Introduces InitPlan description of initialized data
so that it can be traversed multiple times (for example,
in the copy handler).

Cuts package unicode's init function size by 8x.
All that remains there is map initialization, which
is on the chopping block too.

Fixes sinit.go test case.

Aggregate DATA instructions at end of object file.

Checkpoint.  More to come.

R=ken2
CC=golang-dev
https://golang.org/cl/4969051
2011-08-31 07:37:14 -04:00
Russ Cox
5f40c5b384 runtime: handle string + char literals in goc2c
My string literal was being rewritten from
"runtime.SysReserve(%p, %D) = error %d"
to
"runtime.SysReserve ( %p , %D ) = error %d"

R=iant
CC=golang-dev
https://golang.org/cl/4972051
2011-08-31 07:11:31 -04:00