| 50 | } |
| 51 | |
| 52 | function getDisplayIndices(totalEntries: number, omitted: boolean, headEntries: number, tailEntries: number): number[] { |
| 53 | if (!omitted) { |
| 54 | return Array.from({ length: totalEntries }, (_value, index) => totalEntries - 1 - index); |
| 55 | } |
| 56 | |
| 57 | const highAddressSide = Array.from({ length: tailEntries }, (_value, index) => totalEntries - 1 - index); |
| 58 | const lowAddressSide = Array.from({ length: headEntries }, (_value, index) => headEntries - 1 - index); |
| 59 | return [...highAddressSide, -1, ...lowAddressSide]; |
| 60 | } |
| 61 | |
| 62 | function getEntryCount(sp: NativePointer, fp: NativePointer | null, maxEntries: number): number { |
| 63 | if (fp === null || fp.compare(sp) <= 0) { |