diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-08-21 17:31:22 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-02 17:27:36 +0200 |
commit | 6f472680ebecb3a4d700eedcf62cb423b05c4fd1 (patch) | |
tree | bc732911a9c353dbac232ebda5a94468e3e261fe /tools | |
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 <simon.hausmann@digia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/v4/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/v4/main.cpp b/tools/v4/main.cpp index 225a4f11fb..845f78117a 100644 --- a/tools/v4/main.cpp +++ b/tools/v4/main.cpp @@ -77,10 +77,10 @@ struct Print: FunctionObject name = scope->engine->newString("print"); } - static Value call(Managed *, const Value &, Value *args, int argc) + static Value call(Managed *, const CallData &d) { - for (int i = 0; i < argc; ++i) { - QString s = args[i].toQString(); + for (int i = 0; i < d.argc; ++i) { + QString s = d.args[i].toQString(); if (i) std::cout << ' '; std::cout << qPrintable(s); @@ -102,7 +102,7 @@ struct GC: public FunctionObject vtbl = &static_vtbl; name = scope->engine->newString("gc"); } - static Value call(Managed *m, const Value &, Value *, int) + static Value call(Managed *m, const CallData &) { m->engine()->memoryManager->runGC(); return Value::undefinedValue(); |