MCPcopy
hub / github.com/ugorji/go / codecDecodeSelfFromArray

Method codecDecodeSelfFromArray

codec/values_codecgen_generated_test.go:8623–8704  ·  view source on GitHub ↗
(l int, d *Decoder)

Source from the content-addressed store, hash-verified

8621}
8622
8623func (x *Sstructbig) codecDecodeSelfFromArray(l int, d *Decoder) {
8624 var h codecSelfer19780
8625 z, r := GenHelper().Decoder(d)
8626 _, _, _ = h, z, r
8627 var yyj12 int
8628 var yyb12 bool
8629 var yyhl12 bool = l >= 0
8630 yyb12 = !z.DecContainerNext(yyj12, l, yyhl12)
8631 if yyb12 {
8632 z.DecReadArrayEnd()
8633 return
8634 }
8635 z.DecReadArrayElem()
8636 x.A = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize19780))
8637 yyj12++
8638 yyb12 = !z.DecContainerNext(yyj12, l, yyhl12)
8639 if yyb12 {
8640 z.DecReadArrayEnd()
8641 return
8642 }
8643 z.DecReadArrayElem()
8644 x.B = (bool)(r.DecodeBool())
8645 yyj12++
8646 yyb12 = !z.DecContainerNext(yyj12, l, yyhl12)
8647 if yyb12 {
8648 z.DecReadArrayEnd()
8649 return
8650 }
8651 z.DecReadArrayElem()
8652 if r.TryNil() {
8653 if x.Ssmallptr != nil { // remove the if-true
8654 x.Ssmallptr = nil
8655 }
8656 } else {
8657 if x.Ssmallptr == nil {
8658 x.Ssmallptr = new(Sstructsmall)
8659 }
8660 if yyxt16 := z.Extension(x.Ssmallptr); yyxt16 != nil {
8661 z.DecExtension(x.Ssmallptr, yyxt16)
8662 } else {
8663 x.Ssmallptr.CodecDecodeSelf(d)
8664 }
8665 }
8666 yyj12++
8667 yyb12 = !z.DecContainerNext(yyj12, l, yyhl12)
8668 if yyb12 {
8669 z.DecReadArrayEnd()
8670 return
8671 }
8672 z.DecReadArrayElem()
8673 if yyxt18 := z.Extension(x.Ssmall); yyxt18 != nil {
8674 z.DecExtension(&x.Ssmall, yyxt18)
8675 } else {
8676 x.Ssmall.CodecDecodeSelf(d)
8677 }
8678 yyj12++
8679 yyb12 = !z.DecContainerNext(yyj12, l, yyhl12)
8680 if yyb12 {

Callers 1

CodecDecodeSelfMethod · 0.95

Calls 13

GenHelperFunction · 0.85
DecoderMethod · 0.80
DecContainerNextMethod · 0.80
DecReadArrayEndMethod · 0.80
DecReadArrayElemMethod · 0.80
IntVMethod · 0.80
DecExtensionMethod · 0.80
DecodeInt64Method · 0.65
DecodeBoolMethod · 0.65
TryNilMethod · 0.65
CodecDecodeSelfMethod · 0.65

Tested by

no test coverage detected