(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
fix a bug in delta encoding: only update the delta-base if something is marshaled.
R=rsc
DELTA=154 (94 added, 56 deleted, 4 changed)
OCL=31069
CL=31071
if there is an error, we will write one more value into the struct but in return
we do fewer tests in the decode.
R=rsc
DELTA=56 (0 added, 42 deleted, 14 changed)
OCL=31041
CL=31044
now that cgo2c can handle it,
merge x.c and x_go.cgo into
a single x.cgo, for x=float,malloc,sema.
R=r
DELTA=1950 (954 added, 996 deleted, 0 changed)
OCL=30951
CL=30964
align the output args separately from the input args,
change cgo2c to insert the necessary padding
when the two arg lists are concatenated in the c
translation.
for example, there is a runtime
func indexstring(s string, i int32) (b byte)
right now in 6g those arguments are aligned in one
struct with s at offset 0, i at 16, and b at 20.
soon the b byte will be in its own struct and structs
are 8 aligned, so it will be b at 24.
right now cgo2c generates:
void indexstring(string s, int32 i, byte b)
this CL makes it generate, in --6g mode:
void indexstring(string s, int32 i, uint32, byte b)
this is valid 6c input, although not valid gcc input.
(the code is being generated for 6c only anyway.)
also, allow C code to be mixed in among the Go funcs.
every instance of the token `func' is expected to start
a new go func.
R=iant
DELTA=145 (118 added, 0 deleted, 27 changed)
OCL=30949
CL=30963
(in the same package).
allow forward method declaration to be satisfied
by implementation in another file (in the same package).
all methods must be declared in the same file
as the receiver type.
R=ken
OCL=30864
CL=30869
echo back context of call in error if likely to be useful.
For example, if os.Open("/etc/passwd", os.O_RDONLY)
fails with syscall.EPERM, it returns as the os.Error
&PathError{
Op: "open",
Path: "/etc/passwd"
Error: os.EPERM
}
which formats as
open /etc/passwd: permission denied
Not converted:
datafmt
go/...
google/...
regexp
tabwriter
template
R=r
DELTA=1153 (561 added, 156 deleted, 436 changed)
OCL=30738
CL=30781
package main
type t interface
type t interface{ m(map[t]bool) }
type m map[t] int
making it work without the forward declaration will require a second pass.
R=ken
OCL=30773
CL=30773