aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-05-19 12:39:52 +0200
committerLars Knoll <lars.knoll@qt.io>2017-05-19 18:54:50 +0000
commit5bc38a50308665bdc185eb96dbcc9ba7948ab4e0 (patch)
tree4c4d5be3460a8c6a0550cd10c46330b5188e03d1 /tests
parentcb70989c4fa2b8707ac59e25b3abe200ac7a5165 (diff)
Get rid of the old way of defining builtin functions
The old calling convention used for builtin functions is very inefficient. It was still being used in a few places. Clean those up and convert them to the new and much more effiecient calling convention. Change-Id: I6b769c6185df7e9be1e80709330fc1ca868576c1 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp b/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp
index 584bd10151..441f8c113f 100644
--- a/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp
+++ b/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp
@@ -46,7 +46,7 @@
using namespace QV4;
using namespace QV4::Debugging;
-typedef QV4::ReturnedValue (*InjectedFunction)(QV4::CallContext*);
+typedef void (*InjectedFunction)(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData);
Q_DECLARE_METATYPE(InjectedFunction)
static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000)
@@ -438,11 +438,11 @@ void tst_qv4debugger::addBreakPointWhilePaused()
QCOMPARE(state.lineNumber, 2);
}
-static QV4::ReturnedValue someCall(QV4::CallContext *ctx)
+static void someCall(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *)
{
- static_cast<QV4Debugger *>(ctx->d()->engine->debugger())
+ static_cast<QV4Debugger *>(scope.engine->debugger())
->removeBreakPoint("removeBreakPointForNextInstruction", 2);
- return QV4::Encode::undefined();
+ RETURN_UNDEFINED();
}
void tst_qv4debugger::removeBreakPointForNextInstruction()