(val Any, slot uint32)
| 49 | } |
| 50 | |
| 51 | func BytesValue(val Any, slot uint32) []byte { |
| 52 | switch val := val.(type) { |
| 53 | case *Bytes: |
| 54 | return val.Value(slot) |
| 55 | case *Const: |
| 56 | return BytesValue(val.Any, 0) |
| 57 | case *Dict: |
| 58 | slot = uint32(val.Index[slot]) |
| 59 | return val.Any.(*Bytes).Value(slot) |
| 60 | case *View: |
| 61 | slot = val.Index[slot] |
| 62 | return BytesValue(val.Any, slot) |
| 63 | } |
| 64 | panic(val) |
| 65 | } |
| 66 | |
| 67 | type BytesTable struct { |
| 68 | offsets []uint32 |
no test coverage detected