Get rid of the GCBlocker

It's a hack we needed when we still had a conservative GC, but
it is not required anymore. The only thing we still need is the
protection against running the GC recursively.

Change-Id: I55cd51d4929c828db5b61b38e781467c5bf77314
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Lars Knoll 2016-12-22 12:50:54 +01:00
parent 67d783622d
commit d2eaf438ac
4 changed files with 0 additions and 36 deletions

View File

@ -158,8 +158,6 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
}
Q_ASSERT(maxCallDepth > 0);
MemoryManager::GCBlocker gcBlocker(memoryManager);
if (!factory) {
#if QT_CONFIG(qml_interpreter)
bool jitDisabled = true;

View File

@ -88,8 +88,6 @@ void Script::parse()
ExecutionEngine *v4 = scope->engine();
Scope valueScope(v4);
MemoryManager::GCBlocker gcBlocker(v4->memoryManager);
IR::Module module(v4->debugger() != 0);
QQmlJS::Engine ee, *engine = &ee;

View File

@ -565,16 +565,6 @@ void MemoryManager::sweep(bool lastSweep)
}
}
bool MemoryManager::isGCBlocked() const
{
return m_d->gcBlocked;
}
void MemoryManager::setGCBlocked(bool blockGC)
{
m_d->gcBlocked = blockGC;
}
void MemoryManager::runGC()
{
if (m_d->gcBlocked) {

View File

@ -76,26 +76,6 @@ class Q_QML_EXPORT MemoryManager
public:
struct Data;
class GCBlocker
{
public:
GCBlocker(MemoryManager *mm)
: mm(mm)
, wasBlocked(mm->isGCBlocked())
{
mm->setGCBlocked(true);
}
~GCBlocker()
{
mm->setGCBlocked(wasBlocked);
}
private:
MemoryManager *mm;
bool wasBlocked;
};
public:
MemoryManager(ExecutionEngine *engine);
~MemoryManager();
@ -309,8 +289,6 @@ public:
return t->d();
}
bool isGCBlocked() const;
void setGCBlocked(bool blockGC);
void runGC();
void dumpStats() const;