summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGScoreBoard.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/dfg/DFGScoreBoard.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGScoreBoard.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGScoreBoard.h21
1 files changed, 12 insertions, 9 deletions
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 <wtf/BitVector.h>
#include <wtf/Vector.h>
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