diff options
author | Lars Knoll <[email protected]> | 2013-08-21 17:31:22 +0200 |
---|---|---|
committer | The Qt Project <[email protected]> | 2013-09-02 17:27:36 +0200 |
commit | 6f472680ebecb3a4d700eedcf62cb423b05c4fd1 (patch) | |
tree | bc732911a9c353dbac232ebda5a94468e3e261fe /src/qml/jsruntime/qv4booleanobject.cpp | |
parent | da2f24d8e5c32fe4ed45dcb89aa357465f85fc1e (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 <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4booleanobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4booleanobject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4booleanobject.cpp b/src/qml/jsruntime/qv4booleanobject.cpp index 24678d23dc..25c105210a 100644 --- a/src/qml/jsruntime/qv4booleanobject.cpp +++ b/src/qml/jsruntime/qv4booleanobject.cpp @@ -51,15 +51,15 @@ BooleanCtor::BooleanCtor(ExecutionContext *scope) vtbl = &static_vtbl; } -Value BooleanCtor::construct(Managed *m, Value *args, int argc) +Value BooleanCtor::construct(Managed *m, const CallData &d) { - bool n = argc ? args[0].toBoolean() : false; + bool n = d.argc ? d.args[0].toBoolean() : false; return Value::fromObject(m->engine()->newBooleanObject(Value::fromBoolean(n))); } -Value BooleanCtor::call(Managed *, const Value &, Value *argv, int argc) +Value BooleanCtor::call(Managed *, const CallData &d) { - bool value = argc ? argv[0].toBoolean() : 0; + bool value = d.argc ? d.args[0].toBoolean() : 0; return Value::fromBoolean(value); } |