Stephen Ma
b4bb970e18
gc: handle go print() and go println()
...
Fixes #1952 .
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4611041
2011-06-13 22:50:51 +10:00
Russ Cox
5ab096d030
gc: implement new shift rules
...
The change is that 1.0<<2 is now okay.
R=ken2
CC=golang-dev
https://golang.org/cl/4524084
2011-05-31 15:05:40 -04:00
Robert Griesemer
8c2078796d
test: test cases for issue 1708.
...
R=rsc
CC=golang-dev
https://golang.org/cl/4548058
2011-05-25 10:26:06 -07:00
Anthony Martin
0b209b36b6
gc: relax assignability of method receivers
...
The spec was adjusted in commit df410d6a4842 to allow the
implicit assignment of strutures with unexported fields in
method receivers. This change updates the compiler.
Also moved bug322 into fixedbugs and updated golden.out
to reflect the removal of the last known bug.
Fixes #1402 .
R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/4526069
2011-05-24 19:48:19 -04:00
Russ Cox
5ff3336490
gc: correct handling of unexported method names in embedded interfaces
...
go/types: update for export data format change
reflect: require package qualifiers to match during interface check
runtime: require package qualifiers to match during interface check
test: fixed bug324, adapt to be silent
Fixes #1550 .
Issue 1536 remains open.
R=gri, ken2, r
CC=golang-dev
https://golang.org/cl/4442071
2011-04-21 08:14:50 -04:00
Russ Cox
de5616fbb4
gc: print of unsafe.Pointer
...
Got lost when I introduced TUNSAFEPTR.
R=ken2
CC=golang-dev
https://golang.org/cl/4442046
2011-04-15 16:16:20 -04:00
Ian Lance Taylor
3dbf65871c
test: adjust bug324 to expect run-time failure, not compile-time.
...
Failing at compile time requires that for each conversion
between two interface types the compiler compare the sets of
unexported methods to see if they come from different
packages. Since this test will fail approximately never on
real code, and since it can't catch all cases of the problem,
I don't think it's worth testing in the compiler. This CL
changes this test to look for a run-time panic rather than a
compile-time error.
R=gri, rsc1, iant2, rsc
CC=golang-dev
https://golang.org/cl/4332041
2011-03-29 15:03:09 -07:00
Ian Lance Taylor
61c9d3f08a
test: adjust bugs/bug322 to match current spec.
...
R=gri, rsc1
CC=golang-dev
https://golang.org/cl/4328041
2011-03-29 06:49:21 -07:00
Robert Griesemer
ad8b0d915b
bug324.go: test case for issue 1550
...
Also: renamed fixedbugs/bug322.go to fixedbugs/bug323.go
because we already have a bugs/bug322.go and bug322.dir.
R=rsc
CC=golang-dev
https://golang.org/cl/4219044
2011-02-24 19:29:25 -08:00
Robert Griesemer
459da21603
issue 1402: added test case
...
R=rsc
CC=golang-dev
https://golang.org/cl/4079063
2011-02-03 20:35:14 -08:00
Russ Cox
f4e76d8309
replace non-blocking send, receive syntax with select
...
R=golang-dev, nigeltao, niemeyer, r
CC=golang-dev
https://golang.org/cl/4079053
2011-01-31 18:36:28 -05:00
Russ Cox
f2b5a07453
delete float, complex - code changes
...
also:
cmplx -> complex
float64(1.0) -> 1.0
float64(1) -> 1.0
R=gri, r, gri1, r2
CC=golang-dev
https://golang.org/cl/3991043
2011-01-19 23:09:00 -05:00
Russ Cox
12307008e9
runtime: print signal information during panic
...
$ 6.out
panic: runtime error: invalid memory address or nil pointer dereference
[signal 11 code=0x1 addr=0x0 pc=0x1c16]
runtime.panic+0xa7 /Users/rsc/g/go/src/pkg/runtime/proc.c:1089
runtime.panic(0xf6c8, 0x25c010)
runtime.panicstring+0x69 /Users/rsc/g/go/src/pkg/runtime/runtime.c:88
runtime.panicstring(0x24814, 0x0)
runtime.sigpanic+0x144 /Users/rsc/g/go/src/pkg/runtime/darwin/thread.c:465
runtime.sigpanic()
main.f+0x16 /Users/rsc/x.go:5
main.f()
main.main+0x1c /Users/rsc/x.go:9
main.main()
runtime.mainstart+0xf /Users/rsc/g/go/src/pkg/runtime/amd64/asm.s:77
runtime.mainstart()
runtime.goexit /Users/rsc/g/go/src/pkg/runtime/proc.c:149
runtime.goexit()
R=r
CC=golang-dev
https://golang.org/cl/4036042
2011-01-18 14:15:11 -05:00
Russ Cox
dc9a3b2791
gc: align structs according to max alignment of fields
...
cc: same
runtime: test cc alignment (required moving #define of offsetof to runtime.h)
fix bug260
Fixes #482 .
Fixes #609 .
R=ken2, r
CC=golang-dev
https://golang.org/cl/3563042
2010-12-13 16:22:19 -05:00
Robert Griesemer
5667d82599
fix build
...
R=iant
CC=golang-dev, ken2
https://golang.org/cl/2182043
2010-09-15 17:00:00 -07:00
Ian Lance Taylor
b9988edbb6
test: Add test for //line (currently fails).
...
R=rsc
CC=golang-dev
https://golang.org/cl/2127045
2010-09-10 19:12:43 -07:00
Russ Cox
c6cb303a8a
gc: bug299, bug300
...
R=ken2
CC=golang-dev
https://golang.org/cl/1731057
2010-08-03 00:53:32 -07:00
Robert Griesemer
500425ac7b
bug300: literal types must not be parenthesized
...
( This CL is dependent on acceptance of
https://golang.org/cl/1913041/show )
R=go-dev
CC=golang-dev
https://golang.org/cl/1860045
2010-07-29 18:14:49 -07:00
Robert Griesemer
7734ad5179
bug299: parenthesized receiver types/anonymous fields are illegal
...
R=r
CC=golang-dev
https://golang.org/cl/1846051
2010-07-29 10:54:03 -07:00
Russ Cox
08a263a991
gc: bug291
...
Fixes #915 .
R=ken2
CC=golang-dev
https://golang.org/cl/1856042
2010-07-15 15:17:42 -07:00
Russ Cox
17f90c68c6
gc: fix handling of types inside function bodies
...
Fixes #849 .
Fixes #920 .
R=ken2
CC=golang-dev
https://golang.org/cl/1841042
2010-07-15 14:25:50 -07:00
Russ Cox
21ff75bc0e
complex divide: match C99 implementation
...
R=iant, ken2, r, r2, ken3
CC=golang-dev
https://golang.org/cl/1686044
2010-06-18 15:46:00 -07:00
Russ Cox
c9172fb2a3
runtime: correct fault for 16-bit divide on Leopard
...
R=r
CC=golang-dev
https://golang.org/cl/1703041
2010-06-14 18:07:17 -07:00
Rob Pike
dee4db0691
Add test for division by zero.
...
It fails with 6g. Once 6g is fixed up I will extend the value tests.
R=rsc, iant
CC=golang-dev
https://golang.org/cl/1677043
2010-06-14 15:00:19 -07:00
Robert Griesemer
fb279e7347
bug286: test case
...
R=r
CC=golang-dev
https://golang.org/cl/1644042
2010-06-09 16:05:00 -07:00
Russ Cox
565b5dc076
gc: new typechecking rules
...
* Code for assignment, conversions now mirrors spec.
* Changed some snprint -> smprint.
* Renamed runtime functions to separate
interface conversions from type assertions:
convT2I, assertI2T, etc.
* Correct checking of \U sequences.
Fixes #840 .
Fixes #830 .
Fixes #778 .
R=ken2
CC=golang-dev
https://golang.org/cl/1303042
2010-06-08 18:50:02 -07:00
Russ Cox
f892540513
fix build
...
R=gri
CC=golang-dev
https://golang.org/cl/1616041
2010-06-08 16:14:19 -07:00
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