summaryrefslogtreecommitdiff
path: root/src/pkg/gob/encode.go
AgeCommit message (Collapse)AuthorFilesLines
2010-05-07gob: add an internal commentary example showing how theRob Pike1-0/+249
values are encoded for transmission. R=rsc CC=golang-dev http://codereview.appspot.com/1146041
2010-05-05gob: add support for maps.Rob Pike1-5/+50
Because maps are mostly a hidden type, they must be implemented using reflection values and will not be as efficient as arrays and slices. R=rsc CC=golang-dev http://codereview.appspot.com/1127041
2010-03-24delete all uses of panicln by rewriting them using panic or,Rob Pike1-1/+1
in the tests, println+panic. gofmt some tests too. R=rsc CC=golang-dev http://codereview.appspot.com/741041
2010-03-02gofmt: experiment: align values in map composites where possibleRobert Griesemer1-13/+13
- gofmt -w src misc - looking for feedback R=rsc, r CC=golang-dev http://codereview.appspot.com/223076
2009-12-29fix dumb bug: must write out default values inside arrays and slicesRob Pike1-19/+25
Fixes issue 459. R=rsc, imkrasin, sonia CC=golang-dev http://codereview.appspot.com/181073
2009-12-151) Change default gofmt default settings forRobert Griesemer1-149/+149
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 3rd set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180048
2009-12-01gob: fix buildRuss Cox1-1/+1
TBR=r http://codereview.appspot.com/163064
2009-11-09 - replaced gofmt expression formatting algorithm withRobert Griesemer1-8/+8
rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1026036
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-18/+18
R=rsc, r http://go/go-review/1025029
2009-10-08more lgtm files from gofmtRuss Cox1-3/+3
R=gri OCL=35485 CL=35488
2009-10-06apply gofmt to go, gob, hash, http, image, io, json, logRuss Cox1-34/+34
R=gri DELTA=1359 (138 added, 32 deleted, 1189 changed) OCL=35408 CL=35420
2009-09-17unused importsRuss Cox1-1/+0
R=r OCL=34731 CL=34731
2009-09-15more "declared and not used".Russ Cox1-1/+1
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-08-12delete forward type declarationsRuss Cox1-1/+0
R=r DELTA=163 (1 added, 149 deleted, 13 changed) OCL=33106 CL=33111
2009-08-12convert gob to whole-package compilation.Russ Cox1-3/+0
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 Pike1-16/+34
R=rsc DELTA=154 (71 added, 6 deleted, 77 changed) OCL=32483 CL=32492
2009-07-28change the encoding of uints to simplify overflow checking and to make themRob Pike1-11/+19
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-28- clean up code creating keys for type mapsRob Pike1-16/+16
- 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-16clean up the code, flow errors out to decoder.Rob Pike1-2/+2
R=rsc DELTA=99 (32 added, 22 deleted, 45 changed) OCL=31759 CL=31759
2009-07-15make the low-level encoder and decoder private and have them access ↵Rob Pike1-68/+68
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-09store ids rather than Types in the structs so they can be encoded.Rob Pike1-16/+26
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 Pike1-10/+10
R=rsc DELTA=28 (7 added, 7 deleted, 14 changed) OCL=31312 CL=31322
2009-07-07gob: use new reflectRuss Cox1-79/+54
R=r DELTA=242 (68 added, 69 deleted, 105 changed) OCL=31239 CL=31289
2009-07-02indirection on array elements.Rob Pike1-12/+32
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 Pike1-42/+62
(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 Pike1-28/+53
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 Pike1-4/+40
R=rsc DELTA=165 (145 added, 6 deleted, 14 changed) OCL=31051 CL=31056
2009-07-01move dereference code out of the ops and into the interpreter loops.Rob Pike1-103/+29
R=rsc DELTA=574 (40 added, 149 deleted, 385 changed) OCL=31017 CL=31019
2009-07-01Encode and decode engines for gobs.Rob Pike1-14/+132
R=rsc DELTA=468 (292 added, 18 deleted, 158 changed) OCL=31008 CL=31012
2009-06-30scalar decodersRob Pike1-42/+38
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 Pike1-59/+71
centralized. R=rsc DELTA=172 (40 added, 6 deleted, 126 changed) OCL=30941 CL=30944
2009-06-30encoders for booleans and numbers.Rob Pike1-0/+245
R=rsc DELTA=610 (597 added, 5 deleted, 8 changed) OCL=30934 CL=30939
2009-06-29integer encode/decodeRob Pike1-0/+40
R=rsc DELTA=185 (175 added, 10 deleted, 0 changed) OCL=30863 CL=30871