(layout: ArrayLayout, index: number, count: number)
| 3931 | } |
| 3932 | |
| 3933 | function arraySlot(layout: ArrayLayout, index: number, count: number): Layout { |
| 3934 | const elementLen = layout.elements.length |
| 3935 | if (index < elementLen) return layout.elements[index].layout |
| 3936 | const tailLen = Math.max(0, layout.rest.length - 1) |
| 3937 | const tailThreshold = Math.max(elementLen, count - tailLen) |
| 3938 | return index >= tailThreshold ? layout.rest[index - tailThreshold + 1] : layout.rest[0] |
| 3939 | } |
| 3940 | |
| 3941 | function encodeArray(ctx: EncodeContext, layout: ArrayLayout, arr: ReadonlyArray<unknown>, w: Writer) { |
| 3942 | const count = arr.length |
no outgoing calls
no test coverage detected