aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-04-06 00:29:53 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2014-07-22 13:48:55 +0200
commit1019b1cabf2cfb479cd1997989f1674d2a398c9e (patch)
tree8273fbb9a24438916106e9a92ccbf08f36ab502e /src/qml/jsruntime/qv4script.cpp
parent1b008d6fb89c82d4a31d30cc1abe3128c723a851 (diff)
Move data of FunctionObject into an inner struct
Change-Id: Ic00b1761565f9f8881b665a3fecca723239e2279 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r--src/qml/jsruntime/qv4script.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index dd7c35a0d4..8a28f834fa 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -69,10 +69,10 @@ QmlBindingWrapper::QmlBindingWrapper(ExecutionContext *scope, Function *f, Objec
Q_ASSERT(scope->inUse());
setVTable(staticVTable());
- function = f;
- if (function)
- function->compilationUnit->ref();
- managedData()->needsActivation = function ? function->needsActivation() : false;
+ data.function = f;
+ if (function())
+ function()->compilationUnit->ref();
+ managedData()->needsActivation = function() ? function()->needsActivation() : false;
Scope s(scope);
ScopedValue protectThis(s, this);
@@ -91,7 +91,6 @@ QmlBindingWrapper::QmlBindingWrapper(ExecutionContext *scope, ObjectRef qml)
Q_ASSERT(scope->inUse());
setVTable(staticVTable());
- function = 0;
managedData()->needsActivation = false;
Scope s(scope);
@@ -110,13 +109,13 @@ ReturnedValue QmlBindingWrapper::call(Managed *that, CallData *)
Scope scope(engine);
QmlBindingWrapper *This = static_cast<QmlBindingWrapper *>(that);
- if (!This->function)
+ if (!This->function())
return QV4::Encode::undefined();
CallContext *ctx = This->qmlContext;
std::fill(ctx->locals, ctx->locals + ctx->function->varCount(), Primitive::undefinedValue());
engine->pushContext(ctx);
- ScopedValue result(scope, This->function->code(ctx, This->function->codeData));
+ ScopedValue result(scope, This->function()->code(ctx, This->function()->codeData));
engine->popContext();
return result.asReturnedValue();