aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-08-21 17:31:22 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-02 17:27:36 +0200
commit6f472680ebecb3a4d700eedcf62cb423b05c4fd1 (patch)
treebc732911a9c353dbac232ebda5a94468e3e261fe /src/qml/jsruntime/qv4script.cpp
parentda2f24d8e5c32fe4ed45dcb89aa357465f85fc1e (diff)
change calling convention for JS function calls
This allows faster pass through of the data if we have nested calls. Also make sure we always reserve at least QV4::Global::ReservedArgumentCount Values on the stack to avoid stack corruption. Change-Id: I42976460f1ef11a333d4adda70fba8daac66acf3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r--src/qml/jsruntime/qv4script.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index 80cca830f5..17bd9b5eed 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -78,7 +78,7 @@ struct QmlBindingWrapper : FunctionObject
scope->engine->popContext();
}
- static Value call(Managed *that, const Value &, Value *, int);
+ static Value call(Managed *that, const CallData &);
static void markObjects(Managed *m)
{
QmlBindingWrapper *wrapper = static_cast<QmlBindingWrapper*>(m);
@@ -121,7 +121,7 @@ struct CompilationUnitHolder : public QV4::Object
DEFINE_MANAGED_VTABLE(CompilationUnitHolder);
-Value QmlBindingWrapper::call(Managed *that, const Value &, Value *, int)
+Value QmlBindingWrapper::call(Managed *that, const CallData &)
{
ExecutionEngine *engine = that->engine();
QmlBindingWrapper *This = static_cast<QmlBindingWrapper *>(that);
@@ -247,7 +247,9 @@ Value Script::run()
} else {
FunctionObject *f = new (engine->memoryManager) QmlBindingWrapper(scope, vmFunction, qml.value().asObject());
- return f->call(Value::undefinedValue(), 0, 0);
+ CALLDATA(0);
+ d.thisObject = Value::undefinedValue();
+ return f->call(d);
}
}