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:
parent
67d783622d
commit
d2eaf438ac
|
@ -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;
|
||||
|
|
|
@ -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 = ⅇ
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue