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

Method codecDecodeSelfFromArray

benchmark/benchmark_codecgen.go:1013–1050  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

(l int, d *codec1978.Decoder)

Source from the content-addressed store, hash-verified

1011
1012// Benchmark harness support for STK-REQ-004.
1013func (x *CBGithub) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
1014 var h codecSelfer6617
1015 z, r := codec1978.GenHelperDecoder(d)
1016 _, _, _ = h, z, r
1017 var yyj5 int
1018 var yyb5 bool
1019 var yyhl5 bool = l >= 0
1020 yyj5++
1021 if yyhl5 {
1022 yyb5 = yyj5 > l
1023 } else {
1024 yyb5 = r.CheckBreak()
1025 }
1026 if yyb5 {
1027 r.ReadArrayEnd()
1028 return
1029 }
1030 r.ReadArrayElem()
1031 if r.TryDecodeAsNil() {
1032 x.Followers = 0
1033 } else {
1034 x.Followers = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize6617))
1035 }
1036 for {
1037 yyj5++
1038 if yyhl5 {
1039 yyb5 = yyj5 > l
1040 } else {
1041 yyb5 = r.CheckBreak()
1042 }
1043 if yyb5 {
1044 break
1045 }
1046 r.ReadArrayElem()
1047 z.DecStructFieldNotFound(yyj5-1, "")
1048 }
1049 r.ReadArrayEnd()
1050}
1051
1052// Benchmark harness support for STK-REQ-004.
1053func (x *CBName) CodecEncodeSelf(e *codec1978.Encoder) {

Callers 1

CodecDecodeSelfMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected