(heap: Array<PrefetchTask>, node: PrefetchTask)
| 1805 | } |
| 1806 | |
| 1807 | function heapDelete(heap: Array<PrefetchTask>, node: PrefetchTask): void { |
| 1808 | const index = node._heapIndex |
| 1809 | if (index !== -1) { |
| 1810 | node._heapIndex = -1 |
| 1811 | if (heap.length !== 0) { |
| 1812 | const last = heap.pop() as PrefetchTask |
| 1813 | if (last !== node) { |
| 1814 | heap[index] = last |
| 1815 | last._heapIndex = index |
| 1816 | heapSiftDown(heap, last, index) |
| 1817 | } |
| 1818 | } |
| 1819 | } |
| 1820 | } |
| 1821 | |
| 1822 | function heapResift(heap: Array<PrefetchTask>, node: PrefetchTask): void { |
| 1823 | const index = node._heapIndex |
no test coverage detected