From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/JavaScriptCore/dfg/DFGScoreBoard.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'Source/JavaScriptCore/dfg/DFGScoreBoard.h') diff --git a/Source/JavaScriptCore/dfg/DFGScoreBoard.h b/Source/JavaScriptCore/dfg/DFGScoreBoard.h index 15af609a9..d362a1bfb 100644 --- a/Source/JavaScriptCore/dfg/DFGScoreBoard.h +++ b/Source/JavaScriptCore/dfg/DFGScoreBoard.h @@ -23,13 +23,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DFGScoreBoard_h -#define DFGScoreBoard_h +#pragma once #if ENABLE(DFG_JIT) #include "DFGGraph.h" -#include #include namespace JSC { namespace DFG { @@ -55,21 +53,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() @@ -175,4 +179,3 @@ private: } } // namespace JSC::DFG #endif -#endif -- cgit v1.2.1