Having duplicate cases in the BinarySwitch if not a correctness issue. It is however not good for performance and memory usage. As such, a debug ASSERT will do. We'll also do an audit of the clients of BinarySwitch to see if it's possible to be instantiated with duplicate cases in https://bugs.webkit.org/show_bug.cgi?id=194492 later.
Created attachment 361662 [details]
Created attachment 361663 [details]
Created attachment 361664 [details]
Comment on attachment 361664 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=361664&action=review
> + RELEASE_ASSERT(m_cases[i - 1] < m_cases[i], i, m_cases.size(), m_cases[i].value, m_cases[i].index);
Why not using `ASSERT` here?
Thanks for the review. I've changed the RELEASE_ASSERT to a debug ASSERT. Landed in r241267: <http://trac.webkit.org/r241267>.