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

1913 Commits

Author SHA1 Message Date
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
Russ Cox
e1e829b786 runtime: fix freebsd/386 mmap
The runtime only passes 32 bits of file offset,
but the kernel wants 64 bits, so have to add
zeros explicitly in a copy of the arguments.

R=adg, Martin Neubauer
CC=golang-dev
https://golang.org/cl/1933044
2010-08-24 13:04:02 -04:00
Scott Lawrence
668f05aaf1 os: make return type of FileInfo.Permission() consistent with related functions
(uint32 rather than int)

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1958048
2010-08-24 10:38:52 +10:00
Russ Cox
d0459447fa http: doc nit
R=r
CC=golang-dev
https://golang.org/cl/2013043
2010-08-23 18:06:28 -04:00
Kai Backman
534dbc738f arm: fix build, regenerate syscall files
R=r
CC=golang-dev
https://golang.org/cl/1952046
2010-08-23 13:25:14 +03:00
Andrew Gerrand
4642708984 io: prevent ReadAtLeast spinloop if min > len(buf)
R=r, heresy.mc
CC=golang-dev
https://golang.org/cl/2017042
2010-08-23 12:04:15 +10:00
Scott Lawrence
d125faeed0 net/ipsock.go: fix error checking bug
Check oserr, not err for non-nil (err is never changed)

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1965042
2010-08-22 22:12:56 +10:00
Scott Lawrence
e5518feaf8 http: fix typo in http.Request documentation
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/2004044
2010-08-22 14:44:00 +10:00
Robert Griesemer
dbbe32ee53 fix build
Also: Copyright notices only need the year the file was created.

R=rsc
CC=golang-dev, krasin
https://golang.org/cl/2021041
2010-08-20 11:20:12 -07:00
Ivan Krasin
5a0274399a syscall: regenerate syscall/z* files for linux/386, linux/amd64
DISTRIB_DESCRIPTION="Ubuntu 10.04 LTS"

Use <sys/user.h> instead of <linux/user.h>
See http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00834.html for more details.

R=imkrasin, rsc
CC=golang-dev
https://golang.org/cl/1957041
2010-08-20 09:12:21 -04:00
Robert Griesemer
1a667f52d8 go/ast Fprint: handle cycles in AST
Augmented ASTs may contain cycles. Keep
track of already printed objects and refer
to them with a line number instead of
printing them again.

R=rsc
CC=golang-dev
https://golang.org/cl/1998042
2010-08-19 16:03:02 -07:00
Rob Pike
9d3eb29a29 mime: delete unnecessary constant conversions.
R=rsc
CC=golang-dev
https://golang.org/cl/1984043
2010-08-20 07:42:02 +10:00
Adam Langley
4abfc4fff0 crypto/ocsp: add missing Makefile
R=rsc
CC=golang-dev
https://golang.org/cl/2018041
2010-08-19 16:33:58 -04:00
Robert Griesemer
3112bb0727 go/ast, gofmt: facility for printing AST nodes
go/ast: implement Fprint and print functions to
print AST nodes

gofmt: print AST nodes by setting -ast flag

R=rsc, r
CC=golang-dev
https://golang.org/cl/1981044
2010-08-19 09:39:35 -07:00
Eric Clark
95fa16a892 cgo: add C.GoStringN
Function to create a GoString with a known length so it can contain NUL
bytes anywhere in the string. Some C libraries have strings like this.

R=rsc
CC=golang-dev
https://golang.org/cl/2007042
2010-08-18 22:29:05 -04:00
Rob Pike
6e76298744 fmt: add sentence about return values to docs for Printf etc.
R=rsc, gri
CC=golang-dev
https://golang.org/cl/1952045
2010-08-19 12:07:24 +10:00
Russ Cox
da392d9136 build: no required environment variables
R=adg, r, PeterGo
CC=golang-dev
https://golang.org/cl/1942044
2010-08-18 10:08:49 -04:00
Russ Cox
3bf656327e http: parse query string always, not just in GET
Fixes #985.

R=dsymonds, dsymonds1
CC=golang-dev
https://golang.org/cl/1963044
2010-08-17 20:01:50 -04:00
Russ Cox
8dc4c0b45f jsonrpc: use error: null for success, not error: ""
handle missing id in server.

Fixes #1017.
Fixes #1018.

R=r
CC=golang-dev
https://golang.org/cl/1986044
2010-08-17 18:55:42 -04:00
Luuk van Dijk
340f28deab runtime: correct line numbers for .goc files.
Linenumbers start at 1.
Also call goc2c with an absolute pathi to preserve debug info.

R=rsc, r, ken2
CC=golang-dev
https://golang.org/cl/1954049
2010-08-18 00:16:05 +02:00
Robert Griesemer
a48b35e961 reflect: allow PtrValue.PointTo(nil)
(Argument: For any *PtrValue p, it should
always be possible to do: p.PointTo(p.Elem()),
even if p.Elem() is nil.)

Fixes #1028.

R=rsc
CC=golang-dev, r
https://golang.org/cl/1938044
2010-08-17 15:12:28 -07:00
Roger Peppe
781c54d06c Fix template package so that data items
preceded by white space parse correctly.

R=r
CC=golang-dev
https://golang.org/cl/2010041
2010-08-17 23:13:07 +10:00
Roger Peppe
e5aad81930 Remove relic "once" import from time/zoneinfo.go
R=rsc, r
CC=golang-dev
https://golang.org/cl/2005042
2010-08-17 23:08:19 +10:00
Robert Griesemer
fa80a73bee gofmt: do not modify multi-line string literals
tabwriter: Introduce a new flag StripEscape to control
if tabwriter.Escape chars should be stripped or passed
through unchanged.

go/printer: Don't modify tabwriter.Escape'd text. This
involved a new implementation of the internal trimmer
object.

Does not affect formatting of any existing code under
$GOROOT/src and $GOROOT/misc.

Fixes #1030.

R=rsc
CC=golang-dev
https://golang.org/cl/1943045
2010-08-16 21:37:10 -07:00
Alex Brainman
b243d57eb4 os: preserve "=C:" like env variables in env block on windows and bug fix in Clearenv()
R=rsc
CC=golang-dev
https://golang.org/cl/1995043
2010-08-17 11:38:26 +10:00
Rob Pike
30ab8cf792 template: retain leading space if the line is not an action.
R=rsc
CC=golang-dev
https://golang.org/cl/1985042
2010-08-17 09:44:16 +10:00
Rob Pike
316961c172 fmt/print: remove a TODO regarding printing renamed byte slices.
the solution must work around a weakness in the reflection library:
there is no way to do type-safe conversions under reflection.

R=rsc
CC=golang-dev
https://golang.org/cl/2000041
2010-08-17 08:34:40 +10:00
Rob Pike
69fe3dd754 regexp: grow slices dynamically in the 'All' routines.
R=rsc
CC=golang-dev
https://golang.org/cl/1953044
2010-08-16 15:17:34 -07:00
Mikkel Krautz
c47123d07b crypto/tls: client certificate support.
This changeset implements client certificate support in crypto/tls
for both handshake_server.go and handshake_client.go

The updated server implementation sends an empty CertificateAuthorities
field in the CertificateRequest, thus allowing clients to send any
certificates they wish. Likewise, the client code will only respond
with its certificate when the server requests a certificate with this
field empty.

R=agl, rsc, agl1
CC=golang-dev
https://golang.org/cl/1975042
2010-08-16 11:22:22 -04:00
Nigel Tao
07053ac6e4 image/png: support 16-bit color.
R=r, mpl
CC=golang-dev
https://golang.org/cl/1944043
2010-08-16 23:33:20 +10:00
Rob Pike
b21611b963 fmt/print: give %p priority, analogous to %T
Fixes #1024.

R=rsc
CC=golang-dev
https://golang.org/cl/1961042
2010-08-14 07:37:03 +10:00
Robert Griesemer
1f9dfa294f go AST: First step towards augmenting AST with full type information.
- change ast.Ident back to contain the name and adjust all dependent code
- identifier object information will be added again through an optional
  typechecker phase (in the works).
- remove tracking of scopes in parser - it's easier to do this in a separate
  phase (in the works)
- in godoc, generate popup info table directly instead of through a formatter
  for simpler data flow (at the expense of a little bit more code)

Runs all tests.

As a result of this change, the currently shown popup information
(const, var, type, func, followed by identifier name) will not be
shown anymore temporarily.

R=rsc
CC=golang-dev
https://golang.org/cl/1994041
2010-08-13 10:42:18 -07:00
Rob Pike
be97fa4c79 fmt/print: honor Formatter in Print, Println.
Rearrange code to clarify handling of %T, Formatter, GoStringer, and Stringer.

R=rsc
CC=golang-dev
https://golang.org/cl/1973043
2010-08-13 17:26:32 +10:00
Russ Cox
e2bde5cf9b runtime: fix another stack split bug
Makes godoc --http=:1234 not crash on linux/amd64.

R=r
CC=golang-dev
https://golang.org/cl/1975044
2010-08-12 23:26:54 -07:00
Alex Brainman
79c62aaa99 os: implement env using native windows api.
Fixes #864.

R=rsc
CC=golang-dev
https://golang.org/cl/1975043
2010-08-13 14:29:23 +10:00
Rob Pike
a621a7ef74 delete pkg/once
R=rsc
CC=golang-dev
https://golang.org/cl/1995041
2010-08-13 12:53:27 +10:00
Robert Griesemer
10ae88f4ab partial correction for CL 1983043: fix various godoc-related regexp calls
R=rsc
CC=golang-dev
https://golang.org/cl/1987041
2010-08-12 11:28:50 -07:00
Rob Pike
079a117469 regexp: delete the deprecated methods and tests.
R=golang-dev
CC=golang-dev
https://golang.org/cl/1956044
2010-08-12 17:16:37 +10:00
Mikio Hara
e41987c821 net: make IPv6 String method standards compliant
draft-ietf-6man-text-addr-representation-07 will introduce
a canonical textual representation format for IPv6 address.

R=rsc
CC=golang-dev
https://golang.org/cl/1856047
2010-08-12 00:03:01 -07:00
Rob Pike
d31ee536e8 update the tree to use the new regexp methods
R=rsc
CC=golang-dev
https://golang.org/cl/1983043
2010-08-12 16:48:41 +10:00
Rob Pike
4fb5883253 testing: delete the less useful methods in the testing regexp package
We can add them back using the new naming scheme should it become important.

R=rsc
CC=golang-dev
https://golang.org/cl/1968042
2010-08-12 16:47:52 +10:00
Russ Cox
1d77ff5b6b 6g, 8g: handle slice by sub-word-sized index (uint8, int8, uint16, int16)
R=ken2
CC=golang-dev
https://golang.org/cl/1960042
2010-08-11 22:27:47 -07:00
Rob Pike
6610d79eda regexp: new regularized methods for matching.
The previous set was spotty, incomplete, and confusing.
This CL proposes a regular, clean set with clearer names.
It's also complete.  Many existing methods will be deprecated,
but not in this CL.  Ditto for the tests.

R=rsc, gri
CC=golang-dev, rog
https://golang.org/cl/1946041
2010-08-12 14:41:52 +10:00
Robert Griesemer
d75074974a gofmt: if a semicolon is found unexpectedly, report detailed cause
go/scanner: return information on semicolon (real or inserted) when
	    found in source
go/parser:  better error message when a semicolon is found unexpectedly

For instance, if an unexpected semicolon is found that was automatically
inserted, the parser error message is now:

    "expected '}', found newline"

Fixes #1006.

R=rsc
CC=golang-dev
https://golang.org/cl/1936044
2010-08-11 21:25:52 -07:00
Rob Pike
32a81fa8bb sync.once: document that Do cannot be invoked recursively.
documentation change only.

R=rsc
CC=golang-dev
https://golang.org/cl/1964043
2010-08-12 12:59:37 +10:00
Kyle Consalus
8fcdc6a1e2 Small performance improvements to the HTML tokenizer based on your 'TODO's.
R=nigeltao_golang
CC=golang-dev
https://golang.org/cl/1941042
2010-08-12 09:45:34 +10:00
Scott Lawrence
bca3151042 template: added ParseFile method for template.Template
Fixes #971.

Parse/ParseFile methods of Template now match template.Parse and .ParseFile methods.
Also made tests being run on Parse and ParseFile be run on Template.ParseFile as well.

R=r
CC=golang-dev
https://golang.org/cl/1741059
2010-08-11 14:04:03 +10:00
Nigel Tao
753c9b5710 exp/draw: fix drawRGBA when x0 > x1 and we have to draw right-to-left.
R=r
CC=golang-dev
https://golang.org/cl/1940042
2010-08-11 10:10:17 +10:00
Rob Pike
2bf8741c0f rpc: catch errors from ReadResponseBody.
Fixes #1014.

R=rsc
CC=golang-dev
https://golang.org/cl/1941041
2010-08-10 16:55:02 -07:00
Robert Griesemer
b0d0de59a1 fix build: update exp/draw/draw_test.go
R=nigeltao
CC=golang-dev
https://golang.org/cl/1962041
2010-08-10 10:11:28 -07:00
Robert Griesemer
9714c2208b asn1: remove superfluous if's, unused function
R=adg
CC=golang-dev
https://golang.org/cl/1743059
2010-08-10 09:50:21 -07:00
Nigel Tao
7d3173fc1d exp/draw: remove the Color, Point and Rectangle types.
image: introduce Transparent and Opaque.

R=r
CC=golang-dev
https://golang.org/cl/1947042
2010-08-10 22:05:11 +10:00
Nigel Tao
d4e23b7e37 image: fix comment typo.
R=adg
CC=golang-dev
https://golang.org/cl/1952041
2010-08-10 17:56:57 +10:00
Nigel Tao
b50a3d95e1 image: change image representation from slice-of-slices to linear buffer,
stride and rect.

R=r
CC=golang-dev, rog
https://golang.org/cl/1849041
2010-08-10 16:34:57 +10:00
Nigel Tao
56b989f1b9 First cut of an HTML tokenizer (and eventually a parser).
R=r, rsc, gri, rsc1
CC=golang-dev
https://golang.org/cl/1814044
2010-08-10 16:08:21 +10:00
Nigel Tao
96d7c8d4a8 exp/draw/x11: temporarily workaround compiler bug 1011.
R=r
CC=golang-dev
https://golang.org/cl/1951041
2010-08-10 15:53:19 +10:00
Mathieu Lonjaret
90a6c91890 png: grayscale support.
R=nigeltao_golang, r
CC=golang-dev
https://golang.org/cl/1897049
2010-08-10 12:25:08 +10:00
Nigel Tao
5eb35e4247 image: replace Width and Height by Bounds, and introduce the Point and
Rect types.

The actual image representation is unchanged. A future change will
replace the {[][]color} with {[]color, stride int, r Rectangle} and
possibly a clip region.

The draw.Color, draw.Point and draw.Rect types will be removed in a
future change. Trying to do it in this one polluted the diff with
trivia.

R=r, rsc
CC=golang-dev
https://golang.org/cl/1918047
2010-08-10 12:08:52 +10:00
Rob Pike
46db2e3c25 regexp: document that backslashes are the escape character.
Fixes #1013.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/1938041
2010-08-09 15:11:02 -07:00
Evan Shaw
28a0971caf big: Several fixes to bitwise functions
Fixed:
* SetString calls in bitwise tests
* Aliasing problem with self bitwise test
* One test case that was just flat out wrong
* Slice panics in nat.or and nat.xor
* Aliasing problems in Int.And, Int.AndNot, Int.Or, Int.Xor

Fixes #1007.

R=gri
CC=golang-dev
https://golang.org/cl/1895049
2010-08-09 10:21:54 -07:00
Nicholas Waples
e2c7e53dcf asn1 incorrectly encoded signed integers. When determining the
encoded length it was not taking into account the sign bit.

Fixes #997.

R=agl1, gri
CC=golang-dev
https://golang.org/cl/1870047
2010-08-09 10:25:54 -04:00
Alex Brainman
bc4a9caa41 runtime: free memory returned by windows GetEnvironmentStrings
R=golang-dev
CC=golang-dev
https://golang.org/cl/1917048
2010-08-09 11:30:33 +10:00
Alex Brainman
dbef0711d4 os: fix ForkExec() handling of envv == nil
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1913047
2010-08-09 11:21:20 +10:00
Nigel Tao
893fdbbe5d image: introduce Decode and RegisterFormat.
R=r, rsc
CC=golang-dev
https://golang.org/cl/1849054
2010-08-09 10:44:38 +10:00
Russ Cox
844a86317d net/textproto: new package, with example net/dict
Generic text-based network protcol library for SMTP-like protocols.
HTTP and NNTP should be changed to use this package,
and I expect that SMTP and POP3 will be able to use it too.

R=cemeyer, nigeltao_golang, r
CC=golang-dev, petar-m
https://golang.org/cl/889041
2010-08-06 17:37:45 -07:00
Rob Pike
18063d4686 fmt.Scan: empty strings are errors
Fixes #1002.

R=rsc
CC=golang-dev
https://golang.org/cl/1882046
2010-08-07 10:02:04 +10:00
Kai Backman
df88fc6109 arm: bugfixes and syscall
- integer divide by zero raises panic
- float comparisons involving NaNs work
- syscall interface actually handles return
  values and errno correctly.

R=rsc, bradfitzpatrick
CC=golang-dev
https://golang.org/cl/1847047
2010-08-06 16:57:49 -07:00
Charles L. Dorian
c8c2bdbc59 math: fix amd64 Hypot.
Underflow/overflow tests for exp_amd64.s

Fixes #957.

R=rsc
CC=golang-dev
https://golang.org/cl/1817041
2010-08-06 16:50:48 -07:00
Roger Peppe
b92db49c26 encoding/binary: add complex
R=rsc
CC=golang-dev
https://golang.org/cl/1879043
2010-08-06 16:44:38 -07:00
Anschel Schaffer-Cohen
8055f47029 exp/iterable: add UintArray
all other basic types seem to be represented.

R=rsc
CC=golang-dev
https://golang.org/cl/1919042
2010-08-06 16:39:18 -07:00
Alex Brainman
e96b6835a9 fix windows build
R=rsc
CC=golang-dev
https://golang.org/cl/1890045
2010-08-06 09:42:55 +10:00
Rob Pike
c78be462a0 once: replace all uses of package once with sync.Once.
package once remains for now; will be deleted after next release.

R=golang-dev, brainman
CC=golang-dev
https://golang.org/cl/1914046
2010-08-06 06:14:41 +10:00
Christian Himpel
75f6a0c759 bytes: add IndexRune, FieldsFunc and To*Special
Basically these functions are implemented the same way as the
corresponding functions in the strings package.  Test functions
are implemented for IndexRune and FieldsFunc.

Additionally two typos are fixed in packages bytes and strings.

R=r
CC=golang-dev
https://golang.org/cl/1696062
2010-08-05 23:11:06 +10:00
Rob Pike
895c5db6df sync: add sync.Once, a proposed replacement for package once.
This implementation is simpler and more useful, since it can work
with methods.

R=rsc
CC=golang-dev
https://golang.org/cl/1864051
2010-08-05 13:31:10 +10:00
Alex Brainman
8251e72aea path: fix comment for Split()
R=golang-dev
CC=golang-dev
https://golang.org/cl/1905050
2010-08-05 11:43:53 +10:00
Robert Griesemer
d9e2631b53 go/parser.ParseFiles: don't override error (to nil) if there is one
Also: Return first instead of last error as that seems more useful.

R=r
CC=golang-dev
https://golang.org/cl/1897050
2010-08-04 18:02:43 -07:00
Robert Griesemer
ed8c23149f fix build: literal types cannot be parenthesized anymore
R=rsc
CC=golang-dev
https://golang.org/cl/1849055
2010-08-04 17:58:56 -07:00
Russ Cox
e473f42b2d amd64: use segment memory for thread-local storage
Returns R14 and R15 to the available register pool.
Plays more nicely with ELF ABI C code.
In particular, our signal handlers will no longer crash
when a signal arrives during execution of a cgo C call.

Fixes #720.

R=ken2, r
CC=golang-dev
https://golang.org/cl/1847051
2010-08-04 17:50:22 -07:00
Robert Griesemer
03f42934c1 gofmt/go/parser: strengthen syntax checks
- don't allow parenthesized receiver base types or anonymous fields
- fixed a couple of other omissions
- adjusted gofmt test script
- removed several TODOs

R=rsc
CC=golang-dev
https://golang.org/cl/1897043
2010-08-04 17:21:02 -07:00
Scott Lawrence
99aab8bacb bytes: added test case for explode with blank string.
Tests for the equivalent of the strings.explode("") panic bug (issue 980).

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1850052
2010-08-04 13:33:24 +10:00
Anthony Martin
2db4c3d779 json: object members must have a value
R=rsc
CC=golang-dev
https://golang.org/cl/1847050
2010-08-03 17:05:00 -07:00
Nigel Tao
27e249049e bufio: introduce Peek.
I'll leave whether or not this obsoletes UnreadByte for a future CL.

R=r, rsc
CC=golang-dev
https://golang.org/cl/1912042
2010-08-04 09:44:02 +10:00