summaryrefslogtreecommitdiff
path: root/src/pkg/gob
AgeCommit message (Collapse)AuthorFilesLines
2009-09-15more "declared and not used".Russ Cox6-12/+10
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-09-14fix "declared and not used" errors in non-test code.Russ Cox3-7/+1
R=r DELTA=112 (6 added, 57 deleted, 49 changed) OCL=34610 CL=34610
2009-09-09use the new type switch multicase to clean up a little.Rob Pike1-20/+11
R=rsc DELTA=28 (7 added, 16 deleted, 5 changed) OCL=34487 CL=34487
2009-09-02two gob nits found with stricter 6gRuss Cox1-2/+2
(6g had a few pretty major bugs where it was more lax than it should have been when checking when things satisfied interfaces; i fixed them and this turned up.) R=r DELTA=2 (0 added, 0 deleted, 2 changed) OCL=34243 CL=34248
2009-08-30can't encode array or slice - catch in sendType rather than failing in EncodeRob Pike2-4/+34
R=rsc DELTA=38 (33 added, 3 deleted, 2 changed) OCL=34101 CL=34104
2009-08-26fix codec test bug - uint -> uint8Russ Cox1-3/+3
R=r OCL=33913 CL=33913
2009-08-12delete forward type declarationsRuss Cox2-2/+0
R=r DELTA=163 (1 added, 149 deleted, 13 changed) OCL=33106 CL=33111
2009-08-12convert gob to whole-package compilation.Russ Cox9-121/+26
had to reorder some init code. R=r DELTA=136 (15 added, 110 deleted, 11 changed) OCL=33071 CL=33102
2009-07-29handle unsupported types safely.Rob Pike6-75/+140
R=rsc DELTA=154 (71 added, 6 deleted, 77 changed) OCL=32483 CL=32492
2009-07-29clean up EOFRob Pike2-5/+4
R=rsc DELTA=5 (0 added, 1 deleted, 4 changed) OCL=32465 CL=32467
2009-07-29handle some error conditions involving bad data.Rob Pike3-8/+31
R=rsc DELTA=32 (24 added, 1 deleted, 7 changed) OCL=32461 CL=32463
2009-07-28change the encoding of uints to simplify overflow checking and to make themRob Pike7-98/+136
easier and faster to read. they are now either a one-byte value or a n-byte value preceded by a byte holding -n. R=rsc DELTA=150 (45 added, 7 deleted, 98 changed) OCL=32381 CL=32387
2009-07-28bug177: anonymous struct fields in reflectRuss Cox1-1/+1
(reported by iant) R=r DELTA=50 (32 added, 12 deleted, 6 changed) OCL=32263 CL=32385
2009-07-28- clean up code creating keys for type mapsRob Pike5-125/+362
- derive int, uint, float, uintptr decoders based on their size - add overflow checks in decode R=rsc DELTA=407 (281 added, 44 deleted, 82 changed) OCL=32286 CL=32290
2009-07-27fix build - broke with uint32 -> int change in reflect SliceHeaderRuss Cox1-2/+2
TBR=r OCL=32225 CL=32225
2009-07-27clean up for public use: make some stuff private, add doc comments.Rob Pike7-92/+294
R=rsc DELTA=298 (202 added, 0 deleted, 96 changed) OCL=32006 CL=32224
2009-07-17change reflect.Type.Name() into two functions: Name() and PkgPath() for ease ↵Rob Pike2-5/+4
of use. R=rsc DELTA=31 (8 added, 2 deleted, 21 changed) OCL=31778 CL=31792
2009-07-17ignore missing structsRob Pike4-38/+98
R=rsc DELTA=113 (74 added, 14 deleted, 25 changed) OCL=31776 CL=31776
2009-07-16clean up the code, flow errors out to decoder.Rob Pike4-61/+71
R=rsc DELTA=99 (32 added, 22 deleted, 45 changed) OCL=31759 CL=31759
2009-07-16- allow wire type and receive type to differ.Rob Pike6-65/+303
- still TODO: ignoring struct fields. R=rsc DELTA=309 (240 added, 2 deleted, 67 changed) OCL=31750 CL=31750
2009-07-16clean up the decode loop and fix a couple of bad printsRob Pike2-7/+13
R=rsc DELTA=15 (8 added, 2 deleted, 5 changed) OCL=31738 CL=31738
2009-07-15make the low-level encoder and decoder private and have them access ↵Rob Pike7-264/+360
byte.Buffers rather than io.Readers and io.Writers. change the Encoder/Decoder protocol so that each message is preceded by its length in bytes. R=rsc DELTA=468 (119 added, 23 deleted, 326 changed) OCL=31700 CL=31702
2009-07-14improve rpc code. more robust. more tests.Rob Pike1-1/+1
R=rsc DELTA=186 (133 added, 20 deleted, 33 changed) OCL=31611 CL=31616
2009-07-13the name of the type was being sent twice. drop the outer instance.Rob Pike3-5/+9
R=rsc DELTA=10 (5 added, 1 deleted, 4 changed) OCL=31523 CL=31526
2009-07-11first cut at gob decoder.Rob Pike4-3/+184
R=rsc DELTA=184 (181 added, 1 deleted, 2 changed) OCL=31474 CL=31486
2009-07-10one more piece of testing: 2nd send should not send type info.Rob Pike1-0/+25
R=rsc DELTA=25 (25 added, 0 deleted, 0 changed) OCL=31460 CL=31460
2009-07-10a better encoder test, with a couple of fixes for bugs it uncovered.Rob Pike3-19/+75
R=rsc DELTA=84 (65 added, 9 deleted, 10 changed) OCL=31458 CL=31458
2009-07-09store ids rather than Types in the structs so they can be encoded.Rob Pike8-106/+384
change Type to gobType. fix some bugs around recursive structures. lots of cleanup. add the first cut at a type encoder. R=rsc DELTA=400 (287 added, 11 deleted, 102 changed) OCL=31401 CL=31406
2009-07-07bug fix: encOpFor etc. need to indirectRob Pike2-19/+19
R=rsc DELTA=28 (7 added, 7 deleted, 14 changed) OCL=31312 CL=31322
2009-07-07gob: use new reflectRuss Cox3-170/+169
R=r DELTA=242 (68 added, 69 deleted, 105 changed) OCL=31239 CL=31289
2009-07-06catch corruption - avoid crashRob Pike1-0/+4
R=rsc DELTA=4 (4 added, 0 deleted, 0 changed) OCL=31192 CL=31198
2009-07-03put gob into the standard buildRob Pike1-0/+77
R=rsc DELTA=77 (76 added, 0 deleted, 1 changed) OCL=31147 CL=31147
2009-07-02slicesRob Pike2-13/+44
R=rsc DELTA=59 (44 added, 13 deleted, 2 changed) OCL=31105 CL=31105
2009-07-02indirection on array elements.Rob Pike3-23/+47
R=rsc DELTA=57 (34 added, 10 deleted, 13 changed) OCL=31098 CL=31101
2009-07-02arrays, not slices, and only with non-pointer elements.Rob Pike3-129/+146
(actually slices encode but do not decode yet) R=rsc DELTA=221 (82 added, 65 deleted, 74 changed) OCL=31095 CL=31095
2009-07-02encode and decode for nested structures.Rob Pike3-58/+96
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
2009-07-02encoders and decoders for string, []uint8Rob Pike3-20/+159
R=rsc DELTA=165 (145 added, 6 deleted, 14 changed) OCL=31051 CL=31056
2009-07-02now that we have a separate indirection test, simplify the scalar tests.Rob Pike1-497/+81
R=rsc DELTA=562 (8 added, 424 deleted, 130 changed) OCL=31039 CL=31045
2009-07-02simplify decoders. error checking is done higher up.Rob Pike1-56/+14
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
2009-07-02fix bug in decoders: got indirection wrong when allocation not required.Rob Pike2-17/+97
write indirection test. next step: cut down scalar tests since indirection is centralized. R=rsc DELTA=114 (83 added, 3 deleted, 28 changed) OCL=31020 CL=31037
2009-07-01move dereference code out of the ops and into the interpreter loops.Rob Pike3-274/+165
R=rsc DELTA=574 (40 added, 149 deleted, 385 changed) OCL=31017 CL=31019
2009-07-01Encode and decode engines for gobs.Rob Pike3-65/+339
R=rsc DELTA=468 (292 added, 18 deleted, 158 changed) OCL=31008 CL=31012
2009-06-30scalar decodersRob Pike3-85/+799
R=rsc DELTA=897 (728 added, 14 deleted, 155 changed) OCL=30955 CL=30955
2009-06-30pass the state to the encoders and decoders so error handling can be ↵Rob Pike3-90/+124
centralized. R=rsc DELTA=172 (40 added, 6 deleted, 126 changed) OCL=30941 CL=30944
2009-06-30encoders for booleans and numbers.Rob Pike4-13/+605
R=rsc DELTA=610 (597 added, 5 deleted, 8 changed) OCL=30934 CL=30939
2009-06-29io.StringBytes -> strings.BytesRuss Cox1-4/+3
io.ByteBuffer -> bytes.Buffer left io.ByteBuffer stub around for now, for protocol compiler. R=r OCL=30861 CL=30872
2009-06-29integer encode/decodeRob Pike4-10/+178
R=rsc DELTA=185 (175 added, 10 deleted, 0 changed) OCL=30863 CL=30871
2009-06-29add []byte as a special case: it will have a special, efficient encoding.Rob Pike2-7/+15
R=rsc DELTA=16 (9 added, 1 deleted, 6 changed) OCL=30846 CL=30846
2009-06-26the first time a structure type appears when printing, identify it by name:Rob Pike2-5/+15
type Foo struct { a int; next *Foo } produces "Foo = struct { a int; next Foo }" R=rsc OCL=30797 CL=30820
2009-06-25gobs part 1: types.Rob Pike2-0/+363
not ready to be part of the standard build yet; this is just a checkpoint. R=rsc DELTA=361 (361 added, 0 deleted, 0 changed) OCL=30782 CL=30785