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

5158 Commits

Author SHA1 Message Date
Robert Griesemer
a6820b65cb gofmt: don't attempt certain illegal rewrites
(e.g.: echo 'package main' | gofmt -r 'x->7'
cannot change the package name to 7)

R=rsc
CC=golang-dev
https://golang.org/cl/3913041
2011-01-07 15:04:41 -08:00
Rob Pike
f383062e01 time.NewTicker: panic for intervals <= 0.
Not absolutely certain it's right to do this, but since there's
no error value coming back, it seems reasonable.

Fixes #1392.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3896042
2011-01-07 14:41:46 -08:00
Rob Pike
353fd1014c bytes.Buffer: Fix bug in UnreadByte.
Error check was inverted.

Fixes #1396.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3851042
2011-01-07 14:41:33 -08:00
Robert Griesemer
9d634e50c7 gofmt: rewriter matches apply to expressions only
Fixes #1384.

R=rsc
CC=golang-dev
https://golang.org/cl/3912041
2011-01-07 13:33:29 -08:00
Adam Langley
ee58cc799e crypto/block: mark as deprecated.
R=rsc
CC=golang-dev
https://golang.org/cl/3909041
2011-01-07 16:17:47 -05:00
Ian Lance Taylor
1b2d5b4c93 ld: Permit an ELF symbol to be exported in the dynamic symbol table.
This permits exporting crosscall2 from the runtime/cgo
package.

R=rsc
CC=golang-dev
https://golang.org/cl/3885041
2011-01-06 16:37:05 -08:00
Russ Cox
02327a72d7 cgo: disallow use of C.errno
It's incorrect, and it causes cryptic linker errors.

Fixes #1360.

R=r, r2
CC=golang-dev
https://golang.org/cl/3880041
2011-01-06 15:15:31 -05:00
Russ Cox
c1fbe589a9 Make.pkg: use installed runtime.h for cgo
Fixes #1381.

R=r, r2
CC=golang-dev
https://golang.org/cl/3775050
2011-01-06 15:15:22 -05:00
Anthony Martin
db89e19d26 runtime/cgo: fix stackguard on FreeBSD/amd64
A cursory reading of the cgo code suggests this
should be necessary, though I don't have access
to a FreeBSD machine for testing.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3746047
2011-01-06 11:36:47 -05:00
Russ Cox
2281ca169c gc: fix &^=
Fixes #1394.

R=ken2
CC=golang-dev
https://golang.org/cl/3879041
2011-01-06 11:21:18 -05:00
Russ Cox
a46102d209 crypto/cipher: make NewCBCEncrypter return BlockMode
Fixes #1389.

R=agl1
CC=golang-dev
https://golang.org/cl/3827043
2011-01-06 11:21:04 -05:00
Kyle Consalus
754f0402c3 Made format string handling more efficient.
R=rsc, r, r2
CC=golang-dev
https://golang.org/cl/3421042
2011-01-05 11:42:35 -08:00
Russ Cox
0f26608ebc io: fix Copyn EOF handling
Fixes #1383.

R=r
CC=golang-dev
https://golang.org/cl/3821044
2011-01-05 14:35:13 -05:00
Russ Cox
189d4ff776 syscall: correct Linux Splice definition
Fixes #1376.

R=r
CC=golang-dev
https://golang.org/cl/3869042
2011-01-05 14:35:07 -05:00
Kyle Lemons
ddc2710d69 goinstall: add -clean flag
R=adg, rsc
CC=golang-dev
https://golang.org/cl/3821042
2011-01-05 14:34:59 -05:00
Anthony Martin
94df1a067c gc: return constant floats for parts of complex constants
Fixes #1369.

R=rsc
CC=golang-dev
https://golang.org/cl/3731046
2011-01-05 13:12:30 -05:00
Rob Pike
c0332fc93f fmt: normalize processing of format string
The old loop was a bit odd; change it to be more regular.
This also enables a diagnostic for Printf("%", 3): %!(NOVERB)

R=rsc, Kyle C
CC=golang-dev
https://golang.org/cl/3749044
2011-01-05 10:11:34 -08:00
Brad Fitzpatrick
d71d08af5a http: permit empty Reason-Phrase in response Status-Line
Fixes #1388.

R=rsc
CC=golang-dev
https://golang.org/cl/3749043
2011-01-05 13:09:38 -05:00
Robert Griesemer
4a7d1f2061 go/ast: correct Pos/End ranges for field lists
R=rsc
CC=golang-dev
https://golang.org/cl/3797045
2011-01-05 10:08:39 -08:00
Rob Pike
d84317ba58 gob: generate a better error message in one confusing place
(with maybe more to come) by printing a human-readable
representation of a remote type.

R=rsc
CC=golang-dev
https://golang.org/cl/3802045
2011-01-05 09:28:47 -08:00
Ian Lance Taylor
e9c4f09985 syscall: Make Access second argument consistently uint32.
Fixes #1377.

R=rsc, adg, r
CC=golang-dev
https://golang.org/cl/3868041
2011-01-04 22:28:31 -08:00
Roger Peppe
2f5a5be237 strings: fix description of FieldsFunc
R=r
CC=golang-dev
https://golang.org/cl/3814041
2011-01-04 16:23:29 -08:00
Robert Griesemer
8184778abf fix occurrences of occur[^sr .,?!;\n]
R=r, r2
CC=golang-dev
https://golang.org/cl/3794043
2011-01-04 13:16:50 -08:00
Rob Pike
6a5a527173 regexp: implement early out for failed anchored search.
R=rsc
CC=golang-dev
https://golang.org/cl/3813045
2011-01-04 12:43:52 -08:00
Patrick Gavlin
236f9638b4 encoding/binary: reject types with implementation-dependent sizes
Fixes #1201.

R=rsc
CC=golang-dev
https://golang.org/cl/3787044
2011-01-04 13:42:50 -05:00
Russ Cox
3cd10e3a0d merge tree 2011-01-04 13:40:41 -05:00
Patrick Gavlin
4e5a59591b gc: rewrite complex /= to l = l / r.
Fixes #1368.

R=rsc, ejsherry
CC=golang-dev
https://golang.org/cl/3811042
2011-01-04 13:14:17 -05:00
Robert Griesemer
9214016b3d go/ast: provide complete node text range info
- add End() method to all nodes; the text range of a node n is [n.Pos(), n.End())
- various small bug fixes in the process
- fixed several comments

R=r, rsc
CC=golang-dev
https://golang.org/cl/3769042
2011-01-04 10:14:16 -08:00
Russ Cox
71793d4b42 strconv: update ftoa comment for 'E' and 'G'
Inspired by 3827042.

R=gri, peterGo
CC=golang-dev
https://golang.org/cl/3858042
2011-01-04 13:13:12 -05:00
Michael Hoisie
ed1cbca81f net: fix close of Listener
Fixes #1375.

R=rsc, r
CC=golang-dev
https://golang.org/cl/3731048
2011-01-04 11:55:13 -05:00
Gustavo Niemeyer
5530bf90cd goinstall: fix -u for bzr
Changeset 7012:65601d7cac9e broke goinstall -u for bzr
branches.  This will fix it.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/3852041
2011-01-04 14:22:18 +11:00
Rob Pike
15cb7ed34f regexp: fix prefix bug.
After a prefix match, the old code advanced the length of the
prefix.  This is incorrect since the full match might begin
in the middle of the prefix. (Consider "aaaab+" matching
"aaaaaab").

Fixes #1373

R=rsc
CC=golang-dev
https://golang.org/cl/3795044
2011-01-03 11:35:34 -08:00
Rob Pike
c0d0d4ef05 regexp: fix performance bug, make anchored searches fail fast.
The bug was that for an anchored pattern such as ^x, the prefix
scan ignored the anchor, and could scan the whole file if there was
no x present.  The fix is to do prefix matching after the anchor;
the cost miniscule; the speedups huge.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/3837042
2011-01-03 11:31:51 -08:00
Anschel Schaffer-Cohen
84fc1e20f1 Fix documentation typo.
This is really insignificant, but it might as well be fixed.

R=golang-dev, brainman
CC=golang-dev
https://golang.org/cl/3832045
2010-12-31 10:37:55 +11:00
Stefan Nilsson
834fda37c5 atof: added 'E' as valid token for exponent
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/3827042
2010-12-27 10:12:10 -08:00
Sebastien Binet
33145c4868 simple fix to not have 'exp/eval' panic in presence of slices like s[:2]
R=golang-dev, gri
CC=binet, golang-dev
https://golang.org/cl/3782044
2010-12-27 10:05:32 -08:00
Adam Langley
03e259664f crypto/cipher: fix OCFB
I messed up when reading the OCFB spec.

TBR=rsc

R=rsc
CC=golang-dev
https://golang.org/cl/3739042
2010-12-27 12:55:49 -05:00
Caine Tighe
784788ba44 goinstall/download.go: Add checkout concept and helper functions to clean and fix implementation (Issue 1265)
R=rsc, niemeyer, adg
CC=golang-dev
https://golang.org/cl/3536041
2010-12-24 11:48:45 +11:00
Andrew Gerrand
2cf6c6eb80 6l: fix documentation of -L flag
R=rsc, iant2, iant
CC=golang-dev
https://golang.org/cl/3802044
2010-12-24 09:04:53 +11:00
Eoghan Sherry
04a231d406 testing: fix error message on invalid regexp
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/3831041
2010-12-23 11:40:10 +11:00
Nigel Tao
ea70b0d51d hash/crc64: fix typo in Sum.
R=agl1
CC=golang-dev
https://golang.org/cl/3772043
2010-12-22 10:28:22 +11:00
Stefan Nilsson
8cfd9e0676 bufio: removed dead code
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/3779043
2010-12-22 08:43:35 +11:00
Rob Pike
d3866ddc65 template: fix trivial bug: integers are not "empty"
Fixes #1357.

R=adg, gri
CC=golang-dev
https://golang.org/cl/3809041
2010-12-20 13:36:47 -08:00
David Symonds
8bfa9175a3 expvar: quote StringFunc output, same as String output.
R=adg
CC=golang-dev
https://golang.org/cl/3797041
2010-12-20 17:35:21 +11:00
Robert Griesemer
2662b99f39 suffixarray: implememted FindAllIndex regexp search
Implementation uses fast suffixarray lookup to find
initial matches if the regular expression starts with
a suitable prefix without meta characters.

R=r, rsc
CC=golang-dev
https://golang.org/cl/3720042
2010-12-17 14:00:46 -08:00
Robert Griesemer
8f68b23b8d go/scanner: interpret filenames in //line filename:line comments
relative to the source file directory

R=r, rsc
CC=golang-dev
https://golang.org/cl/3752041
2010-12-17 13:54:37 -08:00
Rob Pike
ae6bfe3687 tls: fix argument mistake in Error call.
R=agl, agl1, rsc
CC=golang-dev
https://golang.org/cl/3753041
2010-12-17 13:47:52 -08:00
Rob Pike
18b39f20ef json: fix Fatal call in test
R=rsc
CC=golang-dev
https://golang.org/cl/3751041
2010-12-17 13:43:59 -08:00
Russ Cox
3832389036 fix cgo build
R=r
CC=golang-dev
https://golang.org/cl/3750041
2010-12-17 13:22:20 -08:00
Russ Cox
6c6d53052e cgo: handle references to symbols in shared libraries
Fixes #1334.

R=r
CC=golang-dev
https://golang.org/cl/3746041
2010-12-17 11:37:11 -08:00
Rob Pike
a9e7c9381e regexp: change Expr() to String(); add HasOperator method to Regexp.
It reports whether a regular expression has operators
as opposed to matching literal text.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/3731041
2010-12-17 10:23:46 -08:00
Russ Cox
8ec6f7cd11 ld: ignore stab symbols
Makes 6l work better on OS X 10.5.

Fixes #1352.
Fixes #1353.

R=r
CC=golang-dev
https://golang.org/cl/3661042
2010-12-17 10:03:43 -08:00
Russ Cox
01464cf956 ld: allow relocations pointing at ELF .bss symbols
R=r, r2
CC=golang-dev
https://golang.org/cl/3710042
2010-12-17 09:53:50 -08:00
Russ Cox
0cd3475386 misc/cgo/life: fix, add to build
#pragma dynexport is no longer needed for
this use of cgo, since the gcc and gc code are
now linked together into the same binary.
It may still be necessary later.

On the Mac, you cannot use the GOT to resolve
symbols that exist in the current binary, so 6l and 8l
translate the GOT-loading mov instructions into lea
instructions.

On ELF systems, we could use the GOT for those
symbols, but for consistency 6l and 8l apply the
same translation.

The translation is sketchy in the extreme
(depending on the relocation being in a mov
instruction) but it verifies that the instruction
is a mov before rewriting it to lea.

Also makes typedefs global across files.

Fixes #1335.
Fixes #1345.

R=iant, r
CC=golang-dev
https://golang.org/cl/3650042
2010-12-17 09:51:55 -08:00
Anthony Martin
a890d70cc1 crypto/hmac: add HMAC-SHA256
R=agl1, rsc
CC=golang-dev
https://golang.org/cl/3730041
2010-12-17 12:19:37 -05:00
Rob Pike
5bd4094d2e regexp: add HasMeta and regexp.Expr().
The former is a boolean function to test whether a string
contains a regular expression metacharacter; the second
returns the string used to compile the regexp.

R=gri, rsc
CC=golang-dev
https://golang.org/cl/3728041
2010-12-16 16:55:26 -08:00
Adam Langley
be45ba712b crypto/tls: missed a file
R=rsc
CC=golang-dev
https://golang.org/cl/3674043
2010-12-16 17:14:02 -05:00
Adam Langley
4883b73982 crypto/tls: add ECDHE support
(ECDHE is "Elliptic Curve Diffie Hellman Ephemeral")

R=rsc
CC=golang-dev
https://golang.org/cl/3668042
2010-12-16 17:10:50 -05:00
Rob Pike
2e8be52ff7 time: explain the formats a little better.
R=gri, rsc
CC=golang-dev
https://golang.org/cl/3719042
2010-12-16 13:25:41 -08:00
Adam Langley
1e3b9524d2 crypto/elliptic: add serialisation and key pair generation.
This is a prerequisite to ECDHE support in crypto/tls.

R=r, rsc
CC=golang-dev
https://golang.org/cl/3685043
2010-12-16 16:04:01 -05:00
Russ Cox
b3e8fdce8d darwin, freebsd: ignore write failure (during print, panic)
The other operating systems already ignore write failures.

Fixes #1279.

R=r, r2
CC=golang-dev
https://golang.org/cl/3723041
2010-12-16 12:46:56 -08:00
Christopher Wedgwood
678a70e3b6 govet: fix comment
R=r, r2
CC=golang-dev
https://golang.org/cl/3712041
2010-12-16 12:35:38 -08:00
Adam Langley
fd021cbe8f crypto/tls: check in support code.
This support code helps in generating the handshake scripts
which are used for testing.

R=rsc, ality
CC=golang-dev
https://golang.org/cl/3680041
2010-12-16 10:39:53 -05:00
Nigel Tao
0bf2aa1aa7 exp/draw: remove Border function.
It was only used by exp/4s, and even if it is general purpose, I think
it belongs in a graphics library atop exp/draw, not in exp/draw itself.

R=rsc
CC=golang-dev
https://golang.org/cl/3705041
2010-12-16 15:11:10 +11:00
Russ Cox
1116ec4f20 ld: text segment should not be writable
R=adg
CC=golang-dev
https://golang.org/cl/3708041
2010-12-15 19:29:53 -08:00
Alex Brainman
f8b7eda5f6 8l: remove unneeded windows check
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/3691042
2010-12-16 12:19:59 +11:00
Alex Brainman
c83451971e runtime: move windows goargs implementation from runtime and into os package
R=rsc
CC=golang-dev
https://golang.org/cl/3702041
2010-12-16 12:18:18 +11:00
Alex Brainman
bb53b1c250 build: add another --no-print-directory
Fixes #1344.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/3584042
2010-12-16 10:46:25 +11:00
Russ Cox
1063ed8f3b 5l: fix arm build
R=r
CC=golang-dev
https://golang.org/cl/3701041
2010-12-15 14:57:49 -08:00
Russ Cox
33405ecc86 fix freebsd build
R=iant, r
CC=dho, golang-dev
https://golang.org/cl/3687041
2010-12-15 17:20:26 -05:00
Adam Langley
1a072f4b37 crypto/tls: commit fixes which I hadn't saved.
R=rsc
CC=golang-dev
https://golang.org/cl/3685041
2010-12-15 13:58:57 -05:00
Eoghan Sherry
976e45726c math: change float64 bias constant from 1022 to 1023
This makes some subtle code easier to understand.

R=rsc
CC=golang-dev
https://golang.org/cl/3444043
2010-12-15 13:20:52 -05:00
Adam Langley
eedf5c4529 crypto/tls: support CBC ciphers
This is largely based on ality's CL 2747042.

crypto/rc4: API break in order to conform to crypto/cipher's
Stream interface

cipher/cipher: promote to the default build

Since CBC differs between TLS 1.0 and 1.1, we downgrade and
support only 1.0 at the current time. 1.0 is what most of the
world uses.

Given this CL, it would be trival to add support for AES 256,
SHA 256 etc, but I haven't in order to keep the change smaller.

R=rsc
CC=ality, golang-dev
https://golang.org/cl/3659041
2010-12-15 11:49:55 -05:00
Russ Cox
0c54225b51 remove nacl
The recent linker changes broke NaCl support
a month ago, and there are no known users of it.

The NaCl code can always be recovered from the
repository history.

R=adg, r
CC=golang-dev
https://golang.org/cl/3671042
2010-12-15 11:49:23 -05:00
Luuk van Dijk
7a4ce23d65 [68]l and runtime: GDB support for interfaces and goroutines.
R=rsc
CC=golang-dev
https://golang.org/cl/3477041
2010-12-15 12:00:43 +01:00
Nigel Tao
d96685ed6a reflect: remove unnecessary indirection in TestCopy.
R=r
CC=golang-dev
https://golang.org/cl/3642041
2010-12-15 20:54:11 +11:00
Rob Pike
670e77b54d govet: allow directories as arguments, process recursively.
R=gri
CC=golang-dev
https://golang.org/cl/3652041
2010-12-14 17:09:24 -08:00
Nigel Tao
fec6ab9726 html: parse "<h1>foo<h2>bar".
R=gri
CC=golang-dev
https://golang.org/cl/3571043
2010-12-15 11:39:56 +11:00
Rob Pike
8132bb1c74 gob: Register should use the original type, not the indirected one.
Fixes a bug reported on golang-nuts.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3641042
2010-12-14 15:04:52 -08:00
Christopher Wedgwood
56452c53ee govet: on error continue to the next file
R=r, rsc
CC=golang-dev
https://golang.org/cl/3578041
2010-12-14 14:12:22 -08:00
Rob Pike
9f6de01d8d gob: document the byte count used in the encoding of values.
R=rsc
CC=golang-dev
https://golang.org/cl/3641041
2010-12-14 14:04:52 -08:00
Nigel Tao
8b64cd9c5e reflect: add Append and AppendSlice functions.
R=r, nigeltao_gnome, rog, niemeyer
CC=golang-dev
https://golang.org/cl/3529042
2010-12-15 08:50:08 +11:00
Rob Pike
da1cbe5d11 regexp: simplify code for brackets, per rsc suggestion
R=rsc
CC=golang-dev
https://golang.org/cl/3545044
2010-12-14 12:01:35 -08:00
Russ Cox
f620a430f2 compress/flate: implement Flush
This Flush is equivalent to zlib's Z_SYNC_FLUSH.
The addition of the explicit Writer type opens the
door to adding a PartialFlush if needed for SSH
and maybe even FullFlush.  It also opens the door
for a SetDictionary method to be added.

http://www.bolet.org/~pornin/deflate-flush.html
documents the various intricacies of flushing a
DEFLATE stream.

R=agl1, r
CC=golang-dev
https://golang.org/cl/3637041
2010-12-14 14:57:12 -05:00
Rob Pike
8bb9e616ed regexp: speed up by about 30%.
The code used interfaces in a pretty, pedagogical way but not efficiently.
Remove unnecessary interface code for significant speedups.
Before:

	regexp.BenchmarkLiteral	 1000000	      2629 ns/op
	regexp.BenchmarkNotLiteral	  100000	     18131 ns/op
	regexp.BenchmarkMatchClass	  100000	     26647 ns/op
	regexp.BenchmarkMatchClass_InRange	  100000	     27092 ns/op
	regexp.BenchmarkReplaceAll	  100000	     27014 ns/op

After:

	regexp.BenchmarkLiteral	 1000000	      2077 ns/op
	regexp.BenchmarkNotLiteral	  100000	     13738 ns/op
	regexp.BenchmarkMatchClass	  100000	     20418 ns/op
	regexp.BenchmarkMatchClass_InRange	  100000	     20999 ns/op
	regexp.BenchmarkReplaceAll	  100000	     21825 ns/op

There's likely more to do without major surgery, but this is a simple, significant step.

R=rsc
CC=golang-dev
https://golang.org/cl/3572042
2010-12-14 11:15:32 -08:00
Robert Griesemer
3fb6d62e3a suffixarray: rename Data() -> Bytes()
R=rsc
CC=golang-dev
https://golang.org/cl/3540042
2010-12-14 10:22:00 -08:00
Anthony Martin
d7340d9c20 http: include DEL in the test for unprintable chars
R=adg, rsc
CC=golang-dev
https://golang.org/cl/3631041
2010-12-14 12:26:30 -05:00
Anthony Martin
add32466bf build: remove intermediate yacc files in Make.ccmd
R=rsc
CC=golang-dev
https://golang.org/cl/3545042
2010-12-14 12:22:40 -05:00
Anthony Martin
6a4b0191c0 crypto/tls: use rand.Reader in cert generation example
R=rsc, agl1
CC=golang-dev
https://golang.org/cl/3536043
2010-12-14 12:22:28 -05:00
Anthony Martin
11b49ff124 smtp: add *tls.Config argument to StartTLS
R=rsc, agl1
CC=golang-dev
https://golang.org/cl/3573044
2010-12-14 12:22:08 -05:00
Russ Cox
d110ae8dd0 runtime: write only to standard error
Will mail a warning to golang-nuts once this is submitted.

R=r, niemeyer
CC=golang-dev
https://golang.org/cl/3573043
2010-12-14 11:52:42 -05:00
Robert Griesemer
6fcae0f044 token/position: provide files iterator
R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/3541044
2010-12-13 17:08:40 -08:00
Robert Griesemer
52c9fb6f3d suffixarray: provide accessor to data
R=r
CC=golang-dev
https://golang.org/cl/3574044
2010-12-13 17:08:01 -08:00
Russ Cox
951318c0df runtime: remove paranoid mapping at 0
Too many programs complain that we even try.
This was a bit of security paranoia and not worth
the bother.

Fixes #1340.

R=r, r2
CC=golang-dev
https://golang.org/cl/3579042
2010-12-13 16:57:35 -05:00
Rob Pike
2ef09148a0 time: fix bug in Ticker: shutdown using channel rather than memory
R=rsc
CC=golang-dev
https://golang.org/cl/3609042
2010-12-13 13:52:19 -08:00
Russ Cox
1b31c37428 gc: issue 1231
Fixes #1231.

R=ken2
CC=golang-dev
https://golang.org/cl/3627041
2010-12-13 16:51:19 -05:00
Russ Cox
dc9a3b2791 gc: align structs according to max alignment of fields
cc: same
runtime: test cc alignment (required moving #define of offsetof to runtime.h)
fix bug260

Fixes #482.
Fixes #609.

R=ken2, r
CC=golang-dev
https://golang.org/cl/3563042
2010-12-13 16:22:19 -05:00
Russ Cox
287e45e241 json: check for invalid UTF-8
Fixes #1250.

R=r
CC=golang-dev
https://golang.org/cl/3562042
2010-12-13 15:51:11 -05:00
Russ Cox
3a2ba994b6 build: add a few missing --no-print-directory
Reported by W. Michael Petullo <mike@flyn.org>

Fixes #1269.

R=r, r2
CC=golang-dev
https://golang.org/cl/3618041
2010-12-13 15:50:57 -05:00
Russ Cox
318c1eeb32 godefs: guard against structs with pad fields
Fixes #1162.

R=r
CC=golang-dev
https://golang.org/cl/3619041
2010-12-13 15:50:47 -05:00
Russ Cox
9e26c4bd1a gc: complex(0)
Fixes #1232.

R=ken2
CC=golang-dev
https://golang.org/cl/3621041
2010-12-13 15:34:45 -05:00
Russ Cox
88cf5564fc ld: missing prototype
R=ken2
CC=golang-dev
https://golang.org/cl/3620041
2010-12-13 15:26:52 -05:00
Russ Cox
603f9feeec gc: another shift bug
Fixes #1316.

R=ken2
CC=golang-dev
https://golang.org/cl/3575042
2010-12-13 13:42:51 -05:00
Russ Cox
9da73612ed cgo: do not reset tag generator between files
Clean up an error message and error exit too.
Insert blank line after "DO NOT EDIT" comment
to keep it from being a doc comment.

Fixes #1213.
Fixes #1222.

R=r
CC=golang-dev
https://golang.org/cl/3608042
2010-12-13 13:20:04 -05:00
Russ Cox
e7a0f67603 gc: introduce explicit alignments
No semantic changes here, but working
toward being able to align structs based
on the maximum alignment of the fields
inside instead of having a fixed alignment
for all structs (issue 482).

R=ken2
CC=golang-dev
https://golang.org/cl/3617041
2010-12-13 11:57:41 -05:00
Russ Cox
96db724cfc gc: emit reflect correct reflect types
Fixes #1169.

R=ken2
CC=golang-dev
https://golang.org/cl/3595043
2010-12-13 10:05:20 -05:00
Russ Cox
c7c16175e0 ld: allow .o files with no symbols
Don't crash in dwarf for foreign functions.

R=ken2
CC=golang-dev
https://golang.org/cl/3576043
2010-12-13 10:05:07 -05:00
Russ Cox
cc1556d9a2 runtime/linux/386: set FPU to 64-bit precision
Fixes #550.

R=r
CC=golang-dev
https://golang.org/cl/3469044
2010-12-13 10:04:53 -05:00
Alex Brainman
84713d46f6 syscall: remove terminating \r and \n from windows error messages
R=rsc, peterGo
CC=golang-dev
https://golang.org/cl/3095042
2010-12-13 17:02:01 +11:00
Wei Guangjing
e04ef7769e Fix windows build.
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/3533041
2010-12-13 16:41:02 +11:00
Gustavo Niemeyer
1f6b6ca9ba A selection of trivials.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/3606043
2010-12-12 14:16:37 -08:00
Robert Griesemer
5e54e93675 godoc: improved textual search
- improved search result page
- clicking on files shows highlighted search phrase
  (.go files loose their godoc-specific formatting and
  highlighting in this mode - a better solution is in
  the works)
- support for textual results
- fixed bug with non-URL escaped URL parameter (Query)

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3585041
2010-12-12 13:13:07 -08:00
Eoghan Sherry
40ff071e9b 5g/8g, 8l, ld, prof: fix output of 32-bit values
If an %lld argument can be 32 or 64 bits wide, cast to vlong.
If always 32 bits, drop the ll.
Fixes #1336.

R=brainman, rsc
CC=golang-dev
https://golang.org/cl/3580041
2010-12-12 14:40:19 -05:00
Nigel Tao
73fd298901 reflect: rename reflect.ArrayCopy to be reflect.Copy.
R=r
CC=golang-dev
https://golang.org/cl/3601041
2010-12-12 20:27:29 +11:00
Mikio Hara
7ec69c179d gofmt -s -w src
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/3592041
2010-12-11 13:49:45 -08:00
Robert Griesemer
055650daa4 godoc: first cut at textual search
To enable use -fulltext flag; e.g.: godoc -v -fulltext -http=:7777

Enabling the fulltext index will use significantly more memory as
the text of all source code, the respective suffixarray, and the
file set data structure is kept in memory. At the moment there is
about 6Mb of source code (~1400 files) indexed under GOROOT.
Source code + suffix array together consume 5*(size of source) or
about 30Mb. The file set data structure consumes about 4b/src line.
By default only up to 5000 results are shown for now.

The presentation of the results needs tuning. In particular,
if a string is found, clicking on the respective file does not
highlight them, yet.

At the moment, only Go source files are indexed. Eventually,
the full text index should encompass other files as well.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/3182043
2010-12-10 14:40:22 -08:00
Russ Cox
9282a768cf math: s/MinFloat/SmallestNonzeroFloat/
R=r, gri
CC=golang-dev
https://golang.org/cl/3547042
2010-12-10 11:39:09 -08:00
Russ Cox
e454af4d64 cgo: avoid self-interference of global names
Fixes #1332.

R=iant, iant2
CC=golang-dev
https://golang.org/cl/3555041
2010-12-10 11:32:58 -08:00
Russ Cox
4324a31376 nm: silently ignore .o files in .a files
Update #1334.

R=r
CC=golang-dev
https://golang.org/cl/3553041
2010-12-10 11:32:48 -08:00
Nigel Tao
71bd053ada html: parse <table><tr><td> tags.
Also, shorten fooInsertionMode to fooIM.

R=gri
CC=golang-dev
https://golang.org/cl/3504042
2010-12-10 12:20:14 +11:00
Ryan Hitchman
8959851a96 os: make MkdirAll work with symlinks
Fixes #1149.

R=adg
CC=golang-dev
https://golang.org/cl/3564041
2010-12-10 10:43:45 +11:00
Ken Thompson
ae60526848 arm floating point simulation
R=rsc
CC=golang-dev
https://golang.org/cl/3565041
2010-12-09 14:45:27 -08:00
Andrew Gerrand
aa9c213e56 http: ServeFile to handle Range header for partial requests
and send Content-Length.

Also includes some testing of the server code.

R=rsc
CC=golang-dev
https://golang.org/cl/2831041
2010-12-10 08:51:13 +11:00
Nigel Kerr
27f2d5ce8c xml: disallow invalid Unicode code points
Fixes #1259.

R=rsc
CC=golang-dev
https://golang.org/cl/2967041
2010-12-09 14:51:01 -05:00
Russ Cox
92b4506f73 os: fix test of RemoveAll
Fixes #22. (again)

R=r
CC=golang-dev
https://golang.org/cl/3547041
2010-12-09 14:49:13 -05:00
Mikio Hara
6555cfc6c6 syscall: add network interface constants for linux/386, linux/amd64
R=rsc
CC=golang-dev
https://golang.org/cl/3266042
2010-12-09 13:55:59 -05:00
Ryan Hitchman
f980577064 gc: syntax error for incomplete chan type
Fixes #932.

R=rsc
CC=golang-dev
https://golang.org/cl/3515041
2010-12-09 13:41:24 -05:00
Robert Griesemer
e1d6b3c98d go/ast: fix ast.Walk
- change Walk signature to use an ast.Node instead of interface{}
- add Pos functions to a couple of ast types to make them proper nodes
- explicit nil checks where a node can be nil; incorrect ASTs cause Walk to crash

For now ast.Walk is exercised extensively as part of godoc's indexer;
so we have some confidence in its correctness. But this needs a test,
eventually.

Fixes #1326.

R=rsc, r
CC=golang-dev
https://golang.org/cl/3481043
2010-12-09 10:22:01 -08:00
Robert Griesemer
e2da3b6498 gofmt: simplify "x, _ = range y" to "x = range y"
(inspired by CL 3529041 by hitchmanr@gmail.com)

R=rsc
CC=golang-dev
https://golang.org/cl/3527042
2010-12-09 10:11:57 -08:00
Balazs Lecz
2bdb2e78fe os/inotify: new package
This patch adds a new package: os/inotify, which
provides a Go wrapper to the Linux inotify system.

R=rsc, albert.strasheim, rog, jacek.masiulaniec
CC=golang-dev
https://golang.org/cl/2049043
2010-12-09 13:11:39 -05:00
Robert Griesemer
b98fffe39e go/token,scanner: fix comments so godoc aligns properly
R=iant, r2
CC=golang-dev
https://golang.org/cl/3532042
2010-12-09 10:11:00 -08:00
Rob Pike
8e609cddef govet: a new static checker for Go programs.
At the moment, and for the forseeable future, it only checks arguments to print calls.

R=rsc, gri, niemeyer, iant2, rog, lstoakes, jacek.masiulaniec, cw
CC=golang-dev
https://golang.org/cl/3522041
2010-12-09 12:37:18 -05:00
Rob Pike
b7c73110b1 gob: fix bug sending zero-length top-level slices and maps
Fixes #1278.

R=rsc
CC=golang-dev
https://golang.org/cl/3434046
2010-12-09 11:01:32 -05:00
Ryan Hitchman
062406bc64 throughout: simplify two-variable ranges with unused second variable
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/3529041
2010-12-08 21:36:56 -08:00
Rob Pike
14804a412b event.go: another print glitch from gocheck.
R=rsc
CC=golang-dev
https://golang.org/cl/3524041
2010-12-08 17:12:25 -05:00
Russ Cox
85d9ab61d2 arm: more fixes
R=ken2
CC=golang-dev
https://golang.org/cl/3523041
2010-12-08 16:49:49 -05:00
Russ Cox
7eeebf49be runtime/cgo: adapt files copied from libcgo
Necessary but not sufficient step toward
making those builds work.

R=r
CC=golang-dev
https://golang.org/cl/3411043
2010-12-08 16:35:05 -05:00
Rob Pike
70113b436e a few more errors caught by the print checker
R=rsc
CC=golang-dev
https://golang.org/cl/3431046
2010-12-08 16:25:14 -05:00
Russ Cox
839abc2ea7 5l (and 6l, 8l, ld): more arm build fixes
R=ken2
CC=golang-dev
https://golang.org/cl/3521041
2010-12-08 15:44:59 -05:00
Russ Cox
b8562ff488 5l: fix build
Makes 5l build with recent changes, but not yet tested on ARM hardware.

R=ken2
CC=golang-dev
https://golang.org/cl/3449044
2010-12-08 15:37:51 -05:00
Adam Langley
3a5efdf230 crypto/elliptic: remove mistakenly commited code
One of my own experiments ended up getting mistakenly commited when
        switching to Jacobian transformations.

R=rsc
CC=golang-dev
https://golang.org/cl/3473044
2010-12-08 15:01:53 -05:00
Russ Cox
5a8f2ba727 fix build: more libcgo references
R=r
CC=golang-dev
https://golang.org/cl/3448043
2010-12-08 14:36:45 -05:00
Russ Cox
98b2d7062e libcgo: delete (replaced by runtime/cgo)
Move unported files (freebsd*, windows*, nacl*) to runtime/cgo.

Step toward fixing FreeBSD build.

R=r
TBR=r
CC=golang-dev
https://golang.org/cl/3497042
2010-12-08 14:33:17 -05:00
Russ Cox
66f7463e80 syscall: fix linux/arm build
bug introduced at
https://golang.org/cl/2331044

R=ken2
CC=golang-dev
https://golang.org/cl/3440046
2010-12-08 14:31:46 -05:00
Russ Cox
b07b04d35f runtime/cgo: take 2
This is a second attempt at submitting
https://golang.org/cl/3420043

A Mercurial problem lost the new files
in that submit.

TBR=r
CC=golang-dev
https://golang.org/cl/3511043
2010-12-08 14:10:00 -05:00
Russ Cox
14d677ecba cgo: new cgo
Very few changes here: the subtle ones are in Make.pkg.

Note that incredibly (and importantly) there are
no changes necessary to the test programs in misc/cgo.

R=iant
CC=golang-dev
https://golang.org/cl/3504041
2010-12-08 13:56:51 -05:00
Russ Cox
f5690004c2 6l, 8l: support for linking ELF and Mach-O .o files
More support for references to dynamic symbols,
including full GOT and PLT for ELF objects.

For Mach-O everything ends up in the GOT: dealing
with the real lazy PLT is too hard for now so we punt.

R=iant, iant2
CC=golang-dev
https://golang.org/cl/3491042
2010-12-08 13:56:43 -05:00
Russ Cox
9042c2ce68 runtime/cgo: runtime changes for new cgo
Formerly known as libcgo.
Almost no code here is changing; the diffs
are shown relative to the originals in libcgo.

R=r
CC=golang-dev
https://golang.org/cl/3420043
2010-12-08 13:53:30 -05:00
Russ Cox
cf42a45587 ld: reading of Mach-O object files
R=iant
CC=golang-dev
https://golang.org/cl/3431045
2010-12-08 13:53:24 -05:00
Russ Cox
37499ebcfd debug/elf, debug/macho: add ImportedLibraries, ImportedSymbols
R=r, iant
CC=golang-dev
https://golang.org/cl/3470044
2010-12-08 13:53:19 -05:00
Russ Cox
f16c280fe5 gopack: allow ELF/Mach-O objects in .a files without clearing allobj
R=iant
CC=golang-dev
https://golang.org/cl/3503041
2010-12-08 13:53:13 -05:00
Russ Cox
8132f1d016 6l, 8l: minor changes & cleanup
R=ken2, ken3
CC=golang-dev
https://golang.org/cl/3505041
2010-12-08 13:53:07 -05:00
Russ Cox
4d8d6d5cda ld: reading of ELF object files
R=iant
CC=golang-dev
https://golang.org/cl/3507041
2010-12-08 13:52:59 -05:00
Russ Cox
7431a3165e ld: re-add ELF symbol tables
R=iant
CC=golang-dev
https://golang.org/cl/3506041
2010-12-08 13:52:50 -05:00
Rob Pike
0313ea80ab path: fix printf glitch in test
R=rh, gri
CC=golang-dev
https://golang.org/cl/3514041
2010-12-08 09:58:46 -05:00
Robert Griesemer
4ba27e27f3 godoc: use file instead of file set for computing line info
Reduces indexing time by ~10%; from ~44s to ~39s, best of 3 runs.

R=rsc
CC=golang-dev
https://golang.org/cl/3510041
2010-12-07 21:55:32 -08:00
Robert Griesemer
1612b8734a token/position.go: provide FileSet.File(), minor optimizations
R=rsc
CC=golang-dev
https://golang.org/cl/3399042
2010-12-07 21:50:08 -08:00
Alex Brainman
1e2876469b syscall: restrict access rights param of OpenProcess() to the minimum needed
Fixes #1270.

R=vcc, rsc
CC=golang-dev
https://golang.org/cl/3299041
2010-12-08 16:20:30 +11:00
Alex Brainman
60c91bbf4c runtime: fix windows build
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/3419043
2010-12-08 12:52:36 +11:00
Keith Rarick
51a2183851 runtime: add Goroutines
R=rsc
CC=golang-dev
https://golang.org/cl/3508041
2010-12-07 18:06:31 -05:00
Eoghan Sherry
63544c4754 ld: fix dwarf decoding of 64-bit reflect values
R=rsc
CC=golang-dev
https://golang.org/cl/3002041
2010-12-07 17:20:52 -05:00
Russ Cox
7e14bd81f4 runtime: debugging help on 386
R=r
CC=golang-dev
https://golang.org/cl/3502041
2010-12-07 17:19:36 -05:00
Nigel Tao
49014c5b12 html: handle unexpected EOF during parsing.
This lets us parse HTML like "<html>foo".

R=gri
CC=golang-dev
https://golang.org/cl/3460043
2010-12-08 08:59:20 +11:00
Russ Cox
8d50557979 cc: allow $ as letter in pragma arguments
(Needed for Mac OS X symbol names.)

R=ken2
CC=golang-dev
https://golang.org/cl/3499041
2010-12-07 16:45:06 -05:00
Robert Griesemer
ce89f213a8 go/parser: Better comment for ParseFile.
The name ParseFile was kept as it indicates that
this function parses a Go 'SourceFile' per the
Go spec. Similarly, the other functions (ParseExpr,
ParseStmtList, ParseDeclList) parse the corresponding
constructs as defined in the Go spec.

Fixes #1311.

R=r, rsc
CC=golang-dev
https://golang.org/cl/3453042
2010-12-07 13:44:01 -08:00
Rob Pike
1ce6245d6c throughout: fix broken calls to Printf etc.
I have written a tool to verify Printf calls, and although it's not
ready to be reviewed yet it's already uncovered a spate of problems
in the repository.  I'm sending this CL to break the changes into
pieces; as the tool improves it will find more, I'm sure.

R=rsc
CC=golang-dev
https://golang.org/cl/3427043
2010-12-07 16:42:54 -05:00
Russ Cox
8694959b12 http: fix build
R=dsymonds
TBR=dsymonds
CC=golang-dev
https://golang.org/cl/3425044
2010-12-07 16:20:15 -05:00
Eoghan Sherry
cab83650d1 gc: skip undefined symbols in import .
Fixes #1284.

R=ken3, rsc
CC=golang-dev
https://golang.org/cl/3210041
2010-12-07 16:16:01 -05:00
Russ Cox
b15c4245c5 crypto/tls: add *Config argument to Dial
Document undocumented exported names.
Allow nil Rand, Time, RootCAs in Config.

Fixes #1248.

R=agl1
CC=golang-dev
https://golang.org/cl/3481042
2010-12-07 16:15:15 -05:00
Christian Himpel
2660c2a7be crypto/tls: fix build of certificate generation example
R=agl1, rsc
CC=golang-dev
https://golang.org/cl/3366041
2010-12-07 16:14:55 -05:00
Michael Hoisie
bfac91a6b9 exec.LookPath: return os.PathError instad of os.ENOENT, it's more descriptive.
R=rsc
CC=golang-dev
https://golang.org/cl/3448042
2010-12-07 15:57:00 -05:00
Nigel Tao
688a83128d html: move the sanity checking of the entity map from runtime
(during init) to test-time (via gotest).

R=gri
CC=golang-dev
https://golang.org/cl/3466044
2010-12-08 07:55:03 +11:00
David Symonds
ae2495c5b0 http: Add EncodeQuery, a handy helper function for constructing URL query strings.
R=stephenm, rsc
CC=golang-dev
https://golang.org/cl/2985042
2010-12-07 15:54:04 -05:00
Wei Guangjing
70deac67cf 8l : add dynimport to import table in Windows PE, initial make cgo dll work.
R=rsc, brainman, Joe Poirier, mattn
CC=golang-dev
https://golang.org/cl/2166041
2010-12-07 15:28:33 -05:00
Albert Strasheim
836643400c build: Allow archiver to be specified in the environment with HOST_AR.
R=rsc
CC=golang-dev
https://golang.org/cl/2515043
2010-12-07 15:28:26 -05:00
Roger Peppe
24a78a026d bufio: make Reader.Read implement io.Reader semantics
R=rsc
CC=golang-dev
https://golang.org/cl/3395042
2010-12-07 14:54:15 -05:00
Albert Strasheim
cf6c212197 syscall, net: Add Recvmsg and Sendmsg on Linux.
Working on issue 1101.

R=rsc
CC=golang-dev
https://golang.org/cl/2331044
2010-12-07 13:40:14 -05:00
Russ Cox
ed7c3f3127 flag: handle multiple calls to flag.Parse
R=r
CC=golang-dev
https://golang.org/cl/3071041
2010-12-07 13:19:01 -05:00
Robert Griesemer
14eb03f614 go/scanner: remove Tokenize() - was only used in tests
R=r
CC=golang-dev
https://golang.org/cl/3415042
2010-12-07 10:08:00 -08:00
Eoghan Sherry
6aa85d1cbe gc: fix method offsets of anonymous interfaces
Fixes #1290.

R=rsc
CC=golang-dev
https://golang.org/cl/3259043
2010-12-07 12:56:26 -05:00
Dean Prichard
cd319092e0 sync: small naming fix for armv5
R=rsc
CC=golang-dev
https://golang.org/cl/3268042
2010-12-07 12:05:00 -05:00
Andrew Gerrand
79dcf180a2 runtime: fix build for nacl
R=lvd
CC=golang-dev
https://golang.org/cl/3391044
2010-12-07 15:24:46 +11:00
Ryan Hitchman
f503e26379 html: unescape numeric entities, and complete the named entities table, including two-character entities.
Fixes #1233.

R=nigeltao
CC=golang-dev
https://golang.org/cl/3445041
2010-12-07 12:13:47 +11:00
Nigel Tao
08a47d6f60 html: first cut at a parser.
R=gri
CC=golang-dev
https://golang.org/cl/3355041
2010-12-07 12:02:36 +11:00
Robert Griesemer
2fd2991eac godoc: don't call flush if position is not valid
(fixes new godoc crash when looking at spec)

R=rsc, r, iant
CC=golang-dev
https://golang.org/cl/3488041
2010-12-06 15:34:23 -08:00
Robert Griesemer
5a9ad8b9e3 go/ast: use token.Pos instead of token.Position; adjust all dependent code
Specifically:

	* lib/godoc:
	- provide file set (FSet) argument to formatters where needed

	* src/cmd:
	- cgo, ebnflint, godoc, gofmt, goinstall: provide file set (fset) where needed
	- godoc: remove local binary search with sort.Search (change by rsc),
	  extract file set for formatters

	* src/pkg:
	- exp/eval: remove embedded token.Position fields from nodes and replace
	  with named token.Pos fields; add corresponding Pos() accessor methods
	- go/token: added file.Line(), changed signature of File.Position()

	* test/fixedbugs/:
	- bug206.go: change test to not rely on token.Pos details

	* added various extra comments
	* Runs all.bash
	* gofmt formats all of src, misc w/o changes
	* godoc runs

	* performance:
	- The new version of godoc consumes about the same space after indexing
	  has completed, but indexing is half the speed. Significant space savings
	  are expected from smaller ASTs, but since they are thrown away after a
	  file has been indexed, this is not visible anymore. The slower indexing
	  time is due to the much more expensive computation of line information.
	  However, with the new compressed position information, indexing can be
	  rewritten and simplified. Furthermore, computing the line info can be
	  done more efficiently.

        New godoc, immediately after indexing completed (best of three runs):

	  PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE
	44381 godoc        0.0%  0:38.00   4    19    149  145M   184K   148M   176M

	2010/12/03 17:58:35 index updated (39.231s, 18505 unique words, 386387 spots)
	2010/12/03 17:58:35 bytes=90858456 footprint=199182584
	2010/12/03 17:58:36 bytes=47858568 footprint=167295224

	Old godoc, immediately after indexing completed (best of three runs):

	  PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE
	23167 godoc        0.0%  0:22.02   4    17    132  129M   184K   132M   173M

	2010/12/03 14:51:32 index updated (24.892s, 18765 unique words, 393830 spots)
	2010/12/03 14:51:32 bytes=66404528 footprint=163907832
	2010/12/03 14:51:32 bytes=46282224 footprint=163907832

	The different numbers for unique words/spots stem from the fact the the
	two workspaces are not exactly identical. The new godoc maintains a large
	file set data structure during indexing which (probably) is the reason
	for the larger heap (90858456 vs 66404528) before garbage collection.

R=rsc, r
CC=golang-dev
https://golang.org/cl/3050041
2010-12-06 14:23:18 -08:00
Russ Cox
92bfd850e0 net: fix TestDialGoogle
TBR=r
CC=golang-dev
https://golang.org/cl/3417042
2010-12-06 14:07:36 -08:00
Yuval Pavel Zholkover
8221eb9103 8l, runtime: fix Plan 9 386 build.
8l was broken by commit 7ac0d2eed9, it caused .data to be page aligned in the file - which is not how Plan 9 expects things to be.
Also .rodata was layed out in a similar fashion.

Not sure when signame was introduced, but added a stub.
Removed the symo assignment in asm.c as it is not currently used.

Fix runtime breakage after commit 629c065d36 which prefixes all external symbols with runtime·.

R=rsc
CC=golang-dev
https://golang.org/cl/2674041
2010-12-06 16:38:28 -05:00
Eoghan Sherry
ff4e08f60d math: improve accuracy of Exp2
Note:
* Exp2 doesn't have a special case for very small arguments
* Exp2 hasn't been subject to a proper error analysis

Also:
* add tests for Exp2 with integer argument
* always test Go versions of Exp and Exp2

R=rsc
CC=Charlie Dorian, PeterGo, golang-dev
https://golang.org/cl/3481041
2010-12-06 16:24:51 -05:00
Russ Cox
6eee9ed507 time: fix build
Allow less precise timing on build machines.

TBR=r
CC=golang-dev
https://golang.org/cl/3391043
2010-12-06 16:22:32 -05:00
Rob Pike
42cfe48ffc use the new %U format for runes
R=rsc
CC=golang-dev
https://golang.org/cl/3483041
2010-12-06 14:38:25 -05:00
Rob Pike
53eaf40eba netchan: fix dumb locking bug introduced in recent editing.
-found by Dave Cheney

R=rsc
CC=golang-dev
https://golang.org/cl/3460042
2010-12-06 14:29:05 -05:00
Rob Pike
e26f9b3420 flag: fix format error in boolean error report. just use %q; the values are strings.
R=rsc
CC=golang-dev
https://golang.org/cl/3418043
2010-12-06 14:23:52 -05:00
Rob Pike
730e39cd13 fmt: add %U format for standard Unicode representation of integer values.
fmt.Printf("%U", 1) yields "U+0001"
It's essentially "U+%.4x" but lets you override the precision works in scan, too.

R=rsc
CC=golang-dev
https://golang.org/cl/3423043
2010-12-06 14:23:37 -05:00
Roger Peppe
e2d1595c81 time: make After use fewer goroutines and host processes.
With credit to Gustavo Niemeyer, who hinted at this approach
in #go-nuts.

R=adg, rsc, niemeyer, r
CC=golang-dev
https://golang.org/cl/3416043
2010-12-06 14:19:30 -05:00
Roger Peppe
415545e539 bytes: add Buffer.UnreadRune, Buffer.UnreadByte
R=rsc, r
CC=golang-dev
https://golang.org/cl/3421041
2010-12-06 14:10:10 -05:00
Luuk van Dijk
9a71bb00bb [68]l: generate debug info for builtin structured types. prettyprinting in gdb.
R=rsc
CC=golang-dev
https://golang.org/cl/3309041
2010-12-03 19:19:33 +01:00
Jamie Gennis
b88b38ac12 go/printer: preserve newlines in func parameter lists
Fixes #1179.

R=gri
CC=golang-dev
https://golang.org/cl/3225042
2010-12-02 10:42:10 -08:00
Stefan Nilsson
6f1835dce0 Sort: reduced stack depth to lg(n) in quickSort
Doing the tail recursion elimination explicitly
seems safer than leaving it to the compiler;
the code is still clean and easy to understand.

R=r, r2, gri
CC=golang-dev
https://golang.org/cl/3373041
2010-12-02 09:18:20 -08:00
Brad Fitzpatrick
042a7a81d3 http: consume request body before next request
Fixes #1306.

R=rsc
CC=golang-dev
https://golang.org/cl/3332043
2010-12-01 20:00:19 -08:00