diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-02-13 20:21:34 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-02-13 20:21:35 +0100 |
commit | 268931e742908368a7eab7c16021601bb0a95dc5 (patch) | |
tree | 3ba9f4fdde1a618c2724878973392b1fe619c7c9 /src/qml/jsruntime/qv4engine_p.h | |
parent | cad65e4eb34110a48545bf1fdb2e83d848c5184c (diff) | |
parent | b733c37522abeb33f2e14f7a8fdefaf15acf42b5 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: Ib297817e2fd9b6790d9bc8ee522c32f5b3422574
Diffstat (limited to 'src/qml/jsruntime/qv4engine_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4engine_p.h | 11 |
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 |