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

675 Commits

Author SHA1 Message Date
Russ Cox
28eba4877b fix "declared and not used" errors in non-test code.
R=r
DELTA=112  (6 added, 57 deleted, 49 changed)
OCL=34610
CL=34610
2009-09-14 17:20:29 -07:00
Rob Pike
5e11bb259b add tests for the func()() case
R=gri
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=34601
CL=34601
2009-09-14 13:09:53 -07:00
Russ Cox
2204cfddea fix bug206.
delay calls to savex as long as possible.

R=ken
OCL=34535
CL=34546
2009-09-10 17:33:01 -07:00
Russ Cox
757fe32fe7 fix bug206 output on different platforms
TBR=r
OCL=34524
CL=34524
2009-09-10 13:43:15 -07:00
Robert Griesemer
82540ebdf0 bug206
R=rsc
DELTA=51  (51 added, 0 deleted, 0 changed)
OCL=34516
CL=34516
2009-09-10 10:30:36 -07:00
Russ Cox
aa6e81dd71 a few more blank tests
R=ken
OCL=34500
CL=34500
2009-09-09 16:59:41 -07:00
Russ Cox
f4ee9f133c check type of string/map/array index expressions
R=ken
OCL=34478
CL=34480
2009-09-09 01:31:10 -07:00
Russ Cox
e780fa8669 defining package block names must override
universe block names.

BUG=2097244
R=ken
OCL=34295
CL=34473
2009-09-09 01:01:39 -07:00
Russ Cox
5d16d23362 update type switch to match spec.
R=ken
OCL=34471
CL=34471
2009-09-09 00:18:16 -07:00
Russ Cox
5438be4541 write-only variable _
R=ken
OCL=34465
CL=34470
2009-09-08 23:16:19 -07:00
Ken Thompson
a4448a97d8 compound literal test
R=rsc
OCL=34453
CL=34455
2009-09-08 14:26:39 -07:00
Russ Cox
c702bdd828 script for running test programs in interpreter.
tweak test/literal.go to give more information.

R=austin
DELTA=45  (43 added, 0 deleted, 2 changed)
OCL=34381
CL=34398
2009-09-04 13:04:11 -07:00
Russ Cox
620dc595ff missed in last compiler change
R=ken
OCL=34348
CL=34348
2009-09-03 16:18:03 -07:00
Russ Cox
f2a8cd5ad9 corrected bug187; dropped on the floor somehow
R=austin
DELTA=23  (23 added, 0 deleted, 0 changed)
OCL=34340
CL=34346
2009-09-03 16:17:06 -07:00
Russ Cox
a18208fb60 fix range on invalid utf8 bug
R=r
DELTA=42  (21 added, 20 deleted, 1 changed)
OCL=34328
CL=34333
2009-09-03 13:56:06 -07:00
Rob Pike
cf336b10df partial rune at end makes string range loop forever
R=rsc
DELTA=20  (20 added, 0 deleted, 0 changed)
OCL=34330
CL=34332
2009-09-03 13:33:16 -07:00
Rob Pike
7f0dd8b1b7 new benchmark results.
main changes:
	gccgo is much slower on  binary-tree and fannkuch
	6g seems to struggle with alignment of loops in nbody (dignosis uncertain)
	6g is a little faster at regexps and concurrency

R=rsc
DELTA=93  (93 added, 0 deleted, 0 changed)
OCL=34320
CL=34322
2009-09-03 11:41:01 -07:00
Russ Cox
262b6462aa fix bug187 (itself buggy)
R=austin
DELTA=26  (0 added, 26 deleted, 0 changed)
OCL=34294
CL=34317
2009-09-03 10:59:52 -07:00
Russ Cox
a1391c2d13 fix one bug involving [...] constructors.
added iant's bug202 (in main code)
and ken's bug203 (in init function).
bug187 remains at large.

R=ken
OCL=34293
CL=34293
2009-09-02 23:26:13 -07:00
Russ Cox
ee2d5128d6 the last bug involving type hashes
R=ken
OCL=34244
CL=34249
2009-09-02 09:09:32 -07:00
Russ Cox
bebe06a784 type switch bug involving function parameter names
R=ken
OCL=34232
CL=34232
2009-09-01 18:04:49 -07:00
Russ Cox
27c4e7e74e catch package net import "net" for release
R=ken
OCL=34205
CL=34207
2009-09-01 14:12:09 -07:00
Ian Lance Taylor
1a05177d44 Match gccgo error messages.
bug197.go:10:5: error: incompatible type in initialization
bug197.go:11:5: error: incompatible type in initialization
bug197.go:12:5: error: incompatible type in initialization
bug197.go:13:5: error: incompatible type in initialization
bug197.go:20:13: error: incompatible types in binary expression
bug197.go:21:27: error: incompatible types in binary expression

R=rsc
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=34135
CL=34177
2009-08-31 21:39:08 -07:00
Russ Cox
6e8524be18 array index bug
x[i]
x not addressable, i >= UINF
double evaluated i
second eval killed live registers

manifested as gob instability

R=ken
OCL=34097
CL=34099
2009-08-30 18:47:48 -07:00
Ken Thompson
e667e8a4f7 arraytoslice and some cleanup
R=rsc
OCL=34058
CL=34058
2009-08-28 15:44:24 -07:00
Ken Thompson
bf0130cc0f sliceslice inline
R=rsc
OCL=34041
CL=34041
2009-08-28 12:37:39 -07:00
Ken Thompson
9bf597a210 inline slicearray
R=rsc
OCL=33974
CL=33974
2009-08-27 13:19:44 -07:00
Russ Cox
4b409289f6 remove Line in bufio.ReadLine(Bytes|Slice|String)
also drop bool arg from ReadString

R=r
DELTA=45  (13 added, 1 deleted, 31 changed)
OCL=33923
CL=33960
2009-08-27 11:20:15 -07:00
Ian Lance Taylor
79606b9952 Cascading errors lead to a compiler crash.
R=rsc
DELTA=18  (18 added, 0 deleted, 0 changed)
OCL=33914
CL=33917
2009-08-26 16:24:51 -07:00
Russ Cox
d66d65da96 bug132
R=ken
OCL=33792
CL=33803
2009-08-24 17:06:10 -07:00
Ian Lance Taylor
92ac4bff74 Match gccgo error messages.
bug192.go:11:5: error: redefinition of ‘fmt’
bug192.go:9:8: note: previous definition of ‘fmt’ was here

R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=33780
CL=33790
2009-08-24 15:56:39 -07:00
Russ Cox
14be733a25 bug197
R=ken
OCL=33765
CL=33765
2009-08-24 13:41:47 -07:00
Russ Cox
ef3e6810b8 bug189
R=ken
OCL=33745
CL=33745
2009-08-24 09:23:04 -07:00
Russ Cox
ac9d833c1e half of bug193
R=ken
OCL=33730
CL=33730
2009-08-23 18:09:44 -07:00
Russ Cox
28b655ea07 more interface embedding tests
6g's error for I4 is not quite accurate
(it calls I4 a non-interface) but also
not a crash or infinite loop.

R=iant
DELTA=15  (15 added, 0 deleted, 0 changed)
OCL=33701
CL=33709
2009-08-21 21:30:24 -07:00
Russ Cox
59e2e54eab fix bug195
R=ken
OCL=33700
CL=33700
2009-08-21 18:07:11 -07:00
Russ Cox
e1c5d179d6 fix crash in bug194; add bug196
R=ken
OCL=33694
CL=33697
2009-08-21 17:54:07 -07:00
Ian Lance Taylor
5261be20eb A test for an interface which uses a forward declared type
which turns out to be invalid.

R=rsc
DELTA=15  (15 added, 0 deleted, 0 changed)
OCL=33691
CL=33693
2009-08-21 17:42:41 -07:00
Ian Lance Taylor
f861c7f61b If the compiler dumps core, bash will print a useless error
message with the full path of the errchk script.  Catch that
by wrapping the if statement which invokes the compiler in a
subshell.  Use the $TMPOUT file as a flag to let the main
shell know whether the subshell ran.  Since the compiler
stdout and stderr are redirected, if the if statement produces
any output, then the compiler crashed, and we report that.

R=r,rsc
DELTA=14  (11 added, 1 deleted, 2 changed)
OCL=33690
CL=33692
2009-08-21 17:41:18 -07:00
Ian Lance Taylor
1f1551f179 Test composite literals with undeclared types. This crashed
gccgo in a few different places, and crashes 6g as of this
writing.  Note that the index in a composite literal must be
looked up in a different namespace if the composite literal
type turns out to be a struct.

R=rsc
DELTA=36  (36 added, 0 deleted, 0 changed)
OCL=33681
CL=33685
2009-08-21 16:09:17 -07:00
Ian Lance Taylor
8bbe748b84 Enable these tests. Fix divconst.go and modconst.go to
compile with the current compiler.  Adjust expected error
message in method1.go to match 6g output.

R=rsc
DELTA=9  (2 added, 5 deleted, 2 changed)
OCL=33674
CL=33682
2009-08-21 15:43:23 -07:00
Robert Griesemer
cfa52e5e0b unexpected shift conversion behavior
R=r
DELTA=20  (20 added, 0 deleted, 0 changed)
OCL=33646
CL=33667
2009-08-21 14:14:25 -07:00
Russ Cox
e107afddc5 fix build
TBR=r
OCL=33623
CL=33623
2009-08-20 17:36:21 -07:00
Russ Cox
8a45917f3d len and cap on chans
R=ken
OCL=33599
CL=33599
2009-08-20 11:12:04 -07:00
Rob Pike
770485e522 add bug to capture double declaration of name in file and package block
R=rsc
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=33554
CL=33563
2009-08-19 17:37:23 -07:00
Russ Cox
5600435fe4 produce diagnostic for
import "fmt"
var fmt = 1

R=ken
OCL=33556
CL=33561
2009-08-19 17:27:08 -07:00
Russ Cox
38df5ec58d try to do better line number reporting
in the presence of yacc lookahead.
better but still not perfect

R=ken
OCL=33541
CL=33541
2009-08-19 15:18:08 -07:00
Ian Lance Taylor
8aa9161e47 With the changes to support automatic forward declarations of
type names, gccgo no longer reports redefinition errors for
:=, because it no longer knows at parse time whether the type
has changed.  Adjust this test to not match "redefinition",
and to instead match gccgo's current output.

declbad.go:19:3: error: variables redeclared but no variable is new
declbad.go:34:3: error: variables redeclared but no variable is new
declbad.go:39:3: error: variables redeclared but no variable is new
declbad.go:44:3: error: variables redeclared but no variable is new
declbad.go:49:3: error: variables redeclared but no variable is new
declbad.go:24:3: error: incompatible types in assignment
declbad.go:29:3: error: incompatible types in assignment
declbad.go:39:3: error: incompatible types in assignment

R=rsc
DELTA=10  (0 added, 0 deleted, 10 changed)
OCL=33537
CL=33539
2009-08-19 14:40:48 -07:00
Russ Cox
63aeaa2a03 fix import dot bug
R=ken
OCL=33526
CL=33528
2009-08-19 11:32:46 -07:00
Ian Lance Taylor
42e9db134b Test that a type can refer to itself recursively as long as it
does so in ways that permit its size to be known.

R=rsc
DELTA=35  (35 added, 0 deleted, 0 changed)
OCL=33427
CL=33433
2009-08-17 19:23:17 -07:00