s.output.Data() was being retrieved before the synchronization
point, which meant that it could be retrieved before the
goroutine wrote it. Using gccgo this caused random errors.
R=gri
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=31046
CL=31267
and make 5c, 8c use them.
centralizes reachability analysis
and switch generation.
now 8c doesn't have spurious warnings
in pkg/runtime.
R=ken
OCL=31266
CL=31266
Natural, Integer, and Rational numbers
- added Value() methods to access small Natural and Integers
as uint64 or int64 respectively, and to get the components
of Rational numbers
- fixed a bug with Integer creation
- removed some _'s from names
- added more comments in places
- added test cases
R=rsc
DELTA=184 (127 added, 11 deleted, 46 changed)
OCL=31210
CL=31265
needed for heap allocation if variable escapes.
package main
func main(){
var i interface{} = 42;
switch v := i.(type) {
case int:
println(&v, v);
}
}
R=ken
OCL=31245
CL=31245
* give genwrapper and genembedtramp the same signature.
* move duint8, duint16, duint32, duint64, duintptr into gc.
* tidy genwrapper.
* bug involving struct field symbols in signature list.
(hash-order dependent so hard to trigger)
* new Type print format %#-T like %#T but omits
names on function arguments.
R=ken
OCL=31237
CL=31237
interface = (*int)(nil) is not the same as
interface = nil.
package main
func main() {
var x interface{} = (*int)(nil);
println(x.(*int));
}
R=ken
OCL=31232
CL=31232
package main
func main() {
var x interface {} = 42;
switch x := x.(type) {
case int:
case foo:
}
}
before:
x.go:7: non-type case in type switch
x.go:7: inappropriate case for a type switch
now:
x.go:7: foo: undefined
R=ken
OCL=31221
CL=31221
* use structs instead of interfaces
* compiler lays out data structures ahead of time,
so no more parsing of strings.
* unified reflect data structures with interface
runtime data structures.
* richer data structures should enable reflection
on chans and maps, but not implemented here.
R=r,iant
DELTA=1179 (1179 added, 0 deleted, 0 changed)
OCL=31107
CL=31213
- display: show '...' if a struct/interface has fields/methods removed; show
struct/interface w/o {}'s if all fields/methods were removed; and show the
{}'s if the struct/interface was empty to begin with
R=rsc
DELTA=41 (36 added, 0 deleted, 5 changed)
OCL=31201
CL=31204
- use FilterExports instead of the various predicates in printer.go and doc.go
which simplifies a lot of code and makes it easier to deal with complex cases
R=rsc
DELTA=445 (197 added, 190 deleted, 58 changed)
OCL=31110
CL=31196
(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