(a *Array)
| 480 | } |
| 481 | |
| 482 | func (d *decodeGen) gArray(a *Array) { |
| 483 | if !d.p.ok() { |
| 484 | return |
| 485 | } |
| 486 | |
| 487 | // special case if we have [const]byte |
| 488 | if be, ok := a.Els.(*BaseElem); ok && (be.Value == Byte || be.Value == Uint8) { |
| 489 | d.p.printf("\nerr = dc.ReadExactBytes((%s)[:])", a.Varname()) |
| 490 | d.p.wrapErrCheck(d.ctx.ArgsStr()) |
| 491 | return |
| 492 | } |
| 493 | sz := randIdent() |
| 494 | d.p.declare(sz, u32) |
| 495 | d.assignAndCheck(sz, arrayHeader) |
| 496 | d.p.arrayCheck(coerceArraySize(a.Size), sz) |
| 497 | setTypeParams(a.Els, a.typeParams) |
| 498 | d.p.rangeBlock(d.ctx, a.Index, a.Varname(), d, a.Els) |
| 499 | } |
| 500 | |
| 501 | func (d *decodeGen) gPtr(p *Ptr) { |
| 502 | if !d.p.ok() { |
nothing calls this directly
no test coverage detected