aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/jsruntime/qv4engine.cpp6
-rw-r--r--src/qml/jsruntime/qv4engine_p.h8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index ce29afdb6c..4b5aadbdcf 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -120,9 +120,6 @@ QQmlEngine *ExecutionEngine::qmlEngine() const
#endif // V4_BOOTSTRAP
qint32 ExecutionEngine::maxCallDepth = -1;
-#if defined(V4_ENABLE_JIT) && !defined(V4_BOOTSTRAP)
-const bool ExecutionEngine::canAllocateExecutableMemory = OSAllocator::canAllocateExecutableMemory();
-#endif
ExecutionEngine::ExecutionEngine()
: executableAllocator(new QV4::ExecutableAllocator)
@@ -137,6 +134,9 @@ ExecutionEngine::ExecutionEngine()
, m_engineId(engineSerial.fetchAndAddOrdered(1))
, regExpCache(0)
, m_multiplyWrappedQObjects(0)
+#if defined(V4_ENABLE_JIT) && !defined(V4_BOOTSTRAP)
+ , m_canAllocateExecutableMemory(OSAllocator::canAllocateExecutableMemory())
+#endif
{
memoryManager = new QV4::MemoryManager(this);
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 930ad8fed1..a37c640431 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -368,6 +368,9 @@ public:
// but any time a QObject is wrapped a second time in another engine, we have to do
// bookkeeping.
MultiplyWrappedQObjectMap *m_multiplyWrappedQObjects;
+#if defined(V4_ENABLE_JIT) && !defined(V4_BOOTSTRAP)
+ const bool m_canAllocateExecutableMemory;
+#endif
int internalClassIdCount = 0;
@@ -487,7 +490,7 @@ public:
bool canJIT(Function *f = nullptr)
{
#if defined(V4_ENABLE_JIT) && !defined(V4_BOOTSTRAP)
- if (!canAllocateExecutableMemory)
+ if (!m_canAllocateExecutableMemory)
return false;
if (f)
return f->interpreterCallCount >= jitCallCountThreshold;
@@ -506,9 +509,6 @@ 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