]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agohttp: make NewChunkedReader public
Andrew Balholm [Wed, 29 Jun 2011 19:27:53 +0000 (12:27 -0700)]
http: make NewChunkedReader public

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4634112

13 years agoC+A: add Andy Balholm
Brad Fitzpatrick [Wed, 29 Jun 2011 18:46:06 +0000 (11:46 -0700)]
C+A: add Andy Balholm

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

13 years agotesting: make ResetTimer not start/stop the timer
Russ Cox [Wed, 29 Jun 2011 14:26:16 +0000 (10:26 -0400)]
testing: make ResetTimer not start/stop the timer

R=r
CC=golang-dev
https://golang.org/cl/4626085

13 years agoreflect: support for struct tag use by multiple packages
Russ Cox [Wed, 29 Jun 2011 13:52:34 +0000 (09:52 -0400)]
reflect: support for struct tag use by multiple packages

Each package using struct field tags assumes that
it is the only package storing data in the tag.
This CL adds support in package reflect for sharing
tags between multiple packages.  In this scheme, the
tags must be of the form

        key:"value" key2:"value2"

(raw strings help when writing that tag in Go source).

reflect.StructField's Tag field now has type StructTag
(a string type), which has method Get(key string) string
that returns the associated value.

Clients of json and xml will need to be updated.
Code that says

        type T struct {
                X int "name"
        }

should become

        type T struct {
                X int `json:"name"`  // or `xml:"name"`
        }

Use govet to identify struct tags that need to be changed
to use the new syntax.

R=r, r, dsymonds, bradfitz, kevlar, fvbommel, n13m3y3r
CC=golang-dev
https://golang.org/cl/4645069

13 years agoruntime: windows/amd64 port
Wei Guangjing [Wed, 29 Jun 2011 07:37:56 +0000 (17:37 +1000)]
runtime: windows/amd64 port

R=rsc, alex.brainman, hectorchu, r
CC=golang-dev
https://golang.org/cl/3759042

13 years agogofix: fixes for os/signal changes
Robert Hencke [Wed, 29 Jun 2011 06:44:47 +0000 (16:44 +1000)]
gofix: fixes for os/signal changes

Fixes #1971.

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

13 years agoregexp: document that Regexp is thread-safe.
Rob Pike [Wed, 29 Jun 2011 05:41:09 +0000 (15:41 +1000)]
regexp: document that Regexp is thread-safe.

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

13 years agoexp/template: boolean constants
Rob Pike [Wed, 29 Jun 2011 05:02:04 +0000 (15:02 +1000)]
exp/template: boolean constants

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

13 years agoexp/regexp/syntax: incremental concat, alternate
Russ Cox [Wed, 29 Jun 2011 04:55:37 +0000 (00:55 -0400)]
exp/regexp/syntax: incremental concat, alternate
Also reuse of *Regexp nodes.

I believe this is the end of the parser.
The only non-execution code that remains is
the code to expand x{3,5} into simpler operations.

R=sam.thorogood, r
CC=golang-dev
https://golang.org/cl/4629078

13 years agocodereview: restrict sync to default branch
Russ Cox [Wed, 29 Jun 2011 04:45:29 +0000 (00:45 -0400)]
codereview: restrict sync to default branch

'default' is the name of the main branch,
the one that isn't a release branch.

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

13 years agogc: fix package quoting logic
Russ Cox [Wed, 29 Jun 2011 03:58:35 +0000 (23:58 -0400)]
gc: fix package quoting logic

The decision for when to say "hash/crc32".New instead of
crc32.New in an error was double-counting imports
from different packages or indirect imports, so it was
quoting even when there was no ambiguity.

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

13 years agogob: delete some unused bits from the GobEncoder/GobDecoder code.
Rob Pike [Wed, 29 Jun 2011 03:57:59 +0000 (13:57 +1000)]
gob: delete some unused bits from the GobEncoder/GobDecoder code.

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

13 years agoexp/template: fix build
Rob Pike [Wed, 29 Jun 2011 03:55:49 +0000 (13:55 +1000)]
exp/template: fix build
wrong path in Makefile. why didn't my all.bash fail?
TBR=dsymonds

R=dsymonds
CC=golang-dev
https://golang.org/cl/4630075

13 years agoexp/template: use MethodByName, add to build.
Rob Pike [Wed, 29 Jun 2011 03:44:13 +0000 (13:44 +1000)]
exp/template: use MethodByName, add to build.

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

13 years agoreflect: MethodByName
Rob Pike [Wed, 29 Jun 2011 03:11:49 +0000 (13:11 +1000)]
reflect: MethodByName
It's more common to ask for methods by name than by index, so might
as well make it easy to do so.

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

13 years agoruntime/cgo: fix build
Mikio Hara [Wed, 29 Jun 2011 02:26:31 +0000 (22:26 -0400)]
runtime/cgo: fix build

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

13 years agold: fix ELF strip by removing overlap of sections
Gustavo Niemeyer [Tue, 28 Jun 2011 21:28:30 +0000 (22:28 +0100)]
ld: fix ELF strip by removing overlap of sections

The gosymtab and gopclntab sections were pointing to the proper
data, but that data was already owned by the rodata section.
Some ELF references explicitly prohibit multiple sections from
owning the same data, and strip behaves accordingly.

The data for these sections was moved to after rodata, and the
gosymtab and gopclntab sections now own their respective ranges.

This change makes strip happy both with and without -s being
provided at link time.  Note that it won't remove these sections
because they are still allocated, and that's by design since
they are necessary at runtime for generating proper backtraces
and similar introspection operations.

Unlike the previous behavior, -s will now maintain zero-sized
gosymtab and gopclntab sections.  This makes the implementation
slightly cleaner.

Fixes #1242.

NOTE: Tested on Linux amd64/386/arm only.

R=ality, rsc
CC=golang-dev
https://golang.org/cl/4639077

13 years agocc: broken return is an error, not a warning
Russ Cox [Tue, 28 Jun 2011 20:00:55 +0000 (16:00 -0400)]
cc: broken return is an error, not a warning

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

13 years agoruntime: replace Semacquire/Semrelease implementation
Dmitriy Vyukov [Tue, 28 Jun 2011 19:09:53 +0000 (15:09 -0400)]
runtime: replace Semacquire/Semrelease implementation
1. The implementation uses distributed hash table of waitlists instead of a centralized one.
  It significantly improves scalability for uncontended semaphores.
2. The implementation provides wait-free fast-path for signalers.
3. The implementation uses less locks (1 lock/unlock instead of 5 for Semacquire).
4. runtime·ready() call is moved out of critical section.
5. Semacquire() does not call semwake().
Benchmark results on HP Z600 (2 x Xeon E5620, 8 HT cores, 2.40GHz)
are as follows:
benchmark                                        old ns/op    new ns/op    delta
runtime_test.BenchmarkSemaUncontended                58.20        36.30  -37.63%
runtime_test.BenchmarkSemaUncontended-2             199.00        18.30  -90.80%
runtime_test.BenchmarkSemaUncontended-4             327.00         9.20  -97.19%
runtime_test.BenchmarkSemaUncontended-8             491.00         5.32  -98.92%
runtime_test.BenchmarkSemaUncontended-16            946.00         4.18  -99.56%

runtime_test.BenchmarkSemaSyntNonblock               59.00        36.80  -37.63%
runtime_test.BenchmarkSemaSyntNonblock-2            167.00       138.00  -17.37%
runtime_test.BenchmarkSemaSyntNonblock-4            333.00       129.00  -61.26%
runtime_test.BenchmarkSemaSyntNonblock-8            464.00       130.00  -71.98%
runtime_test.BenchmarkSemaSyntNonblock-16          1015.00       136.00  -86.60%

runtime_test.BenchmarkSemaSyntBlock                  58.80        36.70  -37.59%
runtime_test.BenchmarkSemaSyntBlock-2               294.00       149.00  -49.32%
runtime_test.BenchmarkSemaSyntBlock-4               333.00       177.00  -46.85%
runtime_test.BenchmarkSemaSyntBlock-8               471.00       221.00  -53.08%
runtime_test.BenchmarkSemaSyntBlock-16              990.00       227.00  -77.07%

runtime_test.BenchmarkSemaWorkNonblock              829.00       832.00   +0.36%
runtime_test.BenchmarkSemaWorkNonblock-2            425.00       419.00   -1.41%
runtime_test.BenchmarkSemaWorkNonblock-4            308.00       220.00  -28.57%
runtime_test.BenchmarkSemaWorkNonblock-8            394.00       147.00  -62.69%
runtime_test.BenchmarkSemaWorkNonblock-16          1510.00       149.00  -90.13%

runtime_test.BenchmarkSemaWorkBlock                 828.00       813.00   -1.81%
runtime_test.BenchmarkSemaWorkBlock-2               428.00       436.00   +1.87%
runtime_test.BenchmarkSemaWorkBlock-4               232.00       219.00   -5.60%
runtime_test.BenchmarkSemaWorkBlock-8               392.00       251.00  -35.97%
runtime_test.BenchmarkSemaWorkBlock-16             1524.00       298.00  -80.45%

sync_test.BenchmarkMutexUncontended                  24.10        24.00   -0.41%
sync_test.BenchmarkMutexUncontended-2                12.00        12.00   +0.00%
sync_test.BenchmarkMutexUncontended-4                 6.25         6.17   -1.28%
sync_test.BenchmarkMutexUncontended-8                 3.43         3.34   -2.62%
sync_test.BenchmarkMutexUncontended-16                2.34         2.32   -0.85%

sync_test.BenchmarkMutex                             24.70        24.70   +0.00%
sync_test.BenchmarkMutex-2                          208.00        99.50  -52.16%
sync_test.BenchmarkMutex-4                         2744.00       256.00  -90.67%
sync_test.BenchmarkMutex-8                         5137.00       556.00  -89.18%
sync_test.BenchmarkMutex-16                        5368.00      1284.00  -76.08%

sync_test.BenchmarkMutexSlack                        24.70        25.00   +1.21%
sync_test.BenchmarkMutexSlack-2                    1094.00       186.00  -83.00%
sync_test.BenchmarkMutexSlack-4                    3430.00       402.00  -88.28%
sync_test.BenchmarkMutexSlack-8                    5051.00      1066.00  -78.90%
sync_test.BenchmarkMutexSlack-16                   6806.00      1363.00  -79.97%

sync_test.BenchmarkMutexWork                        793.00       792.00   -0.13%
sync_test.BenchmarkMutexWork-2                      398.00       398.00   +0.00%
sync_test.BenchmarkMutexWork-4                     1441.00       308.00  -78.63%
sync_test.BenchmarkMutexWork-8                     8532.00       847.00  -90.07%
sync_test.BenchmarkMutexWork-16                    8225.00      2760.00  -66.44%

sync_test.BenchmarkMutexWorkSlack                   793.00       793.00   +0.00%
sync_test.BenchmarkMutexWorkSlack-2                 418.00       414.00   -0.96%
sync_test.BenchmarkMutexWorkSlack-4                4481.00       480.00  -89.29%
sync_test.BenchmarkMutexWorkSlack-8                6317.00      1598.00  -74.70%
sync_test.BenchmarkMutexWorkSlack-16               9111.00      3038.00  -66.66%

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

13 years agofmt: rename errno and error to err for doc consistency
Brad Fitzpatrick [Tue, 28 Jun 2011 18:00:31 +0000 (11:00 -0700)]
fmt: rename errno and error to err for doc consistency

The public godoc looked confused. I imagine these were
written before current conventions were established.

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

13 years agoruntime/cgo: check for errors from pthread_create
Albert Strasheim [Tue, 28 Jun 2011 16:04:50 +0000 (12:04 -0400)]
runtime/cgo: check for errors from pthread_create

R=rsc, iant, dvyukov
CC=golang-dev
https://golang.org/cl/4643057

13 years agoruntime: add Semacquire/Semrelease benchmarks
Dmitriy Vyukov [Tue, 28 Jun 2011 15:15:24 +0000 (11:15 -0400)]
runtime: add Semacquire/Semrelease benchmarks

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

13 years agosync: add fast path to Once
Dmitriy Vyukov [Tue, 28 Jun 2011 13:43:01 +0000 (09:43 -0400)]
sync: add fast path to Once
The implementation does not grab the lock,
if Once is already initalized.
Benchmark results on HP Z600 (2 x Xeon E5620, 8 HT cores, 2.40GHz)
are as follows:
benchmark                                        old ns/op    new ns/op    delta
sync_test.BenchmarkOnce                             187.00        14.00  -92.51%
sync_test.BenchmarkOnce-2                           909.00        21.40  -97.65%
sync_test.BenchmarkOnce-4                          3684.00        20.90  -99.43%
sync_test.BenchmarkOnce-8                          5987.00        23.00  -99.62%
sync_test.BenchmarkOnce-16                         5051.00        21.60  -99.57%

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4641066

13 years agoAdd the beginnings of the template execution code. Lots still to do,
Rob Pike [Tue, 28 Jun 2011 13:04:08 +0000 (23:04 +1000)]
Add the beginnings of the template execution code.  Lots still to do,
including evaluation up the data tree (in this code all fields must be
in dot itself), plus more control structure, but the basics are in place.

R=rsc, r
CC=golang-dev
https://golang.org/cl/4665041

13 years agosync: replace Mutex benchmarks
Dmitriy Vyukov [Tue, 28 Jun 2011 12:14:54 +0000 (08:14 -0400)]
sync: replace Mutex benchmarks
For both contended and uncontended case:
 - support arbitrary number of cpus (not just 2)
 - dynamic load balancing (improves stability)
 - periodic execution of Gosched() to work around non-preemptiviness
For uncontended case eliminates possible false-sharing.
For contended case includes additional variation with some
amount of local work between mutex operations.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4634093

13 years agoio.WriteString: if the object has a WriteString method, use it
Evan Shaw [Tue, 28 Jun 2011 06:10:39 +0000 (16:10 +1000)]
io.WriteString: if the object has a WriteString method, use it

This avoids allocation when writing to bytes.Buffers and bufio.Writers, for
example.

R=golang-dev, rsc, r, consalus, r
CC=golang-dev
https://golang.org/cl/4625068

13 years agobuilder: minor fixes
Andrew Gerrand [Tue, 28 Jun 2011 06:01:52 +0000 (16:01 +1000)]
builder: minor fixes

R=golang-dev, gri, bradfitz
CC=golang-dev
https://golang.org/cl/4634050

13 years agomime/multipart: parse LF-delimited messages, not just CRLF
Brad Fitzpatrick [Tue, 28 Jun 2011 04:59:51 +0000 (21:59 -0700)]
mime/multipart: parse LF-delimited messages, not just CRLF

Against the spec, but appear in the wild.

Fixes #1966

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

13 years agoexp/regexp/syntax: case-folding in character classes
Russ Cox [Tue, 28 Jun 2011 03:23:51 +0000 (23:23 -0400)]
exp/regexp/syntax: case-folding in character classes

Also fix \x{123} parsing.

R=r
CC=golang-dev
https://golang.org/cl/4632052

13 years agoruntime: another attempt to allow stdcall to be used from both 386 and amd64 arch
Alex Brainman [Tue, 28 Jun 2011 02:46:16 +0000 (12:46 +1000)]
runtime: another attempt to allow stdcall to be used from both 386 and amd64 arch

R=rsc
CC=golang-dev, vcc.163
https://golang.org/cl/4627071

13 years agocc: add two new #pragma varargck
Russ Cox [Tue, 28 Jun 2011 02:42:34 +0000 (22:42 -0400)]
cc: add two new #pragma varargck

#pragma varargck countpos f 1
says that the first argument to f is
the count of variadic arguments that follow.

#pragma varargck type f t
says that t is one of the allowed types for
a variadic argument to f.
(can be repeated)

combined, these can be used to check the
runtime.stdcall functions in the windows port
or in any other port that needs a vararg list of
uintptrs even on a 64-bit platform (where it is
very easy to pass a less-than-uintptr in the ...).

demo:

typedef unsigned int uintptr;

#pragma varargck countpos f 1
#pragma varargck type f uintptr
#pragma varargck type f void*

int f(int count, ...);

void *v;
char *p;

void
main(void)
{
        f(1, v);  // ok
        f(1, main);  // ok
        f(1, p);  // ok
        f(2, v, v);  // ok

        f(2, v);  // found 1 argument after count 2
        f(1, 'a');  // invalid type INT in call to f
        f(1, 0);  // invalid type INT in call to f
}

R=ken, r, alex.brainman
CC=golang-dev
https://golang.org/cl/4634103

13 years agoos: simplify WriteString
Rob Pike [Tue, 28 Jun 2011 01:09:21 +0000 (11:09 +1000)]
os: simplify WriteString
It was working too hard.

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

13 years agoexp/regexp/syntax: compiled form
Russ Cox [Mon, 27 Jun 2011 23:52:59 +0000 (19:52 -0400)]
exp/regexp/syntax: compiled form

R=r, sam.thorogood, kevlar
CC=golang-dev, rsc
https://golang.org/cl/4636046

13 years agostrings.Split: make the default to split all.
Rob Pike [Mon, 27 Jun 2011 23:43:14 +0000 (09:43 +1000)]
strings.Split: make the default to split all.
Change the signature of Split to have no count,
assuming a full split, and rename the existing
Split with a count to SplitN.
Do the same to package bytes.
Add a gofix module.

R=adg, dsymonds, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/4661051

13 years agosyscall: support for tty options in StartProcess
Ken Rockot [Mon, 27 Jun 2011 23:07:49 +0000 (19:07 -0400)]
syscall: support for tty options in StartProcess

These are the relevant changes to exec_unix.go now that
mkerrors.sh outputs have been updated.

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

13 years agoxml: add Marshal and MarshalIndent
Kyle Lemons [Mon, 27 Jun 2011 23:07:28 +0000 (19:07 -0400)]
xml: add Marshal and MarshalIndent

I have written up a Marshal and MarshalIndent pair that should
closely reflect the way that Unmarshal works.  I would love feedback
on making this code more accessible and efficient... I haven't used
reflecton on this scale before, so there is probably a lot of work
that can be done on that.

Some potentially controversial things:
- All tag names are lower-cased by default.
- Zero-valued struct values are skipped.
- No namespace prefix (o:tag, etc) mechanism is supplied.
- You are allowed to marshal non-struct values (even though unmarshal
  cannot handle them).
- A tag for a non-XMLName struct field that isn't "attr", "chardata",
  or "innerxml" is used as the name of the tag.  This could wreak
  havoc if you try to marshal a protobuf struct.
- The "innerxml" and "chardata" are inserted verbatim.  If you try to
  marshal something straight from unmarshal, the results could be
  unexpected (remove "innerxml" support from Marshal would be one
  possible solution).

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

13 years agoCONTRIBUTORS: update Rietveld address for Kyle Lemons
Russ Cox [Mon, 27 Jun 2011 23:07:22 +0000 (19:07 -0400)]
CONTRIBUTORS: update Rietveld address for Kyle Lemons

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

13 years agohttp: respect Handlers setting Connection: close in their response
Brad Fitzpatrick [Mon, 27 Jun 2011 22:53:48 +0000 (15:53 -0700)]
http: respect Handlers setting Connection: close in their response

Fixes #2011

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

13 years agotesting: scale benchmark precision to 0.01ns if needed
Russ Cox [Mon, 27 Jun 2011 22:50:27 +0000 (18:50 -0400)]
testing: scale benchmark precision to 0.01ns if needed

R=dvyukov, r
CC=golang-dev
https://golang.org/cl/4657053

13 years agogc: avoid package name ambiguity in error messages
Russ Cox [Mon, 27 Jun 2011 22:44:30 +0000 (18:44 -0400)]
gc: avoid package name ambiguity in error messages

Fixes #2006.

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

13 years agohttp: add FileSystem interface, make FileServer use it
Brad Fitzpatrick [Mon, 27 Jun 2011 22:26:36 +0000 (15:26 -0700)]
http: add FileSystem interface, make FileServer use it

Permits serving from virtual filesystems, such as files linked
into a binary, or from a zip file.

Also adds a gofix for:

http.FileServer(root, prefix) -> http.StripPrefix(prefix, http.FileServer(http.Dir(root)))

R=r, rsc, gri, adg, dsymonds, r, gri
CC=golang-dev
https://golang.org/cl/4629047

13 years agobufio: do not cache Read errors
Graham Miller [Mon, 27 Jun 2011 20:12:04 +0000 (16:12 -0400)]
bufio: do not cache Read errors

Reader previously had cached an error from the underlying reader
and would return it on every subsequent call to Read.  The Reader
will now return the error only once, and subsequent calls will result
in a new Read call to the underlying Reader.

Fixes #1934.

R=bradfitz, rogpeppe, rsc
CC=golang-dev
https://golang.org/cl/4528133

13 years agosync: add benchmark for Once.
Dmitriy Vyukov [Mon, 27 Jun 2011 20:02:13 +0000 (16:02 -0400)]
sync: add benchmark for Once.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4650054

13 years ago8a: fixes for Plan 9 build
Lucio De Re [Mon, 27 Jun 2011 18:42:18 +0000 (14:42 -0400)]
8a: fixes for Plan 9 build

8a/a.h:
. Removed <u.h> and <libc.h> includes as they work better in "a.y".
. Made definition of EOF conditional as it's defined in the Plan 9
  header files, but not elsewhere.

8a/a.y:
. Added <u.h> and <libc.h> because <stdio.h> in Plan 9 needs them.
  Sequence <u.h>, <stdio.h>, <libc.h> recommended by RSC.

8a/lex.c:
. Added <u.h> and <libc.h> as now needed by "a.h".
. Dropped <ctype.h>.

cc/lexbody:
. exit() -> exits().
. Dropped unwanted incrementation.

cc/macbody:
. Adjusted a few format specifications.

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

13 years agold: elide the Go symbol table when using -s
Anthony Martin [Mon, 27 Jun 2011 18:39:38 +0000 (14:39 -0400)]
ld: elide the Go symbol table when using -s

R=rsc, n13m3y3r, gustavo
CC=golang-dev
https://golang.org/cl/4661050

13 years agobuild: use correct list of required programs
Russ Cox [Mon, 27 Jun 2011 18:30:02 +0000 (14:30 -0400)]
build: use correct list of required programs

R=golang-dev, bradfitz, go.peter.90
CC=golang-dev
https://golang.org/cl/4627068

13 years agohttp: add StripPrefix handler wrapper
Brad Fitzpatrick [Mon, 27 Jun 2011 18:03:43 +0000 (11:03 -0700)]
http: add StripPrefix handler wrapper

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

13 years agocodereview: make --ignore_hgpatch_failure work again
Russ Cox [Mon, 27 Jun 2011 17:45:17 +0000 (13:45 -0400)]
codereview: make --ignore_hgpatch_failure work again

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4627067

13 years agohttp: do TLS handshake explicitly before copying TLS state
Brad Fitzpatrick [Mon, 27 Jun 2011 17:37:33 +0000 (10:37 -0700)]
http: do TLS handshake explicitly before copying TLS state

Previously we were snapshotting the TLS state into *Request
before we did the HTTP ReadRequest, the first Read of which
triggered the TLS handshake implicitly.

Fixes #1956

R=golang-dev, rsc
CC=agl, golang-dev
https://golang.org/cl/4630072

13 years agogotest: add -test.benchtime and -test.cpu flags.
Dmitriy Vyukov [Mon, 27 Jun 2011 17:31:40 +0000 (13:31 -0400)]
gotest: add -test.benchtime and -test.cpu flags.
-test.benchtime allows to specify benchmark execution time.
-test.cpu allows to execute tests/benchmarks for several
values of GOMAXPROCS.

R=r, r, rsc
CC=golang-dev
https://golang.org/cl/4662046

13 years ago5l, 6l, 8l: drop use of ed during build
Russ Cox [Mon, 27 Jun 2011 16:03:19 +0000 (12:03 -0400)]
5l, 6l, 8l: drop use of ed during build

build runs with chmod 0 /bin/ed now

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4635071

13 years agosyscall: regenerate zerrors for darwin/linux/freebsd
Russ Cox [Mon, 27 Jun 2011 15:02:32 +0000 (11:02 -0400)]
syscall: regenerate zerrors for darwin/linux/freebsd

did darwin on mac with older, not broken xcode.
did linux arm by copying diffs from linux 386.
did freebsd amd64 by copying diffs from freebsd 386.

R=golang-dev, r, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/4629067

13 years agocrypto: replace "crypto/block" with "crypto/cipher" in comments
Dmitry Chestnykh [Mon, 27 Jun 2011 13:16:42 +0000 (09:16 -0400)]
crypto: replace "crypto/block" with "crypto/cipher" in comments

Documentation mentioned the obsolete package "crypto/block",
which has been replaced with "crypto/cipher".

R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/4654064

13 years agogofix: fixes for path/filepath changes
Robert Hencke [Sun, 26 Jun 2011 01:24:28 +0000 (11:24 +1000)]
gofix: fixes for path/filepath changes

Fixes #1970.

R=rsc, r
CC=golang-dev
https://golang.org/cl/4650050

13 years agogofix: fixes for sort changes
Robert Hencke [Sat, 25 Jun 2011 22:48:53 +0000 (08:48 +1000)]
gofix: fixes for sort changes

Fixes #1969.

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

13 years agoebnflint: better handling of stdin
Robert Griesemer [Sat, 25 Jun 2011 00:29:19 +0000 (17:29 -0700)]
ebnflint: better handling of stdin

- don't rely on /dev/stdin as the name for standard input
- employ EBNF extraction if the source contains tags

"cat source.html | ebnflint" works now

R=r
CC=golang-dev
https://golang.org/cl/4641075

13 years agofmt: Added SkipSpace() function to fmt's ScanState interface.
Michael T. Jones [Sat, 25 Jun 2011 00:26:45 +0000 (17:26 -0700)]
fmt: Added SkipSpace() function to fmt's ScanState interface.

Users of the Scan() infrastructure that employ ReadRune() rather than
Token() need a way to skip leading spaces and newlines as set by the
the parent, Fscan(), Fscanln, or Fscanf(). As the internal methods and
boolean flags are not exported, this new function was added here and
in the Int and Nat Scan() functions of the big package. (fmt.Rat did
not need change since it uses Token()) Also added Printf style format
code support to int types and tests for same to int_test.go

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

13 years agohttp: better handling of 0-length Request.Body
Brad Fitzpatrick [Fri, 24 Jun 2011 23:46:14 +0000 (16:46 -0700)]
http: better handling of 0-length Request.Body

As rsc suggested after change 58a6bdac3d12 was committed, we
now read the first byte of Request.Body when the
Request.ContentLength is 0 to disambiguate between a truly
zero-length body and a body of unknown length where the user
didn't set the ContentLength field.

This was also causing the reverse proxy problem where incoming
requests (which always have a body, of private type http.body,
even for 0-lengthed requests) were being relayed to the http
Transport for fetching, which was serializing the request as a
chunked request (since ContentLength was 0 and Body was
non-nil)

Fixes #1999

R=golang-dev, kevlar
CC=golang-dev
https://golang.org/cl/4628063

13 years agohttp: assume ContentLength 0 on GET requests
Brad Fitzpatrick [Fri, 24 Jun 2011 20:48:12 +0000 (13:48 -0700)]
http: assume ContentLength 0 on GET requests

Incremental step in fix for issue 1999

R=golang-dev, kevlar
CC=golang-dev
https://golang.org/cl/4667041

13 years agomime: lower-case media type parameters
Pascal S. de Kloe [Fri, 24 Jun 2011 18:32:06 +0000 (11:32 -0700)]
mime: lower-case media type parameters
        RFC 1521 section 4 states "The type, subtype, and parameter names are not case sensitive.".

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4648047

13 years agoos: remove duplicate package description
Robert Hencke [Fri, 24 Jun 2011 18:23:49 +0000 (11:23 -0700)]
os: remove duplicate package description

file.go contains a more complete package description.

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

13 years agomisc/emacs: update list of builtins.
Quan Yong Zhai [Fri, 24 Jun 2011 18:19:48 +0000 (11:19 -0700)]
misc/emacs: update list of builtins.

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

13 years agopath/filepath: enable TestWalk to run on windows
Alex Brainman [Fri, 24 Jun 2011 09:18:59 +0000 (19:18 +1000)]
path/filepath: enable TestWalk to run on windows

R=golang-dev
CC=golang-dev
https://golang.org/cl/4630066

13 years agotag weekly.2011-06-23
Andrew Gerrand [Fri, 24 Jun 2011 06:18:39 +0000 (16:18 +1000)]
tag weekly.2011-06-23

R=r
CC=golang-dev
https://golang.org/cl/4635067

13 years agoweekly.2011-06-23 weekly.2011-06-23
Andrew Gerrand [Fri, 24 Jun 2011 06:04:17 +0000 (16:04 +1000)]
weekly.2011-06-23

R=golang-dev, robert.hencke, r
CC=golang-dev
https://golang.org/cl/4625062

13 years agoos: fixed PathListSeparator to ';' for windows.
Yasuhiro Matsumoto [Fri, 24 Jun 2011 05:00:59 +0000 (15:00 +1000)]
os: fixed PathListSeparator to ';' for windows.
Fixed issue 1992

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/4661047

13 years agohttp: buffer Request.Write
Brad Fitzpatrick [Fri, 24 Jun 2011 04:10:51 +0000 (21:10 -0700)]
http: buffer Request.Write

Fixes #1996

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

13 years agoruntime: don't use twice the memory with grsec-like kernels
Gustavo Niemeyer [Fri, 24 Jun 2011 03:29:59 +0000 (00:29 -0300)]
runtime: don't use twice the memory with grsec-like kernels

grsec needs the FIXED flag to be provided to mmap, which
works now.  That said, when the allocation fails to be made
in the specific address, we're still given back a writable
page.  This change will unmap that page to avoid using
twice the amount of memory needed.

It'd also be pretty easy to avoid the extra system calls
once we detected that the flag is needed, but I'm not sure
if that edge case is worth the effort.

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

13 years agogoinstall: build with make by default, add -make flag
Andrew Gerrand [Fri, 24 Jun 2011 03:01:17 +0000 (13:01 +1000)]
goinstall: build with make by default, add -make flag

This is a temporary measure until go/build can build cgo packages.

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

13 years agomime/multipart: remove newline at top of the multipart.
Yasuhiro Matsumoto [Thu, 23 Jun 2011 17:11:33 +0000 (10:11 -0700)]
mime/multipart: remove newline at top of the multipart.

R=golang-dev, bradfitz, arctanofyourface
CC=golang-dev
https://golang.org/cl/4635063

13 years agolibmach: fix disassembly of FCMOVcc and FCOMI
Anthony Martin [Thu, 23 Jun 2011 13:32:29 +0000 (09:32 -0400)]
libmach: fix disassembly of FCMOVcc and FCOMI

The optable for 0xDB is handled specially.

This was the cause of a really weird bug
when using cov (386!) on the math package.

A real head-scratcher.

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

13 years agolibmach: fix tracing on linux (for cov)
Anthony Martin [Thu, 23 Jun 2011 03:24:14 +0000 (23:24 -0400)]
libmach: fix tracing on linux (for cov)

R=rsc, dave
CC=golang-dev
https://golang.org/cl/4629064

13 years ago5c: do not use R9 and R10
Russ Cox [Thu, 23 Jun 2011 03:22:36 +0000 (23:22 -0400)]
5c: do not use R9 and R10

This program used to use R9 and R10.
Now it fails to compile (out of registers).
I used to know a simpler test but can't remember it.

Learned something new: Rietveld refuses change
list descriptions bigger than 10 kB.

int sum(int x, int y, int z, int w) {
        return
        (((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))))*
        ((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))))*
        (((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))))*
        ((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))))
        ;
}

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

13 years agoexec: LookPath should not search %PATH% for files like c:cmd.exe
Alex Brainman [Thu, 23 Jun 2011 00:56:53 +0000 (10:56 +1000)]
exec: LookPath should not search %PATH% for files like c:cmd.exe

R=golang-dev
CC=golang-dev
https://golang.org/cl/4632055

13 years agoexp/template: make -0 be an unsigned int.
Rob Pike [Thu, 23 Jun 2011 00:19:29 +0000 (10:19 +1000)]
exp/template: make -0 be an unsigned int.
Fix (inconsequential) type error in list initializer.

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

13 years agogo/build: include Import objects in Script Inputs
Andrew Gerrand [Thu, 23 Jun 2011 00:15:46 +0000 (10:15 +1000)]
go/build: include Import objects in Script Inputs

This has the effect of making goinstall rebuild a package's
dependencies when they are newer than the current package object.

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

13 years agonet, syscall: interface for windows
Yasuhiro Matsumoto [Wed, 22 Jun 2011 23:54:57 +0000 (09:54 +1000)]
net, syscall: interface for windows

R=mikioh.mikioh, alex.brainman, rsc, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4590050

13 years agoio: clarify Read, ReadAt, Copy, Copyn EOF behavior
Russ Cox [Wed, 22 Jun 2011 23:33:07 +0000 (19:33 -0400)]
io: clarify Read, ReadAt, Copy, Copyn EOF behavior

R=golang-dev, bradfitz, iant, dsymonds, nigeltao, r
CC=golang-dev
https://golang.org/cl/4629062

13 years agoFirst cut at the parser for the new template package.
Rob Pike [Wed, 22 Jun 2011 23:27:28 +0000 (09:27 +1000)]
First cut at the parser for the new template package.

This is not a full grammar, but the pieces are there to implement whatever we converge on.

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

13 years agoexec: better error message for windows LookPath
Alex Brainman [Wed, 22 Jun 2011 23:16:20 +0000 (09:16 +1000)]
exec: better error message for windows LookPath

Fixes #1991.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4648049

13 years agoimage: basic test for the 16-bits-per-color-channel types.
Nigel Tao [Wed, 22 Jun 2011 22:39:00 +0000 (08:39 +1000)]
image: basic test for the 16-bits-per-color-channel types.

R=r
CC=golang-dev
https://golang.org/cl/4635059

13 years agosyscall: add tty support to StartProcess
Ken Rockot [Wed, 22 Jun 2011 22:07:20 +0000 (18:07 -0400)]
syscall: add tty support to StartProcess

These changes add a Ctty int field to the Unix syscall.ProcAttr which,
if set >= 0 in conjuction with Setsid=true, will be used by
forkAndExecInChild as the file descriptor for the new child's
controlling terminal.

Necessary changes have been made to mkerrors.sh to generate defs for
TIOC*, though changes to its output files are not included here.
The changes made should support Linux, FreeBSD and Darwin, at least.

R=iant, bradfitz, r, rsc, borman
CC=golang-dev
https://golang.org/cl/4532075

13 years agoA+C: Ken Rockot (individual CLA)
Russ Cox [Wed, 22 Jun 2011 22:07:08 +0000 (18:07 -0400)]
A+C: Ken Rockot (individual CLA)

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

13 years agobuild: explain $PWD use
Russ Cox [Wed, 22 Jun 2011 21:00:46 +0000 (17:00 -0400)]
build: explain $PWD use

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

13 years agosync: restore GOMAXPROCS during benchmarks
Dmitriy Vyukov [Wed, 22 Jun 2011 20:20:37 +0000 (16:20 -0400)]
sync: restore GOMAXPROCS during benchmarks

R=golang-dev
CC=dvyukov, golang-dev
https://golang.org/cl/4631060

13 years agold: don't attempt to build dynamic sections unnecessarily
Gustavo Niemeyer [Wed, 22 Jun 2011 19:12:22 +0000 (15:12 -0400)]
ld: don't attempt to build dynamic sections unnecessarily

This prevents ld from generating zeroed symtab entries for
sections that aren't going to be generated because dynamic
linkage has been disabled (-d was used or no dynamic libs
were seen).  Even though they were not explicitly added by
doelf, the section creation process was making them
reachable again.

The windows head is being disconsidered for this because
apparently it's not taking into account debug['d'].

This makes elflint 0.1% happier.

R=golang-dev, rsc, gustavo
CC=golang-dev
https://golang.org/cl/4638050

13 years agoFix Windows build; ErrorString->NewError
Brad Fitzpatrick [Wed, 22 Jun 2011 18:33:30 +0000 (11:33 -0700)]
Fix Windows build; ErrorString->NewError

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

13 years agoos.Error API: don't export os.ErrorString, use os.NewError consistently
Robert Griesemer [Wed, 22 Jun 2011 17:52:47 +0000 (10:52 -0700)]
os.Error API: don't export os.ErrorString, use os.NewError consistently

This is a core API change.

1) gofix misc src
2) Manual adjustments to the following files under src/pkg:
   gob/decode.go
   rpc/client.go
   os/error.go
   io/io.go
   bufio/bufio.go
   http/request.go
   websocket/client.go
as well as:
   src/cmd/gofix/testdata/*.go.in (reverted)
   test/fixedbugs/bug243.go
3) Implemented gofix patch (oserrorstring.go) and test case (oserrorstring_test.go)

Compiles and runs all tests.

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

13 years agogodefs: remove test from build
Russ Cox [Wed, 22 Jun 2011 01:45:13 +0000 (21:45 -0400)]
godefs: remove test from build

The test is only defined on darwin/amd64, and it fails
with recent versions of Xcode, which do not support
-gstabs+ debugging output.  At some point godefs will
have to be replaced, perhaps merged with cgo.
Godefs is not needed during builds anyway (its output files
are checked into the repository in src/pkg/runtime),
so its failure on the newer Xcode is a distraction from an
otherwise usable build.  Disable the test.

Fixes #1985.

R=golang-dev, gri, robert.hencke, r
CC=golang-dev
https://golang.org/cl/4638053

13 years agocrypto/openpgp: add ElGamal support.
Adam Langley [Wed, 22 Jun 2011 01:00:49 +0000 (21:00 -0400)]
crypto/openpgp: add ElGamal support.

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

13 years ago8l: more fixes for Plan 9
Lucio De Re [Tue, 21 Jun 2011 16:14:32 +0000 (12:14 -0400)]
8l: more fixes for Plan 9

Once these changes are effected, it is possible to construct
"8l" native on a (386?) Plan 9 system, albeit with assistance
from modules such as mkfiles that are not (yet) included in any
public patches.

8l/asm.c:
. Corrected some format qualifiers.

8l/list.c:
. Cast a print() argument to (int) to match the given format.
  It may be possible to change the format (%R), but I have not
  looked into it.

8l/obj.c:
. Removed some unused code.

8l/span.c:
. Removed unnecessary incrementation on "bp".
. Corrected some format qualifiers.

ld/data.c:
. Corrected some format qualifiers.
. Cast print argument to (int): used as field size.
. Use braces to suppress warning about empty if() statements.

ld/dwarf.c:
. Trivial spelling mistake in comment.

ld/ldelf.c:
. Added USED() statements to silence warnings.
. Dropped redundant address (&) operators.
. corrected some format qualifiers.
. Cast to (int) for switch selection variable.

ld/macho.c:
. Added USED() statements to silence warnings.

ld/ldpe.c:
. Added USED() statements to silence warnings.
. More careful use of "sect" variable.
. Corrected some format qualifiers.
. Removed redundant assignments.
. Minor fix dropped as it was submitted separately.

ld/pe.c:
. Dropped <time.h> which is now in <u.h>.
. Dropped redundant address (&) operators.
. Added a missing variable initialisation.

ld/symtab.c:
. Added USED() statements to silence warnings.
. Removed redundant incrementation.
. Corrected some format qualifiers.

All the above have been tested against a (very) recent release
and do not seem to trigger any regressions.

All review suggestions have been incorporated.

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

13 years agonacl, tiny: remove vestiges
Robert Hencke [Tue, 21 Jun 2011 16:02:40 +0000 (12:02 -0400)]
nacl, tiny: remove vestiges

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/4635053

13 years agogopprof: update list of memory allocators
Russ Cox [Tue, 21 Jun 2011 15:27:08 +0000 (11:27 -0400)]
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

13 years agogoinstall: undo 1ad616fb313d (always rebuild...)
Andrew Gerrand [Tue, 21 Jun 2011 07:13:16 +0000 (17:13 +1000)]
goinstall: undo 1ad616fb313d (always rebuild...)

CL 4627051 is a better way of doing the same thing.

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

13 years agobuilder: run make single-threaded on windows
Alex Brainman [Tue, 21 Jun 2011 02:26:38 +0000 (12:26 +1000)]
builder: run make single-threaded on windows

Will still honor MAKEFLAGS environment variable if set.

R=golang-dev
CC=bradfitz, golang-dev
https://golang.org/cl/4644049

13 years agogoinstall: undo repo peeking code
Andrew Gerrand [Tue, 21 Jun 2011 01:28:15 +0000 (11:28 +1000)]
goinstall: undo repo peeking code

Keeping the Julian's good refactoring work.

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

13 years agoEffective Go: supplied missing type in variadic function example.
Ben Lynn [Tue, 21 Jun 2011 00:55:07 +0000 (10:55 +1000)]
Effective Go: supplied missing type in variadic function example.

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/4595055

13 years agosyscall: add socket control message support for darwin, freebsd, linux
Mikio Hara [Mon, 20 Jun 2011 22:40:20 +0000 (18:40 -0400)]
syscall: add socket control message support for darwin, freebsd, linux

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

13 years agofmt: catch panics from calls to String etc.
Rob Pike [Mon, 20 Jun 2011 22:31:02 +0000 (08:31 +1000)]
fmt: catch panics from calls to String etc.

This change causes Print et al. to catch panics generated by
calls to String, GoString, and Format.  The panic is formatted
into the output stream as an error, but the program continues.
As a special case, if the argument was a nil pointer, the
result is just "<nil>", because that's almost certainly enough
information and handles the very common case of String
methods that don't guard against nil.

Scan does not want this change. Input must work; output can
be for debugging and it's nice to get output even when you
make a mistake.

R=dsymonds, r, adg, gri, rsc, gri
CC=golang-dev
https://golang.org/cl/4640043

13 years agoall-qemu.bash: cannot test go/build
Russ Cox [Mon, 20 Jun 2011 21:44:36 +0000 (17:44 -0400)]
all-qemu.bash: cannot test go/build

R=adg, r
CC=golang-dev
https://golang.org/cl/4633054