Function
getEntryCount
(sp: NativePointer, fp: NativePointer | null, maxEntries: number)
Source from the content-addressed store, hash-verified
| 60 | } |
| 61 | |
| 62 | function getEntryCount(sp: NativePointer, fp: NativePointer | null, maxEntries: number): number { |
| 63 | if (fp === null || fp.compare(sp) <= 0) { |
| 64 | return maxEntries; |
| 65 | } |
| 66 | |
| 67 | const byteLength = fp.sub(sp).toUInt32(); |
| 68 | if (byteLength <= 0 || byteLength > MAX_STACK_BYTES) { |
| 69 | return maxEntries; |
| 70 | } |
| 71 | |
| 72 | return Math.max(1, Math.floor(byteLength / Process.pointerSize) + 1); |
| 73 | } |
| 74 | |
| 75 | function logStackSlot( |
| 76 | index: number, |
Tested by
no test coverage detected