aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine_p.h
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-02-13 20:21:34 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-02-13 20:21:35 +0100
commit268931e742908368a7eab7c16021601bb0a95dc5 (patch)
tree3ba9f4fdde1a618c2724878973392b1fe619c7c9 /src/qml/jsruntime/qv4engine_p.h
parentcad65e4eb34110a48545bf1fdb2e83d848c5184c (diff)
parentb733c37522abeb33f2e14f7a8fdefaf15acf42b5 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Diffstat (limited to 'src/qml/jsruntime/qv4engine_p.h')
-rw-r--r--src/qml/jsruntime/qv4engine_p.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 61154d89a3..c955d1ab9e 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -488,10 +488,14 @@ public:
bool checkStackLimits();
- bool canJIT(Function *f)
+ bool canJIT(Function *f = nullptr)
{
#if defined(V4_ENABLE_JIT) && !defined(V4_BOOTSTRAP)
- return f->interpreterCallCount >= jitCallCountThreshold;
+ if (!canAllocateExecutableMemory)
+ return false;
+ if (f)
+ return f->interpreterCallCount >= jitCallCountThreshold;
+ return true;
#else
Q_UNUSED(f);
return false;
@@ -506,6 +510,9 @@ private:
QScopedPointer<QV4::Profiling::Profiler> m_profiler;
#endif
int jitCallCountThreshold;
+#if defined(V4_ENABLE_JIT) && !defined(V4_BOOTSTRAP)
+ static const bool canAllocateExecutableMemory;
+#endif
};
// This is a trick to tell the code generators that functions taking a NoThrowContext won't