MCPcopy Create free account
hub / github.com/buger/jsonparser / codecDecodeSelfFromArray

Method codecDecodeSelfFromArray

benchmark/benchmark_codecgen.go:854–894  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

(l int, d *codec1978.Decoder)

Source from the content-addressed store, hash-verified

852
853// Benchmark harness support for STK-REQ-004.
854func (x *CBGravatar) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
855 var h codecSelfer6617
856 z, r := codec1978.GenHelperDecoder(d)
857 _, _, _ = h, z, r
858 var yyj6 int
859 var yyb6 bool
860 var yyhl6 bool = l >= 0
861 yyj6++
862 if yyhl6 {
863 yyb6 = yyj6 > l
864 } else {
865 yyb6 = r.CheckBreak()
866 }
867 if yyb6 {
868 r.ReadArrayEnd()
869 return
870 }
871 r.ReadArrayElem()
872 if r.TryDecodeAsNil() {
873 x.Avatars = nil
874 } else {
875 if false {
876 } else {
877 h.decSlicePtrtoCBAvatar((*[]*CBAvatar)(&x.Avatars), d)
878 }
879 }
880 for {
881 yyj6++
882 if yyhl6 {
883 yyb6 = yyj6 > l
884 } else {
885 yyb6 = r.CheckBreak()
886 }
887 if yyb6 {
888 break
889 }
890 r.ReadArrayElem()
891 z.DecStructFieldNotFound(yyj6-1, "")
892 }
893 r.ReadArrayEnd()
894}
895
896// Benchmark harness support for STK-REQ-004.
897func (x *CBGithub) CodecEncodeSelf(e *codec1978.Encoder) {

Callers 1

CodecDecodeSelfMethod · 0.95

Calls 1

decSlicePtrtoCBAvatarMethod · 0.95

Tested by

no test coverage detected