Commit graph

6204 commits

Author SHA1 Message Date
Russ Cox f4a5d733a5 test new slices
R=r
CC=golang-dev
https://golang.org/cl/2128047
2010-09-08 23:48:01 -04:00
Joe Poirier e21b3a40ac 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
2010-09-08 22:20:35 -04:00
Scott Lawrence fce222a95b gc: implement new slice spec
Fixes #382.

R=gri, cw, r, rsc
CC=golang-dev
https://golang.org/cl/1957045
2010-09-08 22:20:29 -04:00
Alex Brainman 89e9231865 runtime: fix windows build
R=rsc, r2
CC=golang-dev
https://golang.org/cl/2135045
2010-09-09 12:09:10 +10:00
Andrew Gerrand e1b79b712c cgo: add typedef for uintptr in generated headers
Fixes #1046.

R=rsc, iant
CC=golang-dev
https://golang.org/cl/2102043
2010-09-09 09:24:53 +10:00
Andrew Gerrand 55986c1329 path: fix typo in path.Visitor
Fixes #1088.

R=gri, iant
CC=golang-dev
https://golang.org/cl/2157043
2010-09-09 09:24:27 +10:00
Ian Lance Taylor cc2157ed4f 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
2010-09-08 13:58:09 -07:00
Ian Lance Taylor 2660161533 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
2010-09-08 13:57:12 -07:00
Ian Lance Taylor ae2dc76335 test: Actually run bug296.
R=rsc
CC=golang-dev
https://golang.org/cl/2156045
2010-09-08 13:56:49 -07:00
Jukka-Pekka Kekkonen f7a71c6505 http: do not cache CanonicalHeaderKey
Fixes #1080.

R=rsc
CC=golang-dev
https://golang.org/cl/2158043
2010-09-08 10:20:21 -04:00
Russ Cox 5baaa490d6 gc: better printing of named constants, func literals
R=ken2
CC=golang-dev
https://golang.org/cl/2121045
2010-09-08 10:12:56 -04:00
Robert Griesemer 889377c572 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
2010-09-07 17:21:00 -07:00
Robert Griesemer 9e5bf27acb 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
2010-09-07 16:32:35 -07:00
Scott Lawrence 0c1695b42e 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
2010-09-07 14:30:17 -07:00
Russ Cox e50611d235 os, exec: rename argv0 to name
R=r, gri1
CC=golang-dev
https://golang.org/cl/2119044
2010-09-07 16:29:07 -04:00
Jukka-Pekka Kekkonen 1cec72cff1 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
2010-09-07 15:14:14 -04:00
Robert Griesemer 947e2180e9 go_spec: fix typo (pointed out by Hiroshi Iwatani)
R=iant
CC=golang-dev
https://golang.org/cl/2128045
2010-09-07 11:14:36 -07:00
Russ Cox 636342292c runtime: fix linux/amd64 build: wrong name for munmap
TBR=r
CC=golang-dev
https://golang.org/cl/2140043
2010-09-07 13:17:10 -04:00
Russ Cox d4cc557b0d 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
2010-09-07 09:57:22 -04:00
Russ Cox 6f5f558c10 test/garbage/parser: sync with recent parser changes
R=gri
CC=golang-dev
https://golang.org/cl/2144042
2010-09-07 09:55:05 -04:00
Russ Cox 2eb00d57b4 cgo: silence warning for C call returning const pointer
Fix suggested by Albert Strasheim.

R=adg
CC=golang-dev
https://golang.org/cl/2154041
2010-09-07 09:54:20 -04:00
Nigel Tao fa92b113b1 exp/draw: reintroduce the MouseEvent.Nsec timestamp.
R=rsc
CC=golang-dev
https://golang.org/cl/2166042
2010-09-07 23:42:01 +10:00
Brad Fitzpatrick 34c312e11e 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
2010-09-07 09:23:49 -04:00
Nigel Tao 832ed355fe image: change a ColorImage's minimum point from (0, 0) to (-1e9, -1e9).
R=r
CC=golang-dev
https://golang.org/cl/2138045
2010-09-07 19:16:59 +10:00
Andrew Gerrand 092a8ea6b8 tag release.2010-09-06
R=r
CC=golang-dev
https://golang.org/cl/2165042
2010-09-07 16:17:14 +10:00
Andrew Gerrand 863ba0427b release.2010-09-06
R=r
CC=golang-dev
https://golang.org/cl/2141043
2010-09-07 16:09:20 +10:00
Nigel Tao c849b23ce9 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
2010-09-06 19:22:49 +10:00
Anthony Martin 68cce4ab20 fmt.Scan: fix integer overflow on 32-bit machines
R=r, rsc
CC=golang-dev
https://golang.org/cl/2144043
2010-09-06 08:04:53 +10:00
Rob Pike d54b921c9b 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
2010-09-04 23:41:54 +10:00
Rob Pike 6405ab0fae fmt: delete erroneous sentence about return value for Sprint*.
R=rsc
CC=golang-dev
https://golang.org/cl/2160041
2010-09-04 22:29:10 +10:00
Rob Pike e430ee6cba test/turing: refactor
R=gri
CC=golang-dev
https://golang.org/cl/2116043
2010-09-04 10:40:00 +10:00
Rob Pike 4f61fc96b2 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
2010-09-04 10:36:13 +10:00
Rob Pike cd8f4cd206 tutorial: regenerate HTML to pick up change to progs/file.go.
Fixes #1075.

R=gri
CC=golang-dev
https://golang.org/cl/2104048
2010-09-04 10:22:49 +10:00
Russ Cox ef8af73ef5 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
2010-09-03 15:37:57 -04:00
Russ Cox a41db4318d goinstall: assume go binaries are in path
(Following new convention.)

Fixes #1063.

R=adg
CC=golang-dev
https://golang.org/cl/2115042
2010-09-03 15:37:45 -04:00
Robert Griesemer e5cf760e8a 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
2010-09-03 10:52:45 -07:00
Andrew Gerrand e11bcc88f5 revert accidental submit of builder.go
R=rsc
CC=golang-dev
https://golang.org/cl/2121042
2010-09-03 18:08:16 +10:00
Nigel Tao 2b4218f321 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
2010-09-03 18:03:08 +10:00
Andrew Gerrand 1a5d3c224d misc/dashboard/builder: Go implementation of continuous build client
R=rsc, r
CC=golang-dev
https://golang.org/cl/2112042
2010-09-03 17:57:13 +10:00
Rob Pike d94fedabb4 list: update comment to state that the zero value is ready to use.
R=gri
CC=golang-dev
https://golang.org/cl/2147042
2010-09-03 17:11:56 +10:00
Russ Cox 1cb951d994 gc: appease bison version running on FreeBSD builder
R=ken2
CC=golang-dev
https://golang.org/cl/2141042
2010-09-02 14:31:39 -04:00
Robert Griesemer a37e3697da exp/iterables: fix typo
Fixes #1069.

R=rsc
CC=golang-dev
https://golang.org/cl/2143041
2010-09-02 11:31:00 -07:00
Russ Cox f699811c14 time: do not crash in String on nil Time
R=r
CC=golang-dev
https://golang.org/cl/2052041
2010-09-02 14:21:40 -04:00
Russ Cox 8d7ae528bf http: add Date to server, Last-Modified and If-Modified-Since to file server
R=r
CC=golang-dev
https://golang.org/cl/2051041
2010-09-02 14:21:11 -04:00
Russ Cox 5bf658cc8f build: create bin and pkg directories as needed; drop from hg
R=dsymonds, r
CC=golang-dev
https://golang.org/cl/2050043
2010-09-02 14:20:02 -04:00
Russ Cox 4e64555894 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
2010-09-02 14:19:12 -04:00
Russ Cox dea283750b gc: fix spurious syntax error
Fixes #1071.

R=ken2
CC=golang-dev
https://golang.org/cl/2136043
2010-09-02 14:16:01 -04:00
Scott Lawrence ebe837d6eb 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
2010-09-02 13:48:28 -04:00
Robert Griesemer c423e95da6 go spec clarification: arrays must be addressable to be sliceable
R=rsc
CC=golang-dev, r
https://golang.org/cl/2141041
2010-09-02 10:16:31 -07:00
Alex Brainman b05679cdd6 8l: suppress emitting DWARF in Windows PE.
Fixes #1064.

R=rsc, lvd, vcc
CC=golang-dev
https://golang.org/cl/2104042
2010-09-02 17:00:24 +10:00