* new package hash defining interfaces Hash and Hash32.
* adler32 and crc32 return Hash32 instead of specific types.
* adler32 and crc32 provide non-allocating methods for single slices.
* sha1 and md5 move to crypto, return Hash.
* sum.go, a simple test program, moves to /usr/rsc.
* refresh Make.deps
R=r
DELTA=1908 (935 added, 923 deleted, 50 changed)
OCL=29095
CL=29135
as far as I can tell there's no reason not to.
the Nillable test was succeeding because NewZeroValue
returned the nil interface value and the type guard
was letting it through. the only change in the test is
more detail in the print.
R=r
DELTA=8 (0 added, 7 deleted, 1 changed)
OCL=29124
CL=29126
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
do not update lineno from ONAME nodes,
because they have declaration lineno not use.
show actual name in top-level statement error.
before
runtime.a:7: x.go:5: walkstate: NAME not a top level statement
after
x.go:14: walkstate: runtime.Goexit not a top level statement
R=ken
OCL=29113
CL=29116
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
Not ready to link into build yet.
Delta says 1272 lines but only 474
if you subtract the test files,
which are mostly data.
R=r
DELTA=1252 (1249 added, 0 deleted, 3 changed)
OCL=29013
CL=29037
format.go:
- better error handling, indentation, support for defaults,
environments for custom formatters, cleanups (more functionality, less code)
pretty.go:
- better comment printing using format.go
made test script more robust
TBR=r
DELTA=622 (175 added, 305 deleted, 142 changed)
OCL=28956
CL=28956