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

3964 Commits

Author SHA1 Message Date
Russ Cox
66b3fabf17 exp/regexp: add MustCompilePOSIX
R=r
CC=golang-dev
https://golang.org/cl/4962060
2011-09-08 15:00:49 -04:00
Russ Cox
21e671dee6 exp/regexp: add CompilePOSIX, more tests
R=r
CC=golang-dev
https://golang.org/cl/4967060
2011-09-08 14:49:51 -04:00
Russ Cox
177dca77e1 exp/regexp/syntax: import all RE2 parse tests + fix bugs
R=r
CC=golang-dev
https://golang.org/cl/4952061
2011-09-08 14:18:02 -04:00
Mikio Hara
940932056e syscall: add route flags for linux
R=golang-dev
CC=golang-dev
https://golang.org/cl/4956069
2011-09-08 13:59:34 -04:00
Russ Cox
7df4322114 exp/regexp: leftmost-longest matching
Not exposed in the API yet, but passes tests.

R=r
CC=golang-dev
https://golang.org/cl/4967059
2011-09-08 10:09:25 -04:00
Dmitriy Vyukov
cf0d8c0941 sync/atomic: add 64-bit Load and Store
R=rsc
CC=golang-dev
https://golang.org/cl/4977054
2011-09-08 11:58:48 +04:00
Jaroslavas Počepko
571d3f50d3 os: os.RemoveAll has to check for 2 error codes on Windows. ENOENT is not enough.
os.Lstat can return ENOTDIR as well.

R=golang-dev, r, alex.brainman
CC=golang-dev, rsc
https://golang.org/cl/4984051
2011-09-08 17:27:41 +10:00
Paul Lalonde
bb8bbb2908 Windows: net, syscall: implement SetsockoptIPMReq(), move to winsock v2.2 for multicast support.
I don't know the protocol regarding the zsyscall files which appear to
be hand-generated, so I've re-done them and added them to the change.

R=rsc, alex.brainman, nigeltao
CC=golang-dev
https://golang.org/cl/4975060
2011-09-08 16:32:40 +10:00
Alex Brainman
794489ecf3 sync/atomic: do not run TestStoreLoadSeq for too long (fix windows builder)
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4962057
2011-09-08 13:31:40 +10:00
Robert Griesemer
49bcc88f79 undo CL 4964067 / 661cb84cc6f0
API change. Needs further reflection.

««« original CL description
path/filepath: Simplify Walk interface

The last argument of filepath.Walk was removed, and the Visitor
interface now contains an Error method that is called on errors.

Fixes #2237.

R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/4964067

»»»

R=r
CC=golang-dev
https://golang.org/cl/4974065
2011-09-07 15:19:53 -07:00
Gustavo Niemeyer
e5c20dc270 path/filepath: Simplify Walk interface
The last argument of filepath.Walk was removed, and the Visitor
interface now contains an Error method that is called on errors.

Fixes #2237.

R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/4964067
2011-09-07 14:49:48 -07:00
Russ Cox
ef01ebf403 net: sync CIDRMask code, doc
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4961069
2011-09-07 15:50:07 -04:00
Russ Cox
08ae1a5a23 exp/regexp: bug fixes and RE2 tests
Also add exp/regexp to build (forgot before).

At this point I am very confident in exp/regexp's
behavior.  It should be usable as a drop-in
replacement for regexp now.

Later CLs could introduce a CompilePOSIX
to get at traditional POSIX ``extended regular expressions''
as in egrep and also an re.MatchLongest method to
change the matching mode to leftmost longest
instead of leftmost first.  On the other hand, I expect
very few people to use either.

R=r, r, gustavo
CC=golang-dev
https://golang.org/cl/4990041
2011-09-07 15:48:06 -04:00
Mikio Hara
a2c2c87439 net: ParseCIDR returns IPNet instead of IPMask
Note that this CL will break your existing code which uses
ParseCIDR.

This CL changes ParseCIDR("172.16.253.121/28") to return
the IP address "172.16.253.121", the network implied by the
network number "172.16.253.112" and mask "255.255.255.240".

R=rsc, borman
CC=golang-dev
https://golang.org/cl/4749043
2011-09-07 14:01:12 -04:00
Ziad Hatahet
21e49cbb2d sort: use heapsort to bail out quicksort
See http://research.swtch.com/2008/01/killing-quicksort.html for more
info.
Fixes #467.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4591051
2011-09-07 13:54:33 -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
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
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
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
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
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
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
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
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
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
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
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
Russ Cox
4304de6e0c runtime: make arm work on Ubuntu Natty qemu
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4963050
2011-08-31 07:02:46 -04:00
Gustavo Niemeyer
0cfa0fe242 cgo: note that CString result must be freed
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4968054
2011-08-31 06:44:55 -03:00
Jaroslavas Počepko
95429d82f1 exp/wingui: made compatible with windows/amd64
R=golang-dev, alex.brainman
CC=golang-dev, vcc.163
https://golang.org/cl/4974041
2011-08-31 15:39:50 +10:00
Brad Fitzpatrick
7349d21f8e http: add file protocol transport
Off by default (security risk), but users can
wire it up if desired.

Fixes #2113

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/4959049
2011-08-30 21:47:41 -07:00
Jaroslavas Počepko
68a04dce93 image: add PalettedImage interface, and make image/png recognize it.
R=golang-dev, rsc, bradfitz, nigeltao
CC=golang-dev
https://golang.org/cl/4956046
2011-08-31 08:27:00 +10:00
Gustavo Niemeyer
e1cfb6f3a9 cgo: fix GoBytes
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4956051
2011-08-30 14:33:16 -03:00
Jaroslavas Počepko
c586b5b96b runtime: windows/amd64 callbacks fixed and syscall fixed to allow using it in callbacks
Fixes #2178.
Patch2: Fixed allocating shadow space for stdcall (must be at least 32 bytes in any case)
Patch3: Made allocated chunk smaller.
Patch4: Typo
Patch5: suppress linktime warning "runtime.callbackasm: nosplit stack overflow"
Patch6: added testcase src/pkg/syscall/callback_windows_test.go
Patch7: weakly related files moved to https://golang.org/cl/4965050 https://golang.org/cl/4974041 https://golang.org/cl/4965051
Patch8: reflect changes https://golang.org/cl/4926042/
Patch9: reflect comments

R=golang-dev, alex.brainman, vcc.163
CC=golang-dev, hectorchu
https://golang.org/cl/4958042
2011-08-30 22:02:02 +10:00