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
let errchk exit 0 even if it has reported a BUG.
it echoed BUG and that's all that matters.
R=r
DELTA=143 (1 added, 89 deleted, 53 changed)
OCL=32533
CL=32542
4 known bugs; 0 unexpected bugs
which should be less scary to people
unfamiliar with the tests.
R=r
DELTA=44 (29 added, 12 deleted, 3 changed)
OCL=32460
CL=32464
so that == on func means that the
functions originated in the same
execution of a func literal or definition.
before, there was an inconsistency:
func() {x++} != func() {x++}
but
func() {} == func() {}
this CL makes the second case != too,
just like
make(map[int]int) != make(map[int]int)
R=r
DELTA=202 (71 added, 62 deleted, 69 changed)
OCL=32393
CL=32398
so that golden.out does not include
the name of the compiler (which is
arch-specific and shows up in diffs).
R=r,iant
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=31980
CL=31983
if there is a goroutine waiting to run
and the init goroutine enters a system call,
entersyscall was trying to kick off a new
scheduler for the other goroutine, causing
a panic (new goroutines can't run until main.main).
R=r
DELTA=32 (32 added, 0 deleted, 0 changed)
OCL=31982
CL=31982
introduce NodeList* type in compiler to replace OLIST.
this clarifies where lists can and cannot occur.
list append and concatenation are now cheap.
the _r rules are gone from yacc.
rev and unrev are gone.
no more lists of lists.
the representation of assignments is a bit clunkier.
split into OAS (1=1) and OAS2 (2 or more on one side).
delete dead chanrecv3 code.
delay construction of func types.
R=ken
OCL=31745
CL=31762
(Amusing side note: the GNU coding standards say: Please do
not use the term "illegal" to refer to erroneous input to a
computer program. Please use "invalid" for this, and reserve
the term "illegal" for activities prohibited by law.)
indirect1.go:35:3: error: argument must be string or array or slice or map
indirect1.go:36:3: error: argument must be string or array or slice or map
indirect1.go:38:3: error: argument must be string or array or slice or map
indirect1.go:41:3: error: argument must be string or array or slice or map
indirect1.go:42:3: error: argument must be string or array or slice or map
indirect1.go:44:3: error: argument must be string or array or slice or map
indirect1.go:55:3: error: argument must be string or array or slice or map
indirect1.go:56:3: error: argument must be string or array or slice or map
indirect1.go:58:3: error: argument must be string or array or slice or map
indirect1.go:61:3: error: argument must be array or slice
indirect1.go:62:3: error: argument must be array or slice
indirect1.go:64:3: error: argument must be array or slice
R=rsc
DELTA=12 (0 added, 0 deleted, 12 changed)
OCL=31081
CL=31088
The change to assign.go is because the gcc testsuite fails to
handle .* in a normal way: it matches against the entire
compiler output, not just a single line.
assign.go:15:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:19:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:23:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:27:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
chan/perm.go:14:5: error: incompatible types in assignment
chan/perm.go:15:5: error: incompatible types in assignment
chan/perm.go:16:6: error: incompatible types in assignment
chan/perm.go:17:6: error: incompatible types in assignment
chan/perm.go:24:7: error: invalid send on receive-only channel
chan/perm.go:25:12: error: invalid send on receive-only channel
chan/perm.go:31:4: error: invalid receive on send-only channel
chan/perm.go:32:9: error: invalid receive on send-only channel
chan/perm.go:38:2: error: invalid send on receive-only channel
chan/perm.go:42:2: error: invalid receive on send-only channel
initializerr.go:14:17: error: reference to undefined variable 'X'
initializerr.go:14:19: error: mixture of field and value initializers
initializerr.go:15:26: error: duplicate value for field 'Y'
initializerr.go:16:10: error: too many values in struct composite literal
initializerr.go:18:19: error: index expression is not integer constant
initializerr.go:17:11: error: too many elements in composite literal
R=rsc
DELTA=12 (0 added, 0 deleted, 12 changed)
OCL=29657
CL=29665
when assigning a multifield object
(structs or arrays of structs) they
must not contain any fields that could
not be assigned individually.
R=ken
OCL=29192
CL=29194
this is not a user-visible change.
before, all interface values were
struct Itype {
Sigt *type;
Sigi *inter;
void *method[n];
}
struct Iface {
void *addr;
Itype *itype;
}
the itype is basically a vtable, but it's unnecessary
if the static type is interface{ }.
for interface values with static type empty, the
new representation is
struct Eface {
void *addr;
Sigt *type;
}
this complicates the code somewhat, but
it reduces the number of Itypes that
have to be computed and cached,
it opens up opportunities to avoid function
calls in a few common cases,
and it will make it possible to lay out
interface{} values at compile time,
which i think i'll need for the new reflection.
R=ken
OCL=28701
CL=29121
bug117.go:13:12: error: reference to undefined field or method
import1.go:9:2: error: redefinition of '.main.bufio'
import1.go:8:2: note: previous definition of '.main.bufio' was here
import1.go:9:2: error: incompatible imported type 'bufio.Error'
interface9.go:25:5: error: incompatible types in assignment (method P requires a pointer)
interface9.go:30:5: error: incompatible types in assignment (method P requires a pointer)
R=rsc
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=29044
CL=29055
gives an type mismatch error, although both values appear to
have the same type.
R=ken,rsc
DELTA=23 (23 added, 0 deleted, 0 changed)
OCL=28786
CL=28805
if both types are named, they must be
the same type (arising from the same
declaration).
R=r,gri
DELTA=44 (21 added, 4 deleted, 19 changed)
OCL=28436
CL=28577
replace "shape error across CALL" with more information.
x.go:7: not enough arguments to CALL
a int, b int
int
x.go:10: assignment count mismatch: 3 = 2
x.go:12: too many arguments to RETURN
[no arguments expected]
int, int, int
also leave type alone after conversion failure,
for later errors:
bug049.go:6: cannot convert nil constant to string
bug049.go:6: illegal types for operand: EQ
string
nil # this used to be blank
R=ken
OCL=28405
CL=28407
you should be able to convert a pointer to an array to a
slice, you should not be able to convert an array to a slice.
Currently 6g works the other way around.
R=ken,rsc
DELTA=17 (17 added, 0 deleted, 0 changed)
OCL=28033
CL=28067
declbad.go:15:3: error: variables redeclared but no variable is new
declbad.go:20:3: error: redefinition of 'f'
declbad.go:19:3: note: previous definition of 'f' was here
declbad.go:25:3: error: redefinition of 'i'
declbad.go:24:3: note: previous definition of 'i' was here
declbad.go:30:3: error: variables redeclared but no variable is new
declbad.go:35:3: error: redefinition of 'i'
declbad.go:34:3: note: previous definition of 'i' was here
declbad.go:40:3: error: variables redeclared but no variable is new
declbad.go:45:3: error: variables redeclared but no variable is new
R=r
DELTA=10 (0 added, 0 deleted, 10 changed)
OCL=27934
CL=27957
import (
"vector" -> "container/vector"
"ast" -> "go/ast"
"sha1" -> "hash/sha1"
etc.
)
and update Makefiles. Because I did the conversion
semi-automatically, I sorted all the import blocks
as a post-processing. Some files have therefore
changed that didn't strictly need to.
Rename local packages to lower case.
The upper/lower distinction doesn't work on OS X
and complicates the "single-package directories
with the same package name as directory name"
heuristic used by gobuild and godoc to create
the correlation between source and binary locations.
Now that we have a plan to avoid globally unique
names, the upper/lower is unnecessary.
The renamings will cause trouble for a few users,
but so will the change in import paths.
This way, the two maintenance fixes are rolled into
one inconvenience.
R=r
OCL=27573
CL=27575
as a reminder, the old conversion
was that you could write
var arr [10]byte;
var slice []byte;
slice = arr;
but now you have to write
slice = &arr;
the change eliminates an implicit &, so that
the only implicit &s left are in the . operator
and in string(arr).
also, removed utf8.EncodeRuneToString
in favor of string(rune).
R=r
DELTA=83 (1 added, 23 deleted, 59 changed)
OCL=27531
CL=27534
add test for string range.
test has minor failure: after loop the index == len(s); should be len(s)-1
in this case. according to spec, vars are left at position at last
iteration.
R=ken,rsc
DELTA=259 (161 added, 96 deleted, 2 changed)
OCL=27343
CL=27343