diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-10-20 15:14:41 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-07 09:00:26 +0000 |
commit | c6c79644dc869259482a011f8b737f709af02fb2 (patch) | |
tree | 6f3c3a721f7bbd1b1a76189b537faffc4de24c1a /src/qml/jsruntime/qv4jscall_p.h | |
parent | 7287690a41ab762c0c4efe02632efeaf3e0187b4 (diff) |
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 <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4jscall_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4jscall_p.h | 14 |
1 files changed, 7 insertions, 7 deletions
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<CallData *>(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<CallData *>(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<CallData *>(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<CallData *>(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<CallData *>(scope.engine->jsStackTop); @@ -119,7 +119,7 @@ struct JSCall { } ReturnedValue callAsConstructor() const { - return static_cast<FunctionObject &>(ptr->function).construct(ptr->args, ptr->argc()); + return static_cast<FunctionObject &>(ptr->function).callAsConstructor(ptr->args, ptr->argc()); } CallData *ptr; |