From c6c79644dc869259482a011f8b737f709af02fb2 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 20 Oct 2017 15:14:41 +0200 Subject: Rename JSCall to JSCallData As, this is going to change in a simple stack based structure to keep pointers to the data to pass to calls. Change-Id: Ia9aa3f81ee3eeba36affd16aac7b2fe97d59aea9 Reviewed-by: Erik Verbruggen --- src/qml/jsruntime/qv4jscall_p.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/qml/jsruntime/qv4jscall_p.h') diff --git a/src/qml/jsruntime/qv4jscall_p.h b/src/qml/jsruntime/qv4jscall_p.h index 75f866706b..f356f29ca2 100644 --- a/src/qml/jsruntime/qv4jscall_p.h +++ b/src/qml/jsruntime/qv4jscall_p.h @@ -60,28 +60,28 @@ QT_BEGIN_NAMESPACE namespace QV4 { -struct JSCall { - JSCall(const Scope &scope, std::nullptr_t, int argc = 0) +struct JSCallData { + JSCallData(const Scope &scope, std::nullptr_t, int argc = 0) { int size = int(offsetof(QV4::CallData, args)/sizeof(QV4::Value)) + argc; ptr = reinterpret_cast(scope.alloc(size)); ptr->setArgc(argc); } - JSCall(const Scope &scope, const FunctionObject *function, int argc = 0) + JSCallData(const Scope &scope, const FunctionObject *function, int argc = 0) { int size = int(offsetof(QV4::CallData, args)/sizeof(QV4::Value)) + argc; ptr = reinterpret_cast(scope.alloc(size)); ptr->setArgc(argc); ptr->function = *function; } - JSCall(const Scope &scope, Heap::FunctionObject *function, int argc = 0) + JSCallData(const Scope &scope, Heap::FunctionObject *function, int argc = 0) { int size = int(offsetof(QV4::CallData, args)/sizeof(QV4::Value)) + argc; ptr = reinterpret_cast(scope.alloc(size)); ptr->setArgc(argc); ptr->function = function; } - JSCall(const Scope &scope, Value *argv, int argc, Value *thisObject = 0) + JSCallData(const Scope &scope, Value *argv, int argc, Value *thisObject = 0) { int size = int(offsetof(QV4::CallData, args)/sizeof(QV4::Value)) + argc; ptr = reinterpret_cast(scope.engine->jsStackTop); @@ -93,7 +93,7 @@ struct JSCall { ptr->setArgc(argc); memcpy(ptr->args, argv, argc*sizeof(Value)); } - JSCall(const Scope &scope, ReturnedValue function, const Value *argv, int argc, const Value *thisObject = 0) + JSCallData(const Scope &scope, ReturnedValue function, const Value *argv, int argc, const Value *thisObject = 0) { int size = int(offsetof(QV4::CallData, args)/sizeof(QV4::Value)) + argc; ptr = reinterpret_cast(scope.engine->jsStackTop); @@ -119,7 +119,7 @@ struct JSCall { } ReturnedValue callAsConstructor() const { - return static_cast(ptr->function).construct(ptr->args, ptr->argc()); + return static_cast(ptr->function).callAsConstructor(ptr->args, ptr->argc()); } CallData *ptr; -- cgit v1.2.3