MCPcopy
hub / github.com/tinylib/msgp / gSlice

Method gSlice

gen/decode.go:466–480  ·  view source on GitHub ↗
(s *Slice)

Source from the content-addressed store, hash-verified

464}
465
466func (d *decodeGen) gSlice(s *Slice) {
467 if !d.p.ok() {
468 return
469 }
470 sz := randIdent()
471 d.p.declare(sz, u32)
472 d.assignArray(sz, arrayHeader, 0)
473 if s.isAllowNil {
474 d.p.resizeSliceNoNil(sz, s)
475 } else {
476 d.p.resizeSlice(sz, s)
477 }
478 setTypeParams(s.Els, s.typeParams)
479 d.p.rangeBlock(d.ctx, s.Index, s.Varname(), d, s.Els)
480}
481
482func (d *decodeGen) gArray(a *Array) {
483 if !d.p.ok() {

Callers

nothing calls this directly

Calls 9

assignArrayMethod · 0.95
randIdentFunction · 0.85
setTypeParamsFunction · 0.85
okMethod · 0.80
declareMethod · 0.80
resizeSliceNoNilMethod · 0.80
resizeSliceMethod · 0.80
rangeBlockMethod · 0.80
VarnameMethod · 0.65

Tested by

no test coverage detected