aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmljavascriptexpression_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2016-06-22 10:12:13 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2016-06-22 11:07:05 +0000
commit702c4247d74ffb7e4fb1aaca96d70f4591203ba2 (patch)
tree6c0a41332cf4a8ab0051600efdd27b0746574795 /src/qml/qml/qqmljavascriptexpression_p.h
parentfd0e3c6d569a7410fff33974ce9f908dc2de0e22 (diff)
V4: Pass scope around as parameters inside the runtime.
The implementation of many (or all) runtime functions consist of first creating a QV4::Scope, which saves and restores the JS stack pointer. It also prevents tail-calls because of that restoring behavior. In many cases it suffices to do that at the entry-point of the runtime. The return value of a JS function call is now also stored in the scope. Previously, all return values were stored in a ScopedValue, got loaded on return, and immediately stored in another ScopedValue in the caller. This resulted in a lot of stores, where now there is only one store needed, and no extra ScopedValue for every function. Change-Id: I13d80fc0ce72c5702ef1536d41d12f710c5914fa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmljavascriptexpression_p.h')
-rw-r--r--src/qml/qml/qqmljavascriptexpression_p.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression_p.h b/src/qml/qml/qqmljavascriptexpression_p.h
index 94479f6c5e..4472a643ff 100644
--- a/src/qml/qml/qqmljavascriptexpression_p.h
+++ b/src/qml/qml/qqmljavascriptexpression_p.h
@@ -103,8 +103,7 @@ public:
virtual QString expressionIdentifier() = 0;
virtual void expressionChanged() = 0;
- QV4::ReturnedValue evaluate(bool *isUndefined);
- QV4::ReturnedValue evaluate(QV4::CallData *callData, bool *isUndefined);
+ void evaluate(QV4::CallData *callData, bool *isUndefined, QV4::Scope &scope);
inline bool notifyOnValueChanged() const;
@@ -181,7 +180,7 @@ public:
void captureProperty(QQmlNotifier *);
void captureProperty(QObject *, int, int);
- static void registerQmlDependencies(QV4::ExecutionEngine *engine, const QV4::CompiledData::Function *compiledFunction);
+ static void registerQmlDependencies(const QV4::CompiledData::Function *compiledFunction, const QV4::Scope &scope);
QQmlEngine *engine;
QQmlJavaScriptExpression *expression;