(a *Array)
| 168 | } |
| 169 | |
| 170 | func (s *sizeGen) gArray(a *Array) { |
| 171 | if !s.p.ok() { |
| 172 | return |
| 173 | } |
| 174 | |
| 175 | s.addConstant(builtinSize(arrayHeader)) |
| 176 | |
| 177 | // if the array's children are a fixed |
| 178 | // size, we can compile an expression |
| 179 | // that always represents the array's wire size |
| 180 | if str, ok := fixedsizeExpr(a); ok { |
| 181 | s.addConstant(str) |
| 182 | return |
| 183 | } |
| 184 | |
| 185 | setTypeParams(a.Els, a.typeParams) |
| 186 | s.state = add |
| 187 | s.p.rangeBlock(s.ctx, a.Index, a.Varname(), s, a.Els) |
| 188 | s.state = add |
| 189 | } |
| 190 | |
| 191 | func (s *sizeGen) gMap(m *Map) { |
| 192 | s.addConstant(builtinSize(mapHeader)) |
nothing calls this directly
no test coverage detected