1
0
mirror of https://github.com/golang/go synced 2024-11-11 21:20:21 -07:00
Commit Graph

376 Commits

Author SHA1 Message Date
Robert Griesemer
86c9aca41e bug285: assignment compatible map keys must be accepted
R=r
CC=golang-dev
https://golang.org/cl/1473042
2010-06-03 14:58:00 -07:00
Robert Griesemer
c0b378ff5c bug284: additional conversion test case
R=r, iant
CC=golang-dev
https://golang.org/cl/1433042
2010-06-02 10:36:19 -07:00
Robert Griesemer
3b1e4b217e bug284: test cases for new conversion rules
R=rsc, r, iant
CC=golang-dev
https://golang.org/cl/1465041
2010-06-02 09:23:04 -07:00
Russ Cox
426fef5585 fix build - forgot golden.out
R=ken2
CC=golang-dev
https://golang.org/cl/1274042
2010-05-24 15:26:20 -07:00
Robert Griesemer
2034f72139 bug277: tests for conversion syntax
- accepted by gccgo, gofmt
- some not accepted by 6g
- spec revision forthcoming

R=rsc
CC=golang-dev
https://golang.org/cl/1279041
2010-05-24 13:57:34 -07:00
Ken Thompson
09b2de77b5 fix bug 275
R=rsc
CC=golang-dev
https://golang.org/cl/1198046
2010-05-20 20:56:28 -07:00
Robert Griesemer
ce7487baa8 bug275: cannot apply real() to a complex array element
R=r, ken2
CC=golang-dev
https://golang.org/cl/1260041
2010-05-19 13:10:00 -07:00
Robert Griesemer
434c4378c1 bug274: test case for issue 777
R=r, iant
CC=golang-dev
https://golang.org/cl/1195042
2010-05-13 11:52:04 -07:00
Russ Cox
32df678894 gc: bug264
Fixes #692.

R=ken2
CC=golang-dev
https://golang.org/cl/1092041
2010-05-03 17:51:48 -07:00
Russ Cox
a9425c70aa test: test of static initialization (fails)
R=ken2
CC=golang-dev
https://golang.org/cl/1090041
2010-05-03 17:21:49 -07:00
Russ Cox
b5f54db359 gc: bug267
R=ken2
CC=golang-dev
https://golang.org/cl/1067042
2010-05-03 15:29:59 -07:00
Robert Griesemer
d971f71703 6g bug: no need for parens around array index expression
where index is a composite literal

R=rsc
CC=golang-dev
https://golang.org/cl/961044
2010-04-27 13:09:32 -07:00
Russ Cox
f75d0d224f runtime: turn run time errors checks into panics
R=ken2, r
CC=golang-dev
https://golang.org/cl/871042
2010-04-01 22:31:27 -07:00
Russ Cox
63e878a750 runtime: make type assertion a runtime.Error, the first of many
R=r
CC=golang-dev
https://golang.org/cl/805043
2010-03-31 15:55:10 -07:00
Russ Cox
9b1507b050 gc: implement panic and recover
R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/831042
2010-03-31 11:46:01 -07:00
Russ Cox
00f9f0c056 single argument panic
note that sortmain.go has been run through hg gofmt;
only the formatting of the day initializers changed.
i'm happy to revert that formatting if you'd prefer.

stop on error in doc/progs/run

R=r
CC=golang-dev
https://golang.org/cl/850041
2010-03-30 10:34:57 -07:00
Russ Cox
3908c16ffe gc: bug265
Fixes #700.

R=ken2
CC=golang-dev
https://golang.org/cl/839041
2010-03-29 15:27:59 -07:00
Robert Griesemer
71f5fa3111 bug265: test case for issue 700
( http://code.google.com/p/go/issues/detail?id=700 )

R=r
CC=golang-dev
https://golang.org/cl/827042
2010-03-29 10:34:16 -07:00
Rob Pike
c93273c0f5 bug264 didn't report BUG correctly, caused "fail" from test/run
R=rsc, gri
CC=golang-dev
https://golang.org/cl/762041
2010-03-25 14:27:24 -07:00
Robert Griesemer
a291e998c1 bug264: test case for issue 692
R=r
CC=golang-dev
https://golang.org/cl/715042
2010-03-25 10:01:51 -07:00
Russ Cox
4408659e81 gc: various map-related bug fixes
Fixes #687.

R=ken2
CC=golang-dev
https://golang.org/cl/680042
2010-03-22 18:51:14 -07:00
Russ Cox
270ab18666 fix amd64 build (golden.out)
R=ken2
CC=golang-dev
https://golang.org/cl/417042
2010-03-10 12:42:53 -08:00
Ken Thompson
f229c8b546 identical complex implementation
for 6g and 8g. can also be used
for 5g. 5g is still a stub.

R=rsc
CC=golang-dev
https://golang.org/cl/362041
2010-03-09 12:49:24 -08:00
Ian Lance Taylor
4b22e1bdb6 Generate same output on all architectures.
Passing an argument to bug260 will indicate which alignments
are wrong.

R=r
CC=golang-dev
https://golang.org/cl/231042
2010-03-05 10:43:33 -08:00
Rob Pike
6e3853e294 add a test that structures pack. 6g fails.
R=rsc
CC=golang-dev
https://golang.org/cl/237041
2010-03-04 15:26:15 -08:00
Russ Cox
486d9eb48e test: fix 386 build (missing complex)
R=ken2
CC=golang-dev
https://golang.org/cl/223106
2010-03-02 18:53:25 -08:00
Ken Thompson
7d4b1e4c0d more on type complex.
getting close.

R=rsc
CC=golang-dev
https://golang.org/cl/224105
2010-03-02 18:32:11 -08:00
Russ Cox
1734cb02e7 gc: recursive interface embedding
Fixes #287.

R=ken2
CC=golang-dev
https://golang.org/cl/215048
2010-02-18 11:15:36 -08:00
Russ Cox
7b5789b584 gc: undo attempt at fixing recursive interface embedding
Fixes #582.

Update #287
Status: Accepted
Bug fix was too intrusive; undo and reopen issue.

R=ken2
CC=golang-dev
https://golang.org/cl/209044
2010-02-16 17:44:15 -08:00
Russ Cox
674458e1c4 gc: bug246
R=ken2
CC=golang-dev
https://golang.org/cl/198057
2010-02-01 23:05:15 -08:00
Russ Cox
0bd41e2ff0 gc: bug242
R=ken2
CC=golang-dev
https://golang.org/cl/198053
2010-02-01 22:18:51 -08:00
Russ Cox
a186b77b03 gc: implement defer print/println/panic/panicln
Fixes #219.

R=ken2, r
CC=golang-dev
https://golang.org/cl/194097
2010-01-27 15:37:08 -08:00
Russ Cox
2a01d72878 gc: improved syntax errors
* example-based syntax errors (go.errors)

* enable bison's more specific errors
  and translate grammar token names into
  tokens like ++

* test cases

R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/194085
2010-01-26 23:13:22 -08:00
Russ Cox
7abb4b3a96 gc: fix chan <- chan precedence.
also allow func() func().

R=ken2
CC=golang-dev
https://golang.org/cl/194078
2010-01-26 10:40:28 -08:00
Robert Griesemer
f4dfbd1cf0 channel types parsed not according to spec by 6g
R=r, rsc
CC=golang-dev
https://golang.org/cl/193101
2010-01-25 22:10:35 -08:00
Russ Cox
1912632019 runtime, type switch: eliminate package global name space assumption
bonus: type switch now detects multiple uses of identical interface types.
bonus: interface types are now order-independent, following the spec.

R=ken2
CC=golang-dev
https://golang.org/cl/194053
2010-01-25 18:23:20 -08:00
Russ Cox
ee6b883101 add bug246 (issue 492)
R=r
CC=golang-dev
https://golang.org/cl/186216
2010-01-18 18:26:10 -08:00
Ian Lance Taylor
32e2ae0b18 Test order of evaluation in tuple assignments.
gccgo currently passes this test; 8g currently does not.  I
think I counted everything out right.

R=rsc
CC=golang-dev
https://golang.org/cl/186165
2010-01-15 14:02:53 -08:00
Russ Cox
307a899d5b gc: bug238
Fixes #471.

R=ken2
CC=golang-dev
https://golang.org/cl/181184
2010-01-08 00:01:03 -08:00
Robert Griesemer
c7bd61a216 Test case for issue 475 and related bug.
R=iant
CC=golang-dev
https://golang.org/cl/183087
2009-12-29 14:44:56 -08:00
Robert Griesemer
a947d0d0c1 test case for issue 471
R=iant
CC=golang-dev
https://golang.org/cl/183084
2009-12-29 14:01:09 -08:00
Adam Langley
50d6c81d4a runtime: fix race condition
(Thanks to ken and rsc for pointing this out)

rsc:
	ken pointed out that there's a race in the new
	one-lock-per-channel code.  the issue is that
	if one goroutine has gone to sleep doing

	select {
	case <-c1:
	case <-c2:
	}

	and then two more goroutines try to send
	on c1 and c2 simultaneously, the way that
	the code makes sure only one wins is the
	selgen field manipulation in dequeue:

	       // if sgp is stale, ignore it
	       if(sgp->selgen != sgp->g->selgen) {
		       //prints("INVALID PSEUDOG POINTER\n");
		       freesg(c, sgp);
		       goto loop;
	       }

	       // invalidate any others
	       sgp->g->selgen++;

	but because the global lock is gone both
	goroutines will be fiddling with sgp->g->selgen
	at the same time.

This results in a 7% slowdown in the single threaded case for a
ping-pong microbenchmark.

Since the cas predominantly succeeds, adding a simple check first
didn't make any difference.

R=rsc
CC=golang-dev
https://golang.org/cl/180068
2009-12-18 12:25:53 -08:00
Russ Cox
c6e316a4b9 gc: handle _ = <-c in select.
Fixes #238.

R=ken2
https://golang.org/cl/163098
2009-12-03 01:30:19 -08:00
Robert Griesemer
5fd4f76802 bug219: parsing difficulties with 6g
R=r, rsc
https://golang.org/cl/157085
2009-11-19 00:04:30 -08:00
Robert Griesemer
3c5dbb036b bug218.go: testcase for issue 238
R=rsc
https://golang.org/cl/154172
2009-11-16 17:53:39 -08:00
Russ Cox
da776791c4 drop output from nilptr tests;
too hard to make it the same everywhere.
still checking for non-zero exit status though.

disable core files while running tests

R=r
http://go/go-review/1026037
2009-11-09 23:11:36 -08:00
Russ Cox
71983af4a1 bug212, bug213.
R=ken
http://go/go-review/1026032
2009-11-08 23:22:06 -08:00
Russ Cox
9dd2e1e30f nil pointer checks in 8g.
fix nil pointer check in 6g.
was dereferencing after the ADD;
dereference before instead.

R=ken@golang.org
CC=iant
http://go/go-review/1016022
2009-11-01 21:04:16 -08:00
Ian Lance Taylor
f305d04943 Bug: 6g accepts fallthrough in type switch.
R=r
CC=go-dev
http://go/go-review/1016006
2009-10-29 15:41:02 -07:00
Ian Lance Taylor
eb63c3fec4 Test that the compiler rejects map types which should not be
compatible.

R=rsc
CC=go-dev
http://go/go-review/1018001
2009-10-28 17:09:24 -07:00