From 50e7badd5f261bd69db9d8f03d5651e346087218 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 4 Aug 2017 18:53:51 +0200 Subject: Remove Scope::result and convert calling convention for builtins Allow for faster calling of builtins, and completely avoid scope creation in many cases. Change-Id: I0f1681e19e9908db10def85a74e134a87fc2e44c Reviewed-by: Simon Hausmann --- src/qml/qml/qqmldelayedcallqueue.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/qml/qml/qqmldelayedcallqueue.cpp') diff --git a/src/qml/qml/qqmldelayedcallqueue.cpp b/src/qml/qml/qqmldelayedcallqueue.cpp index 5f274b8da5..a32a9dd783 100644 --- a/src/qml/qml/qqmldelayedcallqueue.cpp +++ b/src/qml/qml/qqmldelayedcallqueue.cpp @@ -105,8 +105,9 @@ void QQmlDelayedCallQueue::init(QV4::ExecutionEngine* engine) m_tickedMethod = metaObject.method(methodIndex); } -void QQmlDelayedCallQueue::addUniquelyAndExecuteLater(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) +QV4::ReturnedValue QQmlDelayedCallQueue::addUniquelyAndExecuteLater(const QV4::BuiltinFunction *b, QV4::CallData *callData) { + QV4::Scope scope(b); if (callData->argc == 0) THROW_GENERIC_ERROR("Qt.callLater: no arguments given"); @@ -169,7 +170,7 @@ void QQmlDelayedCallQueue::addUniquelyAndExecuteLater(const QV4::BuiltinFunction m_tickedMethod.invoke(this, Qt::QueuedConnection); m_callbackOutstanding = true; } - scope.result = QV4::Encode::undefined(); + return QV4::Encode::undefined(); } void QQmlDelayedCallQueue::storeAnyArguments(DelayedFunctionCall &dfc, const QV4::CallData *callData, int offset, QV4::ExecutionEngine *engine) -- cgit v1.2.3