bug249.go:10:5: error: incompatible type in initialization
bug249.go:26:5: error: incompatible type in initialization
R=rsc
CC=golang-dev
https://golang.org/cl/198058
import1.go:12:8: error: redefinition of ‘bufio’
import1.go:11:8: note: previous definition of ‘bufio’ was here
import1.go:16:2: error: redefinition of ‘fmt’
import1.go:15:2: note: previous definition of ‘fmt’ was here
import1.go:11:8: error: imported and not used: bufio
R=rsc
CC=golang-dev
https://golang.org/cl/194165
I have to admit that "cannot use type p.T as type p.T" is a
bit weak. 8g gives a similar error ("cannot use v1 (type p.T)
as type p.T in assignment").
bug3.go:37:5: error: incompatible type in initialization (incompatible type for method ‘M’ (different parameter types))
bug3.go:38:5: error: incompatible type in initialization (incompatible type for method ‘M’ (different parameter types))
bug3.go:43:5: error: incompatible type in initialization (incompatible type for method ‘M’ (different parameter types))
bug3.go:44:5: error: incompatible type in initialization (incompatible type for method ‘M’ (different parameter types))
bug3.go:49:5: error: incompatible types in assignment (cannot use type p.T as type p.T)
bug3.go:50:5: error: incompatible types in assignment (cannot use type p.T as type p.T)
bug3.go:55:5: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:56:5: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:57:6: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:58:6: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:59:5: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:60:5: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:61:6: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:62:6: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
R=rsc
CC=golang-dev
https://golang.org/cl/199044
I got it wrong because gccgo was incorrectly failing to clear
the value when a nonblocking receive did not receive
anything.
R=rsc
CC=golang-dev
https://golang.org/cl/194161
bug228.go:11:25: error: invalid use of ‘...’
bug228.go:13:13: error: ‘...’ only permits one name
bug228.go:15:20: error: ‘...’ must be last parameter
bug228.go:17:7: error: expected type
bug228.go:19:8: error: expected type
R=rsc
CC=golang-dev
https://golang.org/cl/196077
* 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
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
Since gcco runs goroutines in independent threads, it needs
locking for the global variables. This shows up when I use
ordinary increments rather than locked increments for var++.
R=ken2, ken3
CC=golang-dev
https://golang.org/cl/190074
(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
* better error for lookup of unexported field
* do not assign "ideal string" type to typed string literal
* do not confuse methods and fields during interface check
Fixes#410.
Fixes#411.
Fixes#426.
R=ken2
https://golang.org/cl/179069
parsing and printing to new syntax.
Use -oldparser to parse the old syntax,
use -oldprinter to print the old syntax.
2) Change default gofmt formatting settings
to use tabs for indentation only and to use
spaces for alignment. This will make the code
alignment insensitive to an editor's tabwidth.
Use -spaces=false to use tabs for alignment.
3) Manually changed src/exp/parser/parser_test.go
so that it doesn't try to parse the parser's
source files using the old syntax (they have
new syntax now).
4) gofmt -w src misc test/bench
5th and last set of files.
R=rsc
CC=golang-dev
https://golang.org/cl/180050
Pull the struct into a single line, since 6g reports the error
on the last line of the struct definition and gccgo reports it
on the first line.
6g:
bug215.go:12: invalid recursive type A
gccgo:
bug215.go:12:6: error: invalid recursive type ‘A’
R=rsc
https://golang.org/cl/180044
This change removes the necessity to have GOBIN in $PATH,
and also doesn't assume that the build is being run from
$GOROOT/src. This is a minimal set of necessary changes
to get Go to build happily from the FreeBSD ports
collection.
R=rsc
CC=golang-dev
https://golang.org/cl/171044
- remove use of implicit string concatenation
- these appear to be the only files correctly compiling under test
that used implicit string concatenation
R=rsc
https://golang.org/cl/172043
the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.
this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.
Fixes#115.
R=rsc, dsymonds1
https://golang.org/cl/157067
* add runtime sliceslice1 for x[lo:]
* remove runtime arraytoslice, rewriting &arr into arr[0:len(arr)].
* port cgen_inline into 8g, 5g.
* use native memmove in maps
R=ken2
https://golang.org/cl/157106
* reverse-complement: port C algorithm to Go
saves 30% on my MacBook Pro and makes it a fairer comparison.
* test reverse-complement with and without GC (another 15%)
* revise timing.sh to work on more systems
* avoid two glibcisms in fasta.c
R=r
https://golang.org/cl/156110
performance hit of about 20% but more intuitive results for submatches.
we need a good regexp package at some point.
Fixes#110.
R=rsc
CC=golang-dev
https://golang.org/cl/152131
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
tests are processed, and thus the run.out output. The default
LANG on Fedora 10, en_US.utf8, causes the tests to be sorted
differently--e.g., arrayindex1.go and arrayindex.go are sorted
in the opposite order.
R=r, rsc
http://go/go-review/1018022
bug205.go:14:12: error: index must be integer
bug205.go:15:12: error: index must be integer
bug205.go:16:12: error: incompatible type for map index
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=35957
CL=35960
messages. Match gccgo output.
named1.go:32:2: error: argument 0 has wrong type (cannot use type bool as type Bool)
named1.go:33:2: error: argument 0 has wrong type (cannot use type bool as type Bool)
named1.go:35:5: error: incompatible type for map index (cannot use type bool as type Bool)
named1.go:36:12: error: incompatible type for map assignment (cannot use type Bool as type bool)
named1.go:38:5: error: incompatible types in assignment (cannot use type bool as type Bool)
named1.go:40:2: error: argument 0 has wrong type (cannot use type bool as type Bool)
named1.go:42:5: error: incompatible type for receive (cannot use type bool as type Bool)
named1.go:46:5: error: incompatible type for type guard (cannot use type bool as type Bool)
named1.go:50:5: error: incompatible type for type guard (cannot use type bool as type Bool)
named1.go:53:2: error: argument 0 has wrong type (cannot use type bool as type Bool)
named1.go:54:5: error: incompatible types in assignment (cannot use type bool as type Bool)
R=rsc
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=35943
CL=35943
because they are in package runtime.
another step to enforcing package boundaries.
R=r
DELTA=732 (114 added, 93 deleted, 525 changed)
OCL=35811
CL=35824
5g. fixes to 64 bit code gen. added (finally) function to do
shifts properly.
go/test: passes 83% (287/342)
R=rsc
APPROVED=rsc
DELTA=156 (50 added, 53 deleted, 53 changed)
OCL=35589
CL=35616
sites plus optimized constant code a bit (one less register
used).
- changed conditional branches, might need a re-tweak later
- gave up on agen OINDEX and copied/fixed the version in 8g
go/test: passes 66% (225/339)
R=rsc
APPROVED=rsc
DELTA=148 (67 added, 32 deleted, 49 changed)
OCL=35040
CL=35055
special all-nacl.bash and test/run-nacl that
run just the tests known to work under nacl.
the rest requires closures.
fix another bug or two in syscall.
R=r
DELTA=420 (410 added, 8 deleted, 2 changed)
OCL=34882
CL=34907
go/test: passes 64% (215/337) tests
metric updated, had total number of tests wrong. number of
failing tests is down from 129 to 122.
R=rsc
APPROVED=rsc
DELTA=228 (12 added, 5 deleted, 211 changed)
OCL=34897
CL=34899
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
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
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
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
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
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
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
bug165.go:13:6: error: invalid recursive type 'S'
This is a different line from the 6g error message, which is
"invalid map key type". I accomodated both compilers by
merging the line.
bug188.go:13:2: error: unexpected reference to package
I made the error message less specific, which I think is fine
here.
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=33398
CL=33426
bug039.go:6:7: error: redefinition of 'x'
bug039.go:5:1: note: previous definition of 'x' was here
bug049.go:6:9: error: incompatible types in binary expression
bug062.go:6:7: error: incompatible type in initialization
bug086.go:5:1: error: control reaches end of non-void function
bug103.go:8:2: error: variable has no type
bug121.go:9:2: error: expected signature or type name
bug131.go:7:7: error: incompatible type in initialization
bug165.go:10:8: error: expected complete type
bug171.go:5:1: error: control reaches end of non-void function
bug171.go:6:1: error: control reaches end of non-void function
bug172.go:7:6: error: expected integer type
bug182.go:7:2: error: if statement expects boolean expression
bug183.go:10:5: error: incompatible types in assignment
bug183.go:19:5: error: incompatible types in assignment
R=rsc
DELTA=15 (0 added, 0 deleted, 15 changed)
OCL=33168
CL=33175