From 6793683b165bca058e4bd9ee1b3beac8cff12b9d Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 23 Nov 2017 11:34:27 +0100 Subject: V4: Only start JITting after a minimum of 3 calls Change-Id: I748e06041f3085980ce48391ba2d829a9d86a727 Reviewed-by: Lars Knoll Reviewed-by: Ulf Hermann --- src/qml/jsruntime/qv4engine.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/qml/jsruntime/qv4engine.cpp') diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index c57f39f61c..c97ba38dec 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -168,6 +168,15 @@ ExecutionEngine::ExecutionEngine() /* writable */ true, /* executable */ false, /* includesGuardPages */ true); + { + bool ok = false; + jitCallCountThreshold = qEnvironmentVariableIntValue("QV4_JIT_CALL_THRESHOLD", &ok); + if (!ok) + jitCallCountThreshold = 3; + if (qEnvironmentVariableIsSet("QV4_FORCE_INTERPRETER")) + jitCallCountThreshold = std::numeric_limits::max(); + } + exceptionValue = jsAlloca(1); globalObject = static_cast(jsAlloca(1)); jsObjects = jsAlloca(NJSObjects); @@ -1545,15 +1554,6 @@ QV4::ReturnedValue ExecutionEngine::metaTypeToJS(int type, const void *data) return 0; } -bool ExecutionEngine::canJIT() -{ -#ifdef V4_ENABLE_JIT - return true; -#else - return false; -#endif -} - // Converts a JS value to a meta-type. // data must point to a place that can store a value of the given type. // Returns true if conversion succeeded, false otherwise. -- cgit v1.2.3