diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-12-22 12:50:54 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-12-28 14:49:59 +0000 |
commit | d2eaf438ac44a39aab6ac6ecc23e9ebb39aa58ac (patch) | |
tree | 1dda95be5a1c6340b0a7d398c31d9368e6a8d34d | |
parent | 67d783622d7a180da89af4c1fb57c6973e5b4386 (diff) |
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>
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4script.cpp | 2 | ||||
-rw-r--r-- | src/qml/memory/qv4mm.cpp | 10 | ||||
-rw-r--r-- | src/qml/memory/qv4mm_p.h | 22 |
4 files changed, 0 insertions, 36 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 2b90b43eab..8c4c39b774 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -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; diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp index 5d7df9a9d7..fe8f8474e4 100644 --- a/src/qml/jsruntime/qv4script.cpp +++ b/src/qml/jsruntime/qv4script.cpp @@ -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 = ⅇ diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp index 606d3ec162..8732b02685 100644 --- a/src/qml/memory/qv4mm.cpp +++ b/src/qml/memory/qv4mm.cpp @@ -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) { diff --git a/src/qml/memory/qv4mm_p.h b/src/qml/memory/qv4mm_p.h index dfa0d85dff..86a0ba2735 100644 --- a/src/qml/memory/qv4mm_p.h +++ b/src/qml/memory/qv4mm_p.h @@ -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; |