aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2017-11-14 10:45:06 +0100
committerLars Knoll <lars.knoll@qt.io>2017-11-17 11:53:42 +0000
commit3658f534cb1947663d29b9db00dcced462674aed (patch)
treea0c46c3c70c228426b4b774fb742b25a4854be9a /src/qml/jsruntime/qv4engine.cpp
parent75584bde397b1a7e92281855ea04e743fae7c1c5 (diff)
V4: Add a baseline JIT
This patch add a JIT back in for all platforms that supported JITting before, with the exception of MIPS. Change-Id: I51bc5ce3a2ac40e0510bd72a563af897c5b60343 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index b92bd3992d..beb856c2f6 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -793,7 +793,7 @@ int CppStackFrame::lineNumber() const
};
const QV4::CompiledData::Function *cf = v4Function->compiledFunction;
- uint offset = static_cast<uint>(instructionPointer - v4Function->codeData);
+ uint offset = instructionPointer;
const CompiledData::CodeOffsetToLine *lineNumbers = cf->lineNumberTable();
uint nLineNumbers = cf->nLineNumbers;
const CompiledData::CodeOffsetToLine *line = std::lower_bound(lineNumbers, lineNumbers + nLineNumbers, offset, findLine) - 1;
@@ -1545,6 +1545,15 @@ 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.