aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqml.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-01-25 17:27:56 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-01-26 08:46:48 +0100
commitd77c16639ce68d95a22640d8fb7cc9b846a1ed05 (patch)
tree3328cacafd5c877b742f10afded55dc99f8c6954 /src/qml/qml/qqml.cpp
parentc0a582ed1cfa349fd2b32c30be5edb1fbbf2168a (diff)
Allow AOT compiled functions to set the instruction pointer
This way we get correct line numbers in error messages. Change-Id: Ieb642523f74adf73955e78cdfb8cb2faee40b321 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqml.cpp')
-rw-r--r--src/qml/qml/qqml.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp
index 77c5226a97..d4eeff90a2 100644
--- a/src/qml/qml/qqml.cpp
+++ b/src/qml/qml/qqml.cpp
@@ -601,4 +601,9 @@ QJSValue QQmlPrivate::AOTCompiledContext::jsMetaType(int index) const
compilationUnit->runtimeClasses[index]->asReturnedValue());
}
+void QQmlPrivate::AOTCompiledContext::setInstructionPointer(int offset) const
+{
+ engine->handle()->currentStackFrame->instructionPointer = offset;
+}
+
QT_END_NAMESPACE