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

Method codecDecodeSelfFromArray

benchmark/benchmark_codecgen.go:395–560  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

(l int, d *codec1978.Decoder)

Source from the content-addressed store, hash-verified

393
394// Benchmark harness support for STK-REQ-004.
395func (x *SmallPayload) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
396 var h codecSelfer6617
397 z, r := codec1978.GenHelperDecoder(d)
398 _, _, _ = h, z, r
399 var yyj13 int
400 var yyb13 bool
401 var yyhl13 bool = l >= 0
402 yyj13++
403 if yyhl13 {
404 yyb13 = yyj13 > l
405 } else {
406 yyb13 = r.CheckBreak()
407 }
408 if yyb13 {
409 r.ReadArrayEnd()
410 return
411 }
412 r.ReadArrayElem()
413 if r.TryDecodeAsNil() {
414 x.St = 0
415 } else {
416 x.St = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize6617))
417 }
418 yyj13++
419 if yyhl13 {
420 yyb13 = yyj13 > l
421 } else {
422 yyb13 = r.CheckBreak()
423 }
424 if yyb13 {
425 r.ReadArrayEnd()
426 return
427 }
428 r.ReadArrayElem()
429 if r.TryDecodeAsNil() {
430 x.Sid = 0
431 } else {
432 x.Sid = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize6617))
433 }
434 yyj13++
435 if yyhl13 {
436 yyb13 = yyj13 > l
437 } else {
438 yyb13 = r.CheckBreak()
439 }
440 if yyb13 {
441 r.ReadArrayEnd()
442 return
443 }
444 r.ReadArrayElem()
445 if r.TryDecodeAsNil() {
446 x.Tt = ""
447 } else {
448 x.Tt = (string)(r.DecodeString())
449 }
450 yyj13++
451 if yyhl13 {
452 yyb13 = yyj13 > l

Callers 1

CodecDecodeSelfMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected