aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2017-06-29 12:17:43 +0200
committerLars Knoll <lars.knoll@qt.io>2017-06-29 10:20:50 +0000
commit2ac3eaee7f613201690f7b73a234363372f13247 (patch)
tree7c12c04cff0c1cd2167eff1e8ac169f600abe37b /src/qml/jsruntime/qv4engine.cpp
parent2ffdcb3fd31c85dc42b7b7cc8bf0e0feaa23c07f (diff)
Lower the maximum call depth for debug builds
Also merge VME::exec and VME::run together, so there is one less frame on the stack. Change-Id: I7268e0b1f16fc75766c0c9b7b5e14b9885e6fe7c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 568413bc57..90e705e42f 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -145,7 +145,12 @@ ExecutionEngine::ExecutionEngine()
bool ok = false;
maxCallDepth = qEnvironmentVariableIntValue("QV4_MAX_CALL_DEPTH", &ok);
if (!ok || maxCallDepth <= 0) {
+#ifdef QT_NO_DEBUG
maxCallDepth = 1234;
+#else
+ // no (tail call) optimization is done, so there'll be a lot mare stack frames active
+ maxCallDepth = 200;
+#endif
}
}
Q_ASSERT(maxCallDepth > 0);