aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-10-15 16:00:49 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-16 06:36:47 +0200
commitad7f91c59a87564d2d1d9baad407ba7b07a075a7 (patch)
tree951e50673fe2baee0123832af3909e528242ef4d /src/qml
parent0c6743749f8bab4bbace3f3c3d1172d1ca959f7c (diff)
Turn on exact garbage collection by default
Keep conservative GC as a fallback for testing Enable all tests again that were skipped due to GC issues. Change-Id: I8e0fa728207bdd39a96d0acf95e27841157d8402 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/jsruntime/qv4mm.cpp45
1 files changed, 23 insertions, 22 deletions
diff --git a/src/qml/jsruntime/qv4mm.cpp b/src/qml/jsruntime/qv4mm.cpp
index 8050b2782e..6fe49cdf7f 100644
--- a/src/qml/jsruntime/qv4mm.cpp
+++ b/src/qml/jsruntime/qv4mm.cpp
@@ -171,7 +171,7 @@ struct MemoryManager::Data
memset(allocCount, 0, sizeof(allocCount));
scribble = !qgetenv("QV4_MM_SCRIBBLE").isEmpty();
aggressiveGC = !qgetenv("QV4_MM_AGGRESSIVE_GC").isEmpty();
- exactGC = !qgetenv("QV4_MM_EXACT_GC").isEmpty();
+ exactGC = qgetenv("QV4_MM_CONSERVATIVE_GC").isEmpty();
}
~Data()
@@ -332,37 +332,38 @@ void MemoryManager::mark()
persistent = persistent->next;
}
- // push all caller saved registers to the stack, so we can find the objects living in these registers
+ collectFromJSStack();
+
+ if (!m_d->exactGC) {
+ // push all caller saved registers to the stack, so we can find the objects living in these registers
#if COMPILER(MSVC)
# if CPU(X86_64)
- HANDLE thread = GetCurrentThread();
- WOW64_CONTEXT ctxt;
- /*bool success =*/ Wow64GetThreadContext(thread, &ctxt);
+ HANDLE thread = GetCurrentThread();
+ WOW64_CONTEXT ctxt;
+ /*bool success =*/ Wow64GetThreadContext(thread, &ctxt);
# elif CPU(X86)
- HANDLE thread = GetCurrentThread();
- CONTEXT ctxt;
- /*bool success =*/ GetThreadContext(thread, &ctxt);
+ HANDLE thread = GetCurrentThread();
+ CONTEXT ctxt;
+ /*bool success =*/ GetThreadContext(thread, &ctxt);
# endif // CPU
#elif COMPILER(CLANG) || COMPILER(GCC)
# if CPU(X86_64)
- quintptr regs[5];
- asm(
- "mov %%rbp, %0\n"
- "mov %%r12, %1\n"
- "mov %%r13, %2\n"
- "mov %%r14, %3\n"
- "mov %%r15, %4\n"
- : "=m" (regs[0]), "=m" (regs[1]), "=m" (regs[2]), "=m" (regs[3]), "=m" (regs[4])
- :
- :
- );
+ quintptr regs[5];
+ asm(
+ "mov %%rbp, %0\n"
+ "mov %%r12, %1\n"
+ "mov %%r13, %2\n"
+ "mov %%r14, %3\n"
+ "mov %%r15, %4\n"
+ : "=m" (regs[0]), "=m" (regs[1]), "=m" (regs[2]), "=m" (regs[3]), "=m" (regs[4])
+ :
+ :
+ );
# endif // CPU
#endif // COMPILER
- collectFromJSStack();
-
- if (!m_d->exactGC)
collectFromStack();
+ }
// Preserve QObject ownership rules within JavaScript: A parent with c++ ownership
// keeps all of its children alive in JavaScript.