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

Method codecDecodeSelfFromArray

benchmark/benchmark_codecgen.go:2545–2607  ·  view source on GitHub ↗

Benchmark harness support for STK-REQ-004.

(l int, d *codec1978.Decoder)

Source from the content-addressed store, hash-verified

2543
2544// Benchmark harness support for STK-REQ-004.
2545func (x *LargePayload) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
2546 var h codecSelfer6617
2547 z, r := codec1978.GenHelperDecoder(d)
2548 _, _, _ = h, z, r
2549 var yyj7 int
2550 var yyb7 bool
2551 var yyhl7 bool = l >= 0
2552 yyj7++
2553 if yyhl7 {
2554 yyb7 = yyj7 > l
2555 } else {
2556 yyb7 = r.CheckBreak()
2557 }
2558 if yyb7 {
2559 r.ReadArrayEnd()
2560 return
2561 }
2562 r.ReadArrayElem()
2563 if r.TryDecodeAsNil() {
2564 x.Users = nil
2565 } else {
2566 if false {
2567 } else {
2568 h.decSlicePtrtoDSUser((*[]*DSUser)(&x.Users), d)
2569 }
2570 }
2571 yyj7++
2572 if yyhl7 {
2573 yyb7 = yyj7 > l
2574 } else {
2575 yyb7 = r.CheckBreak()
2576 }
2577 if yyb7 {
2578 r.ReadArrayEnd()
2579 return
2580 }
2581 r.ReadArrayElem()
2582 if r.TryDecodeAsNil() {
2583 if true && x.Topics != nil {
2584 x.Topics = nil
2585 }
2586 } else {
2587 if x.Topics == nil {
2588 x.Topics = new(DSTopicsList)
2589 }
2590
2591 x.Topics.CodecDecodeSelf(d)
2592 }
2593 for {
2594 yyj7++
2595 if yyhl7 {
2596 yyb7 = yyj7 > l
2597 } else {
2598 yyb7 = r.CheckBreak()
2599 }
2600 if yyb7 {
2601 break
2602 }

Callers 1

CodecDecodeSelfMethod · 0.95

Calls 2

decSlicePtrtoDSUserMethod · 0.95
CodecDecodeSelfMethod · 0.45

Tested by

no test coverage detected