(a, b)
| 1609 | } |
| 1610 | |
| 1611 | function identicalSequenceRange(a, b) { |
| 1612 | for (let i = 0; i < a.length - 3; i++) { |
| 1613 | // Find the first entry of b that matches the current entry of a. |
| 1614 | const pos = ArrayPrototypeIndexOf(b, a[i]); |
| 1615 | if (pos !== -1) { |
| 1616 | const rest = b.length - pos; |
| 1617 | if (rest > 3) { |
| 1618 | let len = 1; |
| 1619 | const maxLen = MathMin(a.length - i, rest); |
| 1620 | // Count the number of consecutive entries. |
| 1621 | while (maxLen > len && a[i + len] === b[pos + len]) { |
| 1622 | len++; |
| 1623 | } |
| 1624 | if (len > 3) { |
| 1625 | return [len, i]; |
| 1626 | } |
| 1627 | } |
| 1628 | } |
| 1629 | } |
| 1630 | |
| 1631 | return [0, 0]; |
| 1632 | } |
| 1633 | |
| 1634 | function getDuplicateErrorFrameRanges(frames) { |
| 1635 | // Build a map: frame line -> sorted list of indices where it occurs |
no outgoing calls
no test coverage detected
searching dependent graphs…