]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agoruntime(windows): make sure scheduler runs on os stack and new stdcall implementation
Alex Brainman [Sun, 12 Sep 2010 01:45:16 +0000 (11:45 +1000)]
runtime(windows): make sure scheduler runs on os stack and new stdcall implementation

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

14 years agogc: const nil bug
Russ Cox [Sat, 11 Sep 2010 19:47:56 +0000 (15:47 -0400)]
gc: const nil bug

Fixes #1073.

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

14 years agoarm build: try to fix it by removing reference to deleted file syntax/slice.go
Rob Pike [Sat, 11 Sep 2010 06:10:28 +0000 (23:10 -0700)]
arm build: try to fix it by removing reference to deleted file syntax/slice.go

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

14 years agowebsocket: Add support for secure WebSockets
Jukka-Pekka Kekkonen [Sat, 11 Sep 2010 04:27:16 +0000 (00:27 -0400)]
websocket: Add support for secure WebSockets

Fixes #842.
Fixes #1061.

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

14 years agoruntime: fix crash trace on amd64
Russ Cox [Sat, 11 Sep 2010 04:26:56 +0000 (00:26 -0400)]
runtime: fix crash trace on amd64

g is not in r15 anymore.
now it's in a per-thread memory segment,
which is valid even inside a signal handler,
so we can just refer to g directly.

Fixes #1082.

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

14 years agoarm: work around reg allocator bug in 5g, in two parts.
Rob Pike [Sat, 11 Sep 2010 03:55:29 +0000 (20:55 -0700)]
arm: work around reg allocator bug in 5g, in two parts.
1) hack regalloc to leave R9 (m) and R10 (g) alone.
the real fix is tricker, but this gets us running
2) fix up the few places in the package sources that
the shortage of registers affects, by simplifying
some expressions.

all of this should be reverted when the right fix is in.

Fixes #1084.

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

14 years agotest: Add test for //line (currently fails).
Ian Lance Taylor [Sat, 11 Sep 2010 02:12:43 +0000 (19:12 -0700)]
test: Add test for //line (currently fails).

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

14 years agotest: Match gccgo error messages.
Ian Lance Taylor [Sat, 11 Sep 2010 02:12:10 +0000 (19:12 -0700)]
test: Match gccgo error messages.

The gccgo compiler does not always generate a "cannot use"
error message.  It only does so for named types.  Maybe that
should change, but in any case it is irrelevant for this test.

assign1.go:105:4: error: incompatible types in assignment (cannot use type A1 as type A)
assign1.go:107:5: error: incompatible types in assignment (cannot use type A as type A1)
assign1.go:112:4: error: incompatible types in assignment (cannot use type B1 as type B)
assign1.go:114:5: error: incompatible types in assignment (cannot use type B as type B1)
assign1.go:119:4: error: incompatible types in assignment (cannot use type C1 as type C)
assign1.go:121:5: error: incompatible types in assignment (cannot use type C as type C1)
assign1.go:126:4: error: incompatible types in assignment (cannot use type F1 as type F)
assign1.go:128:5: error: incompatible types in assignment (cannot use type F as type F1)
assign1.go:140:4: error: incompatible types in assignment (cannot use type M1 as type M)
assign1.go:142:5: error: incompatible types in assignment (cannot use type M as type M1)
assign1.go:147:4: error: incompatible types in assignment (cannot use type P1 as type P)
assign1.go:149:5: error: incompatible types in assignment (cannot use type P as type P1)
assign1.go:154:4: error: incompatible types in assignment (cannot use type S1 as type S)
assign1.go:156:5: error: incompatible types in assignment (cannot use type S as type S1)
assign1.go:158:6: error: incompatible types in assignment
assign1.go:159:6: error: incompatible types in assignment
assign1.go:160:5: error: incompatible types in assignment
assign1.go:161:5: error: incompatible types in assignment
assign1.go:162:6: error: incompatible types in assignment
assign1.go:163:6: error: incompatible types in assignment
assign1.go:165:6: error: incompatible types in assignment
assign1.go:166:6: error: incompatible types in assignment
assign1.go:167:5: error: incompatible types in assignment
assign1.go:168:5: error: incompatible types in assignment
assign1.go:169:6: error: incompatible types in assignment
assign1.go:170:6: error: incompatible types in assignment
assign1.go:172:6: error: incompatible types in assignment
assign1.go:173:6: error: incompatible types in assignment
assign1.go:174:5: error: incompatible types in assignment
assign1.go:175:5: error: incompatible types in assignment
assign1.go:176:6: error: incompatible types in assignment
assign1.go:177:6: error: incompatible types in assignment
assign1.go:179:6: error: incompatible types in assignment
assign1.go:180:6: error: incompatible types in assignment
assign1.go:181:5: error: incompatible types in assignment
assign1.go:182:5: error: incompatible types in assignment
assign1.go:183:6: error: incompatible types in assignment
assign1.go:184:6: error: incompatible types in assignment
assign1.go:186:6: error: incompatible types in assignment
assign1.go:187:6: error: incompatible types in assignment
assign1.go:188:5: error: incompatible types in assignment
assign1.go:189:5: error: incompatible types in assignment
assign1.go:190:6: error: incompatible types in assignment
assign1.go:191:6: error: incompatible types in assignment
assign1.go:193:6: error: incompatible types in assignment
assign1.go:194:6: error: incompatible types in assignment
assign1.go:195:5: error: incompatible types in assignment
assign1.go:196:5: error: incompatible types in assignment
assign1.go:197:6: error: incompatible types in assignment
assign1.go:198:6: error: incompatible types in assignment
assign1.go:200:6: error: incompatible types in assignment
assign1.go:201:6: error: incompatible types in assignment
assign1.go:202:5: error: incompatible types in assignment
assign1.go:203:5: error: incompatible types in assignment
assign1.go:204:6: error: incompatible types in assignment
assign1.go:205:6: error: incompatible types in assignment
assign1.go:207:6: error: incompatible types in assignment
assign1.go:208:6: error: incompatible types in assignment
assign1.go:209:5: error: incompatible types in assignment
assign1.go:210:5: error: incompatible types in assignment
assign1.go:211:6: error: incompatible types in assignment
assign1.go:212:6: error: incompatible types in assignment

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

14 years agotest: Run garbage collector before testing malloc numbers.
Ian Lance Taylor [Fri, 10 Sep 2010 22:54:16 +0000 (15:54 -0700)]
test: Run garbage collector before testing malloc numbers.

The gccgo library generates some garbage in the init routines
because it handles interfaces slightly differently.  Since the
test sets MemStats.Alloc to 0, the first time the garbage
collector runs it goes negative and the test fails.

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

14 years agotest: Reduce race conditions in chan/nonblock.go.
Ian Lance Taylor [Fri, 10 Sep 2010 22:37:20 +0000 (15:37 -0700)]
test: Reduce race conditions in chan/nonblock.go.

nonblock.go wants to test nonblocking operations on
synchronous channels, so it is inherently racy.  This
introduces loops to make the race conditions much more likely
to succeed when using gccgo.

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

14 years agocrypto/tls: don't return an error from Close()
Adam Langley [Fri, 10 Sep 2010 19:55:35 +0000 (15:55 -0400)]
crypto/tls: don't return an error from Close()

Fixes #1037.

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

14 years agonet: fix windows build
Russ Cox [Fri, 10 Sep 2010 19:50:29 +0000 (15:50 -0400)]
net: fix windows build

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

14 years agotest: Match gccgo error messages.
Ian Lance Taylor [Fri, 10 Sep 2010 19:45:46 +0000 (12:45 -0700)]
test: Match gccgo error messages.

gccgo does not handle 'new' specially here.

varerr.go:10:6: error: reference to undefined name ‘asdf’
varerr.go:12:6: error: invalid left hand side of assignment

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

14 years agotest: Match gccgo error messages.
Ian Lance Taylor [Fri, 10 Sep 2010 19:44:37 +0000 (12:44 -0700)]
test: Match gccgo error messages.

undef.go:12:6: error: reference to undefined name ‘x’
undef.go:13:6: error: reference to undefined name ‘x’
undef.go:14:6: error: reference to undefined name ‘x’
undef.go:22:25: error: reference to undefined name ‘y’
undef.go:42:11: error: reference to undefined name ‘v’

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

14 years agotest: Match gccgo error messages.
Ian Lance Taylor [Fri, 10 Sep 2010 19:44:07 +0000 (12:44 -0700)]
test: Match gccgo error messages.

vareq.go:10:25: error: expected ';' or '}' or newline

vareq1.go:9:24: error: expected ';' or newline after top level declaration

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

14 years agonet: fix freebsd build
Russ Cox [Fri, 10 Sep 2010 18:40:56 +0000 (14:40 -0400)]
net: fix freebsd build

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

14 years agowindows: disable unimplemented tests
Joe Poirier [Fri, 10 Sep 2010 18:05:57 +0000 (14:05 -0400)]
windows: disable unimplemented tests

Add windows NOTEST list to pkg make file.
5a make file. the change removes a space
character that was included when appending
an extension to TARG.

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

14 years agold: handle quoted spaces in package path
Dan Sinclair [Fri, 10 Sep 2010 17:59:20 +0000 (13:59 -0400)]
ld: handle quoted spaces in package path

Fixes #1087.

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

14 years agoA+C: add Dan Sinclair (individual CLA)
Russ Cox [Fri, 10 Sep 2010 17:59:08 +0000 (13:59 -0400)]
A+C: add Dan Sinclair (individual CLA)

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

14 years ago6c, 8c: show line numbers in -S output
Russ Cox [Fri, 10 Sep 2010 15:53:51 +0000 (11:53 -0400)]
6c, 8c: show line numbers in -S output

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

14 years agogc: remove &[10]int -> []int conversion
Russ Cox [Fri, 10 Sep 2010 15:53:27 +0000 (11:53 -0400)]
gc: remove &[10]int -> []int conversion

Fixes #829.

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

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