X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..refs/heads/master:/dfg/DFGScoreBoard.h diff --git a/dfg/DFGScoreBoard.h b/dfg/DFGScoreBoard.h index 15af609..c8795c8 100644 --- a/dfg/DFGScoreBoard.h +++ b/dfg/DFGScoreBoard.h @@ -55,21 +55,27 @@ public: assertClear(); } + void sortFree() + { + std::sort(m_free.begin(), m_free.end()); + } + void assertClear() { -#if !ASSERT_DISABLED + if (ASSERT_DISABLED) + return; + // For every entry in the used list the use count of the virtual register should be zero, or max, due to it being a preserved local. for (size_t i = 0; i < m_used.size(); ++i) - ASSERT(!m_used[i] || m_used[i] == max()); + RELEASE_ASSERT(!m_used[i] || m_used[i] == max()); // For every entry in the free list, the use count should be zero. for (size_t i = 0; i < m_free.size(); ++i) - ASSERT(!m_used[m_free[i]]); + RELEASE_ASSERT(!m_used[m_free[i]]); // There must not be duplicates in the free list. for (size_t i = 0; i < m_free.size(); ++i) { for (size_t j = i + 1; j < m_free.size(); ++j) - ASSERT(m_free[i] != m_free[j]); + RELEASE_ASSERT(m_free[i] != m_free[j]); } -#endif } VirtualRegister allocate()