]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agoexp/draw: fast path for drawing overlapping image.RGBAs.
Nigel Tao [Fri, 10 Sep 2010 10:09:56 +0000 (20:09 +1000)]
exp/draw: fast path for drawing overlapping image.RGBAs.

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

14 years agoexp/draw: fix double-counting of pt.Min for the src and mask points.
Nigel Tao [Fri, 10 Sep 2010 09:48:27 +0000 (19:48 +1000)]
exp/draw: fix double-counting of pt.Min for the src and mask points.
The min is typically zero, which is why this hasn't bitten us yet.

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

14 years agoarm: fix a couple of build bugs.
Rob Pike [Fri, 10 Sep 2010 06:31:33 +0000 (23:31 -0700)]
arm: fix a couple of build bugs.
tests have not been run yet

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

14 years agotest: Match gccgo error messages.
Ian Lance Taylor [Fri, 10 Sep 2010 05:40:25 +0000 (22:40 -0700)]
test: Match gccgo error messages.

With the recursive descent parser that gccgo uses, I think
that it doesn't make sense to try to match a statement where a
statement is not expected.  If the construct is not a
statement, you will just get bizarre error messages.

topexpr.go:9:1: error: expected declaration
topexpr.go:14:1: error: expected declaration
topexpr.go:19:1: error: expected declaration

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

14 years agosyscall: fix windows Gettimeofday
Alex Brainman [Fri, 10 Sep 2010 05:39:45 +0000 (15:39 +1000)]
syscall: fix windows Gettimeofday

Fixes #1092.

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/2121048

14 years agodoc/tutorial: update for slice changes.
Rob Pike [Fri, 10 Sep 2010 03:53:18 +0000 (13:53 +1000)]
doc/tutorial: update for slice changes.
Awaiting the lower-bound change before checkin.

Fixes #1067.

R=rsc, iant, gri
CC=golang-dev
https://golang.org/cl/2105043

14 years agofix build
Robert Griesemer [Thu, 9 Sep 2010 21:42:49 +0000 (14:42 -0700)]
fix build

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

14 years agogc: more accurate line numbers for ATEXT
Russ Cox [Thu, 9 Sep 2010 21:11:51 +0000 (17:11 -0400)]
gc: more accurate line numbers for ATEXT
and other begin and end of function code

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

14 years agotest: Match gccgo error messages.
Ian Lance Taylor [Thu, 9 Sep 2010 16:00:32 +0000 (09:00 -0700)]
test: Match gccgo error messages.

tmp.go:4:20: error: invalid NUL byte
tmp.go:6:24: error: invalid NUL byte
tmp.go:8:15: error: invalid NUL byte
tmp.go:10:21: error: invalid NUL byte
tmp.go:12:22: error: invalid NUL byte
tmp.go:14:21: error: invalid UTF-8 encoding
tmp.go:14:22: error: invalid UTF-8 encoding
tmp.go:16:25: error: invalid UTF-8 encoding
tmp.go:18:15: error: invalid UTF-8 encoding
tmp.go:18:16: error: invalid UTF-8 encoding
tmp.go:20:21: error: invalid UTF-8 encoding
tmp.go:20:22: error: invalid NUL byte
tmp.go:20:23: error: invalid NUL byte
tmp.go:23:6: error: invalid UTF-8 encoding
tmp.go:23:7: error: invalid UTF-8 encoding
tmp.go:25:22: error: invalid UTF-8 encoding

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

14 years agoexp/draw: clip destination rectangle to the image bounds.
Nigel Tao [Thu, 9 Sep 2010 09:12:54 +0000 (19:12 +1000)]
exp/draw: clip destination rectangle to the image bounds.
image: introduce Intersect and Union rectangle methods.

R=r, rog, nigeltao
CC=golang-dev
https://golang.org/cl/2115043

14 years agoexp/draw: rename Context to Window, and add a Close method.
Nigel Tao [Thu, 9 Sep 2010 08:06:59 +0000 (18:06 +1000)]
exp/draw: rename Context to Window, and add a Close method.
exp/draw/x11: allow clean shutdown when the user closes the window.

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

14 years agobuild: generate, clean .exe files on Windows
Joe Poirier [Thu, 9 Sep 2010 05:42:55 +0000 (01:42 -0400)]
build: generate, clean .exe files on Windows

R=rsc, brainman, vcc
CC=golang-dev
https://golang.org/cl/2165044

14 years agotest: remove slice syntax test
Scott Lawrence [Thu, 9 Sep 2010 05:42:49 +0000 (01:42 -0400)]
test: remove slice syntax test

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

14 years agopath: add IsAbs
Ivan Krasin [Thu, 9 Sep 2010 05:42:43 +0000 (01:42 -0400)]
path: add IsAbs

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

14 years agoMake.inc: fix build for tiny.
Rob Pike [Thu, 9 Sep 2010 05:14:38 +0000 (15:14 +1000)]
Make.inc: fix build for tiny.
Suggested by paulzhol@gmail.com

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

14 years agogofmt, go/printer: update internal estimated position correctly
Robert Griesemer [Thu, 9 Sep 2010 05:01:48 +0000 (22:01 -0700)]
gofmt, go/printer: update internal estimated position correctly

Fixes #1089.

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

14 years agoruntime: fix bug in tracebacks
Rob Pike [Thu, 9 Sep 2010 04:28:56 +0000 (14:28 +1000)]
runtime: fix bug in tracebacks
Need to correct for deferproc's extra 2 words of stack or in some
cases (such as memory profiling) traceback can cause a crash.
Also bulletproof the closure test.

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

14 years agotest: Match gccgo error messages.
Ian Lance Taylor [Thu, 9 Sep 2010 04:03:51 +0000 (21:03 -0700)]
test: Match gccgo error messages.

named1.go:40:11: error: argument 1 has incompatible type (cannot use type bool as type Bool)
named1.go:41:11: error: argument 1 has incompatible type (cannot use type bool as type Bool)
named1.go:43:7: error: incompatible types in assignment (cannot use type bool as type Bool)
named1.go:44:12: error: argument 4 has incompatible type (cannot use type Bool as type bool)
named1.go:46:4: error: incompatible types in assignment (cannot use type bool as type Bool)
named1.go:48:11: error: argument 1 has incompatible type (cannot use type bool as type Bool)
named1.go:50:7: error: incompatible types in assignment (cannot use type bool as type Bool)
named1.go:54:7: error: incompatible types in assignment (cannot use type bool as type Bool)
named1.go:60:7: error: incompatible types in assignment (cannot use type bool as type Bool)
named1.go:63:9: error: argument 1 has incompatible type (cannot use type bool as type Bool)
named1.go:64:4: error: incompatible types in assignment (cannot use type bool as type Bool)
named1.go:67:17: error: invalid type conversion (cannot use type Slice as type String)

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

14 years agotest: Match gccgo error messages.
Ian Lance Taylor [Thu, 9 Sep 2010 04:03:24 +0000 (21:03 -0700)]
test: Match gccgo error messages.

explicit.go:36:4: error: incompatible types in assignment (need explicit conversion)
explicit.go:41:4: error: incompatible types in assignment (type has no methods)
explicit.go:42:4: error: incompatible types in assignment (need explicit conversion)
explicit.go:45:5: error: incompatible types in assignment (need explicit conversion; missing method ‘N’)
explicit.go:48:9: error: invalid type conversion (need explicit conversion; missing method ‘N’)
explicit.go:51:4: error: incompatible types in assignment
explicit.go:51:7: error: invalid type conversion (need explicit conversion)
explicit.go:57:10: error: impossible type assertion: type does not implement interface (type has no methods)
explicit.go:62:10: error: impossible type assertion: type does not implement interface (incompatible type for method ‘M’ (different number of parameters))
explicit.go:67:5: error: incompatible type in initialization (type has no methods)
explicit.go:68:5: error: incompatible type in initialization (incompatible type for method ‘M’ (different number of parameters))
explicit.go:70:11: error: invalid type conversion (type has no methods)
explicit.go:71:11: error: invalid type conversion (incompatible type for method ‘M’ (different number of parameters))

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

14 years agotest new slices
Russ Cox [Thu, 9 Sep 2010 03:48:01 +0000 (23:48 -0400)]
test new slices

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

14 years agobuild: test for _WIN32, not _MINGW32
Joe Poirier [Thu, 9 Sep 2010 02:20:35 +0000 (22:20 -0400)]
build: test for _WIN32, not _MINGW32

Use OS rather than compiler specific flag the same way that
__FreeBSD__, __APPLE__, __OpenBSD__, and __linux__ are used.

_WIN32 is defined by GCC (and others) on windows for Win32
and Win64 applications. _WIN32 is set by default for several
other windows based compilers: DMC, MSVC, Intel, Watcom, LCC.

Although the change is for consistency, it allows the Go tools
to be compiled with non-Mingw GCC distributions and non-GCC
compilers that support the GCC extensions.

R=rsc, brainman, vcc
CC=golang-dev
https://golang.org/cl/2168043

14 years agogc: implement new slice spec
Scott Lawrence [Thu, 9 Sep 2010 02:20:29 +0000 (22:20 -0400)]
gc: implement new slice spec
Fixes #382.

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

14 years agoruntime: fix windows build
Alex Brainman [Thu, 9 Sep 2010 02:09:10 +0000 (12:09 +1000)]
runtime: fix windows build

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

14 years agocgo: add typedef for uintptr in generated headers
Andrew Gerrand [Wed, 8 Sep 2010 23:24:53 +0000 (09:24 +1000)]
cgo: add typedef for uintptr in generated headers

Fixes #1046.

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

14 years agopath: fix typo in path.Visitor
Andrew Gerrand [Wed, 8 Sep 2010 23:24:27 +0000 (09:24 +1000)]
path: fix typo in path.Visitor

Fixes #1088.

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

14 years agotest: Recognize gccgo error messages.
Ian Lance Taylor [Wed, 8 Sep 2010 20:58:09 +0000 (13:58 -0700)]
test: Recognize gccgo error messages.

bug299.go:16:2: error: expected field name
bug299.go:17:2: error: expected field name
bug299.go:18:3: error: expected field name
bug299.go:25:9: error: expected receiver name or type
bug299.go:26:10: error: expected receiver name or type
bug299.go:27:9: error: expected receiver name or type

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

14 years agotest: Match gccgo error messages.
Ian Lance Taylor [Wed, 8 Sep 2010 20:57:12 +0000 (13:57 -0700)]
test: Match gccgo error messages.

bug298.go:10:2: error: expected declaration
bug298.go:10:25: error: expected ‘;’ or newline after top level declaration
bug298.go:10:25: error: expected declaration

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

14 years agotest: Actually run bug296.
Ian Lance Taylor [Wed, 8 Sep 2010 20:56:49 +0000 (13:56 -0700)]
test: Actually run bug296.

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

14 years agohttp: do not cache CanonicalHeaderKey
Jukka-Pekka Kekkonen [Wed, 8 Sep 2010 14:20:21 +0000 (10:20 -0400)]
http: do not cache CanonicalHeaderKey

Fixes #1080.

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

14 years agogc: better printing of named constants, func literals
Russ Cox [Wed, 8 Sep 2010 14:12:56 +0000 (10:12 -0400)]
gc: better printing of named constants, func literals

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

14 years agogodoc: moved package directory support code into separate file
Robert Griesemer [Wed, 8 Sep 2010 00:21:00 +0000 (17:21 -0700)]
godoc: moved package directory support code into separate file

- in prep. for some restructuring to be able to better deal
  with very large file systems
- moved a utility function into index.go
- no functionality changes, only code reorg.

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

14 years agogo_spec: consistent use of 'low', 'high' in slices section
Robert Griesemer [Tue, 7 Sep 2010 23:32:35 +0000 (16:32 -0700)]
go_spec: consistent use of 'low', 'high' in slices section

Also: Added examples for slices with omitted index expressions.

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

14 years agospec: Allow omission of low slice bound
Scott Lawrence [Tue, 7 Sep 2010 21:30:17 +0000 (14:30 -0700)]
spec: Allow omission of low slice bound

See also https://golang.org/cl/1957045/

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

14 years agoos, exec: rename argv0 to name
Russ Cox [Tue, 7 Sep 2010 20:29:07 +0000 (16:29 -0400)]
os, exec: rename argv0 to name

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

14 years agobuild: work with GNU Make 3.82
Jukka-Pekka Kekkonen [Tue, 7 Sep 2010 19:14:14 +0000 (15:14 -0400)]
build: work with GNU Make 3.82

Fix building on GNU Make 3.82 (caused by mixed implicit and normal
rules).

The issue was introduced in changeset 6110:ca0beac3b543.

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

14 years agogo_spec: fix typo (pointed out by Hiroshi Iwatani)
Robert Griesemer [Tue, 7 Sep 2010 18:14:36 +0000 (11:14 -0700)]
go_spec: fix typo (pointed out by Hiroshi Iwatani)

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

14 years agoruntime: fix linux/amd64 build: wrong name for munmap
Russ Cox [Tue, 7 Sep 2010 17:17:10 +0000 (13:17 -0400)]
runtime: fix linux/amd64 build: wrong name for munmap

TBR=r
CC=golang-dev
https://golang.org/cl/2140043

14 years agoruntime: use manual stack for garbage collection
Russ Cox [Tue, 7 Sep 2010 13:57:22 +0000 (09:57 -0400)]
runtime: use manual stack for garbage collection

Old code was using recursion to traverse object graph.
New code uses an explicit stack, cutting the per-pointer
footprint to two words during the recursion and avoiding
the standard allocator and stack splitting code.

in test/garbage:

Reduces parser runtime by 2-3%
Reduces Peano runtime by 40%
Increases tree runtime by 4-5%

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

14 years agotest/garbage/parser: sync with recent parser changes
Russ Cox [Tue, 7 Sep 2010 13:55:05 +0000 (09:55 -0400)]
test/garbage/parser: sync with recent parser changes

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

14 years agocgo: silence warning for C call returning const pointer
Russ Cox [Tue, 7 Sep 2010 13:54:20 +0000 (09:54 -0400)]
cgo: silence warning for C call returning const pointer

Fix suggested by Albert Strasheim.

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

14 years agoexp/draw: reintroduce the MouseEvent.Nsec timestamp.
Nigel Tao [Tue, 7 Sep 2010 13:42:01 +0000 (23:42 +1000)]
exp/draw: reintroduce the MouseEvent.Nsec timestamp.

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

14 years agoarm: use the correct stat syscalls
Brad Fitzpatrick [Tue, 7 Sep 2010 13:23:49 +0000 (09:23 -0400)]
arm: use the correct stat syscalls

We were using the 64-bit struct with the old 32-bit
system calls.

http://code.google.com/p/go/issues/detail?id=1083

This also fixes up mksyscall.sh to generate
gofmt-compliant code.

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

14 years agoimage: change a ColorImage's minimum point from (0, 0) to (-1e9, -1e9).
Nigel Tao [Tue, 7 Sep 2010 09:16:59 +0000 (19:16 +1000)]
image: change a ColorImage's minimum point from (0, 0) to (-1e9, -1e9).

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

14 years agotag release.2010-09-06
Andrew Gerrand [Tue, 7 Sep 2010 06:17:14 +0000 (16:17 +1000)]
tag release.2010-09-06

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

14 years agorelease.2010-09-06 weekly.2010-09-06
Andrew Gerrand [Tue, 7 Sep 2010 06:09:20 +0000 (16:09 +1000)]
release.2010-09-06

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

14 years agoexp/draw: unify a draw.Context's keyboard, mouse, etc. channels into a
Nigel Tao [Mon, 6 Sep 2010 09:22:49 +0000 (19:22 +1000)]
exp/draw: unify a draw.Context's keyboard, mouse, etc. channels into a
single event channel.

A quit event is now represented by closing that channel.

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

14 years agofmt.Scan: fix integer overflow on 32-bit machines
Anthony Martin [Sun, 5 Sep 2010 22:04:53 +0000 (08:04 +1000)]
fmt.Scan: fix integer overflow on 32-bit machines

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

14 years agonetchan: use acknowledgements on export send.
Rob Pike [Sat, 4 Sep 2010 13:41:54 +0000 (23:41 +1000)]
netchan: use acknowledgements on export send.
Also add exporter.Drain() to wait for completion.
This makes it possible for an Exporter to fire off a message
and wait (by calling Drain) for the message to be received,
even if a client has yet to call to retrieve it.

Once this design is settled, I'll do the same for import send.

Testing strategies welcome.  I have some working stand-alone
tests.

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

14 years agofmt: delete erroneous sentence about return value for Sprint*.
Rob Pike [Sat, 4 Sep 2010 12:29:10 +0000 (22:29 +1000)]
fmt: delete erroneous sentence about return value for Sprint*.

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

14 years agotest/turing: refactor
Rob Pike [Sat, 4 Sep 2010 00:40:00 +0000 (10:40 +1000)]
test/turing: refactor

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

14 years agotest: remove semiocolons.
Rob Pike [Sat, 4 Sep 2010 00:36:13 +0000 (10:36 +1000)]
test: remove semiocolons.
The ken directory is untouched so we have some examples with explicit semis.

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

14 years agotutorial: regenerate HTML to pick up change to progs/file.go.
Rob Pike [Sat, 4 Sep 2010 00:22:49 +0000 (10:22 +1000)]
tutorial: regenerate HTML to pick up change to progs/file.go.

Fixes #1075.

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

14 years agobuild: implement NOINSTALL=1 for Make.ccmd
Russ Cox [Fri, 3 Sep 2010 19:37:57 +0000 (15:37 -0400)]
build: implement NOINSTALL=1 for Make.ccmd

The makefiles for prof and cov use it already.
(It's also in Make.clib.)

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

14 years agogoinstall: assume go binaries are in path
Russ Cox [Fri, 3 Sep 2010 19:37:45 +0000 (15:37 -0400)]
goinstall: assume go binaries are in path

(Following new convention.)

Fixes #1063.

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

14 years agosolitaire: an exercise in backtracking and string conversions
Robert Griesemer [Fri, 3 Sep 2010 17:52:45 +0000 (10:52 -0700)]
solitaire: an exercise in backtracking and string conversions

Solves the (English) peg solitaire game. The board is represented
by a 1-dimensional array for easy representation of directions
with a single integer. The board's contents are chosen such that
it can be printed with a direct string() conversion.

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

14 years agorevert accidental submit of builder.go
Andrew Gerrand [Fri, 3 Sep 2010 08:08:16 +0000 (18:08 +1000)]
revert accidental submit of builder.go

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

14 years agoimage: introduce Config type and DecodeConfig function, to decode an
Nigel Tao [Fri, 3 Sep 2010 08:03:08 +0000 (18:03 +1000)]
image: introduce Config type and DecodeConfig function, to decode an
image's color model and dimensions without allocating and decoding its
actual pixels.

Fixes #695.

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

14 years agomisc/dashboard/builder: Go implementation of continuous build client
Andrew Gerrand [Fri, 3 Sep 2010 07:57:13 +0000 (17:57 +1000)]
misc/dashboard/builder: Go implementation of continuous build client

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

14 years agolist: update comment to state that the zero value is ready to use.
Rob Pike [Fri, 3 Sep 2010 07:11:56 +0000 (17:11 +1000)]
list: update comment to state that the zero value is ready to use.

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

14 years agogc: appease bison version running on FreeBSD builder
Russ Cox [Thu, 2 Sep 2010 18:31:39 +0000 (14:31 -0400)]
gc: appease bison version running on FreeBSD builder

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

14 years agoexp/iterables: fix typo
Robert Griesemer [Thu, 2 Sep 2010 18:31:00 +0000 (11:31 -0700)]
exp/iterables: fix typo

Fixes #1069.

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

14 years agotime: do not crash in String on nil Time
Russ Cox [Thu, 2 Sep 2010 18:21:40 +0000 (14:21 -0400)]
time: do not crash in String on nil Time

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

14 years agohttp: add Date to server, Last-Modified and If-Modified-Since to file server
Russ Cox [Thu, 2 Sep 2010 18:21:11 +0000 (14:21 -0400)]
http: add Date to server, Last-Modified and If-Modified-Since to file server

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

14 years agobuild: create bin and pkg directories as needed; drop from hg
Russ Cox [Thu, 2 Sep 2010 18:20:02 +0000 (14:20 -0400)]
build: create bin and pkg directories as needed; drop from hg

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

14 years agoruntime: add GOOS, GOARCH; fix FuncLine
Russ Cox [Thu, 2 Sep 2010 18:19:12 +0000 (14:19 -0400)]
runtime: add GOOS, GOARCH; fix FuncLine

Changes to FuncLine sync it with symtab.c's funcline.

R=r
CC=girard.m1, golang-dev
https://golang.org/cl/2083041

14 years agogc: fix spurious syntax error
Russ Cox [Thu, 2 Sep 2010 18:16:01 +0000 (14:16 -0400)]
gc: fix spurious syntax error

Fixes #1071.

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

14 years agogoinstall: added -a flag to mean "all remote packages"
Scott Lawrence [Thu, 2 Sep 2010 17:48:28 +0000 (13:48 -0400)]
goinstall: added -a flag to mean "all remote packages"
Fixes #897.

goinstall -a can be used to reinstall all packages after an upgrade
goinstall -a -u can be used to update all package
A history of remote package installs is stored in $GOROOT/goinstall.log

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

14 years agogo spec clarification: arrays must be addressable to be sliceable
Robert Griesemer [Thu, 2 Sep 2010 17:16:31 +0000 (10:16 -0700)]
go spec clarification: arrays must be addressable to be sliceable

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

14 years ago8l: suppress emitting DWARF in Windows PE.
Alex Brainman [Thu, 2 Sep 2010 07:00:24 +0000 (17:00 +1000)]
8l: suppress emitting DWARF in Windows PE.

Fixes #1064.

R=rsc, lvd, vcc
CC=golang-dev
https://golang.org/cl/2104042

14 years agotest: Match gccgo error messages.
Ian Lance Taylor [Thu, 2 Sep 2010 04:05:31 +0000 (21:05 -0700)]
test: Match gccgo error messages.

bug284.go:33: error: invalid type conversion
bug284.go:36: error: invalid type conversion (cannot use type A2 as type A1)
bug284.go:37: error: invalid type conversion
bug284.go:38: error: invalid type conversion (cannot use type A1 as type A2)
bug284.go:56: error: invalid type conversion
bug284.go:59: error: invalid type conversion (cannot use type S2 as type S1)
bug284.go:60: error: invalid type conversion
bug284.go:61: error: invalid type conversion (cannot use type S1 as type S2)
bug284.go:71: error: invalid type conversion
bug284.go:74: error: invalid type conversion (cannot use type P2 as type P1)
bug284.go:75: error: invalid type conversion
bug284.go:76: error: invalid type conversion (cannot use type P1 as type P2)
bug284.go:96: error: invalid type conversion
bug284.go:99: error: invalid type conversion (cannot use type Q2 as type Q1)
bug284.go:101: error: invalid type conversion (cannot use type Q1 as type Q2)
bug284.go:111: error: invalid type conversion (different parameter types)
bug284.go:114: error: invalid type conversion (different parameter types)
bug284.go:115: error: invalid type conversion (different parameter types)
bug284.go:116: error: invalid type conversion (different parameter types)
bug284.go:134: error: invalid type conversion (incompatible type for method 'f' (different result types))
bug284.go:137: error: invalid type conversion (incompatible type for method 'f' (different result types))
bug284.go:138: error: invalid type conversion (incompatible type for method 'f' (different result types))
bug284.go:139: error: invalid type conversion (incompatible type for method 'f' (different result types))
bug284.go:149: error: invalid type conversion
bug284.go:152: error: invalid type conversion (cannot use type L2 as type L1)
bug284.go:153: error: invalid type conversion
bug284.go:154: error: invalid type conversion (cannot use type L1 as type L2)
bug284.go:164: error: invalid type conversion
bug284.go:167: error: invalid type conversion (cannot use type L2 as type L1)
bug284.go:168: error: invalid type conversion
bug284.go:169: error: invalid type conversion (cannot use type L1 as type L2)
bug284.go:179: error: invalid type conversion
bug284.go:182: error: invalid type conversion (cannot use type C2 as type C1)
bug284.go:183: error: invalid type conversion
bug284.go:184: error: invalid type conversion (cannot use type C1 as type C2)

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

14 years agotest: Recognize gccgo error messages.
Ian Lance Taylor [Thu, 2 Sep 2010 04:04:57 +0000 (21:04 -0700)]
test: Recognize gccgo error messages.

bug278.go:18: error: invalid left hand side of assignment
bug278.go:19: error: array is not addressable
bug278.go:21: error: invalid left hand side of assignment
bug278.go:22: error: invalid left hand side of assignment

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

14 years agohttp: add PostForm function to post url-encoded key/value data.
Andrew Gerrand [Thu, 2 Sep 2010 00:01:34 +0000 (10:01 +1000)]
http: add PostForm function to post url-encoded key/value data.

This is a common task, so it makes sense to have a helper to do it.

(App Engine doesn't like "Transfer-Encoding: chunked" for POST
bodies, which is the default for regular Post.)

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

14 years agoFix incorrect reporting of error in Scanner.next() when Read reads > 0 bytes but...
Kyle Consalus [Wed, 1 Sep 2010 22:15:37 +0000 (15:15 -0700)]
Fix incorrect reporting of error in Scanner.next() when Read reads > 0 bytes but returns os.EOF.

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

14 years agonetchan: rather than 0, make -1 mean infinite, by analogy with strings.Split etc.
Rob Pike [Wed, 1 Sep 2010 22:10:53 +0000 (08:10 +1000)]
netchan: rather than 0, make -1 mean infinite, by analogy with strings.Split etc.
It's unlikely to affect any extant code, but I wanted to make this API change
before digging in for a rewrite.

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

14 years agotest: Use global variables to defeat gccgo optimizer.
Ian Lance Taylor [Wed, 1 Sep 2010 20:40:20 +0000 (13:40 -0700)]
test: Use global variables to defeat gccgo optimizer.

The gccgo compiler is smart enough to not make something which
is not used.  Use global variables to defeat this
optimization.

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

14 years ago6l/8l: emit DWARF in macho.
Luuk van Dijk [Wed, 1 Sep 2010 19:54:28 +0000 (21:54 +0200)]
6l/8l: emit DWARF in macho.

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

14 years agofmt: fix typo in package comment.
Rob Pike [Wed, 1 Sep 2010 12:59:20 +0000 (22:59 +1000)]
fmt: fix typo in package comment.
No semantic change.

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

14 years agotemplate: fixed documentation formatting
Scott Lawrence [Wed, 1 Sep 2010 02:07:40 +0000 (19:07 -0700)]
template: fixed documentation formatting
What was meant to be a list appeared as a paragraph with dashes.

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

14 years agospec: delete spurious space (missed fix from previous review)
Rob Pike [Wed, 1 Sep 2010 00:48:45 +0000 (10:48 +1000)]
spec: delete spurious space (missed fix from previous review)
No semantic change.

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

14 years agospec: fix a couple of tiny glitches
Rob Pike [Wed, 1 Sep 2010 00:40:50 +0000 (10:40 +1000)]
spec: fix a couple of tiny glitches

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

14 years agotest: Recognize gccgo error messages.
Ian Lance Taylor [Wed, 1 Sep 2010 00:38:11 +0000 (17:38 -0700)]
test: Recognize gccgo error messages.

bug255.go:11: error: array bound truncated to integer
bug255.go:12: error: array bound is not numeric
bug255.go:13: error: array bound is not numeric
bug255.go:14: error: array bound is not constant
bug255.go:15: error: array bound overflows

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

14 years agotest: Match gccgo error messages.
Ian Lance Taylor [Tue, 31 Aug 2010 22:48:04 +0000 (15:48 -0700)]
test: Match gccgo error messages.

Another case where gccgo and gc report similar but not
identical errors for a recursive interface.

bug251.go:11: error: invalid recursive interface

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

14 years agobig: added RatString, some simplifications
Robert Griesemer [Tue, 31 Aug 2010 22:18:46 +0000 (15:18 -0700)]
big: added RatString, some simplifications

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

14 years agostrconv: fix comment for godoc
Robert Griesemer [Tue, 31 Aug 2010 21:18:20 +0000 (14:18 -0700)]
strconv: fix comment for godoc

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

14 years agotest: gccgo and gc print the error on different lines.
Ian Lance Taylor [Tue, 31 Aug 2010 21:12:23 +0000 (14:12 -0700)]
test: gccgo and gc print the error on different lines.

This introduces GC_ERROR to mark an error only issued by the
gc compiler.  GCCGO_ERROR already exists to mark errors only
issued by the gccgo compiler.  Obviously these should be used
sparingly.

bug195.go:9: error: interface contains embedded non-interface
bug195.go:12: error: interface contains embedded non-interface
bug195.go:15: error: interface contains embedded non-interface
bug195.go:18: error: invalid recursive interface
bug195.go:22: error: invalid recursive interface

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

14 years agotest: Match gccgo error messages.
Ian Lance Taylor [Tue, 31 Aug 2010 18:43:52 +0000 (11:43 -0700)]
test: Match gccgo error messages.

gcc conventionally does not upper case in error messages.

char_lit1.go:13: error: invalid unicode code point 0xd800
char_lit1.go:14: error: invalid unicode code point 0xd999
char_lit1.go:15: error: invalid unicode code point 0xdc01
char_lit1.go:16: error: invalid unicode code point 0xdddd
char_lit1.go:17: error: invalid unicode code point 0xdfff
char_lit1.go:20: error: invalid unicode code point 0x110000
char_lit1.go:22: error: invalid unicode code point 0x110000
char_lit1.go:23: error: invalid unicode code point 0xffffffff

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

14 years agotest: don't assign address of array to slice.
Ian Lance Taylor [Tue, 31 Aug 2010 14:34:01 +0000 (07:34 -0700)]
test: don't assign address of array to slice.

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

14 years agomisc/bash: add *.go completion for gofmt
Scott Lawrence [Tue, 31 Aug 2010 01:13:11 +0000 (21:13 -0400)]
misc/bash: add *.go completion for gofmt

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

14 years agomisc: add zsh completion (using compctl)
Scott Lawrence [Tue, 31 Aug 2010 01:13:01 +0000 (21:13 -0400)]
misc: add zsh completion (using compctl)

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

14 years agodoc: add round-robin flag to io2010 balance example.
Nigel Tao [Tue, 31 Aug 2010 01:00:43 +0000 (11:00 +1000)]
doc: add round-robin flag to io2010 balance example.

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

14 years agoproc, eval: Don't assign address of an array to a slice.
Ian Lance Taylor [Mon, 30 Aug 2010 20:47:40 +0000 (13:47 -0700)]
proc, eval: Don't assign address of an array to a slice.

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

14 years ago8l: emit DWARF in ELF.
Luuk van Dijk [Mon, 30 Aug 2010 20:20:38 +0000 (22:20 +0200)]
8l: emit DWARF in ELF.

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

14 years agobuild: remove unnecessary references to GOBIN and GOROOT
Christian Himpel [Mon, 30 Aug 2010 19:40:56 +0000 (15:40 -0400)]
build: remove unnecessary references to GOBIN and GOROOT

All scripts and makefiles assume that GOBIN is correctly set
in PATH.

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

14 years agomisc/fraise: syntax highlighting for Fraise.app (OS X)
Vincent Ambo [Mon, 30 Aug 2010 05:07:33 +0000 (15:07 +1000)]
misc/fraise: syntax highlighting for Fraise.app (OS X)

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

14 years agoA+C: Vincent Ambo
Andrew Gerrand [Mon, 30 Aug 2010 04:57:23 +0000 (14:57 +1000)]
A+C: Vincent Ambo

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

14 years agoregexp: interpret all Go characer escapes \a \b \f \n \r \t \v
Rob Pike [Mon, 30 Aug 2010 04:06:59 +0000 (14:06 +1000)]
regexp: interpret all Go characer escapes \a \b \f \n \r \t \v

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

14 years agocodereview: Fix uploading for Mercurial 1.6.3
Evan Shaw [Mon, 30 Aug 2010 03:04:05 +0000 (23:04 -0400)]
codereview: Fix uploading for Mercurial 1.6.3

See:
http://selenic.com/repo/hg/rev/32b213b9b22c
http://selenic.com/repo/hg/rev/2096496b40ec

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

14 years agocrypto/tls: Fix doc typo
Evan Shaw [Sun, 29 Aug 2010 23:59:59 +0000 (09:59 +1000)]
crypto/tls: Fix doc typo

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

14 years agodoc: various changes for validating HTML
Scott Lawrence [Sun, 29 Aug 2010 23:58:27 +0000 (09:58 +1000)]
doc: various changes for validating HTML
(Fixes missing tags, extra tags, missing attributes, and such found by tidy -e)

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

14 years agorpc: fix bug that caused private methods to attempt to be registered.
Rob Pike [Sun, 29 Aug 2010 22:03:06 +0000 (08:03 +1000)]
rpc: fix bug that caused private methods to attempt to be registered.

Fixes #1056.

R=golang-dev, adg1
CC=golang-dev
https://golang.org/cl/2033043