Permalink
Browse files

JitRegCache: IsAllUnlocked

  • Loading branch information...
MerryMage committed Oct 15, 2018
1 parent 6c61d9a commit 16f8b7413de41432c9128f1db896149fe8db3e85
@@ -622,6 +622,13 @@ RCForkGuard RegCache::Fork()
return RCForkGuard{*this};
}

bool RegCache::IsAllUnlocked() const
{
return std::none_of(m_regs.begin(), m_regs.end(), [](const auto& r){ return r.IsLocked(); }) &&
std::none_of(m_xregs.begin(), m_xregs.end(), [](const auto& x){ return x.IsLocked(); }) &&
!IsAnyConstraintActive();
}

void RegCache::NewLock(preg_t preg)
{
m_regs[preg].Lock();
@@ -239,6 +239,8 @@ class RegCache

RCForkGuard Fork();

bool IsAllUnlocked() const;

protected:
friend class RCOpArg;
friend class RCX64Reg;

0 comments on commit 16f8b74

Please sign in to comment.