1
0
mirror of https://github.com/golang/go synced 2024-10-04 02:21:21 -06:00
Commit Graph

1420 Commits

Author SHA1 Message Date
Russ Cox
ff45e7bcbd missed Makefile before; fix build
TBR=dsymonds
OCL=29155
CL=29155
2009-05-21 06:49:56 -07:00
Russ Cox
23e62d169f stricter interface conversion rule: i.(T)
must have non-nil i.

R=ken
OCL=29136
CL=29136
2009-05-20 18:23:19 -07:00
Russ Cox
140aed9ab7 hash reorg.
* 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
2009-05-20 18:16:38 -07:00
Russ Cox
2d5d4a1b41 reflect bug: NewZeroValue was refusing to create slices.
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
2009-05-20 15:42:14 -07:00
Russ Cox
a39bae095a ifaceop was being called with integers
that came from two different enums.
spilt into ifacecvt and ifaceop depending
on which enum the argument is.

R=ken
OCL=29122
CL=29122
2009-05-20 15:09:50 -07:00
Russ Cox
2da5022bcf change representation of interface values.
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
2009-05-20 14:57:55 -07:00
Russ Cox
47e5152790 fix implicit star for range on *map, *[].
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
2009-05-20 14:24:23 -07:00
Russ Cox
04d8605c21 clear out pkg tree in clean.bash.
rename place-holder to _place_holder_ so it can be avoided.

R=r
DELTA=5  (2 added, 2 deleted, 1 changed)
OCL=29093
CL=29097
2009-05-20 11:12:05 -07:00
Robert Griesemer
1b3b51f7db more useful error string
R=r
DELTA=5  (4 added, 0 deleted, 1 changed)
OCL=29088
CL=29090
2009-05-20 11:02:12 -07:00
Russ Cox
02f13e4764 build crypto/block.
deps.bash tweak.

R=r
DELTA=95  (95 added, 0 deleted, 0 changed)
OCL=29046
CL=29059
2009-05-19 15:42:00 -07:00
Russ Cox
513faccb6f final AES: CMAC authentication and EAX authenticated encryption
R=r
DELTA=791  (779 added, 0 deleted, 12 changed)
OCL=29045
CL=29058
2009-05-19 15:41:37 -07:00
Russ Cox
d85238635a deps.bash tweak - no need to sort -u the $O files.
R=dsymonds
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=29048
CL=29053
2009-05-19 15:22:42 -07:00
Russ Cox
20ea881c79 Xor-based crypto modes: OFB and CTR stream encryption.
R=r
DELTA=643  (643 added, 0 deleted, 0 changed)
OCL=29017
CL=29047
2009-05-19 14:58:49 -07:00
Russ Cox
b0608c1391 Crypto modes: CBC, CFB, ECB.
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
2009-05-19 14:01:03 -07:00
Ken Thompson
da49bfe664 static initialization of strings
R=r
OCL=29036
CL=29036
2009-05-19 13:37:36 -07:00
Russ Cox
73c73855ea testing: add t.Failed() bool
R=r
DELTA=18  (10 added, 4 deleted, 4 changed)
OCL=29000
CL=29034
2009-05-19 11:00:55 -07:00
Ken Thompson
b91a043d02 static initialization of slices
R=r
OCL=29016
CL=29016
2009-05-18 22:11:22 -07:00
David Symonds
760b778458 Create dependencies automatically for top-level lib directory.
It caught a few missing dependencies (bufio/fmt -> utf8, fmt -> os, http -> strconv, etc.).

R=r,rsc
APPROVED=r
DELTA=126  (79 added, 45 deleted, 2 changed)
OCL=28983
CL=29014
2009-05-18 18:42:47 -07:00
Brendan O'Dea
89df071165 tweaks to exvar.Map
R=dsymonds,rsc
APPROVED=rsc
DELTA=88  (53 added, 17 deleted, 18 changed)
OCL=28452
CL=29008
2009-05-18 15:42:09 -07:00
Russ Cox
80543aca7e Public AES block interface.
The higher-level stream modes will be in crypto/block.

R=r
DELTA=205  (136 added, 7 deleted, 62 changed)
OCL=29002
CL=29006
2009-05-18 15:27:20 -07:00
Robert Griesemer
1ed725d7cd - changed parser to return os.Error, removed ErrorHandler
- added IsValid predicate to token.Position
- updated pretty, godoc, gobuild
- updated/expanded test cases

R=rsc
DELTA=265  (97 added, 78 deleted, 90 changed)
OCL=28961
CL=29005
2009-05-18 14:59:16 -07:00
Russ Cox
69f55d1487 Getgroups max on Linux is bigger than I thought.
R=iant
DELTA=3  (2 added, 0 deleted, 1 changed)
OCL=28994
CL=29003
2009-05-18 14:56:25 -07:00
Russ Cox
be869ba4d6 add io.ByteReader.
add testing/iotest package.
make bufio return error on short write.

R=r
DELTA=423  (208 added, 154 deleted, 61 changed)
OCL=28997
CL=28999
2009-05-18 13:31:56 -07:00
Ken Thompson
6b942c68cc rewrote initialization to save space.
fixed bug in seeding. top 11 bits were
not changed by different seeds.

R=r
OCL=28998
CL=28998
2009-05-18 12:11:46 -07:00
Russ Cox
3b36acc71b move ShortWrite error into io so that other packages can use it.
R=r
DELTA=15  (7 added, 1 deleted, 7 changed)
OCL=28996
CL=28996
2009-05-18 11:47:35 -07:00
Russ Cox
23c81f7424 add Getwd, Fchdir, tests
R=r
DELTA=215  (186 added, 0 deleted, 29 changed)
OCL=28968
CL=28995
2009-05-18 10:49:34 -07:00
Ken Thompson
62231e91d0 static initialization with DATA statements
structs and arrays are done
slices and maps are yet to do

R=r
OCL=28977
CL=28977
2009-05-17 19:16:16 -07:00
Ken Thompson
52b0f77bf9 static initialization
structure set up - no change yet

R=r
OCL=28966
CL=28966
2009-05-16 13:29:08 -07:00
Robert Griesemer
8ee7688af6 make Len() == 0 for nil vector.Vector
(mimic behavior of slices)

R=r
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=28960
CL=28962
2009-05-15 21:59:08 -07:00
Robert Griesemer
66cc0d6f60 don't require ()'s around composite literals if the
literal type is not a type name

R=rsc
DELTA=41  (2 added, 7 deleted, 32 changed)
OCL=28955
CL=28957
2009-05-15 18:59:09 -07:00
Russ Cox
a343e5ceb1 fix handling of line numbers for first function
R=r
DELTA=2  (1 added, 0 deleted, 1 changed)
OCL=28949
CL=28951
2009-05-15 17:26:08 -07:00
Rob Pike
c54699c977 s/NewLogger/New/
R=rsc
DELTA=7  (0 added, 0 deleted, 7 changed)
OCL=28947
CL=28950
2009-05-15 17:22:30 -07:00
Russ Cox
96890d4218 close TODO
R=r
DELTA=42  (0 added, 26 deleted, 16 changed)
OCL=28940
CL=28942
2009-05-15 15:51:41 -07:00
Rob Pike
c81d09d92b implement %#o %#x %#X formats
R=rsc
OCL=28936
CL=28936
2009-05-15 15:18:09 -07:00
Russ Cox
66f5e89082 os: MkdirAll, RemoveAll, Chmod, Chown, Truncate, Getgroups.
Getuid, etc drop their errors -- they cannot error

R=r
DELTA=605  (547 added, 12 deleted, 46 changed)
OCL=28919
CL=28929
2009-05-15 14:11:24 -07:00
Rob Pike
13fbb1d82e StringVector specialization of Vector
R=gri,rsc
DELTA=197  (194 added, 0 deleted, 3 changed)
OCL=28900
CL=28911
2009-05-15 11:52:58 -07:00
Russ Cox
5e76c032f6 make Stat indicate whether it followed a symlink.
R=r
DELTA=61  (34 added, 0 deleted, 27 changed)
OCL=28904
CL=28906
2009-05-15 11:04:49 -07:00
Russ Cox
55b70d6c98 Return error from WriteByte, to match bufio.Writer.
R=gri
DELTA=4  (1 added, 0 deleted, 3 changed)
OCL=28868
CL=28899
2009-05-15 10:46:14 -07:00
Robert Griesemer
0fe8487ced - Remove IntVector methods that are "inherited" with correct type
- Faster vector.Delete, removed result value (easy to get via At(i))

R=r
DELTA=40  (6 added, 30 deleted, 4 changed)
OCL=28866
CL=28897
2009-05-15 10:43:00 -07:00
Russ Cox
b725e32c99 add directory argument to os.ForkExec
R=iant
DELTA=41  (35 added, 0 deleted, 6 changed)
OCL=28892
CL=28895
2009-05-15 10:32:05 -07:00
Russ Cox
a854c7f993 AES key setup and block ciphers.
AES mode wrappers not implemented, so no public interface yet.

R=r
DELTA=918  (918 added, 0 deleted, 0 changed)
OCL=28848
CL=28863
2009-05-14 17:11:11 -07:00
Robert Griesemer
472e191a23 ByteBuffer.WriteByte
R=r
DELTA=17  (10 added, 0 deleted, 7 changed)
OCL=28860
CL=28862
2009-05-14 17:03:47 -07:00
Rob Pike
8203a4cb9d Getuid etc.
R=rsc
DELTA=51  (49 added, 0 deleted, 2 changed)
OCL=28859
CL=28859
2009-05-14 16:45:24 -07:00
David Symonds
16387fad39 Hyphens are allowed in filenames. This allows this test to pass for me.
R=r
APPROVED=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=28847
CL=28851
2009-05-14 15:42:27 -07:00
Rob Pike
80b5482ab2 fix abstract unix domain sockets
R=rsc
DELTA=5  (3 added, 0 deleted, 2 changed)
OCL=28845
CL=28849
2009-05-14 15:20:30 -07:00
Russ Cox
ea79b82e92 fix Truncate comment:
* make a complete sentence.
* eliminate reference to byte positions,
  which are not a concept exposed by the interface.

R=gri
DELTA=2  (0 added, 1 deleted, 1 changed)
OCL=28838
CL=28838
2009-05-14 13:39:17 -07:00
Robert Griesemer
28db3e8411 ByteBuffer.Truncate(n int)
R=r
DELTA=22  (17 added, 0 deleted, 5 changed)
OCL=28781
CL=28815
2009-05-14 10:14:29 -07:00
Rob Pike
a8db4593ab fix spelling error in message
R=ken
OCL=28814
CL=28814
2009-05-14 09:59:16 -07:00
Russ Cox
8f854174c7 reflect: update comment (there is no BoolType)
R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=28756
CL=28784
2009-05-13 18:03:49 -07:00
Russ Cox
cc1d4b7e1b Unix domain socket support, Linux and Darwin.
R=r
DELTA=534  (353 added, 99 deleted, 82 changed)
OCL=28783
CL=28783
2009-05-13 18:03:41 -07:00