Commit Graph

8701 Commits

Author SHA1 Message Date
Andrew Gerrand 0584eb2e77 [release-branch.r58] reflect: disallow Interface method on Value obtained via unexported name
Also remove exp/datafmt that depends on the broken reflect behavior.

««« CL 5267049 / eeca0d4a91a3
reflect: disallow Interface method on Value obtained via unexported name

Had been allowing it for use by fmt, but it is too hard to lock down.
Fix other packages not to depend on it.

R=r, r
CC=golang-dev
https://golang.org/cl/5266054
»»»

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5297042
2011-10-18 14:06:11 +11:00
Russ Cox adfa87c5d7 [release-branch.r58] cgo: handle new Apple LLVM-based gcc from Xcode 4.2
««« CL 4607045 / 142f0bc0d6e7
cgo: handle new Apple LLVM-based gcc from Xcode 4.2

That gcc does not include enumerator names and values
in its DWARF debug output.  Create a data block from which
we can read the values instead.

Fixes #1881.

R=iant
CC=golang-dev
https://golang.org/cl/4607045
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4708042
2011-07-12 10:19:11 -04:00
Russ Cox af97a0b94c [release-branch.r58] doc: document r58.1
««« CL 4700041 / 7c6b5a591a86
doc: document r58.1

R=adg, dsymonds
CC=golang-dev
https://golang.org/cl/4700041
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4701041
2011-07-12 01:41:46 -04:00
Russ Cox beca117ea3 [release-branch.r58] build: use awk instead of giant egrep regexp
««« CL 4603056 / 655a4be3968f
build: use awk instead of giant egrep regexp

Avoids buggy version of egrep on some Macs.

R=r, dsymonds
CC=golang-dev
https://golang.org/cl/4603056
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4695042
2011-07-11 23:38:12 -04:00
Russ Cox ecfec2c61a [release-branch.r58] runtime/cgo: fix for OS X 10.7
««« CL 4603057 / 0905a2ca94c6
runtime/cgo: fix for OS X 10.7

Correct a few error messages (libcgo -> runtime/cgo)
and delete old nacl_386.c file too.

Fixes #1657.

R=iant
CC=golang-dev
https://golang.org/cl/4603057
»»»

R=adg
CC=golang-dev
https://golang.org/cl/4698041
2011-07-11 23:38:02 -04:00
Andrew Gerrand fb10bce0c2 [release-branch.r58] document release.r58
««« CL 4643058 / 0a5e3e664637
document release.r58

R=rsc, r, bsiegert
CC=golang-dev
https://golang.org/cl/4643058
»»»

R=golang-dev
CC=golang-dev
https://golang.org/cl/4641084
2011-06-30 09:49:11 +10:00
Andrew Gerrand ff5182390a [release-branch.r58] gofix: fixes for os/signal changes
««« CL 4630056 / 8fe2bc5c3d53
gofix: fixes for os/signal changes

Fixes #1971.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/4630056

»»»

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4645071
2011-06-29 16:57:41 +10:00
Andrew Gerrand 36d155b2b5 [release-branch.r58] gopprof: update list of memory allocators
««« CL 4650048 / 09d52e36dab9
gopprof: update list of memory allocators

Also import new weblist command from Google version.

R=r, bradfitz
CC=golang-dev
https://golang.org/cl/4650048
»»»

R=rsc
CC=golang-dev
https://golang.org/cl/4654072
2011-06-29 15:40:29 +10:00
Andrew Gerrand f86856b083 [release-branch.r58] ld: dwarf emit filenames in debug_line header instead of as extended opcodes.
««« CL 4609043 / caaab1e64d49
ld: dwarf emit filenames in debug_line header instead of as extended opcodes.

Makes it possible for older tools like objdump to find the filenames,
fixes  objdump -d -l --start-address=0x400c00 --stop-address=0x400c36 6.out
fixes #1950

R=rsc
CC=golang-dev
https://golang.org/cl/4609043
»»»

R=rsc
CC=golang-dev
https://golang.org/cl/4648068
2011-06-29 15:38:55 +10:00
Andrew Gerrand f12a1d38b2 [release-branch.r58] 6g, 8g: fix goto fix
««« CL 4632041 / cbc2b570b2ca
6g, 8g: fix goto fix

R=ken2
CC=golang-dev
https://golang.org/cl/4632041
»»»

R=rsc
CC=golang-dev
https://golang.org/cl/4667046
2011-06-29 15:33:16 +10:00
Andrew Gerrand 3b32b3eb3d [release-branch.r58] gc: work around goto bug
««« CL 4629042 / ec3b60d1fe6e
gc: work around goto bug

R=ken2
CC=golang-dev
https://golang.org/cl/4629042
»»»

R=rsc
CC=golang-dev
https://golang.org/cl/4662063
2011-06-29 15:32:06 +10:00
Andrew Gerrand f70c7b2b63 [release-branch.r58] doc/faq: remove misleading FAQ entry
««« CL 4638046 / 9017f7cbac7d
doc/faq: remove misleading FAQ entry

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/4638046
»»»

R=r
CC=golang-dev
https://golang.org/cl/4648066
2011-06-29 15:00:27 +10:00
Andrew Gerrand 01a1c91696 [release-branch.r58] doc/faq: add question about converting from []T to []interface{}
««« CL 4639046 / 995095e59d58
doc/faq: add question about converting from []T to []interface{}

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4639046
»»»

R=r
CC=golang-dev
https://golang.org/cl/4630077
2011-06-29 14:58:01 +10:00
Andrew Gerrand dbdc8698df [release-branch.r58] doc/GoCourseDay1: shrink the PDF by rewriting it using ps2pdf.
««« CL 4626056 / b83d5dcc660d
doc/GoCourseDay1: shrink the PDF by rewriting it using ps2pdf.
No difference in content or appearance.
Forgot to do this when I updated this file a few days ago.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4626056
»»»

R=r
CC=golang-dev
https://golang.org/cl/4630076
2011-06-29 14:56:46 +10:00
Andrew Gerrand 47906598d8 [release-branch.r58] docs/GoCourseDay1.pdf: fix error in operator table.
««« CL 4637041 / df607ef238c9
docs/GoCourseDay1.pdf: fix error in operator table.
Communications op was listed as a binary; it isn't any more.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4637041
»»»

R=r
CC=golang-dev
https://golang.org/cl/4625076
2011-06-29 14:55:32 +10:00
Andrew Gerrand 0ea0d7b65c [release-branch.r58] docs: Update notes for 3-day Go course.
««« CL 4605041 / 71776ebc7416
docs: Update notes for 3-day Go course.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4605041
»»»

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4657058
2011-06-29 14:45:53 +10:00
Andrew Gerrand 35f3007cf1 create release-branch.r58 2011-06-29 13:46:53 +10:00
Andrew Gerrand 11b04261c7 weekly.2011-06-09
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4601052
2011-06-10 14:26:09 +10:00
Nigel Tao c0c824cd7b image: add Paletted.Set, and a basic test of the concrete image types.
R=r
CC=golang-dev
https://golang.org/cl/4589045
2011-06-10 14:07:29 +10:00
Andrew Gerrand d44c4c351d sync/atomic: fix arm check64 bug
R=r, rsc
CC=golang-dev
https://golang.org/cl/4571059
2011-06-10 13:50:19 +10:00
Dave Cheney 86183e43c9 gopack: make unused page function a fatal error
R=iant, rsc
CC=golang-dev
https://golang.org/cl/4601051
2011-06-09 22:41:19 -04:00
Brad Fitzpatrick 5e8b9c614b http: fix regression permitting io.Copy on HEAD response
With the ReadFrom change in the sendfile CL, it became
possible to illegally send a response to a HEAD request if you
did it via io.Copy.

Fixes #1939

R=rsc
CC=golang-dev
https://golang.org/cl/4584049
2011-06-09 18:10:21 -07:00
Dave Cheney aac6afbb11 gopack: remove warning from the use of mktemp
gcc-4.6 considers mktemp to be racey

R=golang-dev, rsc, iant
CC=golang-dev
https://golang.org/cl/4602050
2011-06-09 18:04:26 -07:00
David Symonds 63639dd237 mail: decode RFC 2047-encoded words, not phrases.
R=rsc, r, bradfitz
CC=golang-dev
https://golang.org/cl/4590047
2011-06-10 08:47:27 +10:00
Russ Cox 1fddbab736 5l: fix softfloat nits
Need to load math.a so that sqrtGoC is available.
Also was missing prototype.

R=ken2
CC=golang-dev
https://golang.org/cl/4517148
2011-06-09 18:38:25 -04:00
Russ Cox 900c5fa98e gc: compactframe breaks arm - fix build
R=lvd
CC=golang-dev
https://golang.org/cl/4591063
2011-06-09 18:28:27 -04:00
Luuk van Dijk fd2e24727e gc: nit
R=rsc
CC=golang-dev
https://golang.org/cl/4604041
2011-06-10 00:08:57 +02:00
Russ Cox 3e57d7f7bf 5l: delete dead code
Thumb code and ARM pre-V4 code is unused,
unmaintained, and almost certainly wrong by now.
Every time I try to change 5l I have to sort out
what's dead code and what's not.

30% of lines of code in this directory deleted.

R=ken2
CC=golang-dev
https://golang.org/cl/4601049
2011-06-09 18:07:56 -04:00
Luuk van Dijk 2ac375b2df gc: compact stackframe
After allocparams and walk, remove unused auto variables
and re-layout the remaining in reverse alignment order.

R=rsc
CC=golang-dev
https://golang.org/cl/4568068
2011-06-10 00:02:34 +02:00
Fan Hongjian fc41e621e8 math: add sqrt_arm.s and sqrtGoC.go as fallback to soft fp emulation
5a: add SQRTF and SQRTD
5l: add ASQRTF and ASQRTD

Use ARMv7 VFP VSQRT instruction to speed up math.Sqrt

R=rsc, dave, m
CC=golang-dev
https://golang.org/cl/4551082
2011-06-09 17:19:08 -04:00
Russ Cox 965ff4bb3a A+C: Fan Hongjian (individual CLA)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4591059
2011-06-09 17:18:28 -04:00
Quan Yong Zhai 439694125f runtime: improve memmove
check memory overlap

R=rsc, r, ken, edsrzf
CC=golang-dev
https://golang.org/cl/4602047
2011-06-09 16:49:47 -04:00
Russ Cox 17ca32e9db gc: nits
R=ken2
CC=golang-dev
https://golang.org/cl/4572052
2011-06-09 11:44:28 -04:00
Rob Pike 3a0a86888a AC: s/Jeffrey M Hodges/Jeff Hodges/
Formality rejected.

R=jeff
CC=golang-dev
https://golang.org/cl/4591057
2011-06-09 17:47:01 +10:00
Alex Brainman c3be760889 runtime: increase maximum number of windows callbacks
Fixes #1912.

R=rsc
CC=golang-dev
https://golang.org/cl/4591047
2011-06-09 10:29:25 +10:00
David Symonds ffd01f2a47 mail: decode "Q"-encoded mail addresses.
Supports ISO-8859-1 and UTF-8.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/4568064
2011-06-09 10:18:36 +10:00
Nigel Tao 833529fd6f compress/lzw: reduce decoder buffer size from 3*4096 to 2*4096.
This happens to speed up the decoder benchmarks by 50% on my computer
(GOARCH=amd64 GOOS=linux), but I don't have a good intuition as to why.
For example, just adding an unused [4096]byte field to the decoder
struct doesn't significantly change the numbers.

Before:

lzw.BenchmarkDecoder1e4	    5000	    488057 ns/op	  20.49 MB/s
lzw.BenchmarkDecoder1e5	     500	   4613638 ns/op	  21.67 MB/s
lzw.BenchmarkDecoder1e6	      50	  45672260 ns/op	  21.90 MB/s
lzw.BenchmarkEncoder1e4	    5000	    353563 ns/op	  28.28 MB/s
lzw.BenchmarkEncoder1e5	     500	   3431618 ns/op	  29.14 MB/s
lzw.BenchmarkEncoder1e6	      50	  34009640 ns/op	  29.40 MB/s

After:

lzw.BenchmarkDecoder1e4	    5000	    339725 ns/op	  29.44 MB/s
lzw.BenchmarkDecoder1e5	     500	   3166894 ns/op	  31.58 MB/s
lzw.BenchmarkDecoder1e6	      50	  31317260 ns/op	  31.93 MB/s
lzw.BenchmarkEncoder1e4	    5000	    354909 ns/op	  28.18 MB/s
lzw.BenchmarkEncoder1e5	     500	   3432710 ns/op	  29.13 MB/s
lzw.BenchmarkEncoder1e6	      50	  34010500 ns/op	  29.40 MB/s

R=rsc, r
CC=golang-dev
https://golang.org/cl/4535123
2011-06-09 09:50:38 +10:00
Brad Fitzpatrick 9c436ab7dc http: fix handling of 0-lengthed http requests
Via Russ Ross' bug report on golang-nuts, it was not possible
to send an HTTP request with a zero length body with either a
Content-Length (it was stripped) or chunking (it wasn't set).

This means Go couldn't upload 0-length objects to Amazon S3.
(which aren't as silly as they might sound, as S3 objects can
have key/values associated with them, set in the headers)

Amazon further doesn't supported chunked uploads. (not Go's
problem, but we should be able to let users set an explicit
Content-Length, even if it's zero.)

To fix the ambiguity of an explicit zero Content-Length and
the Request struct's default zero value, users need to
explicit set TransferEncoding to []string{"identity"} to force
the Request.Write to include a Content-Length: 0.  identity is
in RFC 2616 but is ignored pretty much everywhere.  We don't
even then serialize it on the wire, since it's kinda useless,
except as an internal sentinel value.

The "identity" value is then documented, but most users can
ignore that because NewRequest now sets that.

And adds more tests.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4603041
2011-06-08 15:59:23 -07:00
Brad Fitzpatrick 6a876283c8 http: change most map[string][]string types to new Values type
This replaces most the map[string][]string usage with
a new Values type name, with the usual methods.

It also changes client.PostForm to take a Values, rather
than a map[string]string, closing a TODO in the code.

R=rsc
CC=golang-dev
https://golang.org/cl/4532123
2011-06-08 13:38:20 -07:00
Robert Griesemer 013cfea362 gofmt: update test script so that it passes again
(TODO: should replace this with a Go program, eventually)

R=bradfitz
CC=golang-dev
https://golang.org/cl/4584047
2011-06-08 12:05:40 -07:00
Robert Griesemer 2de06655f1 big: removed some gratuitous +/-1's
R=mtj, bradfitz
CC=golang-dev
https://golang.org/cl/4584046
2011-06-08 11:24:24 -07:00
Robert Griesemer 636c5fac2d go spec: handle a corner case of a special case for shifts...
- Added some additional examples.
- 6g appears to implement this semantics already.

Fixes #658.

R=rsc, r, iant, ken
CC=golang-dev
https://golang.org/cl/4538119
2011-06-08 09:11:18 -07:00
Robert Griesemer a609a6bb63 ebnf: follow EBNF for EBNF faithfully
Apply analogous changes in godoc/spec.go.

Fixes #1829.

R=nmessenger, r
CC=golang-dev
https://golang.org/cl/4528127
2011-06-08 09:10:30 -07:00
Robert Griesemer 21032ebebd big: gobs for big rats
Fixes #1926.

R=r
CC=golang-dev
https://golang.org/cl/4550122
2011-06-08 09:10:01 -07:00
Yuval Pavel Zholkover 6c746328f7 os: fix Getenv for Plan 9. Truncate the rightmost char if it is '\0'.
R=mirtchovski, ality, taruti, rsc
CC=golang-dev
https://golang.org/cl/4386046
2011-06-08 09:44:03 -04:00
Jonathan Mark ddde52ae56 runtime: SysMap uses MAP_FIXED if needed on 64-bit Linux
This change was adapted from gccgo's libgo/runtime/mem.c at
Ian Taylor's suggestion.  It fixes all.bash failing with
"address space conflict: map() =" on amd64 Linux with kernel
version 2.6.32.8-grsec-2.1.14-modsign-xeon-64.
With this change, SysMap will use MAP_FIXED to allocate its desired
address space, after first calling mincore to check that there is
nothing else mapped there.

R=iant, dave, n13m3y3r, rsc
CC=golang-dev
https://golang.org/cl/4438091
2011-06-07 21:50:10 -07:00
Ian Lance Taylor bac24da2ac A+C: Jonathan Mark (individual CLA)
R=adg, rsc
CC=golang-dev
https://golang.org/cl/4595042
2011-06-07 21:49:24 -07:00
David Symonds 5c32c96f5c mail: format addresseses correctly.
Also remove an obsolete TODO while I'm here.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4588041
2011-06-08 13:32:47 +10:00
Dave Cheney 6998ea2982 gc: alternative clang compatible abort.
Tested on clang 2.9/amd64

R=rsc, jeff, r
CC=golang-dev
https://golang.org/cl/4517143
2011-06-08 10:46:15 +10:00
Michael T. Jones d5c45c541d big.nat: Improved speed of nat-to-string conversion
Three optimizations: First, special-case power of two bases
that partion a Word(), bases 2, 4, 16, and 256. These can
be moved directly from internal Word() storage to the output
without multiprecision operations. Next, same approach for
the other power-of-two bases, 8, 32, 64, and 128. These
don't fill a Word() evenly, so special handling is needed
for those cases where input spans the high-bits of one Word
and the low bis of the next one.  Finally, implement the
general case for others bases in 2 <= base <= 256 using
superbases, the largest power of base representable in a
Word(). For base ten, this is 9 digits and a superbase of
10^9 for 32-bit Words and 19 digits and 10^19 for 64-bit
compiles. This way we do just 1/9th or 1/19th of the expensive
multiprecision divisions, unpacking superdigits using fast
native machine arithmetic. The resulting code runs 7x to
800x the speed of the previous approach, depending on the
length of the number to be converted--longer is relatively
faster.

Also, extended the tests and benchmarks for string to nat
(scan()) and nat to string (string()) functions. A further
enhancement awaits the next CL to make general cases about
7x faster for long cases.

R=gri
CC=golang-dev
https://golang.org/cl/4595041
2011-06-07 16:02:34 -07:00