code review 2660042: gobs: error cleanup part 1. (issue2660042)

0 views
Skip to first unread message

r...@golang.org

unread,
Oct 22, 2010, 4:58:15 PM10/22/10
to r...@golang.org, golan...@googlegroups.com, re...@codereview.appspotmail.com
Reviewers: rsc,

Message:
Hello rsc (cc: golan...@googlegroups.com),

I'd like you to review this change.


Description:
gobs: error cleanup part 1.
Remove err from the encoderState and decoderState types, so we're
not always copying to and from various copies of the error, and then
use panic/recover to eliminate lots of error checking.

another pass might take a crack at the same thing for the compilation
phase.

Please review this at http://codereview.appspot.com/2660042/

Affected files:
M src/pkg/gob/Makefile
M src/pkg/gob/codec_test.go
M src/pkg/gob/decode.go
M src/pkg/gob/decoder.go
M src/pkg/gob/encode.go
M src/pkg/gob/encoder.go
M src/pkg/gob/encoder_test.go


r...@google.com

unread,
Oct 22, 2010, 5:03:16 PM10/22/10
to r...@golang.org, r...@golang.org, golan...@googlegroups.com, re...@codereview.appspotmail.com

r...@golang.org

unread,
Oct 22, 2010, 5:07:16 PM10/22/10
to r...@golang.org, golan...@googlegroups.com, re...@codereview.appspotmail.com
Hello rsc (cc: golan...@googlegroups.com),

Please take another look.


http://codereview.appspot.com/2660042/

r...@google.com

unread,
Oct 22, 2010, 5:08:26 PM10/22/10
to r...@golang.org, r...@golang.org, golan...@googlegroups.com, re...@codereview.appspotmail.com

r...@golang.org

unread,
Oct 22, 2010, 6:16:39 PM10/22/10
to r...@golang.org, r...@golang.org, golan...@googlegroups.com, re...@codereview.appspotmail.com
*** Submitted as
http://code.google.com/p/go/source/detail?r=7059c89a2346 ***

gobs: error cleanup part 1.
Remove err from the encoderState and decoderState types, so we're
not always copying to and from various copies of the error, and then
use panic/recover to eliminate lots of error checking.

another pass might take a crack at the same thing for the compilation
phase.

R=rsc
CC=golang-dev
http://codereview.appspot.com/2660042


http://codereview.appspot.com/2660042/

Reply all
Reply to author
Forward
0 new messages