1
0
mirror of https://github.com/golang/go synced 2024-11-12 09:30:25 -07:00
Commit Graph

6216 Commits

Author SHA1 Message Date
Russ Cox
1678dcc378 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
2010-09-09 17:11:51 -04:00
Ian Lance Taylor
4427965ee4 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
2010-09-09 09:00:32 -07:00
Nigel Tao
2deee2936c 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
2010-09-09 19:12:54 +10:00
Nigel Tao
6c8b85273c 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
2010-09-09 18:06:59 +10:00
Joe Poirier
1d62becbd8 build: generate, clean .exe files on Windows
R=rsc, brainman, vcc
CC=golang-dev
https://golang.org/cl/2165044
2010-09-09 01:42:55 -04:00
Scott Lawrence
a0fc33a8ca test: remove slice syntax test
R=rsc
CC=golang-dev
https://golang.org/cl/2145043
2010-09-09 01:42:49 -04:00
Ivan Krasin
dfb2af6099 path: add IsAbs
R=rsc, imkrasin, r
CC=golang-dev
https://golang.org/cl/1969042
2010-09-09 01:42:43 -04:00
Rob Pike
e56c0555da Make.inc: fix build for tiny.
Suggested by paulzhol@gmail.com

R=rsc
CC=golang-dev
https://golang.org/cl/2122049
2010-09-09 15:14:38 +10:00
Robert Griesemer
c4e27b7cfb gofmt, go/printer: update internal estimated position correctly
Fixes #1089.

R=rsc
CC=golang-dev
https://golang.org/cl/2172043
2010-09-08 22:01:48 -07:00
Rob Pike
ba5175401e 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
2010-09-09 14:28:56 +10:00
Ian Lance Taylor
c23657e76e 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
2010-09-08 21:03:51 -07:00
Ian Lance Taylor
2d8433a720 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
2010-09-08 21:03:24 -07:00
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